diff --git a/templates/boilerplate/config/contracts.js b/templates/boilerplate/config/contracts.js new file mode 100644 index 000000000..f768afdc6 --- /dev/null +++ b/templates/boilerplate/config/contracts.js @@ -0,0 +1,23 @@ +module.exports = { + // default applies to all enviroments + default: { + // rpc to deploy the contracts + deployment: { + host: "localhost", + port: 8545, + type: "rpc" + }, + // order of connections the dapp should connect to + dappConnection: [ + "$WEB3", // uses pre existing web3 object if available (e.g in Mist) + "http://localhost:8545" + ], + gas: "auto", + contracts: { + // example: + //SimpleStorage: { + // args: [ 100 ] + //} + } + } +} diff --git a/templates/boilerplate/config/contracts.json b/templates/boilerplate/config/contracts.json deleted file mode 100644 index 8ea794ea4..000000000 --- a/templates/boilerplate/config/contracts.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default": { - "deployment": { - "host": "localhost", - "port": 8545, - "type": "rpc" - }, - "dappConnection": [ - "$WEB3", - "http://localhost:8545" - ], - "gas": "auto", - "contracts": { - } - } -} diff --git a/templates/demo/config/contracts.js b/templates/demo/config/contracts.js new file mode 100644 index 000000000..1d8c5b237 --- /dev/null +++ b/templates/demo/config/contracts.js @@ -0,0 +1,23 @@ +module.exports = { + // default applies to all enviroments + default: { + // rpc to deploy the contracts + deployment: { + host: "localhost", + port: 8545, + type: "rpc" + }, + // order of connections the dapp should connect to + dappConnection: [ + "$WEB3", // uses pre existing web3 object if available (e.g in Mist) + "http://localhost:8545" + ], + gas: "auto", + contracts: { + SimpleStorage: { + fromIndex: 0, + args: [ 100 ] + } + } + } +} diff --git a/templates/demo/config/contracts.json b/templates/demo/config/contracts.json deleted file mode 100644 index da7463900..000000000 --- a/templates/demo/config/contracts.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "default": { - "deployment": { - "host": "localhost", - "port": 8545, - "type": "rpc" - }, - "dappConnection": [ - "$WEB3", - "http://localhost:8545" - ], - "gas": "auto", - "contracts": { - "SimpleStorage": { - "fromIndex": 0, - "args": [ - 100 - ] - } - } - } -} diff --git a/templates/simple/contracts.js b/templates/simple/contracts.js new file mode 100644 index 000000000..f768afdc6 --- /dev/null +++ b/templates/simple/contracts.js @@ -0,0 +1,23 @@ +module.exports = { + // default applies to all enviroments + default: { + // rpc to deploy the contracts + deployment: { + host: "localhost", + port: 8545, + type: "rpc" + }, + // order of connections the dapp should connect to + dappConnection: [ + "$WEB3", // uses pre existing web3 object if available (e.g in Mist) + "http://localhost:8545" + ], + gas: "auto", + contracts: { + // example: + //SimpleStorage: { + // args: [ 100 ] + //} + } + } +} diff --git a/templates/simple/contracts.json b/templates/simple/contracts.json deleted file mode 100644 index 8ea794ea4..000000000 --- a/templates/simple/contracts.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default": { - "deployment": { - "host": "localhost", - "port": 8545, - "type": "rpc" - }, - "dappConnection": [ - "$WEB3", - "http://localhost:8545" - ], - "gas": "auto", - "contracts": { - } - } -} diff --git a/templates/simple/embark.json b/templates/simple/embark.json index 35edb5397..812324905 100644 --- a/templates/simple/embark.json +++ b/templates/simple/embark.json @@ -3,7 +3,7 @@ "app": {}, "buildDir": "build/", "config": { - "contracts": "contracts.json", + "contracts": "contracts.js", "blockchain": false, "storage": false, "communication": false,