OnChainTraits
0xstabby.eth
OnChain Traits
Inherit from this abstract to use on-chain metadata
Just setTraits, and return getMetadata from tokenURI in implementation
Methods
_name
function _name() external view returns (string)
Returns
Name |
Type |
Description |
_0 |
string |
Name for metadata |
_symbol
function _symbol() external view returns (string)
Returns
Name |
Type |
Description |
_0 |
string |
Symbol for metadata |
description
function description() external view returns (string)
Returns
Name |
Type |
Description |
_0 |
string |
Description for metadata |
getImage
function getImage(uint256 id) external view returns (string)
Get image
Can be overridden
Parameters
Name |
Type |
Description |
id |
uint256 |
To get image for |
Returns
Name |
Type |
Description |
_0 |
string |
String of base64 encoded svg |
function getMetadata(uint256 id) external view returns (string)
Get metadata for id
Can be overridden
Parameters
Name |
Type |
Description |
id |
uint256 |
To grab metadata for |
Returns
Name |
Type |
Description |
_0 |
string |
String of base64 encoded metadata |
getTraits
function getTraits(uint256 id) external view returns (struct OnChainDataStructs.Trait[])
Get traits for id
Can be overridden
Parameters
Name |
Type |
Description |
id |
uint256 |
To grab traits for |
Returns
Name |
Type |
Description |
_0 |
OnChainDataStructs.Trait[] |
Array of Traits |
seed
function seed() external view returns (uint256)
Returns
Name |
Type |
Description |
_0 |
uint256 |
Seed for setting traits on reveal |
traitTypeCount
function traitTypeCount() external view returns (uint256)
Returns
Name |
Type |
Description |
_0 |
uint256 |
undefined |
traitValueCount
function traitValueCount() external view returns (uint256)
Returns
Name |
Type |
Description |
_0 |
uint256 |
undefined |