From 0aa9d7547edfac9687e811575a111d016bb130d8 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 21 Aug 2018 14:44:58 -0400 Subject: [PATCH] add comments to configs --- templates/boilerplate/config/blockchain.js | 20 +++++++++++- templates/boilerplate/config/communication.js | 27 ++++++++++++++++ templates/boilerplate/config/contracts.js | 27 +++++++++++++++- templates/boilerplate/config/namesystem.js | 32 +++++++++++++++++++ templates/boilerplate/config/storage.js | 26 ++++++++++++++- templates/demo/config/blockchain.js | 19 ++++++++++- templates/demo/config/communication.js | 27 ++++++++++++++++ templates/demo/config/contracts.js | 27 +++++++++++++++- templates/demo/config/namesystem.js | 23 +++++++++++++ templates/demo/config/storage.js | 26 ++++++++++++++- templates/simple/contracts.js | 27 +++++++++++++++- 11 files changed, 274 insertions(+), 7 deletions(-) diff --git a/templates/boilerplate/config/blockchain.js b/templates/boilerplate/config/blockchain.js index 9930b17e6..23733c9e4 100644 --- a/templates/boilerplate/config/blockchain.js +++ b/templates/boilerplate/config/blockchain.js @@ -1,4 +1,5 @@ module.exports = { + // applies to all environments default: { enabled: true, rpcHost: "localhost", // HTTP-RPC server listening interface (default: "localhost") @@ -11,6 +12,9 @@ module.exports = { wsHost: "localhost", // WS-RPC server listening interface (default: "localhost") wsPort: 8546 // WS-RPC server listening port (default: 8546) }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` and `embark blockchain` development: { networkType: "custom", // Can be: testnet, rinkeby, livenet or custom, in which case, it will use the specified networkId networkId: "1337", // Network id used when networkType is custom @@ -24,6 +28,9 @@ module.exports = { simulatorMnemonic: "example exile argue silk regular smile grass bomb merge arm assist farm", // Mnemonic used by the simulator to generate a wallet simulatorBlocktime: 0 // Specify blockTime in seconds for automatic mining. Default is 0 and no auto-mining. }, + + // merges with the settings in default + // used with "embark run privatenet" and/or "embark blockchain privatenet" privatenet: { networkType: "custom", networkId: "1337", @@ -42,6 +49,9 @@ module.exports = { simulatorMnemonic: "example exile argue silk regular smile grass bomb merge arm assist farm", simulatorBlocktime: 0 }, + + // merges with the settings in default + // used with "embark run testnet" and/or "embark blockchain testnet" testnet: { networkType: "testnet", syncMode: "light", @@ -49,6 +59,9 @@ module.exports = { password: "config/testnet/password" } }, + + // merges with the settings in default + // used with "embark run livenet" and/or "embark blockchain livenet" livenet: { networkType: "livenet", syncMode: "light", @@ -57,5 +70,10 @@ module.exports = { account: { 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: { + //} }; diff --git a/templates/boilerplate/config/communication.js b/templates/boilerplate/config/communication.js index 035d95def..9a7ee8db2 100644 --- a/templates/boilerplate/config/communication.js +++ b/templates/boilerplate/config/communication.js @@ -1,13 +1,40 @@ module.exports = { + // default applies to all environments default: { enabled: true, provider: "whisper", // Communication provider. Currently, Embark only supports whisper available_providers: ["whisper"], // Array of available providers + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { connection: { host: "localhost", // Host of the blockchain node port: 8546, // Port of the blockchain node type: "ws" // Type of connection (ws or rpc) } } + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" + //custom_name: { + //} }; diff --git a/templates/boilerplate/config/contracts.js b/templates/boilerplate/config/contracts.js index 37f7e7c06..20c9ccf17 100644 --- a/templates/boilerplate/config/contracts.js +++ b/templates/boilerplate/config/contracts.js @@ -37,5 +37,30 @@ module.exports = { // args: [ 100 ] //} } - } + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { + }, + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" or "embark blockchain custom_name" + //custom_name: { + //} }; diff --git a/templates/boilerplate/config/namesystem.js b/templates/boilerplate/config/namesystem.js index 10e20d6b3..09a6e3f78 100644 --- a/templates/boilerplate/config/namesystem.js +++ b/templates/boilerplate/config/namesystem.js @@ -1,6 +1,38 @@ module.exports = { + // default applies to all environments default: { available_providers: ["ens"], provider: "ens" + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { + register: { + rootDomain: "embark.eth", + subdomains: { + 'status': '0x1a2f3b98e434c02363f3dac3174af93c1d690914' + } + } } + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" or "embark blockchain custom_name" + //custom_name: { + //} }; diff --git a/templates/boilerplate/config/storage.js b/templates/boilerplate/config/storage.js index da9dab0a5..de123e3d3 100644 --- a/templates/boilerplate/config/storage.js +++ b/templates/boilerplate/config/storage.js @@ -1,4 +1,5 @@ module.exports = { + // default applies to all environments default: { enabled: true, ipfs_bin: "ipfs", @@ -23,6 +24,9 @@ module.exports = { }, swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/ }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` development: { enabled: true, provider: "ipfs", @@ -31,5 +35,25 @@ module.exports = { port: 5001, getUrl: "http://localhost:8080/ipfs/" } - } + }, + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" + //custom_name: { + //} }; diff --git a/templates/demo/config/blockchain.js b/templates/demo/config/blockchain.js index 88e934061..1994040a1 100644 --- a/templates/demo/config/blockchain.js +++ b/templates/demo/config/blockchain.js @@ -12,6 +12,9 @@ module.exports = { wsHost: "localhost", // WS-RPC server listening interface (default: "localhost") wsPort: 8546 // WS-RPC server listening port (default: 8546) }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` and `embark blockchain` development: { networkType: "custom", // Can be: testnet, rinkeby, livenet or custom, in which case, it will use the specified networkId networkId: "1337", // Network id used when networkType is custom @@ -25,6 +28,9 @@ module.exports = { simulatorMnemonic: "example exile argue silk regular smile grass bomb merge arm assist farm", // Mnemonic used by the simulator to generate a wallet simulatorBlocktime: 0 // Specify blockTime in seconds for automatic mining. Default is 0 and no auto-mining. }, + + // merges with the settings in default + // used with "embark run privatenet" and/or "embark blockchain privatenet" privatenet: { networkType: "custom", networkId: "1337", @@ -45,6 +51,9 @@ module.exports = { simulatorMnemonic: "example exile argue silk regular smile grass bomb merge arm assist farm", simulatorBlocktime: 0 }, + + // merges with the settings in default + // used with "embark run testnet" and/or "embark blockchain testnet" testnet: { networkType: "testnet", syncMode: "light", @@ -52,6 +61,9 @@ module.exports = { password: "config/testnet/password" } }, + + // merges with the settings in default + // used with "embark run livenet" and/or "embark blockchain livenet" livenet: { networkType: "livenet", syncMode: "light", @@ -60,5 +72,10 @@ module.exports = { account: { 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: { + //} }; diff --git a/templates/demo/config/communication.js b/templates/demo/config/communication.js index 8c4d1f918..b776b339e 100644 --- a/templates/demo/config/communication.js +++ b/templates/demo/config/communication.js @@ -1,12 +1,39 @@ module.exports = { + // default applies to all environments default: { enabled: true, provider: "whisper", // Communication provider. Currently, Embark only supports whisper available_providers: ["whisper"], // Array of available providers + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { connection: { host: "localhost", // Host of the blockchain node port: 8546, // Port of the blockchain node type: "ws" // Type of connection (ws or rpc) } } + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" + //custom_name: { + //} }; diff --git a/templates/demo/config/contracts.js b/templates/demo/config/contracts.js index bf2164b32..2ca24def4 100644 --- a/templates/demo/config/contracts.js +++ b/templates/demo/config/contracts.js @@ -37,5 +37,30 @@ module.exports = { args: [100] } } - } + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { + }, + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" or "embark blockchain custom_name" + //custom_name: { + //} }; diff --git a/templates/demo/config/namesystem.js b/templates/demo/config/namesystem.js index 722445eb5..df610cd0e 100644 --- a/templates/demo/config/namesystem.js +++ b/templates/demo/config/namesystem.js @@ -1,9 +1,12 @@ module.exports = { + // default applies to all environments default: { available_providers: ["ens", "ipns"], provider: "ens" }, + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` development: { register: { rootDomain: "embark.eth", @@ -12,4 +15,24 @@ module.exports = { } } } + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" or "embark blockchain custom_name" + //custom_name: { + //} }; diff --git a/templates/demo/config/storage.js b/templates/demo/config/storage.js index 59ef12bf5..1ed672154 100644 --- a/templates/demo/config/storage.js +++ b/templates/demo/config/storage.js @@ -1,4 +1,5 @@ module.exports = { + // default applies to all environments default: { enabled: true, ipfs_bin: "ipfs", @@ -23,6 +24,9 @@ module.exports = { }, swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/ }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` development: { enabled: true, provider: "ipfs", @@ -31,5 +35,25 @@ module.exports = { port: 5001, getUrl: "http://localhost:8080/ipfs/" } - } + }, + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" + //custom_name: { + //} }; diff --git a/templates/simple/contracts.js b/templates/simple/contracts.js index 37f7e7c06..20c9ccf17 100644 --- a/templates/simple/contracts.js +++ b/templates/simple/contracts.js @@ -37,5 +37,30 @@ module.exports = { // args: [ 100 ] //} } - } + }, + + // default environment, merges with the settings in default + // assumed to be the intended environment by `embark run` + development: { + }, + + // merges with the settings in default + // used with "embark run privatenet" + privatenet: { + }, + + // merges with the settings in default + // used with "embark run testnet" + testnet: { + }, + + // merges with the settings in default + // used with "embark run livenet" + livenet: { + }, + + // you can name an environment with specific settings and then specify with + // "embark run custom_name" or "embark blockchain custom_name" + //custom_name: { + //} };