Extends the generic Contract class to interface specifically with ERC20 tokens. It provides properties and methods to interact with the standard ERC20 functions.

Hierarchy (view full)

Constructors

Properties

_decimals?: number
_symbol?: string
address: `0x${string}`

Address of the smart contract.

read: {
    allowance: ((...parameters) => Promise<bigint>);
    balanceOf: ((...parameters) => Promise<bigint>);
    decimals: ((...parameters) => Promise<number>);
    name: ((...parameters) => Promise<string>);
    symbol: ((...parameters) => Promise<string>);
    totalSupply: ((...parameters) => Promise<bigint>);
}

Read-only methods of the smart contract.

Type declaration

  • allowance: ((...parameters) => Promise<bigint>)
      • (...parameters): Promise<bigint>
      • Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, `0x${string}`], options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<bigint>

  • balanceOf: ((...parameters) => Promise<bigint>)
      • (...parameters): Promise<bigint>
      • Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`], options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<bigint>

  • decimals: ((...parameters) => Promise<number>)
      • (...parameters): Promise<number>
      • Parameters

        • Rest ...parameters: [options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<number>

  • name: ((...parameters) => Promise<string>)
      • (...parameters): Promise<string>
      • Parameters

        • Rest ...parameters: [options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<string>

  • symbol: ((...parameters) => Promise<string>)
      • (...parameters): Promise<string>
      • Parameters

        • Rest ...parameters: [options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<string>

  • totalSupply: ((...parameters) => Promise<bigint>)
      • (...parameters): Promise<bigint>
      • Parameters

        • Rest ...parameters: [options?: {
              account?: `0x${string}` | Account;
              blockNumber?: bigint;
              blockTag?: BlockTag;
          }]

        Returns Promise<bigint>

simulate: {
    approve: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "approve", Chain, TChainOverride>>);
    transfer: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "transfer", Chain, TChainOverride>>);
    transferFrom: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "transferFrom", Chain, TChainOverride>>);
}

Simulated methods of the smart contract.

Type declaration

  • approve: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "approve", Chain, TChainOverride>>)
      • <TChainOverride, Options>(...parameters): Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "approve", Chain, TChainOverride>>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends Prettify<UnionOmit<SimulateContractParameters<readonly [{
              inputs: readonly [{
                  indexed: true;
                  name: "owner";
                  type: "address";
              }, {
                  indexed: true;
                  name: "spender";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Approval";
              type: "event";
          }, {
              inputs: readonly [{
                  indexed: true;
                  name: "from";
                  type: "address";
              }, {
                  indexed: true;
                  name: "to";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Transfer";
              type: "event";
          }, {
              inputs: readonly [{
                  name: "owner";
                  type: "address";
              }, {
                  name: "spender";
                  type: "address";
              }];
              name: "allowance";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "spender";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "approve";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "account";
                  type: "address";
              }];
              name: "balanceOf";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "decimals";
              outputs: readonly [{
                  name: "";
                  type: "uint8";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "name";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "symbol";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "totalSupply";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transfer";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "sender";
                  type: "address";
              }, {
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transferFrom";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }], "approve", Chain, TChainOverride>, "address" | "abi" | "args" | "functionName">>

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, bigint], options?: Options]

        Returns Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "approve", Chain, TChainOverride>>

  • transfer: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "transfer", Chain, TChainOverride>>)
      • <TChainOverride, Options>(...parameters): Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "transfer", Chain, TChainOverride>>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends Prettify<UnionOmit<SimulateContractParameters<readonly [{
              inputs: readonly [{
                  indexed: true;
                  name: "owner";
                  type: "address";
              }, {
                  indexed: true;
                  name: "spender";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Approval";
              type: "event";
          }, {
              inputs: readonly [{
                  indexed: true;
                  name: "from";
                  type: "address";
              }, {
                  indexed: true;
                  name: "to";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Transfer";
              type: "event";
          }, {
              inputs: readonly [{
                  name: "owner";
                  type: "address";
              }, {
                  name: "spender";
                  type: "address";
              }];
              name: "allowance";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "spender";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "approve";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "account";
                  type: "address";
              }];
              name: "balanceOf";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "decimals";
              outputs: readonly [{
                  name: "";
                  type: "uint8";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "name";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "symbol";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "totalSupply";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transfer";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "sender";
                  type: "address";
              }, {
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transferFrom";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }], "transfer", Chain, TChainOverride>, "address" | "abi" | "args" | "functionName">>

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, bigint], options?: Options]

        Returns Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "transfer", Chain, TChainOverride>>

  • transferFrom: (<TChainOverride, Options>(...parameters) => Promise<SimulateContractReturnType<readonly [{
        inputs: readonly [{
            indexed: true;
            name: "owner";
            type: "address";
        }, {
            indexed: true;
            name: "spender";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Approval";
        type: "event";
    }, {
        inputs: readonly [{
            indexed: true;
            name: "from";
            type: "address";
        }, {
            indexed: true;
            name: "to";
            type: "address";
        }, {
            indexed: false;
            name: "value";
            type: "uint256";
        }];
        name: "Transfer";
        type: "event";
    }, {
        inputs: readonly [{
            name: "owner";
            type: "address";
        }, {
            name: "spender";
            type: "address";
        }];
        name: "allowance";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "spender";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "approve";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "account";
            type: "address";
        }];
        name: "balanceOf";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "decimals";
        outputs: readonly [{
            name: "";
            type: "uint8";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "name";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "symbol";
        outputs: readonly [{
            name: "";
            type: "string";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [];
        name: "totalSupply";
        outputs: readonly [{
            name: "";
            type: "uint256";
        }];
        stateMutability: "view";
        type: "function";
    }, {
        inputs: readonly [{
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transfer";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }, {
        inputs: readonly [{
            name: "sender";
            type: "address";
        }, {
            name: "recipient";
            type: "address";
        }, {
            name: "amount";
            type: "uint256";
        }];
        name: "transferFrom";
        outputs: readonly [{
            name: "";
            type: "bool";
        }];
        stateMutability: "nonpayable";
        type: "function";
    }], "transferFrom", Chain, TChainOverride>>)
      • <TChainOverride, Options>(...parameters): Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "transferFrom", Chain, TChainOverride>>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends Prettify<UnionOmit<SimulateContractParameters<readonly [{
              inputs: readonly [{
                  indexed: true;
                  name: "owner";
                  type: "address";
              }, {
                  indexed: true;
                  name: "spender";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Approval";
              type: "event";
          }, {
              inputs: readonly [{
                  indexed: true;
                  name: "from";
                  type: "address";
              }, {
                  indexed: true;
                  name: "to";
                  type: "address";
              }, {
                  indexed: false;
                  name: "value";
                  type: "uint256";
              }];
              name: "Transfer";
              type: "event";
          }, {
              inputs: readonly [{
                  name: "owner";
                  type: "address";
              }, {
                  name: "spender";
                  type: "address";
              }];
              name: "allowance";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "spender";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "approve";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "account";
                  type: "address";
              }];
              name: "balanceOf";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "decimals";
              outputs: readonly [{
                  name: "";
                  type: "uint8";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "name";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "symbol";
              outputs: readonly [{
                  name: "";
                  type: "string";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [];
              name: "totalSupply";
              outputs: readonly [{
                  name: "";
                  type: "uint256";
              }];
              stateMutability: "view";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transfer";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }, {
              inputs: readonly [{
                  name: "sender";
                  type: "address";
              }, {
                  name: "recipient";
                  type: "address";
              }, {
                  name: "amount";
                  type: "uint256";
              }];
              name: "transferFrom";
              outputs: readonly [{
                  name: "";
                  type: "bool";
              }];
              stateMutability: "nonpayable";
              type: "function";
          }], "transferFrom", Chain, TChainOverride>, "address" | "abi" | "args" | "functionName">>

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, `0x${string}`, bigint], options?: Options]

        Returns Promise<SimulateContractReturnType<readonly [{
            inputs: readonly [{
                indexed: true;
                name: "owner";
                type: "address";
            }, {
                indexed: true;
                name: "spender";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Approval";
            type: "event";
        }, {
            inputs: readonly [{
                indexed: true;
                name: "from";
                type: "address";
            }, {
                indexed: true;
                name: "to";
                type: "address";
            }, {
                indexed: false;
                name: "value";
                type: "uint256";
            }];
            name: "Transfer";
            type: "event";
        }, {
            inputs: readonly [{
                name: "owner";
                type: "address";
            }, {
                name: "spender";
                type: "address";
            }];
            name: "allowance";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "spender";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "approve";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "account";
                type: "address";
            }];
            name: "balanceOf";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "decimals";
            outputs: readonly [{
                name: "";
                type: "uint8";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "name";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "symbol";
            outputs: readonly [{
                name: "";
                type: "string";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [];
            name: "totalSupply";
            outputs: readonly [{
                name: "";
                type: "uint256";
            }];
            stateMutability: "view";
            type: "function";
        }, {
            inputs: readonly [{
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transfer";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }, {
            inputs: readonly [{
                name: "sender";
                type: "address";
            }, {
                name: "recipient";
                type: "address";
            }, {
                name: "amount";
                type: "uint256";
            }];
            name: "transferFrom";
            outputs: readonly [{
                name: "";
                type: "bool";
            }];
            stateMutability: "nonpayable";
            type: "function";
        }], "transferFrom", Chain, TChainOverride>>

write?: {
    approve: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>);
    transfer: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>);
    transferFrom: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>);
}

State-changing methods of the smart contract. Present only if walletClient is provided.

Type declaration

  • approve: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>)
      • <TChainOverride, Options>(...parameters): Promise<`0x${string}`>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends {
              [K in string | number | symbol]: UnionOmit<WriteContractParameters<readonly [{
                  inputs: readonly [{
                      indexed: true;
                      name: "owner";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "spender";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Approval";
                  type: "event";
              }, {
                  inputs: readonly [{
                      indexed: true;
                      name: "from";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "to";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Transfer";
                  type: "event";
              }, {
                  inputs: readonly [{
                      name: "owner";
                      type: "address";
                  }, {
                      name: "spender";
                      type: "address";
                  }];
                  name: "allowance";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "spender";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "approve";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "account";
                      type: "address";
                  }];
                  name: "balanceOf";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "decimals";
                  outputs: readonly [{
                      name: "";
                      type: "uint8";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "name";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "symbol";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "totalSupply";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transfer";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "sender";
                      type: "address";
                  }, {
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transferFrom";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }], "approve", Chain, Account, TChainOverride>, "address" | "abi" | "args" | "functionName">[K]
          }

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, bigint], options?: Options]

        Returns Promise<`0x${string}`>

  • transfer: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>)
      • <TChainOverride, Options>(...parameters): Promise<`0x${string}`>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends {
              [K in string | number | symbol]: UnionOmit<WriteContractParameters<readonly [{
                  inputs: readonly [{
                      indexed: true;
                      name: "owner";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "spender";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Approval";
                  type: "event";
              }, {
                  inputs: readonly [{
                      indexed: true;
                      name: "from";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "to";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Transfer";
                  type: "event";
              }, {
                  inputs: readonly [{
                      name: "owner";
                      type: "address";
                  }, {
                      name: "spender";
                      type: "address";
                  }];
                  name: "allowance";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "spender";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "approve";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "account";
                      type: "address";
                  }];
                  name: "balanceOf";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "decimals";
                  outputs: readonly [{
                      name: "";
                      type: "uint8";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "name";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "symbol";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "totalSupply";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transfer";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "sender";
                      type: "address";
                  }, {
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transferFrom";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }], "transfer", Chain, Account, TChainOverride>, "address" | "abi" | "args" | "functionName">[K]
          }

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, bigint], options?: Options]

        Returns Promise<`0x${string}`>

  • transferFrom: (<TChainOverride, Options>(...parameters) => Promise<`0x${string}`>)
      • <TChainOverride, Options>(...parameters): Promise<`0x${string}`>
      • Type Parameters

        • TChainOverride extends undefined | Chain

        • Options extends {
              [K in string | number | symbol]: UnionOmit<WriteContractParameters<readonly [{
                  inputs: readonly [{
                      indexed: true;
                      name: "owner";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "spender";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Approval";
                  type: "event";
              }, {
                  inputs: readonly [{
                      indexed: true;
                      name: "from";
                      type: "address";
                  }, {
                      indexed: true;
                      name: "to";
                      type: "address";
                  }, {
                      indexed: false;
                      name: "value";
                      type: "uint256";
                  }];
                  name: "Transfer";
                  type: "event";
              }, {
                  inputs: readonly [{
                      name: "owner";
                      type: "address";
                  }, {
                      name: "spender";
                      type: "address";
                  }];
                  name: "allowance";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "spender";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "approve";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "account";
                      type: "address";
                  }];
                  name: "balanceOf";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "decimals";
                  outputs: readonly [{
                      name: "";
                      type: "uint8";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "name";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "symbol";
                  outputs: readonly [{
                      name: "";
                      type: "string";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [];
                  name: "totalSupply";
                  outputs: readonly [{
                      name: "";
                      type: "uint256";
                  }];
                  stateMutability: "view";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transfer";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }, {
                  inputs: readonly [{
                      name: "sender";
                      type: "address";
                  }, {
                      name: "recipient";
                      type: "address";
                  }, {
                      name: "amount";
                      type: "uint256";
                  }];
                  name: "transferFrom";
                  outputs: readonly [{
                      name: "";
                      type: "bool";
                  }];
                  stateMutability: "nonpayable";
                  type: "function";
              }], "transferFrom", Chain, Account, TChainOverride>, "address" | "abi" | "args" | "functionName">[K]
          }

        Parameters

        • Rest ...parameters: [args: readonly [`0x${string}`, `0x${string}`, bigint], options?: Options]

        Returns Promise<`0x${string}`>

Accessors

  • get decimals(): number
  • Gets the token decimals if they have been set; otherwise, throws an error.

    Returns number

    • The decimals of the ERC20 token.
  • get symbol(): string
  • Gets the token symbol if it has been set; otherwise, throws an error.

    Returns string

    • The symbol of the ERC20 token.

Methods

  • Fetches the token decimals from the smart contract if not already cached.

    Returns Promise<number>

    • A promise that resolves to the decimals of the ERC20 token.
  • Fetches the token symbol from the smart contract if not already cached.

    Returns Promise<string>

    • A promise that resolves to the symbol of the ERC20 token.

Generated using TypeDoc