Skip to content

trashpirate/crosschain-nft

Repository files navigation

CROSSCHAIN NFT

Version Forge Solc GitHub License

Website: nadinaoates.com LinkedIn: nadinaoates Twitter: N0_crypto

About

This repo includes a pseudo-randomized cross-chain NFT contract (ERC721A) using Chainlink CCIP. The contracts are deployed on BNB Testnet and Base Sepolia.

Installation

Install dependencies

$ make install

Usage

Before running any commands, create a .env file and add the following environment variables. These are configured for BNB and BASE chain:

# network configs
RPC_LOCALHOST="http://127.0.0.1:8545"

# binance smart chain
RPC_BSC_MAIN=<rpc url>
RPC_BSC_TEST=<rpc url>
BSCSCAN_KEY=<api key>

# base chain
RPC_BASE_MAIN=<rpc url>
RPC_BASE_SEPOLIA=<rpc url>

BASESCAN_KEY=<api key>
BASESCAN_SEPOLIA_KEY=<api key>

Run tests

$ forge test

Deploy contract

Set up your Testnet and Mainnet accounts with keystore using cast wallet import --interactive and edit the Makefile accordingly.

Testnet Payment Token

$ make deploy-token-testnet

Testnet Source Minter

$ make deploy-source-testnet

Testnet Destination Minter and NFT Contract

$ make deploy-destination-testnet

Deployments

Testnet

Payment Token: https://testnet.bscscan.com/address/0x563f5a7fa101dd7051853604ec63103ab6226c7b

Source Minter: https://testnet.bscscan.com/address/0xdcdf94053c9fcfe5bb7525c060b47bbc6d166ce3

Destination Minter: https://base-sepolia.blockscout.com/address/0xCD8946Dda83af26E817579A40587efeC05aeC45B

NFT Contract: https://base-sepolia.blockscout.com/address/0x1d4880a45e8D1B7627728b31B2D5c23Dd9DbE46b

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

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

Author

👤 Nadina Oates

📝 License

Copyright © 2024 Nadina Oates.

About

Cross-chain NFT contract using CCIP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published