{"id":23531606,"url":"https://github.com/ahmetson/nft-bridge","last_synced_at":"2025-04-22T20:09:15.500Z","repository":{"id":43768508,"uuid":"407999201","full_name":"ahmetson/nft-bridge","owner":"ahmetson","description":"The easiest, and cheapest tool to bridge nfts without any coding.","archived":false,"fork":false,"pushed_at":"2023-12-11T02:59:01.000Z","size":13475,"stargazers_count":12,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T20:09:08.098Z","etag":null,"topics":["bridge","ccip","chainlink","ethreum","nft","nft-bridge"],"latest_commit_sha":null,"homepage":"https://nft-bridge.net","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-09-19T00:46:50.000Z","updated_at":"2024-10-01T22:25:49.000Z","dependencies_parsed_at":"2023-12-10T05:31:57.291Z","dependency_job_id":null,"html_url":"https://github.com/ahmetson/nft-bridge","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetson%2Fnft-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetson%2Fnft-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetson%2Fnft-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetson%2Fnft-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetson","download_url":"https://codeload.github.com/ahmetson/nft-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316043,"owners_count":21410475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridge","ccip","chainlink","ethreum","nft","nft-bridge"],"created_at":"2024-12-25T22:16:52.382Z","updated_at":"2025-04-22T20:09:15.454Z","avatar_url":"https://github.com/ahmetson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [No code NFT bridge](#new-nft-bridge)\n🧪 A trust-less, serverless NFT bridge framework with minimal setup.\n\n**To start quickly, go to the [Getting Started](#getting-started) section.**\n\nMade for the hackathon.\n\nFeatures:\n* :heart_eyes: **Simple**. Whole bridge is 4 smartcontracts only.\n* :sparkles: **Easy setup**. Deploy a single NFT in one blockchain, it will create smartcontracts automatically.\n* :earth_asia: **Multi-chain**. Transfer between many blockchains.\n* :game_die: **Decentralized and secure**. Bridge directly from NFT itself. No single manager.\n\n# Supported Blockchains\nIt's not production ready, yet. So only available on the Testnet.\n\nThe NFT Bridge uses Chainlink CCIP as the middleware solution.\nTherefore, its availabe in the blockchains supported by Chainlink CCIP.\n\n* Sepolia Testnet\n* Mumbai Testnet\n* Fuji Testnet\n* BNB Chain Testnet\n\nVisit official Chainlink documentations for a list of networks:\n[CCIP Supported Networks Testnet](https://docs.chain.link/ccip/supported-networks/testnet)\n\n# Version 0\nThe [version 0](https://github.com/ahmetson/nft-bridge/tree/chainlink-function)\nwas implemented for [Ethglobal 2021 Hackathon](https://ethglobal.com/showcase/nft-bridge-tk299) using chainlink oracles.\n\nFor me, Chainlink CCIP was the best candidate to improve the NFT Bridge.\nAt that time it wasn't launched. So with this hackathon\nI finally want to release the more secure NFT Bridge.\n\n\u003e I signed up for the announcements.\n\u003e\n\u003e I joined to the early access.\n\u003e\n\u003e Within two years I messaged several times Chainlink,\n\u003e about the news regarding CCIP but no response.\n\n--- \n# 🔥New NFT Bridge\nA new NFT Bridge solves all the issues of the first version.\n\n\n| Category        | Version 0                                | New NFT Bridge                                          |\n|-----------------|------------------------------------------|---------------------------------------------------------|\n| **Development** | Requires to deploy smartcontracts        | :blush: **No setup***                                   |\n| **UI**          | Multiple transactions, switching network | :satisfied: **Single transaction**                      |\n| **Middleware**  | Custom API in a centralized server       | :evergreen_tree: **Decentralized Oracle Network (DON)** |\n\n:blush: *No setup \u0026ndash; If your NFT has additional parameter besides ERC721 standard, then\nthere is needed a minimal setup. Otherwise, no code is needed.*\n\n---\n\n# Getting Started\n\n## 0. Pre-requirements\nDeploy the original NFT on the desired blockchain.\nThe NFT **must** be [Ownable](https://docs.openzeppelin.com/contracts/5.x/access-control#ownership-and-ownable).\n\nFor example, to test setup process, you can deploy [**PandaNFT**](https://remix.ethereum.org/#version=soljson-v0.8.22+commit.4fc1097e.js\u0026optimize=false\u0026runs=200\u0026gist=7ed7122e4df573ffd050260bd59ad44f\u0026lang=en\u0026evmVersion=null) right in your browser.\n\nIf you want to test the bridging, you can use the PandaNFT in *sepolia* testnet.\nThe PandaNFT deployed to [0x390ed519f4f786d3000887e2f94dd69f0f2b18c0](https://sepolia.etherscan.io/address/0x390ed519f4f786d3000887e2f94dd69f0f2b18c0).\nOn etherscan, simply mint the NFT for yourself.\n\nThen, copy the NFT address and head to [Nft-Bridge.net/approve](https://www.nft-bridge.net/approve).\nApproved? You can bridge the NFT that you minted on etherscan.\n\n\n\u003e **Future work**\n\u003e \n\u003e [AccessControl](https://docs.openzeppelin.com/contracts/5.x/access-control#role-based-access-control) not supported YET.\n\u003e\n\u003e [AccessManager](https://docs.openzeppelin.com/contracts/5.x/access-control#using_accessmanager) not supported YET.\n\u003e\n\u003e **Contract Creator** by deployed transaction not supported yet.\n\u003e\n\u003e **Custom ownership** not supported yet.\n\n## 1. Register\n\u003e **Only owner of NFT contract allowed.**\n\nFirst, step is the original NFT must be *registered* by the NFT Bridge.\nAt the registration process, the NFT Bridge identifies the owner, creates the wrapper\nfor the nft. That contract later will be used to bridge the nfts.\n\nVisit the [nft-bridge.net/](https://nft-bridge.net/).\n\nConnect your wallet.\n\nGo to [Register/](https://nft-bridge.net/register) page.\n\nSwitch to the blockchain network where your NFT deployed in.\n\nAt the *register* page, pass the NFT address in the edit field.\n\nClick the button to register the nft.\n\n## 2. Set up a linked NFT.\n\u003e **Only owner of NFT contract allowed.**\n\n\u003e **NFT Must be registered. If you didn't register,\n\u003e then go to [1. register](#1-register) step first.**\n\nThe second step is to set up a linked NFT.\nThe linked NFT is your NFT on another chain connected to the wrapper.\n\nDuring the setup, the bridge deploys the NFT on another blockchain,\nthen lints the NFT address with the wrapper.\n\nThe linted NFT and the wrapper are composing a Bridged NFT that\nworks directly without third party smartcontracts.\n\nTo set up, go to the [nft-bridge.net/admin](https://nft-bridge.net/admin) page.\n\nSelect the NFT from the registered NFTs list. Click on \"Setup\".\n\nIn the popup, select the target blockchain and submit the transaction.\n\n:sparkler: **Congratulations.** It's time to bridge the nft.\n\n## 3. Bridge\n\u003e :sunglasses: **Anyone who has NFT**\n\nTo bridge, we created a simplified dashboard.\n*But you can create your own, or interact with the smartcontract directly*.\n\nVisit the [nft-bridge.net] website. Connect your wallet.\nVisit the [nft-bridge/bridge] web page.\n\nTo bridge, select the NFT from the list.\n\nDefine the destination blockchain, then click to submit button.\n\nIf it's your first interaction, then approve NFT Bridge to use your NFTs.\n\nThen click on the submit.\n\nAfter successful transaction you will see the Bridged NFT, and your NFT was disappeared.\n\nCheck your balance on the destination chain, and you will see your NFT there.\n\n### 3.2 Multi chain bridging\nNFT Bridge supports multi-chains.\n\n*The admin of the NFT can setup a linked NFT by following (#2-setup)[#2-setup] step.*\n\nThe steps are identical as in the [#3-bridge](#3-bridge) step.\n\nYou just need to switch your network to the place where you have your NFTs in.\n\nIf you select the original blockchain as the destination, then\nNFT will be unwrapped and transferred to your balance.\n\n---\n# Structure\nThis NFT Bridge is consisted of **smartcontracts** and **web ui** only.\nNo backend, nothing else.\n\n\n## Smartcontracts\nThe project consists several smartcontracts.\nThey all must be identical in every chain.\n\nThe smartcontract methods can be categorized into two functionalities.\nThe functionalities are defined in the [Getting-Started](#getting-started) as steps 1..3.\n\nObviously the most important functionality is the Bridging one.\nThe bridging functionality is configured as almost identical two smartcontracts.\n\nThe second functionality is automatic deploying of the NFTs and linting them.\n\n### Smartcontracts for bridging functionality\n\n#### Wrapped NFT\n\u003e Source Code: [WrappedNft.sol](./packages/hardhat/contracts/WrappedNft.sol)\n\nThe smartcontract locks the original NFT.\nThen sends a message across blockchains to mint the NFT on another blockchain.\n\n#### Linked NFT\n\u003e Source Code: [LinkedNft.sol](./packages/hardhat/contracts/LinkedNft.sol)\n\nLinked NFT is copy of the original NFT on other blockchains.\nThe difference from the original NFT is that this NFT comes with built-in bridging functionality.\n\n### Smartcontracts for setup functionality\n\n#### Registrar\n\u003e Source Code: [Registrar.sol](./packages/hardhat/contracts/Registrar.sol)\n\nA smartcontract that creates the [WrappedNFT](#wrapped-nft).\nIt also has the functionality to bridge NFTs across the blockchains.\n\nOnly admin of the NFT is able to interact with this smartcontract.\n\n#### LinkedFactory\n\u003e Source Code: [LinkedFactory.sol](./packages/hardhat/contracts/LinkedFactory.sol)\n\nA smartcontract that creates the [LinkedNft](#linked-nft).\nThis smartcontract is not callable. \nOnly [registrar](#registrar) is able to invoke it from other blockchain.\n\n\n## API\nThe list of methods\n\n| Smartcontract | Permission | Method        | Description                                                     | Arguments                                                                     |\n|---------------|------------|---------------|-----------------------------------------------------------------|-------------------------------------------------------------------------------|\n| Registrar     | NftAdmin   | setup         | Registers a new nft.\u003cbr/\u003eCreates smartcontracts across networks | Accepts the NFT address, deployment \u003cbr/\u003etransaction and list of destinations |\n| Registrar     | Admin      | withdraw      | Withdraws the fees collected from the nft minting               | No arguments                                                                  |\n| Registrar     | Oracle     | xSetup        | Registers a linked nft                                          | Accepts the address of the chain ids and original nft address                 |\n| Wrapped NFT   | Anyone     | xTransferTo   | Wraps the NFT as a locked NFT and mints in the destination      | Accepts the destination                                                       |\n| Wrapped NFT   | Oracle     | unwrap        | Asks to transfer the NFT to the given address                   | Accepts the address of the owner                                              |\n| Linked NFT    | Anyone     | xTransferTo   | Burns the NFT and transfers to the destination                  | Accepts the destination                                                       |\n| Wrapped NFT   | Oracle     | xTransferFrom | Mints the NFT and transfers to the given address                | Accepts the address of the new owner                                          |\n\nPermissions\n* NftAdmin \u0026ndash; an owner or the deployer of the nft.\n* Admin \u0026ndash; a deployer of the Nft Bridge\n* Oracle \u0026ndash; a chainlink CCIP oracle\n* Anyone \u0026ndash; owner of the nft.\n\n---\n# Bridging Demo \nI will create a simple NFT on remix on Sepolia. I mint two nfts to the user.\n\nThen I will go to the website dashboard and set it as setup it to Mumbai.\n\nOnce it's done, I will switch on dashboard to the bridge.\n\nIn the bridge, I approve.\nThen I send my first nft to Mumbai.\n\nOn Mumbai network, I put the NFT on sale on OpenSea.\n\nSwitching account, then buying the NFT it.\n\nI transfer the NFT to Sepolia network again.\n\nI see unwrapped NFT in my account.\n\n## Multi-chain bridging\nIn the dashboard, I set up the NFT to Fuji testnet.\n\nI bridge the NFT to Fuji.\nSwitching the network, I bridge the NFT to Mumbai.\nSwitching the network, I bridge the NFT from Mumbai to Sepolia.\n\nThe unwrapped NFT is in my account again.\n\n# Install\n\n1. Deploy the Library\n`yarn deploy --tags Libs --network sepolia --export-all ./scripts/deployments.ts`\n\n2. Verify\n\n`yarn verify-custom --network sepolia \u003clib_library\u003e`\n\n2. Deploy registrar: \n\n`yarn deploy --tags Registrar --network sepolia --export-all ./scripts/deployments.ts`\n\n3. Verify the registrar\n\n`yarn verify-custom --network sepolia ${address} --constructor-args scripts/constructor/sepolia_registrar.ts`\n\n4. Deploy Linked Factory\n\n`yarn deploy --tags Factory --network sepolia --export-all ./scripts/deployments.ts`\n\n5. Verify Linked Factory in sepolia\n\n`yarn verify-custom --network sepolia ${address} --constructor-args scripts/constructor/sepolia_linkedfactory.ts`\n\n6. Deploy Linked Factory in mumbai\n\n`yarn deploy --tags Factory --network polygonMumbai --export-all ./scripts/deployments.ts`\n\n7. Verify Linked Factory in mumbai\n`yarn verify-custom --network polygonMumbai ${address} --constructor-args scripts/constructor/polygonmumbai_linkedfactory.ts`\n\n8. Let Registrar know the deployed Link Factory smartcontracts. :)\n\n`yarn set-factory`\n\n\u003e Let Linked Factory know the registrars\n\nDeploy:\nIn the root.\n`yarn deploy --tags Factory --network polygonMumbai --export-all ./scripts/deployments.ts`\n\nVerify:\nIn the hardhat package\n`npx hardhat --network polygonMumbai 0xCb3B96E8c57E90b8B74959c8475cD3245D02f053 --constructor-args scripts/constructor/polygonmumbai_linkedfactory.ts`\n\n\n8. Export deployments to the frontend\n\nDuplicate `packages/hardhat/scripts/deployments.ts`\nto `packages/nextjs/utils/deployment.ts`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetson%2Fnft-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetson%2Fnft-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetson%2Fnft-bridge/lists"}