import { RPC_CALLS } from '../eth/constants'; export type RpcCallNames = keyof typeof RPC_CALLS; export type RPCPayload
= {
call: RpcCallNames;
params: P | unknown[];
};
export interface Log {
address: string;
data: string;
topics: string[];
logIndex: number;
transactionIndex: number;
transactionHash: string;
blockHash: string;
blockNumber: number;
}
export interface Web3TransactionReceiptObject {
transactionHash: string;
transactionIndex: number;
blockHash: string;
blockNumber: number;
from: string;
to: string | null;
cumulativeGasUsed: number;
gasUsed: number;
contractAddress: string;
logs: Log[];
logsBloom: string;
status: number | undefined;
}
export interface Web3TransactionObject {
hash: string;
nonce: number;
blockHash: string | null;
blockNumber: number | null;
transactionIndex: number | null;
from: string;
to: string | null;
value: string;
gasPrice: string;
gas: number;
input: string;
}
export type BlockNumberArg = number | 'earliest' | 'latest' | 'pending';
export interface PastLogsOptions {
fromBlock?: BlockNumberArg;
toBlock?: BlockNumberArg;
address?: string;
topics?: Array