wstETHPriceProviderL2

Overview

License: MIT

contract wstETHPriceProviderL2 is wstETHPriceProvider

Price provider that uses chainlink

This contract is used to get the price of wstETH in USD.

Events info

SetSequencerUptimeFeed

event SetSequencerUptimeFeed(address indexed newSequencerUptimeFeed)

Emitted when the address of the L2 sequencer uptime feed is set.

Parameters:

NameTypeDescription

newSequencerUptimeFeed

address

The address of the new L2 sequencer uptime feed.

SetGracePeriodTime

event SetGracePeriodTime(uint32 newGracePeriodTime)

Emitted when the grace period time is set.

Parameters:

NameTypeDescription

newGracePeriodTime

uint32

The new grace period time value.

State variables info

gracePeriodTime (0xd5bd765c)

uint32 gracePeriodTime

sequencerUptimeFeed (0xa7264705)

address sequencerUptimeFeed

Functions info

setSequencerUptimeFeed (0xb8f44963)

function setSequencerUptimeFeed(
    address newSequencerUptimeFeed
) external onlyModerator

Sets proxy addresses for the L2 sequencer feeds. Caller must be the moderator.

Parameters:

NameTypeDescription

newSequencerUptimeFeed

address

The address of new SequencerUptimeFeed contract.

setGracePeriodTime (0x21b90245)

function setGracePeriodTime(uint32 newGracePeriodTime) external onlyModerator

Sets the grace period after the sequencer is backed up. Caller must be the moderator.

Parameters:

NameTypeDescription

newGracePeriodTime

uint32

The new grace period time value.

getLatestPrice (0x16345f18)

function getLatestPrice(
    address aggregatorPath_
) public view override returns (uint256 answer)

ReturnS the latest price after performing sanity check and staleness check.

Parameters:

NameTypeDescription

aggregatorPath_

address

The address of chainlink aggregator contract.

Return values:

NameTypeDescription

answer

uint256

The latest price (answer).

Last updated