-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@embark/dapps): Add blockchain config to simple template
Add blockchain config to simple template, and supporting files (ie passwords, genesis) that aid in examples set forth in the blockchain config.
- Loading branch information
Showing
9 changed files
with
257 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// This file contains only the basic configuration you need to run Embark's node | ||
// For additional configurations, see: https://framework.embarklabs.io/docs/blockchain_configuration.html | ||
module.exports = { | ||
// default applies to all environments | ||
default: { | ||
enabled: true, | ||
client: "geth" // Can be ganache-cli, geth or parity (default: geth) | ||
}, | ||
|
||
development: { | ||
client: 'ganache-cli', | ||
clientConfig: { | ||
miningMode: 'dev' // Mode in which the node mines. Options: dev, auto, always, off | ||
} | ||
}, | ||
|
||
privatenet: { | ||
// Accounts to use as node accounts | ||
// The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount` | ||
// For more account configurations, see: https://framework.embarklabs.io/docs/blockchain_accounts_configuration.html | ||
accounts: [ | ||
{ | ||
nodeAccounts: true, // Accounts use for the node | ||
numAddresses: "1", // Number of addresses/accounts (defaults to 1) | ||
password: "config/development/password" // Password file for the accounts | ||
} | ||
], | ||
clientConfig: { | ||
datadir: ".embark/privatenet/datadir", // Data directory for the databases and keystore | ||
miningMode: 'auto', | ||
genesisBlock: "config/privatenet/genesis.json" // Genesis block to initiate on first creation of a development node | ||
} | ||
}, | ||
|
||
privateparitynet: { | ||
client: "parity", | ||
genesisBlock: "config/privatenet/genesis-parity.json", | ||
datadir: ".embark/privatenet/datadir", | ||
miningMode: 'off' | ||
}, | ||
|
||
externalnode: { | ||
endpoint: "URL_OF_THE_NODE", // Endpoint of an node to connect to. Can be on localhost or on the internet | ||
accounts: [ | ||
{ | ||
mnemonic: "YOUR_MNEMONIC", | ||
hdpath: "m/44'/60'/0'/0/", | ||
numAddresses: "1" | ||
} | ||
] | ||
}, | ||
|
||
testnet: { | ||
networkType: "testnet", // Can be: testnet(ropsten), rinkeby, livenet or custom, in which case, it will use the specified networkId | ||
syncMode: "light", | ||
accounts: [ | ||
{ | ||
nodeAccounts: true, | ||
password: "config/testnet/password" | ||
} | ||
] | ||
}, | ||
|
||
livenet: { | ||
networkType: "livenet", | ||
syncMode: "light", | ||
accounts: [ | ||
{ | ||
nodeAccounts: true, | ||
password: "config/livenet/password" | ||
} | ||
] | ||
} | ||
|
||
// you can name an environment with specific settings and then specify with | ||
// "embark run custom_name" or "embark blockchain custom_name" | ||
//custom_name: { | ||
//} | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev_password |
147 changes: 147 additions & 0 deletions
147
dapps/templates/simple/config/privatenet/genesis-parity.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"config": { | ||
"homesteadBlock": 0, | ||
"byzantiumBlock": 0, | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"daoForkSupport": true | ||
}, | ||
"nonce": "0x0000000000000042", | ||
"difficulty": "0x0", | ||
"alloc": { | ||
"0x3333333333333333333333333333333333333333": {"balance": "15000000000000000000"} | ||
}, | ||
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x3333333333333333333333333333333333333333", | ||
"timestamp": "0x00", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"extraData": "0x", | ||
"gasLimit": "0x7a1200" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters