@gzeoneth/gov-tracker 0.1.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/LICENSE +191 -0
- package/README.md +201 -0
- package/dist/abis.d.ts +79 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +159 -0
- package/dist/abis.js.map +1 -0
- package/dist/cli/lib/cli.d.ts +92 -0
- package/dist/cli/lib/cli.d.ts.map +1 -0
- package/dist/cli/lib/cli.js +562 -0
- package/dist/cli/lib/cli.js.map +1 -0
- package/dist/cli/lib/election-check.d.ts +46 -0
- package/dist/cli/lib/election-check.d.ts.map +1 -0
- package/dist/cli/lib/election-check.js +136 -0
- package/dist/cli/lib/election-check.js.map +1 -0
- package/dist/cli/lib/json-state.d.ts +100 -0
- package/dist/cli/lib/json-state.d.ts.map +1 -0
- package/dist/cli/lib/json-state.js +225 -0
- package/dist/cli/lib/json-state.js.map +1 -0
- package/dist/cli/monitor.d.ts +3 -0
- package/dist/cli/monitor.d.ts.map +1 -0
- package/dist/cli/monitor.js +442 -0
- package/dist/cli/monitor.js.map +1 -0
- package/dist/constants.d.ts +235 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +293 -0
- package/dist/constants.js.map +1 -0
- package/dist/discovery/governor-discovery.d.ts +84 -0
- package/dist/discovery/governor-discovery.d.ts.map +1 -0
- package/dist/discovery/governor-discovery.js +310 -0
- package/dist/discovery/governor-discovery.js.map +1 -0
- package/dist/discovery/security-council.d.ts +68 -0
- package/dist/discovery/security-council.d.ts.map +1 -0
- package/dist/discovery/security-council.js +181 -0
- package/dist/discovery/security-council.js.map +1 -0
- package/dist/discovery/timelock-discovery.d.ts +99 -0
- package/dist/discovery/timelock-discovery.d.ts.map +1 -0
- package/dist/discovery/timelock-discovery.js +322 -0
- package/dist/discovery/timelock-discovery.js.map +1 -0
- package/dist/election.d.ts +172 -0
- package/dist/election.d.ts.map +1 -0
- package/dist/election.js +464 -0
- package/dist/election.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/stages/base.d.ts +127 -0
- package/dist/stages/base.d.ts.map +1 -0
- package/dist/stages/base.js +280 -0
- package/dist/stages/base.js.map +1 -0
- package/dist/stages/l2-to-l1-message.d.ts +108 -0
- package/dist/stages/l2-to-l1-message.d.ts.map +1 -0
- package/dist/stages/l2-to-l1-message.js +422 -0
- package/dist/stages/l2-to-l1-message.js.map +1 -0
- package/dist/stages/proposal-created.d.ts +20 -0
- package/dist/stages/proposal-created.d.ts.map +1 -0
- package/dist/stages/proposal-created.js +62 -0
- package/dist/stages/proposal-created.js.map +1 -0
- package/dist/stages/proposal-queued.d.ts +39 -0
- package/dist/stages/proposal-queued.d.ts.map +1 -0
- package/dist/stages/proposal-queued.js +131 -0
- package/dist/stages/proposal-queued.js.map +1 -0
- package/dist/stages/retryables.d.ts +79 -0
- package/dist/stages/retryables.d.ts.map +1 -0
- package/dist/stages/retryables.js +307 -0
- package/dist/stages/retryables.js.map +1 -0
- package/dist/stages/stage-builder.d.ts +46 -0
- package/dist/stages/stage-builder.d.ts.map +1 -0
- package/dist/stages/stage-builder.js +87 -0
- package/dist/stages/stage-builder.js.map +1 -0
- package/dist/stages/timelock.d.ts +100 -0
- package/dist/stages/timelock.d.ts.map +1 -0
- package/dist/stages/timelock.js +552 -0
- package/dist/stages/timelock.js.map +1 -0
- package/dist/stages/voting.d.ts +18 -0
- package/dist/stages/voting.d.ts.map +1 -0
- package/dist/stages/voting.js +109 -0
- package/dist/stages/voting.js.map +1 -0
- package/dist/tracker/context.d.ts +111 -0
- package/dist/tracker/context.d.ts.map +1 -0
- package/dist/tracker/context.js +264 -0
- package/dist/tracker/context.js.map +1 -0
- package/dist/tracker/discovery.d.ts +89 -0
- package/dist/tracker/discovery.d.ts.map +1 -0
- package/dist/tracker/discovery.js +228 -0
- package/dist/tracker/discovery.js.map +1 -0
- package/dist/tracker/execute.d.ts +44 -0
- package/dist/tracker/execute.d.ts.map +1 -0
- package/dist/tracker/execute.js +126 -0
- package/dist/tracker/execute.js.map +1 -0
- package/dist/tracker/index.d.ts +18 -0
- package/dist/tracker/index.d.ts.map +1 -0
- package/dist/tracker/index.js +70 -0
- package/dist/tracker/index.js.map +1 -0
- package/dist/tracker/pipeline.d.ts +47 -0
- package/dist/tracker/pipeline.d.ts.map +1 -0
- package/dist/tracker/pipeline.js +299 -0
- package/dist/tracker/pipeline.js.map +1 -0
- package/dist/tracker/query.d.ts +45 -0
- package/dist/tracker/query.d.ts.map +1 -0
- package/dist/tracker/query.js +159 -0
- package/dist/tracker/query.js.map +1 -0
- package/dist/tracker/state.d.ts +104 -0
- package/dist/tracker/state.d.ts.map +1 -0
- package/dist/tracker/state.js +287 -0
- package/dist/tracker/state.js.map +1 -0
- package/dist/tracker.d.ts +261 -0
- package/dist/tracker.d.ts.map +1 -0
- package/dist/tracker.js +556 -0
- package/dist/tracker.js.map +1 -0
- package/dist/types/config.d.ts +81 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +6 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/core.d.ts +51 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +6 -0
- package/dist/types/core.js.map +1 -0
- package/dist/types/cross-chain.d.ts +80 -0
- package/dist/types/cross-chain.d.ts.map +1 -0
- package/dist/types/cross-chain.js +6 -0
- package/dist/types/cross-chain.js.map +1 -0
- package/dist/types/election.d.ts +59 -0
- package/dist/types/election.d.ts.map +1 -0
- package/dist/types/election.js +6 -0
- package/dist/types/election.js.map +1 -0
- package/dist/types/governor.d.ts +71 -0
- package/dist/types/governor.d.ts.map +1 -0
- package/dist/types/governor.js +6 -0
- package/dist/types/governor.js.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/stages.d.ts +189 -0
- package/dist/types/stages.d.ts.map +1 -0
- package/dist/types/stages.js +23 -0
- package/dist/types/stages.js.map +1 -0
- package/dist/types/timelock.d.ts +108 -0
- package/dist/types/timelock.d.ts.map +1 -0
- package/dist/types/timelock.js +6 -0
- package/dist/types/timelock.js.map +1 -0
- package/dist/types/tracking.d.ts +180 -0
- package/dist/types/tracking.d.ts.map +1 -0
- package/dist/types/tracking.js +6 -0
- package/dist/types/tracking.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/chain.d.ts +18 -0
- package/dist/utils/chain.d.ts.map +1 -0
- package/dist/utils/chain.js +34 -0
- package/dist/utils/chain.js.map +1 -0
- package/dist/utils/log-filters.d.ts +67 -0
- package/dist/utils/log-filters.d.ts.map +1 -0
- package/dist/utils/log-filters.js +116 -0
- package/dist/utils/log-filters.js.map +1 -0
- package/dist/utils/log-search.d.ts +76 -0
- package/dist/utils/log-search.d.ts.map +1 -0
- package/dist/utils/log-search.js +142 -0
- package/dist/utils/log-search.js.map +1 -0
- package/dist/utils/logger.d.ts +41 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/operation-id.d.ts +48 -0
- package/dist/utils/operation-id.d.ts.map +1 -0
- package/dist/utils/operation-id.js +102 -0
- package/dist/utils/operation-id.js.map +1 -0
- package/dist/utils/rpc-utils.d.ts +30 -0
- package/dist/utils/rpc-utils.d.ts.map +1 -0
- package/dist/utils/rpc-utils.js +99 -0
- package/dist/utils/rpc-utils.js.map +1 -0
- package/dist/utils/salt-computation.d.ts +78 -0
- package/dist/utils/salt-computation.d.ts.map +1 -0
- package/dist/utils/salt-computation.js +132 -0
- package/dist/utils/salt-computation.js.map +1 -0
- package/dist/utils/salt-resolver.d.ts +63 -0
- package/dist/utils/salt-resolver.d.ts.map +1 -0
- package/dist/utils/salt-resolver.js +144 -0
- package/dist/utils/salt-resolver.js.map +1 -0
- package/dist/utils/scoped-logger.d.ts +43 -0
- package/dist/utils/scoped-logger.d.ts.map +1 -0
- package/dist/utils/scoped-logger.js +72 -0
- package/dist/utils/scoped-logger.js.map +1 -0
- package/dist/utils/stage-helpers.d.ts +51 -0
- package/dist/utils/stage-helpers.d.ts.map +1 -0
- package/dist/utils/stage-helpers.js +143 -0
- package/dist/utils/stage-helpers.js.map +1 -0
- package/dist/utils/stage-metadata.d.ts +62 -0
- package/dist/utils/stage-metadata.d.ts.map +1 -0
- package/dist/utils/stage-metadata.js +140 -0
- package/dist/utils/stage-metadata.js.map +1 -0
- package/dist/utils/timing.d.ts +115 -0
- package/dist/utils/timing.d.ts.map +1 -0
- package/dist/utils/timing.js +303 -0
- package/dist/utils/timing.js.map +1 -0
- package/dist/utils/urls.d.ts +20 -0
- package/dist/utils/urls.d.ts.map +1 -0
- package/dist/utils/urls.js +51 -0
- package/dist/utils/urls.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tracker Discovery Module
|
|
4
|
+
*
|
|
5
|
+
* Handles discovery of proposals and timelock operations.
|
|
6
|
+
* Provides unified discovery API with watermark management.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WATERMARKS_KEY = void 0;
|
|
10
|
+
exports.loadWatermarks = loadWatermarks;
|
|
11
|
+
exports.saveWatermarks = saveWatermarks;
|
|
12
|
+
exports.discoverProposals = discoverProposals;
|
|
13
|
+
exports.discoverTimelockOps = discoverTimelockOps;
|
|
14
|
+
exports.createPendingCheckpoints = createPendingCheckpoints;
|
|
15
|
+
exports.discoverAll = discoverAll;
|
|
16
|
+
const constants_1 = require("../constants");
|
|
17
|
+
const governor_discovery_1 = require("../discovery/governor-discovery");
|
|
18
|
+
const timelock_discovery_1 = require("../discovery/timelock-discovery");
|
|
19
|
+
const logger_1 = require("../utils/logger");
|
|
20
|
+
const { tracker: logTracker, discovery: logDiscovery } = logger_1.loggers;
|
|
21
|
+
/**
|
|
22
|
+
* Cache key for discovery watermarks checkpoint.
|
|
23
|
+
* Uses "discovery:" prefix to follow checkpoint pattern.
|
|
24
|
+
*/
|
|
25
|
+
exports.WATERMARKS_KEY = "discovery:watermarks";
|
|
26
|
+
/**
|
|
27
|
+
* Load discovery watermarks from cache.
|
|
28
|
+
* Watermarks are stored as a TrackingCheckpoint for unified cache format.
|
|
29
|
+
* Returns empty object if no watermarks are cached.
|
|
30
|
+
*/
|
|
31
|
+
async function loadWatermarks(cache) {
|
|
32
|
+
if (!cache)
|
|
33
|
+
return {};
|
|
34
|
+
const checkpoint = await cache.get(exports.WATERMARKS_KEY);
|
|
35
|
+
return checkpoint?.cachedData.discoveryWatermarks ?? {};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Save discovery watermarks to cache.
|
|
39
|
+
* Watermarks are stored as TrackingCheckpoint with proper metadata,
|
|
40
|
+
* following the same pattern as proposal/timelock checkpoints.
|
|
41
|
+
*/
|
|
42
|
+
async function saveWatermarks(watermarks, cache) {
|
|
43
|
+
if (!cache)
|
|
44
|
+
return;
|
|
45
|
+
// Calculate the max L2 block from watermarks for lastProcessedBlock
|
|
46
|
+
const l2Blocks = [
|
|
47
|
+
watermarks.constitutionalGovernor,
|
|
48
|
+
watermarks.nonConstitutionalGovernor,
|
|
49
|
+
watermarks.electionNomineeGovernor,
|
|
50
|
+
watermarks.electionMemberGovernor,
|
|
51
|
+
watermarks.l2ConstitutionalTimelock,
|
|
52
|
+
watermarks.l2NonConstitutionalTimelock,
|
|
53
|
+
].filter((b) => b !== undefined);
|
|
54
|
+
const maxL2Block = l2Blocks.length > 0 ? Math.max(...l2Blocks) : 0;
|
|
55
|
+
// Store as checkpoint with proper metadata (same pattern as proposal checkpoints)
|
|
56
|
+
const checkpoint = {
|
|
57
|
+
version: 1,
|
|
58
|
+
createdAt: Date.now(),
|
|
59
|
+
input: { type: "discovery", id: "watermarks" },
|
|
60
|
+
lastProcessedStage: null,
|
|
61
|
+
lastProcessedBlock: { l1: 0, l2: maxL2Block },
|
|
62
|
+
cachedData: {
|
|
63
|
+
discoveryWatermarks: watermarks,
|
|
64
|
+
},
|
|
65
|
+
metadata: {
|
|
66
|
+
errorCount: 0,
|
|
67
|
+
lastTrackedAt: Date.now(),
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
await cache.set(exports.WATERMARKS_KEY, checkpoint);
|
|
71
|
+
logTracker("saved watermarks to cache (as checkpoint)");
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Discover proposals from a governor in a block range.
|
|
75
|
+
*
|
|
76
|
+
* @param governorAddress - Governor contract address
|
|
77
|
+
* @param fromBlock - Start block (exclusive - searches from fromBlock + 1)
|
|
78
|
+
* @param toBlock - End block (inclusive)
|
|
79
|
+
* @param l2Provider - L2 provider
|
|
80
|
+
* @param options.chunkSize - Optional chunk size for log searches
|
|
81
|
+
* @returns Array of discovered proposals
|
|
82
|
+
*/
|
|
83
|
+
async function discoverProposals(governorAddress, fromBlock, toBlock, l2Provider, options = {}) {
|
|
84
|
+
logDiscovery("blocks %d-%d", fromBlock, toBlock);
|
|
85
|
+
return (0, governor_discovery_1.discoverProposals)(governorAddress, fromBlock + 1, toBlock, l2Provider, options);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Discover timelock operations from a timelock in a block range.
|
|
89
|
+
*
|
|
90
|
+
* @param timelockAddress - Timelock contract address
|
|
91
|
+
* @param fromBlock - Start block (exclusive - searches from fromBlock + 1)
|
|
92
|
+
* @param toBlock - End block (inclusive)
|
|
93
|
+
* @param l2Provider - L2 provider
|
|
94
|
+
* @param options.chunkSize - Optional chunk size for log searches
|
|
95
|
+
* @returns Array of discovered timelock operations
|
|
96
|
+
*/
|
|
97
|
+
async function discoverTimelockOps(timelockAddress, fromBlock, toBlock, l2Provider, options = {}) {
|
|
98
|
+
logDiscovery("blocks %d-%d", fromBlock, toBlock);
|
|
99
|
+
return (0, timelock_discovery_1.discoverTimelockOps)(timelockAddress, fromBlock + 1, toBlock, l2Provider, options);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create pending checkpoints for discovered proposals.
|
|
103
|
+
* This ensures they can be retracked even if the current run times out.
|
|
104
|
+
*
|
|
105
|
+
* Note: We don't create pending checkpoints for timelock ops because:
|
|
106
|
+
* 1. Most timelock ops are tracked as part of governor proposals
|
|
107
|
+
* 2. The monitor-loop skips timelock ops that were tracked via governor
|
|
108
|
+
* 3. Creating pending checkpoints for all timelock ops causes double-counting
|
|
109
|
+
*/
|
|
110
|
+
async function createPendingCheckpoints(proposals, _timelockOps, cache) {
|
|
111
|
+
if (!cache)
|
|
112
|
+
return;
|
|
113
|
+
let created = 0;
|
|
114
|
+
// Create pending checkpoints for proposals (if not already tracked)
|
|
115
|
+
// Use tx: key format to match trackByTxHash cache keys
|
|
116
|
+
for (const p of proposals) {
|
|
117
|
+
const key = `tx:${p.creationTxHash.toLowerCase()}`;
|
|
118
|
+
const existing = await cache.get(key);
|
|
119
|
+
if (existing)
|
|
120
|
+
continue; // Already has a checkpoint
|
|
121
|
+
const checkpoint = {
|
|
122
|
+
version: 1,
|
|
123
|
+
createdAt: Date.now(),
|
|
124
|
+
input: {
|
|
125
|
+
type: "governor",
|
|
126
|
+
governorAddress: p.governorAddress,
|
|
127
|
+
proposalId: p.proposalId,
|
|
128
|
+
creationTxHash: p.creationTxHash,
|
|
129
|
+
},
|
|
130
|
+
lastProcessedStage: null,
|
|
131
|
+
lastProcessedBlock: { l1: 0, l2: p.creationBlock },
|
|
132
|
+
cachedData: {},
|
|
133
|
+
metadata: { errorCount: 0, lastTrackedAt: 0 }, // lastTrackedAt=0 means never tracked
|
|
134
|
+
};
|
|
135
|
+
await cache.set(key, checkpoint);
|
|
136
|
+
created++;
|
|
137
|
+
}
|
|
138
|
+
if (created > 0) {
|
|
139
|
+
logDiscovery("created pending checkpoints: %d proposals", created);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Discover all proposals and timelock operations with auto-watermark management.
|
|
144
|
+
*
|
|
145
|
+
* This is the unified discovery API that handles everything internally:
|
|
146
|
+
* - Loads watermarks from provided watermarks or starts from governance deployment
|
|
147
|
+
* - Discovers from all enabled targets in parallel (with scoped logging)
|
|
148
|
+
* - Creates pending checkpoints for discovered items
|
|
149
|
+
* - Returns updated watermarks for saving
|
|
150
|
+
*
|
|
151
|
+
* @param targets - Which governors/timelocks to scan
|
|
152
|
+
* @param toBlock - End block for discovery
|
|
153
|
+
* @param l2Provider - L2 provider
|
|
154
|
+
* @param cache - Cache adapter for pending checkpoint creation
|
|
155
|
+
* @param fromWatermarks - Starting watermarks
|
|
156
|
+
* @param options.chunkSize - Optional chunk size for log searches
|
|
157
|
+
* @returns Discovered proposals, timelock ops, and updated watermarks
|
|
158
|
+
*/
|
|
159
|
+
async function discoverAll(targets, toBlock, l2Provider, cache, fromWatermarks, options = {}) {
|
|
160
|
+
const watermarks = fromWatermarks;
|
|
161
|
+
const defaultStartBlock = constants_1.GOVERNANCE_START_BLOCKS.L2;
|
|
162
|
+
// Helper to create scoped discovery task
|
|
163
|
+
const scopedProposalTask = (key, scopeName, governorAddress) => {
|
|
164
|
+
const fromBlock = watermarks[key] ?? defaultStartBlock;
|
|
165
|
+
return (0, logger_1.withScope)(scopeName, async () => {
|
|
166
|
+
const proposals = await discoverProposals(governorAddress, fromBlock, toBlock, l2Provider, {
|
|
167
|
+
chunkSize: options.chunkSize,
|
|
168
|
+
});
|
|
169
|
+
return { key, proposals };
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
const scopedTimelockTask = (key, scopeName, timelockAddress) => {
|
|
173
|
+
const fromBlock = watermarks[key] ?? defaultStartBlock;
|
|
174
|
+
return (0, logger_1.withScope)(scopeName, async () => {
|
|
175
|
+
const ops = await discoverTimelockOps(timelockAddress, fromBlock, toBlock, l2Provider, {
|
|
176
|
+
chunkSize: options.chunkSize,
|
|
177
|
+
});
|
|
178
|
+
return { key, ops };
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
// Build discovery tasks with scoped logging
|
|
182
|
+
const proposalTasks = [];
|
|
183
|
+
const timelockTasks = [];
|
|
184
|
+
if (targets.constitutionalGovernor) {
|
|
185
|
+
proposalTasks.push(scopedProposalTask("constitutionalGovernor", "core-gov", constants_1.ADDRESSES.CONSTITUTIONAL_GOVERNOR));
|
|
186
|
+
}
|
|
187
|
+
if (targets.nonConstitutionalGovernor) {
|
|
188
|
+
proposalTasks.push(scopedProposalTask("nonConstitutionalGovernor", "treasury-gov", constants_1.ADDRESSES.NON_CONSTITUTIONAL_GOVERNOR));
|
|
189
|
+
}
|
|
190
|
+
if (targets.electionNomineeGovernor) {
|
|
191
|
+
proposalTasks.push(scopedProposalTask("electionNomineeGovernor", "nominee-gov", constants_1.ADDRESSES.ELECTION_NOMINEE_GOVERNOR));
|
|
192
|
+
}
|
|
193
|
+
if (targets.electionMemberGovernor) {
|
|
194
|
+
proposalTasks.push(scopedProposalTask("electionMemberGovernor", "member-gov", constants_1.ADDRESSES.ELECTION_MEMBER_GOVERNOR));
|
|
195
|
+
}
|
|
196
|
+
if (targets.l2ConstitutionalTimelock) {
|
|
197
|
+
timelockTasks.push(scopedTimelockTask("l2ConstitutionalTimelock", "core-timelock", constants_1.ADDRESSES.L2_CONSTITUTIONAL_TIMELOCK));
|
|
198
|
+
}
|
|
199
|
+
if (targets.l2NonConstitutionalTimelock) {
|
|
200
|
+
timelockTasks.push(scopedTimelockTask("l2NonConstitutionalTimelock", "treasury-timelock", constants_1.ADDRESSES.L2_NON_CONSTITUTIONAL_TIMELOCK));
|
|
201
|
+
}
|
|
202
|
+
// Run all discovery in parallel
|
|
203
|
+
const [proposalResults, timelockResults] = await Promise.all([
|
|
204
|
+
Promise.all(proposalTasks),
|
|
205
|
+
Promise.all(timelockTasks),
|
|
206
|
+
]);
|
|
207
|
+
// Collect results and update watermarks
|
|
208
|
+
const allProposals = [];
|
|
209
|
+
const allTimelockOps = [];
|
|
210
|
+
const newWatermarks = { ...watermarks };
|
|
211
|
+
for (const { key, proposals } of proposalResults) {
|
|
212
|
+
allProposals.push(...proposals);
|
|
213
|
+
newWatermarks[key] = toBlock;
|
|
214
|
+
}
|
|
215
|
+
for (const { key, ops } of timelockResults) {
|
|
216
|
+
allTimelockOps.push(...ops);
|
|
217
|
+
newWatermarks[key] = toBlock;
|
|
218
|
+
}
|
|
219
|
+
// Create pending checkpoints for discovered items
|
|
220
|
+
await createPendingCheckpoints(allProposals, allTimelockOps, cache);
|
|
221
|
+
logDiscovery("complete: %d proposals, %d timelockOps", allProposals.length, allTimelockOps.length);
|
|
222
|
+
return {
|
|
223
|
+
proposals: allProposals,
|
|
224
|
+
timelockOps: allTimelockOps,
|
|
225
|
+
watermarks: newWatermarks,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/tracker/discovery.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA8BH,wCAMC;AAOD,wCAmCC;AAYD,8CASC;AAYD,kDASC;AAWD,4DAqCC;AAmBD,kCAwIC;AA/TD,4CAAkE;AAClE,wEAGyC;AACzC,wEAGyC;AACzC,4CAAqD;AAErD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,gBAAO,CAAC;AAIjE;;;GAGG;AACU,QAAA,cAAc,GAAG,sBAAsB,CAAC;AAErD;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAClC,KAA+B;IAE/B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,GAAG,CAAqB,sBAAc,CAAC,CAAC;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**
|
|
2
|
+
* Tracker Execute Module
|
|
3
|
+
*
|
|
4
|
+
* Handles transaction preparation for READY stages.
|
|
5
|
+
* This module encapsulates all execution-related operations.
|
|
6
|
+
*/
|
|
7
|
+
import { ethers } from "ethers";
|
|
8
|
+
import { TrackedStage, PrepareResult, PrepareOptions } from "../types";
|
|
9
|
+
/**
|
|
10
|
+
* Context for execution operations
|
|
11
|
+
*/
|
|
12
|
+
export interface ExecuteContext {
|
|
13
|
+
l1Provider: ethers.providers.Provider;
|
|
14
|
+
l2Provider: ethers.providers.Provider;
|
|
15
|
+
novaProvider: ethers.providers.Provider;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Prepare a transaction for a READY stage without sending it.
|
|
19
|
+
*
|
|
20
|
+
* Returns PrepareResult with the prepared transaction data.
|
|
21
|
+
* Consumer is responsible for signing and sending the transaction.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const result = await prepareTransaction(readyStage, context, options);
|
|
26
|
+
* if (result.success) {
|
|
27
|
+
* console.log(`To: ${result.prepared.to}`);
|
|
28
|
+
* console.log(`Data: ${result.prepared.data}`);
|
|
29
|
+
* console.log(`Chain: ${result.prepared.chain}`);
|
|
30
|
+
*
|
|
31
|
+
* // Execute with your own signer
|
|
32
|
+
* const tx = await signer.sendTransaction({
|
|
33
|
+
* to: result.prepared.to,
|
|
34
|
+
* data: result.prepared.data,
|
|
35
|
+
* value: result.prepared.value,
|
|
36
|
+
* });
|
|
37
|
+
* await tx.wait();
|
|
38
|
+
* } else {
|
|
39
|
+
* console.error(result.error);
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function prepareTransaction(stage: TrackedStage, context: ExecuteContext, options?: PrepareOptions): Promise<PrepareResult>;
|
|
44
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/tracker/execute.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAgB,MAAM,UAAU,CAAC;AAUrF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAgGxB"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tracker Execute Module
|
|
4
|
+
*
|
|
5
|
+
* Handles transaction preparation for READY stages.
|
|
6
|
+
* This module encapsulates all execution-related operations.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.prepareTransaction = prepareTransaction;
|
|
10
|
+
const ethers_1 = require("ethers");
|
|
11
|
+
const types_1 = require("../types");
|
|
12
|
+
const proposal_queued_1 = require("../stages/proposal-queued");
|
|
13
|
+
const timelock_1 = require("../stages/timelock");
|
|
14
|
+
const l2_to_l1_message_1 = require("../stages/l2-to-l1-message");
|
|
15
|
+
const retryables_1 = require("../stages/retryables");
|
|
16
|
+
const base_1 = require("../stages/base");
|
|
17
|
+
const logger_1 = require("../utils/logger");
|
|
18
|
+
const log = logger_1.loggers.execution;
|
|
19
|
+
/**
|
|
20
|
+
* Prepare a transaction for a READY stage without sending it.
|
|
21
|
+
*
|
|
22
|
+
* Returns PrepareResult with the prepared transaction data.
|
|
23
|
+
* Consumer is responsible for signing and sending the transaction.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const result = await prepareTransaction(readyStage, context, options);
|
|
28
|
+
* if (result.success) {
|
|
29
|
+
* console.log(`To: ${result.prepared.to}`);
|
|
30
|
+
* console.log(`Data: ${result.prepared.data}`);
|
|
31
|
+
* console.log(`Chain: ${result.prepared.chain}`);
|
|
32
|
+
*
|
|
33
|
+
* // Execute with your own signer
|
|
34
|
+
* const tx = await signer.sendTransaction({
|
|
35
|
+
* to: result.prepared.to,
|
|
36
|
+
* data: result.prepared.data,
|
|
37
|
+
* value: result.prepared.value,
|
|
38
|
+
* });
|
|
39
|
+
* await tx.wait();
|
|
40
|
+
* } else {
|
|
41
|
+
* console.error(result.error);
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
async function prepareTransaction(stage, context, options = {}) {
|
|
46
|
+
const { l1Provider, l2Provider, novaProvider } = context;
|
|
47
|
+
log("prepareTransaction type=%s status=%s", stage.type, stage.status);
|
|
48
|
+
switch (stage.type) {
|
|
49
|
+
case "PROPOSAL_QUEUED": {
|
|
50
|
+
// Queue a proposal on the governor (calls governor.queue())
|
|
51
|
+
const queueData = (0, types_1.getStageData)(stage, "PROPOSAL_QUEUED");
|
|
52
|
+
if (!queueData) {
|
|
53
|
+
return (0, base_1.failPrepare)("Stage is not a PROPOSAL_QUEUED stage");
|
|
54
|
+
}
|
|
55
|
+
const { governorAddress, proposalId, targets, values, calldatas, description } = queueData;
|
|
56
|
+
if (!governorAddress || !proposalId || !targets || !values || !calldatas || !description) {
|
|
57
|
+
return (0, base_1.failPrepare)("Missing proposal queue params in stage data");
|
|
58
|
+
}
|
|
59
|
+
return (0, proposal_queued_1.prepareGovernorQueue)(governorAddress, proposalId, {
|
|
60
|
+
targets,
|
|
61
|
+
values: values.map((v) => ethers_1.ethers.BigNumber.from(v)),
|
|
62
|
+
calldatas,
|
|
63
|
+
descriptionHash: ethers_1.ethers.utils.id(description),
|
|
64
|
+
}, l2Provider);
|
|
65
|
+
}
|
|
66
|
+
case "L2_TIMELOCK": {
|
|
67
|
+
return (0, timelock_1.prepareTimelockStage)(stage, l2Provider, options);
|
|
68
|
+
}
|
|
69
|
+
case "L1_TIMELOCK": {
|
|
70
|
+
return (0, timelock_1.prepareTimelockStage)(stage, l1Provider, options);
|
|
71
|
+
}
|
|
72
|
+
case "L2_TO_L1_MESSAGE": {
|
|
73
|
+
const { total, results } = await (0, l2_to_l1_message_1.prepareL2ToL1MessageStage)(stage, l2Provider, l1Provider, {
|
|
74
|
+
force: options.force,
|
|
75
|
+
});
|
|
76
|
+
if (results.length === 0) {
|
|
77
|
+
return (0, base_1.failPrepare)("No messages to prepare");
|
|
78
|
+
}
|
|
79
|
+
// If there are multiple messages, return success but include warning about additional messages
|
|
80
|
+
if (total > 1 && results[0].success) {
|
|
81
|
+
return {
|
|
82
|
+
...results[0],
|
|
83
|
+
prepared: {
|
|
84
|
+
...results[0].prepared,
|
|
85
|
+
description: results[0].prepared.description +
|
|
86
|
+
` [1/${total} messages - use prepareL2ToL1MessageStage() for all]`,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return results[0];
|
|
91
|
+
}
|
|
92
|
+
case "RETRYABLE_EXECUTED": {
|
|
93
|
+
const retryableData = (0, types_1.getStageData)(stage, "RETRYABLE_EXECUTED");
|
|
94
|
+
const targetChain = retryableData?.targetChains?.[0];
|
|
95
|
+
// Validate target chain exists before selecting provider
|
|
96
|
+
if (!targetChain) {
|
|
97
|
+
return (0, base_1.failPrepare)("No target chain found in retryable stage data");
|
|
98
|
+
}
|
|
99
|
+
const targetProvider = targetChain === "Nova" ? novaProvider : l2Provider;
|
|
100
|
+
if (!targetProvider) {
|
|
101
|
+
return (0, base_1.failPrepare)("Target chain provider not available");
|
|
102
|
+
}
|
|
103
|
+
const { total, results } = await (0, retryables_1.prepareRetryableStage)(stage, l1Provider, targetProvider, {
|
|
104
|
+
force: options.force,
|
|
105
|
+
});
|
|
106
|
+
if (results.length === 0) {
|
|
107
|
+
return (0, base_1.failPrepare)("No tickets to prepare");
|
|
108
|
+
}
|
|
109
|
+
// If there are multiple tickets, return success but include warning
|
|
110
|
+
if (total > 1 && results[0].success) {
|
|
111
|
+
return {
|
|
112
|
+
...results[0],
|
|
113
|
+
prepared: {
|
|
114
|
+
...results[0].prepared,
|
|
115
|
+
description: results[0].prepared.description +
|
|
116
|
+
` [1/${total} tickets - use prepareRetryableStage() for all]`,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return results[0];
|
|
121
|
+
}
|
|
122
|
+
default:
|
|
123
|
+
return (0, base_1.failPrepare)(`Preparation not supported for stage type: ${stage.type}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../src/tracker/execute.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgDH,gDAoGC;AAlJD,mCAAgC;AAChC,oCAAqF;AACrF,+DAAiE;AACjE,iDAA0D;AAC1D,iEAAuE;AACvE,qDAA6D;AAC7D,yCAA6C;AAC7C,4CAA0C;AAE1C,MAAM,GAAG,GAAG,gBAAO,CAAC,SAAS,CAAC;AAW9B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,KAAK,UAAU,kBAAkB,CACtC,KAAmB,EACnB,OAAuB,EACvB,UAA0B,EAAE;IAE5B,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACzD,GAAG,CAAC,sCAAsC,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEtE,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,iBAAiB,CAAC,CAAC,C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AM,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO,IAAA,kBAAW,EAAC,uBAAuB,CAAC,CAAC;YAC9C,CAAC;YACD,oEAAoE;YACpE,IAAI,KAAK,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;gBACpC,OAAO;oBACL,GAAG,OAAO,CAAC,CAAC,CAAC;oBACb,QAAQ,EAAE;wBACR,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ;wBACtB,WAAW,EACT,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW;4BAC/B,OAAO,KAAK,iDAAiD;qBAChE;iBACF,CAAC;YACJ,CAAC;YACD,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QAED;YACE,OAAO,IAAA,kBAAW,EAAC,6CAA6C,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracker module re-exports
|
|
3
|
+
*
|
|
4
|
+
* This module consolidates exports from the tracker subsystem:
|
|
5
|
+
* - context.ts: TrackingContext state management
|
|
6
|
+
* - pipeline.ts: Stage tracking pipeline functions
|
|
7
|
+
* - discovery.ts: Proposal and timelock discovery
|
|
8
|
+
* - query.ts: Cache query operations
|
|
9
|
+
* - execute.ts: Transaction preparation
|
|
10
|
+
* - state.ts: Cache utilities
|
|
11
|
+
*/
|
|
12
|
+
export { Providers, CreateTrackingContextOptions, TrackingContext, createTrackingContext, addStage, isStageCompleted, getCompletedStage, getCachedStage, isComplete, getGovernorAddress, getProposalId, getTimelockAddress, getOperationId, getCallScheduledData, getFirstCallScheduledData, getQueueBlockNumber, getProposalData, getProposalType, getIsElection, getProposalState, getL2ExecutionTxHash, getFirstExecutableBlock, getOutboxExecutionTx, getL1ExecutionTxHash, createCheckpoint, toResult, } from "./context";
|
|
13
|
+
export { trackGovernorPipeline, trackTimelockPipeline } from "./pipeline";
|
|
14
|
+
export { discoverAll, discoverProposals, discoverTimelockOps, DiscoveredProposal, DiscoveredTimelockOp, loadWatermarks, saveWatermarks, WATERMARKS_KEY, } from "./discovery";
|
|
15
|
+
export { listCheckpointKeys, getCheckpoint, getAllCheckpoints, queryIncompleteCheckpoints, getStats, } from "./query";
|
|
16
|
+
export { prepareTransaction } from "./execute";
|
|
17
|
+
export { txHashCacheKey, readCacheStatus } from "./state";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tracker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAEL,SAAS,EACT,4BAA4B,EAC5B,eAAe,EAEf,qBAAqB,EAErB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,UAAU,EAEV,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EAEpB,gBAAgB,EAChB,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAG1E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,0BAA0B,EAC1B,QAAQ,GACT,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tracker module re-exports
|
|
4
|
+
*
|
|
5
|
+
* This module consolidates exports from the tracker subsystem:
|
|
6
|
+
* - context.ts: TrackingContext state management
|
|
7
|
+
* - pipeline.ts: Stage tracking pipeline functions
|
|
8
|
+
* - discovery.ts: Proposal and timelock discovery
|
|
9
|
+
* - query.ts: Cache query operations
|
|
10
|
+
* - execute.ts: Transaction preparation
|
|
11
|
+
* - state.ts: Cache utilities
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.readCacheStatus = exports.txHashCacheKey = exports.prepareTransaction = exports.getStats = exports.queryIncompleteCheckpoints = exports.getAllCheckpoints = exports.getCheckpoint = exports.listCheckpointKeys = exports.WATERMARKS_KEY = exports.saveWatermarks = exports.loadWatermarks = exports.discoverTimelockOps = exports.discoverProposals = exports.discoverAll = exports.trackTimelockPipeline = exports.trackGovernorPipeline = exports.toResult = exports.createCheckpoint = exports.getL1ExecutionTxHash = exports.getOutboxExecutionTx = exports.getFirstExecutableBlock = exports.getL2ExecutionTxHash = exports.getProposalState = exports.getIsElection = exports.getProposalType = exports.getProposalData = exports.getQueueBlockNumber = exports.getFirstCallScheduledData = exports.getCallScheduledData = exports.getOperationId = exports.getTimelockAddress = exports.getProposalId = exports.getGovernorAddress = exports.isComplete = exports.getCachedStage = exports.getCompletedStage = exports.isStageCompleted = exports.addStage = exports.createTrackingContext = void 0;
|
|
15
|
+
// Context - TrackingContext state management
|
|
16
|
+
var context_1 = require("./context");
|
|
17
|
+
// State creation
|
|
18
|
+
Object.defineProperty(exports, "createTrackingContext", { enumerable: true, get: function () { return context_1.createTrackingContext; } });
|
|
19
|
+
// Stage management
|
|
20
|
+
Object.defineProperty(exports, "addStage", { enumerable: true, get: function () { return context_1.addStage; } });
|
|
21
|
+
Object.defineProperty(exports, "isStageCompleted", { enumerable: true, get: function () { return context_1.isStageCompleted; } });
|
|
22
|
+
Object.defineProperty(exports, "getCompletedStage", { enumerable: true, get: function () { return context_1.getCompletedStage; } });
|
|
23
|
+
Object.defineProperty(exports, "getCachedStage", { enumerable: true, get: function () { return context_1.getCachedStage; } });
|
|
24
|
+
Object.defineProperty(exports, "isComplete", { enumerable: true, get: function () { return context_1.isComplete; } });
|
|
25
|
+
// Derived getters
|
|
26
|
+
Object.defineProperty(exports, "getGovernorAddress", { enumerable: true, get: function () { return context_1.getGovernorAddress; } });
|
|
27
|
+
Object.defineProperty(exports, "getProposalId", { enumerable: true, get: function () { return context_1.getProposalId; } });
|
|
28
|
+
Object.defineProperty(exports, "getTimelockAddress", { enumerable: true, get: function () { return context_1.getTimelockAddress; } });
|
|
29
|
+
Object.defineProperty(exports, "getOperationId", { enumerable: true, get: function () { return context_1.getOperationId; } });
|
|
30
|
+
Object.defineProperty(exports, "getCallScheduledData", { enumerable: true, get: function () { return context_1.getCallScheduledData; } });
|
|
31
|
+
Object.defineProperty(exports, "getFirstCallScheduledData", { enumerable: true, get: function () { return context_1.getFirstCallScheduledData; } });
|
|
32
|
+
Object.defineProperty(exports, "getQueueBlockNumber", { enumerable: true, get: function () { return context_1.getQueueBlockNumber; } });
|
|
33
|
+
Object.defineProperty(exports, "getProposalData", { enumerable: true, get: function () { return context_1.getProposalData; } });
|
|
34
|
+
Object.defineProperty(exports, "getProposalType", { enumerable: true, get: function () { return context_1.getProposalType; } });
|
|
35
|
+
Object.defineProperty(exports, "getIsElection", { enumerable: true, get: function () { return context_1.getIsElection; } });
|
|
36
|
+
Object.defineProperty(exports, "getProposalState", { enumerable: true, get: function () { return context_1.getProposalState; } });
|
|
37
|
+
Object.defineProperty(exports, "getL2ExecutionTxHash", { enumerable: true, get: function () { return context_1.getL2ExecutionTxHash; } });
|
|
38
|
+
Object.defineProperty(exports, "getFirstExecutableBlock", { enumerable: true, get: function () { return context_1.getFirstExecutableBlock; } });
|
|
39
|
+
Object.defineProperty(exports, "getOutboxExecutionTx", { enumerable: true, get: function () { return context_1.getOutboxExecutionTx; } });
|
|
40
|
+
Object.defineProperty(exports, "getL1ExecutionTxHash", { enumerable: true, get: function () { return context_1.getL1ExecutionTxHash; } });
|
|
41
|
+
// Checkpoint
|
|
42
|
+
Object.defineProperty(exports, "createCheckpoint", { enumerable: true, get: function () { return context_1.createCheckpoint; } });
|
|
43
|
+
Object.defineProperty(exports, "toResult", { enumerable: true, get: function () { return context_1.toResult; } });
|
|
44
|
+
// Pipeline - Stage tracking functions
|
|
45
|
+
var pipeline_1 = require("./pipeline");
|
|
46
|
+
Object.defineProperty(exports, "trackGovernorPipeline", { enumerable: true, get: function () { return pipeline_1.trackGovernorPipeline; } });
|
|
47
|
+
Object.defineProperty(exports, "trackTimelockPipeline", { enumerable: true, get: function () { return pipeline_1.trackTimelockPipeline; } });
|
|
48
|
+
// Discovery
|
|
49
|
+
var discovery_1 = require("./discovery");
|
|
50
|
+
Object.defineProperty(exports, "discoverAll", { enumerable: true, get: function () { return discovery_1.discoverAll; } });
|
|
51
|
+
Object.defineProperty(exports, "discoverProposals", { enumerable: true, get: function () { return discovery_1.discoverProposals; } });
|
|
52
|
+
Object.defineProperty(exports, "discoverTimelockOps", { enumerable: true, get: function () { return discovery_1.discoverTimelockOps; } });
|
|
53
|
+
Object.defineProperty(exports, "loadWatermarks", { enumerable: true, get: function () { return discovery_1.loadWatermarks; } });
|
|
54
|
+
Object.defineProperty(exports, "saveWatermarks", { enumerable: true, get: function () { return discovery_1.saveWatermarks; } });
|
|
55
|
+
Object.defineProperty(exports, "WATERMARKS_KEY", { enumerable: true, get: function () { return discovery_1.WATERMARKS_KEY; } });
|
|
56
|
+
// Query
|
|
57
|
+
var query_1 = require("./query");
|
|
58
|
+
Object.defineProperty(exports, "listCheckpointKeys", { enumerable: true, get: function () { return query_1.listCheckpointKeys; } });
|
|
59
|
+
Object.defineProperty(exports, "getCheckpoint", { enumerable: true, get: function () { return query_1.getCheckpoint; } });
|
|
60
|
+
Object.defineProperty(exports, "getAllCheckpoints", { enumerable: true, get: function () { return query_1.getAllCheckpoints; } });
|
|
61
|
+
Object.defineProperty(exports, "queryIncompleteCheckpoints", { enumerable: true, get: function () { return query_1.queryIncompleteCheckpoints; } });
|
|
62
|
+
Object.defineProperty(exports, "getStats", { enumerable: true, get: function () { return query_1.getStats; } });
|
|
63
|
+
// Execute
|
|
64
|
+
var execute_1 = require("./execute");
|
|
65
|
+
Object.defineProperty(exports, "prepareTransaction", { enumerable: true, get: function () { return execute_1.prepareTransaction; } });
|
|
66
|
+
// State utilities
|
|
67
|
+
var state_1 = require("./state");
|
|
68
|
+
Object.defineProperty(exports, "txHashCacheKey", { enumerable: true, get: function () { return state_1.txHashCacheKey; } });
|
|
69
|
+
Object.defineProperty(exports, "readCacheStatus", { enumerable: true, get: function () { return state_1.readCacheStatus; } });
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tracker/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,6CAA6C;AAC7C,qCAgCmB;AA3BjB,iBAAiB;AACjB,gHAAA,qBAAqB,OAAA;AACrB,mBAAmB;AACnB,mGAAA,QAAQ,OAAA;AACR,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,yGAAA,cAAc,OAAA;AACd,qGAAA,UAAU,OAAA;AACV,kBAAkB;AAClB,6GAAA,kBAAkB,OAAA;AAClB,wGAAA,aAAa,OAAA;AACb,6GAAA,kBAAkB,OAAA;AAClB,yGAAA,cAAc,OAAA;AACd,+GAAA,oBAAoB,OAAA;AACpB,oHAAA,yBAAyB,OAAA;AACzB,8GAAA,mBAAmB,OAAA;AACnB,0GAAA,eAAe,OAAA;AACf,0GAAA,eAAe,OAAA;AACf,wGAAA,aAAa,OAAA;AACb,2GAAA,gBAAgB,OAAA;AAChB,+GAAA,oBAAoB,OAAA;AACpB,kHAAA,uBAAuB,OAAA;AACvB,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,aAAa;AACb,2GAAA,gBAAgB,OAAA;AAChB,mGAAA,QAAQ,OAAA;AAGV,sCAAsC;AACtC,uCAA0E;AAAjE,iHAAA,qBAAqB,OAAA;AAAE,iHAAA,qBAAqB,OAAA;AAErD,YAAY;AACZ,yCASqB;AARnB,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AAGnB,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AAGhB,QAAQ;AACR,iCAMiB;AALf,2GAAA,kBAAkB,OAAA;AAClB,sGAAA,aAAa,OAAA;AACb,0GAAA,iBAAiB,OAAA;AACjB,mHAAA,0BAA0B,OAAA;AAC1B,iGAAA,QAAQ,OAAA;AAGV,UAAU;AACV,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAE3B,kBAAkB;AAClB,iCAA0D;AAAjD,uGAAA,cAAc,OAAA;AAAE,wGAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline Stage Functions
|
|
3
|
+
*
|
|
4
|
+
* Pure functions that track stages and return updated state.
|
|
5
|
+
* Each function reads from state, performs tracking, and returns new state.
|
|
6
|
+
*/
|
|
7
|
+
import { TrackingContext } from "./context";
|
|
8
|
+
export declare function pipelineTrackProposalCreated(state: TrackingContext): Promise<{
|
|
9
|
+
state: TrackingContext;
|
|
10
|
+
found: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function pipelineTrackVoting(state: TrackingContext): Promise<{
|
|
13
|
+
state: TrackingContext;
|
|
14
|
+
complete: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function pipelineTrackProposalQueued(state: TrackingContext): Promise<{
|
|
17
|
+
state: TrackingContext;
|
|
18
|
+
queued: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function pipelineTrackL2Timelock(state: TrackingContext): Promise<{
|
|
21
|
+
state: TrackingContext;
|
|
22
|
+
executed: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function pipelineTrackL2ToL1Message(state: TrackingContext): Promise<{
|
|
25
|
+
state: TrackingContext;
|
|
26
|
+
executed: boolean;
|
|
27
|
+
needsL1: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function pipelineTrackL1Timelock(state: TrackingContext): Promise<{
|
|
30
|
+
state: TrackingContext;
|
|
31
|
+
executed: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function pipelineTrackRetryables(state: TrackingContext): Promise<{
|
|
34
|
+
state: TrackingContext;
|
|
35
|
+
redeemed: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Track full governor proposal pipeline.
|
|
39
|
+
* Returns final state after tracking all stages.
|
|
40
|
+
*/
|
|
41
|
+
export declare function trackGovernorPipeline(state: TrackingContext): Promise<TrackingContext>;
|
|
42
|
+
/**
|
|
43
|
+
* Track timelock pipeline (stages 4-7).
|
|
44
|
+
* Used by governor pipeline and direct timelock tracking.
|
|
45
|
+
*/
|
|
46
|
+
export declare function trackTimelockPipeline(state: TrackingContext): Promise<TrackingContext>;
|
|
47
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/tracker/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,eAAe,EAiBhB,MAAM,WAAW,CAAC;AAuEnB,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAwBrD;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,e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