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