Git Source Inherits: Ownable, IApplicationEvents, IProtocolERC20Pricing Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett This contract is a simple pricing mechanism only. Its main purpose is to store prices. This contract doesn’t allow any marketplace operations.

State Variables

VERSION

string private constant VERSION = "1";

tokenPrices

mapping(address => uint256) public tokenPrices;

Functions

setSingleTokenPrice

that the token is the whole token and not its atomic unit. This means that if an ERC20 with 18 decimals has a price of 2 dollars, then its atomic unit would be 2/10^18 USD. 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 set the price for a single Token
function setSingleTokenPrice(address tokenContract, uint256 price) external onlyOwner;
Parameters
NameTypeDescription
tokenContractaddressis the address of the Token contract
priceuint256price of the Token in weis of dollars. 10^18 => $ 1.00 USD

getTokenPrice

that the price is for the whole token and not of its atomic unit. This means that if an ERC20 with 18 decimals has a price of 2 dollars, then its atomic unit would be 2/10^18 USD. 999_999_999_999_999_999 = 0xDE0B6B3A763FFFF, 1_000_000_000_000_000_000 = DE0B6B3A7640000 gets the price of a Token. It will return the Token’s specific price.
function getTokenPrice(address tokenContract) external view returns (uint256 price);
Parameters
NameTypeDescription
tokenContractaddressis the address of the Token contract
Returns
NameTypeDescription
priceuint256of the Token in weis of dollars. 10^18 => $ 1.00 USD

version

gets the version of the contract
function version() external pure returns (string memory);
Returns
NameTypeDescription
<none>stringVERSION