@aztec/ethereum 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a
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/dest/client.d.ts +11 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +35 -3
- package/dest/contracts/chain_state_override.d.ts +47 -7
- package/dest/contracts/chain_state_override.d.ts.map +1 -1
- package/dest/contracts/chain_state_override.js +57 -20
- package/dest/contracts/empire_base.d.ts +1 -3
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.d.ts +6 -2
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.js +11 -6
- package/dest/contracts/governance.d.ts +108 -33
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +193 -12
- package/dest/contracts/governance_proposer.d.ts +33 -3
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +51 -9
- package/dest/contracts/inbox.js +1 -1
- package/dest/contracts/multicall.d.ts +79 -13
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +117 -95
- package/dest/contracts/outbox.d.ts +27 -4
- package/dest/contracts/outbox.d.ts.map +1 -1
- package/dest/contracts/outbox.js +34 -7
- package/dest/contracts/rollup.d.ts +327 -57
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +102 -40
- package/dest/l1_artifacts.d.ts +5108 -155
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_contract_addresses.d.ts +61 -61
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +101 -76
- package/dest/l1_reader.d.ts +3 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +3 -6
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +7 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +21 -10
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +2 -1
- package/dest/l1_tx_utils/tx_delayer.d.ts +5 -3
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -1
- package/dest/l1_tx_utils/tx_delayer.js +7 -5
- package/dest/test/eth_cheat_codes.d.ts +7 -1
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +11 -0
- package/dest/test/rollup_cheat_codes.d.ts +27 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +50 -6
- package/dest/utils.d.ts +9 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +34 -6
- package/package.json +6 -6
- package/src/client.ts +39 -1
- package/src/contracts/chain_state_override.ts +77 -24
- package/src/contracts/empire_base.ts +0 -2
- package/src/contracts/fee_asset_price_oracle.ts +10 -5
- package/src/contracts/governance.ts +266 -9
- package/src/contracts/governance_proposer.ts +52 -5
- package/src/contracts/inbox.ts +1 -1
- package/src/contracts/multicall.ts +179 -105
- package/src/contracts/outbox.ts +42 -8
- package/src/contracts/rollup.ts +124 -42
- package/src/l1_contract_addresses.ts +120 -87
- package/src/l1_reader.ts +4 -9
- package/src/l1_tx_utils/l1_tx_utils.ts +27 -14
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +2 -1
- package/src/l1_tx_utils/tx_delayer.ts +16 -7
- package/src/test/eth_cheat_codes.ts +10 -0
- package/src/test/rollup_cheat_codes.ts +53 -5
- package/src/utils.ts +30 -6
|
@@ -4,6 +4,24 @@ import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
|
4
4
|
import { encodeFunctionData, getContract, parseEventLogs } from 'viem';
|
|
5
5
|
import { createL1TxUtils } from '../l1_tx_utils/index.js';
|
|
6
6
|
import { isExtendedClient } from '../types.js';
|
|
7
|
+
// Minimal ABI for IProposerPayload (`l1-contracts/src/governance/interfaces/IProposerPayload.sol`).
|
|
8
|
+
// The GovernanceProposer wraps every original payload in a GSEPayload before submitting it to
|
|
9
|
+
// Governance, so `Proposal.payload` on the Governance contract is the wrapper address rather than
|
|
10
|
+
// the original. We only need `getOriginalPayload` to recover the underlying payload, so we inline
|
|
11
|
+
// the ABI here instead of generating a full artifact.
|
|
12
|
+
const ProposerPayloadAbi = [
|
|
13
|
+
{
|
|
14
|
+
type: 'function',
|
|
15
|
+
name: 'getOriginalPayload',
|
|
16
|
+
inputs: [],
|
|
17
|
+
outputs: [
|
|
18
|
+
{
|
|
19
|
+
type: 'address'
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
stateMutability: 'view'
|
|
23
|
+
}
|
|
24
|
+
];
|
|
7
25
|
// NOTE: Must be kept in sync with DataStructures.ProposalState in l1-contracts
|
|
8
26
|
export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
9
27
|
ProposalState[ProposalState["Pending"] = 0] = "Pending";
|
|
@@ -16,6 +34,31 @@ export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
|
16
34
|
ProposalState[ProposalState["Expired"] = 7] = "Expired";
|
|
17
35
|
return ProposalState;
|
|
18
36
|
}({});
|
|
37
|
+
/** Set of `ProposalState` values for which a proposal is fully immutable on-chain. */ const TERMINAL_PROPOSAL_STATES = new Set([
|
|
38
|
+
5,
|
|
39
|
+
4,
|
|
40
|
+
6,
|
|
41
|
+
7
|
|
42
|
+
]);
|
|
43
|
+
// Hard upper bound on the wall-clock lifetime of any Governance proposal, in seconds.
|
|
44
|
+
// Each proposal stores its own snapshot of `ProposalConfiguration` at creation time and progresses
|
|
45
|
+
// through Pending -> Active -> Queued -> Executable using those frozen durations
|
|
46
|
+
// (see `ProposalLib.{pendingThrough,activeThrough,queuedThrough,executableThrough}`). Each of those
|
|
47
|
+
// four durations is bounded by `ConfigurationLib.TIME_UPPER = 90 days` (validated in
|
|
48
|
+
// `ConfigurationLib.assertValid`), so no proposal can be live for more than 4 * 90 days regardless
|
|
49
|
+
// of what config it was created under. Once past this point, the proposal is guaranteed to be in a
|
|
50
|
+
// terminal state (Executed / Rejected / Dropped / Expired).
|
|
51
|
+
export const MAX_PROPOSAL_LIFETIME_SECONDS = 4n * 90n * 24n * 3600n;
|
|
52
|
+
/**
|
|
53
|
+
* Validates a number returned by an on-chain `ProposalState` enum field and narrows it to the
|
|
54
|
+
* `ProposalState` enum. Throws if the value is out of range.
|
|
55
|
+
*/ function asProposalState(raw) {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
57
|
+
if (raw < 0 || raw > 7) {
|
|
58
|
+
throw new Error(`Invalid proposal state: ${raw}`);
|
|
59
|
+
}
|
|
60
|
+
return raw;
|
|
61
|
+
}
|
|
19
62
|
export function extractProposalIdFromLogs(logs) {
|
|
20
63
|
const parsedLogs = parseEventLogs({
|
|
21
64
|
abi: GovernanceAbi,
|
|
@@ -30,8 +73,22 @@ export function extractProposalIdFromLogs(logs) {
|
|
|
30
73
|
export class ReadOnlyGovernanceContract {
|
|
31
74
|
client;
|
|
32
75
|
governanceContract;
|
|
76
|
+
/**
|
|
77
|
+
* Cache of fully-resolved proposals keyed by id. We populate this lazily and only retain entries
|
|
78
|
+
* whose state is provably terminal -- once `cachedState` is `Executed` or `Dropped` the on-chain
|
|
79
|
+
* proposal struct is frozen and safe to memoize indefinitely. Other state transitions (e.g.
|
|
80
|
+
* Pending -> Active, or accumulating votes) leave the cache untouched and force a fresh fetch.
|
|
81
|
+
*/ proposalCache;
|
|
82
|
+
/**
|
|
83
|
+
* Cache of `IProposerPayload.getOriginalPayload()` results keyed by wrapper address. The wrapper
|
|
84
|
+
* contract's bytecode is immutable, so this mapping never changes -- a value of `undefined`
|
|
85
|
+
* encodes a proposal whose payload doesn't implement `getOriginalPayload` (e.g. proposeWithLock
|
|
86
|
+
* proposals) and should be treated as "no original".
|
|
87
|
+
*/ originalPayloadCache;
|
|
33
88
|
constructor(address, client){
|
|
34
89
|
this.client = client;
|
|
90
|
+
this.proposalCache = new Map();
|
|
91
|
+
this.originalPayloadCache = new Map();
|
|
35
92
|
this.governanceContract = getContract({
|
|
36
93
|
address,
|
|
37
94
|
abi: GovernanceAbi,
|
|
@@ -44,23 +101,147 @@ export class ReadOnlyGovernanceContract {
|
|
|
44
101
|
async getGovernanceProposerAddress() {
|
|
45
102
|
return EthAddress.fromString(await this.governanceContract.read.governanceProposer());
|
|
46
103
|
}
|
|
47
|
-
getConfiguration() {
|
|
48
|
-
|
|
104
|
+
async getConfiguration() {
|
|
105
|
+
const raw = await this.governanceContract.read.getConfiguration();
|
|
106
|
+
return {
|
|
107
|
+
proposeConfig: {
|
|
108
|
+
lockDelay: raw.proposeConfig.lockDelay,
|
|
109
|
+
lockAmount: raw.proposeConfig.lockAmount
|
|
110
|
+
},
|
|
111
|
+
votingDelay: raw.votingDelay,
|
|
112
|
+
votingDuration: raw.votingDuration,
|
|
113
|
+
executionDelay: raw.executionDelay,
|
|
114
|
+
gracePeriod: raw.gracePeriod,
|
|
115
|
+
quorum: raw.quorum,
|
|
116
|
+
requiredYeaMargin: raw.requiredYeaMargin,
|
|
117
|
+
minimumVotes: raw.minimumVotes
|
|
118
|
+
};
|
|
49
119
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Fetches a proposal by id together with its live state, returning the mapped {@link Proposal}
|
|
122
|
+
* type. Issues `getProposal` and `getProposalState` in parallel so the result carries both the
|
|
123
|
+
* raw stored `cachedState` and the time-derived `state` -- callers can use whichever they need
|
|
124
|
+
* without an extra round-trip.
|
|
125
|
+
*
|
|
126
|
+
* Backed by an in-memory cache that retains entries only when `state` is in one of the four
|
|
127
|
+
* terminal phases (`Executed` / `Rejected` / `Dropped` / `Expired`). At that point the entire
|
|
128
|
+
* proposal struct is provably immutable on-chain (no further votes can be cast and no
|
|
129
|
+
* state-mutating call can succeed), so caching is safe forever. Non-terminal states force a
|
|
130
|
+
* fresh fetch on every call so callers always see fresh `state` and `summedBallot` values.
|
|
131
|
+
*/ async getProposal(proposalId) {
|
|
132
|
+
const cached = this.proposalCache.get(proposalId);
|
|
133
|
+
if (cached !== undefined) {
|
|
134
|
+
return cached;
|
|
135
|
+
}
|
|
136
|
+
const [raw, rawState] = await Promise.all([
|
|
137
|
+
this.governanceContract.read.getProposal([
|
|
138
|
+
proposalId
|
|
139
|
+
]),
|
|
140
|
+
this.governanceContract.read.getProposalState([
|
|
141
|
+
proposalId
|
|
142
|
+
])
|
|
53
143
|
]);
|
|
144
|
+
const proposal = {
|
|
145
|
+
config: {
|
|
146
|
+
votingDelay: raw.config.votingDelay,
|
|
147
|
+
votingDuration: raw.config.votingDuration,
|
|
148
|
+
executionDelay: raw.config.executionDelay,
|
|
149
|
+
gracePeriod: raw.config.gracePeriod,
|
|
150
|
+
quorum: raw.config.quorum,
|
|
151
|
+
requiredYeaMargin: raw.config.requiredYeaMargin,
|
|
152
|
+
minimumVotes: raw.config.minimumVotes
|
|
153
|
+
},
|
|
154
|
+
cachedState: asProposalState(raw.cachedState),
|
|
155
|
+
state: asProposalState(rawState),
|
|
156
|
+
payload: EthAddress.fromString(raw.payload),
|
|
157
|
+
proposer: EthAddress.fromString(raw.proposer),
|
|
158
|
+
creation: raw.creation,
|
|
159
|
+
summedBallot: {
|
|
160
|
+
yea: raw.summedBallot.yea,
|
|
161
|
+
nay: raw.summedBallot.nay
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
if (TERMINAL_PROPOSAL_STATES.has(proposal.state)) {
|
|
165
|
+
this.proposalCache.set(proposalId, proposal);
|
|
166
|
+
}
|
|
167
|
+
return proposal;
|
|
54
168
|
}
|
|
55
|
-
|
|
56
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Returns the live state of a proposal as computed by `Governance.getProposalState`. Prefer
|
|
171
|
+
* {@link getProposal} when you also need any other proposal data -- it returns this same value
|
|
172
|
+
* via {@link Proposal.state} alongside the rest of the struct in a single round-trip.
|
|
173
|
+
*/ async getProposalState(proposalId) {
|
|
174
|
+
return asProposalState(await this.governanceContract.read.getProposalState([
|
|
57
175
|
proposalId
|
|
58
|
-
]);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
176
|
+
]));
|
|
177
|
+
}
|
|
178
|
+
getProposalCount() {
|
|
179
|
+
return this.governanceContract.read.proposalCount();
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Checks whether the given original payload is currently the subject of a live (non-terminal)
|
|
183
|
+
* Governance proposal. Returns true only if a proposal references this payload and is still in
|
|
184
|
+
* Pending, Active, Queued, or Executable state. Terminal proposals (Executed, Rejected, Dropped,
|
|
185
|
+
* Expired) are ignored, because once a proposal reaches a terminal state the same original
|
|
186
|
+
* payload may legitimately be re-signaled and re-submitted via the GovernanceProposer (each round
|
|
187
|
+
* is independent and there is no payload-level uniqueness check on-chain).
|
|
188
|
+
*
|
|
189
|
+
* Implemented as a bounded view-call sweep over `Governance.proposals` rather than an event scan,
|
|
190
|
+
* because `eth_getLogs` over the full deployment history of a long-lived rollup exceeds typical
|
|
191
|
+
* RPC block-range caps. The number of proposals (`proposalCount`) is small in practice, and we
|
|
192
|
+
* walk newest -> oldest with a hard early-stop on the protocol-wide proposal lifetime cap.
|
|
193
|
+
*/ async hasActiveProposalWithPayload(payload) {
|
|
194
|
+
const proposalCount = await this.getProposalCount();
|
|
195
|
+
if (proposalCount === 0n) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
// Anything created before this cutoff is guaranteed terminal regardless of its frozen config.
|
|
199
|
+
const block = await this.client.getBlock();
|
|
200
|
+
const hardCutoff = block.timestamp - MAX_PROPOSAL_LIFETIME_SECONDS;
|
|
201
|
+
const target = payload.toLowerCase();
|
|
202
|
+
// Proposals are append-only with monotonically non-decreasing creation timestamps, so iterating
|
|
203
|
+
// from newest -> oldest lets us early-stop as soon as we cross the lifetime cutoff.
|
|
204
|
+
for(let id = proposalCount - 1n; id >= 0n; id--){
|
|
205
|
+
const proposal = await this.getProposal(id);
|
|
206
|
+
// Hard early-stop: every older proposal is also older than the cutoff and therefore terminal.
|
|
207
|
+
if (proposal.creation < hardCutoff) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
const original = await this.getOriginalPayload(proposal.payload);
|
|
211
|
+
if (original === undefined || original.toLowerCase() !== target) {
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
// The wrapper unwraps to our payload. Only treat this as "already proposed" if the proposal
|
|
215
|
+
// is still live -- terminal states allow re-proposing the same payload in a later round.
|
|
216
|
+
if (TERMINAL_PROPOSAL_STATES.has(proposal.state)) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Resolves the original payload behind a `GSEPayload` wrapper. Returns `undefined` if the
|
|
225
|
+
* wrapper does not implement `IProposerPayload.getOriginalPayload` (e.g. proposals created via
|
|
226
|
+
* `Governance.proposeWithLock`, which bypass GSEPayload entirely and store the raw `IPayload`
|
|
227
|
+
* directly). Results are memoized indefinitely because deployed wrapper bytecode is immutable.
|
|
228
|
+
*/ async getOriginalPayload(wrapper) {
|
|
229
|
+
const key = wrapper.toString();
|
|
230
|
+
if (this.originalPayloadCache.has(key)) {
|
|
231
|
+
return this.originalPayloadCache.get(key);
|
|
232
|
+
}
|
|
233
|
+
let original;
|
|
234
|
+
try {
|
|
235
|
+
original = await this.client.readContract({
|
|
236
|
+
address: key,
|
|
237
|
+
abi: ProposerPayloadAbi,
|
|
238
|
+
functionName: 'getOriginalPayload'
|
|
239
|
+
});
|
|
240
|
+
} catch {
|
|
241
|
+
original = undefined;
|
|
62
242
|
}
|
|
63
|
-
|
|
243
|
+
this.originalPayloadCache.set(key, original);
|
|
244
|
+
return original;
|
|
64
245
|
}
|
|
65
246
|
async awaitProposalActive({ proposalId, logger }) {
|
|
66
247
|
const state = await this.getProposalState(proposalId);
|
|
@@ -4,9 +4,17 @@ import { type Hex, type TransactionReceipt, type TypedDataDefinition } from 'vie
|
|
|
4
4
|
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
5
5
|
import type { ViemClient } from '../types.js';
|
|
6
6
|
import { type IEmpireBase } from './empire_base.js';
|
|
7
|
+
import { ReadOnlyGovernanceContract } from './governance.js';
|
|
7
8
|
export declare class GovernanceProposerContract implements IEmpireBase {
|
|
8
9
|
readonly client: ViemClient;
|
|
9
10
|
private readonly proposer;
|
|
11
|
+
/**
|
|
12
|
+
* Cache of bytecode-existence checks keyed by payload address. The check is stable for a
|
|
13
|
+
* contract's lifetime -- a contract either has code or it does not, and code cannot be removed
|
|
14
|
+
* after deployment (selfdestruct aside, which is not relevant here). Safe to memoize
|
|
15
|
+
* indefinitely for the lifetime of this instance.
|
|
16
|
+
*/
|
|
17
|
+
private readonly emptyPayloadCache;
|
|
10
18
|
constructor(client: ViemClient, address: Hex | EthAddress);
|
|
11
19
|
get address(): EthAddress;
|
|
12
20
|
getRollupAddress(): Promise<EthAddress>;
|
|
@@ -24,11 +32,33 @@ export declare class GovernanceProposerContract implements IEmpireBase {
|
|
|
24
32
|
getPayloadSignals(rollupAddress: Hex, round: bigint, payload: Hex): Promise<bigint>;
|
|
25
33
|
createSignalRequest(payload: Hex): L1TxRequest;
|
|
26
34
|
createSignalRequestWithSignature(payload: Hex, slot: SlotNumber, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
|
|
27
|
-
/**
|
|
28
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the Governance contract this proposer submits winners to. Lazily reads
|
|
37
|
+
* `GovernanceProposer.getGovernance()` (which itself looks the address up via the registry) and
|
|
38
|
+
* memoizes the resulting wrapper.
|
|
39
|
+
*/
|
|
40
|
+
getGovernance(): Promise<ReadOnlyGovernanceContract>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns true iff the given original payload is currently the subject of a live (non-terminal)
|
|
43
|
+
* Governance proposal. Delegates to `ReadOnlyGovernanceContract.hasActiveProposalWithPayload`, which
|
|
44
|
+
* implements the actual sweep against the Governance contract -- this method exists only as a
|
|
45
|
+
* convenience wrapper so callers that already hold a GovernanceProposer reference don't have to
|
|
46
|
+
* resolve the Governance address themselves.
|
|
47
|
+
*/
|
|
48
|
+
hasActiveProposalWithPayload(payload: Hex): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if the given payload address has no deployed bytecode. Used as a cheap
|
|
51
|
+
* pre-flight check before casting a governance signal — voting for a zero-code address
|
|
52
|
+
* is unrecoverable.
|
|
53
|
+
*
|
|
54
|
+
* We only cache the `false` result (address has bytecode). The `true` result is NOT
|
|
55
|
+
* cached because a CREATE2-redeployed address could go from empty to populated, and
|
|
56
|
+
* caching `true` would make us keep skipping a payload that later becomes valid.
|
|
57
|
+
*/
|
|
58
|
+
isPayloadEmpty(payload: EthAddress): Promise<boolean>;
|
|
29
59
|
submitRoundWinner(round: bigint, l1TxUtils: L1TxUtils): Promise<{
|
|
30
60
|
receipt: TransactionReceipt;
|
|
31
61
|
proposalId: bigint;
|
|
32
62
|
}>;
|
|
33
63
|
}
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ292ZXJuYW5jZV9wcm9wb3Nlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0cy9nb3Zlcm5hbmNlX3Byb3Bvc2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ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DVCxPQUFPLEVBQUUsa0JBQWtCLENBQUM7UUFDNUIsVUFBVSxFQUFFLE1BQU0sQ0FBQztLQUNwQixDQUFDLENBWUQ7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/governance_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"governance_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/governance_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iBAAiB,CAAC;AAExF,qBAAa,0BAA2B,YAAW,WAAW;aAY1C,MAAM,EAAE,UAAU;IAXpC,OAAO,CAAC,QAAQ,CAAC,QAAQ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AE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAWjE;IAEY,iBAAiB,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC;QACT,OAAO,EAAE,kBAAkB,CAAC;QAC5B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAYD;CACF"}
|
|
@@ -377,7 +377,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
377
377
|
import { GovernanceProposerAbi } from '@aztec/l1-artifacts/GovernanceProposerAbi';
|
|
378
378
|
import { encodeFunctionData, getContract } from 'viem';
|
|
379
379
|
import { encodeSignal, encodeSignalWithSignature, signSignalWithSig } from './empire_base.js';
|
|
380
|
-
import { extractProposalIdFromLogs } from './governance.js';
|
|
380
|
+
import { ReadOnlyGovernanceContract, extractProposalIdFromLogs } from './governance.js';
|
|
381
381
|
export class GovernanceProposerContract {
|
|
382
382
|
client;
|
|
383
383
|
static{
|
|
@@ -386,13 +386,24 @@ export class GovernanceProposerContract {
|
|
|
386
386
|
memoize,
|
|
387
387
|
2,
|
|
388
388
|
"getRegistryAddress"
|
|
389
|
+
],
|
|
390
|
+
[
|
|
391
|
+
memoize,
|
|
392
|
+
2,
|
|
393
|
+
"getGovernance"
|
|
389
394
|
]
|
|
390
395
|
], []));
|
|
391
396
|
}
|
|
392
397
|
proposer;
|
|
398
|
+
/**
|
|
399
|
+
* Cache of bytecode-existence checks keyed by payload address. The check is stable for a
|
|
400
|
+
* contract's lifetime -- a contract either has code or it does not, and code cannot be removed
|
|
401
|
+
* after deployment (selfdestruct aside, which is not relevant here). Safe to memoize
|
|
402
|
+
* indefinitely for the lifetime of this instance.
|
|
403
|
+
*/ emptyPayloadCache;
|
|
393
404
|
constructor(client, address){
|
|
394
405
|
this.client = client;
|
|
395
|
-
_initProto(this);
|
|
406
|
+
this.emptyPayloadCache = (_initProto(this), new Map());
|
|
396
407
|
if (address instanceof EthAddress) {
|
|
397
408
|
address = address.toString();
|
|
398
409
|
}
|
|
@@ -467,14 +478,45 @@ export class GovernanceProposerContract {
|
|
|
467
478
|
data: encodeSignalWithSignature(payload, signature)
|
|
468
479
|
};
|
|
469
480
|
}
|
|
470
|
-
/**
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
481
|
+
/**
|
|
482
|
+
* Resolves the Governance contract this proposer submits winners to. Lazily reads
|
|
483
|
+
* `GovernanceProposer.getGovernance()` (which itself looks the address up via the registry) and
|
|
484
|
+
* memoizes the resulting wrapper.
|
|
485
|
+
*/ async getGovernance() {
|
|
486
|
+
const address = await this.proposer.read.getGovernance();
|
|
487
|
+
return new ReadOnlyGovernanceContract(address, this.client);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Returns true iff the given original payload is currently the subject of a live (non-terminal)
|
|
491
|
+
* Governance proposal. Delegates to `ReadOnlyGovernanceContract.hasActiveProposalWithPayload`, which
|
|
492
|
+
* implements the actual sweep against the Governance contract -- this method exists only as a
|
|
493
|
+
* convenience wrapper so callers that already hold a GovernanceProposer reference don't have to
|
|
494
|
+
* resolve the Governance address themselves.
|
|
495
|
+
*/ async hasActiveProposalWithPayload(payload) {
|
|
496
|
+
const governance = await this.getGovernance();
|
|
497
|
+
return governance.hasActiveProposalWithPayload(payload);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Returns true if the given payload address has no deployed bytecode. Used as a cheap
|
|
501
|
+
* pre-flight check before casting a governance signal — voting for a zero-code address
|
|
502
|
+
* is unrecoverable.
|
|
503
|
+
*
|
|
504
|
+
* We only cache the `false` result (address has bytecode). The `true` result is NOT
|
|
505
|
+
* cached because a CREATE2-redeployed address could go from empty to populated, and
|
|
506
|
+
* caching `true` would make us keep skipping a payload that later becomes valid.
|
|
507
|
+
*/ async isPayloadEmpty(payload) {
|
|
508
|
+
const key = payload.toString();
|
|
509
|
+
if (this.emptyPayloadCache.get(key) === false) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
const code = await this.client.getCode({
|
|
513
|
+
address: key
|
|
476
514
|
});
|
|
477
|
-
|
|
515
|
+
const isEmpty = !code || code === '0x';
|
|
516
|
+
if (!isEmpty) {
|
|
517
|
+
this.emptyPayloadCache.set(key, false);
|
|
518
|
+
}
|
|
519
|
+
return isEmpty;
|
|
478
520
|
}
|
|
479
521
|
async submitRoundWinner(round, l1TxUtils) {
|
|
480
522
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
package/dest/contracts/inbox.js
CHANGED
|
@@ -16,7 +16,7 @@ export class InboxContract {
|
|
|
16
16
|
}
|
|
17
17
|
static getFromConfig(config) {
|
|
18
18
|
const client = getPublicClient(config);
|
|
19
|
-
const address = config.
|
|
19
|
+
const address = config.inboxAddress.toString();
|
|
20
20
|
return new InboxContract(client, address);
|
|
21
21
|
}
|
|
22
22
|
constructor(client, address){
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import { type Address, type Hex } from 'viem';
|
|
2
|
+
import { type Abi, type Address, type BlockOverrides, type Hex, type RequiredBy, type StateOverride, type TransactionReceipt } from 'viem';
|
|
3
3
|
import type { L1BlobInputs, L1TxConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
4
4
|
import type { ExtendedViemWalletClient } from '../types.js';
|
|
5
|
-
import { FormattedViemError } from '../utils.js';
|
|
6
5
|
export declare const MULTI_CALL_3_ADDRESS: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
6
|
+
/**
|
|
7
|
+
* Thrown by `Multicall3.forward` when the forwarder transaction lands but the receipt reports a
|
|
8
|
+
* reverted status. This is not expected (aggregate3 uses allowFailure: true), so callers should
|
|
9
|
+
* treat it as a fatal on-chain failure rather than retrying on a different publisher.
|
|
10
|
+
*/
|
|
11
|
+
export declare class MulticallForwarderRevertedError extends Error {
|
|
12
|
+
readonly receipt: TransactionReceipt;
|
|
13
|
+
constructor(receipt: TransactionReceipt);
|
|
14
|
+
}
|
|
7
15
|
/** ABI fragment for aggregate3Value — not included in viem's multicall3Abi. */
|
|
8
16
|
export declare const aggregate3ValueAbi: readonly [{
|
|
9
17
|
readonly inputs: readonly [{
|
|
@@ -46,25 +54,83 @@ export declare const aggregate3ValueAbi: readonly [{
|
|
|
46
54
|
readonly stateMutability: "payable";
|
|
47
55
|
readonly type: "function";
|
|
48
56
|
}];
|
|
57
|
+
/** A single call to embed inside an aggregate3 simulation. The abi is used to decode revert reasons. */
|
|
58
|
+
export type SimulateAggregate3Request = {
|
|
59
|
+
to: Address;
|
|
60
|
+
data: Hex;
|
|
61
|
+
/** Optional ABI used to decode the revert reason if this entry reverts. */
|
|
62
|
+
abi?: Abi;
|
|
63
|
+
};
|
|
64
|
+
export type SimulateAggregate3EntryResult = {
|
|
65
|
+
success: boolean;
|
|
66
|
+
/** Decoded revert reason text when `success === false` and a request abi was provided. */
|
|
67
|
+
revertReason?: string;
|
|
68
|
+
/** Raw return data hex. `'0x'` for successful entries with void return. */
|
|
69
|
+
returnData: Hex;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Outcome of a bundle simulation.
|
|
73
|
+
* - `decoded`: eth_simulateV1 ran and produced a per-entry Result[]. Use `entries` for filtering.
|
|
74
|
+
* - `fallback`: the node does not support eth_simulateV1; `fallbackGasEstimate` was returned and no
|
|
75
|
+
* per-entry info is available. Caller should send the bundle as-is with a conservative gas cap.
|
|
76
|
+
*/
|
|
77
|
+
export type SimulateAggregate3Result = {
|
|
78
|
+
kind: 'decoded';
|
|
79
|
+
entries: SimulateAggregate3EntryResult[];
|
|
80
|
+
gasUsed: bigint;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'fallback';
|
|
83
|
+
gasUsed: bigint;
|
|
84
|
+
};
|
|
85
|
+
export type SimulateAggregate3Options = {
|
|
86
|
+
blockOverrides?: BlockOverrides<bigint, number>;
|
|
87
|
+
stateOverrides?: StateOverride;
|
|
88
|
+
/**
|
|
89
|
+
* If set, append a state override that fakes the sender's balance during the simulation so a
|
|
90
|
+
* low or zero balance does not cause the simulate to fail with insufficient funds. The fake
|
|
91
|
+
* balance is applied to `l1TxUtils.getSenderAddress()`.
|
|
92
|
+
*/
|
|
93
|
+
fakeSenderBalance?: bigint;
|
|
94
|
+
/** Gas cap to pass on the simulate call itself (defaults to viem's behavior). */
|
|
95
|
+
gas?: bigint;
|
|
96
|
+
/** When eth_simulateV1 is unavailable, fall back to this gas estimate instead of throwing. */
|
|
97
|
+
fallbackGasEstimate?: bigint;
|
|
98
|
+
};
|
|
49
99
|
export declare class Multicall3 {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Returns true iff Multicall3 bytecode is deployed at MULTI_CALL_3_ADDRESS. An empty result from
|
|
102
|
+
* a non-existent contract would otherwise silently validate any bundle that uses Multicall3.
|
|
103
|
+
*/
|
|
104
|
+
static hasCode(l1TxUtils: L1TxUtils): Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* Simulates an aggregate3 call composed of the given requests via eth_simulateV1 and decodes the
|
|
107
|
+
* per-entry Result[]. Entries that revert are returned with a decoded revertReason (if the request
|
|
108
|
+
* provided an abi).
|
|
109
|
+
*
|
|
110
|
+
* Use this to pre-validate a bundle before sending it through `Multicall3.forward`. The caller can
|
|
111
|
+
* drop reverted entries from the bundle and re-simulate with the reduced list to get an accurate
|
|
112
|
+
* `gasUsed`.
|
|
113
|
+
*/
|
|
114
|
+
static simulateAggregate3(requests: SimulateAggregate3Request[], l1TxUtils: L1TxUtils, opts?: SimulateAggregate3Options): Promise<SimulateAggregate3Result>;
|
|
115
|
+
/**
|
|
116
|
+
* Sends a batch of requests through aggregate3. Individual calls may fail (allowFailure: true),
|
|
117
|
+
* but the top-level multicall is expected to land successfully. Throws if the send fails or if
|
|
118
|
+
* the receipt reports a reverted status.
|
|
119
|
+
*/
|
|
120
|
+
static forward<TOptGasLimitRequired extends boolean>(requests: L1TxRequest[], l1TxUtils: L1TxUtils, gasConfig: TOptGasLimitRequired extends true ? RequiredBy<L1TxConfig, 'gasLimit'> : L1TxConfig | undefined, blobConfig: L1BlobInputs | undefined, opts?: {
|
|
121
|
+
gasLimitRequired?: TOptGasLimitRequired;
|
|
122
|
+
}): Promise<{
|
|
123
|
+
receipt: TransactionReceipt;
|
|
54
124
|
stats: import("../l1_tx_utils/types.js").TransactionStats | undefined;
|
|
55
|
-
|
|
56
|
-
} | {
|
|
57
|
-
stats?: undefined;
|
|
58
|
-
receipt: import("viem").TransactionReceipt;
|
|
59
|
-
errorMsg: string | undefined;
|
|
125
|
+
multicallData: `0x${string}`;
|
|
60
126
|
}>;
|
|
61
127
|
/** Batch multiple value transfers into a single aggregate3Value call on Multicall3. */
|
|
62
128
|
static forwardValue(calls: {
|
|
63
129
|
to: Address;
|
|
64
130
|
value: bigint;
|
|
65
131
|
}[], l1TxUtils: L1TxUtils, logger: Logger): Promise<{
|
|
66
|
-
receipt:
|
|
132
|
+
receipt: TransactionReceipt;
|
|
67
133
|
}>;
|
|
68
134
|
}
|
|
69
135
|
export declare function deployMulticall3(l1Client: ExtendedViemWalletClient, logger: Logger): Promise<void>;
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
136
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGljYWxsLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3RzL211bHRpY2FsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUVwRCxPQUFPLEVBQ0wsS0FBSyxHQUFHLEVBQ1IsS0FBSyxPQUFPLEVBQ1osS0FBSyxjQUFjLEVBQ25CLEtBQUssR0FBRyxFQUNSLEtBQUssVUFBVSxFQUNmLEtBQU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UFDMUcsVUFBVSxFQUFFLFlBQVksR0FBRyxTQUFTLEVBQ3BDLElBQUksR0FBRTtRQUFFLGdCQUFnQixDQUFDLEVBQUUsb0JBQW9CLENBQUE7S0FBTzs7OztPQXNDdkQ7SUFFRCx1RkFBdUY7SUFDdkYsT0FBYSxZQUFZLENBQUMsS0FBSyxFQUFFO1FBQUUsRUFBRSxFQUFFLE9BQU8sQ0FBQztRQUFDLEtBQUssRUFBRSxNQUFNLENBQUE7S0FBRSxFQUFFLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTTs7T0E0QnRHO0NBQ0Y7QUFFRCx3QkFBc0IsZ0JBQWdCLENBQUMsUUFBUSxFQUFFLHdCQUF3QixFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQStCeEYifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../../src/contracts/multicall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../../src/contracts/multicall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAIxB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAG5D,eAAO,MAAM,oBAAoB,8CAAwD,CAAC;AAE1F;;;;GAIG;AACH,qBAAa,+BAAgC,SAAQ,KAAK;aAC5B,OAAO,EAAE,kBAAkB;IAAvD,YAA4B,OAAO,EAAE,kBAAkB,EAGtD;CACF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