Builds an instruction for transferring tokens. This function creates the necessary instruction for a standard ERC20 transfer.
const instructions = await buildWithdrawal( { account: myMultichainAccount }, { chainId: 1, tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: 1000000n, // 1 USDC gasLimit: 65000n, recipient: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }); Copy
const instructions = await buildWithdrawal( { account: myMultichainAccount }, { chainId: 1, tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: 1000000n, // 1 USDC gasLimit: 65000n, recipient: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" });
Base configuration for the instruction
Optional
Parameters for the transfer
Promise resolving to array of instructions
Builds an instruction for transferring tokens. This function creates the necessary instruction for a standard ERC20 transfer.
Example