XYOracleNetwork/clients

View on GitHub
packages/automation-witness-server/src/Jobs/EthereumGas/getDiviner.ts

Summary

Maintainability
A
2 hrs
Test Coverage
import type { DivinerInstance } from '@xyo-network/diviner-model'
import { EthereumGasDiviner, EthereumGasDivinerConfigSchema } from '@xyo-network/gas-price-plugin'

import { getAccount, WalletPaths } from '../../Account/index.js'

export const getDiviner = async (): Promise<DivinerInstance> => {
  return await EthereumGasDiviner.create({
    account: await getAccount(WalletPaths.EthereumGas.Diviner.Price),
    config: { schema: EthereumGasDivinerConfigSchema },
  })
}