🚪ScaleyValleyCollection specification
ScaleyValleyCollection is a contract keeping all NFT information in it. This contract exists only on Ethereum network with bridge Hyp721 backings on other Valley-chains.
Storage mapping
kindSupply
mapping uint256 => uint256
Maps kindId to total amount minted of this kind
Constants
AQUATIQUE_KIND
uint256
0x0000 — indentifier for Aquatique NFT kind
DRUID_KIND
uint256
0x0001 — indentifier for Druid NFT kind
ILLUMINATOR_KIND
uint256
0x0002 — indentifier for Illuminator NFT kind
HERMES_KIND
uint256
0x0003 — indentifier for Hermes NFT kind
MINTER_ROLE
bytes32
keccak256("MINTER_ROLE") — only minter can mint
Methods
View state
getNFTKindSupply(uint256 kind) — gives supply for kind
getKind(uint256 id) — calculated kind from id using bitwise operators
isKind(uint256 id, uint256 kind) —whether id is amongst kind tokens
tokenURI(uint256 tokenId) — appends tokenId to baseURI
Changing state
mintKind(address to, uint256 kind) — mints kind token to user to. It emits event Transfer from address(0) so backend services will see minted token id.
token id is defined as follows:
uint256 tokenId = (kindId << 16) | kindSupply[kindId]
Interactor must have MINTER_ROLE.
setBaseURI(string memory newUri) — set NFT's metadata URI. Only DEFAULT_ADMIN_ROLE
Last updated