import { LogParams, TransactionReceiptParams } from 'ethers/providers'; import { LogDescription, Result, DeferredTopicFilter, BlockParams, Interface, Contract, Addressable, InterfaceAbi, ContractRunner } from 'ethers'; import { ContractContext } from './context.js'; import { EthCallContext, EthCallParam } from '@sentio/protos'; export interface IResult { /** * Returns the Result as a normal Array. */ toArray(): Array; /** * Returns the Result as an Object with each name-value pair. */ toObject(): Record; } export interface TypedEvent = any, TArgsObject = any> extends LogParams { args: TArgsObject & IResult; name: string; } export type TypedEventFilter<_TEvent extends TypedEvent> = DeferredTopicFilter; export interface RichBlock extends BlockParams { traces?: Trace[]; transactionReceipts?: TransactionReceiptParams[]; } export declare class SimpleEthersError extends Error { e: Error; constructor(message: string, e: Error, stack?: string); toString(): string; } export declare function transformEtherError(e: Error, ctx: ContractContext | undefined, stack?: string): Error; export declare function fixEmptyKey(result: LogDescription): Result; export declare function formatEthData(data: { log?: any; block?: any; trace?: any; transaction?: any; transactionReceipt?: any; __formattedEthData?: any; }): any; export declare function formatRichBlock(block: RichBlock): RichBlock; export interface TypedCallTrace = any, TArgsObject = any> extends Trace { args: TArgsObject & IResult; name: string; functionSignature: string; } export interface Trace { action: TraceAction; blockHash: string; blockNumber: number; result: TraceResult; subtraces: number; traceAddress: number[]; transactionHash: string; transactionPosition: number; type: string; error?: string; } export interface TraceAction { from: string; to?: string; value: number; gas: number; input?: string; callType?: string; init?: string; address?: string; balance?: string; refundAddress?: string; } export interface TraceResult { gasUsed: number; output?: string; address?: string; code?: string; } export declare function isNullAddress(address: string): boolean; export declare function validateAndNormalizeAddress(address: string): string; export declare function encodeCallData(context: EthCallContext, name: string, funcABI: string, values?: ReadonlyArray): EthCallParam; export declare function newContract(target: string | Addressable, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined): Contract; export declare function newInterface(fragments: InterfaceAbi): Interface; //# sourceMappingURL=eth.d.ts.map