-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathtypes.ts
More file actions
76 lines (69 loc) · 1.7 KB
/
Copy pathtypes.ts
File metadata and controls
76 lines (69 loc) · 1.7 KB
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
import type { providers } from 'ethers';
// TODO consider reconciling with SDK's MessageStatus
export enum MessageStatus {
Unknown = 'unknown',
Pending = 'pending',
Delivered = 'delivered',
Failing = 'failing',
}
export interface MessageTxStub {
timestamp: number;
hash: string;
from: Address;
}
export interface MessageTx extends MessageTxStub {
to: Address;
blockHash: string;
blockNumber: number;
mailbox: Address;
nonce: number;
gasLimit: number;
gasPrice: number;
effectiveGasPrice;
gasUsed: number;
cumulativeGasUsed: number;
maxFeePerGas: number;
maxPriorityPerGas: number;
}
export interface MessageStub {
status: MessageStatus;
id: string; // Database id
msgId: string; // Message hash
nonce: number; // formerly leafIndex
sender: Address;
recipient: Address;
originChainId: ChainId;
originDomainId: number;
destinationChainId: ChainId;
destinationDomainId: number;
origin: MessageTxStub;
destination?: MessageTxStub;
isPiMsg?: boolean;
}
export interface Message extends MessageStub {
body: string;
decodedBody?: string;
origin: MessageTx;
destination?: MessageTx;
totalGasAmount?: string;
totalPayment?: string;
numPayments?: number;
}
export interface ExtendedLog extends providers.Log {
timestamp?: number;
from?: Address;
to?: Address;
}
// Type of body for tenderly POST requests https://docs.tenderly.co/simulations-and-forks/simulation-api/using-simulation-api
export interface SimulateBody {
save: boolean;
save_if_fails: boolean;
simulation_type: string;
network_id: ChainId;
from: Address; //can be any address, doesn't matter
to: Address;
input: string;
gas: number;
gas_price: number | null;
value: number;
}