Module EthERC20

Source
Expand description

Generated by the following Solidity interface…

interface EthERC20 {
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
    error ERC20InvalidApprover(address approver);
    error ERC20InvalidReceiver(address receiver);
    error ERC20InvalidSender(address sender);
    error ERC20InvalidSpender(address spender);

    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    constructor();

    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 value) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
    function burn(address form, uint256 amount) external;
    function decimals() external view returns (uint8);
    function mint(address to, uint256 amount) external;
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function testSkip() external;
    function totalSupply() external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "allowance",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "approve",
    "inputs": [
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "balanceOf",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "burn",
    "inputs": [
      {
        "name": "form",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "decimals",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "mint",
    "inputs": [
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "name",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "symbol",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "testSkip",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "totalSupply",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "transfer",
    "inputs": [
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "transferFrom",
    "inputs": [
      {
        "name": "from",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "Approval",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "spender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Transfer",
    "inputs": [
      {
        "name": "from",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "to",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "ERC20InsufficientAllowance",
    "inputs": [
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "allowance",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "needed",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC20InsufficientBalance",
    "inputs": [
      {
        "name": "sender",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "balance",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "needed",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC20InvalidApprover",
    "inputs": [
      {
        "name": "approver",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC20InvalidReceiver",
    "inputs": [
      {
        "name": "receiver",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC20InvalidSender",
    "inputs": [
      {
        "name": "sender",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC20InvalidSpender",
    "inputs": [
      {
        "name": "spender",
        "type": "address",
        "internalType": "address"
      }
    ]
  }
]

Structs§

Approval
Event with signature Approval(address,address,uint256) and selector 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
ERC20InsufficientAllowance
Custom error with signature ERC20InsufficientAllowance(address,uint256,uint256) and selector 0xfb8f41b2.
ERC20InsufficientBalance
Custom error with signature ERC20InsufficientBalance(address,uint256,uint256) and selector 0xe450d38c.
ERC20InvalidApprover
Custom error with signature ERC20InvalidApprover(address) and selector 0xe602df05.
ERC20InvalidReceiver
Custom error with signature ERC20InvalidReceiver(address) and selector 0xec442f05.
ERC20InvalidSender
Custom error with signature ERC20InvalidSender(address) and selector 0x96c6fd1e.
ERC20InvalidSpender
Custom error with signature ERC20InvalidSpender(address) and selector 0x94280d62.
EthERC20Instance
A EthERC20 instance.
Transfer
Event with signature Transfer(address,address,uint256) and selector 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
allowanceCall
Function with signature allowance(address,address) and selector 0xdd62ed3e.
allowanceReturn
Container type for the return parameters of the allowance(address,address) function.
approveCall
Function with signature approve(address,uint256) and selector 0x095ea7b3.
approveReturn
Container type for the return parameters of the approve(address,uint256) function.
balanceOfCall
Function with signature balanceOf(address) and selector 0x70a08231.
balanceOfReturn
Container type for the return parameters of the balanceOf(address) function.
burnCall
Function with signature burn(address,uint256) and selector 0x9dc29fac.
burnReturn
Container type for the return parameters of the burn(address,uint256) function.
constructorCall
Constructor`.
decimalsCall
Function with signature decimals() and selector 0x313ce567.
decimalsReturn
Container type for the return parameters of the decimals() function.
mintCall
Function with signature mint(address,uint256) and selector 0x40c10f19.
mintReturn
Container type for the return parameters of the mint(address,uint256) function.
nameCall
Function with signature name() and selector 0x06fdde03.
nameReturn
Container type for the return parameters of the name() function.
symbolCall
Function with signature symbol() and selector 0x95d89b41.
symbolReturn
Container type for the return parameters of the symbol() function.
testSkipCall
Function with signature testSkip() and selector 0x7cc17ba4.
testSkipReturn
Container type for the return parameters of the testSkip() function.
totalSupplyCall
Function with signature totalSupply() and selector 0x18160ddd.
totalSupplyReturn
Container type for the return parameters of the totalSupply() function.
transferCall
Function with signature transfer(address,uint256) and selector 0xa9059cbb.
transferFromCall
Function with signature transferFrom(address,address,uint256) and selector 0x23b872dd.
transferFromReturn
Container type for the return parameters of the transferFrom(address,address,uint256) function.
transferReturn
Container type for the return parameters of the transfer(address,uint256) function.

Enums§

EthERC20Calls
Container for all the EthERC20 function calls.
EthERC20Errors
Container for all the EthERC20 custom errors.
EthERC20Events
Container for all the EthERC20 events.

Functions§

new
Creates a new wrapper around an on-chain EthERC20 contract instance.