github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-shanghai/basic-token.sol (about)

     1  // SPDX-License-Identifier: GPL-3.0
     2  
     3  pragma solidity ^0.8.14;
     4  
     5  contract BasicToken {
     6      mapping(address => uint256) balances;
     7  
     8      function transfer(address recipient, uint256 value) public {
     9          if (balances[msg.sender] >= value) {
    10              balances[msg.sender] -= value;
    11          }
    12          balances[recipient] += value;
    13      }
    14  
    15      function balanceOf(address account) public view returns (uint256) {
    16          return balances[account];
    17      }
    18  }