-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.ts
60 lines (54 loc) · 1.16 KB
/
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
54
55
56
57
58
59
60
import type { Address } from "viem";
type CoingeckoSupportedChainId =
| 1
| 10
| 100
| 1088
| 250
| 42161
| 43114
| 713715
| 1329
| 42
| 42220;
export type TToken = {
code: string;
icon?: string;
address: Address;
decimals: number;
canVote: boolean;
priceSource?: { chainId: CoingeckoSupportedChainId; address: Address };
redstoneTokenId: string;
voteAmountCap?: bigint;
permitVersion?: string;
default?: boolean;
};
export type TSubscription = {
address: Address;
contractName: string;
fromBlock?: number;
eventsRenames?: Record<string, string> | undefined;
};
export type TChain = {
rpc: string;
blockExplorer: string;
name: string;
prettyName: string;
icon: string;
type: TNetworkType;
id: number;
contracts: TContracts;
pricesFromTimestamp?: number;
maxGetLogsRange?: number;
tokens: TToken[];
subscriptions: TSubscription[];
};
export type TContracts = {
multiRoundCheckout: Address;
quadraticFunding: Address;
directGrants: Address;
directAllocationPoolId?: number;
directAllocationStrategyAddress?: Address;
ensUniversalResolver?: Address
};
export type TNetworkType = "mainnet" | "testnet";