-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathinterface.ts
81 lines (76 loc) · 1.6 KB
/
interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export interface ILog {
address: string;
data: string;
topics: string[];
logIndex: number;
transactionHash: string;
transactionIndex: number;
blockHash: string;
blockNumber: number;
}
export interface IEventLog {
event: string;
address: string;
returnValues: any;
logIndex: number;
transactionIndex: number;
transactionHash: string;
blockHash: string;
blockNumber: number;
raw?: { data: string; topics: string[] };
}
export interface ITransactionReceipt {
transactionHash: string;
transactionIndex: number;
blockHash: string;
blockNumber: number;
from: string;
to: string;
contractAddress: string;
cumulativeGasUsed: number;
gasUsed: number;
logs: ILog[];
events?: {
[eventName: string]: IEventLog;
};
status: boolean;
logsBloom: string;
root: string;
type: string;
}
export interface IBaseBlock {
size: number;
difficulty: number;
totalDifficulty: number;
uncles: string[];
number: number;
hash: string;
parentHash: string;
nonce: string;
sha3Uncles: string;
logsBloom: string;
transactionsRoot: string;
stateRoot: string;
receiptsRoot: string;
miner: string;
extraData: string;
gasLimit: number;
gasUsed: number;
timestamp: number | string;
}
export interface ITransactionData {
transactionHash: 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 interface IBlockWithTransaction extends IBaseBlock {
transactions: ITransactionData[];
}