🪙Transfer ERC20

Use this method to transfer an ERC721 token.

ERC20 transfer works for any ERC20, and they need to be in your developer wallet

Usage in your script

TransferErc20
  .Initialize(destroyAtEnd: true)
  .SetParameters(
    contract_addr: "0x...",
    chainId: "97",
    amount: "10",
    to_addr: "0x..."
  )
  .OnError(error => Debug.Log(error))
  .OnComplete(result => Debug.Log(result))
  .Run();

Member Functions

.Initialize()

ParameterTypeRequiredDescription

destroyAtEnd

bool

Optional

defines if this component will be destroyed after .Run()

.SetParameters()

ParameterTypeRequiredDescription

contract_addr

String

Yes

the token contract address

chainId

String

Yes

The chain id

amount

String

Yes

the amount of tokens to transfer

to_addr

String

Yes

address of receiver

.onError()

Action on Error: returns error information.

.onComplete()

Action on successful: returns Transfer_model type.

.Run()

Runs the API call and fills the corresponding model in the component on success.

Last updated