2021-07-05 03:03:01 +00:00
|
|
|
import { ethers, BigNumber } from "ethers";
|
2021-07-01 18:21:40 +00:00
|
|
|
|
|
|
|
export type ProcessedTransaction = {
|
|
|
|
blockNumber: number;
|
|
|
|
timestamp: number;
|
2021-07-05 03:03:01 +00:00
|
|
|
miner?: string;
|
2021-07-01 18:21:40 +00:00
|
|
|
idx: number;
|
|
|
|
hash: string;
|
|
|
|
from?: string;
|
|
|
|
to?: string;
|
|
|
|
value: BigNumber;
|
|
|
|
fee: BigNumber;
|
|
|
|
gasPrice: BigNumber;
|
|
|
|
data: string;
|
|
|
|
status: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TransactionChunk = {
|
|
|
|
txs: ProcessedTransaction[];
|
|
|
|
firstPage: boolean;
|
|
|
|
lastPage: boolean;
|
|
|
|
};
|
2021-07-03 00:40:02 +00:00
|
|
|
|
|
|
|
export type ENSReverseCache = {
|
|
|
|
[address: string]: string;
|
|
|
|
};
|
2021-07-05 03:03:01 +00:00
|
|
|
|
|
|
|
export type TransactionData = {
|
|
|
|
transactionHash: string;
|
|
|
|
status: boolean;
|
|
|
|
blockNumber: number;
|
|
|
|
transactionIndex: number;
|
|
|
|
confirmations: number;
|
|
|
|
timestamp: number;
|
|
|
|
miner?: string;
|
|
|
|
from: string;
|
|
|
|
to: string;
|
|
|
|
value: BigNumber;
|
|
|
|
tokenTransfers: TokenTransfer[];
|
|
|
|
tokenMetas: TokenMetas;
|
|
|
|
fee: BigNumber;
|
|
|
|
gasPrice: BigNumber;
|
|
|
|
gasLimit: BigNumber;
|
|
|
|
gasUsed: BigNumber;
|
|
|
|
gasUsedPerc: number;
|
|
|
|
nonce: number;
|
|
|
|
data: string;
|
|
|
|
logs: ethers.providers.Log[];
|
|
|
|
};
|
|
|
|
|
|
|
|
export type From = {
|
|
|
|
current: string;
|
|
|
|
depth: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Transfer = {
|
|
|
|
from: string;
|
|
|
|
to: string;
|
|
|
|
value: BigNumber;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TokenTransfer = {
|
|
|
|
token: string;
|
|
|
|
from: string;
|
|
|
|
to: string;
|
|
|
|
value: BigNumber;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TokenMeta = {
|
|
|
|
name: string;
|
|
|
|
symbol: string;
|
|
|
|
decimals: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TokenMetas = {
|
|
|
|
[tokenAddress: string]: TokenMeta;
|
|
|
|
};
|