Effortlessly transfer ERC-20 tokens from one chain to another. Made using Router Cross-Talk.
This project is built with Router CrossTalk
Router Protocol is a solution introduced to address the issues hindering the usability of cross-chain liquidity migration in the DeFi ecosystem. It acts as a bridge connecting various layer 1 and layer 2 blockchains, allowing for the flow of contract-level data across them. The Router Protocol can either transfer tokens between chains or initiate operations on one chain and execute them on another.
Please check the official documentation of Router Protocol
If this repository helps you build cross-chain dapps faster and easier - please star this project, every star makes us very happy!
If you need help or have other some questions - don't hesitate to write in our discord channel and we will check asap. Discord link. The best thing about this is the super active community ready to help at any time! We help each other.
Step 1) Open Remix IDE https://remix.ethereum.org/
Step 2) Create a new workspace
Step 3) Create a new file, give a name and save it with ".sol" extension
Step 4) Copy the code from coin.sol and paste it in the editing area
Step 5) Install Metamask extension from https://metamask.io/download/ and to your browser
Step 6) Open the extension and click on Create Wallet
Step 7) Set a password for your wallet
Step 8) Select either of the 2 options. Securing your wallet is recommended.But for the time being, we can go with the 1st option.
Step 9) Connect to Mumbai Network :-
- Go to https://mumbai.polygonscan.com/
- Scroll down to the bottom end and click on Add Mumbai Network
Step 10) connect to Binance Network :-
1. Go to https://www.ankr.com/rpc/bsc/
2. Select Testnet
3. Click on add to Network
Or
Step 10) Connect to Fuji Network :-
1. Go to https://testnet.snowtrace.io/
2. Scroll down to the bottom end and click on Add C-Chain ( Fuji ) Network
Step 11) Come to Remix again and compile the code ( ctrl + s )
Step 12) Select Inject Provider from Environments in Deployments section
Step 13) Switch to Binance Chain and copy your wallet address
Or
Step 13) Switch to Fuji Network and copy your wallet address
Step 14) Add faucet to your account by visiting https://testnet.bnbchain.org/faucet-smart and pasting your wallet address and then click on REQUEST 2 AVAX
Or
Step 14) Add faucet to your account by visiting https://faucet.avax.network/ and pasting your wallet address and then click on REQUEST 2 AVAX
Step 15) Switch to Mumbai Network https://mumbai.polygonscan.com/ and copy your wallet address
Step 16) Add faucet to your account by visiting https://faucet.polygon.technology/ and pasting your wallet address and then click on Submit
Step 17) Come back to Remix and switch to Fuji/Binance Network
Step 18) Deploy the contract by passing Gateway address of Fuji/Binance ,DestGasLimit as 500000 and feePayer as router1z6ralzg5tsznq9s6xmutyeen7evylcj7harhmq
Step 19) Switch to Mumbai Network and deploy the contract by passing Gateway address of Mumbai and DestGasLimit as 500000
Gateway addresses for respective chains can be found here https://devnet-alpha.lcd.routerprotocol.com/router-protocol/router-chain/multichain/chain_config
Step 20) Switch to Fuji/Binance Network again and call setContractOnChain
Function of the Fuji contract passing in 0, 80001 and address of the Mumbai contract deployed respectively
Step 21) Switch to Mumbai Network and call setContractOnChain
Function of the Mumbai contract passing in 0, 43113 and address of the Fuji Contract Deployed
Step 22) Switch to Fuji/Binance Network and mint some ERC20 Tokens through mint function of the Fuji/Binance contract deployed
Step 23) Come back to Remix ,and Call TransferCrossChain function of the Fuji/Binance contract deployed , passing in 0, 80001 ,30000000000 ,recipient address and amount as parameters
Step 24) You can see the CrossTalk transactions here https://alpha-explorer-ui.routerprotocol.com/crosstalks
Step 25) When the status changes to Delivered, come back to Remix again and switch to Mumbai Network
Step 26) Call the function , totalSupply of the Mumbai contract deployed to see the ERC20 tokens transferred
Step 27) Earn your NFT Certificate . Fill the below form.