forked from wevm/references
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
53 lines (48 loc) · 996 Bytes
/
types.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
type Address = `0x${string}`
type BlockExplorer = {
name: string
url: string
}
export type Chain = {
/** ID in number form */
id: number
/** Human-readable name */
name: string
/** Internal network name */
network: string
/** Currency used by chain */
nativeCurrency: NativeCurrency
/** Collection of RPC endpoints */
rpcUrls: {
[key: string]: RpcUrls
default: RpcUrls
public: RpcUrls
}
/** Collection of block explorers */
blockExplorers?: {
[key: string]: BlockExplorer
default: BlockExplorer
}
/** Collection of contracts */
contracts?: {
ensRegistry?: Contract
ensUniversalResolver?: Contract
multicall3?: Contract
}
/** Flag for test networks */
testnet?: boolean
}
type Contract = {
address: Address
blockCreated?: number
}
type NativeCurrency = {
name: string
/** 2-6 characters long */
symbol: string
decimals: number
}
type RpcUrls = {
http: readonly string[]
webSocket?: readonly string[]
}