Closed dumbled00r closed 6 months ago
Hello @dumbled00r, thanks for flagging this. Could you please share a link to the example you are referring to here?
Hello @Olanetsoft, here is the link to the code that I followed along: https://github.com/axelarnetwork/axelar-examples/blob/main/examples/evm/multichain-swap/MultichainSwap.sol Since Polygon Mumbai Testnet is currently deprecated, I have to deploy on other chains, and with SwapRouter02, not SwapRouter01 as the code was using!
approve
the token your attempting to swap on the src chain before calling the interchainSwap()
function?gasLimit
in your hardhat console? Thank you @benjamin852, the problem was with the gasLimit, but still, the swap isn't executing on ETH sepolia chain, and also, I cannot access my TX LINK on the scan: https://testnet.axelarscan.io/gmp/0xdd2224aeef8e5f5f2a41b5e035829403604bc2fefe01fad99d8839c8814a0cfb
It keeps loading...
Nice one step closer! It's not appearing on axelarscan because it's reverting on the src chain see here. Did you approve the token on the src chain to allow the contract to use the transferFrom
function on the src chain?
I have approved more than enough the amount of WETH 0x24fe7807089e321395172633aA9c4bBa4Ac4a357 on Base Sepolia for the contract to spend though.
I believe that your issue is that you're trying to send WETH from Base to Ethereum. If you look at the approved gateway assets on base you'll see WETH is not configured for Base. Based on the doc I linked before the approved assets you can interact with are aUSDC
wAXL
WMATIC
WAVAX
WFTM
WBNB
WDEV
. If you try run your logic with one of those tokens your tx should appear on axelarscan. Note for the swap to execute on the dest chain youll still need to make sure youre passing an asset that is compatible with Uniswap on the destination chain. For example WDEV should work to send your tx out of Base but the Uniswap router wont be able to handle it on Eth Sepolia.
Hi @benjamin852 , is there anyway that I can faucet the above tokens on the testnet chains and send to another chain?. Or I have to wrap them manually through this tutorial: https://docs.axelar.dev/resources/tokens/wrapped-tokens and then we can use them to send?
Hey, ya for Gateway tokens (all the above tokens I mentioned before) you would need to use those exact wrapped assets to interact with callContractWithToken()
. I think I will revisit this example and try get it up and running on a different blockchain since its reliance on mumbai sort of depracates the example
I have a problem with the multichain swap example on your github
I'm using SwapRouter02 along with src chain is Base Sepolia, and dest chain is ETH Sepolia (Since Mumbai is deprecated, I cannot run the same code for it)
Here is my contract's code:
Im trying to execute the swap on Sepolia (WETH -> UNI),
Here is the pool data according GeckoTerminal: Pool
I ran the above contract in hardhat console on Base Sepolia chain with this code, but this always gets reverted before executing on chain (Note that on both chains, I have more than enough ETH and WETH to cover the transaction
Please help me out. thank you so much!