Skip to Content

Oracle Precompile

Address: 0x0000000000000000000000000000000000001008

This precompile enables EVM clients to query the Oracle module.

Functions

Queries

  • getExchangeRates: Gets the corresponding Sei Address from the given EVM Address

    /// Retrieves the exchange rates for all denominations. /// @return An array of denomination and exchange rate pairs. function getExchangeRates() external view returns (DenomOracleExchangeRatePair[] memory); // Structs struct OracleExchangeRate { string exchangeRate; string lastUpdate; int64 lastUpdateTimestamp; } struct DenomOracleExchangeRatePair { string denom; OracleExchangeRate oracleExchangeRateVal; }
  • getOracleTwaps: Retrieves Oracle Time-Weighted Average Prices (TWAPs) for the specified lookback period.

    /// Retrieves Oracle Time-Weighted Average Prices (TWAPs) for the specified lookback period. /// @param lookback_seconds The lookback period in seconds. /// @return An array of denomination and TWAP pairs. function getOracleTwaps( uint64 lookback_seconds) external view returns (OracleTwap[] memory); // Structs struct OracleTwap { string denom; string twap; int64 lookbackSeconds; }
View the Oracle precompile source code and the contract ABI here.
Last updated on