@aztec/ethereum 2.0.0-nightly.20250903 → 3.0.0-nightly.20250904
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 +2 -2
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +133 -53
- 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 -5
- 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 +151 -50
- 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,QAA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wB,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,K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AE,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,CAAkE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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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AE,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();
|
|
@@ -131,11 +131,11 @@ export declare const deployUpgradePayload: (deployer: L1Deployer, addresses: Pic
|
|
|
131
131
|
/**
|
|
132
132
|
* Deploys a new rollup contract, funds and initializes the fee juice portal, and initializes the validator set.
|
|
133
133
|
*/
|
|
134
|
-
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<{
|
|
135
135
|
rollup: RollupContract;
|
|
136
136
|
slashFactoryAddress: EthAddress;
|
|
137
137
|
}>;
|
|
138
|
-
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>;
|
|
139
139
|
export declare const addMultipleValidators: (extendedClient: ExtendedViemWalletClient, deployer: L1Deployer, gseAddress: Hex, rollupAddress: Hex, stakingAssetAddress: Hex, validators: Operator[], acceleratedTestDeployments: boolean | undefined, logger: Logger) => Promise<void>;
|
|
140
140
|
/**
|
|
141
141
|
* Initialize the fee asset handler and make it a minter on the fee asset.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/de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
|
|
100
100
|
}
|
|
101
101
|
const coinIssuerAddress = await deployer.deploy(CoinIssuerArtifact, [
|
|
102
102
|
feeAssetAddress.toString(),
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
1_000_000n * 10n ** 18n,
|
|
104
|
+
l1Client.account.address
|
|
105
105
|
]);
|
|
106
106
|
logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
|
|
107
|
-
const feeAsset = getContract({
|
|
108
|
-
address: feeAssetAddress.toString(),
|
|
109
|
-
abi: FeeAssetArtifact.contractAbi,
|
|
110
|
-
client: l1Client
|
|
111
|
-
});
|
|
112
107
|
logger.verbose(`Waiting for deployments to complete`);
|
|
113
108
|
await deployer.waitForDeployments();
|
|
114
|
-
if (args.acceleratedTestDeployments || !await feeAsset.read.minters([
|
|
115
|
-
coinIssuerAddress.toString()
|
|
116
|
-
])) {
|
|
117
|
-
const { txHash } = await deployer.sendTransaction({
|
|
118
|
-
to: feeAssetAddress.toString(),
|
|
119
|
-
data: encodeFunctionData({
|
|
120
|
-
abi: FeeAssetArtifact.contractAbi,
|
|
121
|
-
functionName: 'addMinter',
|
|
122
|
-
args: [
|
|
123
|
-
coinIssuerAddress.toString()
|
|
124
|
-
]
|
|
125
|
-
})
|
|
126
|
-
}, {
|
|
127
|
-
gasLimit: 100_000n
|
|
128
|
-
});
|
|
129
|
-
logger.verbose(`Added coin issuer ${coinIssuerAddress} as minter on fee asset in ${txHash}`);
|
|
130
|
-
txHashes.push(txHash);
|
|
131
|
-
}
|
|
132
109
|
// Registry ownership will be transferred to governance later, after rollup is added
|
|
133
110
|
let feeAssetHandlerAddress = undefined;
|
|
134
111
|
let stakingAssetHandlerAddress = undefined;
|
|
@@ -138,21 +115,24 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
138
115
|
/* -------------------------------------------------------------------------- */ /* CHEAT CODES START HERE */ /* -------------------------------------------------------------------------- */ feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
|
|
139
116
|
l1Client.account.address,
|
|
140
117
|
feeAssetAddress.toString(),
|
|
141
|
-
BigInt(
|
|
118
|
+
BigInt(1000n * 10n ** 18n)
|
|
142
119
|
]);
|
|
143
120
|
logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
121
|
+
// Only if we are "fresh" will we be adding as a minter, otherwise above will simply get same address
|
|
122
|
+
if (needToSetGovernance) {
|
|
123
|
+
const { txHash } = await deployer.sendTransaction({
|
|
124
|
+
to: feeAssetAddress.toString(),
|
|
125
|
+
data: encodeFunctionData({
|
|
126
|
+
abi: FeeAssetArtifact.contractAbi,
|
|
127
|
+
functionName: 'addMinter',
|
|
128
|
+
args: [
|
|
129
|
+
feeAssetHandlerAddress.toString()
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
logger.verbose(`Added fee asset handler ${feeAssetHandlerAddress} as minter on fee asset in ${txHash}`);
|
|
134
|
+
txHashes.push(txHash);
|
|
135
|
+
}
|
|
156
136
|
// Only if on sepolia will we deploy the staking asset handler
|
|
157
137
|
// Should not be deployed to devnet since it would cause caos with sequencers there etc.
|
|
158
138
|
if ([
|
|
@@ -460,6 +440,23 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
460
440
|
])) {
|
|
461
441
|
await addMultipleValidators(extendedClient, deployer, addresses.gseAddress.toString(), rollupAddress.toString(), addresses.stakingAssetAddress.toString(), args.initialValidators, args.acceleratedTestDeployments, logger);
|
|
462
442
|
}
|
|
443
|
+
// If the owner is not the Governance contract, transfer ownership to the Governance contract
|
|
444
|
+
logger.verbose(addresses.governanceAddress.toString());
|
|
445
|
+
if (getAddress(await rollupContract.getOwner()) !== getAddress(addresses.governanceAddress.toString())) {
|
|
446
|
+
// TODO(md): add send transaction to the deployer such that we do not need to manage tx hashes here
|
|
447
|
+
const { txHash: transferOwnershipTxHash } = await deployer.sendTransaction({
|
|
448
|
+
to: rollupContract.address,
|
|
449
|
+
data: encodeFunctionData({
|
|
450
|
+
abi: RegistryArtifact.contractAbi,
|
|
451
|
+
functionName: 'transferOwnership',
|
|
452
|
+
args: [
|
|
453
|
+
getAddress(addresses.governanceAddress.toString())
|
|
454
|
+
]
|
|
455
|
+
})
|
|
456
|
+
});
|
|
457
|
+
logger.verbose(`Transferring the ownership of the rollup contract at ${rollupContract.address} to the Governance ${addresses.governanceAddress} in tx ${transferOwnershipTxHash}`);
|
|
458
|
+
txHashes.push(transferOwnershipTxHash);
|
|
459
|
+
}
|
|
463
460
|
await deployer.waitForDeployments();
|
|
464
461
|
await Promise.all(txHashes.map((txHash)=>extendedClient.waitForTransactionReceipt({
|
|
465
462
|
hash: txHash
|
|
@@ -470,7 +467,7 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
470
467
|
slashFactoryAddress
|
|
471
468
|
};
|
|
472
469
|
};
|
|
473
|
-
export const handoverToGovernance = async (extendedClient, deployer, registryAddress, gseAddress, governanceAddress, logger, acceleratedTestDeployments)=>{
|
|
470
|
+
export const handoverToGovernance = async (extendedClient, deployer, registryAddress, gseAddress, coinIssuerAddress, feeAssetAddress, governanceAddress, logger, acceleratedTestDeployments)=>{
|
|
474
471
|
// We need to call a function on the registry to set the various contract addresses.
|
|
475
472
|
const registryContract = getContract({
|
|
476
473
|
address: getAddress(registryAddress.toString()),
|
|
@@ -482,6 +479,16 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
|
|
|
482
479
|
abi: GSEArtifact.contractAbi,
|
|
483
480
|
client: extendedClient
|
|
484
481
|
});
|
|
482
|
+
const coinIssuerContract = getContract({
|
|
483
|
+
address: getAddress(coinIssuerAddress.toString()),
|
|
484
|
+
abi: CoinIssuerArtifact.contractAbi,
|
|
485
|
+
client: extendedClient
|
|
486
|
+
});
|
|
487
|
+
const feeAsset = getContract({
|
|
488
|
+
address: getAddress(feeAssetAddress.toString()),
|
|
489
|
+
abi: FeeAssetArtifact.contractAbi,
|
|
490
|
+
client: extendedClient
|
|
491
|
+
});
|
|
485
492
|
const txHashes = [];
|
|
486
493
|
// If the owner is not the Governance contract, transfer ownership to the Governance contract
|
|
487
494
|
if (acceleratedTestDeployments || await registryContract.read.owner() !== getAddress(governanceAddress.toString())) {
|
|
@@ -515,6 +522,48 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
|
|
|
515
522
|
logger.verbose(`Transferring the ownership of the gse contract at ${gseAddress} to the Governance ${governanceAddress} in tx ${transferOwnershipTxHash}`);
|
|
516
523
|
txHashes.push(transferOwnershipTxHash);
|
|
517
524
|
}
|
|
525
|
+
if (acceleratedTestDeployments || await feeAsset.read.owner() !== coinIssuerAddress.toString()) {
|
|
526
|
+
const { txHash } = await deployer.sendTransaction({
|
|
527
|
+
to: feeAssetAddress.toString(),
|
|
528
|
+
data: encodeFunctionData({
|
|
529
|
+
abi: FeeAssetArtifact.contractAbi,
|
|
530
|
+
functionName: 'transferOwnership',
|
|
531
|
+
args: [
|
|
532
|
+
coinIssuerAddress.toString()
|
|
533
|
+
]
|
|
534
|
+
})
|
|
535
|
+
}, {
|
|
536
|
+
gasLimit: 500_000n
|
|
537
|
+
});
|
|
538
|
+
logger.verbose(`Transfer ownership of fee asset to coin issuer ${coinIssuerAddress} in ${txHash}`);
|
|
539
|
+
txHashes.push(txHash);
|
|
540
|
+
const { txHash: acceptTokenOwnershipTxHash } = await deployer.sendTransaction({
|
|
541
|
+
to: coinIssuerAddress.toString(),
|
|
542
|
+
data: encodeFunctionData({
|
|
543
|
+
abi: CoinIssuerArtifact.contractAbi,
|
|
544
|
+
functionName: 'acceptTokenOwnership'
|
|
545
|
+
})
|
|
546
|
+
}, {
|
|
547
|
+
gasLimit: 500_000n
|
|
548
|
+
});
|
|
549
|
+
logger.verbose(`Accept ownership of fee asset in ${acceptTokenOwnershipTxHash}`);
|
|
550
|
+
txHashes.push(acceptTokenOwnershipTxHash);
|
|
551
|
+
}
|
|
552
|
+
// If the owner is not the Governance contract, transfer ownership to the Governance contract
|
|
553
|
+
if (acceleratedTestDeployments || await coinIssuerContract.read.owner() !== getAddress(governanceAddress.toString())) {
|
|
554
|
+
const { txHash: transferOwnershipTxHash } = await deployer.sendTransaction({
|
|
555
|
+
to: coinIssuerContract.address,
|
|
556
|
+
data: encodeFunctionData({
|
|
557
|
+
abi: CoinIssuerArtifact.contractAbi,
|
|
558
|
+
functionName: 'transferOwnership',
|
|
559
|
+
args: [
|
|
560
|
+
getAddress(governanceAddress.toString())
|
|
561
|
+
]
|
|
562
|
+
})
|
|
563
|
+
});
|
|
564
|
+
logger.verbose(`Transferring the ownership of the coin issuer contract at ${coinIssuerAddress} to the Governance ${governanceAddress} in tx ${transferOwnershipTxHash}`);
|
|
565
|
+
txHashes.push(transferOwnershipTxHash);
|
|
566
|
+
}
|
|
518
567
|
// Wait for all actions to be mined
|
|
519
568
|
await deployer.waitForDeployments();
|
|
520
569
|
await Promise.all(txHashes.map((txHash)=>extendedClient.waitForTransactionReceipt({
|
|
@@ -578,18 +627,47 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
|
|
|
578
627
|
const entryQueueLengthBefore = await rollup.getEntryQueueLength();
|
|
579
628
|
const validatorCountBefore = await rollup.getActiveAttesterCount();
|
|
580
629
|
logger.info(`Adding ${validators.length} validators to the rollup`);
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
630
|
+
// Adding to the queue and flushing need to be done in two transactions
|
|
631
|
+
// if we are adding many validators.
|
|
632
|
+
if (validatorsTuples.length > 10) {
|
|
633
|
+
await deployer.l1TxUtils.sendAndMonitorTransaction({
|
|
634
|
+
to: multiAdder.toString(),
|
|
635
|
+
data: encodeFunctionData({
|
|
636
|
+
abi: MultiAdderArtifact.contractAbi,
|
|
637
|
+
functionName: 'addValidators',
|
|
638
|
+
args: [
|
|
639
|
+
validatorsTuples,
|
|
640
|
+
true
|
|
641
|
+
]
|
|
642
|
+
})
|
|
643
|
+
}, {
|
|
644
|
+
gasLimit: 40_000_000n
|
|
645
|
+
});
|
|
646
|
+
await deployer.l1TxUtils.sendAndMonitorTransaction({
|
|
647
|
+
to: rollupAddress,
|
|
648
|
+
data: encodeFunctionData({
|
|
649
|
+
abi: RollupArtifact.contractAbi,
|
|
650
|
+
functionName: 'flushEntryQueue',
|
|
651
|
+
args: []
|
|
652
|
+
})
|
|
653
|
+
}, {
|
|
654
|
+
gasLimit: 40_000_000n
|
|
655
|
+
});
|
|
656
|
+
} else {
|
|
657
|
+
await deployer.l1TxUtils.sendAndMonitorTransaction({
|
|
658
|
+
to: multiAdder.toString(),
|
|
659
|
+
data: encodeFunctionData({
|
|
660
|
+
abi: MultiAdderArtifact.contractAbi,
|
|
661
|
+
functionName: 'addValidators',
|
|
662
|
+
args: [
|
|
663
|
+
validatorsTuples,
|
|
664
|
+
false
|
|
665
|
+
]
|
|
666
|
+
})
|
|
667
|
+
}, {
|
|
668
|
+
gasLimit: 45_000_000n
|
|
669
|
+
});
|
|
670
|
+
}
|
|
593
671
|
const entryQueueLengthAfter = await rollup.getEntryQueueLength();
|
|
594
672
|
const validatorCountAfter = await rollup.getActiveAttesterCount();
|
|
595
673
|
if (entryQueueLengthAfter + validatorCountAfter < entryQueueLengthBefore + validatorCountBefore + BigInt(validators.length)) {
|
|
@@ -640,6 +718,7 @@ export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer,
|
|
|
640
718
|
* @param args - Arguments for initialization of L1 contracts
|
|
641
719
|
* @returns A list of ETH addresses of the deployed contracts.
|
|
642
720
|
*/ export const deployL1Contracts = async (rpcUrls, account, chain, logger, args, txUtilsConfig = getL1TxUtilsConfigEnvVars(), createVerificationJson = false)=>{
|
|
721
|
+
logger.info(`Deploying L1 contracts with config: ${jsonStringify(args)}`);
|
|
643
722
|
validateConfig(args);
|
|
644
723
|
const l1Client = createExtendedL1Client(rpcUrls, account, chain);
|
|
645
724
|
// Deploy multicall3 if it does not exist in this network
|
|
@@ -672,12 +751,13 @@ export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer,
|
|
|
672
751
|
registryAddress,
|
|
673
752
|
gseAddress,
|
|
674
753
|
rewardDistributorAddress,
|
|
675
|
-
stakingAssetAddress
|
|
754
|
+
stakingAssetAddress,
|
|
755
|
+
governanceAddress
|
|
676
756
|
}, logger);
|
|
677
757
|
logger.verbose('Waiting for rollup and slash factory to be deployed');
|
|
678
758
|
await deployer.waitForDeployments();
|
|
679
759
|
// Now that the rollup has been deployed and added to the registry, transfer ownership to governance
|
|
680
|
-
await handoverToGovernance(l1Client, deployer, registryAddress, gseAddress, governanceAddress, logger, args.acceleratedTestDeployments);
|
|
760
|
+
await handoverToGovernance(l1Client, deployer, registryAddress, gseAddress, coinIssuerAddress, feeAssetAddress, governanceAddress, logger, args.acceleratedTestDeployments);
|
|
681
761
|
logger.info(`Handing over to governance complete`);
|
|
682
762
|
logger.verbose(`All transactions for L1 deployment have been mined`);
|
|
683
763
|
const l1Contracts = await RegistryContract.collectAddresses(l1Client, registryAddress, 'canonical');
|