contracts.js
1 const wallet = require('./development/mnemonic') 2 3 module.exports = { 4 // default applies to all environments 5 default: { 6 // Blockchain node to deploy the contracts 7 deployment: { 8 host: 'localhost', // Host of the blockchain node 9 port: 8545, // Port of the blockchain node 10 type: 'rpc', // Type of connection (ws or rpc), 11 // Accounts to use instead of the default account to populate your wallet 12 // The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount` 13 /* ,accounts: [ 14 { 15 privateKey: "your_private_key", 16 balance: "5 ether" // You can set the balance of the account in the dev environment 17 // Balances are in Wei, but you can specify the unit with its name 18 }, 19 { 20 privateKeyFile: "path/to/file", // Either a keystore or a list of keys, separated by , or ; 21 password: "passwordForTheKeystore" // Needed to decrypt the keystore file 22 }, 23 { 24 mnemonic: "12 word mnemonic", 25 addressIndex: "0", // Optional. The index to start getting the address 26 numAddresses: "1", // Optional. The number of addresses to get 27 hdpath: "m/44'/60'/0'/0/" // Optional. HD derivation path 28 }, 29 { 30 "nodeAccounts": true // Uses the Ethereum node's accounts 31 } 32 ] */ 33 34 accounts: [ 35 { 36 mnemonic: wallet.mnemonic, 37 balance: '1534983463450 ether', 38 }, 39 ], 40 }, 41 // order of connections the dapp should connect to 42 // dappConnection: [ 43 // '$WEB3', // uses pre existing web3 object if available (e.g in Mist) 44 // 'ws://localhost:8546', 45 // 'http://localhost:8545', 46 // ], 47 48 // Automatically call `ethereum.enable` if true. 49 // If false, the following code must run before sending any transaction: `await EmbarkJS.enableEthereum();` 50 // Default value is true. 51 // dappAutoEnable: true, 52 53 gas: 'auto', 54 55 // Strategy for the deployment of the contracts: 56 // - implicit will try to deploy all the contracts located inside the contracts directory 57 // or the directory configured for the location of the contracts. This is default one 58 // when not specified 59 // - explicit will only attempt to deploy the contracts that are explicitly specified inside the 60 // contracts section. 61 // strategy: 'implicit', 62 63 // contracts: { 64 // Discover: { 65 // args: { _SNT: '0x744d70fdbe2ba4cf95131626614a1763df805b9e' }, 66 // }, 67 // MiniMeToken: { deploy: false }, 68 // TestBancorFormula: { deploy: false }, 69 // }, 70 71 contracts: { 72 MiniMeToken: { deploy: false }, 73 BancorFormula: { deploy: false }, 74 MiniMeTokenFactory: { deploy: false }, 75 SafeMath: { deploy: false }, 76 TestBancorFormula: { deploy: false }, 77 SNT: { 78 instanceOf: 'MiniMeToken', 79 address: '0x2764b5da3696E3613Ef9864E9B4613f9fA478E75', 80 }, 81 Discover: { address: '0x9591a20b9B601651eDF1072A1Dda994C0B1a5bBf' }, 82 // SNT: { 83 // instanceOf: 'MiniMeToken', 84 // args: [ 85 // '$MiniMeTokenFactory', 86 // '0x0000000000000000000000000000000000000000', 87 // 0, 88 // 'TestMiniMeToken', 89 // 18, 90 // 'SNT', 91 // true, 92 // ], 93 // }, 94 // Discover: { 95 // args: ['$SNT'], 96 // }, 97 }, 98 }, 99 100 // default environment, merges with the settings in default 101 // assumed to be the intended environment by `embark run` 102 development: { 103 dappConnection: [ 104 'ws://localhost:8546', 105 'http://localhost:8545', 106 '$WEB3', // uses pre existing web3 object if available (e.g in Mist) 107 ], 108 }, 109 110 // merges with the settings in default 111 // used with "embark run privatenet" 112 privatenet: {}, 113 114 // merges with the settings in default 115 // used with "embark run testnet" 116 testnet: { 117 deployment: { 118 accounts: [{ mnemonic: wallet.mnemonic }], 119 host: `ropsten.infura.io/v3/8675214b97b44e96b70d05326c61fd6a`, 120 port: false, 121 type: 'rpc', 122 protocol: 'https', 123 }, 124 dappConnection: [ 125 'https://ropsten.infura.io/v3/8675214b97b44e96b70d05326c61fd6a', 126 ], 127 }, 128 129 // merges with the settings in default 130 // used with "embark run livenet" 131 livenet: {}, 132 133 // you can name an environment with specific settings and then specify with 134 // "embark run custom_name" or "embark blockchain custom_name" 135 // custom_name: { 136 // } 137 }