1
0
mirror of https://github.com/dap-ps/discover.git synced 2025-03-04 02:40:38 +00:00

Merge pull request #20 from richard-ramos/feat/ws-and-mainnet

feat: contract config reorg to simplify mainnet deployment and ws use.
This commit is contained in:
Andy Tudhope 2019-07-30 16:10:11 +02:00 committed by GitHub
commit f949e63509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 87 additions and 37 deletions

View File

@ -1,7 +1,7 @@
module.exports = {
// default applies to all environments
default: {
enabled: true,
enabled: false,
provider: "whisper", // Communication provider. Currently, Embark only supports whisper
available_providers: ["whisper"], // Array of available providers
},

View File

@ -6,8 +6,8 @@ module.exports = {
// Blockchain node to deploy the contracts
deployment: {
host: 'localhost', // Host of the blockchain node
port: 8545, // Port of the blockchain node
type: 'rpc', // Type of connection (ws or rpc),
port: 8546, // Port of the blockchain node
type: 'ws', // Type of connection (ws or rpc),
// Accounts to use instead of the default account to populate your wallet
// The order here corresponds to the order of `web3.eth.getAccounts`, so the first one is the `defaultAccount`
/* ,accounts: [
@ -39,11 +39,11 @@ module.exports = {
],
},
// order of connections the dapp should connect to
// dappConnection: [
// '$WEB3', // uses pre existing web3 object if available (e.g in Mist)
// 'ws://localhost:8546',
// 'http://localhost:8545',
// ],
dappConnection: [
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
'ws://localhost:8546',
'http://localhost:8545',
],
// Automatically call `ethereum.enable` if true.
// If false, the following code must run before sending any transaction: `await EmbarkJS.enableEthereum();`
@ -58,7 +58,7 @@ module.exports = {
// when not specified
// - explicit will only attempt to deploy the contracts that are explicitly specified inside the
// contracts section.
// strategy: 'implicit',
strategy: 'explicit',
// contracts: {
// Discover: {
@ -69,39 +69,29 @@ module.exports = {
// },
contracts: {
BancorFormula: { deploy: false },
MiniMeTokenFactory: { deploy: false },
SafeMath: { deploy: false },
TestBancorFormula: { deploy: false },
MiniMeToken: {
address: '0x25B1bD06fBfC2CbDbFc174e10f1B78b1c91cc77B',
Discover: {
args: ['$MiniMeToken'],
},
Discover: { address: '0x17e7a7330d23fc6a2ab8578a627408f815396662' },
// MiniMeToken: {
// args: [
// '$MiniMeTokenFactory',
// '0x0000000000000000000000000000000000000000',
// 0,
// 'SNTMiniMeToken',
// 18,
// 'SNT',
// true,
// ],
// },
// Discover: {
// args: ['$MiniMeToken'],
// },
},
},
// default environment, merges with the settings in default
// assumed to be the intended environment by `embark run`
development: {
dappConnection: [
'ws://localhost:8546',
'http://localhost:8545',
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
],
contracts: {
MiniMeTokenFactory: {},
MiniMeToken: {
args: [
'$MiniMeTokenFactory',
'0x0000000000000000000000000000000000000000',
0,
'SNTMiniMeToken',
18,
'SNT',
true,
],
},
},
},
// merges with the settings in default
@ -127,11 +117,53 @@ module.exports = {
'https://ropsten.infura.io/v3/8675214b97b44e96b70d05326c61fd6a',
],
dappAutoEnable: false,
contracts: {
MiniMeTokenFactory: {
deploy: false,
},
MiniMeToken: {
address: '0x25B1bD06fBfC2CbDbFc174e10f1B78b1c91cc77B',
},
Discover: {
address: '0x17e7a7330d23fc6a2ab8578a627408f815396662',
},
},
tracking: 'shared.testnet.chains.json',
},
// merges with the settings in default
// used with "embark run livenet"
livenet: {},
livenet: {
deployment: {
accounts: [
{
// TODO: configure deployment account method.
},
],
host: `mainnet.infura.io/v3/8675214b97b44e96b70d05326c61fd6a`,
port: false,
type: 'rpc',
protocol: 'https',
},
dappConnection: [
'$WEB3',
'https://mainnet.infura.io/v3/8675214b97b44e96b70d05326c61fd6a',
],
dappAutoEnable: false,
// gasPrice: "10000000000", // 10gwei. TODO: Set a proper gas price for deployment. See ethgasstation.info
contracts: {
MiniMeTokenFactory: {
deploy: false,
},
MiniMeToken: {
address: '0x744d70fdbe2ba4cf95131626614a1763df805b9e', // Mainnet SNT address
},
Discover: {
args: ['$MiniMeToken'],
},
},
tracking: 'shared.mainnet.chains.json',
},
// you can name an environment with specific settings and then specify with
// "embark run custom_name" or "embark blockchain custom_name"

View File

@ -1,7 +1,7 @@
module.exports = {
// default applies to all environments
default: {
enabled: true,
enabled: false,
available_providers: ["ens"],
provider: "ens"
},

View File

@ -0,0 +1,18 @@
{
"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d": {
"contracts": {
"0x3043b04ad856d169c8f0b0509c0bc63192dc7edd92d6933c58708298a0e381be": {
"name": "ENSRegistry",
"address": "0x112234455c3a32fd11230c42e7bccd4a84e02010"
},
"0xe901d01d0cf8056c85c28f67149efafe606ac20707c3069b1c61a78c601779e1": {
"name": "MiniMeToken",
"address": "0x25B1bD06fBfC2CbDbFc174e10f1B78b1c91cc77B"
},
"0x7659b3c2dfc8fc31e36fbe3c82cafebbbd05e360a5d47c59a94c1ce120ba60e4": {
"name": "Discover",
"address": "0x17e7a7330d23fc6a2ab8578a627408f815396662"
}
}
}
}