current position:Home>No problem in JS VM environment. This error will be reported in the test transfer after deployment to the local private chain

No problem in JS VM environment. This error will be reported in the test transfer after deployment to the local private chain

2022-02-04 00:10:39 Q & A of Denglian community

image.png// Transfer method 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;}






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202040010374783.html

Random recommended