Skip to main content
Helpful?

NativeERC20

Git Source | Generated with forge doc

Inherits: Test

This token contract simulates the ERC20 representation of a native token where on transfer and transferFrom the native balances are modified using a precompile

State Variables

name

string public name = "NativeERC20";

symbol

string public symbol = "NERC20";

decimals

uint8 public decimals = 18;

allowance

mapping(address => mapping(address => uint256)) public allowance;

Functions

totalSupply

function totalSupply() public view returns (uint256);

approve

function approve(address guy, uint256 wad) public returns (bool);

transfer

function transfer(address dst, uint256 wad) public returns (bool);

transferFrom

function transferFrom(address src, address dst, uint256 wad) public returns (bool);

balanceOf

function balanceOf(address account) external view returns (uint256);

Events

Approval

event Approval(address indexed src, address indexed guy, uint256 wad);

Transfer

event Transfer(address indexed src, address indexed dst, uint256 wad);
Helpful?