https://github.com/gat786/ccip
A project demonstrating CCIP and how it can be used to share messages across different chains
https://github.com/gat786/ccip
blockchain chainlink ethersjs hardhat web3
Last synced: about 1 month ago
JSON representation
A project demonstrating CCIP and how it can be used to share messages across different chains
- Host: GitHub
- URL: https://github.com/gat786/ccip
- Owner: gat786
- Created: 2023-08-26T17:27:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T16:57:17.000Z (almost 3 years ago)
- Last Synced: 2025-10-11T18:39:55.892Z (10 months ago)
- Topics: blockchain, chainlink, ethersjs, hardhat, web3
- Language: Solidity
- Homepage:
- Size: 95.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chainlink CCIP Demo Repository
This repository is for storing code that demonstrates how Chainlinks CCIP
works and how you can use it to transfer messages across blockchains.
I have written a blog post that explains the entire project in detail
[here](https://gat786.hashnode.dev/introduction-to-chainlink-ccip-and-a-quick-demo)
And I have created a video that will demonstrate how it works [here]()
## Supported Networks by CCIP
https://docs.chain.link/ccip/supported-networks
## How to run the demo
### Prerequisites
1. Create the .env file with approriate values. You can use the .env_example file as a template.
```
# SENDER AND RECEIVER URLS are RPC Endpoints for
# sender and receiver chains
SENDER_URL=
RECEIVER_URL=
# Private key is the private key of account which you own
# and you wish to use to deploy the contracts and interact with them
# you need to have native tokens and LINK tokens on both chains
# at this address
PRIVATE_KEY=
# Sender Router Contract is Chainlinks Router Contract Address on
# Sender chain
SENDER_ROUTER_CONTRACT=
# Sender Link Contract is LINK Contract Address on
# Sender chain
SENDER_LINK_CONTRACT=
# Receiver Router Contract is Chainlinks Router Contract Address on
# Receiver chain
RECEIVER_ROUTER_CONTRACT=
# Each chain that is supported by Chainlinks CCIP has its own selector
# you need your destination chain address here
DESTINATION_CHAIN_SELECTOR=
# You can set these after deployment of Actual contracts
# you dont need to worry about it in beginning.
# Address of Sender contract you just deployed
SENDER_CONTRACT_ADDRESS=
# Address of Receiver contract you just deployed.
RECEIVER_CONTRACT_ADDRESS=
```
2. Install the dependencies
```bash
npm install
```
3. Deploy the sender smart contracts
```bash
npx hardhat run scripts/deploy-sender.ts --network sender
```
4. Deploy the receiver smart contracts
```bash
npx hardhat run scripts/deploy-receiver.ts --network receiver
```
5. Send a message from sender to receiver
```bash
npx hardhat run scripts/send-message.ts --network sender
```
6. Read the message sent from sender to receiver
```bash
npx hardhat run scripts/receive-message.ts --network receiver
```