ICommonOracleMiddleware

Git Source

Inherits: IBaseOracleMiddleware, IOracleMiddlewareErrors, IOracleMiddlewareEvents, IAccessControlDefaultAdminRules

This is the common middleware interface for all current middlewares.

Functions

ADMIN_ROLE

Gets the admin role's signature.

function ADMIN_ROLE() external pure returns (bytes32 role_);

Returns

NameTypeDescription
role_bytes32Get the role signature.

setChainlinkTimeElapsedLimit

Sets the elapsed time tolerated before we consider the price from Chainlink invalid.

function setChainlinkTimeElapsedLimit(uint256 newTimeElapsedLimit) external;

Parameters

NameTypeDescription
newTimeElapsedLimituint256The new time elapsed limit.

setPythRecentPriceDelay

Sets the amount of time after which we do not consider a price as recent.

function setPythRecentPriceDelay(uint64 newDelay) external;

Parameters

NameTypeDescription
newDelayuint64The maximum age of a price to be considered recent.

setValidationDelay

Sets the validation delay (in seconds) between an action timestamp and the price data timestamp used to validate that action.

function setValidationDelay(uint256 newValidationDelay) external;

Parameters

NameTypeDescription
newValidationDelayuint256The new validation delay.

setLowLatencyDelay

Sets the new low latency delay.

function setLowLatencyDelay(uint16 newLowLatencyDelay, IUsdnProtocol usdnProtocol) external;

Parameters

NameTypeDescription
newLowLatencyDelayuint16The new low latency delay.
usdnProtocolIUsdnProtocolThe address of the USDN protocol.

withdrawEther

Withdraws the ether balance of this contract.

This contract can receive funds but is not designed to hold them. So this function can be used if there's an error and funds remain after a call.

function withdrawEther(address to) external;

Parameters

NameTypeDescription
toaddressThe address to send the ether to.