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 {
|
contract Test {
|
||||||
|
address public addr;
|
||||||
|
|
||||||
function testAdd() public pure returns (uint _result) {
|
function testAdd() public pure returns (uint _result) {
|
||||||
return ZAMyLib.add(1, 2);
|
return ZAMyLib.add(1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeAddress(address _addr) public {
|
||||||
|
addr = _addr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,11 @@
|
||||||
"deploy": false,
|
"deploy": false,
|
||||||
"args": [1000]
|
"args": [1000]
|
||||||
},
|
},
|
||||||
|
"Test": {
|
||||||
|
"onDeploy": [
|
||||||
|
"Test.changeAddress(web3.eth.accounts[0])"
|
||||||
|
]
|
||||||
|
},
|
||||||
"MyToken": {
|
"MyToken": {
|
||||||
"instanceOf": "Token"
|
"instanceOf": "Token"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue