@gzeoneth/gov-tracker 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -11
- package/dist/abis-json.d.ts +2315 -0
- package/dist/abis-json.d.ts.map +1 -0
- package/dist/abis-json.js +3207 -0
- package/dist/abis-json.js.map +1 -0
- package/dist/abis.d.ts +12 -7
- package/dist/abis.d.ts.map +1 -1
- package/dist/abis.js +32 -1
- package/dist/abis.js.map +1 -1
- package/dist/calldata/decoder.d.ts.map +1 -1
- package/dist/calldata/decoder.js +33 -28
- package/dist/calldata/decoder.js.map +1 -1
- package/dist/calldata/parameter-decoder.d.ts.map +1 -1
- package/dist/calldata/parameter-decoder.js +19 -25
- package/dist/calldata/parameter-decoder.js.map +1 -1
- package/dist/calldata/retryable-ticket.d.ts +2 -2
- package/dist/calldata/retryable-ticket.d.ts.map +1 -1
- package/dist/calldata/retryable-ticket.js +17 -12
- package/dist/calldata/retryable-ticket.js.map +1 -1
- package/dist/calldata/signature-lookup.js +5 -4
- package/dist/calldata/signature-lookup.js.map +1 -1
- package/dist/cli/cli.js +112 -20
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/lib/cli.d.ts +4 -2
- package/dist/cli/lib/cli.d.ts.map +1 -1
- package/dist/cli/lib/cli.js +34 -18
- package/dist/cli/lib/cli.js.map +1 -1
- package/dist/cli/lib/election-check.d.ts.map +1 -1
- package/dist/cli/lib/election-check.js +2 -1
- package/dist/cli/lib/election-check.js.map +1 -1
- package/dist/cli/lib/json-state.js +1 -1
- package/dist/cli/lib/json-state.js.map +1 -1
- package/dist/cli/tui/components/StageProgress.js +1 -1
- package/dist/cli/tui/components/StageProgress.js.map +1 -1
- package/dist/cli/tui/components/StageRow.d.ts.map +1 -1
- package/dist/cli/tui/components/StageRow.js +15 -20
- package/dist/cli/tui/components/StageRow.js.map +1 -1
- package/dist/cli/tui/components/VotingStats.d.ts.map +1 -1
- package/dist/cli/tui/components/VotingStats.js +2 -1
- package/dist/cli/tui/components/VotingStats.js.map +1 -1
- package/dist/cli/tui/hooks/useCache.d.ts.map +1 -1
- package/dist/cli/tui/hooks/useCache.js +2 -1
- package/dist/cli/tui/hooks/useCache.js.map +1 -1
- package/dist/cli/tui/hooks/useElectionData.d.ts.map +1 -1
- package/dist/cli/tui/hooks/useElectionData.js +3 -2
- package/dist/cli/tui/hooks/useElectionData.js.map +1 -1
- package/dist/cli/tui/hooks/useNavigation.d.ts.map +1 -1
- package/dist/cli/tui/hooks/useNavigation.js +2 -3
- package/dist/cli/tui/hooks/useNavigation.js.map +1 -1
- package/dist/cli/tui/hooks/useProposals.d.ts.map +1 -1
- package/dist/cli/tui/hooks/useProposals.js +26 -36
- package/dist/cli/tui/hooks/useProposals.js.map +1 -1
- package/dist/cli/tui/hooks/useStageCalldata.d.ts.map +1 -1
- package/dist/cli/tui/hooks/useStageCalldata.js +2 -1
- package/dist/cli/tui/hooks/useStageCalldata.js.map +1 -1
- package/dist/cli/tui/utils/index.d.ts +7 -7
- package/dist/cli/tui/utils/index.d.ts.map +1 -1
- package/dist/cli/tui/utils/index.js +18 -13
- package/dist/cli/tui/utils/index.js.map +1 -1
- package/dist/cli/tui/utils/markdown-parser.d.ts +5 -0
- package/dist/cli/tui/utils/markdown-parser.d.ts.map +1 -1
- package/dist/cli/tui/utils/markdown-parser.js +16 -0
- package/dist/cli/tui/utils/markdown-parser.js.map +1 -1
- package/dist/cli/tui/utils/navigation.d.ts +1 -0
- package/dist/cli/tui/utils/navigation.d.ts.map +1 -1
- package/dist/cli/tui/utils/navigation.js +9 -5
- package/dist/cli/tui/utils/navigation.js.map +1 -1
- package/dist/cli/tui/utils/proposal-detail-helpers.js +6 -6
- package/dist/cli/tui/utils/proposal-detail-helpers.js.map +1 -1
- package/dist/cli/tui/utils/stage-status.d.ts +4 -0
- package/dist/cli/tui/utils/stage-status.d.ts.map +1 -1
- package/dist/cli/tui/utils/stage-status.js +47 -1
- package/dist/cli/tui/utils/stage-status.js.map +1 -1
- package/dist/cli/tui/utils/time.d.ts +4 -4
- package/dist/cli/tui/utils/time.d.ts.map +1 -1
- package/dist/cli/tui/utils/time.js +13 -11
- package/dist/cli/tui/utils/time.js.map +1 -1
- package/dist/cli/tui/views/CalldataView.d.ts.map +1 -1
- package/dist/cli/tui/views/CalldataView.js +3 -2
- package/dist/cli/tui/views/CalldataView.js.map +1 -1
- package/dist/cli/tui/views/DescriptionView.d.ts.map +1 -1
- package/dist/cli/tui/views/DescriptionView.js +4 -2
- package/dist/cli/tui/views/DescriptionView.js.map +1 -1
- package/dist/cli/tui/views/ElectionView.d.ts.map +1 -1
- package/dist/cli/tui/views/ElectionView.js +4 -9
- package/dist/cli/tui/views/ElectionView.js.map +1 -1
- package/dist/constants.d.ts +54 -23
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +78 -21
- package/dist/constants.js.map +1 -1
- package/dist/data/bundled-cache.json +393 -20
- package/dist/data/delegate-cache.json +118014 -0
- package/dist/deduplication.d.ts.map +1 -1
- package/dist/deduplication.js +34 -54
- package/dist/deduplication.js.map +1 -1
- package/dist/delegates/cache.d.ts +44 -0
- package/dist/delegates/cache.d.ts.map +1 -0
- package/dist/delegates/cache.js +202 -0
- package/dist/delegates/cache.js.map +1 -0
- package/dist/delegates/index.d.ts +13 -0
- package/dist/delegates/index.d.ts.map +1 -0
- package/dist/delegates/index.js +32 -0
- package/dist/delegates/index.js.map +1 -0
- package/dist/delegates/indexer.d.ts +32 -0
- package/dist/delegates/indexer.d.ts.map +1 -0
- package/dist/delegates/indexer.js +191 -0
- package/dist/delegates/indexer.js.map +1 -0
- package/dist/delegates/queries.d.ts +30 -0
- package/dist/delegates/queries.d.ts.map +1 -0
- package/dist/delegates/queries.js +79 -0
- package/dist/delegates/queries.js.map +1 -0
- package/dist/discovery/governor-discovery.d.ts +21 -1
- package/dist/discovery/governor-discovery.d.ts.map +1 -1
- package/dist/discovery/governor-discovery.js +47 -13
- package/dist/discovery/governor-discovery.js.map +1 -1
- package/dist/discovery/timelock-discovery.d.ts.map +1 -1
- package/dist/discovery/timelock-discovery.js +27 -30
- package/dist/discovery/timelock-discovery.js.map +1 -1
- package/dist/election/contracts.d.ts.map +1 -1
- package/dist/election/contracts.js +4 -1
- package/dist/election/contracts.js.map +1 -1
- package/dist/election/details.d.ts.map +1 -1
- package/dist/election/details.js +7 -3
- package/dist/election/details.js.map +1 -1
- package/dist/election/index.d.ts +3 -1
- package/dist/election/index.d.ts.map +1 -1
- package/dist/election/index.js +12 -1
- package/dist/election/index.js.map +1 -1
- package/dist/election/params.d.ts.map +1 -1
- package/dist/election/params.js +14 -28
- package/dist/election/params.js.map +1 -1
- package/dist/election/participants.d.ts.map +1 -1
- package/dist/election/participants.js +21 -26
- package/dist/election/participants.js.map +1 -1
- package/dist/election/proposal-ids.js +19 -22
- package/dist/election/proposal-ids.js.map +1 -1
- package/dist/election/status.d.ts +28 -1
- package/dist/election/status.d.ts.map +1 -1
- package/dist/election/status.js +116 -3
- package/dist/election/status.js.map +1 -1
- package/dist/election/write.d.ts +132 -0
- package/dist/election/write.d.ts.map +1 -0
- package/dist/election/write.js +184 -0
- package/dist/election/write.js.map +1 -0
- package/dist/governance/index.d.ts +5 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +28 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/read.d.ts +50 -0
- package/dist/governance/read.d.ts.map +1 -0
- package/dist/governance/read.js +194 -0
- package/dist/governance/read.js.map +1 -0
- package/dist/governance/write.d.ts +54 -0
- package/dist/governance/write.d.ts.map +1 -0
- package/dist/governance/write.js +132 -0
- package/dist/governance/write.js.map +1 -0
- package/dist/index.d.ts +40 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +149 -15
- package/dist/index.js.map +1 -1
- package/dist/simulation/index.d.ts +4 -1
- package/dist/simulation/index.d.ts.map +1 -1
- package/dist/simulation/index.js +5 -1
- package/dist/simulation/index.js.map +1 -1
- package/dist/simulation/simulation-data.d.ts +33 -2
- package/dist/simulation/simulation-data.d.ts.map +1 -1
- package/dist/simulation/simulation-data.js +68 -24
- package/dist/simulation/simulation-data.js.map +1 -1
- package/dist/simulation/tenderly-payloads.d.ts +107 -0
- package/dist/simulation/tenderly-payloads.d.ts.map +1 -0
- package/dist/simulation/tenderly-payloads.js +103 -0
- package/dist/simulation/tenderly-payloads.js.map +1 -0
- package/dist/stages/l2-to-l1-message.d.ts.map +1 -1
- package/dist/stages/l2-to-l1-message.js +43 -63
- package/dist/stages/l2-to-l1-message.js.map +1 -1
- package/dist/stages/proposal-queued.js.map +1 -1
- package/dist/stages/retryables.d.ts.map +1 -1
- package/dist/stages/retryables.js +10 -9
- package/dist/stages/retryables.js.map +1 -1
- package/dist/stages/timelock.d.ts +43 -3
- package/dist/stages/timelock.d.ts.map +1 -1
- package/dist/stages/timelock.js +170 -53
- package/dist/stages/timelock.js.map +1 -1
- package/dist/stages/utils.d.ts +56 -1
- package/dist/stages/utils.d.ts.map +1 -1
- package/dist/stages/utils.js +146 -30
- package/dist/stages/utils.js.map +1 -1
- package/dist/tracker/bundled-cache.d.ts +136 -0
- package/dist/tracker/bundled-cache.d.ts.map +1 -0
- package/dist/tracker/bundled-cache.js +207 -0
- package/dist/tracker/bundled-cache.js.map +1 -0
- package/dist/tracker/checkpoint-helpers.d.ts +20 -1
- package/dist/tracker/checkpoint-helpers.d.ts.map +1 -1
- package/dist/tracker/checkpoint-helpers.js +41 -7
- package/dist/tracker/checkpoint-helpers.js.map +1 -1
- package/dist/tracker/discovery.d.ts +3 -0
- package/dist/tracker/discovery.d.ts.map +1 -1
- package/dist/tracker/discovery.js +59 -34
- package/dist/tracker/discovery.js.map +1 -1
- package/dist/tracker/pipeline.d.ts +3 -10
- package/dist/tracker/pipeline.d.ts.map +1 -1
- package/dist/tracker/pipeline.js +18 -32
- package/dist/tracker/pipeline.js.map +1 -1
- package/dist/tracker/query.d.ts +1 -0
- package/dist/tracker/query.d.ts.map +1 -1
- package/dist/tracker/query.js +28 -36
- package/dist/tracker/query.js.map +1 -1
- package/dist/tracker/state.d.ts +3 -2
- package/dist/tracker/state.d.ts.map +1 -1
- package/dist/tracker/state.js +5 -4
- package/dist/tracker/state.js.map +1 -1
- package/dist/tracker.d.ts +33 -11
- package/dist/tracker.d.ts.map +1 -1
- package/dist/tracker.js +76 -43
- package/dist/tracker.js.map +1 -1
- package/dist/types/config.d.ts +39 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/delegates.d.ts +55 -0
- package/dist/types/delegates.d.ts.map +1 -0
- package/dist/types/delegates.js +9 -0
- package/dist/types/delegates.js.map +1 -0
- package/dist/types/election.d.ts +23 -0
- package/dist/types/election.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/simulation.d.ts +2 -2
- package/dist/types/simulation.d.ts.map +1 -1
- package/dist/types/tracking.d.ts +2 -2
- package/dist/types/tracking.d.ts.map +1 -1
- package/dist/utils/chain.d.ts +5 -1
- package/dist/utils/chain.d.ts.map +1 -1
- package/dist/utils/chain.js +7 -0
- package/dist/utils/chain.js.map +1 -1
- package/dist/utils/formatters.d.ts +2 -6
- package/dist/utils/formatters.d.ts.map +1 -1
- package/dist/utils/formatters.js +9 -12
- package/dist/utils/formatters.js.map +1 -1
- package/dist/utils/log-filters.js +1 -1
- package/dist/utils/log-filters.js.map +1 -1
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +2 -0
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/multicall.d.ts +0 -1
- package/dist/utils/multicall.d.ts.map +1 -1
- package/dist/utils/rpc-utils.d.ts +5 -0
- package/dist/utils/rpc-utils.d.ts.map +1 -1
- package/dist/utils/rpc-utils.js +9 -1
- package/dist/utils/rpc-utils.js.map +1 -1
- package/dist/utils/stage-metadata.d.ts +19 -0
- package/dist/utils/stage-metadata.d.ts.map +1 -1
- package/dist/utils/stage-metadata.js +44 -0
- package/dist/utils/stage-metadata.js.map +1 -1
- package/dist/utils/timing.d.ts +3 -10
- package/dist/utils/timing.d.ts.map +1 -1
- package/dist/utils/timing.js +9 -22
- package/dist/utils/timing.js.map +1 -1
- package/package.json +7 -3
- package/dist/cli/tui/utils/calldata-formatter.d.ts +0 -7
- package/dist/cli/tui/utils/calldata-formatter.d.ts.map +0 -1
- package/dist/cli/tui/utils/calldata-formatter.js +0 -14
- package/dist/cli/tui/utils/calldata-formatter.js.map +0 -1
- package/dist/cli/tui/utils/stage-formatter.d.ts +0 -7
- package/dist/cli/tui/utils/stage-formatter.d.ts.map +0 -1
- package/dist/cli/tui/utils/stage-formatter.js +0 -13
- package/dist/cli/tui/utils/stage-formatter.js.map +0 -1
- package/dist/cli/tui/utils/text.d.ts +0 -7
- package/dist/cli/tui/utils/text.d.ts.map +0 -1
- package/dist/cli/tui/utils/text.js +0 -12
- package/dist/cli/tui/utils/text.js.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Governance read helpers for wagmi/viem consumers.
|
|
3
|
+
*
|
|
4
|
+
* Each function returns a plain object compatible with wagmi's
|
|
5
|
+
* `useReadContract` and `useReadContracts` (multicall) hooks:
|
|
6
|
+
*
|
|
7
|
+
* @example Single read
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { readProposalState } from "@gzeoneth/gov-tracker";
|
|
10
|
+
* const { data } = useReadContract(readProposalState(proposalId));
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @example Batched reads (multicall)
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const { data } = useReadContracts({
|
|
16
|
+
* contracts: delegates.map(d => readVotingPower(d, snapshotBlock)),
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import type { GovernorTarget } from "./write";
|
|
21
|
+
/**
|
|
22
|
+
* Shape compatible with wagmi's useReadContract parameters.
|
|
23
|
+
* Consumers pass this directly: `useReadContract(readProposalState(id))`.
|
|
24
|
+
*/
|
|
25
|
+
export interface ReadContractParameters {
|
|
26
|
+
address: `0x${string}`;
|
|
27
|
+
abi: readonly Record<string, unknown>[];
|
|
28
|
+
functionName: string;
|
|
29
|
+
args: readonly unknown[];
|
|
30
|
+
chainId?: number;
|
|
31
|
+
}
|
|
32
|
+
type GovernorAddress = GovernorTarget | `0x${string}`;
|
|
33
|
+
export declare function readProposalState(proposalId: bigint | string, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
34
|
+
export declare function readProposalVotes(proposalId: bigint | string, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
35
|
+
export declare function readProposalSnapshot(proposalId: bigint | string, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
36
|
+
export declare function readProposalDeadline(proposalId: bigint | string, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
37
|
+
export declare function readQuorum(blockNumber: bigint | number, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
38
|
+
export declare function readVotingPower(account: `0x${string}` | string, blockNumber: bigint | number, tokenAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
39
|
+
export declare function readGetVotes(account: `0x${string}` | string, blockNumber: bigint | number, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
40
|
+
export declare function readHasVoted(proposalId: bigint | string, account: `0x${string}` | string, governor?: GovernorAddress, chainId?: number): ReadContractParameters;
|
|
41
|
+
export declare function readCurrentVotingPower(account: `0x${string}` | string, tokenAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
42
|
+
export declare function readDelegate(account: `0x${string}` | string, tokenAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
43
|
+
export declare function readNomineeElectionState(proposalId: bigint | string, governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
44
|
+
export declare function readMemberElectionState(proposalId: bigint | string, governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
45
|
+
export declare function readElectionCount(governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
46
|
+
export declare function readVotesUsed(proposalId: bigint | string, account: `0x${string}` | string, governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
47
|
+
export declare function readIsContender(proposalId: bigint | string, account: `0x${string}` | string, governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
48
|
+
export declare function readGovernorName(governorAddress?: `0x${string}` | string, chainId?: number): ReadContractParameters;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/governance/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,GAAG,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,eAAe,GAAG,cAAc,GAAG,KAAK,MAAM,EAAE,CAAC;AAMtD,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,QAAQ,CAAC,EAAE,eAAe,EAC1B,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,QAAQ,CAAC,EAAE,eAAe,EAC1B,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,oBAAoB,CAClC,UA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AE,GAAG,MAA4B,EAC1D,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAMD,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA4C,EAC7E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA2C,EAC5E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,iBAAiB,CAC/B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA4C,EAC7E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,EAC/B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA4C,EAC7E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,EAC/B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA4C,EAC7E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB;AAED,wBAAgB,gBAAgB,CAC9B,eAAe,GAAE,KAAK,MAAM,EAAE,GAAG,MAA4C,EAC7E,OAAO,GAAE,MAA0B,GAClC,sBAAsB,CAQxB"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Governance read helpers for wagmi/viem consumers.
|
|
4
|
+
*
|
|
5
|
+
* Each function returns a plain object compatible with wagmi's
|
|
6
|
+
* `useReadContract` and `useReadContracts` (multicall) hooks:
|
|
7
|
+
*
|
|
8
|
+
* @example Single read
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { readProposalState } from "@gzeoneth/gov-tracker";
|
|
11
|
+
* const { data } = useReadContract(readProposalState(proposalId));
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @example Batched reads (multicall)
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const { data } = useReadContracts({
|
|
17
|
+
* contracts: delegates.map(d => readVotingPower(d, snapshotBlock)),
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.readProposalState = readProposalState;
|
|
23
|
+
exports.readProposalVotes = readProposalVotes;
|
|
24
|
+
exports.readProposalSnapshot = readProposalSnapshot;
|
|
25
|
+
exports.readProposalDeadline = readProposalDeadline;
|
|
26
|
+
exports.readQuorum = readQuorum;
|
|
27
|
+
exports.readVotingPower = readVotingPower;
|
|
28
|
+
exports.readGetVotes = readGetVotes;
|
|
29
|
+
exports.readHasVoted = readHasVoted;
|
|
30
|
+
exports.readCurrentVotingPower = readCurrentVotingPower;
|
|
31
|
+
exports.readDelegate = readDelegate;
|
|
32
|
+
exports.readNomineeElectionState = readNomineeElectionState;
|
|
33
|
+
exports.readMemberElectionState = readMemberElectionState;
|
|
34
|
+
exports.readElectionCount = readElectionCount;
|
|
35
|
+
exports.readVotesUsed = readVotesUsed;
|
|
36
|
+
exports.readIsContender = readIsContender;
|
|
37
|
+
exports.readGovernorName = readGovernorName;
|
|
38
|
+
const constants_1 = require("../constants");
|
|
39
|
+
const abis_json_1 = require("../abis-json");
|
|
40
|
+
const write_1 = require("./write");
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Governor reads
|
|
43
|
+
// ============================================================================
|
|
44
|
+
function readProposalState(proposalId, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
45
|
+
return {
|
|
46
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
47
|
+
abi: abis_json_1.governorReadAbi,
|
|
48
|
+
functionName: "state",
|
|
49
|
+
args: [BigInt(proposalId)],
|
|
50
|
+
chainId,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function readProposalVotes(proposalId, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
54
|
+
return {
|
|
55
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
56
|
+
abi: abis_json_1.governorReadAbi,
|
|
57
|
+
functionName: "proposalVotes",
|
|
58
|
+
args: [BigInt(proposalId)],
|
|
59
|
+
chainId,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function readProposalSnapshot(proposalId, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
63
|
+
return {
|
|
64
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
65
|
+
abi: abis_json_1.governorReadAbi,
|
|
66
|
+
functionName: "proposalSnapshot",
|
|
67
|
+
args: [BigInt(proposalId)],
|
|
68
|
+
chainId,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function readProposalDeadline(proposalId, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
72
|
+
return {
|
|
73
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
74
|
+
abi: abis_json_1.governorReadAbi,
|
|
75
|
+
functionName: "proposalDeadline",
|
|
76
|
+
args: [BigInt(proposalId)],
|
|
77
|
+
chainId,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function readQuorum(blockNumber, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
81
|
+
return {
|
|
82
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
83
|
+
abi: abis_json_1.governorReadAbi,
|
|
84
|
+
functionName: "quorum",
|
|
85
|
+
args: [BigInt(blockNumber)],
|
|
86
|
+
chainId,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
// ============================================================================
|
|
90
|
+
// Token / voting power reads
|
|
91
|
+
// ============================================================================
|
|
92
|
+
function readVotingPower(account, blockNumber, tokenAddress = constants_1.ADDRESSES.ARB_TOKEN, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
93
|
+
return {
|
|
94
|
+
address: tokenAddress,
|
|
95
|
+
abi: abis_json_1.erc20VotesAbi,
|
|
96
|
+
functionName: "getPastVotes",
|
|
97
|
+
args: [account, BigInt(blockNumber)],
|
|
98
|
+
chainId,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function readGetVotes(account, blockNumber, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
102
|
+
return {
|
|
103
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
104
|
+
abi: abis_json_1.governorReadAbi,
|
|
105
|
+
functionName: "getVotes",
|
|
106
|
+
args: [account, BigInt(blockNumber)],
|
|
107
|
+
chainId,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function readHasVoted(proposalId, account, governor, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
111
|
+
return {
|
|
112
|
+
address: (0, write_1.resolveGovernorAddress)(governor),
|
|
113
|
+
abi: abis_json_1.governorReadAbi,
|
|
114
|
+
functionName: "hasVoted",
|
|
115
|
+
args: [BigInt(proposalId), account],
|
|
116
|
+
chainId,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function readCurrentVotingPower(account, tokenAddress = constants_1.ADDRESSES.ARB_TOKEN, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
120
|
+
return {
|
|
121
|
+
address: tokenAddress,
|
|
122
|
+
abi: abis_json_1.erc20VotesAbi,
|
|
123
|
+
functionName: "getVotes",
|
|
124
|
+
args: [account],
|
|
125
|
+
chainId,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function readDelegate(account, tokenAddress = constants_1.ADDRESSES.ARB_TOKEN, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
129
|
+
return {
|
|
130
|
+
address: tokenAddress,
|
|
131
|
+
abi: abis_json_1.erc20VotesAbi,
|
|
132
|
+
functionName: "delegates",
|
|
133
|
+
args: [account],
|
|
134
|
+
chainId,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
// ============================================================================
|
|
138
|
+
// Election reads
|
|
139
|
+
// ============================================================================
|
|
140
|
+
function readNomineeElectionState(proposalId, governorAddress = constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
141
|
+
return {
|
|
142
|
+
address: governorAddress,
|
|
143
|
+
abi: abis_json_1.nomineeElectionGovernorReadAbi,
|
|
144
|
+
functionName: "state",
|
|
145
|
+
args: [BigInt(proposalId)],
|
|
146
|
+
chainId,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function readMemberElectionState(proposalId, governorAddress = constants_1.ADDRESSES.ELECTION_MEMBER_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
150
|
+
return {
|
|
151
|
+
address: governorAddress,
|
|
152
|
+
abi: abis_json_1.memberElectionGovernorReadAbi,
|
|
153
|
+
functionName: "state",
|
|
154
|
+
args: [BigInt(proposalId)],
|
|
155
|
+
chainId,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function readElectionCount(governorAddress = constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
159
|
+
return {
|
|
160
|
+
address: governorAddress,
|
|
161
|
+
abi: abis_json_1.nomineeElectionGovernorReadAbi,
|
|
162
|
+
functionName: "electionCount",
|
|
163
|
+
args: [],
|
|
164
|
+
chainId,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function readVotesUsed(proposalId, account, governorAddress = constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
168
|
+
return {
|
|
169
|
+
address: governorAddress,
|
|
170
|
+
abi: abis_json_1.nomineeElectionGovernorReadAbi,
|
|
171
|
+
functionName: "votesUsed",
|
|
172
|
+
args: [BigInt(proposalId), account],
|
|
173
|
+
chainId,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function readIsContender(proposalId, account, governorAddress = constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
177
|
+
return {
|
|
178
|
+
address: governorAddress,
|
|
179
|
+
abi: abis_json_1.nomineeElectionGovernorReadAbi,
|
|
180
|
+
functionName: "isContender",
|
|
181
|
+
args: [BigInt(proposalId), account],
|
|
182
|
+
chainId,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function readGovernorName(governorAddress = constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
186
|
+
return {
|
|
187
|
+
address: governorAddress,
|
|
188
|
+
abi: abis_json_1.nomineeElectionGovernorReadAbi,
|
|
189
|
+
functionName: "name",
|
|
190
|
+
args: [],
|
|
191
|
+
chainId,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/governance/read.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;AA8BH,8CAYC;AAED,8CAYC;AAED,oDAYC;AAED,oDAYC;AAED,gCAYC;AAMD,0CAaC;AAED,oCAaC;AAED,oCAaC;AAED,wDAYC;AAED,oCAYC;AAMD,4DAYC;AAED,0DAYC;AAED,8CAWC;AAED,sCAaC;AAED,0CAaC;AAED,4CAWC;AArQD,4CAAoD;AACpD,4CAKsB;AACtB,mCAAiD;AAiBjD,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,SAAgB,iBAAiB,CAC/B,UAA2B,EAC3B,QAA0B,EAC1B,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AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,UAA2B,EAC3B,OAA+B,EAC/B,kBAA0C,qBAAS,CAAC,yBAAyB,EAC7E,UAAkB,qBAAS,CAAC,OAAO;IAEnC,OAAO;QACL,OAAO,EAAE,eAAgC;QACzC,GAAG,EAAE,0CAA8B;QACnC,YAAY,EAAE,WAAW;QACzB,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QACnC,OAAO;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe,CAC7B,UAA2B,EAC3B,OAA+B,EAC/B,kBAA0C,qBAAS,CAAC,yBAAyB,EAC7E,UAAkB,qBAAS,CAAC,OAAO;IAEnC,OAAO;QACL,OAAO,EAAE,eAAgC;QACzC,GAAG,EAAE,0CAA8B;QACnC,YAAY,EAAE,aAAa;QAC3B,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QACnC,OAAO;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAC9B,kBAA0C,qBAAS,CAAC,yBAAyB,EAC7E,UAAkB,qBAAS,CAAC,OAAO;IAEnC,OAAO;QACL,OAAO,EAAE,eAAgC;QACzC,GAAG,EAAE,0CAA8B;QACnC,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,EAAE;QACR,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Governance proposal vote preparation
|
|
3
|
+
*
|
|
4
|
+
* Prepares transactions for casting votes on Core Governor and Treasury
|
|
5
|
+
* Governor proposals. Following the SDK's prepare-only philosophy: builds
|
|
6
|
+
* transaction data but never executes.
|
|
7
|
+
*
|
|
8
|
+
* Supports all OpenZeppelin Governor voting methods:
|
|
9
|
+
* - castVote(proposalId, support)
|
|
10
|
+
* - castVoteWithReason(proposalId, support, reason)
|
|
11
|
+
* - castVoteWithReasonAndParams(proposalId, support, reason, params)
|
|
12
|
+
*/
|
|
13
|
+
import type { VoteSupport } from "../constants";
|
|
14
|
+
import { PreparedTransaction } from "../types";
|
|
15
|
+
export type GovernorTarget = "constitutional" | "non-constitutional";
|
|
16
|
+
export declare function resolveGovernorAddress(governorAddressOrTarget?: GovernorTarget | string): `0x${string}`;
|
|
17
|
+
/**
|
|
18
|
+
* Prepare a castVote transaction.
|
|
19
|
+
*
|
|
20
|
+
* Simplest voting method — just proposal ID and support value.
|
|
21
|
+
*
|
|
22
|
+
* @param proposalId - The proposal ID to vote on
|
|
23
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain) — use VOTE_SUPPORT constants
|
|
24
|
+
* @param governorAddress - Governor contract address, or "constitutional"/"non-constitutional" shorthand
|
|
25
|
+
* @param chainId - Chain ID (default: 42161 for Arbitrum One)
|
|
26
|
+
*/
|
|
27
|
+
export declare function prepareCastVote(proposalId: string, support: VoteSupport, governorAddress?: GovernorTarget | string, chainId?: number): PreparedTransaction;
|
|
28
|
+
/**
|
|
29
|
+
* Prepare a castVoteWithReason transaction.
|
|
30
|
+
*
|
|
31
|
+
* Same as castVote but includes an on-chain reason string.
|
|
32
|
+
*
|
|
33
|
+
* @param proposalId - The proposal ID to vote on
|
|
34
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain)
|
|
35
|
+
* @param reason - On-chain reason for the vote
|
|
36
|
+
* @param governorAddress - Governor contract address or shorthand
|
|
37
|
+
* @param chainId - Chain ID (default: 42161)
|
|
38
|
+
*/
|
|
39
|
+
export declare function prepareCastVoteWithReason(proposalId: string, support: VoteSupport, reason: string, governorAddress?: GovernorTarget | string, chainId?: number): PreparedTransaction;
|
|
40
|
+
/**
|
|
41
|
+
* Prepare a castVoteWithReasonAndParams transaction.
|
|
42
|
+
*
|
|
43
|
+
* Most flexible voting method — includes reason and arbitrary params bytes.
|
|
44
|
+
* Used by governors with custom counting modules.
|
|
45
|
+
*
|
|
46
|
+
* @param proposalId - The proposal ID to vote on
|
|
47
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain)
|
|
48
|
+
* @param reason - On-chain reason for the vote
|
|
49
|
+
* @param params - ABI-encoded params bytes (interpretation depends on counting module)
|
|
50
|
+
* @param governorAddress - Governor contract address or shorthand
|
|
51
|
+
* @param chainId - Chain ID (default: 42161)
|
|
52
|
+
*/
|
|
53
|
+
export declare function prepareCastVoteWithReasonAndParams(proposalId: string, support: VoteSupport, reason: string, params: string, governorAddress?: GovernorTarget | string, chainId?: number): PreparedTransaction;
|
|
54
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/governance/write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,UAAU,CAAC;AAS/D,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAMrE,wBAAgB,sBAAsB,CACpC,uBAAuB,CAAC,EAAE,cAAc,GAAG,MAAM,GAChD,KAAK,MAAM,EAAE,CAMf;AAYD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,EACpB,eAAe,CAAC,EAAE,cAAc,GAAG,MAAM,EACzC,OAAO,GAAE,MAA0B,GAClC,mBAAmB,CAiBrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,cAAc,GAAG,MAAM,EACzC,OAAO,GAAE,MAA0B,GAClC,mBAAmB,CAkBrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,cAAc,GAAG,MAAM,EACzC,OAAO,GAAE,MAA0B,GAClC,mBAAmB,CAmBrB"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Governance proposal vote preparation
|
|
4
|
+
*
|
|
5
|
+
* Prepares transactions for casting votes on Core Governor and Treasury
|
|
6
|
+
* Governor proposals. Following the SDK's prepare-only philosophy: builds
|
|
7
|
+
* transaction data but never executes.
|
|
8
|
+
*
|
|
9
|
+
* Supports all OpenZeppelin Governor voting methods:
|
|
10
|
+
* - castVote(proposalId, support)
|
|
11
|
+
* - castVoteWithReason(proposalId, support, reason)
|
|
12
|
+
* - castVoteWithReasonAndParams(proposalId, support, reason, params)
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.resolveGovernorAddress = resolveGovernorAddress;
|
|
16
|
+
exports.prepareCastVote = prepareCastVote;
|
|
17
|
+
exports.prepareCastVoteWithReason = prepareCastVoteWithReason;
|
|
18
|
+
exports.prepareCastVoteWithReasonAndParams = prepareCastVoteWithReasonAndParams;
|
|
19
|
+
const ethers_1 = require("ethers");
|
|
20
|
+
const constants_1 = require("../constants");
|
|
21
|
+
const abis_1 = require("../abis");
|
|
22
|
+
const types_1 = require("../types");
|
|
23
|
+
const logger_1 = require("../utils/logger");
|
|
24
|
+
const log = logger_1.loggers.governance;
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// Internals
|
|
27
|
+
// ============================================================================
|
|
28
|
+
function resolveGovernorAddress(governorAddressOrTarget) {
|
|
29
|
+
if (!governorAddressOrTarget)
|
|
30
|
+
return constants_1.ADDRESSES.CONSTITUTIONAL_GOVERNOR;
|
|
31
|
+
if (governorAddressOrTarget === "constitutional")
|
|
32
|
+
return constants_1.ADDRESSES.CONSTITUTIONAL_GOVERNOR;
|
|
33
|
+
if (governorAddressOrTarget === "non-constitutional")
|
|
34
|
+
return constants_1.ADDRESSES.NON_CONSTITUTIONAL_GOVERNOR;
|
|
35
|
+
return ethers_1.ethers.utils.getAddress(governorAddressOrTarget);
|
|
36
|
+
}
|
|
37
|
+
function supportLabel(support) {
|
|
38
|
+
if (support === constants_1.VOTE_SUPPORT.FOR)
|
|
39
|
+
return "For";
|
|
40
|
+
if (support === constants_1.VOTE_SUPPORT.AGAINST)
|
|
41
|
+
return "Against";
|
|
42
|
+
return "Abstain";
|
|
43
|
+
}
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Vote Preparation
|
|
46
|
+
// ============================================================================
|
|
47
|
+
/**
|
|
48
|
+
* Prepare a castVote transaction.
|
|
49
|
+
*
|
|
50
|
+
* Simplest voting method — just proposal ID and support value.
|
|
51
|
+
*
|
|
52
|
+
* @param proposalId - The proposal ID to vote on
|
|
53
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain) — use VOTE_SUPPORT constants
|
|
54
|
+
* @param governorAddress - Governor contract address, or "constitutional"/"non-constitutional" shorthand
|
|
55
|
+
* @param chainId - Chain ID (default: 42161 for Arbitrum One)
|
|
56
|
+
*/
|
|
57
|
+
function prepareCastVote(proposalId, support, governorAddress, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
58
|
+
const to = resolveGovernorAddress(governorAddress);
|
|
59
|
+
log("prepareCastVote for proposal %s, support %d, governor %s", proposalId, support, to);
|
|
60
|
+
const data = abis_1.governorInterface.encodeFunctionData("castVote", [
|
|
61
|
+
ethers_1.BigNumber.from(proposalId),
|
|
62
|
+
support,
|
|
63
|
+
]);
|
|
64
|
+
return {
|
|
65
|
+
to,
|
|
66
|
+
data: data,
|
|
67
|
+
value: "0",
|
|
68
|
+
chain: (0, types_1.chainIdToChain)(chainId),
|
|
69
|
+
chainId,
|
|
70
|
+
description: `castVote(${supportLabel(support)}) on proposal ${proposalId}`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Prepare a castVoteWithReason transaction.
|
|
75
|
+
*
|
|
76
|
+
* Same as castVote but includes an on-chain reason string.
|
|
77
|
+
*
|
|
78
|
+
* @param proposalId - The proposal ID to vote on
|
|
79
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain)
|
|
80
|
+
* @param reason - On-chain reason for the vote
|
|
81
|
+
* @param governorAddress - Governor contract address or shorthand
|
|
82
|
+
* @param chainId - Chain ID (default: 42161)
|
|
83
|
+
*/
|
|
84
|
+
function prepareCastVoteWithReason(proposalId, support, reason, governorAddress, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
85
|
+
const to = resolveGovernorAddress(governorAddress);
|
|
86
|
+
log("prepareCastVoteWithReason for proposal %s, support %d", proposalId, support);
|
|
87
|
+
const data = abis_1.governorInterface.encodeFunctionData("castVoteWithReason", [
|
|
88
|
+
ethers_1.BigNumber.from(proposalId),
|
|
89
|
+
support,
|
|
90
|
+
reason,
|
|
91
|
+
]);
|
|
92
|
+
return {
|
|
93
|
+
to,
|
|
94
|
+
data: data,
|
|
95
|
+
value: "0",
|
|
96
|
+
chain: (0, types_1.chainIdToChain)(chainId),
|
|
97
|
+
chainId,
|
|
98
|
+
description: `castVoteWithReason(${supportLabel(support)}) on proposal ${proposalId}`,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Prepare a castVoteWithReasonAndParams transaction.
|
|
103
|
+
*
|
|
104
|
+
* Most flexible voting method — includes reason and arbitrary params bytes.
|
|
105
|
+
* Used by governors with custom counting modules.
|
|
106
|
+
*
|
|
107
|
+
* @param proposalId - The proposal ID to vote on
|
|
108
|
+
* @param support - Vote support: 0 (Against), 1 (For), 2 (Abstain)
|
|
109
|
+
* @param reason - On-chain reason for the vote
|
|
110
|
+
* @param params - ABI-encoded params bytes (interpretation depends on counting module)
|
|
111
|
+
* @param governorAddress - Governor contract address or shorthand
|
|
112
|
+
* @param chainId - Chain ID (default: 42161)
|
|
113
|
+
*/
|
|
114
|
+
function prepareCastVoteWithReasonAndParams(proposalId, support, reason, params, governorAddress, chainId = constants_1.CHAIN_IDS.ARB_ONE) {
|
|
115
|
+
const to = resolveGovernorAddress(governorAddress);
|
|
116
|
+
log("prepareCastVoteWithReasonAndParams for proposal %s, support %d", proposalId, support);
|
|
117
|
+
const data = abis_1.governorInterface.encodeFunctionData("castVoteWithReasonAndParams", [
|
|
118
|
+
ethers_1.BigNumber.from(proposalId),
|
|
119
|
+
support,
|
|
120
|
+
reason,
|
|
121
|
+
params,
|
|
122
|
+
]);
|
|
123
|
+
return {
|
|
124
|
+
to,
|
|
125
|
+
data: data,
|
|
126
|
+
value: "0",
|
|
127
|
+
chain: (0, types_1.chainIdToChain)(chainId),
|
|
128
|
+
chainId,
|
|
129
|
+
description: `castVoteWithReasonAndParams(${supportLabel(support)}) on proposal ${proposalId}`,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/governance/write.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAqBH,wDAQC;AAsBD,0CAsBC;AAaD,8DAwBC;AAeD,gFA0BC;AArJD,mCAA2C;AAC3C,4CAAkE;AAElE,kCAA4C;AAC5C,oCAA+D;AAC/D,4CAA0C;AAE1C,MAAM,GAAG,GAAG,gBAAO,CAAC,UAAU,CAAC;AAQ/B,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,SAAgB,sBAAsB,CACpC,uBAAiD;IAEjD,IAAI,CAAC,uBAAuB;QAAE,OAAO,qBAAS,CAAC,uBAAuB,CAAC;IACvE,IAAI,uBAAuB,KAAK,gBAAgB;QAAE,OAAO,qBAAS,CAAC,uBAAuB,CAAC;IAC3F,IAAI,uBAAuB,KAAK,oBAAoB;QAClD,OAAO,qBAAS,CAAC,2BAA2B,CAAC;IAC/C,OAAO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AoB,EAAE;QACtE,kBAAS,CAAC,IAAI,CAAC,UAAU,CAAC;QAC1B,OAAO;QACP,MAAM;KACP,CAAC,CAAC;IAEH,OAAO;QACL,EAAE;QACF,IAAI,EAAE,IAAqB;QAC3B,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,IAAA,sBAAc,EAAC,OAAO,CAAC;QAC9B,OAAO;QACP,WAAW,EAAE,sBAAsB,YAAY,CAAC,OAAO,CAAC,iBAAiB,UAAU,EAAE;KACtF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,kCAAkC,CAChD,UAAkB,EAClB,OAAoB,EACpB,MAAc,EACd,MAAc,EACd,eAAyC,EACzC,UAAkB,qBAAS,CAAC,OAAO;IAEnC,MAAM,EAAE,GAAG,sBAAsB,CAAC,eAAe,CAAC,CAAC;IACnD,GAAG,CAAC,gEAAgE,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAE3F,MAAM,IAAI,GAAG,wBAAiB,CAAC,kBAAkB,CAAC,6BAA6B,EAAE;QAC/E,kBAAS,CAAC,IAAI,CAAC,UAAU,CAAC;QAC1B,OAAO;QACP,MAAM;QACN,MAAM;KACP,CAAC,CAAC;IAEH,OAAO;QACL,EAAE;QACF,IAAI,EAAE,IAAqB;QAC3B,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,IAAA,sBAAc,EAAC,OAAO,CAAC;QAC9B,OAAO;QACP,WAAW,EAAE,+BAA+B,YAAY,CAAC,OAAO,CAAC,iBAAiB,UAAU,EAAE;KAC/F,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* A lightweight, high-performance library for tracking Arbitrum DAO
|
|
5
5
|
* governance proposal lifecycle stages.
|
|
6
6
|
*
|
|
7
|
-
* @example Basic usage
|
|
7
|
+
* @example Basic usage with RPC URLs
|
|
8
8
|
* ```typescript
|
|
9
9
|
* import { createTracker, findExecutableStage } from "@gzeoneth/gov-tracker";
|
|
10
10
|
*
|
|
11
|
+
* // Accepts RPC URLs directly (creates providers internally)
|
|
11
12
|
* const tracker = createTracker({
|
|
12
|
-
* l2Provider:
|
|
13
|
-
* l1Provider:
|
|
13
|
+
* l2Provider: "https://arb1.arbitrum.io/rpc",
|
|
14
|
+
* l1Provider: "https://eth.llamarpc.com",
|
|
14
15
|
* });
|
|
15
16
|
*
|
|
16
17
|
* const results = await tracker.trackByTxHash(proposalCreationTxHash);
|
|
@@ -25,9 +26,13 @@
|
|
|
25
26
|
*
|
|
26
27
|
* @example Browser usage with LocalStorageCache
|
|
27
28
|
* ```typescript
|
|
28
|
-
* import { createTracker, LocalStorageCache } from "@gzeoneth/gov-tracker";
|
|
29
|
+
* import { createTracker, LocalStorageCache, extractProposals } from "@gzeoneth/gov-tracker";
|
|
29
30
|
* import bundledCache from "@gzeoneth/gov-tracker/bundled-cache.json";
|
|
30
31
|
*
|
|
32
|
+
* // Extract typed data from bundled cache
|
|
33
|
+
* const proposals = extractProposals(bundledCache);
|
|
34
|
+
* console.log(`Loaded ${proposals.length} proposals from cache`);
|
|
35
|
+
*
|
|
31
36
|
* // Initialize cache with bundled data for faster first load
|
|
32
37
|
* const cache = new LocalStorageCache("arb-gov:");
|
|
33
38
|
* for (const [key, checkpoint] of Object.entries(bundledCache)) {
|
|
@@ -35,19 +40,23 @@
|
|
|
35
40
|
* }
|
|
36
41
|
*
|
|
37
42
|
* const tracker = createTracker({
|
|
38
|
-
* l2Provider:
|
|
39
|
-
* l1Provider:
|
|
43
|
+
* l2Provider: "https://arb1.arbitrum.io/rpc",
|
|
44
|
+
* l1Provider: "https://eth.llamarpc.com",
|
|
40
45
|
* cache, // Updates persist to localStorage
|
|
41
46
|
* });
|
|
42
47
|
* ```
|
|
43
48
|
* @packageDocumentation
|
|
44
49
|
*/
|
|
45
50
|
export { ProposalStageTracker, createTracker, extractTimelockLink } from "./tracker";
|
|
46
|
-
export type { StageType, StageStatus, Chain, KnownChain, L2Chain, ChainId, TrackedStage, StageTransaction, StageTiming, StageDataMap, TypedTrackedStage, NextStageHints, StageTrackResult, TrackingResult, TrackingInput, GovernorTrackingInput, TimelockTrackingInput, TrackingCheckpoint, TrackerStats, TrackingProgress, OnProgressCallback, DiscoveryWatermarks, DiscoveryTargets, PreparedTransaction, PrepareResult, PrepareOptions, TrackerOptions, CacheAdapter, ChunkingConfig, ProposalType, GovernorCapability, ProposalState, ProposalData, TimelockState, TimelockParams, TimelockBatchParams, CallScheduledData, TimelockLink, ProposalCreatedData, VotingActiveData, ProposalQueuedData, TimelockStageData, L2ToL1MessageStageData, RetryableStageData, CohortType, ElectionPhase, ElectionProposalStatus, ElectionStatus, ElectionCheckResult, ElectionContender, ElectionNominee, MemberElectionNominee, NomineeElectionDetails, MemberElectionDetails, SerializableContender, SerializableNominee, SerializableMemberNominee, SerializableNomineeDetails, SerializableMemberDetails, DecodingSource, DecodedCalldata, DecodedParameter, RetryableTicketData, KnownAddress, SignatureEntry, SimulationType, BaseSimulationData, RetryableSimulationData, TimelockSimulationData, CallSimulationData, SimulationData, ExtractedSimulation, } from "./types";
|
|
51
|
+
export type { StageType, StageStatus, Chain, KnownChain, L2Chain, ChainId, TrackedStage, StageTransaction, StageTiming, StageDataMap, TypedTrackedStage, NextStageHints, StageTrackResult, TrackingResult, TrackingInput, GovernorTrackingInput, TimelockTrackingInput, TrackingCheckpoint, TrackerStats, TrackingProgress, OnProgressCallback, DiscoveryWatermarks, DiscoveryTargets, PreparedTransaction, PrepareResult, PrepareOptions, TrackerOptions, ProviderOrUrl, CacheAdapter, ChunkingConfig, ProposalType, GovernorCapability, ProposalState, ProposalData, TimelockState, TimelockParams, TimelockBatchParams, CallScheduledData, TimelockLink, ProposalCreatedData, VotingActiveData, ProposalQueuedData, TimelockStageData, L2ToL1MessageStageData, RetryableStageData, CohortType, ElectionPhase, ElectionProposalStatus, ElectionStatus, ElectionConfig, ElectionCheckResult, ElectionContender, ElectionNominee, MemberElectionNominee, NomineeElectionDetails, MemberElectionDetails, SerializableContender, SerializableNominee, SerializableMemberNominee, SerializableNomineeDetails, SerializableMemberDetails, DecodingSource, DecodedCalldata, DecodedParameter, RetryableTicketData, KnownAddress, SignatureEntry, SimulationType, BaseSimulationData, RetryableSimulationData, TimelockSimulationData, CallSimulationData, SimulationData, ExtractedSimulation, } from "./types";
|
|
47
52
|
export { isStageType, getStageData, isKnownChain, isL2Chain, isRetryable } from "./types";
|
|
48
|
-
export { ADDRESSES, CHAIN_IDS, DEFAULT_RPC_URLS, CHUNK_SIZES, NETWORK_IDS, TIMELOCK_SELECTORS, isElectionGovernor, buildDefaultTargets, } from "./constants";
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
53
|
+
export { ADDRESSES, CHAIN_IDS, DEFAULT_RPC_URLS, CHUNK_SIZES, NETWORK_IDS, TIMELOCK_SELECTORS, isElectionGovernor, buildDefaultTargets, VOTE_SUPPORT, PROPOSAL_STATE, PROPOSAL_STATE_MAP, PROPOSAL_STATE_LABEL, isProposalState, MAINNET_ELECTION_CONFIG, } from "./constants";
|
|
54
|
+
export type { VoteSupport, ProposalStateValue } from "./constants";
|
|
55
|
+
export { GOVERNOR_ABI, GOVERNOR_WITH_VETTER_ABI, TIMELOCK_ABI, NOMINEE_ELECTION_GOVERNOR_ABI, MEMBER_ELECTION_GOVERNOR_ABI, SECURITY_COUNCIL_MANAGER_ABI, ERC20_VOTES_ABI, } from "./abis";
|
|
56
|
+
export { governorAbi, governorWithVetterAbi, timelockAbi, securityCouncilManagerAbi, inboxAbi, nomineeElectionGovernorAbi, memberElectionGovernorAbi, erc20VotesAbi, governorReadAbi, governorWriteAbi, nomineeElectionGovernorReadAbi, nomineeElectionGovernorWriteAbi, memberElectionGovernorReadAbi, memberElectionGovernorWriteAbi, timelockReadAbi, timelockWriteAbi, } from "./abis-json";
|
|
57
|
+
export { findExecutableStage, findAllExecutableStages, needsAction, getTrackingStatusSummary, getLifecyclePhase, getCurrentStage, areAllStagesComplete, extractOperationId, isTimelockStage, isConstitutional, findStage, mergeStages, normalizeTimeline, splitStages, } from "./stages/utils";
|
|
58
|
+
export type { LifecyclePhase } from "./stages/utils";
|
|
59
|
+
export { detectProposalType, isElectionProposal, detectGovernorCapabilities, getTimelockAddress, getProposalState, discoverProposalByTxHash, queryProposalCreatedEvents, } from "./discovery/governor-discovery";
|
|
51
60
|
export type { DiscoveredProposal } from "./discovery/governor-discovery";
|
|
52
61
|
export { isKnownL2Timelock, isL1Timelock, getTimelockOperationState, getTimelockState, findCallScheduledByTxHash, } from "./discovery/timelock-discovery";
|
|
53
62
|
export type { DiscoveredTimelockOp } from "./discovery/timelock-discovery";
|
|
@@ -56,8 +65,8 @@ export type { SecurityCouncilOperationParams, SecurityCouncilBatchParams, } from
|
|
|
56
65
|
export { calculateEta, calculateExpectedEta, calculateRemainingSeconds, estimateTimestampFromBlock, getL1BlockNumberFromL2, invalidateBlockInfoCache, isStageStale, } from "./utils/timing";
|
|
57
66
|
export { saltFromDescription, generateSecurityCouncilSalt, decodeL1TimelockSchedule, } from "./utils/salt-computation";
|
|
58
67
|
export type { DecodedTimelockSchedule } from "./utils/salt-computation";
|
|
59
|
-
export { validateSalt, validateSaltBatch, computeAndValidateOperationHash, tryFindSalt, } from "./utils/operation-id";
|
|
60
|
-
export { prepareTimelockOperation, prepareTimelockBatch, prepareTimelockStage, calculateRetryableExecutionValue, calculateBatchRetryableValues, } from "./stages/timelock";
|
|
68
|
+
export { hashOperation, hashOperationBatch, validateSalt, validateSaltBatch, computeAndValidateOperationHash, tryFindSalt, } from "./utils/operation-id";
|
|
69
|
+
export { prepareTimelockOperation, prepareTimelockBatch, prepareTimelockStage, prepareExecuteTimelock, prepareTimelockExecuteCalldata, prepareTimelockBatchCalldata, calculateRetryableExecutionValue, calculateBatchRetryableValues, } from "./stages/timelock";
|
|
61
70
|
export { prepareL2ToL1Message, prepareL2ToL1MessageStage, getL2ToL1Messages, } from "./stages/l2-to-l1-message";
|
|
62
71
|
export type { OutboxPrepareOptions } from "./stages/l2-to-l1-message";
|
|
63
72
|
export { prepareRetryableRedemption, prepareAllRetryables, prepareRetryableStage, } from "./stages/retryables";
|
|
@@ -65,22 +74,32 @@ export type { RetryablePrepareOptions } from "./stages/retryables";
|
|
|
65
74
|
export { prepareGovernorQueue } from "./stages/proposal-queued";
|
|
66
75
|
export type { GovernorProposalParams } from "./stages/proposal-queued";
|
|
67
76
|
export { getTxUrl, getStageTransactionUrl, GOVERNANCE_START_BLOCKS, ELECTION_TIMING, } from "./constants";
|
|
68
|
-
export { getStageMetadata, formatStageTitle } from "./utils/stage-metadata";
|
|
77
|
+
export { getStageMetadata, formatStageTitle, getAllStageMetadata, ALL_STAGE_TYPES, } from "./utils/stage-metadata";
|
|
69
78
|
export type { StageMetadata } from "./utils/stage-metadata";
|
|
70
|
-
export { addressEquals, isAddressIn, getChain } from "./utils/chain";
|
|
79
|
+
export { addressEquals, isAddressIn, getChain, compareBigNumbers } from "./utils/chain";
|
|
71
80
|
export { chainIdToChain, chainToChainId, getChainDisplayName } from "./types";
|
|
72
|
-
export { isGasEstimationError } from "./utils/rpc-utils";
|
|
81
|
+
export { isGasEstimationError, isPermanentError, isRetryableError, getErrorMessage, queryWithRetry, } from "./utils/rpc-utils";
|
|
73
82
|
export { truncateDescription, sanitizeForDisplay, safeJsonParse, MAX_DESCRIPTION_LENGTH, } from "./utils/sanitize";
|
|
74
|
-
export { wrapText, truncate, safeStringify, formatValue, formatDate,
|
|
75
|
-
export { getElectionCount, checkElectionStatus, hasVettingPeriod, getElectionIndexForProposalId, getElectionProposalId, getElectionProposalParams, getMemberElectionProposalParams, prepareElectionCreation, prepareMemberElectionTrigger, prepareMemberElectionExecution, getContenders, getNomineesWithVotes, getExcludedNominees, getNomineeElectionDetails, getMemberElectionDetails, serializeNomineeDetails, serializeMemberDetails, } from "./election";
|
|
76
|
-
export type { PreparedElectionCreation, ElectionProposalParams } from "./election";
|
|
83
|
+
export { wrapText, truncate, safeStringify, formatValue, formatDate, type StageDataItem, formatStageData, getTxHash, getProposalIdDisplay, type FormattedLine, formatDecodedCalldata, filterVisibleLines, } from "./utils/formatters";
|
|
84
|
+
export { getElectionCount, checkElectionStatus, hasVettingPeriod, determineElectionPhase, getElectionStatus, getAllElectionStatuses, getElectionIndexForProposalId, getElectionProposalId, getElectionProposalParams, getMemberElectionProposalParams, prepareElectionCreation, prepareMemberElectionTrigger, prepareMemberElectionExecution, getContenders, getNomineesWithVotes, getExcludedNominees, getNomineeElectionDetails, getMemberElectionDetails, serializeNomineeDetails, serializeMemberDetails, encodeElectionVoteParams, decodeElectionVoteParams, getAddContenderTypedData, prepareAddContender, prepareContenderRegistration, prepareNomineeElectionVote, prepareMemberElectionVote, } from "./election";
|
|
85
|
+
export type { PreparedElectionCreation, ElectionProposalParams, AddContenderTypedData, PreparedContenderRegistration, } from "./election";
|
|
86
|
+
export { prepareCastVote, prepareCastVoteWithReason, prepareCastVoteWithReasonAndParams, readProposalState, readProposalVotes, readProposalSnapshot, readProposalDeadline, readQuorum, readVotingPower, readGetVotes, readHasVoted, readCurrentVotingPower, readDelegate, readNomineeElectionState, readMemberElectionState, readElectionCount, readVotesUsed, readIsContender, readGovernorName, } from "./governance";
|
|
87
|
+
export type { GovernorTarget, ReadContractParameters } from "./governance";
|
|
77
88
|
export { isSecurityCouncilTimelockOp, linkCheckpointToChild, getParentCheckpoint, isChildCheckpoint, filterChildCheckpoints, getChildToParentMap, getChildCheckpoints, getDeduplicationStats, findPotentialParent, autoLinkOrphanedCheckpoints, } from "./deduplication";
|
|
78
89
|
export type { DeduplicationStats } from "./deduplication";
|
|
79
90
|
export { decodeCalldata, decodeCalldataArray, lookupSignature, lookupLocalSignature, LookupSignatureOptions, parseParamTypes, isLikelyCalldata, formatDecodedValue, getAddressLabel, isRetryableTicketMagic, decodeRetryableTicket, getRetryableChainName, RETRYABLE_TICKET_MAGIC, } from "./calldata";
|
|
80
|
-
export { prepareRetryableSimulation, prepareTimelockSimulation, prepareCallSimulation, extractAllSimulationsFromDecoded, } from "./simulation";
|
|
91
|
+
export { prepareRetryableSimulation, prepareTimelockSimulation, prepareCallSimulation, extractAllSimulationsFromDecoded, extractSimulationsByActionIndex, buildTenderlySimRequest, buildTenderlyEncodeStatesRequest, } from "./simulation";
|
|
92
|
+
export type { IndexedSimulation, TenderlySimRequest, TenderlyEncodeStatesRequest, } from "./simulation";
|
|
81
93
|
export { FileCache, LocalStorageCache, MemoryCache, getBundledCachePath } from "./tracker/cache";
|
|
94
|
+
export { extractProposals, extractTimelockOps, extractElections, extractOperationIds, extractTimelockLinkFromStages, getWatermarksFromCache, getVotingDataFromStages, } from "./tracker/bundled-cache";
|
|
95
|
+
export type { BundledCache, ExtractedProposal, ExtractedTimelockOp, ExtractedElection, } from "./tracker/bundled-cache";
|
|
82
96
|
export { createCheckpoint, createTrackingState } from "./tracker/state";
|
|
83
97
|
export { getElectionContext, proposalStateToStageStatus } from "./tracker/pipeline";
|
|
84
|
-
export { createCheckpointMetadata, isCheckpointComplete, isCheckpointErrored, getCheckpointErrorCount, computeCacheStats, electionCacheKey, txHashCacheKey, timelockOpCacheKey, isElectionKey, isTxKey, isTimelockOpKey, isDiscoveryKey, parseElectionKey, parseTimelockOpKey, DEFAULT_ERROR_THRESHOLD, ELECTION_KEY_PREFIX, TX_KEY_PREFIX, } from "./tracker/checkpoint-helpers";
|
|
85
|
-
export { WATERMARKS_KEY } from "./tracker/discovery";
|
|
98
|
+
export { createCheckpointMetadata, isCheckpointComplete, isCheckpointErrored, getCheckpointErrorCount, computeCacheStats, electionCacheKey, txHashCacheKey, timelockOpCacheKey, isElectionKey, isTxKey, isTimelockOpKey, isDiscoveryKey, parseElectionKey, parseTimelockOpKey, trimFromStage, DEFAULT_ERROR_THRESHOLD, ELECTION_KEY_PREFIX, TX_KEY_PREFIX, } from "./tracker/checkpoint-helpers";
|
|
99
|
+
export { WATERMARKS_KEY, loadWatermarks } from "./tracker/discovery";
|
|
100
|
+
export type { LoadedWatermarks } from "./tracker/discovery";
|
|
101
|
+
export { loadBundledDelegateCache, getBundledDelegateCachePath, extractDelegates, getDelegateCacheStats, validateDelegateCache, serializeDelegateCache, DELEGATE_CACHE_VERSION, getTopDelegates, getDelegateRankInfo, filterDelegatesByMinPower, filterDelegatesByAddress, queryDelegatesNotVoted, queryDelegateVotingPowers, buildDelegateCache, } from "./delegates";
|
|
102
|
+
export type { QueryDelegatesNotVotedOptions, BuildDelegateCacheOptions } from "./delegates";
|
|
103
|
+
export type { DelegateInfo, DelegateCache, DelegateNotVoted, DelegateCacheStats } from "./types";
|
|
104
|
+
export { DELEGATE_START_BLOCK, EXCLUDED_DELEGATE_ADDRESSES, DEFAULT_MIN_VOTING_POWER, } from "./constants";
|
|
86
105
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAOH,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrF,YAAY,EAEV,SAAS,EACT,WAAW,EACX,KAAK,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,iBAAiB,EAEjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAElB,mBAAmB,EACnB,gBAAgB,EAEhB,mBAAmB,EACnB,aAAa,EACb,cAAc,EAEd,cAAc,EACd,aAAa,EACb,YAAY,EACZ,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAClB,aAA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