@aztec/ethereum 0.0.0-test.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 +3 -0
- package/dest/chain.d.ts +25 -0
- package/dest/chain.d.ts.map +1 -0
- package/dest/chain.js +53 -0
- package/dest/client.d.ts +16 -0
- package/dest/client.d.ts.map +1 -0
- package/dest/client.js +31 -0
- package/dest/config.d.ts +39 -0
- package/dest/config.d.ts.map +1 -0
- package/dest/config.js +70 -0
- package/dest/constants.d.ts +4 -0
- package/dest/constants.d.ts.map +1 -0
- package/dest/constants.js +2 -0
- package/dest/contracts/empire_base.d.ts +13 -0
- package/dest/contracts/empire_base.d.ts.map +1 -0
- package/dest/contracts/empire_base.js +11 -0
- package/dest/contracts/fee_juice.d.ts +15 -0
- package/dest/contracts/fee_juice.d.ts.map +1 -0
- package/dest/contracts/fee_juice.js +52 -0
- package/dest/contracts/forwarder.d.ts +24 -0
- package/dest/contracts/forwarder.d.ts.map +1 -0
- package/dest/contracts/forwarder.js +101 -0
- package/dest/contracts/governance.d.ts +79 -0
- package/dest/contracts/governance.d.ts.map +1 -0
- package/dest/contracts/governance.js +247 -0
- package/dest/contracts/governance_proposer.d.ts +28 -0
- package/dest/contracts/governance_proposer.d.ts.map +1 -0
- package/dest/contracts/governance_proposer.js +82 -0
- package/dest/contracts/index.d.ts +9 -0
- package/dest/contracts/index.d.ts.map +1 -0
- package/dest/contracts/index.js +8 -0
- package/dest/contracts/registry.d.ts +24 -0
- package/dest/contracts/registry.d.ts.map +1 -0
- package/dest/contracts/registry.js +85 -0
- package/dest/contracts/rollup.d.ts +92 -0
- package/dest/contracts/rollup.d.ts.map +1 -0
- package/dest/contracts/rollup.js +234 -0
- package/dest/contracts/slashing_proposer.d.ts +21 -0
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/slashing_proposer.js +47 -0
- package/dest/deploy_l1_contracts.d.ts +21210 -0
- package/dest/deploy_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_l1_contracts.js +687 -0
- package/dest/eth_cheat_codes.d.ts +147 -0
- package/dest/eth_cheat_codes.d.ts.map +1 -0
- package/dest/eth_cheat_codes.js +303 -0
- package/dest/index.d.ts +14 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/index.js +13 -0
- package/dest/l1_contract_addresses.d.ts +57 -0
- package/dest/l1_contract_addresses.d.ts.map +1 -0
- package/dest/l1_contract_addresses.js +97 -0
- package/dest/l1_reader.d.ts +16 -0
- package/dest/l1_reader.d.ts.map +1 -0
- package/dest/l1_reader.js +27 -0
- package/dest/l1_tx_utils.d.ts +192 -0
- package/dest/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils.js +641 -0
- package/dest/l1_tx_utils_with_blobs.d.ts +12 -0
- package/dest/l1_tx_utils_with_blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils_with_blobs.js +64 -0
- package/dest/queries.d.ts +12 -0
- package/dest/queries.d.ts.map +1 -0
- package/dest/queries.js +35 -0
- package/dest/test/delayed_tx_utils.d.ts +8 -0
- package/dest/test/delayed_tx_utils.d.ts.map +1 -0
- package/dest/test/delayed_tx_utils.js +21 -0
- package/dest/test/eth_cheat_codes_with_state.d.ts +18 -0
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes_with_state.js +34 -0
- package/dest/test/index.d.ts +6 -0
- package/dest/test/index.d.ts.map +1 -0
- package/dest/test/index.js +5 -0
- package/dest/test/start_anvil.d.ts +12 -0
- package/dest/test/start_anvil.d.ts.map +1 -0
- package/dest/test/start_anvil.js +46 -0
- package/dest/test/tx_delayer.d.ts +25 -0
- package/dest/test/tx_delayer.d.ts.map +1 -0
- package/dest/test/tx_delayer.js +116 -0
- package/dest/test/upgrade_utils.d.ts +11 -0
- package/dest/test/upgrade_utils.d.ts.map +1 -0
- package/dest/test/upgrade_utils.js +104 -0
- package/dest/types.d.ts +14 -0
- package/dest/types.d.ts.map +1 -0
- package/dest/types.js +1 -0
- package/dest/utils.d.ts +24 -0
- package/dest/utils.d.ts.map +1 -0
- package/dest/utils.js +209 -0
- package/package.json +98 -0
- package/src/chain.ts +71 -0
- package/src/client.ts +58 -0
- package/src/config.ts +103 -0
- package/src/constants.ts +4 -0
- package/src/contracts/empire_base.ts +19 -0
- package/src/contracts/fee_juice.ts +43 -0
- package/src/contracts/forwarder.ts +132 -0
- package/src/contracts/governance.ts +285 -0
- package/src/contracts/governance_proposer.ts +82 -0
- package/src/contracts/index.ts +8 -0
- package/src/contracts/registry.ts +106 -0
- package/src/contracts/rollup.ts +274 -0
- package/src/contracts/slashing_proposer.ts +51 -0
- package/src/deploy_l1_contracts.ts +948 -0
- package/src/eth_cheat_codes.ts +314 -0
- package/src/index.ts +13 -0
- package/src/l1_contract_addresses.ts +109 -0
- package/src/l1_reader.ts +42 -0
- package/src/l1_tx_utils.ts +847 -0
- package/src/l1_tx_utils_with_blobs.ts +86 -0
- package/src/queries.ts +58 -0
- package/src/test/delayed_tx_utils.ts +24 -0
- package/src/test/eth_cheat_codes_with_state.ts +38 -0
- package/src/test/index.ts +5 -0
- package/src/test/start_anvil.ts +52 -0
- package/src/test/tx_delayer.ts +163 -0
- package/src/test/upgrade_utils.ts +100 -0
- package/src/types.ts +33 -0
- package/src/utils.ts +276 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
3
|
+
import { GovernanceAbi } from '@aztec/l1-artifacts';
|
|
4
|
+
import { encodeFunctionData, getContract } from 'viem';
|
|
5
|
+
import { L1TxUtils } from '../l1_tx_utils.js';
|
|
6
|
+
import { GovernanceProposerContract } from './governance_proposer.js';
|
|
7
|
+
// NOTE: Must be kept in sync with DataStructures.ProposalState in l1-contracts
|
|
8
|
+
export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
9
|
+
ProposalState[ProposalState["Pending"] = 0] = "Pending";
|
|
10
|
+
ProposalState[ProposalState["Active"] = 1] = "Active";
|
|
11
|
+
ProposalState[ProposalState["Queued"] = 2] = "Queued";
|
|
12
|
+
ProposalState[ProposalState["Executable"] = 3] = "Executable";
|
|
13
|
+
ProposalState[ProposalState["Rejected"] = 4] = "Rejected";
|
|
14
|
+
ProposalState[ProposalState["Executed"] = 5] = "Executed";
|
|
15
|
+
ProposalState[ProposalState["Dropped"] = 6] = "Dropped";
|
|
16
|
+
ProposalState[ProposalState["Expired"] = 7] = "Expired";
|
|
17
|
+
return ProposalState;
|
|
18
|
+
}({});
|
|
19
|
+
export class GovernanceContract {
|
|
20
|
+
publicClient;
|
|
21
|
+
walletClient;
|
|
22
|
+
publicGovernance;
|
|
23
|
+
walletGovernance;
|
|
24
|
+
constructor(address, publicClient, walletClient){
|
|
25
|
+
this.publicClient = publicClient;
|
|
26
|
+
this.walletClient = walletClient;
|
|
27
|
+
this.publicGovernance = getContract({
|
|
28
|
+
address,
|
|
29
|
+
abi: GovernanceAbi,
|
|
30
|
+
client: publicClient
|
|
31
|
+
});
|
|
32
|
+
this.walletGovernance = walletClient ? getContract({
|
|
33
|
+
address,
|
|
34
|
+
abi: GovernanceAbi,
|
|
35
|
+
client: walletClient
|
|
36
|
+
}) : undefined;
|
|
37
|
+
}
|
|
38
|
+
get address() {
|
|
39
|
+
return EthAddress.fromString(this.publicGovernance.address);
|
|
40
|
+
}
|
|
41
|
+
async getProposer() {
|
|
42
|
+
const governanceProposerAddress = EthAddress.fromString(await this.publicGovernance.read.governanceProposer());
|
|
43
|
+
return new GovernanceProposerContract(this.publicClient, governanceProposerAddress.toString());
|
|
44
|
+
}
|
|
45
|
+
async getGovernanceAddresses() {
|
|
46
|
+
const governanceProposer = await this.getProposer();
|
|
47
|
+
const [rollupAddress, registryAddress] = await Promise.all([
|
|
48
|
+
governanceProposer.getRollupAddress(),
|
|
49
|
+
governanceProposer.getRegistryAddress()
|
|
50
|
+
]);
|
|
51
|
+
return {
|
|
52
|
+
governanceAddress: this.address,
|
|
53
|
+
rollupAddress,
|
|
54
|
+
registryAddress,
|
|
55
|
+
governanceProposerAddress: governanceProposer.address
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
getProposal(proposalId) {
|
|
59
|
+
return this.publicGovernance.read.getProposal([
|
|
60
|
+
proposalId
|
|
61
|
+
]);
|
|
62
|
+
}
|
|
63
|
+
async getProposalState(proposalId) {
|
|
64
|
+
const state = await this.publicGovernance.read.getProposalState([
|
|
65
|
+
proposalId
|
|
66
|
+
]);
|
|
67
|
+
if (state < 0 || state > 7) {
|
|
68
|
+
throw new Error(`Invalid proposal state: ${state}`);
|
|
69
|
+
}
|
|
70
|
+
return state;
|
|
71
|
+
}
|
|
72
|
+
assertWalletGovernance() {
|
|
73
|
+
if (!this.walletGovernance) {
|
|
74
|
+
throw new Error('Wallet client is required for this operation');
|
|
75
|
+
}
|
|
76
|
+
return this.walletGovernance;
|
|
77
|
+
}
|
|
78
|
+
async deposit(onBehalfOf, amount) {
|
|
79
|
+
const walletGovernance = this.assertWalletGovernance();
|
|
80
|
+
const depositTx = await walletGovernance.write.deposit([
|
|
81
|
+
onBehalfOf,
|
|
82
|
+
amount
|
|
83
|
+
]);
|
|
84
|
+
await this.publicClient.waitForTransactionReceipt({
|
|
85
|
+
hash: depositTx
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async proposeWithLock({ payloadAddress, withdrawAddress }) {
|
|
89
|
+
const walletGovernance = this.assertWalletGovernance();
|
|
90
|
+
const proposeTx = await walletGovernance.write.proposeWithLock([
|
|
91
|
+
payloadAddress,
|
|
92
|
+
withdrawAddress
|
|
93
|
+
]);
|
|
94
|
+
const receipt = await this.publicClient.waitForTransactionReceipt({
|
|
95
|
+
hash: proposeTx
|
|
96
|
+
});
|
|
97
|
+
if (receipt.status !== 'success') {
|
|
98
|
+
throw new Error(`Proposal failed: ${receipt.status}`);
|
|
99
|
+
}
|
|
100
|
+
const proposalId = Number(receipt.logs[1].topics[1]);
|
|
101
|
+
return proposalId;
|
|
102
|
+
}
|
|
103
|
+
async awaitProposalActive({ proposalId, logger }) {
|
|
104
|
+
const state = await this.getProposalState(proposalId);
|
|
105
|
+
if (state === 1) {
|
|
106
|
+
return;
|
|
107
|
+
} else if (state !== 0) {
|
|
108
|
+
throw new Error(`Proposal ${proposalId} is in state [${state}]: it will never be active`);
|
|
109
|
+
} else {
|
|
110
|
+
const proposal = await this.getProposal(proposalId);
|
|
111
|
+
const startOfActive = proposal.creation + proposal.config.votingDelay;
|
|
112
|
+
const block = await this.publicClient.getBlock();
|
|
113
|
+
// Add 12 seconds to the time to make sure we don't vote too early
|
|
114
|
+
const secondsToActive = Number(startOfActive - block.timestamp) + 12;
|
|
115
|
+
const now = new Date();
|
|
116
|
+
logger.info(`
|
|
117
|
+
The time is ${now.toISOString()}.
|
|
118
|
+
The proposal will be active at ${new Date(Number(startOfActive) * 1000).toISOString()}.
|
|
119
|
+
Waiting ${secondsToActive} seconds for proposal to be active.
|
|
120
|
+
`);
|
|
121
|
+
await sleep(secondsToActive * 1000);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async awaitProposalExecutable({ proposalId, logger }) {
|
|
125
|
+
const state = await this.getProposalState(proposalId);
|
|
126
|
+
if (state === 3) {
|
|
127
|
+
return;
|
|
128
|
+
} else if (![
|
|
129
|
+
0,
|
|
130
|
+
1,
|
|
131
|
+
2,
|
|
132
|
+
3
|
|
133
|
+
].includes(state)) {
|
|
134
|
+
throw new Error(`Proposal ${proposalId} is in state [${state}]: it will never be executable`);
|
|
135
|
+
} else {
|
|
136
|
+
const proposal = await this.getProposal(proposalId);
|
|
137
|
+
const startOfExecutable = proposal.creation + proposal.config.votingDelay + proposal.config.votingDuration + proposal.config.executionDelay;
|
|
138
|
+
const block = await this.publicClient.getBlock();
|
|
139
|
+
const secondsToExecutable = Number(startOfExecutable - block.timestamp) + 12;
|
|
140
|
+
const now = new Date();
|
|
141
|
+
logger.info(`
|
|
142
|
+
The time is ${now.toISOString()}.
|
|
143
|
+
The proposal will be executable at ${new Date(Number(startOfExecutable) * 1000).toISOString()}.
|
|
144
|
+
Waiting ${secondsToExecutable} seconds for proposal to be executable.
|
|
145
|
+
`);
|
|
146
|
+
await sleep(secondsToExecutable * 1000);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async getPower() {
|
|
150
|
+
const walletGovernance = this.assertWalletGovernance();
|
|
151
|
+
const now = await this.publicClient.getBlock();
|
|
152
|
+
return walletGovernance.read.powerAt([
|
|
153
|
+
this.walletClient.account.address,
|
|
154
|
+
now.timestamp
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
async vote({ proposalId, voteAmount, inFavor, retries = 10, logger }) {
|
|
158
|
+
const walletGovernance = this.assertWalletGovernance();
|
|
159
|
+
const l1TxUtils = new L1TxUtils(this.publicClient, this.walletClient, logger);
|
|
160
|
+
const retryDelaySeconds = 12;
|
|
161
|
+
voteAmount = voteAmount ?? await this.getPower();
|
|
162
|
+
let success = false;
|
|
163
|
+
for(let i = 0; i < retries; i++){
|
|
164
|
+
try {
|
|
165
|
+
const voteFunctionData = {
|
|
166
|
+
abi: GovernanceAbi,
|
|
167
|
+
functionName: 'vote',
|
|
168
|
+
args: [
|
|
169
|
+
proposalId,
|
|
170
|
+
voteAmount,
|
|
171
|
+
inFavor
|
|
172
|
+
]
|
|
173
|
+
};
|
|
174
|
+
const encodedVoteData = encodeFunctionData(voteFunctionData);
|
|
175
|
+
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
176
|
+
to: walletGovernance.address,
|
|
177
|
+
data: encodedVoteData
|
|
178
|
+
});
|
|
179
|
+
if (receipt.status === 'success') {
|
|
180
|
+
success = true;
|
|
181
|
+
break;
|
|
182
|
+
} else {
|
|
183
|
+
const args = {
|
|
184
|
+
...voteFunctionData,
|
|
185
|
+
address: walletGovernance.address
|
|
186
|
+
};
|
|
187
|
+
const errorMsg = await l1TxUtils.tryGetErrorFromRevertedTx(encodedVoteData, args, undefined, []);
|
|
188
|
+
logger.error(`Error voting on proposal ${proposalId}: ${errorMsg}`);
|
|
189
|
+
}
|
|
190
|
+
} catch (error) {
|
|
191
|
+
logger.error(`Error voting on proposal ${proposalId}: ${error}`);
|
|
192
|
+
}
|
|
193
|
+
logger.info(`Retrying vote on proposal ${proposalId} in ${retryDelaySeconds} seconds`);
|
|
194
|
+
await sleep(retryDelaySeconds * 1000);
|
|
195
|
+
}
|
|
196
|
+
if (!success) {
|
|
197
|
+
throw new Error(`Failed to vote on proposal ${proposalId} after ${retries} retries`);
|
|
198
|
+
}
|
|
199
|
+
logger.info(`Voted [${inFavor ? 'yea' : 'nay'}] on proposal [${proposalId}]`);
|
|
200
|
+
const proposal = await this.getProposal(proposalId);
|
|
201
|
+
logger.info(`Proposal [${proposalId}] has state [${proposal.state}]`);
|
|
202
|
+
logger.info(`Proposal [${proposalId}] has summedBallot yea [${proposal.summedBallot.yea}]`);
|
|
203
|
+
logger.info(`Proposal [${proposalId}] has summedBallot nea [${proposal.summedBallot.nea}]`);
|
|
204
|
+
}
|
|
205
|
+
async executeProposal({ proposalId, retries = 10, logger }) {
|
|
206
|
+
const walletGovernance = this.assertWalletGovernance();
|
|
207
|
+
const l1TxUtils = new L1TxUtils(this.publicClient, this.walletClient, logger);
|
|
208
|
+
const retryDelaySeconds = 12;
|
|
209
|
+
let success = false;
|
|
210
|
+
for(let i = 0; i < retries; i++){
|
|
211
|
+
try {
|
|
212
|
+
const executeFunctionData = {
|
|
213
|
+
abi: GovernanceAbi,
|
|
214
|
+
functionName: 'execute',
|
|
215
|
+
args: [
|
|
216
|
+
proposalId
|
|
217
|
+
]
|
|
218
|
+
};
|
|
219
|
+
const encodedExecuteData = encodeFunctionData(executeFunctionData);
|
|
220
|
+
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
221
|
+
to: walletGovernance.address,
|
|
222
|
+
data: encodedExecuteData
|
|
223
|
+
});
|
|
224
|
+
if (receipt.status === 'success') {
|
|
225
|
+
success = true;
|
|
226
|
+
break;
|
|
227
|
+
} else {
|
|
228
|
+
const args = {
|
|
229
|
+
...executeFunctionData,
|
|
230
|
+
address: walletGovernance.address
|
|
231
|
+
};
|
|
232
|
+
const errorMsg = await l1TxUtils.tryGetErrorFromRevertedTx(encodedExecuteData, args, undefined, []);
|
|
233
|
+
logger.error(`Error executing proposal ${proposalId}: ${errorMsg}`);
|
|
234
|
+
}
|
|
235
|
+
} catch (error) {
|
|
236
|
+
logger.error(`Error executing proposal ${proposalId}: ${error}`);
|
|
237
|
+
}
|
|
238
|
+
logger.info(`Retrying execute proposal ${proposalId} in ${retryDelaySeconds} seconds`);
|
|
239
|
+
await sleep(retryDelaySeconds * 1000);
|
|
240
|
+
}
|
|
241
|
+
if (!success) {
|
|
242
|
+
throw new Error(`Failed to execute proposal ${proposalId} after ${retries} retries`);
|
|
243
|
+
} else {
|
|
244
|
+
logger.info(`Executed proposal ${proposalId}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { type Hex, type TransactionReceipt } from 'viem';
|
|
3
|
+
import type { GasPrice, L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
|
|
4
|
+
import type { ViemPublicClient } from '../types.js';
|
|
5
|
+
import { type IEmpireBase } from './empire_base.js';
|
|
6
|
+
export declare class GovernanceProposerContract implements IEmpireBase {
|
|
7
|
+
readonly client: ViemPublicClient;
|
|
8
|
+
private readonly proposer;
|
|
9
|
+
constructor(client: ViemPublicClient, address: Hex);
|
|
10
|
+
get address(): EthAddress;
|
|
11
|
+
getRollupAddress(): Promise<EthAddress>;
|
|
12
|
+
getRegistryAddress(): Promise<EthAddress>;
|
|
13
|
+
getQuorumSize(): Promise<bigint>;
|
|
14
|
+
getRoundSize(): Promise<bigint>;
|
|
15
|
+
computeRound(slot: bigint): Promise<bigint>;
|
|
16
|
+
getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
|
|
17
|
+
lastVote: bigint;
|
|
18
|
+
leader: Hex;
|
|
19
|
+
executed: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
getProposalVotes(rollupAddress: Hex, round: bigint, proposal: Hex): Promise<bigint>;
|
|
22
|
+
createVoteRequest(payload: Hex): L1TxRequest;
|
|
23
|
+
executeProposal(round: bigint, l1TxUtils: L1TxUtils): Promise<{
|
|
24
|
+
receipt: TransactionReceipt;
|
|
25
|
+
gasPrice: GasPrice;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=governance_proposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/governance_proposer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAA8B,KAAK,GAAG,EAAE,KAAK,kBAAkB,EAAmC,MAAM,MAAM,CAAC;AAEtH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAEhE,qBAAa,0BAA2B,YAAW,WAAW;aAGhC,MAAM,EAAE,gBAAgB;IAFpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwE;gBAErE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG;IAIlE,IAAW,OAAO,eAEjB;IAEY,gBAAgB;IAKhB,kBAAkB;IAIxB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAIhC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrC,YAAY,CACvB,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IASzD,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAInF,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,WAAW;IAO5C,eAAe,CACpB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC;QACT,OAAO,EAAE,kBAAkB,CAAC;QAC5B,QAAQ,EAAE,QAAQ,CAAC;KACpB,CAAC;CAUH"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
}
|
|
7
|
+
import { memoize } from '@aztec/foundation/decorators';
|
|
8
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
|
+
import { GovernanceProposerAbi } from '@aztec/l1-artifacts';
|
|
10
|
+
import { encodeFunctionData, getContract } from 'viem';
|
|
11
|
+
import { encodeVote } from './empire_base.js';
|
|
12
|
+
export class GovernanceProposerContract {
|
|
13
|
+
client;
|
|
14
|
+
proposer;
|
|
15
|
+
constructor(client, address){
|
|
16
|
+
this.client = client;
|
|
17
|
+
this.proposer = getContract({
|
|
18
|
+
address,
|
|
19
|
+
abi: GovernanceProposerAbi,
|
|
20
|
+
client
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
get address() {
|
|
24
|
+
return EthAddress.fromString(this.proposer.address);
|
|
25
|
+
}
|
|
26
|
+
async getRollupAddress() {
|
|
27
|
+
return EthAddress.fromString(await this.proposer.read.getInstance());
|
|
28
|
+
}
|
|
29
|
+
async getRegistryAddress() {
|
|
30
|
+
return EthAddress.fromString(await this.proposer.read.REGISTRY());
|
|
31
|
+
}
|
|
32
|
+
getQuorumSize() {
|
|
33
|
+
return this.proposer.read.N();
|
|
34
|
+
}
|
|
35
|
+
getRoundSize() {
|
|
36
|
+
return this.proposer.read.M();
|
|
37
|
+
}
|
|
38
|
+
computeRound(slot) {
|
|
39
|
+
return this.proposer.read.computeRound([
|
|
40
|
+
slot
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
async getRoundInfo(rollupAddress, round) {
|
|
44
|
+
const roundInfo = await this.proposer.read.rounds([
|
|
45
|
+
rollupAddress,
|
|
46
|
+
round
|
|
47
|
+
]);
|
|
48
|
+
return {
|
|
49
|
+
lastVote: roundInfo[0],
|
|
50
|
+
leader: roundInfo[1],
|
|
51
|
+
executed: roundInfo[2]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
getProposalVotes(rollupAddress, round, proposal) {
|
|
55
|
+
return this.proposer.read.yeaCount([
|
|
56
|
+
rollupAddress,
|
|
57
|
+
round,
|
|
58
|
+
proposal
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
createVoteRequest(payload) {
|
|
62
|
+
return {
|
|
63
|
+
to: this.address.toString(),
|
|
64
|
+
data: encodeVote(payload)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
executeProposal(round, l1TxUtils) {
|
|
68
|
+
return l1TxUtils.sendAndMonitorTransaction({
|
|
69
|
+
to: this.address.toString(),
|
|
70
|
+
data: encodeFunctionData({
|
|
71
|
+
abi: this.proposer.abi,
|
|
72
|
+
functionName: 'executeProposal',
|
|
73
|
+
args: [
|
|
74
|
+
round
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_ts_decorate([
|
|
81
|
+
memoize
|
|
82
|
+
], GovernanceProposerContract.prototype, "getRegistryAddress", null);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './empire_base.js';
|
|
2
|
+
export * from './fee_juice.js';
|
|
3
|
+
export * from './forwarder.js';
|
|
4
|
+
export * from './governance.js';
|
|
5
|
+
export * from './governance_proposer.js';
|
|
6
|
+
export * from './registry.js';
|
|
7
|
+
export * from './rollup.js';
|
|
8
|
+
export * from './slashing_proposer.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './empire_base.js';
|
|
2
|
+
export * from './fee_juice.js';
|
|
3
|
+
export * from './forwarder.js';
|
|
4
|
+
export * from './governance.js';
|
|
5
|
+
export * from './governance_proposer.js';
|
|
6
|
+
export * from './registry.js';
|
|
7
|
+
export * from './rollup.js';
|
|
8
|
+
export * from './slashing_proposer.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { type Hex } from 'viem';
|
|
3
|
+
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
4
|
+
import type { L1Clients, ViemPublicClient } from '../types.js';
|
|
5
|
+
export declare class RegistryContract {
|
|
6
|
+
readonly client: L1Clients['publicClient'];
|
|
7
|
+
address: EthAddress;
|
|
8
|
+
private readonly registry;
|
|
9
|
+
constructor(client: L1Clients['publicClient'], address: Hex | EthAddress);
|
|
10
|
+
/**
|
|
11
|
+
* Returns the address of the rollup for a given version.
|
|
12
|
+
* @param version - The version of the rollup. 'canonical' can be used to get the canonical address (i.e. the latest version).
|
|
13
|
+
* @returns The address of the rollup. If the rollup is not set for this version, throws an error.
|
|
14
|
+
*/
|
|
15
|
+
getRollupAddress(version: number | bigint | 'canonical'): Promise<EthAddress>;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the canonical address of the rollup.
|
|
18
|
+
* @returns The canonical address of the rollup. If the rollup is not set, throws an error.
|
|
19
|
+
*/
|
|
20
|
+
getCanonicalAddress(): Promise<EthAddress>;
|
|
21
|
+
getGovernanceAddresses(): Promise<Pick<L1ContractAddresses, 'governanceProposerAddress' | 'governanceAddress'>>;
|
|
22
|
+
static collectAddresses(client: ViemPublicClient, registryAddress: Hex | EthAddress, rollupVersion: number | bigint | 'canonical'): Promise<L1ContractAddresses>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/contracts/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAGL,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/D,qBAAa,gBAAgB;aAIC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC;IAHtD,OAAO,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgF;gBAE7E,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,UAAU;IAQxF;;;;OAIG;IACU,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAiB1F;;;OAGG;IACU,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC;IAS1C,sBAAsB,IAAI,OAAO,CAC5C,IAAI,CAAC,mBAAmB,EAAE,2BAA2B,GAAG,mBAAmB,CAAC,CAC7E;WAUmB,gBAAgB,CAClC,MAAM,EAAE,gBAAgB,EACxB,eAAe,EAAE,GAAG,GAAG,UAAU,EACjC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAC3C,OAAO,CAAC,mBAAmB,CAAC;CAwBhC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { RegistryAbi } from '@aztec/l1-artifacts/RegistryAbi';
|
|
3
|
+
import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
4
|
+
import { getContract } from 'viem';
|
|
5
|
+
import { GovernanceContract } from './governance.js';
|
|
6
|
+
import { RollupContract } from './rollup.js';
|
|
7
|
+
export class RegistryContract {
|
|
8
|
+
client;
|
|
9
|
+
address;
|
|
10
|
+
registry;
|
|
11
|
+
constructor(client, address){
|
|
12
|
+
this.client = client;
|
|
13
|
+
if (address instanceof EthAddress) {
|
|
14
|
+
address = address.toString();
|
|
15
|
+
}
|
|
16
|
+
this.address = EthAddress.fromString(address);
|
|
17
|
+
this.registry = getContract({
|
|
18
|
+
address,
|
|
19
|
+
abi: RegistryAbi,
|
|
20
|
+
client
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the address of the rollup for a given version.
|
|
25
|
+
* @param version - The version of the rollup. 'canonical' can be used to get the canonical address (i.e. the latest version).
|
|
26
|
+
* @returns The address of the rollup. If the rollup is not set for this version, throws an error.
|
|
27
|
+
*/ async getRollupAddress(version) {
|
|
28
|
+
if (version === 'canonical') {
|
|
29
|
+
return this.getCanonicalAddress();
|
|
30
|
+
}
|
|
31
|
+
if (typeof version === 'number') {
|
|
32
|
+
version = BigInt(version);
|
|
33
|
+
}
|
|
34
|
+
const snapshot = await this.registry.read.getSnapshot([
|
|
35
|
+
version
|
|
36
|
+
]);
|
|
37
|
+
const address = EthAddress.fromString(snapshot.rollup);
|
|
38
|
+
if (address.equals(EthAddress.ZERO)) {
|
|
39
|
+
throw new Error('Rollup address is undefined');
|
|
40
|
+
}
|
|
41
|
+
return address;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns the canonical address of the rollup.
|
|
45
|
+
* @returns The canonical address of the rollup. If the rollup is not set, throws an error.
|
|
46
|
+
*/ async getCanonicalAddress() {
|
|
47
|
+
const snapshot = await this.registry.read.getCurrentSnapshot();
|
|
48
|
+
const address = EthAddress.fromString(snapshot.rollup);
|
|
49
|
+
if (address.equals(EthAddress.ZERO)) {
|
|
50
|
+
throw new Error('Rollup address is undefined');
|
|
51
|
+
}
|
|
52
|
+
return address;
|
|
53
|
+
}
|
|
54
|
+
async getGovernanceAddresses() {
|
|
55
|
+
const governanceAddress = await this.registry.read.getGovernance();
|
|
56
|
+
const governance = new GovernanceContract(governanceAddress, this.client, undefined);
|
|
57
|
+
const governanceProposer = await governance.getProposer();
|
|
58
|
+
return {
|
|
59
|
+
governanceAddress: governance.address,
|
|
60
|
+
governanceProposerAddress: governanceProposer.address
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static async collectAddresses(client, registryAddress, rollupVersion) {
|
|
64
|
+
const registry = new RegistryContract(client, registryAddress);
|
|
65
|
+
const governanceAddresses = await registry.getGovernanceAddresses();
|
|
66
|
+
const rollupAddress = await registry.getRollupAddress(rollupVersion);
|
|
67
|
+
if (rollupAddress === undefined) {
|
|
68
|
+
throw new Error('Rollup address is undefined');
|
|
69
|
+
}
|
|
70
|
+
const rollup = new RollupContract(client, rollupAddress);
|
|
71
|
+
const addresses = await rollup.getRollupAddresses();
|
|
72
|
+
const feeAsset = getContract({
|
|
73
|
+
address: addresses.feeJuiceAddress.toString(),
|
|
74
|
+
abi: TestERC20Abi,
|
|
75
|
+
client
|
|
76
|
+
});
|
|
77
|
+
const coinIssuer = await feeAsset.read.owner();
|
|
78
|
+
return {
|
|
79
|
+
registryAddress: registry.address,
|
|
80
|
+
...governanceAddresses,
|
|
81
|
+
...addresses,
|
|
82
|
+
coinIssuerAddress: EthAddress.fromString(coinIssuer)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import type { ViemSignature } from '@aztec/foundation/eth-signature';
|
|
5
|
+
import { type Account, type Hex } from 'viem';
|
|
6
|
+
import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js';
|
|
7
|
+
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
8
|
+
import type { L1ReaderConfig } from '../l1_reader.js';
|
|
9
|
+
import type { ViemPublicClient } from '../types.js';
|
|
10
|
+
import { SlashingProposerContract } from './slashing_proposer.js';
|
|
11
|
+
export type L1RollupContractAddresses = Pick<L1ContractAddresses, 'rollupAddress' | 'inboxAddress' | 'outboxAddress' | 'feeJuicePortalAddress' | 'feeJuiceAddress' | 'stakingAssetAddress' | 'rewardDistributorAddress' | 'slashFactoryAddress'>;
|
|
12
|
+
export type EpochProofPublicInputArgs = {
|
|
13
|
+
previousArchive: `0x${string}`;
|
|
14
|
+
endArchive: `0x${string}`;
|
|
15
|
+
previousBlockHash: `0x${string}`;
|
|
16
|
+
endBlockHash: `0x${string}`;
|
|
17
|
+
endTimestamp: bigint;
|
|
18
|
+
outHash: `0x${string}`;
|
|
19
|
+
proverId: `0x${string}`;
|
|
20
|
+
};
|
|
21
|
+
export declare class RollupContract {
|
|
22
|
+
readonly client: ViemPublicClient;
|
|
23
|
+
private readonly rollup;
|
|
24
|
+
static get checkBlobStorageSlot(): bigint;
|
|
25
|
+
static getFromL1ContractsValues(deployL1ContractsValues: DeployL1ContractsReturnType): RollupContract;
|
|
26
|
+
static getFromConfig(config: L1ReaderConfig): RollupContract;
|
|
27
|
+
constructor(client: ViemPublicClient, address: Hex | EthAddress);
|
|
28
|
+
get address(): `0x${string}`;
|
|
29
|
+
getSlashingProposer(): Promise<SlashingProposerContract>;
|
|
30
|
+
getL1StartBlock(): Promise<bigint>;
|
|
31
|
+
getL1GenesisTime(): Promise<bigint>;
|
|
32
|
+
getProofSubmissionWindow(): Promise<bigint>;
|
|
33
|
+
getEpochDuration(): Promise<bigint>;
|
|
34
|
+
getSlotDuration(): Promise<bigint>;
|
|
35
|
+
getTargetCommitteeSize(): Promise<bigint>;
|
|
36
|
+
getMinimumStake(): Promise<bigint>;
|
|
37
|
+
getSlashingProposerAddress(): Promise<EthAddress>;
|
|
38
|
+
getBlockNumber(): Promise<bigint>;
|
|
39
|
+
getProvenBlockNumber(): Promise<bigint>;
|
|
40
|
+
getSlotNumber(): Promise<bigint>;
|
|
41
|
+
getCommitteeAt(timestamp: bigint): Promise<readonly `0x${string}`[]>;
|
|
42
|
+
getSampleSeedAt(timestamp: bigint): Promise<bigint>;
|
|
43
|
+
getCurrentSampleSeed(): Promise<bigint>;
|
|
44
|
+
getCurrentEpochCommittee(): Promise<readonly `0x${string}`[]>;
|
|
45
|
+
getCurrentProposer(): Promise<`0x${string}`>;
|
|
46
|
+
getProposerAt(timestamp: bigint): Promise<`0x${string}`>;
|
|
47
|
+
getBlock(blockNumber: bigint): Promise<{
|
|
48
|
+
feeHeader: {
|
|
49
|
+
excessMana: bigint;
|
|
50
|
+
manaUsed: bigint;
|
|
51
|
+
feeAssetPriceNumerator: bigint;
|
|
52
|
+
congestionCost: bigint;
|
|
53
|
+
provingCost: bigint;
|
|
54
|
+
};
|
|
55
|
+
archive: `0x${string}`;
|
|
56
|
+
blockHash: `0x${string}`;
|
|
57
|
+
slotNumber: bigint;
|
|
58
|
+
}>;
|
|
59
|
+
getTips(): Promise<{
|
|
60
|
+
pendingBlockNumber: bigint;
|
|
61
|
+
provenBlockNumber: bigint;
|
|
62
|
+
}>;
|
|
63
|
+
getTimestampForSlot(slot: bigint): Promise<bigint>;
|
|
64
|
+
getEpochNumber(blockNumber?: bigint): Promise<bigint>;
|
|
65
|
+
getRollupAddresses(): Promise<L1RollupContractAddresses>;
|
|
66
|
+
getEpochNumberForSlotNumber(slotNumber: bigint): Promise<bigint>;
|
|
67
|
+
getEpochProofPublicInputs(args: readonly [bigint, bigint, EpochProofPublicInputArgs, readonly `0x${string}`[], `0x${string}`, `0x${string}`]): Promise<readonly `0x${string}`[]>;
|
|
68
|
+
validateHeader(args: readonly [
|
|
69
|
+
`0x${string}`,
|
|
70
|
+
ViemSignature[],
|
|
71
|
+
`0x${string}`,
|
|
72
|
+
bigint,
|
|
73
|
+
`0x${string}`,
|
|
74
|
+
{
|
|
75
|
+
ignoreDA: boolean;
|
|
76
|
+
ignoreSignatures: boolean;
|
|
77
|
+
}
|
|
78
|
+
], account: `0x${string}` | Account): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* @notice Calls `canProposeAtTime` with the time of the next Ethereum block and the sender address
|
|
81
|
+
*
|
|
82
|
+
* @dev Throws if unable to propose
|
|
83
|
+
*
|
|
84
|
+
* @param archive - The archive that we expect to be current state
|
|
85
|
+
* @return [slot, blockNumber] - If you can propose, the L2 slot number and L2 block number of the next Ethereum block,
|
|
86
|
+
* @throws otherwise
|
|
87
|
+
*/
|
|
88
|
+
canProposeAtNextEthBlock(archive: Buffer, account: `0x${string}` | Account, slotDuration: bigint | number): Promise<[bigint, bigint]>;
|
|
89
|
+
/** Calls getHasSubmitted directly. Returns whether the given prover has submitted a proof with the given length for the given epoch. */
|
|
90
|
+
getHasSubmittedProof(epochNumber: number, numberOfBlocksInEpoch: number, prover: EthAddress): Promise<boolean>;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=rollup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../../src/contracts/rollup.ts"],"names":[],"mappings":"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"}
|