Coder Social home page Coder Social logo

ghobridge / smart-contracts Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 96 KB

GhoBridge is a decentralized, secure, and efficient cross-chain bridging solution powered by Chainlink's Cross-Chain Interoperability Protocol (CCIP), and Gho Token's Facilitator Logic designed for the Gho Token.

License: MIT License

Solidity 74.74% TypeScript 25.26%
aave ccip chainlink cross-chain-bridge

smart-contracts's Introduction

GhoBridge: Cross-Chain Token Bridging with Chainlink CCIP

GhoBridge is a decentralized, secure, and efficient cross-chain bridging solution powered by Chainlink's Cross-Chain Interoperability Protocol (CCIP), and Gho Token's Facilitator Logic designed for the Gho Token.

Features

  • Cross-Chain Bridging: Securely transfer Gho Token across supported blockchains with minimal trust assumptions.
  • Chainlink CCIP Integration: Utilizes Chainlink's Cross-Chain Interoperability Protocol for decentralized message passing.
  • Fee Management: Manages LINK token fees for cross-chain messaging, ensuring efficient and cost-effective operations.
  • Access Control: Implements ownership-based access control for administrative functions.
  • Credit System: Credits the recipient's account on the destination chain, allowing for flexible withdrawal of bridged tokens.
  • Event Logging: Comprehensive event logs for key actions, enhancing transparency and auditability.

Quick Start

Prerequisites

  • Node.js and npm installed
  • An Ethereum wallet with ETH and LINK for deploying contracts and paying transaction fees

Installation

  1. Clone the Repository

    git clone https://github.com/GhoBridge/smart-contracts.git
    cd gho-bridge
    
  2. Install Dependencies

    npm install
    
  3. Add the env variables

    cp .env.template .env
    
  4. Compile Contracts

    npx hardhat compile
    
  5. Deploy Contracts

    Run all the scripts in the sequense on all the supported networks, to deploy the contracts

Usage

Adding Supported Chains and Contracts

Only the contract owner can add or remove supported chains and their corresponding GhoToken contracts on those chains.

// Add a supported chain and contract
addSupportedContract(uint64 chainSelector, address contractAddress);

// Remove a supported chain
removeSupportedContract(uint64 chainSelector);

Bridging Tokens

Users can bridge tokens to a supported chain by calling initiateBridging.

// Bridge tokens to the recipient on the destination chain
initiateBridging(uint64 destinationChainSelector, address receiver, uint256 amount);

Withdrawing Tokens

Recipients can withdraw their credited tokens on the destination chain.

// Withdraw credited tokens
withdraw(uint256 amount);

Security

This project is in the development stage and has not been audited. Use at your own risk. Before using this contract in a production environment, it is highly recommended to undergo a comprehensive security audit.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues to discuss proposed changes or report bugs.

License

This project is licensed under the MIT License - see the LICENSE file for details.

smart-contracts's People

Contributors

yashgo0018 avatar

Stargazers

0x avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.