ProtocolERC721Pricing
Inherits: Ownable, IApplicationEvents, IProtocolERC721Pricing
Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett
This contract is a simple pricing mechanism only. Its main purpose is to store prices.
This contract allows for setting prices on entire collections or by tokenId
State Variables
VERSION
nftPrice
collectionPrice
Functions
setSingleNFTPrice
set the price for a single NFT from a collection
Parameters
Name | Type | Description |
---|---|---|
nftContract | address | is the address of the NFT contract |
id | uint256 | of the NFT |
price | uint256 | price of the Token in weis of dollars. 10^18 => $ 1.00 USD 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 |
setNFTCollectionPrice
set the price for whole collection. If an NFT has a price specific for it, the collection price would have the second priority.
Parameters
Name | Type | Description |
---|---|---|
nftContract | address | is the address of the NFT contract |
price | uint256 | price of the Token in weis of dollars. 10^18 => $ 1.00 USD 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 |
getNFTPrice
gets the price of an NFT. It will return the NFT’s specific price, or the price of the collection if no specific price has been given
Parameters
Name | Type | Description |
---|---|---|
nftContract | address | is the address of the NFT contract |
id | uint256 | of the NFT |
Returns
Name | Type | Description |
---|---|---|
price | uint256 | of the Token in weis of dollars. 10^18 => $ 1.00 USD 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 |
getNFTCollectionPrice
gets the price of an NFT Collection. It will return the NFT Collection price to be used for each token Id (i.e. Floor Price).
Parameters
Name | Type | Description |
---|---|---|
nftContract | address | is the address of the NFT contract |
Returns
Name | Type | Description |
---|---|---|
price | uint256 | for the collection in weis of dollars. 10^18 => $ 1.00 USD 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 |
version
gets the version of the contract
Returns
Name | Type | Description |
---|---|---|
<none> | string | VERSION |