Skip to main content
. 2020 Feb 11;22(2):203. doi: 10.3390/e22020203
Algorithm 1 Smart contract example.
  • 1:

    pragma solidity ˆ0.4.0;

  • 2:

    contract SimpleStorage {

  • 3:

        uint storedData;

  • 4:

        function set(uint x) public {

  • 5:

           storedData = x;

  • 6:

        }

  • 7:

        function get() public view returns (uint) {

  • 8:

           return storedData;

  • 9:

        }

  • 10:

    }