blockchain.js
1 module.exports = { 2 // applies to all environments 3 default: { 4 enabled: true, 5 rpcHost: 'localhost', // HTTP-RPC server listening interface (default: "localhost") 6 rpcPort: 8545, // HTTP-RPC server listening port (default: 8545) 7 rpcCorsDomain: { 8 // Domains from which to accept cross origin requests (browser enforced). This can also be a comma separated list 9 auto: true, // When "auto" is true, Embark will automatically set the cors to the address of the webserver 10 additionalCors: [], // Additional CORS domains to add to the list. If "auto" is false, only those will be added 11 }, 12 wsRPC: true, // Enable the WS-RPC server 13 wsOrigins: { 14 // Same thing as "rpcCorsDomain", but for WS origins 15 auto: true, 16 additionalCors: [], 17 }, 18 wsHost: 'localhost', // WS-RPC server listening interface (default: "localhost") 19 wsPort: 8546, // WS-RPC server listening port (default: 8546) 20 21 // Accounts to use as node accounts 22 // The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount` 23 // accounts: [ 24 // { 25 // nodeAccounts: true, // Accounts use for the node 26 // numAddresses: '1', // Number of addresses/accounts (defaults to 1) 27 // password: 'config/development/password', // Password file for the accounts 28 // }, 29 // Below are additional accounts that will count as `nodeAccounts` in the `deployment` section of your contract config 30 // Those will not be unlocked in the node itself 31 // { 32 // privateKeyFile: 'path/to/file', // Either a keystore or a list of keys, separated by , or ; 33 // password: 'passwordForTheKeystore', // Needed to decrypt the keystore file 34 // }, 35 // { 36 // mnemonic: '12 word mnemonic', 37 // addressIndex: '0', // Optional. The index to start getting the address 38 // numAddresses: '1', // Optional. The number of addresses to get 39 // hdpath: "m/44'/60'/0'/0/", // Optional. HD derivation path 40 // }, 41 // ], 42 }, 43 44 // default environment, merges with the settings in default 45 // assumed to be the intended environment by `embark run` and `embark blockchain` 46 development: { 47 ethereumClientName: 'geth', // Can be geth or parity (default:geth) 48 // ethereumClientBin: "geth", // path to the client binary. Useful if it is not in the global PATH 49 networkType: 'custom', // Can be: testnet, rinkeby, livenet or custom, in which case, it will use the specified networkId 50 networkId: 1337, // Network id used when networkType is custom 51 isDev: true, // Uses and ephemeral proof-of-authority network with a pre-funded developer account, mining enabled 52 datadir: '.embark/development/datadir', // Data directory for the databases and keystore (Geth 1.8.15 and Parity 2.0.4 can use the same base folder, till now they does not conflict with each other) 53 mineWhenNeeded: true, // Uses our custom script (if isDev is false) to mine only when needed 54 nodiscover: true, // Disables the peer discovery mechanism (manual peer addition) 55 maxpeers: 0, // Maximum number of network peers (network disabled if set to 0) (default: 25) 56 proxy: true, // Proxy is used to present meaningful information about transactions 57 targetGasLimit: 9000000, // Target gas limit sets the artificial target gas floor for the blocks to mine 58 simulatorBlocktime: 0, // Specify blockTime in seconds for automatic mining. Default is 0 and no auto-mining. 59 }, 60 61 // merges with the settings in default 62 // used with "embark run privatenet" and/or "embark blockchain privatenet" 63 privatenet: { 64 networkType: 'custom', 65 networkId: 1337, 66 isDev: false, 67 datadir: '.embark/privatenet/datadir', 68 // -- mineWhenNeeded -- 69 // This options is only valid when isDev is false. 70 // Enabling this option uses our custom script to mine only when needed. 71 // Embark creates a development account for you (using `geth account new`) and funds the account. This account can be used for 72 // development (and even imported in to MetaMask). To enable correct usage, a password for this account must be specified 73 // in the `account > password` setting below. 74 // NOTE: once `mineWhenNeeded` is enabled, you must run an `embark reset` on your dApp before running 75 // `embark blockchain` or `embark run` for the first time. 76 mineWhenNeeded: true, 77 // -- genesisBlock -- 78 // This option is only valid when mineWhenNeeded is true (which is only valid if isDev is false). 79 // When enabled, geth uses POW to mine transactions as it would normally, instead of using POA as it does in --dev mode. 80 // On the first `embark blockchain or embark run` after this option is enabled, geth will create a new chain with a 81 // genesis block, which can be configured using the `genesisBlock` configuration option below. 82 genesisBlock: 'config/privatenet/genesis.json', // Genesis block to initiate on first creation of a development node 83 nodiscover: true, 84 maxpeers: 0, 85 proxy: true, 86 accounts: [ 87 { 88 nodeAccounts: true, 89 password: 'config/privatenet/password', // Password to unlock the account 90 }, 91 ], 92 targetGasLimit: 8000000, 93 simulatorBlocktime: 0, 94 }, 95 96 privateparitynet: { 97 ethereumClientName: 'parity', 98 networkType: 'custom', 99 networkId: 1337, 100 isDev: false, 101 genesisBlock: 'config/privatenet/genesis-parity.json', // Genesis block to initiate on first creation of a development node 102 datadir: '.embark/privatenet/datadir', 103 mineWhenNeeded: false, 104 nodiscover: true, 105 maxpeers: 0, 106 proxy: true, 107 accounts: [ 108 { 109 nodeAccounts: true, 110 password: 'config/privatenet/password', 111 }, 112 ], 113 targetGasLimit: 8000000, 114 simulatorBlocktime: 0, 115 }, 116 117 // merges with the settings in default 118 // used with "embark run testnet" and/or "embark blockchain testnet" 119 testnet: { 120 networkType: 'testnet', 121 syncMode: 'light', 122 accounts: [ 123 { 124 nodeAccounts: true, 125 password: 'config/testnet/password', 126 }, 127 ], 128 }, 129 130 // merges with the settings in default 131 // used with "embark run livenet" and/or "embark blockchain livenet" 132 livenet: { 133 networkType: 'livenet', 134 syncMode: 'light', 135 rpcCorsDomain: 'http://localhost:8000', 136 wsOrigins: 'http://localhost:8000', 137 accounts: [ 138 { 139 nodeAccounts: true, 140 password: 'config/livenet/password', 141 }, 142 ], 143 }, 144 145 // you can name an environment with specific settings and then specify with 146 // "embark run custom_name" or "embark blockchain custom_name" 147 // custom_name: { 148 // } 149 }