fio.erc721 - FIONFT Contract Specification

fio.erc721 - FIONFT Contract Specification

Notes: _beforeTokenTransfer action of erc721 OZ implementation has been overridden to prevent tranasfers of NFTs to the contract address. Error: “Cannot transfer to contract”

Public/External Actions

Actions

Description

Actions

Description

wrapnft

mint to account with oracle approvals

unwrapnft

burn (called by user)

burnnft

oracles can burn nft by consensus

regoracle

register oracle

unregoracle

unregister oracle

regcust

register custodian

unregcust

unregister custodian

listDomainsOfOwner

Returns list of tokenIds owned by the provided ethereum account

getOracle

Get oracle status by ethereum account

getCustodian

Get custodian status by ethereum account

getApproval

getApproval status by indexhash. This is emitted in consensus_activity event after a successful approval has been executed.

tokenURI

retrieve JSON information about NFT

setBaseURI

Change the baseURI path (custodian only)

_baseURI

Retrieve baseURI path (used as first portion of tokenURI)

State Variables

State variables

Description

State variables

Description

custodian_count

Keeps track of the number of custodians active in the oracle. Required for consensus math

oracle_count

Keeps track of the number of custodians active in the oracle. Required for consensus math

oraclelist

list of active oracles

custodianlist

list of active custodians(private)

_baseURIextended

Stored baseURI

attribute[]

Holds the domain names for each tokenID 1:1

Mappings

Mapping

Description

Mapping

Description

attribute

Keeps track of the domain names by tokenId

approvals

Keeps track of the approval statuses

_owners

Keeps track of token owners

 

Events

Events

Description

Events

Description

wrapped

Event emitted when wrap has completed.
emit wrapped(account, tokenID, obtid);

unwrapped

Event emitted when user has unwrapped NFT.
emit unwrapped(fioaddress, tokenID);

custodian_registered

Event emitted when a custodian has been registered
event custodian_registered(address ethaddress, uint256 eid);