FraktalFactory.sol

Overview

ERC-721 & ERC-1155 contracts, this contract is being used for saving gas on deployments and simplify deployments
  • FraktalFactory contract is ownable by ERC-1155 and ERC-721 NFT token holders
  • EnumberableMap - contains key value of data type which can be iterated - implementation address & revenue channel implementation
  • Import new data type ERC-721 with token address and token index
  • Import new data type ERC-1155 with token address and token index
  • reference arrays - mapping function Events which contract can do:
  • Minted - needs to contain: creator’s address, URL to IPFS, token address, token ID of the NFT hashed by uint256
  • ERC721Locked - needs to contain: locker address, token address, fraktal address, token ID hashed by uint256
  • ERC721UnLocked - needs to contain: owner address, token ID hashed by uint256, collateral NFT address, index hashed by uint256
  • ERC1155Locked - needs to contain: locker address, token address, fraktal address, token ID hashed by uint256
  • ERC1155UnLocked - needs to contain: owner address, token ID hashed by uint256, collateral NFT address, index hashed by uint256
  • RevenuesProtocolUpgraded - need to contain: New Address
  • FraktalProtocolUpgraded - needs to contain: New Address
  • Constructor intializes state variables of a contract - implementation address and revenue channel implementation. Fraktalimplementation = _implementation; revenueChannelImplementation = _revenueChannelImplementation;

Admin functions

  • create new fraktal implementation with owner using new address. Upgrade Fraktal protocol
  • set revenue implementation with owner using new address. Upgrade Revenue protocol

User functions

  • Mint fractionalised NFT
  • Import NFT as ERC-721 and fractionalise it
  • Import NFT as ERC-1155 and fractionalise it
  • Claim NFT as ERC-721
  • Claim NFT as ERC-1155
Getter functions: getFraktalAddress, getERC721Collateral, getERC1155Collateral, getFraktalsLength
Copy link
On this page
Overview
Admin functions
User functions