UNPKG

@celo-tools/celo-ethers-wrapper

Version:

A minimal wrapper to make Ethers.JS compatible with the Celo network.

17 lines (16 loc) 793 B
import { FeeData, JsonRpcProvider, PerformActionRequest, TransactionResponse } from "ethers"; import { CeloTransactionRequest } from "./transactions"; export default class CeloProvider extends JsonRpcProvider { _perform(req: PerformActionRequest): Promise<any>; /** * Override to handle alternative gas currencies * prepareRequest in https://github.com/ethers-io/ethers.js/blob/master/packages/providers/src.ts/json-rpc-provider.ts */ getRpcRequest(req: PerformActionRequest): null | { method: string; args: Array<any>; }; estimateGas(_tx: CeloTransactionRequest): Promise<bigint>; getFeeData(feeCurrency?: string, denominateInCelo?: boolean): Promise<FeeData>; broadcastTransaction(signedTx: string): Promise<TransactionResponse>; }