PriceProvidersRepository
Last updated
Last updated
PriceProvidersRepository
A repository of price providers. It manages price providers as well as maps assets to their price provider. It acts as a entry point for Silo for token prices.
Transfers ownership of the contract to a pending owner Can only be called by the pending owner.
Register new price provider
Name | Type | Description |
---|---|---|
Change manager address
Callable by manager or external owner role
Returns "Time-Weighted Average Price" for an asset
Returns true if address is a registered price provider
Gets manager role address
Returns the address of the current owner.
Returns the address of the pending owner.
Maps asset address to its price provider
Each asset must have a price provider contract assigned, otherwise it's not supported
Sanity check funciton
Gets an array of price providers
Gets number of pice providers registerd
Check if prices are available for an asset
Token in which prices are quoted. It's most likely WETH, however it could vary from deployment to deployment. For example 1 SILO costs X amount of quoteToken.
Unregister price provider
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
Sets price provider for asset
Request for asset price is forwarded to the price provider assigned to that asset
SiloRepository contract address
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Transfers pending ownership of the contract to a new account (newPendingOwner
). Can only be called by the current owner.
Emitted when manager is changed
Emitted when price provider is added
Emitted when ownership transfer is proposed, aka pending owner is set
Emitted when ownership is transferred on transferOwnership
and acceptOwnership
Emitted when asset is assigned to price provider
Emitted when price provider is removed
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_provider
contract IPriceProvider
undefined
_manager
address
new manager address
_asset
address
address of an asset for which to read price
_0
uint256
TWAP price of a token with 18 decimals
_provider
contract IPriceProvider
address of price provider to be removed
_0
bool
true if address is a registered price provider, otherwise false
_0
address
manager role address
_0
address
undefined
_0
address
undefined
_0
address
undefined
_0
contract IPriceProvider
undefined
_0
bool
returns always TRUE
_0
address[]
array of price providers
_0
uint256
number of pice providers registerd
_asset
address
asset address to check
_0
bool
returns TRUE if price feed is ready, otherwise false
_0
address
undefined
_provider
contract IPriceProvider
undefined
_asset
address
address of an asset for which price provider will be used
_provider
contract IPriceProvider
undefined
_0
address
undefined
newOwner
address
undefined
newPendingOwner
address
undefined
manager
address
undefined
newPriceProvider
contract IPriceProvider
undefined
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
asset indexed
address
undefined
priceProvider
contract IPriceProvider
undefined
priceProvider
contract IPriceProvider
undefined