DEV Community

sourav maji
sourav maji

Posted on

Transfer Data or Token to different chain Easily πŸ”₯

Send Tokens or data from one Blockchain Network to Another Easily

Let's understand how ?

Transfering data as well as tokens from one chain to another can be done using chainlink CCIP , but what is chainlink CCIP ?

Chainlink CCIP provides a single simple interface through which dApps and web3 entrepreneurs can securely meet all their cross-chain needs. You can use CCIP to transfer data, tokens, or both data and tokens across chains.

Now, let's understand how we can use chainlink CCIP ?

First , you need to go to the chainlink docs and copy the sender contract & paste in your remix ide

Then, you will be needed the router address of the blockchain network from which you want to send the data to another chain

For this example : I have choosen sepholia testnet

Then add the Link token address and click on transact

After you deploy the contract , pay some link token to the contract

Now, you need to go again to the chainlink docs and paste the receiver contract in the remix ide:

Add the blockchain network router address in which you want to receive the data or tokens

In this example : I have choosen polygon mumbai

Next click on transact

Final Steps:

Now we will send some data, click on the sendmessage function
Then add the chainselector which you can get from the chainlink ccip docs
Add the receiver contract address and the message you want to send
Click on transact, that's it
Now you need to wait for some couple of minutes for getting transaction success
Once you get the trasnaction success in the CCIP explorer
Go to the receiver contract, click on getlastmessagereceived function to read the message

Amazing, you have successfully transfered data from one blockchain network to another πŸŽ‰

** Rememeber when I was testing It took me lots of time to get the transaction success message in the CCIP explorer so need to wait for couple of minutes **

All the best πŸ‘

Top comments (0)