BaseStrategyChainlinkMultiplePriceFeeds
This contract allows a strategy to store Chainlink price feeds for price retrieval.
priceFeeds
mapping(address => address) priceFeeds
This maps the collection address to a Chainlink price feed address. All prices returned from the price feeds must have 18 decimals.
PriceFeedUpdated
event PriceFeedUpdated(address collection, address priceFeed)
It is emitted when a collection's price feed address is added.
Parameters
Name | Type | Description |
---|---|---|
collection | address | NFT collection address |
priceFeed | address | Chainlink price feed address |
constructor
constructor(address _owner) public
Constructor
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Owner address |
setPriceFeed
function setPriceFeed(address _collection, address _priceFeed) external
This function allows the owner to set an NFT collection's Chainlink price feed address.
Only callable by owner. Once the price feed is set for a collection, it is not possible to adjust it after.
Parameters
Name | Type | Description |
---|---|---|
_collection | address | NFT collection address |
_priceFeed | address | Chainlink price feed address |