//转账方法 function transfer(address _to, uint256 _amount) public returns (bool success) { require( balanceMap[_to] + _amount >= balanceMap[_to], "check for overflows" ); require(balanceMap[msg.sender] >= _amount, "check money"); balanceMap[msg.sender] -= _amount; balanceMap[_to] += _amount; emit Transfer(msg.sender, _to, _amount); return true; }