NFT Oracle
The NFT Oracle contract accounts price data for the NFTs held in the Unlockd protocol. The protocol’s LendPool contract uses it as a source of truth for NFT prices, which are updated externally by the Unlockd team. We leverage powerful price appraisers, such as Upshot, NFTBank and Ginoa in order to provide Unlockd users with the most competitive LTV in the industry.
The source code of the proxy NFT price provider can be found on Github.
Always get the latest NFT price oracle address by calling getNFTOracle()
on the LendPoolAddressesProvider
contract.
View methods
getNFTPrice
function getNFTPrice(address _collection, uint256 _tokenId) external view override onlyExistingCollection(_collection) returns (uint256)
Returns the price for a specific NFT
Call params
Return values
getMultipleNFTPrices
function getMultipleNFTPrices(address[] calldata _collections, uint256[] calldata _tokenIds) external view override returns (uint256[] memory)
Returns the price for multiple NFTs.
Call params
Return values
getNFTPriceNFTX
function getNFTPriceNFTX(address _collection, uint256 _tokenId) external view override onlyExistingCollection(_collection) returns (uint256)
Returns the spot price for a given NFT in the NFTX market.
Call params
Return values
Write methods
setNFTPrice
function setNFTPrice( address _collection, uint256 _tokenId, uint256 _price ) external override onlyPriceManager
Sets the price for a given NFT.
Call params
setMultipleNFTPrices
function setMultipleNFTPrices( address[] calldata _collections, uint256[] calldata _tokenIds, uint256[] calldata _prices ) external override onlyPriceManager
Sets the price for multiple NFTs.
Call params
addCollection
function addCollection(address _collection) external onlyOwner
Adds a collection to the be supported by NFT oracle.
Call params
setCollections
function setCollections(address[] calldata _collections) external onlyOwner
Adds multiple collections to the be supported by NFT oracle.
Call params
removeCollection
function removeCollection(address _collection) external onlyOwner
Removes a collection that is currently supported by NFT oracle.
Call params
setPause
function setPause(address _collection, bool paused) external override onlyOwner onlyExistingCollection(_collection)
Pauses a specific collection in the NFT oracle.
Call params
setPriceManagerStatus
function setPriceManagerStatus(address newPriceManager, bool val) external onlyOwner
Adds or removes an address to be allowed to act as the price manager.
The price manager addresses are the only ones allowed to set prices in the Unlockd protocol. Currently, they are addresses managed by the Unlockd team.
Call params
Last updated