@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
package/dist/index.js
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* A lightweight, high-performance library for tracking Arbitrum DAO
|
|
6
6
|
* governance proposal lifecycle stages.
|
|
7
7
|
*
|
|
8
|
-
* @example Basic usage
|
|
8
|
+
* @example Basic usage with RPC URLs
|
|
9
9
|
* ```typescript
|
|
10
10
|
* import { createTracker, findExecutableStage } from "@gzeoneth/gov-tracker";
|
|
11
11
|
*
|
|
12
|
+
* // Accepts RPC URLs directly (creates providers internally)
|
|
12
13
|
* const tracker = createTracker({
|
|
13
|
-
* l2Provider:
|
|
14
|
-
* l1Provider:
|
|
14
|
+
* l2Provider: "https://arb1.arbitrum.io/rpc",
|
|
15
|
+
* l1Provider: "https://eth.llamarpc.com",
|
|
15
16
|
* });
|
|
16
17
|
*
|
|
17
18
|
* const results = await tracker.trackByTxHash(proposalCreationTxHash);
|
|
@@ -26,9 +27,13 @@
|
|
|
26
27
|
*
|
|
27
28
|
* @example Browser usage with LocalStorageCache
|
|
28
29
|
* ```typescript
|
|
29
|
-
* import { createTracker, LocalStorageCache } from "@gzeoneth/gov-tracker";
|
|
30
|
+
* import { createTracker, LocalStorageCache, extractProposals } from "@gzeoneth/gov-tracker";
|
|
30
31
|
* import bundledCache from "@gzeoneth/gov-tracker/bundled-cache.json";
|
|
31
32
|
*
|
|
33
|
+
* // Extract typed data from bundled cache
|
|
34
|
+
* const proposals = extractProposals(bundledCache);
|
|
35
|
+
* console.log(`Loaded ${proposals.length} proposals from cache`);
|
|
36
|
+
*
|
|
32
37
|
* // Initialize cache with bundled data for faster first load
|
|
33
38
|
* const cache = new LocalStorageCache("arb-gov:");
|
|
34
39
|
* for (const [key, checkpoint] of Object.entries(bundledCache)) {
|
|
@@ -36,18 +41,20 @@
|
|
|
36
41
|
* }
|
|
37
42
|
*
|
|
38
43
|
* const tracker = createTracker({
|
|
39
|
-
* l2Provider:
|
|
40
|
-
* l1Provider:
|
|
44
|
+
* l2Provider: "https://arb1.arbitrum.io/rpc",
|
|
45
|
+
* l1Provider: "https://eth.llamarpc.com",
|
|
41
46
|
* cache, // Updates persist to localStorage
|
|
42
47
|
* });
|
|
43
48
|
* ```
|
|
44
49
|
* @packageDocumentation
|
|
45
50
|
*/
|
|
46
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
52
|
+
exports.getLifecyclePhase = exports.getTrackingStatusSummary = exports.needsAction = exports.findAllExecutableStages = exports.findExecutableStage = exports.timelockWriteAbi = exports.timelockReadAbi = exports.memberElectionGovernorWriteAbi = exports.memberElectionGovernorReadAbi = exports.nomineeElectionGovernorWriteAbi = exports.nomineeElectionGovernorReadAbi = exports.governorWriteAbi = exports.governorReadAbi = exports.erc20VotesAbi = exports.memberElectionGovernorAbi = exports.nomineeElectionGovernorAbi = exports.inboxAbi = exports.securityCouncilManagerAbi = exports.timelockAbi = exports.governorWithVetterAbi = exports.governorAbi = exports.ERC20_VOTES_ABI = exports.SECURITY_COUNCIL_MANAGER_ABI = exports.MEMBER_ELECTION_GOVERNOR_ABI = exports.NOMINEE_ELECTION_GOVERNOR_ABI = exports.TIMELOCK_ABI = exports.GOVERNOR_WITH_VETTER_ABI = exports.GOVERNOR_ABI = exports.MAINNET_ELECTION_CONFIG = exports.isProposalState = exports.PROPOSAL_STATE_LABEL = exports.PROPOSAL_STATE_MAP = exports.PROPOSAL_STATE = exports.VOTE_SUPPORT = exports.buildDefaultTargets = exports.isElectionGovernor = exports.TIMELOCK_SELECTORS = exports.NETWORK_IDS = exports.CHUNK_SIZES = exports.DEFAULT_RPC_URLS = exports.CHAIN_IDS = exports.ADDRESSES = exports.isRetryable = exports.isL2Chain = exports.isKnownChain = exports.getStageData = exports.isStageType = exports.extractTimelockLink = exports.createTracker = exports.ProposalStageTracker = void 0;
|
|
53
|
+
exports.prepareTimelockExecuteCalldata = exports.prepareExecuteTimelock = exports.prepareTimelockStage = exports.prepareTimelockBatch = exports.prepareTimelockOperation = exports.tryFindSalt = exports.computeAndValidateOperationHash = exports.validateSaltBatch = exports.validateSalt = exports.hashOperationBatch = exports.hashOperation = exports.decodeL1TimelockSchedule = exports.generateSecurityCouncilSalt = exports.saltFromDescription = exports.isStageStale = exports.invalidateBlockInfoCache = exports.getL1BlockNumberFromL2 = exports.estimateTimestampFromBlock = exports.calculateRemainingSeconds = exports.calculateExpectedEta = exports.calculateEta = exports.isScOperationSuperseded = exports.getHighestScNonce = exports.checkVettingPeriod = exports.extractAllSecurityCouncilParams = exports.extractSecurityCouncilParamsForOperation = exports.extractSecurityCouncilParams = exports.isSecurityCouncilElectionProposal = exports.isSecurityCouncilOperation = exports.findCallScheduledByTxHash = exports.getTimelockState = exports.getTimelockOperationState = exports.isL1Timelock = exports.isKnownL2Timelock = exports.queryProposalCreatedEvents = exports.discoverProposalByTxHash = exports.getProposalState = exports.getTimelockAddress = exports.detectGovernorCapabilities = exports.isElectionProposal = exports.detectProposalType = exports.splitStages = exports.normalizeTimeline = exports.mergeStages = exports.findStage = exports.isConstitutional = exports.isTimelockStage = exports.extractOperationId = exports.areAllStagesComplete = exports.getCurrentStage = void 0;
|
|
54
|
+
exports.getAllElectionStatuses = exports.getElectionStatus = exports.determineElectionPhase = exports.hasVettingPeriod = exports.checkElectionStatus = exports.getElectionCount = exports.filterVisibleLines = exports.formatDecodedCalldata = exports.getProposalIdDisplay = exports.getTxHash = exports.formatStageData = exports.formatDate = exports.formatValue = exports.safeStringify = exports.truncate = exports.wrapText = exports.MAX_DESCRIPTION_LENGTH = exports.safeJsonParse = exports.sanitizeForDisplay = exports.truncateDescription = exports.queryWithRetry = exports.getErrorMessage = exports.isRetryableError = exports.isPermanentError = exports.isGasEstimationError = exports.getChainDisplayName = exports.chainToChainId = exports.chainIdToChain = exports.compareBigNumbers = exports.getChain = exports.isAddressIn = exports.addressEquals = exports.ALL_STAGE_TYPES = exports.getAllStageMetadata = exports.formatStageTitle = exports.getStageMetadata = exports.ELECTION_TIMING = exports.GOVERNANCE_START_BLOCKS = exports.getStageTransactionUrl = exports.getTxUrl = exports.prepareGovernorQueue = exports.prepareRetryableStage = exports.prepareAllRetryables = exports.prepareRetryableRedemption = exports.getL2ToL1Messages = exports.prepareL2ToL1MessageStage = exports.prepareL2ToL1Message = exports.calculateBatchRetryableValues = exports.calculateRetryableExecutionValue = exports.prepareTimelockBatchCalldata = void 0;
|
|
55
|
+
exports.autoLinkOrphanedCheckpoints = exports.findPotentialParent = exports.getDeduplicationStats = exports.getChildCheckpoints = exports.getChildToParentMap = exports.filterChildCheckpoints = exports.isChildCheckpoint = exports.getParentCheckpoint = exports.linkCheckpointToChild = exports.isSecurityCouncilTimelockOp = exports.readGovernorName = exports.readIsContender = exports.readVotesUsed = exports.readElectionCount = exports.readMemberElectionState = exports.readNomineeElectionState = exports.readDelegate = exports.readCurrentVotingPower = exports.readHasVoted = exports.readGetVotes = exports.readVotingPower = exports.readQuorum = exports.readProposalDeadline = exports.readProposalSnapshot = exports.readProposalVotes = exports.readProposalState = exports.prepareCastVoteWithReasonAndParams = exports.prepareCastVoteWithReason = exports.prepareCastVote = exports.prepareMemberElectionVote = exports.prepareNomineeElectionVote = exports.prepareContenderRegistration = exports.prepareAddContender = exports.getAddContenderTypedData = exports.decodeElectionVoteParams = exports.encodeElectionVoteParams = exports.serializeMemberDetails = exports.serializeNomineeDetails = exports.getMemberElectionDetails = exports.getNomineeElectionDetails = exports.getExcludedNominees = exports.getNomineesWithVotes = exports.getContenders = exports.prepareMemberElectionExecution = exports.prepareMemberElectionTrigger = exports.prepareElectionCreation = exports.getMemberElectionProposalParams = exports.getElectionProposalParams = exports.getElectionProposalId = exports.getElectionIndexForProposalId = void 0;
|
|
56
|
+
exports.DEFAULT_ERROR_THRESHOLD = exports.trimFromStage = exports.parseTimelockOpKey = exports.parseElectionKey = exports.isDiscoveryKey = exports.isTimelockOpKey = exports.isTxKey = exports.isElectionKey = exports.timelockOpCacheKey = exports.txHashCacheKey = exports.electionCacheKey = exports.computeCacheStats = exports.getCheckpointErrorCount = exports.isCheckpointErrored = exports.isCheckpointComplete = exports.createCheckpointMetadata = exports.proposalStateToStageStatus = exports.getElectionContext = exports.createTrackingState = exports.createCheckpoint = exports.getVotingDataFromStages = exports.getWatermarksFromCache = exports.extractTimelockLinkFromStages = exports.extractOperationIds = exports.extractElections = exports.extractTimelockOps = exports.extractProposals = exports.getBundledCachePath = exports.MemoryCache = exports.LocalStorageCache = exports.FileCache = exports.buildTenderlyEncodeStatesRequest = exports.buildTenderlySimRequest = exports.extractSimulationsByActionIndex = exports.extractAllSimulationsFromDecoded = exports.prepareCallSimulation = exports.prepareTimelockSimulation = exports.prepareRetryableSimulation = exports.RETRYABLE_TICKET_MAGIC = exports.getRetryableChainName = exports.decodeRetryableTicket = exports.isRetryableTicketMagic = exports.getAddressLabel = exports.formatDecodedValue = exports.isLikelyCalldata = exports.parseParamTypes = exports.lookupLocalSignature = exports.lookupSignature = exports.decodeCalldataArray = exports.decodeCalldata = void 0;
|
|
57
|
+
exports.DEFAULT_MIN_VOTING_POWER = exports.EXCLUDED_DELEGATE_ADDRESSES = exports.DELEGATE_START_BLOCK = exports.buildDelegateCache = exports.queryDelegateVotingPowers = exports.queryDelegatesNotVoted = exports.filterDelegatesByAddress = exports.filterDelegatesByMinPower = exports.getDelegateRankInfo = exports.getTopDelegates = exports.DELEGATE_CACHE_VERSION = exports.serializeDelegateCache = exports.validateDelegateCache = exports.getDelegateCacheStats = exports.extractDelegates = exports.getBundledDelegateCachePath = exports.loadBundledDelegateCache = exports.loadWatermarks = exports.WATERMARKS_KEY = exports.TX_KEY_PREFIX = exports.ELECTION_KEY_PREFIX = void 0;
|
|
51
58
|
// ============================================================================
|
|
52
59
|
// TIER 1: Core Public API
|
|
53
60
|
// ============================================================================
|
|
@@ -73,18 +80,58 @@ Object.defineProperty(exports, "NETWORK_IDS", { enumerable: true, get: function
|
|
|
73
80
|
Object.defineProperty(exports, "TIMELOCK_SELECTORS", { enumerable: true, get: function () { return constants_1.TIMELOCK_SELECTORS; } });
|
|
74
81
|
Object.defineProperty(exports, "isElectionGovernor", { enumerable: true, get: function () { return constants_1.isElectionGovernor; } });
|
|
75
82
|
Object.defineProperty(exports, "buildDefaultTargets", { enumerable: true, get: function () { return constants_1.buildDefaultTargets; } });
|
|
83
|
+
Object.defineProperty(exports, "VOTE_SUPPORT", { enumerable: true, get: function () { return constants_1.VOTE_SUPPORT; } });
|
|
84
|
+
Object.defineProperty(exports, "PROPOSAL_STATE", { enumerable: true, get: function () { return constants_1.PROPOSAL_STATE; } });
|
|
85
|
+
Object.defineProperty(exports, "PROPOSAL_STATE_MAP", { enumerable: true, get: function () { return constants_1.PROPOSAL_STATE_MAP; } });
|
|
86
|
+
Object.defineProperty(exports, "PROPOSAL_STATE_LABEL", { enumerable: true, get: function () { return constants_1.PROPOSAL_STATE_LABEL; } });
|
|
87
|
+
Object.defineProperty(exports, "isProposalState", { enumerable: true, get: function () { return constants_1.isProposalState; } });
|
|
88
|
+
Object.defineProperty(exports, "MAINNET_ELECTION_CONFIG", { enumerable: true, get: function () { return constants_1.MAINNET_ELECTION_CONFIG; } });
|
|
89
|
+
// ABIs — human-readable format (ethers v5 compatible, `as const` for abitype)
|
|
90
|
+
var abis_1 = require("./abis");
|
|
91
|
+
Object.defineProperty(exports, "GOVERNOR_ABI", { enumerable: true, get: function () { return abis_1.GOVERNOR_ABI; } });
|
|
92
|
+
Object.defineProperty(exports, "GOVERNOR_WITH_VETTER_ABI", { enumerable: true, get: function () { return abis_1.GOVERNOR_WITH_VETTER_ABI; } });
|
|
93
|
+
Object.defineProperty(exports, "TIMELOCK_ABI", { enumerable: true, get: function () { return abis_1.TIMELOCK_ABI; } });
|
|
94
|
+
Object.defineProperty(exports, "NOMINEE_ELECTION_GOVERNOR_ABI", { enumerable: true, get: function () { return abis_1.NOMINEE_ELECTION_GOVERNOR_ABI; } });
|
|
95
|
+
Object.defineProperty(exports, "MEMBER_ELECTION_GOVERNOR_ABI", { enumerable: true, get: function () { return abis_1.MEMBER_ELECTION_GOVERNOR_ABI; } });
|
|
96
|
+
Object.defineProperty(exports, "SECURITY_COUNCIL_MANAGER_ABI", { enumerable: true, get: function () { return abis_1.SECURITY_COUNCIL_MANAGER_ABI; } });
|
|
97
|
+
Object.defineProperty(exports, "ERC20_VOTES_ABI", { enumerable: true, get: function () { return abis_1.ERC20_VOTES_ABI; } });
|
|
98
|
+
// ABIs — JSON format for wagmi/viem (full useReadContract/useWriteContract type inference)
|
|
99
|
+
var abis_json_1 = require("./abis-json");
|
|
100
|
+
// Full ABIs
|
|
101
|
+
Object.defineProperty(exports, "governorAbi", { enumerable: true, get: function () { return abis_json_1.governorAbi; } });
|
|
102
|
+
Object.defineProperty(exports, "governorWithVetterAbi", { enumerable: true, get: function () { return abis_json_1.governorWithVetterAbi; } });
|
|
103
|
+
Object.defineProperty(exports, "timelockAbi", { enumerable: true, get: function () { return abis_json_1.timelockAbi; } });
|
|
104
|
+
Object.defineProperty(exports, "securityCouncilManagerAbi", { enumerable: true, get: function () { return abis_json_1.securityCouncilManagerAbi; } });
|
|
105
|
+
Object.defineProperty(exports, "inboxAbi", { enumerable: true, get: function () { return abis_json_1.inboxAbi; } });
|
|
106
|
+
Object.defineProperty(exports, "nomineeElectionGovernorAbi", { enumerable: true, get: function () { return abis_json_1.nomineeElectionGovernorAbi; } });
|
|
107
|
+
Object.defineProperty(exports, "memberElectionGovernorAbi", { enumerable: true, get: function () { return abis_json_1.memberElectionGovernorAbi; } });
|
|
108
|
+
Object.defineProperty(exports, "erc20VotesAbi", { enumerable: true, get: function () { return abis_json_1.erc20VotesAbi; } });
|
|
109
|
+
// Curated read/write subsets (use when full ABI exceeds viem type inference limits)
|
|
110
|
+
Object.defineProperty(exports, "governorReadAbi", { enumerable: true, get: function () { return abis_json_1.governorReadAbi; } });
|
|
111
|
+
Object.defineProperty(exports, "governorWriteAbi", { enumerable: true, get: function () { return abis_json_1.governorWriteAbi; } });
|
|
112
|
+
Object.defineProperty(exports, "nomineeElectionGovernorReadAbi", { enumerable: true, get: function () { return abis_json_1.nomineeElectionGovernorReadAbi; } });
|
|
113
|
+
Object.defineProperty(exports, "nomineeElectionGovernorWriteAbi", { enumerable: true, get: function () { return abis_json_1.nomineeElectionGovernorWriteAbi; } });
|
|
114
|
+
Object.defineProperty(exports, "memberElectionGovernorReadAbi", { enumerable: true, get: function () { return abis_json_1.memberElectionGovernorReadAbi; } });
|
|
115
|
+
Object.defineProperty(exports, "memberElectionGovernorWriteAbi", { enumerable: true, get: function () { return abis_json_1.memberElectionGovernorWriteAbi; } });
|
|
116
|
+
Object.defineProperty(exports, "timelockReadAbi", { enumerable: true, get: function () { return abis_json_1.timelockReadAbi; } });
|
|
117
|
+
Object.defineProperty(exports, "timelockWriteAbi", { enumerable: true, get: function () { return abis_json_1.timelockWriteAbi; } });
|
|
76
118
|
// Stage utilities
|
|
77
119
|
var utils_1 = require("./stages/utils");
|
|
78
120
|
Object.defineProperty(exports, "findExecutableStage", { enumerable: true, get: function () { return utils_1.findExecutableStage; } });
|
|
79
121
|
Object.defineProperty(exports, "findAllExecutableStages", { enumerable: true, get: function () { return utils_1.findAllExecutableStages; } });
|
|
80
122
|
Object.defineProperty(exports, "needsAction", { enumerable: true, get: function () { return utils_1.needsAction; } });
|
|
81
123
|
Object.defineProperty(exports, "getTrackingStatusSummary", { enumerable: true, get: function () { return utils_1.getTrackingStatusSummary; } });
|
|
124
|
+
Object.defineProperty(exports, "getLifecyclePhase", { enumerable: true, get: function () { return utils_1.getLifecyclePhase; } });
|
|
82
125
|
Object.defineProperty(exports, "getCurrentStage", { enumerable: true, get: function () { return utils_1.getCurrentStage; } });
|
|
83
126
|
Object.defineProperty(exports, "areAllStagesComplete", { enumerable: true, get: function () { return utils_1.areAllStagesComplete; } });
|
|
84
127
|
Object.defineProperty(exports, "extractOperationId", { enumerable: true, get: function () { return utils_1.extractOperationId; } });
|
|
85
128
|
Object.defineProperty(exports, "isTimelockStage", { enumerable: true, get: function () { return utils_1.isTimelockStage; } });
|
|
86
129
|
Object.defineProperty(exports, "isConstitutional", { enumerable: true, get: function () { return utils_1.isConstitutional; } });
|
|
87
130
|
Object.defineProperty(exports, "findStage", { enumerable: true, get: function () { return utils_1.findStage; } });
|
|
131
|
+
// Stage merging utilities
|
|
132
|
+
Object.defineProperty(exports, "mergeStages", { enumerable: true, get: function () { return utils_1.mergeStages; } });
|
|
133
|
+
Object.defineProperty(exports, "normalizeTimeline", { enumerable: true, get: function () { return utils_1.normalizeTimeline; } });
|
|
134
|
+
Object.defineProperty(exports, "splitStages", { enumerable: true, get: function () { return utils_1.splitStages; } });
|
|
88
135
|
// ============================================================================
|
|
89
136
|
// TIER 2: Advanced API - Power user functions
|
|
90
137
|
// ============================================================================
|
|
@@ -96,6 +143,7 @@ Object.defineProperty(exports, "detectGovernorCapabilities", { enumerable: true,
|
|
|
96
143
|
Object.defineProperty(exports, "getTimelockAddress", { enumerable: true, get: function () { return governor_discovery_1.getTimelockAddress; } });
|
|
97
144
|
Object.defineProperty(exports, "getProposalState", { enumerable: true, get: function () { return governor_discovery_1.getProposalState; } });
|
|
98
145
|
Object.defineProperty(exports, "discoverProposalByTxHash", { enumerable: true, get: function () { return governor_discovery_1.discoverProposalByTxHash; } });
|
|
146
|
+
Object.defineProperty(exports, "queryProposalCreatedEvents", { enumerable: true, get: function () { return governor_discovery_1.queryProposalCreatedEvents; } });
|
|
99
147
|
// Timelock introspection
|
|
100
148
|
var timelock_discovery_1 = require("./discovery/timelock-discovery");
|
|
101
149
|
Object.defineProperty(exports, "isKnownL2Timelock", { enumerable: true, get: function () { return timelock_discovery_1.isKnownL2Timelock; } });
|
|
@@ -130,6 +178,8 @@ Object.defineProperty(exports, "generateSecurityCouncilSalt", { enumerable: true
|
|
|
130
178
|
Object.defineProperty(exports, "decodeL1TimelockSchedule", { enumerable: true, get: function () { return salt_computation_1.decodeL1TimelockSchedule; } });
|
|
131
179
|
// Operation ID utilities
|
|
132
180
|
var operation_id_1 = require("./utils/operation-id");
|
|
181
|
+
Object.defineProperty(exports, "hashOperation", { enumerable: true, get: function () { return operation_id_1.hashOperation; } });
|
|
182
|
+
Object.defineProperty(exports, "hashOperationBatch", { enumerable: true, get: function () { return operation_id_1.hashOperationBatch; } });
|
|
133
183
|
Object.defineProperty(exports, "validateSalt", { enumerable: true, get: function () { return operation_id_1.validateSalt; } });
|
|
134
184
|
Object.defineProperty(exports, "validateSaltBatch", { enumerable: true, get: function () { return operation_id_1.validateSaltBatch; } });
|
|
135
185
|
Object.defineProperty(exports, "computeAndValidateOperationHash", { enumerable: true, get: function () { return operation_id_1.computeAndValidateOperationHash; } });
|
|
@@ -142,6 +192,9 @@ var timelock_1 = require("./stages/timelock");
|
|
|
142
192
|
Object.defineProperty(exports, "prepareTimelockOperation", { enumerable: true, get: function () { return timelock_1.prepareTimelockOperation; } });
|
|
143
193
|
Object.defineProperty(exports, "prepareTimelockBatch", { enumerable: true, get: function () { return timelock_1.prepareTimelockBatch; } });
|
|
144
194
|
Object.defineProperty(exports, "prepareTimelockStage", { enumerable: true, get: function () { return timelock_1.prepareTimelockStage; } });
|
|
195
|
+
Object.defineProperty(exports, "prepareExecuteTimelock", { enumerable: true, get: function () { return timelock_1.prepareExecuteTimelock; } });
|
|
196
|
+
Object.defineProperty(exports, "prepareTimelockExecuteCalldata", { enumerable: true, get: function () { return timelock_1.prepareTimelockExecuteCalldata; } });
|
|
197
|
+
Object.defineProperty(exports, "prepareTimelockBatchCalldata", { enumerable: true, get: function () { return timelock_1.prepareTimelockBatchCalldata; } });
|
|
145
198
|
Object.defineProperty(exports, "calculateRetryableExecutionValue", { enumerable: true, get: function () { return timelock_1.calculateRetryableExecutionValue; } });
|
|
146
199
|
Object.defineProperty(exports, "calculateBatchRetryableValues", { enumerable: true, get: function () { return timelock_1.calculateBatchRetryableValues; } });
|
|
147
200
|
// L2→L1 message preparation
|
|
@@ -170,18 +223,25 @@ Object.defineProperty(exports, "ELECTION_TIMING", { enumerable: true, get: funct
|
|
|
170
223
|
var stage_metadata_1 = require("./utils/stage-metadata");
|
|
171
224
|
Object.defineProperty(exports, "getStageMetadata", { enumerable: true, get: function () { return stage_metadata_1.getStageMetadata; } });
|
|
172
225
|
Object.defineProperty(exports, "formatStageTitle", { enumerable: true, get: function () { return stage_metadata_1.formatStageTitle; } });
|
|
173
|
-
|
|
226
|
+
Object.defineProperty(exports, "getAllStageMetadata", { enumerable: true, get: function () { return stage_metadata_1.getAllStageMetadata; } });
|
|
227
|
+
Object.defineProperty(exports, "ALL_STAGE_TYPES", { enumerable: true, get: function () { return stage_metadata_1.ALL_STAGE_TYPES; } });
|
|
228
|
+
// Chain and address utilities
|
|
174
229
|
var chain_1 = require("./utils/chain");
|
|
175
230
|
Object.defineProperty(exports, "addressEquals", { enumerable: true, get: function () { return chain_1.addressEquals; } });
|
|
176
231
|
Object.defineProperty(exports, "isAddressIn", { enumerable: true, get: function () { return chain_1.isAddressIn; } });
|
|
177
232
|
Object.defineProperty(exports, "getChain", { enumerable: true, get: function () { return chain_1.getChain; } });
|
|
233
|
+
Object.defineProperty(exports, "compareBigNumbers", { enumerable: true, get: function () { return chain_1.compareBigNumbers; } });
|
|
178
234
|
var types_2 = require("./types");
|
|
179
235
|
Object.defineProperty(exports, "chainIdToChain", { enumerable: true, get: function () { return types_2.chainIdToChain; } });
|
|
180
236
|
Object.defineProperty(exports, "chainToChainId", { enumerable: true, get: function () { return types_2.chainToChainId; } });
|
|
181
237
|
Object.defineProperty(exports, "getChainDisplayName", { enumerable: true, get: function () { return types_2.getChainDisplayName; } });
|
|
182
|
-
// Error classification
|
|
238
|
+
// Error classification and RPC utilities
|
|
183
239
|
var rpc_utils_1 = require("./utils/rpc-utils");
|
|
184
240
|
Object.defineProperty(exports, "isGasEstimationError", { enumerable: true, get: function () { return rpc_utils_1.isGasEstimationError; } });
|
|
241
|
+
Object.defineProperty(exports, "isPermanentError", { enumerable: true, get: function () { return rpc_utils_1.isPermanentError; } });
|
|
242
|
+
Object.defineProperty(exports, "isRetryableError", { enumerable: true, get: function () { return rpc_utils_1.isRetryableError; } });
|
|
243
|
+
Object.defineProperty(exports, "getErrorMessage", { enumerable: true, get: function () { return rpc_utils_1.getErrorMessage; } });
|
|
244
|
+
Object.defineProperty(exports, "queryWithRetry", { enumerable: true, get: function () { return rpc_utils_1.queryWithRetry; } });
|
|
185
245
|
// Security utilities
|
|
186
246
|
var sanitize_1 = require("./utils/sanitize");
|
|
187
247
|
Object.defineProperty(exports, "truncateDescription", { enumerable: true, get: function () { return sanitize_1.truncateDescription; } });
|
|
@@ -195,14 +255,11 @@ Object.defineProperty(exports, "truncate", { enumerable: true, get: function ()
|
|
|
195
255
|
Object.defineProperty(exports, "safeStringify", { enumerable: true, get: function () { return formatters_1.safeStringify; } });
|
|
196
256
|
Object.defineProperty(exports, "formatValue", { enumerable: true, get: function () { return formatters_1.formatValue; } });
|
|
197
257
|
Object.defineProperty(exports, "formatDate", { enumerable: true, get: function () { return formatters_1.formatDate; } });
|
|
198
|
-
Object.defineProperty(exports, "CHAIN_TO_CHAIN_ID", { enumerable: true, get: function () { return formatters_1.CHAIN_TO_CHAIN_ID; } });
|
|
199
258
|
Object.defineProperty(exports, "formatStageData", { enumerable: true, get: function () { return formatters_1.formatStageData; } });
|
|
200
259
|
Object.defineProperty(exports, "getTxHash", { enumerable: true, get: function () { return formatters_1.getTxHash; } });
|
|
201
260
|
Object.defineProperty(exports, "getProposalIdDisplay", { enumerable: true, get: function () { return formatters_1.getProposalIdDisplay; } });
|
|
202
261
|
Object.defineProperty(exports, "formatDecodedCalldata", { enumerable: true, get: function () { return formatters_1.formatDecodedCalldata; } });
|
|
203
262
|
Object.defineProperty(exports, "filterVisibleLines", { enumerable: true, get: function () { return formatters_1.filterVisibleLines; } });
|
|
204
|
-
Object.defineProperty(exports, "getAllFoldableKeys", { enumerable: true, get: function () { return formatters_1.getAllFoldableKeys; } });
|
|
205
|
-
Object.defineProperty(exports, "toggleFoldKey", { enumerable: true, get: function () { return formatters_1.toggleFoldKey; } });
|
|
206
263
|
// ============================================================================
|
|
207
264
|
// TIER 5: Election Tracking
|
|
208
265
|
// ============================================================================
|
|
@@ -211,6 +268,9 @@ var election_1 = require("./election");
|
|
|
211
268
|
Object.defineProperty(exports, "getElectionCount", { enumerable: true, get: function () { return election_1.getElectionCount; } });
|
|
212
269
|
Object.defineProperty(exports, "checkElectionStatus", { enumerable: true, get: function () { return election_1.checkElectionStatus; } });
|
|
213
270
|
Object.defineProperty(exports, "hasVettingPeriod", { enumerable: true, get: function () { return election_1.hasVettingPeriod; } });
|
|
271
|
+
Object.defineProperty(exports, "determineElectionPhase", { enumerable: true, get: function () { return election_1.determineElectionPhase; } });
|
|
272
|
+
Object.defineProperty(exports, "getElectionStatus", { enumerable: true, get: function () { return election_1.getElectionStatus; } });
|
|
273
|
+
Object.defineProperty(exports, "getAllElectionStatuses", { enumerable: true, get: function () { return election_1.getAllElectionStatuses; } });
|
|
214
274
|
// Election tracking utilities
|
|
215
275
|
Object.defineProperty(exports, "getElectionIndexForProposalId", { enumerable: true, get: function () { return election_1.getElectionIndexForProposalId; } });
|
|
216
276
|
// Election proposal IDs
|
|
@@ -230,6 +290,38 @@ Object.defineProperty(exports, "getMemberElectionDetails", { enumerable: true, g
|
|
|
230
290
|
// Election details serialization
|
|
231
291
|
Object.defineProperty(exports, "serializeNomineeDetails", { enumerable: true, get: function () { return election_1.serializeNomineeDetails; } });
|
|
232
292
|
Object.defineProperty(exports, "serializeMemberDetails", { enumerable: true, get: function () { return election_1.serializeMemberDetails; } });
|
|
293
|
+
// Election write actions (prepare-only)
|
|
294
|
+
Object.defineProperty(exports, "encodeElectionVoteParams", { enumerable: true, get: function () { return election_1.encodeElectionVoteParams; } });
|
|
295
|
+
Object.defineProperty(exports, "decodeElectionVoteParams", { enumerable: true, get: function () { return election_1.decodeElectionVoteParams; } });
|
|
296
|
+
Object.defineProperty(exports, "getAddContenderTypedData", { enumerable: true, get: function () { return election_1.getAddContenderTypedData; } });
|
|
297
|
+
Object.defineProperty(exports, "prepareAddContender", { enumerable: true, get: function () { return election_1.prepareAddContender; } });
|
|
298
|
+
Object.defineProperty(exports, "prepareContenderRegistration", { enumerable: true, get: function () { return election_1.prepareContenderRegistration; } });
|
|
299
|
+
Object.defineProperty(exports, "prepareNomineeElectionVote", { enumerable: true, get: function () { return election_1.prepareNomineeElectionVote; } });
|
|
300
|
+
Object.defineProperty(exports, "prepareMemberElectionVote", { enumerable: true, get: function () { return election_1.prepareMemberElectionVote; } });
|
|
301
|
+
// ============================================================================
|
|
302
|
+
// TIER 5b: Governance Write Actions
|
|
303
|
+
// ============================================================================
|
|
304
|
+
var governance_1 = require("./governance");
|
|
305
|
+
Object.defineProperty(exports, "prepareCastVote", { enumerable: true, get: function () { return governance_1.prepareCastVote; } });
|
|
306
|
+
Object.defineProperty(exports, "prepareCastVoteWithReason", { enumerable: true, get: function () { return governance_1.prepareCastVoteWithReason; } });
|
|
307
|
+
Object.defineProperty(exports, "prepareCastVoteWithReasonAndParams", { enumerable: true, get: function () { return governance_1.prepareCastVoteWithReasonAndParams; } });
|
|
308
|
+
// Read helpers (wagmi useReadContract / useReadContracts compatible)
|
|
309
|
+
Object.defineProperty(exports, "readProposalState", { enumerable: true, get: function () { return governance_1.readProposalState; } });
|
|
310
|
+
Object.defineProperty(exports, "readProposalVotes", { enumerable: true, get: function () { return governance_1.readProposalVotes; } });
|
|
311
|
+
Object.defineProperty(exports, "readProposalSnapshot", { enumerable: true, get: function () { return governance_1.readProposalSnapshot; } });
|
|
312
|
+
Object.defineProperty(exports, "readProposalDeadline", { enumerable: true, get: function () { return governance_1.readProposalDeadline; } });
|
|
313
|
+
Object.defineProperty(exports, "readQuorum", { enumerable: true, get: function () { return governance_1.readQuorum; } });
|
|
314
|
+
Object.defineProperty(exports, "readVotingPower", { enumerable: true, get: function () { return governance_1.readVotingPower; } });
|
|
315
|
+
Object.defineProperty(exports, "readGetVotes", { enumerable: true, get: function () { return governance_1.readGetVotes; } });
|
|
316
|
+
Object.defineProperty(exports, "readHasVoted", { enumerable: true, get: function () { return governance_1.readHasVoted; } });
|
|
317
|
+
Object.defineProperty(exports, "readCurrentVotingPower", { enumerable: true, get: function () { return governance_1.readCurrentVotingPower; } });
|
|
318
|
+
Object.defineProperty(exports, "readDelegate", { enumerable: true, get: function () { return governance_1.readDelegate; } });
|
|
319
|
+
Object.defineProperty(exports, "readNomineeElectionState", { enumerable: true, get: function () { return governance_1.readNomineeElectionState; } });
|
|
320
|
+
Object.defineProperty(exports, "readMemberElectionState", { enumerable: true, get: function () { return governance_1.readMemberElectionState; } });
|
|
321
|
+
Object.defineProperty(exports, "readElectionCount", { enumerable: true, get: function () { return governance_1.readElectionCount; } });
|
|
322
|
+
Object.defineProperty(exports, "readVotesUsed", { enumerable: true, get: function () { return governance_1.readVotesUsed; } });
|
|
323
|
+
Object.defineProperty(exports, "readIsContender", { enumerable: true, get: function () { return governance_1.readIsContender; } });
|
|
324
|
+
Object.defineProperty(exports, "readGovernorName", { enumerable: true, get: function () { return governance_1.readGovernorName; } });
|
|
233
325
|
// Checkpoint deduplication helpers
|
|
234
326
|
var deduplication_1 = require("./deduplication");
|
|
235
327
|
Object.defineProperty(exports, "isSecurityCouncilTimelockOp", { enumerable: true, get: function () { return deduplication_1.isSecurityCouncilTimelockOp; } });
|
|
@@ -271,6 +363,10 @@ Object.defineProperty(exports, "prepareRetryableSimulation", { enumerable: true,
|
|
|
271
363
|
Object.defineProperty(exports, "prepareTimelockSimulation", { enumerable: true, get: function () { return simulation_1.prepareTimelockSimulation; } });
|
|
272
364
|
Object.defineProperty(exports, "prepareCallSimulation", { enumerable: true, get: function () { return simulation_1.prepareCallSimulation; } });
|
|
273
365
|
Object.defineProperty(exports, "extractAllSimulationsFromDecoded", { enumerable: true, get: function () { return simulation_1.extractAllSimulationsFromDecoded; } });
|
|
366
|
+
Object.defineProperty(exports, "extractSimulationsByActionIndex", { enumerable: true, get: function () { return simulation_1.extractSimulationsByActionIndex; } });
|
|
367
|
+
// Tenderly payload builders (dependency-free)
|
|
368
|
+
Object.defineProperty(exports, "buildTenderlySimRequest", { enumerable: true, get: function () { return simulation_1.buildTenderlySimRequest; } });
|
|
369
|
+
Object.defineProperty(exports, "buildTenderlyEncodeStatesRequest", { enumerable: true, get: function () { return simulation_1.buildTenderlyEncodeStatesRequest; } });
|
|
274
370
|
// ============================================================================
|
|
275
371
|
// TIER 8: Cache Implementations
|
|
276
372
|
// ============================================================================
|
|
@@ -279,6 +375,15 @@ Object.defineProperty(exports, "FileCache", { enumerable: true, get: function ()
|
|
|
279
375
|
Object.defineProperty(exports, "LocalStorageCache", { enumerable: true, get: function () { return cache_1.LocalStorageCache; } });
|
|
280
376
|
Object.defineProperty(exports, "MemoryCache", { enumerable: true, get: function () { return cache_1.MemoryCache; } });
|
|
281
377
|
Object.defineProperty(exports, "getBundledCachePath", { enumerable: true, get: function () { return cache_1.getBundledCachePath; } });
|
|
378
|
+
// Bundled cache extraction utilities
|
|
379
|
+
var bundled_cache_1 = require("./tracker/bundled-cache");
|
|
380
|
+
Object.defineProperty(exports, "extractProposals", { enumerable: true, get: function () { return bundled_cache_1.extractProposals; } });
|
|
381
|
+
Object.defineProperty(exports, "extractTimelockOps", { enumerable: true, get: function () { return bundled_cache_1.extractTimelockOps; } });
|
|
382
|
+
Object.defineProperty(exports, "extractElections", { enumerable: true, get: function () { return bundled_cache_1.extractElections; } });
|
|
383
|
+
Object.defineProperty(exports, "extractOperationIds", { enumerable: true, get: function () { return bundled_cache_1.extractOperationIds; } });
|
|
384
|
+
Object.defineProperty(exports, "extractTimelockLinkFromStages", { enumerable: true, get: function () { return bundled_cache_1.extractTimelockLinkFromStages; } });
|
|
385
|
+
Object.defineProperty(exports, "getWatermarksFromCache", { enumerable: true, get: function () { return bundled_cache_1.getWatermarksFromCache; } });
|
|
386
|
+
Object.defineProperty(exports, "getVotingDataFromStages", { enumerable: true, get: function () { return bundled_cache_1.getVotingDataFromStages; } });
|
|
282
387
|
// ============================================================================
|
|
283
388
|
// TIER 9: Internal Utilities (for testing)
|
|
284
389
|
// ============================================================================
|
|
@@ -303,9 +408,38 @@ Object.defineProperty(exports, "isTimelockOpKey", { enumerable: true, get: funct
|
|
|
303
408
|
Object.defineProperty(exports, "isDiscoveryKey", { enumerable: true, get: function () { return checkpoint_helpers_1.isDiscoveryKey; } });
|
|
304
409
|
Object.defineProperty(exports, "parseElectionKey", { enumerable: true, get: function () { return checkpoint_helpers_1.parseElectionKey; } });
|
|
305
410
|
Object.defineProperty(exports, "parseTimelockOpKey", { enumerable: true, get: function () { return checkpoint_helpers_1.parseTimelockOpKey; } });
|
|
411
|
+
Object.defineProperty(exports, "trimFromStage", { enumerable: true, get: function () { return checkpoint_helpers_1.trimFromStage; } });
|
|
306
412
|
Object.defineProperty(exports, "DEFAULT_ERROR_THRESHOLD", { enumerable: true, get: function () { return checkpoint_helpers_1.DEFAULT_ERROR_THRESHOLD; } });
|
|
307
413
|
Object.defineProperty(exports, "ELECTION_KEY_PREFIX", { enumerable: true, get: function () { return checkpoint_helpers_1.ELECTION_KEY_PREFIX; } });
|
|
308
414
|
Object.defineProperty(exports, "TX_KEY_PREFIX", { enumerable: true, get: function () { return checkpoint_helpers_1.TX_KEY_PREFIX; } });
|
|
309
415
|
var discovery_1 = require("./tracker/discovery");
|
|
310
416
|
Object.defineProperty(exports, "WATERMARKS_KEY", { enumerable: true, get: function () { return discovery_1.WATERMARKS_KEY; } });
|
|
417
|
+
Object.defineProperty(exports, "loadWatermarks", { enumerable: true, get: function () { return discovery_1.loadWatermarks; } });
|
|
418
|
+
// ============================================================================
|
|
419
|
+
// TIER 10: Delegate Indexing & Query
|
|
420
|
+
// ============================================================================
|
|
421
|
+
var delegates_1 = require("./delegates");
|
|
422
|
+
// Cache access (sync)
|
|
423
|
+
Object.defineProperty(exports, "loadBundledDelegateCache", { enumerable: true, get: function () { return delegates_1.loadBundledDelegateCache; } });
|
|
424
|
+
Object.defineProperty(exports, "getBundledDelegateCachePath", { enumerable: true, get: function () { return delegates_1.getBundledDelegateCachePath; } });
|
|
425
|
+
Object.defineProperty(exports, "extractDelegates", { enumerable: true, get: function () { return delegates_1.extractDelegates; } });
|
|
426
|
+
Object.defineProperty(exports, "getDelegateCacheStats", { enumerable: true, get: function () { return delegates_1.getDelegateCacheStats; } });
|
|
427
|
+
Object.defineProperty(exports, "validateDelegateCache", { enumerable: true, get: function () { return delegates_1.validateDelegateCache; } });
|
|
428
|
+
Object.defineProperty(exports, "serializeDelegateCache", { enumerable: true, get: function () { return delegates_1.serializeDelegateCache; } });
|
|
429
|
+
Object.defineProperty(exports, "DELEGATE_CACHE_VERSION", { enumerable: true, get: function () { return delegates_1.DELEGATE_CACHE_VERSION; } });
|
|
430
|
+
// Query helpers (sync)
|
|
431
|
+
Object.defineProperty(exports, "getTopDelegates", { enumerable: true, get: function () { return delegates_1.getTopDelegates; } });
|
|
432
|
+
Object.defineProperty(exports, "getDelegateRankInfo", { enumerable: true, get: function () { return delegates_1.getDelegateRankInfo; } });
|
|
433
|
+
Object.defineProperty(exports, "filterDelegatesByMinPower", { enumerable: true, get: function () { return delegates_1.filterDelegatesByMinPower; } });
|
|
434
|
+
Object.defineProperty(exports, "filterDelegatesByAddress", { enumerable: true, get: function () { return delegates_1.filterDelegatesByAddress; } });
|
|
435
|
+
// Live queries (async)
|
|
436
|
+
Object.defineProperty(exports, "queryDelegatesNotVoted", { enumerable: true, get: function () { return delegates_1.queryDelegatesNotVoted; } });
|
|
437
|
+
Object.defineProperty(exports, "queryDelegateVotingPowers", { enumerable: true, get: function () { return delegates_1.queryDelegateVotingPowers; } });
|
|
438
|
+
// Indexer
|
|
439
|
+
Object.defineProperty(exports, "buildDelegateCache", { enumerable: true, get: function () { return delegates_1.buildDelegateCache; } });
|
|
440
|
+
// Delegate constants
|
|
441
|
+
var constants_3 = require("./constants");
|
|
442
|
+
Object.defineProperty(exports, "DELEGATE_START_BLOCK", { enumerable: true, get: function () { return constants_3.DELEGATE_START_BLOCK; } });
|
|
443
|
+
Object.defineProperty(exports, "EXCLUDED_DELEGATE_ADDRESSES", { enumerable: true, get: function () { return constants_3.EXCLUDED_DELEGATE_ADDRESSES; } });
|
|
444
|
+
Object.defineProperty(exports, "DEFAULT_MIN_VOTING_POWER", { enumerable: true, get: function () { return constants_3.DEFAULT_MIN_VOTING_POWER; } });
|
|
311
445
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;;;;;;;;AAEH,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,oBAAoB;AACpB,qCAAqF;AAA5E,+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AsB,OAAA;AACtB,mHAAA,sBAAsB,OAAA;AACtB,uBAAuB;AACvB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,sHAAA,yBAAyB,OAAA;AACzB,qHAAA,wBAAwB,OAAA;AACxB,uBAAuB;AACvB,mHAAA,sBAAsB,OAAA;AACtB,sHAAA,yBAAyB,OAAA;AACzB,UAAU;AACV,+GAAA,kBAAkB,OAAA;AAOpB,qBAAqB;AACrB,yCAIqB;AAHnB,iHAAA,oBAAoB,OAAA;AACpB,wHAAA,2BAA2B,OAAA;AAC3B,qHAAA,wBAAwB,OAAA"}
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports simulation data preparation functions for Tenderly API usage.
|
|
5
5
|
*/
|
|
6
|
-
export { prepareRetryableSimulation, prepareTimelockSimulation, prepareCallSimulation, extractAllSimulationsFromDecoded, } from "./simulation-data";
|
|
6
|
+
export { prepareRetryableSimulation, prepareTimelockSimulation, prepareCallSimulation, extractAllSimulationsFromDecoded, extractSimulationsByActionIndex, } from "./simulation-data";
|
|
7
|
+
export type { IndexedSimulation } from "./simulation-data";
|
|
8
|
+
export { buildTenderlySimRequest, buildTenderlyEncodeStatesRequest } from "./tenderly-payloads";
|
|
9
|
+
export type { TenderlySimRequest, TenderlyEncodeStatesRequest } from "./tenderly-payloads";
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAChG,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/simulation/index.js
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
* Re-exports simulation data preparation functions for Tenderly API usage.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.extractAllSimulationsFromDecoded = exports.prepareCallSimulation = exports.prepareTimelockSimulation = exports.prepareRetryableSimulation = void 0;
|
|
8
|
+
exports.buildTenderlyEncodeStatesRequest = exports.buildTenderlySimRequest = exports.extractSimulationsByActionIndex = exports.extractAllSimulationsFromDecoded = exports.prepareCallSimulation = exports.prepareTimelockSimulation = exports.prepareRetryableSimulation = void 0;
|
|
9
9
|
var simulation_data_1 = require("./simulation-data");
|
|
10
10
|
Object.defineProperty(exports, "prepareRetryableSimulation", { enumerable: true, get: function () { return simulation_data_1.prepareRetryableSimulation; } });
|
|
11
11
|
Object.defineProperty(exports, "prepareTimelockSimulation", { enumerable: true, get: function () { return simulation_data_1.prepareTimelockSimulation; } });
|
|
12
12
|
Object.defineProperty(exports, "prepareCallSimulation", { enumerable: true, get: function () { return simulation_data_1.prepareCallSimulation; } });
|
|
13
13
|
Object.defineProperty(exports, "extractAllSimulationsFromDecoded", { enumerable: true, get: function () { return simulation_data_1.extractAllSimulationsFromDecoded; } });
|
|
14
|
+
Object.defineProperty(exports, "extractSimulationsByActionIndex", { enumerable: true, get: function () { return simulation_data_1.extractSimulationsByActionIndex; } });
|
|
15
|
+
var tenderly_payloads_1 = require("./tenderly-payloads");
|
|
16
|
+
Object.defineProperty(exports, "buildTenderlySimRequest", { enumerable: true, get: function () { return tenderly_payloads_1.buildTenderlySimRequest; } });
|
|
17
|
+
Object.defineProperty(exports, "buildTenderlyEncodeStatesRequest", { enumerable: true, get: function () { return tenderly_payloads_1.buildTenderlyEncodeStatesRequest; } });
|
|
14
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qDAM2B;AALzB,6HAAA,0BAA0B,OAAA;AAC1B,4HAAA,yBAAyB,OAAA;AACzB,wHAAA,qBAAqB,OAAA;AACrB,mIAAA,gCAAgC,OAAA;AAChC,kIAAA,+BAA+B,OAAA;AAIjC,yDAAgG;AAAvF,4HAAA,uBAAuB,OAAA;AAAE,qIAAA,gCAAgC,OAAA"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Does not make API calls - returns data for client consumption.
|
|
6
6
|
*/
|
|
7
7
|
import type { DecodedCalldata } from "../types/calldata";
|
|
8
|
-
import { Chain } from "../types";
|
|
8
|
+
import { Chain, L2Chain } from "../types";
|
|
9
9
|
import type { RetryableSimulationData, TimelockSimulationData, CallSimulationData, ExtractedSimulation } from "../types/simulation";
|
|
10
10
|
/**
|
|
11
11
|
* Prepare retryable ticket simulation data
|
|
@@ -16,7 +16,7 @@ import type { RetryableSimulationData, TimelockSimulationData, CallSimulationDat
|
|
|
16
16
|
* @param l2Chain - Target L2 chain
|
|
17
17
|
* @returns Simulation data for client use
|
|
18
18
|
*/
|
|
19
|
-
export declare function prepareRetryableSimulation(l2Target: string, l2Calldata: string, l2Value: string, l2Chain:
|
|
19
|
+
export declare function prepareRetryableSimulation(l2Target: string, l2Calldata: string, l2Value: string, l2Chain: L2Chain | "unknown"): RetryableSimulationData;
|
|
20
20
|
/**
|
|
21
21
|
* Prepare timelock batch simulation data
|
|
22
22
|
*
|
|
@@ -50,4 +50,35 @@ export declare function prepareCallSimulation(target: string, calldata: string,
|
|
|
50
50
|
* @returns Array of extracted simulations
|
|
51
51
|
*/
|
|
52
52
|
export declare function extractAllSimulationsFromDecoded(decoded: DecodedCalldata, chainContext?: Chain): ExtractedSimulation[];
|
|
53
|
+
/**
|
|
54
|
+
* Simulation data with action index tracking.
|
|
55
|
+
* Extends ExtractedSimulation with the proposal action index.
|
|
56
|
+
*/
|
|
57
|
+
export interface IndexedSimulation extends ExtractedSimulation {
|
|
58
|
+
/** Index of the proposal action this simulation came from (0-based) */
|
|
59
|
+
actionIndex: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Extract simulations from decoded proposal actions with action index tracking.
|
|
63
|
+
*
|
|
64
|
+
* This is a convenience wrapper for UI builders that need to map simulations
|
|
65
|
+
* back to their source proposal action. Each returned simulation includes
|
|
66
|
+
* the actionIndex indicating which proposal action it originated from.
|
|
67
|
+
*
|
|
68
|
+
* @param decodedActions - Array of decoded calldata from proposal actions
|
|
69
|
+
* @param chain - Chain context for simulation preparation
|
|
70
|
+
* @returns Array of simulations with action index tracking
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* const decodedActions = await Promise.all(
|
|
75
|
+
* calldatas.map((cd, i) => decodeCalldata(cd, targets[i], 0, "arb1"))
|
|
76
|
+
* );
|
|
77
|
+
* const indexed = extractSimulationsByActionIndex(decodedActions, "arb1");
|
|
78
|
+
*
|
|
79
|
+
* // Group by action for UI display
|
|
80
|
+
* const byAction = Map.groupBy(indexed, s => s.actionIndex);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export declare function extractSimulationsByActionIndex(decodedActions: DecodedCalldata[], chain?: Chain): IndexedSimulation[];
|
|
53
84
|
//# sourceMappingURL=simulation-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulation-data.d.ts","sourceRoot":"","sources":["../../src/simulation/simulation-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAkB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"simulation-data.d.ts","sourceRoot":"","sources":["../../src/simulation/simulation-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAkB,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAY7B;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,GAAG,SAAS,GAC3B,uBAAuB,CAkBzB;AAmFD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,EACvB,qBAAqB,EAAE,MAAM,EAC7B,KAAK,GAAE,KAAkB,GACxB,sBAAsB,GAAG,IAAI,CAiC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB,CA0BpB;AAwGD;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,eAAe,EACxB,YAAY,GAAE,KAAc,GAC3B,mBAAmB,EAAE,CA0CvB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,eAAe,EAAE,EACjC,KAAK,GAAE,KAAc,GACpB,iBAAiB,EAAE,CAarB"}
|
|
@@ -10,6 +10,7 @@ exports.prepareRetryableSimulation = prepareRetryableSimulation;
|
|
|
10
10
|
exports.prepareTimelockSimulation = prepareTimelockSimulation;
|
|
11
11
|
exports.prepareCallSimulation = prepareCallSimulation;
|
|
12
12
|
exports.extractAllSimulationsFromDecoded = extractAllSimulationsFromDecoded;
|
|
13
|
+
exports.extractSimulationsByActionIndex = extractSimulationsByActionIndex;
|
|
13
14
|
const ethers_1 = require("ethers");
|
|
14
15
|
const address_1 = require("@arbitrum/sdk/dist/lib/dataEntities/address");
|
|
15
16
|
const types_1 = require("../types");
|
|
@@ -54,16 +55,21 @@ function prepareRetryableSimulation(l2Target, l2Calldata, l2Value, l2Chain) {
|
|
|
54
55
|
* Decode scheduleBatch calldata to extract batch parameters
|
|
55
56
|
*/
|
|
56
57
|
function decodeScheduleBatchParams(calldata) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
try {
|
|
59
|
+
// Remove selector
|
|
60
|
+
const data = calldata.slice(10);
|
|
61
|
+
const decoded = ethers_1.ethers.utils.defaultAbiCoder.decode(["address[]", "uint256[]", "bytes[]", "bytes32", "bytes32", "uint256"], "0x" + data);
|
|
62
|
+
return {
|
|
63
|
+
targets: decoded[0].map((a) => String(a)),
|
|
64
|
+
values: decoded[1].map((v) => v.toString()),
|
|
65
|
+
calldatas: decoded[2],
|
|
66
|
+
predecessor: decoded[3],
|
|
67
|
+
salt: decoded[4],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* Convert scheduleBatch calldata to executeBatch
|
|
@@ -74,21 +80,26 @@ function decodeScheduleBatchParams(calldata) {
|
|
|
74
80
|
* The delay parameter is removed when converting to execute
|
|
75
81
|
*/
|
|
76
82
|
function convertScheduleToExecute(calldata) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
try {
|
|
84
|
+
if (calldata.toLowerCase().startsWith(constants_1.TIMELOCK_SELECTORS.scheduleBatch)) {
|
|
85
|
+
// Decode scheduleBatch parameters (includes delay as 6th param)
|
|
86
|
+
const data = calldata.slice(10);
|
|
87
|
+
const decoded = ethers_1.ethers.utils.defaultAbiCoder.decode(["address[]", "uint256[]", "bytes[]", "bytes32", "bytes32", "uint256"], "0x" + data);
|
|
88
|
+
// Re-encode as executeBatch (without delay)
|
|
89
|
+
const encoded = ethers_1.ethers.utils.defaultAbiCoder.encode(["address[]", "uint256[]", "bytes[]", "bytes32", "bytes32"], [decoded[0], decoded[1], decoded[2], decoded[3], decoded[4]]);
|
|
90
|
+
return constants_1.TIMELOCK_SELECTORS.executeBatch + encoded.slice(2);
|
|
91
|
+
}
|
|
92
|
+
if (calldata.toLowerCase().startsWith(constants_1.TIMELOCK_SELECTORS.schedule)) {
|
|
93
|
+
// Decode schedule parameters (includes delay as 6th param)
|
|
94
|
+
const data = calldata.slice(10);
|
|
95
|
+
const decoded = ethers_1.ethers.utils.defaultAbiCoder.decode(["address", "uint256", "bytes", "bytes32", "bytes32", "uint256"], "0x" + data);
|
|
96
|
+
// Re-encode as execute (without delay)
|
|
97
|
+
const encoded = ethers_1.ethers.utils.defaultAbiCoder.encode(["address", "uint256", "bytes", "bytes32", "bytes32"], [decoded[0], decoded[1], decoded[2], decoded[3], decoded[4]]);
|
|
98
|
+
return constants_1.TIMELOCK_SELECTORS.execute + encoded.slice(2);
|
|
99
|
+
}
|
|
84
100
|
}
|
|
85
|
-
|
|
86
|
-
// Decode
|
|
87
|
-
const data = calldata.slice(10);
|
|
88
|
-
const decoded = ethers_1.ethers.utils.defaultAbiCoder.decode(["address", "uint256", "bytes", "bytes32", "bytes32", "uint256"], "0x" + data);
|
|
89
|
-
// Re-encode as execute (without delay)
|
|
90
|
-
const encoded = ethers_1.ethers.utils.defaultAbiCoder.encode(["address", "uint256", "bytes", "bytes32", "bytes32"], [decoded[0], decoded[1], decoded[2], decoded[3], decoded[4]]);
|
|
91
|
-
return constants_1.TIMELOCK_SELECTORS.execute + encoded.slice(2);
|
|
101
|
+
catch {
|
|
102
|
+
// Decode failed, return original calldata
|
|
92
103
|
}
|
|
93
104
|
return calldata;
|
|
94
105
|
}
|
|
@@ -293,4 +304,37 @@ function extractAllSimulationsFromDecoded(decoded, chainContext = "arb1") {
|
|
|
293
304
|
}
|
|
294
305
|
return simulations;
|
|
295
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Extract simulations from decoded proposal actions with action index tracking.
|
|
309
|
+
*
|
|
310
|
+
* This is a convenience wrapper for UI builders that need to map simulations
|
|
311
|
+
* back to their source proposal action. Each returned simulation includes
|
|
312
|
+
* the actionIndex indicating which proposal action it originated from.
|
|
313
|
+
*
|
|
314
|
+
* @param decodedActions - Array of decoded calldata from proposal actions
|
|
315
|
+
* @param chain - Chain context for simulation preparation
|
|
316
|
+
* @returns Array of simulations with action index tracking
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```typescript
|
|
320
|
+
* const decodedActions = await Promise.all(
|
|
321
|
+
* calldatas.map((cd, i) => decodeCalldata(cd, targets[i], 0, "arb1"))
|
|
322
|
+
* );
|
|
323
|
+
* const indexed = extractSimulationsByActionIndex(decodedActions, "arb1");
|
|
324
|
+
*
|
|
325
|
+
* // Group by action for UI display
|
|
326
|
+
* const byAction = Map.groupBy(indexed, s => s.actionIndex);
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
function extractSimulationsByActionIndex(decodedActions, chain = "arb1") {
|
|
330
|
+
const results = [];
|
|
331
|
+
for (let actionIndex = 0; actionIndex < decodedActions.length; actionIndex++) {
|
|
332
|
+
const decoded = decodedActions[actionIndex];
|
|
333
|
+
const sims = extractAllSimulationsFromDecoded(decoded, chain);
|
|
334
|
+
for (const sim of sims) {
|
|
335
|
+
results.push({ ...sim, actionIndex });
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return results;
|
|
339
|
+
}
|
|
296
340
|
//# sourceMappingURL=simulation-data.js.map
|