add onDeploy to test_app for testing purposes

This commit is contained in:
Iuri Matias 2017-12-20 09:41:52 -05:00
parent d2ccfa3145
commit 7e4429b342
2 changed files with 10 additions and 0 deletions

View File

@ -9,9 +9,14 @@ library ZAMyLib {
}
contract Test {
address public addr;
function testAdd() public pure returns (uint _result) {
return ZAMyLib.add(1, 2);
}
function changeAddress(address _addr) public {
addr = _addr;
}
}

View File

@ -34,6 +34,11 @@
"deploy": false,
"args": [1000]
},
"Test": {
"onDeploy": [
"Test.changeAddress(web3.eth.accounts[0])"
]
},
"MyToken": {
"instanceOf": "Token"
},