2020-01-16 23:05:46 +00:00
|
|
|
let secret = {};
|
|
|
|
try {
|
|
|
|
secret = require('../.secret.json');
|
|
|
|
} catch(err) {
|
|
|
|
console.dir("warning: .secret.json file not found; this is only needed to deploy to testnet or livenet etc..");
|
|
|
|
}
|
|
|
|
|
2018-12-17 10:09:22 +00:00
|
|
|
module.exports = {
|
|
|
|
// applies to all environments
|
|
|
|
default: {
|
|
|
|
enabled: true,
|
2020-01-16 23:05:46 +00:00
|
|
|
client: "geth",
|
2018-12-17 10:09:22 +00:00
|
|
|
|
|
|
|
// Accounts to use as node accounts
|
|
|
|
// The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount`
|
2018-12-20 16:29:56 +00:00
|
|
|
accounts: [
|
2018-12-17 10:09:22 +00:00
|
|
|
{
|
|
|
|
nodeAccounts: true, // Accounts use for the node
|
2018-12-20 16:29:56 +00:00
|
|
|
numAddresses: 2, // Number of addresses/accounts (defaults to 1)
|
2019-04-02 14:28:48 +00:00
|
|
|
password: "embarkConfig/development/password" // Password file for the accounts
|
2018-12-17 10:09:22 +00:00
|
|
|
}
|
2018-12-20 16:29:56 +00:00
|
|
|
]
|
2018-12-17 10:09:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// default environment, merges with the settings in default
|
|
|
|
// assumed to be the intended environment by `embark run` and `embark blockchain`
|
|
|
|
development: {
|
2020-03-02 18:05:20 +00:00
|
|
|
client: 'ganache-cli',
|
2020-01-16 23:05:46 +00:00
|
|
|
// The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount`
|
|
|
|
accounts: [
|
|
|
|
{
|
|
|
|
nodeAccounts: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
mnemonic: "foster gesture flock merge beach plate dish view friend leave drink valley shield list enemy",
|
|
|
|
balance: "5 ether",
|
|
|
|
numAddresses: "10"
|
|
|
|
}
|
|
|
|
]
|
2018-12-17 10:09:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// merges with the settings in default
|
|
|
|
// used with "embark run privatenet" and/or "embark blockchain privatenet"
|
|
|
|
privatenet: {
|
|
|
|
accounts: [
|
|
|
|
{
|
|
|
|
nodeAccounts: true,
|
2019-04-02 14:28:48 +00:00
|
|
|
password: "embarkConfig/privatenet/password" // Password to unlock the account
|
2018-12-17 10:09:22 +00:00
|
|
|
}
|
|
|
|
],
|
2020-01-16 23:05:46 +00:00
|
|
|
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
|
|
|
|
}
|
2018-12-17 10:09:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
privateparitynet: {
|
2020-01-16 23:05:46 +00:00
|
|
|
client: "parity",
|
|
|
|
genesisBlock: "embarkConfig/privatenet/genesis-parity.json",
|
2018-12-17 10:09:22 +00:00
|
|
|
datadir: ".embark/privatenet/datadir",
|
2020-01-16 23:05:46 +00:00
|
|
|
miningMode: 'off'
|
|
|
|
},
|
|
|
|
|
|
|
|
externalnode: {
|
|
|
|
endpoint: "URL_OF_THE_NODE", // Endpoint of an node to connect to. Can be on localhost or on the internet
|
2018-12-17 10:09:22 +00:00
|
|
|
accounts: [
|
|
|
|
{
|
2020-01-16 23:05:46 +00:00
|
|
|
mnemonic: "YOUR_MNEMONIC",
|
|
|
|
hdpath: "m/44'/60'/0'/0/",
|
|
|
|
numAddresses: "1"
|
2018-12-17 10:09:22 +00:00
|
|
|
}
|
2020-01-16 23:05:46 +00:00
|
|
|
]
|
2018-12-17 10:09:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
testnet: {
|
2020-01-16 23:05:46 +00:00
|
|
|
networkType: "testnet", // Can be: testnet(ropsten), rinkeby, livenet or custom, in which case, it will use the specified networkId
|
2020-01-07 14:47:20 +00:00
|
|
|
networkId: 4,
|
2020-01-16 23:05:46 +00:00
|
|
|
endpoint: `https://rinkeby.infura.io/v3/${secret.infuraKey}`,
|
2018-12-17 10:09:22 +00:00
|
|
|
accounts: [
|
|
|
|
{
|
2020-01-16 23:05:46 +00:00
|
|
|
mnemonic: secret.mnemonic,
|
|
|
|
hdpath: secret.hdpath || "m/44'/60'/0'/0/",
|
|
|
|
numAddresses: "10"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
ropsten: {
|
|
|
|
endpoint: `https://ropsten.infura.io/v3/${secret.infuraKey}`,
|
|
|
|
accounts: [
|
|
|
|
{
|
|
|
|
mnemonic: secret.mnemonic,
|
|
|
|
hdpath: secret.hdpath || "m/44'/60'/0'/0/",
|
|
|
|
numAddresses: "10"
|
2018-12-17 10:09:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
livenet: {
|
|
|
|
networkType: "livenet",
|
2020-01-16 23:05:46 +00:00
|
|
|
endpoint: `https://mainnet.infura.io/v3/${secret.infuraKey}`,
|
2018-12-17 10:09:22 +00:00
|
|
|
accounts: [
|
|
|
|
{
|
2020-01-16 23:05:46 +00:00
|
|
|
mnemonic: secret.mnemonic,
|
|
|
|
hdpath: secret.hdpath || "m/44'/60'/0'/0/",
|
|
|
|
numAddresses: "10"
|
2018-12-17 10:09:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
// you can name an environment with specific settings and then specify with
|
|
|
|
// "embark run custom_name" or "embark blockchain custom_name"
|
|
|
|
//custom_name: {
|
|
|
|
//}
|
|
|
|
};
|