web3x
Version:
Typescript port of web3.js
52 lines (51 loc) • 1.54 kB
TypeScript
import { Address } from '../address';
import { LogResponse, RawLogResponse } from './log-response-formatter';
export interface RawTransactionReceipt {
transactionHash: string;
transactionIndex: string;
blockHash: string;
blockNumber: string;
from: string;
to?: string;
cumulativeGasUsed: string;
gasUsed: string;
contractAddress?: string;
logs?: RawLogResponse[];
status?: string;
}
export interface EventLog<ReturnValues, Name = string> {
id: string | null;
removed?: boolean;
event: Name;
address: Address;
returnValues: ReturnValues;
logIndex: number | null;
transactionIndex: number | null;
transactionHash: string | null;
blockHash: string | null;
blockNumber: number | null;
raw: {
data: string;
topics: string[];
};
signature: string | null;
}
export interface TransactionReceipt<Events = void> {
transactionHash: string;
transactionIndex: number;
blockHash: string;
blockNumber: number;
from: Address;
to?: Address;
cumulativeGasUsed: number;
gasUsed: number;
contractAddress?: Address;
logs?: LogResponse[];
anonymousLogs?: LogResponse[];
events?: Events extends void ? {
[eventName: string]: EventLog<any>[];
} : Events;
status?: boolean;
}
export declare function fromRawTransactionReceipt(receipt?: RawTransactionReceipt): TransactionReceipt | null;
export declare function toRawTransactionReceipt(receipt: TransactionReceipt): RawTransactionReceipt;