Giter Club home page Giter Club logo

kubri's Introduction

Kubri (Egyptian for Bridge) is an ERC-1155 bridge for Starknet.

based on (https://github.com/mortimr/qasr): create2 based on (https://github.com/miguelmota/solidity-create2-example)

You can try our Live -> https://kubribridge.vercel.app/

The repository consists of 3 folders :

  1. Starknet folder : all cairo contracts + tests and deployment scripts (using pytest and starknet-hardhat-plugin)
  2. Ethereum folder : all solidity contracts + tests and deployment scripts (using hardhat)
  3. Front folder : react app to interact with folders

Kubri : L2 -> L1 flow:

  • On L2 we create a gateway (you will find it in starknet/contracts/gateway1155.cairo).
  • On L1 we create a gateway (you will find it in ethereum/contracts/Gateway1155.sol).
  • On L2 we create a mirror NFT contract of the NFT we wish to bridge. We mint a certain amount of token and send a message to the L1 gateway through the function bridge_to_mainnet.
  • ON L1 gateway we can consume the message send from L2 through the function bridgeFromStarknet.
  • Then you can call mintNFTFromStarknet that deploys the contract BridgeERC1155.sol (this should be done once by the first user who wants to mint bridged NFTs on L1). It allows users to mint NFTs bridge from L2 on L1.

Soon you will be able to bridge back your NFT to L2.

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.