Closed utkarshdagoat closed 6 months ago
import { AxelarAssetTransfer, CHAINS, Environment, SendTokenParams } from "@axelar-network/axelarjs-sdk"; import { ethers, Wallet } from "ethers"; const api = new AxelarAssetTransfer({ environment: Environment.TESTNET }); const getSigner = () => { const privateKey = PRIVATE_KEY; return new Wallet(privateKey); }; async function test() { const provider = new ethers.providers.JsonRpcProvider( "https://api.avax-test.network/ext/bc/C/rpc" ); const signer = getSigner().connect(provider); const requestOptions: SendTokenParams = { fromChain: CHAINS.TESTNET.BASE_SEPOLIA, toChain: CHAINS.TESTNET.OSMOSIS, destinationAddress: "osmo1x3z2vepjd7fhe30epncxjrk0lehq7xdqe8ltsn", asset: { symbol: "aUSDC" }, amountInAtomicUnits: "5000000", options: { evmOptions: { signer, provider, txOptions: null as any, approveSendForMe: true, }, }, }; return api.sendToken(requestOptions); }
Using this always give the following error Even if I put in the gasfees parameters I always get insufficent funds while my wallet is topped with both sepolia ETH (around 1) and aUSDC(around 5)
Using this always give the following error Even if I put in the gasfees parameters I always get insufficent funds while my wallet is topped with both sepolia ETH (around 1) and aUSDC(around 5)