embark/test_apps/test_app/app/contracts/test.sol

28 lines
432 B
Solidity
Raw Normal View History

2017-10-22 13:38:54 +00:00
pragma solidity ^0.4.17;
library ZAMyLib {
2017-10-21 19:01:09 +00:00
function add(uint _a, uint _b) public pure returns (uint _c) {
return _a + _b;
}
}
contract Test {
address public addr;
2018-10-05 09:19:10 +00:00
address public ens;
2017-10-21 19:01:09 +00:00
function testAdd() public pure returns (uint _result) {
return ZAMyLib.add(1, 2);
}
function changeAddress(address _addr) public {
addr = _addr;
}
2018-10-05 09:19:10 +00:00
function changeENS(address _ens) public {
ens = _ens;
}
}