-
Notifications
You must be signed in to change notification settings - Fork 0
Smart contract
Gian Luca Rivera edited this page Nov 6, 2022
·
1 revision
Provides the necessary functions to generate an NFT with metadata
Inherits ERC721, ERC721Enumerable from OpenZeppelin and VestaDNA.sol
struct Counters.Counter _tokenIdCounter
constructor() public
function mint() public returns (uint256)
Function in charge of creating a new token, new tokenId
Name | Type | Description |
---|---|---|
[0] | uint256 | unique token identification |
function boolToString(bool _b) public pure returns (string)
Convierte un bool a string
Inherits ERC721, ERC721Enumerable from OpenZeppelin and VestaDNA.sol
Name | Type | Description |
---|---|---|
_b | bool | booleano |
Name | Type | Description |
---|---|---|
[0] | string | Yes or No |
function tokenURI(uint256 tokenId) public view returns (string)
Returns a url in standard Data URL with the metadata that makes up the NFT encoded in base64
Name | Type | Description |
---|---|---|
tokenId | uint256 | unique token identification |
Name | Type | Description |
---|---|---|
[0] | string | Data URL (data:application/json;base64,...) |
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal
Enumerable methods to list the tokens a user owns (Overrides required by solidity), transfer a token
Name | Type | Description |
---|---|---|
from | address | origin |
to | address | destination |
tokenId | uint256 | unique token identification |
function supportsInterface(bytes4 interfaceId) public view returns (bool)
States that in addition to being 721 it is enumerable
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | unique interface identification |
Name | Type | Description |
---|---|---|
[0] | bool | override support interface |