美文网首页
sum+simple

sum+simple

作者: 链羽 | 来源:发表于2020-08-16 00:36 被阅读0次

    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;

    }

    }

    相关文章

      网友评论

          本文标题:sum+simple

          本文链接:https://www.haomeiwen.com/subject/nawzdktx.html