BUK NFT

BUK Protocol NFT Contract

The BukNFTs contract is a Solidity smart contract designed for managing dynamic asset inventory and ERC1155 token management for corresponding NFTs.

Overview

The contract is designed with the following key components:

  • Buk Treasury: Address of the Buk treasury contract.

  • Buk POS NFT Collection: Name and address of the Buk POS NFT collection contract.

  • Buk Protocol: Address of the Buk Protocol contract.

  • Token URI Mapping: Mapping for token URI's for booked tickets.

  • Roles: Constants for roles like Buk Protocol contract, marketplace contract, and admin.

  • Pausable: Pausable controls for contract

Features

  • Role-based Access: Different functionalities accessible by admin, marketplace, and Buk Protocol contract.

  • Token URI Management: Functions to set and retrieve token URIs.

  • NFT Minting and Burning: Functions to mint and burn NFTs.

  • Royalty Information: Function to retrieve royalty information for a specific token.

  • Safe Transfers: Functions to safely transfer NFTs.

  • Pausable : Controls contract pause and unpause functions

Functions

Public and External Functions:

  • pause: To pause contract, only admin.

  • unpause: To pause contract, only admin.

  • setBukProtocol: Set the Buk Protocol Contract address.

  • setBukTreasury: Set the treasury address.

  • setMarketplaceRole: Set the marketplace address.

  • setBukPOSNFTRole: Set the BukPOSNFT to the contract.

  • setURI: Sets the URI for a specific token ID.

  • mint: Mint a new NFT with a specific token ID, account, amount, and data.

  • burn: Burn a specific NFT.

  • royaltyInfo: To retrieve information about the royalties associated with a specific token.

  • safeTransferFrom: Transfers ownership of an NFT token from one address to another.

  • safeBatchTransferFrom: Transfers ownership of multiple NFT tokens from one address to another.

  • uri: Returns the URI associated with the token ID.

Private Functions:

  • _setBukProtocol: Set the Buk Protocol Contract address.

  • _setBukTreasury: Set the BukTreasury contract address.

  • _setBukPOSNFTRole: Set the role to a BukPOSNFT contract.

  • _setURI: Returns the URI associated with the token ID.

Events

  • SetBukProtocol: Emitted when Buk Protocol Address is updated.

  • SetBukTreasury: Emitted when treasury is updated.

    • SetMarketplace: Emitted when marketplace role is granted.

  • SeNFTPOSContractRole: Event to set NFT contract role.

  • SetURI: Event to set token URI.

Interface: IBukNFTs

The IBukNFTs interface provides a blueprint for the main BukNFTs contract. It defines the essential functions, events, and data structures that the main contract should implement.

Key Components:

  • Events: Various events like SetBukProtocol, SetBukTreasury, SetMarketplace, etc.

  • Functions: Functions like setBukProtocol, setBukTreasury, setMarketplaceRole, etc.

License

This project is licensed under the MIT License.

Last updated