GithubHelp home page GithubHelp logo

mortimr / qasr Goto Github PK

View Code? Open in Web Editor NEW
78.0 7.0 11.0 1.95 MB

ETH <=> Starknet NFT Bridge

Home Page: qasr.vercel.app

Solidity 7.22% TypeScript 80.20% JavaScript 6.88% Dockerfile 0.18% Python 1.52% Shell 1.28% HTML 2.55% CSS 0.18%

qasr's Introduction

Qasr:

Qasr is a simple NFT bridge for Starknet.

Try it out live! ๐Ÿ”ฅ https://qasr.vercel.app

(special thanks to Argent for their Argent X plugin!)

Technical Details

Here's the L1 -> L2 flow:

  • On L1 we create a gateway (you will find it in ethereum/contracts/Gateway.sol).
  • On L2 we create another gateway (you will find it in starknet/contracts/gateway.cairo).
  • On L2 we create a mirror NFT contract of the NFT we wish to bridge (this should be done once, by the creator of the NFT on L1).
  • We then take our NFT on L1 and send it to our L1 gateway by calling the "warptoStarknet" method.
  • The L1 gateway send a message to the L2 gateway
  • The L2 gateway receives the message and handles it in bridge_from_mainnet. The gateway creates mint credits corresponding to a right to claim an NFT.
  • The L2 user can now go and "claim" his NFT to the L2 gateway with consume_mint_credit. The gateway will call the L2 smart-contract and mint the appropriate NFT (see function create_token).
  • If there is an issue with the consume_mint_credit call (ex: target contract reverts), L2 users can call revoke_mint_credit.

The L2 -> L1 basically works by reverting these steps. Please note that currently, you can only bridge from L2 to L1 an NFT that originated from L1. Meaning native L2 NFT to L1 is NOT supported by Qasr (yet!).

Qasr

qasr's People

Contributors

mortimr avatar pscott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

qasr's Issues

L2 minted nft to L1

Hi! When It'll be possible to withdraw L2 minted nfts to L1?
It would be an awesome feature

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.