pragma solidity ^0.4.20;
contract sum{
uint balance;
function update (uint amount) public returns (identity, uint){
balance+=amount;
return (msg.sender, balance);
}
function get() public view returns (uint) {
return balance;
}
}
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
return storedData;
}
}
网友评论