The ERC20 contract native tokens (on-chain foundry).
event Approval(address tokenOwner, address spender, uint256 tokens)
Emitted when the allowance of a spender for an owner is set.
| Name | Type | Description |
|---|
| tokenOwner | address | The owner of the tokens. |
| spender | address | The address allowed to spend the tokens. |
| tokens | uint256 | The amount of tokens allowed to be spent. |
event Transfer(address from, address to, uint256 tokens)
Emitted when tokens are transferred from one address to another.
| Name | Type | Description |
|---|
| from | address | The address tokens are transferred from. |
| to | address | The address tokens are transferred to. |
| tokens | uint256 | The amount of tokens transferred. |
function foundrySerialNumber() internal view returns (uint32)
Returns the foundry serial number of the native token.
| Name | Type | Description |
|---|
| [0] | uint32 | The foundry serial number. |
function nativeTokenID() public view virtual returns (struct NativeTokenID)
Returns the native token ID of the native token.
| Name | Type | Description |
|---|
| [0] | struct NativeTokenID | The native token ID. |
function name() public view returns (string)
Returns the name of the native token.
| Name | Type | Description |
|---|
| [0] | string | The name of the token. |
function symbol() public view returns (string)
Returns the ticker symbol of the native token.
| Name | Type | Description |
|---|
| [0] | string | The ticker symbol of the token. |
function decimals() public view returns (uint8)
Returns the number of decimals used for the native token.
| Name | Type | Description |
|---|
| [0] | uint8 | The number of decimals. |
function totalSupply() public view virtual returns (uint256)
Returns the total supply of the native token.
| Name | Type | Description |
|---|
| [0] | uint256 | The total supply of the token. |
function balanceOf(address tokenOwner) public view returns (uint256)
Returns the balance of a token owner.
| Name | Type | Description |
|---|
| tokenOwner | address | The address of the token owner. |
| Name | Type | Description |
|---|
| [0] | uint256 | The balance of the token owner. |
function transfer(address receiver, uint256 numTokens) public returns (bool)
Transfers tokens from the sender's address to the receiver's address.
| Name | Type | Description |
|---|
| receiver | address | The address to transfer tokens to. |
| numTokens | uint256 | The amount of tokens to transfer. |
| Name | Type | Description |
|---|
| [0] | bool | true. |
function approve(address delegate, uint256 numTokens) public returns (bool)
Sets the allowance of a spender to spend tokens on behalf of the owner.
| Name | Type | Description |
|---|
| delegate | address | The address allowed to spend the tokens. |
| numTokens | uint256 | The amount of tokens allowed to be spent. |
| Name | Type | Description |
|---|
| [0] | bool | true. |
function allowance(address owner, address delegate) public view returns (uint256)
Returns the amount of tokens that the spender is allowed to spend on behalf of the owner.
| Name | Type | Description |
|---|
| owner | address | The address of the token owner. |
| delegate | address | The address of the spender. |
| Name | Type | Description |
|---|
| [0] | uint256 | The amount of tokens the spender is allowed to spend. |
function bytesEqual(bytes a, bytes b) internal pure returns (bool)
Compares two byte arrays for equality.
| Name | Type | Description |
|---|
| a | bytes | The first byte array. |
| b | bytes | The second byte array. |
| Name | Type | Description |
|---|
| [0] | bool | A boolean indicating whether the byte arrays are equal or not. |
function transferFrom(address owner, address buyer, uint256 numTokens) public returns (bool)
Transfers tokens from one address to another on behalf of a token owner.
| Name | Type | Description |
|---|
| owner | address | The address from which tokens are transferred. |
| buyer | address | The address to which tokens are transferred. |
| numTokens | uint256 | The amount of tokens to transfer. |
| Name | Type | Description |
|---|
| [0] | bool | A boolean indicating whether the transfer was successful or not. |