2017-10-22 13:38:54 +00:00
|
|
|
pragma solidity ^0.4.17;
|
2017-07-16 16:10:17 +00:00
|
|
|
|
2017-07-16 17:31:40 +00:00
|
|
|
library ZAMyLib {
|
2017-07-16 16:10:17 +00:00
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function add(uint _a, uint _b) public pure returns (uint _c) {
|
2017-07-16 16:10:17 +00:00
|
|
|
return _a + _b;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
contract Test {
|
2017-12-20 14:41:52 +00:00
|
|
|
address public addr;
|
2017-07-16 16:10:17 +00:00
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function testAdd() public pure returns (uint _result) {
|
2017-07-16 17:31:40 +00:00
|
|
|
return ZAMyLib.add(1, 2);
|
2017-07-16 16:10:17 +00:00
|
|
|
}
|
|
|
|
|
2017-12-20 14:41:52 +00:00
|
|
|
function changeAddress(address _addr) public {
|
|
|
|
addr = _addr;
|
|
|
|
}
|
|
|
|
|
2018-10-05 09:19:10 +00:00
|
|
|
function changeAddress2(address _addr) public {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-07-16 16:10:17 +00:00
|
|
|
}
|