forked from DA0-DA0/dao-dao-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexer.ts
44 lines (40 loc) · 1.06 KB
/
indexer.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
import { ContractVersionInfo } from './contracts'
import {
Config,
DumpStateResponse,
ProposalModuleWithInfo,
} from './contracts/DaoCore.v2'
export enum IndexerFormulaType {
Contract = 'contract',
Generic = 'generic',
Validator = 'validator',
Wallet = 'wallet',
}
export interface IndexerDumpState
extends Omit<DumpStateResponse, 'proposal_modules'> {
proposal_modules: ProposalModuleWithInfo[]
votingModuleInfo: ContractVersionInfo
createdAt: string // UTC string
adminInfo?: {
admin?: string
config: Config
info?: ContractVersionInfo
// Check if it has this current DAO as a SubDAO.
registeredSubDao?: boolean
} | null
proposalCount?: number
// Map polytone note address to remote address.
polytoneProxies?: Record<string, string>
// Hide from search if storage item `hideFromSearch` exists.
hideFromSearch?: boolean
}
export type IndexerUpBlock = {
height: number
timeUnixMs: number
timestamp: string
}
export type IndexerUpStatus = {
chainBlock: IndexerUpBlock
indexerBlock: IndexerUpBlock
caughtUp: boolean
}