Oracle
Smart Contract:[UniswapV3ChainLinkUsdOracle.sol](Solidity-Open-Source/UniswapV3ChainLinkUsdOracle.sol at main · Themis-protocol/Solidity-Open-Source · GitHub)
Get the latest price for atoken
function getLatestPrice(
address _token
) public view returns (int256 _answer,int _decimals)
Parameters:
Name | Type | Description |
---|---|---|
_token | address | sellected token address |
Returns:
Name | Type | Description |
---|---|---|
_answer | uint256 | Amount of acceptance |
_decimals | int | Decimal of the token |
Get a price quote for theNFT
for the selectedToken
function getTWAPQuoteNft(
uint256 _tokenId,
address _quoteToken
) external view returns(
uint256 _quoteAmount,
uint256 _gasEstimate
)
Parameters:
Name | Type | Description |
---|---|---|
_tokenId | uint256 | NFT ID |
_quoteToken | address | token address |
Returns:
Name | Type | Description |
---|---|---|
_quoteAmount | uint256 | quote amount |
_gasEstimate | uint256 | estimated gas |
Last modified 1yr ago