From 14255abaad1fd8f905a06c027993a72d481f8886 Mon Sep 17 00:00:00 2001 From: mmacedoeu Date: Wed, 18 May 2022 14:18:54 -0300 Subject: [PATCH] doc(bridge-ethereum): truffle migration --- bridges/ethereum/README.md | 16 ++++++++++++++++ bridges/ethereum/truffle-config.js | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/bridges/ethereum/README.md b/bridges/ethereum/README.md index 9e7a5937..03bd30e4 100644 --- a/bridges/ethereum/README.md +++ b/bridges/ethereum/README.md @@ -8,4 +8,20 @@ The sender that wish to wrap ETH or ERC20 in Bitgreen Chain, should deposit the All the other functions are accessible to the "Keepers" of the bridge. +## Truffle setup +Refer to truffle oficial documentation at https://trufflesuite.com/docs/truffle/getting-started/running-migrations/ + +### Custom parameters for bitgreen + +* Run yarn to bring dependencies +* Set your environment variable YOUR_SEED_PHRASE to contract owner mnemonic phrase +* Select network when running migration based on configuration from truffle-config.js + +Example: +``` +yarn +export YOUR_SEED_PHRASE="affair leopard fever palace ..." +truffle migrate --network rinkeby_local + +``` diff --git a/bridges/ethereum/truffle-config.js b/bridges/ethereum/truffle-config.js index 73635795..d3a8a668 100644 --- a/bridges/ethereum/truffle-config.js +++ b/bridges/ethereum/truffle-config.js @@ -29,6 +29,14 @@ module.exports = { confirmations: 2, // # of confs to wait between deployments. (default: 0) timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) + }, + goerli_local: { + provider: () => new HDWalletProvider(YOUR_SEED_PHRASE, `http://127.0.0.1:8545`), + network_id: 5, // Ropsten's id + gas: 5500000, // Ropsten has a lower block limit than mainnet + confirmations: 1, // # of confs to wait between deployments. (default: 0) + timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) + skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) } }, //