FraktalNFT.sol

Overview

Modified ERC-1155 contract

  • The contract is upgradeable, it contrains few predefined values to prevent bugs. The predefined value (enumberable) is set for AddressSet

  • Contains events like LockedSharesForTransfer and unLockedSharesForTransfer for locking and unlocking shares of NFT for transfer.

  • event ItemSold defines buyer address, index used, payer’s address, revenue from the NFT sale, amount.

  • Fraktionalized event defines holder’s address, minter’s address, index

  • Defraktionalized event contains holder’s address, index

  • MajorityValueChanged new value

  • Deployment initialisation - deploys contract with creator’s address, NFT revenue address, contains initializer, calldata uri. User functions:

  • fractionalise NFT, must contain address where the NFT gets fractionalized, tokenId of the NFT itself. Requires tokenId, balanceOf the token-NFT itself is defined as “not owner”, fraktionalilzed, indexUsed has to contain tokeId

  • defraktionalized - index has to be set to 10000 in order to defraktionalilze NFT

  • if the majority of fractions value is 10000 it shows incorrect value as the owner can’t own 10000 fraktions

  • the owner address is not approved to burn the NFT after it gets sold

  • lockSharesTransfer - checks number of shares on the address from message sender,

  • unlocks shares transfer when the item is sold

  • Revenue payment contains memmory of owners addresses of the NFT, hold values of the NFT and distributes the NFT fractions between owners

  • Payment splitter - distributes revenue from NFT to fraction owners

  • sellItem function process transfers without value, this function is being used with non fungible transfers - NFTs

  • Getter functions: getRevenue,getFraktions,getLockedShares,getLockedToTotal,getStatus,getFraktionsIndex

Last updated