Gasless Flow

Transfer tokens from EOA to any receiver wallet address without gas fees.

The executeMigrationGaslessmethod in our SDK allows users to send tokens from an Externally Owned Account (EOA) to any designated receiver's wallet address without incurring gas fees.

Expected parameters

executeMigrationGasless accepts the following parameters:

Parameter
Type
Description

senderSigner

ethers.Signer

Signer object obtained from ethers

chainId

number

The chain id of the current network.

receiverAddress

string

The address of the recipient.

transferTokenDetails[OPTIONAL]

TransferTokenDetails[]

The object specifies tokens with respective amounts to transfer or, in the case of NFTs tokenIds need to be

mentioned

TransferTokenDetails {
    tokenAddress: string,
    amount?: string, // ERC20
    tokenIds?: string[] // ERC721
}

NOTE: If transferTokenDetailsis not passed, then all the assets will be transferred.

Function Call

Transfer all tokens

await aarcSDK.executeMigrationGasless({
    senderSigner: signer,
    chainId: number,
    receiverAddress:"0x786E6045eacb96cAe0259cd761e151b68B85bdA7"
  });

Transfer-specific tokens

await aarcSDK.executeMigrationGasless({
    senderSigner: signer,
    receiverAddress:"0x786E6045eacb96cAe0259cd761e151b68B85bdA7",
    chainId: 137,
    transferTokenDetails:[
    {
        tokenAddress:"0x2271e3Fef9e15046d09E1d78a8FF038c691E9Cf9",
        // .toString(16) is to convert TOKEN_AMOUNT to hex in string format
        amount:TOKEN_AMOUNT.toString(16)   
    },
    {
      tokenAddress:"0x932ca55b9ef0b3094e8fa82435b3b4c50d713043",
      tokenIds:["28507"] 
     },
    ],
  });

Response

[
  {
  tokenInfo: [
    {
      tokenAddress: string,
      amount: BigInt
    }
  ],
  type: string,
  taskId: string,
  txHash: string,
  status: string | boolean,
  }
]

Support

If you face any trouble, feel free to reach out to our engineers in the Telegram support group.

Last updated