Skip to content

real-token/reg-ccip-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn Prettier


Logo

RealToken Ecosystem Governance

REG - CCIP
Realt.co

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Built With Hardhat

Getting Started

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo

    git clone https://github.com/real-token/reg-ccip-core.git
  2. Install NPM packages

    npm install
  3. Setup a .env file, with the following config

    CoinMarketCap API Key here

    Infura API Key here

    Etherscan API Key here

    Check .env.example

  4. Check available command

    npx hardhat --help
    

    Hardhat Getting Started here

(back to top)

Roadmap

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).

(back to top)

Usage

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

(back to top)

Coverage

npx hardhat coverage

or

forge coverage --report lcov

genhtml lcov.info -o coverage-html

(back to top)

Gas fees

npx hardhat test

Deployments

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.

(back to top)

Audit

The REG and CCIPSenderReceiver contracts are audited by ABDK. The report can be found here.

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Support - @RealTPlatform - support@realt.co

Project Link: https://github.com/real-token/reg-ccip-core

(back to top)

Built With Hardhat

(back to top)

About

REG and CCIP core contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •