Function buildWithdrawal

  • Builds an instruction for transferring tokens. This function creates the necessary instruction for a standard ERC20 transfer.

    Parameters

    Returns Promise<Instruction[]>

    Promise resolving to array of instructions

    Example

    const instructions = await buildWithdrawal(
    { account: myMultichainAccount },
    {
    chainId: 1,
    tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
    amount: 1000000n, // 1 USDC
    gasLimit: 65000n,
    recipient: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
    }
    );