wstETHPriceProvider
Last updated
Last updated
Price provider that uses chainlink
This contract is used to get the price of wstETH in USD.
Emitted when the wstETH address and aggregator path are set.
Parameters:
Name | Type | Description |
---|---|---|
Emitted when the time out for a Chainlink aggregator path is set.
Parameters:
Modifier to restrict access to functions to only the moderator role. The caller must have the moderator role to execute the function.
Initializes the wstETH price provider contract with the given wstETH address and aggregator path.
Parameters:
Adds a new aggregator path for the price oracle.
Requirements:
Only the moderator can call this function.
The length of the aggregator path must not exceed MAX_PRICE_PATH_LENGTH.
Parameters:
Sets the timeout value corresponding to the aggregatorPath.
Example: ETH/USD have a new answer is written when the off-chain data moves more than the 0.5% deviation threshold or 3600 seconds have passed since the last answer was written on-chain. So, the timeOut value for each aggregator will be equal to the heartbeat threshold value plus a period of time to make the transaction update the price, that time period can be 60s or a little more.
Parameters:
Checks if the given token is active.
Parameters:
Return values:
Returns the price of stETH in USD.
Return values:
Returns the price of the given token in USD.
Parameters:
Return values:
Returns the number of decimals used for the USD price.
Return values:
Returns the latest price after performing sanity check and staleness check.
Parameters:
Return values:
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 |
---|---|---|
token
address
The address of the wstETH token contract.
aggregatorPath
address[]
The array of aggregator addresses to get the price feed for wstETH in USD.
aggregatorPath
address
The address of the Chainlink aggregator path.
newTimeOut
uint256
The new time out value in seconds.
_wstETH
address
The address of the wstETH token contract.
_aggregatorPath
address[]
The array of aggregator addresses to get the price feed for wstETH in USD.
_aggregatorPath
address[]
The new aggregator path to be added.
aggregatorPath_
address
The address of chainlink aggregator contract.
newTimeOut
uint256
It is the amount of time it takes for a new round of aggregation to start after a specified
amount of time since the last update plus a period of time waiting for new price update transactions to execute.
token
address
The address of the token to check.
[0]
bool
A boolean indicating whether the token is active or not.
priceMantissa
uint256
The price of stETH in USD as a mantissa value.
token
address
The address of the token to get the price for.
priceMantissa
uint256
The price of the token in USD, scaled by 1e18.
priceDecimals
uint8
The number of decimals in the USD price.
[0]
uint8
The number of decimals used for the USD price.
aggregatorPath_
address
The address of chainlink aggregator contract.
[0]
uint256
The latest price (answer).