FantomArtion.sol
Documentation for FantomArtion.sol
Overview
FantomArtion is an ERC721 Digital Asset contract deployed on the Fantom blockchain. It enables users to create, manage, and interact with non-fungible tokens (Digital Assets). The contract supports various features, including minting, burning, and transferring NFTs, and it integrates seamlessly with other Fantom ecosystem contracts like AddressRegistry and TokenRegistry.
Type of Token: ERC-721 (Digital Assets) Supply Modification: Yes Minting and Burning: Both are supported Who can modify:
Minting: Only the contract owner can initiate a pre-mint, and the beneficiary can mint the token.
Burning: Both the contract owner and the Digital Asset owner have the ability to burn tokens.
Circumstances:
Minting: Minting is primarily initiated via the
preMintandmintfunctions. ThepreMintfunction is used to create a pre-mint record and collect platform fees. The actual minting occurs in themintfunction, where the Digital Asset is minted to the beneficiary and the pre-mint data is cleared.Burning: Burning of a Digital Asset can be done by the contract owner or the Digital Asset creator through the
burnfunction.
Functions involved:
Minting:
preMintandmintBurning:
burn
Key Features
Minting new Digital Assets via
preMint()andmint()Burning Digital Assets
Setting token URI and metadata
Transferring Digital Assets between verified users
Collecting platform and royalty fees
Integration with Fantom ecosystem contracts such as AddressRegistry and TokenRegistry
Structs
PreMint: Contains pre-mint data like token ID, beneficiary, URI, etc. This data is cleared after the token is minted.
Modifiers
onlyAuthorized: Restricts access to transfer methods to allowed contracts.
areVerifiedUsers: Requires both sender and recipient to be KYC verified.
onlyCreator: Ensures the caller is the creator of the Digital Asset.
Methods
preMint: Creates a pre-mint record. Collects a platform fee in ERC20 tokens.
mint: Mints the Digital Asset to the beneficiary and clears the pre-mint data.
burn: Burns a Digital Asset.
updateRoyaltyRecipient: Sets the royalty recipient for a Digital Asset.
setPayToken: Sets the ERC20 token to be used for paying platform fees.
transferFrom: Overrides ERC721's
transferFromwith additional checks.safeTransferFrom: Overrides ERC721's
safeTransferFromwith additional checks.approve: Overrides ERC721's
approvewith additional checks.tokenURI: Returns the metadata URI for a Digital Asset.
Events
PreMinted: Emitted when a pre-mint record is created.
Minted: Emitted when a Digital Asset is minted.
UpdateRoyaltyRecipient: Emitted when the royalty recipient for a Digital Asset is updated.
UpdatePayToken: Emitted when the pay token (ERC20) for platform fees is updated.
Access Control
Owner Only: Exclusive access to update various platform parameters.
Owner and Approved: Can burn Digital Assets.
Owner and Creator: Can update royalty recipients.
External Contracts Only: Restricted methods (
transferFrom,safeTransferFrom,approve) for authorized external contracts like Marketplace, Auction, and Bundle Marketplace.KYC Verified Users Only: Transfer methods require KYC verification.
Public Methods: Includes
existsandtokenURI.Inherited Methods: Inherits access control features from ERC721 and Ownable contracts.
Payment Methods
Tokens for Payments: Only the approved ERC20 token is used for payments within the ecosystem. There are no functions marked as
payable, so Fantom's native token (FTM) is not accepted for transactions in any of the provided contracts.The approved ERC20 token is defined in the
FantomArtion.solsmart contract by specifying an ERC20 token address already deployed in the blockchain.Fees: Fees, including
platformFeeandroyaltyFee, are collected during transactions. These are in the form of approved ERC20 tokens.
ERC-20 Token Initialization
The ERC-20 token used for payments is set via the setPayToken method. The contract does not initialize any ERC-20 tokens but expects the token address to be provided.
Last updated