Skip to content

Commit

Permalink
Update SimpleERC20.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
nd-certora authored Feb 3, 2024
1 parent d1e6194 commit 6932356
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions certora/helpers/SimpleERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ contract SimpleERC20 {
uint256 private _totalSupply;
mapping(address => uint256) private _balance;
mapping(address => mapping(address => uint256)) private _allowance;

function totalSupply() public view returns (uint256) {
return _totalSupply;
}

function balanceOf(address account) public view returns (uint256) {
return _balance[account];
}
function allowance(address owner, address spender)
public view returns (uint256) {

function allowance(address owner, address spender) public view returns (uint256) {
return _allowance[owner][spender];
}

Expand All @@ -32,8 +34,7 @@ contract SimpleERC20 {
return true;
}

function transferFrom(address from,address recipient,uint256 amount)
external returns (bool) {
function transferFrom(address from,address recipient,uint256 amount) external returns (bool) {
if (_allowance[from][msg.sender] != type(uint256).max) {
_allowance[from][msg.sender] -= amount;}
_balance[from] -= amount;
Expand Down

0 comments on commit 6932356

Please sign in to comment.