embark/dapps/tests/app/config/contracts.js

66 lines
1.8 KiB
JavaScript
Raw Normal View History

module.exports = {
default: {
dappConnection: [
"$EMBARK",
2018-02-08 00:39:11 +00:00
"ws://localhost:8546",
"$WEB3"
],
gas: "auto",
beforeDeploy: async () => {
console.log("==========================");
console.log("before deploying contracts");
console.log("==========================");
},
deploy: {
Ownable: {
deploy: false
2017-07-16 18:11:37 +00:00
},
SimpleStorage: {
fromIndex: 0,
2018-07-25 20:01:42 +00:00
args: [100],
onDeploy: ["SimpleStorage.methods.setRegistar('embark.eth').send({from: web3.eth.defaultAccount})"]
2018-04-18 19:36:54 +00:00
},
SimpleStorageTest: {
//file: "./some_folder/test_contract.sol",
args: [1000, 'embark.eth']
},
StandardToken: {
file: "https://github.com/status-im/contracts/blob/151-embark31/contracts/token/StandardToken.sol",
deploy: false
},
AnotherStorage: {
args: ["$SimpleStorage"]
//args: ["0x0000000000000000000000000000000000000000"]
},
BFC: {
args: [100]
2017-02-10 00:38:02 +00:00
}
2017-12-21 16:21:36 +00:00
},
afterDeploy: async (dependencies) => {
console.log("==========================");
console.log("after deploying contracts");
console.log("==========================");
// console.dir(dependencies);
// console.dir(dependencies.contracts.SimpleStorage.methods);
// try {
// let value = await dependencies.contracts.SimpleStorage.methods.get().call();
// console.dir(value)
// } catch(err) {
// console.dir(err);
// }
}
//afterDeploy: [
//"Test.methods.changeAddress('$MyToken')",
//"web3.eth.getAccounts((err, accounts) => Test.methods.changeAddress(accounts[0]))"
//]
},
development: {
deploy: {
// MyToken2: {
// instanceOf: "Token",
// args: [2000]
// }
}
2017-02-10 00:38:02 +00:00
}
};