class Eth::Client

def transfer_erc20(erc20_contract, destination, amount, **kwargs)

Returns:
  • (Object) - returns the result of the transaction.

Parameters:
  • **tx_value (Integer) -- optional transaction value field filling.
  • **nonce (Integer) -- optional specific nonce for transaction.
  • **gas_limit (Integer) -- optional gas limit override for deploying the contract.
  • **legacy (Boolean) -- enables legacy transactions (pre-EIP-1559).
  • **sender_key (Eth::Key) -- the sender private key.
  • amount (Integer) -- the transfer amount (mind the `decimals()`).
  • destination (Eth::Address) -- the destination address.
  • erc20_contract (Eth::Contract) -- the ERC20 contract to write to.
  • amount (Integer) -- the transfer amount (mind the `decimals()`).
  • destination (Eth::Address) -- the destination address.
  • erc20_contract (Eth::Contract) -- the ERC20 contract to write to.

Overloads:
  • transfer_erc20(erc20_contract, destination, amount, **kwargs)
  • transfer_erc20(erc20_contract, destination, amount)
def transfer_erc20(erc20_contract, destination, amount, **kwargs)
  destination = destination.to_s if destination.instance_of? Eth::Address
  transact(erc20_contract, "transfer", destination, amount, **kwargs)
end