Function getOraclePrecompileEthersV6Contract

Creates and returns a typed Ethers v6 contract instance for the Oracle precompile contract. This contract is used for interoperability between the EVM and Cosmos.

import { getOraclePrecompileEthersV6Contract } from '@sei-js/evm/ethers';
import { ethers } from 'ethers';

const provider = new ethers.BrowserProvider(window.ethereum); // or any other provider
const signer = await provider.getSigner();

const oraclePrecompileContract = getOraclePrecompileEthersV6Contract(signer);

const exchangeRates = await oraclePrecompileContract.getExchangeRates();
console.log('Exchange Rates:', exchangeRates);
  • Parameters

    • runner: ContractRunner

      A Provider (read-only) or ethers.Signer to use with the contract.

    Returns Contract

    The typed contract instance for interacting with the Oracle precompile contract.