Table of Contents
- npm
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/real-token/reg-ccip-core.git
-
Install NPM packages
npm install
-
Setup a
.envfile, with the following configCoinMarketCap API Key here
Infura API Key here
Etherscan API Key here
Check .env.example
-
Check available command
npx hardhat --helpHardhat Getting Started here
This repo contains:
- REG contract (RealToken Ecosystem Governance token)
- CCIPSenderReceiver contract (to integrate with Chainlink CCIP for cross-chain transfer).
Roadmap:
- RealToken Ecosystem Governance ✅
- CCIP (cross-chain) ✅
- Testing ✅
- Static analysis (Slither) ✅
- Audit ✅
See the open issues for a full list of proposed features (and known issues).
Before running test:
- Go to hardhat.config.ts and change solidity version to 0.8.19 and optimizer run to 10000 times to be able to compile Chainlink contracts.
- We assigned the addresses of LINK and Wrapped native token as constants in the CCIPSenderReceiver contract for gas optimization. Therefore, before running test, we need to adapt the address of LINK and WrappedNativeToken in the contract to thoses addresses on Hardhat.
address private constant \_linkToken =
0x5FC8d32690cc91D4c39d9d3abcBD16989F875707; // LINK on Hardhat
address private constant \_wrappedNativeToken =
0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9; // WETH on Hardhat
npx hardhat coverage
or
forge coverage --report lcov
genhtml lcov.info -o coverage-html
npx hardhat test
Follow these steps for deployments:
- Setup addresses of LINK/WrappedNative in CCIPSenderReceiver contract
- Set up ADMIN/UPGRADER in .env
- Set up ROUTER in .env for each chain
- Deploy CCIPSenderReceiver on the first chain (for example, Sepolia)
- Deploy CCIPSenderReceiver on the second chain (for example, Mumbai)
- allowlistToken to whitelist tokens which can be transferred cross-chain
- allowlistDestinationChain to whitelist destination chains
Please refer to Chainlink CCIP docs to get information about chain selector.
The REG and CCIPSenderReceiver contracts are audited by ABDK. The report can be found here.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Support - @RealTPlatform - support@realt.co
Project Link: https://github.com/real-token/reg-ccip-core