@aztec/ethereum 2.0.0-nightly.20250902 → 3.0.0-canary.a9708bd
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/config.d.ts.map +1 -1
- package/dest/config.js +61 -54
- package/dest/contracts/fee_asset_handler.d.ts +3 -2
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +14 -0
- package/dest/contracts/fee_juice.d.ts +2 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +6 -0
- package/dest/contracts/governance.d.ts +1 -1
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +3 -0
- package/dest/contracts/governance_proposer.d.ts +1 -1
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +3 -0
- package/dest/contracts/gse.d.ts +2 -0
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +6 -0
- package/dest/deploy_l1_contracts.d.ts +18 -4
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +383 -61
- package/dest/l1_artifacts.d.ts +39210 -39196
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.d.ts +3 -2
- 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.map +1 -1
- package/dest/test/rollup_cheat_codes.js +2 -1
- package/dest/test/tx_delayer.d.ts +2 -2
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +4 -4
- package/package.json +5 -4
- package/src/config.ts +81 -72
- package/src/contracts/fee_asset_handler.ts +17 -2
- package/src/contracts/fee_juice.ts +8 -1
- package/src/contracts/governance.ts +4 -1
- package/src/contracts/governance_proposer.ts +4 -1
- package/src/contracts/gse.ts +8 -0
- package/src/deploy_l1_contracts.ts +357 -52
- package/src/test/eth_cheat_codes.ts +12 -2
- package/src/test/rollup_cheat_codes.ts +5 -1
- package/src/test/tx_delayer.ts +14 -4
package/dest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAOlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,KAAK,eAAe,EAA2B,MAAM,kBAAkB,CAAC;AAEjF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;IACtB,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yCAAyC;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wCAAwC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,+EAA+E;IAC/E,0BAA0B,EAAE,MAAM,CAAC;IACnC,yCAAyC;IACzC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wKAAwK;IACxK,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,yBAAyB,EAAE,MAAM,CAAC;IAClC,gGAAgG;IAChG,wBAAwB,EAAE,MAAM,CAAC;IACjC,yGAAyG;IACzG,8BAA8B,EAAE,MAAM,CAAC;IACvC,yEAAyE;IACzE,cAAc,EAAE,UAAU,CAAC;IAC3B,4IAA4I;IAC5I,sBAAsB,EAAE,MAAM,CAAC;IAC/B,+BAA+B;IAC/B,aAAa,EAAE,QA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AwB,CAAC,EAAE,MAAM,CAAC;IAClC,sCAAsC;IACtC,2BAA2B,EAAE,MAAM,CAAC;IACpC,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GAAG,eAAe,CAAC;AAEpB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AA8B9B,eAAO,MAAM,0BAA0B,GAAI,aAAa,YAAY;;;;;;;;;;;;CAKnE,CAAC;AAYF,eAAO,MAAM,mBAAmB,GAAI,aAAa,YAAY;;;CAK5D,CAAC;AAmBF,eAAO,MAAM,eAAe,GAAI,aAAa,YAAY;;;;;CAKxD,CAAC;AAkBF,eAAO,MAAM,oBAAoB,GAAI,aAAa,YAAY;;;;;;CAK7D,CAAC;AAmBF,eAAO,MAAM,mBAAmB,GAAI,aAAa,YAAY;;;;;;CAK5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,CAAC,iBAAiB,CAkH3E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAAC,kBAAkB,CAW7E,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,iBAAiB,CAE/D;AAED,wBAAgB,4BAA4B,IAAI,kBAAkB,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,eAAe,CAAC,GAAG,IAAI,CAmH3F"}
|
package/dest/config.js
CHANGED
|
@@ -314,60 +314,7 @@ export function getGenesisStateConfigEnvVars() {
|
|
|
314
314
|
}
|
|
315
315
|
// TallySlashingProposer constructor validations
|
|
316
316
|
if (config.slasherFlavor === 'tally') {
|
|
317
|
-
|
|
318
|
-
if (config.slashingOffsetInRounds <= 0) {
|
|
319
|
-
errors.push(`slashingOffsetInRounds (${config.slashingOffsetInRounds}) must be greater than 0`);
|
|
320
|
-
}
|
|
321
|
-
// From: require(ROUND_SIZE_IN_EPOCHS * _epochDuration == ROUND_SIZE, Errors.TallySlashingProposer__RoundSizeMustBeMultipleOfEpochDuration(...));
|
|
322
|
-
const roundSizeInSlots = config.slashingRoundSizeInEpochs * config.aztecEpochDuration;
|
|
323
|
-
// From: require(QUORUM > 0, Errors.TallySlashingProposer__QuorumMustBeGreaterThanZero());
|
|
324
|
-
if (slashingQuorum !== undefined && slashingQuorum <= 0) {
|
|
325
|
-
errors.push(`slashingQuorum (${slashingQuorum}) must be greater than 0`);
|
|
326
|
-
}
|
|
327
|
-
// From: require(ROUND_SIZE > 1, Errors.TallySlashingProposer__InvalidQuorumAndRoundSize(QUORUM, ROUND_SIZE));
|
|
328
|
-
if (roundSizeInSlots <= 1) {
|
|
329
|
-
errors.push(`slashing round size in slots (${roundSizeInSlots}) must be greater than 1`);
|
|
330
|
-
}
|
|
331
|
-
// From: require(_slashAmounts[0] <= _slashAmounts[1], Errors.TallySlashingProposer__InvalidSlashAmounts(_slashAmounts));
|
|
332
|
-
if (config.slashAmountSmall > config.slashAmountMedium) {
|
|
333
|
-
errors.push(`slashAmountSmall (${config.slashAmountSmall}) must be less than or equal to slashAmountMedium (${config.slashAmountMedium})`);
|
|
334
|
-
}
|
|
335
|
-
// From: require(_slashAmounts[1] <= _slashAmounts[2], Errors.TallySlashingProposer__InvalidSlashAmounts(_slashAmounts));
|
|
336
|
-
if (config.slashAmountMedium > config.slashAmountLarge) {
|
|
337
|
-
errors.push(`slashAmountMedium (${config.slashAmountMedium}) must be less than or equal to slashAmountLarge (${config.slashAmountLarge})`);
|
|
338
|
-
}
|
|
339
|
-
// From: require(LIFETIME_IN_ROUNDS < ROUNDABOUT_SIZE, Errors.TallySlashingProposer__LifetimeMustBeLessThanRoundabout(...));
|
|
340
|
-
const ROUNDABOUT_SIZE = 128; // Constant from TallySlashingProposer
|
|
341
|
-
if (config.slashingLifetimeInRounds >= ROUNDABOUT_SIZE) {
|
|
342
|
-
errors.push(`slashingLifetimeInRounds (${config.slashingLifetimeInRounds}) must be less than ${ROUNDABOUT_SIZE}`);
|
|
343
|
-
}
|
|
344
|
-
// From: require(ROUND_SIZE_IN_EPOCHS > 0, Errors.TallySlashingProposer__RoundSizeInEpochsMustBeGreaterThanZero(...));
|
|
345
|
-
if (config.slashingRoundSizeInEpochs <= 0) {
|
|
346
|
-
errors.push(`slashingRoundSizeInEpochs (${config.slashingRoundSizeInEpochs}) must be greater than 0`);
|
|
347
|
-
}
|
|
348
|
-
// From: require(ROUND_SIZE < MAX_ROUND_SIZE, Errors.TallySlashingProposer__RoundSizeTooLarge(ROUND_SIZE, MAX_ROUND_SIZE));
|
|
349
|
-
const MAX_ROUND_SIZE = 1024; // Constant from TallySlashingProposer
|
|
350
|
-
if (roundSizeInSlots >= MAX_ROUND_SIZE) {
|
|
351
|
-
errors.push(`slashing round size in slots (${roundSizeInSlots}) must be less than ${MAX_ROUND_SIZE}`);
|
|
352
|
-
}
|
|
353
|
-
// From: require(COMMITTEE_SIZE > 0, Errors.TallySlashingProposer__CommitteeSizeMustBeGreaterThanZero(COMMITTEE_SIZE));
|
|
354
|
-
if (config.aztecTargetCommitteeSize <= 0) {
|
|
355
|
-
errors.push(`aztecTargetCommitteeSize (${config.aztecTargetCommitteeSize}) must be greater than 0`);
|
|
356
|
-
}
|
|
357
|
-
// From: require(voteSize <= 128, Errors.TallySlashingProposer__VoteSizeTooBig(voteSize, 128));
|
|
358
|
-
// voteSize = COMMITTEE_SIZE * ROUND_SIZE_IN_EPOCHS / 4
|
|
359
|
-
const voteSize = config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs / 4;
|
|
360
|
-
if (voteSize > 128) {
|
|
361
|
-
errors.push(`vote size (${voteSize}) must be <= 128 (committee size * round size in epochs / 4)`);
|
|
362
|
-
}
|
|
363
|
-
// From: require(COMMITTEE_SIZE * ROUND_SIZE_IN_EPOCHS % 4 == 0, Errors.TallySlashingProposer__InvalidCommitteeAndRoundSize(...));
|
|
364
|
-
if (config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs % 4 !== 0) {
|
|
365
|
-
errors.push(`aztecTargetCommitteeSize * slashingRoundSizeInEpochs (${config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs}) must be divisible by 4`);
|
|
366
|
-
}
|
|
367
|
-
// Slashing offset validation: should be positive to allow proper slashing timing
|
|
368
|
-
if (config.slashingOffsetInRounds < 0) {
|
|
369
|
-
errors.push('slashingOffsetInRounds cannot be negative');
|
|
370
|
-
}
|
|
317
|
+
validateTallySlasherConfig(config, errors);
|
|
371
318
|
}
|
|
372
319
|
// Epoch and slot duration validations
|
|
373
320
|
if (config.aztecSlotDuration <= 0) {
|
|
@@ -403,3 +350,63 @@ export function getGenesisStateConfigEnvVars() {
|
|
|
403
350
|
throw new Error(`L1 contracts configuration validation failed with ${errors.length} error(s):\n${errors.map((error, index)=>`${index + 1}. ${error}`).join('\n')}`);
|
|
404
351
|
}
|
|
405
352
|
}
|
|
353
|
+
function validateTallySlasherConfig(config, errors) {
|
|
354
|
+
if (config.slasherFlavor !== 'tally') {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
// From: require(SLASH_OFFSET_IN_ROUNDS > 0, Errors.TallySlashingProposer__SlashOffsetMustBeGreaterThanZero(...));
|
|
358
|
+
if (config.slashingOffsetInRounds <= 0) {
|
|
359
|
+
errors.push(`slashingOffsetInRounds (${config.slashingOffsetInRounds}) must be greater than 0`);
|
|
360
|
+
}
|
|
361
|
+
// From: require(ROUND_SIZE_IN_EPOCHS * _epochDuration == ROUND_SIZE, Errors.TallySlashingProposer__RoundSizeMustBeMultipleOfEpochDuration(...));
|
|
362
|
+
const roundSizeInSlots = config.slashingRoundSizeInEpochs * config.aztecEpochDuration;
|
|
363
|
+
// From: require(QUORUM > 0, Errors.TallySlashingProposer__QuorumMustBeGreaterThanZero());
|
|
364
|
+
const { slashingQuorum } = config;
|
|
365
|
+
if (slashingQuorum !== undefined && slashingQuorum <= 0) {
|
|
366
|
+
errors.push(`slashingQuorum (${slashingQuorum}) must be greater than 0`);
|
|
367
|
+
}
|
|
368
|
+
// From: require(ROUND_SIZE > 1, Errors.TallySlashingProposer__InvalidQuorumAndRoundSize(QUORUM, ROUND_SIZE));
|
|
369
|
+
if (roundSizeInSlots <= 1) {
|
|
370
|
+
errors.push(`slashing round size in slots (${roundSizeInSlots}) must be greater than 1`);
|
|
371
|
+
}
|
|
372
|
+
// From: require(_slashAmounts[0] <= _slashAmounts[1], Errors.TallySlashingProposer__InvalidSlashAmounts(_slashAmounts));
|
|
373
|
+
if (config.slashAmountSmall > config.slashAmountMedium) {
|
|
374
|
+
errors.push(`slashAmountSmall (${config.slashAmountSmall}) must be less than or equal to slashAmountMedium (${config.slashAmountMedium})`);
|
|
375
|
+
}
|
|
376
|
+
// From: require(_slashAmounts[1] <= _slashAmounts[2], Errors.TallySlashingProposer__InvalidSlashAmounts(_slashAmounts));
|
|
377
|
+
if (config.slashAmountMedium > config.slashAmountLarge) {
|
|
378
|
+
errors.push(`slashAmountMedium (${config.slashAmountMedium}) must be less than or equal to slashAmountLarge (${config.slashAmountLarge})`);
|
|
379
|
+
}
|
|
380
|
+
// From: require(LIFETIME_IN_ROUNDS < ROUNDABOUT_SIZE, Errors.TallySlashingProposer__LifetimeMustBeLessThanRoundabout(...));
|
|
381
|
+
const ROUNDABOUT_SIZE = 128; // Constant from TallySlashingProposer
|
|
382
|
+
if (config.slashingLifetimeInRounds >= ROUNDABOUT_SIZE) {
|
|
383
|
+
errors.push(`slashingLifetimeInRounds (${config.slashingLifetimeInRounds}) must be less than ${ROUNDABOUT_SIZE}`);
|
|
384
|
+
}
|
|
385
|
+
// From: require(ROUND_SIZE_IN_EPOCHS > 0, Errors.TallySlashingProposer__RoundSizeInEpochsMustBeGreaterThanZero(...));
|
|
386
|
+
if (config.slashingRoundSizeInEpochs <= 0) {
|
|
387
|
+
errors.push(`slashingRoundSizeInEpochs (${config.slashingRoundSizeInEpochs}) must be greater than 0`);
|
|
388
|
+
}
|
|
389
|
+
// From: require(ROUND_SIZE < MAX_ROUND_SIZE, Errors.TallySlashingProposer__RoundSizeTooLarge(ROUND_SIZE, MAX_ROUND_SIZE));
|
|
390
|
+
const MAX_ROUND_SIZE = 1024; // Constant from TallySlashingProposer
|
|
391
|
+
if (roundSizeInSlots >= MAX_ROUND_SIZE) {
|
|
392
|
+
errors.push(`slashing round size in slots (${roundSizeInSlots}) must be less than ${MAX_ROUND_SIZE}`);
|
|
393
|
+
}
|
|
394
|
+
// From: require(COMMITTEE_SIZE > 0, Errors.TallySlashingProposer__CommitteeSizeMustBeGreaterThanZero(COMMITTEE_SIZE));
|
|
395
|
+
if (config.aztecTargetCommitteeSize <= 0) {
|
|
396
|
+
errors.push(`aztecTargetCommitteeSize (${config.aztecTargetCommitteeSize}) must be greater than 0`);
|
|
397
|
+
}
|
|
398
|
+
// From: require(voteSize <= 128, Errors.TallySlashingProposer__VoteSizeTooBig(voteSize, 128));
|
|
399
|
+
// voteSize = COMMITTEE_SIZE * ROUND_SIZE_IN_EPOCHS / 4
|
|
400
|
+
const voteSize = config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs / 4;
|
|
401
|
+
if (voteSize > 128) {
|
|
402
|
+
errors.push(`vote size (${voteSize}) must be <= 128 (committee size * round size in epochs / 4)`);
|
|
403
|
+
}
|
|
404
|
+
// From: require(COMMITTEE_SIZE * ROUND_SIZE_IN_EPOCHS % 4 == 0, Errors.TallySlashingProposer__InvalidCommitteeAndRoundSize(...));
|
|
405
|
+
if (config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs % 4 !== 0) {
|
|
406
|
+
errors.push(`aztecTargetCommitteeSize * slashingRoundSizeInEpochs (${config.aztecTargetCommitteeSize * config.slashingRoundSizeInEpochs}) must be divisible by 4`);
|
|
407
|
+
}
|
|
408
|
+
// Slashing offset validation: should be positive to allow proper slashing timing
|
|
409
|
+
if (config.slashingOffsetInRounds < 0) {
|
|
410
|
+
errors.push('slashingOffsetInRounds cannot be negative');
|
|
411
|
+
}
|
|
412
|
+
}
|
|
@@ -4,9 +4,10 @@ import type { L1TxUtils } from '../l1_tx_utils.js';
|
|
|
4
4
|
export declare class FeeAssetHandlerContract {
|
|
5
5
|
readonly txUtils: L1TxUtils;
|
|
6
6
|
address: EthAddress;
|
|
7
|
-
constructor(address: Hex, txUtils: L1TxUtils);
|
|
7
|
+
constructor(address: Hex | EthAddress, txUtils: L1TxUtils);
|
|
8
|
+
getOwner(): Promise<EthAddress>;
|
|
8
9
|
getMintAmount(): Promise<bigint>;
|
|
9
|
-
mint(recipient: Hex): Promise<{
|
|
10
|
+
mint(recipient: Hex | EthAddress): Promise<{
|
|
10
11
|
receipt: import("viem").TransactionReceipt;
|
|
11
12
|
gasPrice: import("../l1_tx_utils.js").GasPrice;
|
|
12
13
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee_asset_handler.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_asset_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,uBAAuB;aAKhB,OAAO,EAAE,SAAS;IAJ7B,OAAO,EAAE,UAAU,CAAC;gBAGzB,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"fee_asset_handler.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_asset_handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,uBAAuB;aAKhB,OAAO,EAAE,SAAS;IAJ7B,OAAO,EAAE,UAAU,CAAC;gBAGzB,OAAO,EAAE,GAAG,GAAG,UAAU,EACT,OAAO,EAAE,SAAS;IAQvB,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IASrC,aAAa;IASb,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU;;;;IAchC,aAAa,CAAC,MAAM,EAAE,MAAM;;;;CAUpC"}
|
|
@@ -6,8 +6,19 @@ export class FeeAssetHandlerContract {
|
|
|
6
6
|
address;
|
|
7
7
|
constructor(address, txUtils){
|
|
8
8
|
this.txUtils = txUtils;
|
|
9
|
+
if (address instanceof EthAddress) {
|
|
10
|
+
address = address.toString();
|
|
11
|
+
}
|
|
9
12
|
this.address = EthAddress.fromString(address);
|
|
10
13
|
}
|
|
14
|
+
async getOwner() {
|
|
15
|
+
const contract = getContract({
|
|
16
|
+
abi: FeeAssetHandlerAbi,
|
|
17
|
+
address: this.address.toString(),
|
|
18
|
+
client: this.txUtils.client
|
|
19
|
+
});
|
|
20
|
+
return EthAddress.fromString(await contract.read.owner());
|
|
21
|
+
}
|
|
11
22
|
getMintAmount() {
|
|
12
23
|
const contract = getContract({
|
|
13
24
|
abi: FeeAssetHandlerAbi,
|
|
@@ -17,6 +28,9 @@ export class FeeAssetHandlerContract {
|
|
|
17
28
|
return contract.read.mintAmount();
|
|
18
29
|
}
|
|
19
30
|
mint(recipient) {
|
|
31
|
+
if (recipient instanceof EthAddress) {
|
|
32
|
+
recipient = recipient.toString();
|
|
33
|
+
}
|
|
20
34
|
return this.txUtils.sendAndMonitorTransaction({
|
|
21
35
|
to: this.address.toString(),
|
|
22
36
|
data: encodeFunctionData({
|
|
@@ -4,8 +4,9 @@ import { type ViemClient } from '../types.js';
|
|
|
4
4
|
export declare class FeeJuiceContract {
|
|
5
5
|
readonly client: ViemClient;
|
|
6
6
|
private readonly feeJuiceContract;
|
|
7
|
-
constructor(address: Hex, client: ViemClient);
|
|
7
|
+
constructor(address: Hex | EthAddress, client: ViemClient);
|
|
8
8
|
get address(): EthAddress;
|
|
9
|
+
getOwner(): Promise<EthAddress>;
|
|
9
10
|
private assertWalletFeeJuice;
|
|
10
11
|
mint(to: Hex, amount: bigint): Promise<void>;
|
|
11
12
|
approve(spender: Hex, amount: bigint): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee_juice.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_juice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAA8B,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAEzE,OAAO,EAAiC,KAAK,UAAU,EAAoB,MAAM,aAAa,CAAC;AAE/F,qBAAa,gBAAgB;aAKT,MAAM,EAAE,UAAU;IAJpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwD;gBAGvF,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"fee_juice.d.ts","sourceRoot":"","sources":["../../src/contracts/fee_juice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAA8B,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAEzE,OAAO,EAAiC,KAAK,UAAU,EAAoB,MAAM,aAAa,CAAC;AAE/F,qBAAa,gBAAgB;aAKT,MAAM,EAAE,UAAU;IAJpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwD;gBAGvF,OAAO,EAAE,GAAG,GAAG,UAAU,EACT,MAAM,EAAE,UAAU;IAQpC,IAAW,OAAO,eAEjB;IAEY,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IAI5C,OAAO,CAAC,oBAAoB;IAOf,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;IAW5B,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;CAUlD"}
|
|
@@ -7,6 +7,9 @@ export class FeeJuiceContract {
|
|
|
7
7
|
feeJuiceContract;
|
|
8
8
|
constructor(address, client){
|
|
9
9
|
this.client = client;
|
|
10
|
+
if (address instanceof EthAddress) {
|
|
11
|
+
address = address.toString();
|
|
12
|
+
}
|
|
10
13
|
this.feeJuiceContract = getContract({
|
|
11
14
|
address,
|
|
12
15
|
abi: FeeJuiceAbi,
|
|
@@ -16,6 +19,9 @@ export class FeeJuiceContract {
|
|
|
16
19
|
get address() {
|
|
17
20
|
return EthAddress.fromString(this.feeJuiceContract.address);
|
|
18
21
|
}
|
|
22
|
+
async getOwner() {
|
|
23
|
+
return EthAddress.fromString(await this.feeJuiceContract.read.owner());
|
|
24
|
+
}
|
|
19
25
|
assertWalletFeeJuice() {
|
|
20
26
|
if (!isExtendedClient(this.client)) {
|
|
21
27
|
throw new Error('Wallet client is required for this operation');
|
|
@@ -67,7 +67,7 @@ export declare class ReadOnlyGovernanceContract {
|
|
|
67
67
|
export declare class GovernanceContract extends ReadOnlyGovernanceContract {
|
|
68
68
|
readonly client: ExtendedViemWalletClient;
|
|
69
69
|
protected readonly governanceContract: GetContractReturnType<typeof GovernanceAbi, ExtendedViemWalletClient>;
|
|
70
|
-
constructor(address: Hex, client: ExtendedViemWalletClient);
|
|
70
|
+
constructor(address: Hex | EthAddress, client: ExtendedViemWalletClient);
|
|
71
71
|
deposit(onBehalfOf: Hex, amount: bigint): Promise<void>;
|
|
72
72
|
proposeWithLock({ payloadAddress, withdrawAddress, }: {
|
|
73
73
|
payloadAddress: Hex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../src/contracts/governance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAEL,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AAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB;CA0CF"}
|
|
@@ -113,6 +113,9 @@ export class GovernanceContract extends ReadOnlyGovernanceContract {
|
|
|
113
113
|
client;
|
|
114
114
|
governanceContract;
|
|
115
115
|
constructor(address, client){
|
|
116
|
+
if (address instanceof EthAddress) {
|
|
117
|
+
address = address.toString();
|
|
118
|
+
}
|
|
116
119
|
super(address, client), this.client = client;
|
|
117
120
|
if (!isExtendedClient(client)) {
|
|
118
121
|
throw new Error('GovernanceContract has to be instantiated with a wallet client.');
|
|
@@ -6,7 +6,7 @@ import { type IEmpireBase } from './empire_base.js';
|
|
|
6
6
|
export declare class GovernanceProposerContract implements IEmpireBase {
|
|
7
7
|
readonly client: ViemClient;
|
|
8
8
|
private readonly proposer;
|
|
9
|
-
constructor(client: ViemClient, address: Hex);
|
|
9
|
+
constructor(client: ViemClient, address: Hex | EthAddress);
|
|
10
10
|
get address(): EthAddress;
|
|
11
11
|
getRollupAddress(): Promise<EthAddress>;
|
|
12
12
|
getRegistryAddress(): Promise<EthAddress>;
|
|
@@ -1 +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,EAEL,KAAK,GAAG,EACR,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAGhH,qBAAa,0BAA2B,YAAW,WAAW;aAI1C,MAAM,EAAE,UAAU;IAHpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAk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;IAOxC,gCAAgC,CAC3C,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,GAAG,EAClB,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,GACjD,OAAO,CAAC,WAAW,CAAC;IAeV,iBAAiB,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC;QACT,OAAO,EAAE,kBAAkB,CAAC;QAC5B,QAAQ,EAAE,QAAQ,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CAYH"}
|
|
@@ -15,6 +15,9 @@ export class GovernanceProposerContract {
|
|
|
15
15
|
proposer;
|
|
16
16
|
constructor(client, address){
|
|
17
17
|
this.client = client;
|
|
18
|
+
if (address instanceof EthAddress) {
|
|
19
|
+
address = address.toString();
|
|
20
|
+
}
|
|
18
21
|
this.proposer = getContract({
|
|
19
22
|
address,
|
|
20
23
|
abi: GovernanceProposerAbi,
|
package/dest/contracts/gse.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export declare class GSEContract {
|
|
|
23
23
|
address: EthAddress;
|
|
24
24
|
private readonly gse;
|
|
25
25
|
constructor(client: ViemClient, address: Hex | EthAddress);
|
|
26
|
+
getOwner(): Promise<EthAddress>;
|
|
27
|
+
getGovernance(): Promise<EthAddress>;
|
|
26
28
|
getAttestersFromIndicesAtTime(instance: Hex | EthAddress, ts: bigint, indices: bigint[]): Promise<readonly `0x${string}`[]>;
|
|
27
29
|
getRegistrationDigest(publicKey: ProjPointType<bigint>): Promise<ProjPointType<bigint>>;
|
|
28
30
|
makeRegistrationTuple(privateKey: bigint): Promise<RegistrationTuple>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gse.d.ts","sourceRoot":"","sources":["../../src/contracts/gse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA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AAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,iBAAiB,EAAE;QACjB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;CACH,CAAC;AAEF,qBAAa,WAAW;aAKJ,MAAM,EAAE,UAAU;IAJ7B,OAAO,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAmD;gBAGrD,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG,GAAG,UAAU;IASd,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IAI/B,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAIjD,6BAA6B,CAAC,QAAQ,EAAE,GAAG,GAAG,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;IAO1E,qBAAqB,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAMvF,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAyBnF"}
|
package/dest/contracts/gse.js
CHANGED
|
@@ -18,6 +18,12 @@ export class GSEContract {
|
|
|
18
18
|
client
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
async getOwner() {
|
|
22
|
+
return EthAddress.fromString(await this.gse.read.owner());
|
|
23
|
+
}
|
|
24
|
+
async getGovernance() {
|
|
25
|
+
return EthAddress.fromString(await this.gse.read.getGovernance());
|
|
26
|
+
}
|
|
21
27
|
getAttestersFromIndicesAtTime(instance, ts, indices) {
|
|
22
28
|
if (instance instanceof EthAddress) {
|
|
23
29
|
instance = instance.toString();
|
|
@@ -60,6 +60,17 @@ export interface ContractArtifacts<TAbi extends Abi | readonly unknown[] = Abi>
|
|
|
60
60
|
*/
|
|
61
61
|
libraries?: Libraries;
|
|
62
62
|
}
|
|
63
|
+
export type VerificationLibraryEntry = {
|
|
64
|
+
file: string;
|
|
65
|
+
contract: string;
|
|
66
|
+
address: string;
|
|
67
|
+
};
|
|
68
|
+
export type VerificationRecord = {
|
|
69
|
+
name: string;
|
|
70
|
+
address: string;
|
|
71
|
+
constructorArgsHex: Hex;
|
|
72
|
+
libraries: VerificationLibraryEntry[];
|
|
73
|
+
};
|
|
63
74
|
export interface DeployL1ContractsArgs extends Omit<L1ContractsConfig, keyof L1TxUtilsConfig> {
|
|
64
75
|
/** The vk tree root. */
|
|
65
76
|
vkTreeRoot: Fr;
|
|
@@ -120,11 +131,11 @@ export declare const deployUpgradePayload: (deployer: L1Deployer, addresses: Pic
|
|
|
120
131
|
/**
|
|
121
132
|
* Deploys a new rollup contract, funds and initializes the fee juice portal, and initializes the validator set.
|
|
122
133
|
*/
|
|
123
|
-
export declare const deployRollup: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, addresses: Pick<L1ContractAddresses, "feeJuiceAddress" | "registryAddress" | "rewardDistributorAddress" | "stakingAssetAddress" | "gseAddress">, logger: Logger) => Promise<{
|
|
134
|
+
export declare const deployRollup: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, addresses: Pick<L1ContractAddresses, "feeJuiceAddress" | "registryAddress" | "rewardDistributorAddress" | "stakingAssetAddress" | "gseAddress" | "governanceAddress">, logger: Logger) => Promise<{
|
|
124
135
|
rollup: RollupContract;
|
|
125
136
|
slashFactoryAddress: EthAddress;
|
|
126
137
|
}>;
|
|
127
|
-
export declare const handoverToGovernance: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, registryAddress: EthAddress, gseAddress: EthAddress, governanceAddress: EthAddress, logger: Logger, acceleratedTestDeployments: boolean | undefined) => Promise<void>;
|
|
138
|
+
export declare const handoverToGovernance: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, registryAddress: EthAddress, gseAddress: EthAddress, coinIssuerAddress: EthAddress, feeAssetAddress: EthAddress, governanceAddress: EthAddress, logger: Logger, acceleratedTestDeployments: boolean | undefined) => Promise<void>;
|
|
128
139
|
export declare const addMultipleValidators: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, gseAddress: Hex, rollupAddress: Hex, stakingAssetAddress: Hex, validators: Operator[], acceleratedTestDeployments: boolean | undefined, logger: Logger) => Promise<void>;
|
|
129
140
|
/**
|
|
130
141
|
* Initialize the fee asset handler and make it a minter on the fee asset.
|
|
@@ -148,16 +159,18 @@ export declare const cheat_initializeFeeAssetHandler: (extendedClient: ExtendedV
|
|
|
148
159
|
* @param args - Arguments for initialization of L1 contracts
|
|
149
160
|
* @returns A list of ETH addresses of the deployed contracts.
|
|
150
161
|
*/
|
|
151
|
-
export declare const deployL1Contracts: (rpcUrls: string[], account: HDAccount | PrivateKeyAccount, chain: Chain, logger: Logger, args: DeployL1ContractsArgs, txUtilsConfig?: L1TxUtilsConfig) => Promise<DeployL1ContractsReturnType>;
|
|
162
|
+
export declare const deployL1Contracts: (rpcUrls: string[], account: HDAccount | PrivateKeyAccount, chain: Chain, logger: Logger, args: DeployL1ContractsArgs, txUtilsConfig?: L1TxUtilsConfig, createVerificationJson?: string | false) => Promise<DeployL1ContractsReturnType>;
|
|
152
163
|
export declare class L1Deployer {
|
|
153
164
|
readonly client: ExtendedViemWalletClient;
|
|
154
165
|
private acceleratedTestDeployments;
|
|
155
166
|
private logger;
|
|
156
167
|
private txUtilsConfig?;
|
|
168
|
+
private createVerificationJson;
|
|
157
169
|
private salt;
|
|
158
170
|
private txHashes;
|
|
159
171
|
readonly l1TxUtils: L1TxUtils;
|
|
160
|
-
|
|
172
|
+
readonly verificationRecords: VerificationRecord[];
|
|
173
|
+
constructor(client: ExtendedViemWalletClient, maybeSalt: number | undefined, dateProvider?: DateProvider, acceleratedTestDeployments?: boolean, logger?: Logger, txUtilsConfig?: L1TxUtilsConfig | undefined, createVerificationJson?: boolean);
|
|
161
174
|
deploy<const TAbi extends Abi>(params: ContractArtifacts<TAbi>, args?: ContractConstructorArgs<TAbi>, opts?: {
|
|
162
175
|
gasLimit?: bigint;
|
|
163
176
|
}): Promise<EthAddress>;
|
|
@@ -188,6 +201,7 @@ export declare function deployL1Contract(extendedClient: ExtendedViemWalletClien
|
|
|
188
201
|
}): Promise<{
|
|
189
202
|
address: EthAddress;
|
|
190
203
|
txHash: Hex | undefined;
|
|
204
|
+
deployedLibraries?: VerificationLibraryEntry[];
|
|
191
205
|
}>;
|
|
192
206
|
export declare function getExpectedAddress(abi: Narrow<Abi | readonly unknown[]>, bytecode: Hex, args: readonly unknown[], salt: Hex): {
|
|
193
207
|
address: `0x${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/deploy_l1_contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAwB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EACL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,iBAAiB,EAUvB,MAAM,MAAM,CAAC;AAKd,OAAO,EACL,KAAK,iBAAiB,EA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