IThirdwebWallet.Transfer

This method transfers a specified amount of Wei (smallest denomination of Ether) or ERC20s to a specified wallet address on a given chain.

Usage

// Transfer Wei
var receipt = await wallet.Transfer(chainId, toAddress, weiAmount);
// Transfer ERC20
var receipt = await wallet.Transfer(chainId, toAddress, weiAmount, erc20ContractAddress);

Exceptions

  • ArgumentNullException: Thrown when the wallet is null.
  • ArgumentOutOfRangeException: Thrown when the chainId is less than or equal to 0.
  • ArgumentException: Thrown when the recipient toAddress is null or empty.
  • ArgumentOutOfRangeException: Thrown when the weiAmount is less than 0.