add onDeploy to test_app for testing purposes
This commit is contained in:
parent
d2ccfa3145
commit
7e4429b342
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,11 @@
|
|||
"deploy": false,
|
||||
"args": [1000]
|
||||
},
|
||||
"Test": {
|
||||
"onDeploy": [
|
||||
"Test.changeAddress(web3.eth.accounts[0])"
|
||||
]
|
||||
},
|
||||
"MyToken": {
|
||||
"instanceOf": "Token"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue