Deploy Wrapped Exchange Contract
Deploy the DexERC20Wrapper on your own blockchain
Let's deploy our wrapper for the exchange contract on your own blockchain.
Wrapper Deployment
While deploying the wrapped exchange contract, you will need to send two constructor arguments to the contract.
- The first argument is the wrapped native token (WAVAX) address on the destination chain (Fuji), which is:
0xd00ae08403B9bbb9124bB305C09058E32C39A48c
. - The second argument is the Trader Joe's (or any other Uniswap V2-like dapp) Factory V1 contract address on the destination chain (Fuji), which is:
0xF5c7d9733e5f53abCC1695820c4818C59B457C2C
. Deployed contracts of TraderJoe can be found here.
Save the Wrapper Address
Save the Deployed to
address in an environment variable.
In case you skipped the deployment phase mentioned on the previous page, you can use a wrapper contract, that is already deployed at 0x38B097d95B96CD17966Cf617A71b7B20F61ba85B
.
Initiate the Cross-Chain Swap
Now that the wrapped exchange contract has been deployed, send an ERC20 token to execute a swap for WAVAX or AVAX from your Avalanche L1 to Fuji using the cast send
command in foundry.
Verify the Results
TBD: Provide instructions