ODCdataManagersERC721

ERC721DataManager

Contract for managing ERC721 token using a Non Fungible Fractions Data Object

This contract is used to manage an ERC721 token where a Data Object contract is used to store the token data This contract MUST be approved to interact to the data point associated with the non fungible fractions data object

WrongParameters

error WrongParameters()

Error thrown when the parameters are wrong

_datapoint

DataPoint _datapoint

The Data Point identifier for the Non Fungible Fractions Data Object

nonFungibleTokenDO

contract IDataObject nonFungibleTokenDO

The Non Fungible Fractions Data Object

dataIndex

contract IDataIndex dataIndex

The Data Index implementation

constructor

constructor(bytes32 datapoint_, address _dataIndex, address _nonFungibleTokenDO, string name_, string symbol_) public

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

_Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created.

This function call must use less than 30 000 gas._

setTokenURI

function setTokenURI(uint256 tokenId, string _tokenURI) external

Set the URI for a token id

Parameters

NameTypeDescription
tokenIduint256The token id
_tokenURIstringThe URI to set

setBaseURI

function setBaseURI(string _baseURI) external

Set the base URI for all token ids

Parameters

NameTypeDescription
_baseURIstringThe base URI to set

balanceOf

function balanceOf(address _owner) public view returns (uint256)

Returns the number of tokens in owner's account.

ownerOf

function ownerOf(uint256 tokenId) public view returns (address _owner)

_Returns the owner of the tokenId token.

Requirements:

  • tokenId must exist._

_checkMinter

function _checkMinter() internal view

SHOULD throw an error if the sender is not allowed to mint

_writeTransfer

function _writeTransfer(address from, address to, uint256 tokenId) internal virtual

_ownerOf

function _ownerOf(uint256 tokenId) internal view virtual returns (address)

_balanceOf

function _balanceOf(address _owner) internal view virtual returns (uint256)

On this page