Documentation Index
Fetch the complete documentation index at: https://thrackle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
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
string private constant VERSION = "1";
nftPrice
mapping(address => mapping(uint256 => uint256)) public nftPrice;
collectionPrice
mapping(address => uint256) public collectionPrice;
Functions
setSingleNFTPrice
set the price for a single NFT from a collection
function setSingleNFTPrice(address nftContract, uint256 id, uint256 price) external onlyOwner;
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.
function setNFTCollectionPrice(address nftContract, uint256 price) external onlyOwner;
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
function getNFTPrice(address nftContract, uint256 id) external view returns (uint256 price);
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).
function getNFTCollectionPrice(address nftContract) external view returns (uint256 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
function version() external pure returns (string memory);
Returns
| Name | Type | Description |
|---|
<none> | string | VERSION |