FuelPumpsNFT is an advanced NFT smart contract developed for the Fuel blockchain. This contract supports minting, transferring, and royalty management for NFTs on Fuel.
- Minting: Allows users to mint unique NFTs until the maximum supply is reached.
- Batch Minting: Mint multiple NFTs in a single transaction.
- Royalties: Set and manage royalty receivers and percentages for each NFT.
- Transfers: NFT owners can transfer tokens to other users.
- Ownership Tracking: Track the NFTs owned by a particular address.
- Supply Limit: Enforces a maximum supply of NFTs.
- Chain: Fuel blockchain
- Maximum Supply: 2022 NFTs
- Royalty Cap: Up to 100%
- Minting: Public minting available with supply checks
Before running or deploying the contract, ensure the following tools are installed:
- Git
- Fuelup (Fuel's official toolchain)
- Sway (for Fuel smart contracts)
- Visual Studio Code (optional, for editing and developing the contract)
-
Clone the Repository:
git clone https://github.com/YOUR_USERNAME/FuelPumpsNFT.git cd FuelPumpsNFT
-
Install Fuel Toolchain: Ensure that you have Fuel's toolchain installed via
fuelup
:curl --proto '=https' --tlsv1.2 -sSf https://fuellabs.github.io/fuelup/fuelup-init.sh | sh
-
Build the Contract: Use
forc
to build the contract.forc build
-
Run Tests: To test the contract before deploying:
forc test
You can mint NFTs by calling the mint
function with the desired token URI (metadata link):
// Example minting command (pseudo-code):
mint("https://example.com/nft-metadata/1")
Batch mint NFTs by providing a list of URIs:
mint_batch(["https://example.com/nft-metadata/1", "https://example.com/nft-metadata/2"])
Transfer an NFT to another address using the transfer
function:
transfer(token_id, recipient_address)
Assign royalty settings to an NFT:
set_royalties(token_id, receiver_address, percentage)
You can modify the smart contract in FuelPumpsNFT.rs
or its Sway version in src/main.sw
(if using Sway).
To compile the contract:
forc build
To deploy the contract to the Fuel testnet:
forc deploy --url https://node-beta-1.fuel.network/graphql
Feel free to fork the project and create pull requests for new features or fixes.
This project is licensed under the MIT License - see the LICENSE file for details.