@aztec/ethereum 2.0.3 → 2.1.0-rc.10
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/account.js +1 -1
- package/dest/chain.d.ts +1 -1
- package/dest/chain.d.ts.map +1 -1
- package/dest/chain.js +1 -1
- package/dest/client.d.ts +1 -1
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +3 -3
- package/dest/config.d.ts +10 -5
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +27 -39
- package/dest/constants.d.ts +1 -1
- package/dest/constants.d.ts.map +1 -1
- package/dest/contracts/empire_base.d.ts +2 -2
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts +5 -5
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.js +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +6 -6
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +1 -1
- package/dest/contracts/fee_juice.d.ts +1 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +1 -1
- package/dest/contracts/governance.d.ts +1 -1
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +8 -4
- package/dest/contracts/governance_proposer.d.ts +2 -3
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +2 -3
- package/dest/contracts/gse.d.ts +1 -1
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +1 -1
- package/dest/contracts/inbox.d.ts +1 -1
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +1 -1
- package/dest/contracts/multicall.d.ts +6 -8
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +7 -5
- package/dest/contracts/registry.d.ts +1 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +1 -1
- package/dest/contracts/rollup.d.ts +16 -17
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +26 -68
- package/dest/contracts/slasher_contract.d.ts +10 -0
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/slasher_contract.js +19 -1
- package/dest/contracts/tally_slashing_proposer.d.ts +1 -1
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/tally_slashing_proposer.js +1 -1
- package/dest/deploy_l1_contracts.d.ts +19 -5
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +318 -161
- package/dest/eth-signer/eth-signer.d.ts +1 -1
- package/dest/eth-signer/eth-signer.d.ts.map +1 -1
- package/dest/index.d.ts +1 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/l1_artifacts.d.ts +8020 -5949
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +6 -1
- package/dest/l1_contract_addresses.d.ts +5 -1
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +2 -1
- package/dest/l1_tx_utils/config.d.ts +59 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +73 -0
- package/dest/l1_tx_utils/constants.d.ts +6 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +14 -0
- package/dest/l1_tx_utils/factory.d.ts +24 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +12 -0
- package/dest/l1_tx_utils/index.d.ts +10 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +10 -0
- package/dest/l1_tx_utils/interfaces.d.ts +76 -0
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
- package/dest/l1_tx_utils/interfaces.js +4 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +95 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +610 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +26 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +26 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +81 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +294 -0
- package/dest/l1_tx_utils/signer.d.ts +4 -0
- package/dest/l1_tx_utils/signer.d.ts.map +1 -0
- package/dest/l1_tx_utils/signer.js +16 -0
- package/dest/l1_tx_utils/types.d.ts +67 -0
- package/dest/l1_tx_utils/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/types.js +26 -0
- package/dest/l1_tx_utils/utils.d.ts +4 -0
- package/dest/l1_tx_utils/utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/utils.js +14 -0
- package/dest/publisher_manager.d.ts +7 -2
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +36 -8
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +8 -2
- package/dest/test/chain_monitor.js +2 -2
- package/dest/test/delayed_tx_utils.d.ts +2 -2
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/delayed_tx_utils.js +2 -2
- package/dest/test/eth_cheat_codes.d.ts +18 -1
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +101 -22
- package/dest/test/rollup_cheat_codes.d.ts +4 -2
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +4 -4
- package/dest/test/tx_delayer.d.ts +1 -1
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +1 -1
- package/dest/test/upgrade_utils.d.ts +1 -1
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +2 -2
- package/dest/types.d.ts +1 -1
- package/dest/types.d.ts.map +1 -1
- package/dest/utils.d.ts +1 -1
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +1 -1
- package/package.json +7 -7
- package/src/account.ts +1 -1
- package/src/chain.ts +2 -2
- package/src/client.ts +3 -3
- package/src/config.ts +34 -44
- package/src/constants.ts +1 -1
- package/src/contracts/empire_base.ts +2 -2
- package/src/contracts/empire_slashing_proposer.ts +3 -3
- package/src/contracts/fee_asset_handler.ts +2 -2
- package/src/contracts/fee_juice.ts +1 -1
- package/src/contracts/governance.ts +4 -4
- package/src/contracts/governance_proposer.ts +4 -5
- package/src/contracts/gse.ts +1 -1
- package/src/contracts/inbox.ts +1 -1
- package/src/contracts/multicall.ts +13 -11
- package/src/contracts/registry.ts +1 -1
- package/src/contracts/rollup.ts +33 -88
- package/src/contracts/slasher_contract.ts +23 -1
- package/src/contracts/tally_slashing_proposer.ts +1 -1
- package/src/deploy_l1_contracts.ts +355 -182
- package/src/eth-signer/eth-signer.ts +1 -1
- package/src/index.ts +1 -1
- package/src/l1_artifacts.ts +9 -1
- package/src/l1_contract_addresses.ts +3 -1
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +140 -0
- package/src/l1_tx_utils/constants.ts +18 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/index.ts +12 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +718 -0
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +372 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/types.ts +85 -0
- package/src/l1_tx_utils/utils.ts +16 -0
- package/src/publisher_manager.ts +51 -9
- package/src/queries.ts +10 -1
- package/src/test/chain_monitor.ts +2 -2
- package/src/test/delayed_tx_utils.ts +2 -2
- package/src/test/eth_cheat_codes.ts +120 -20
- package/src/test/rollup_cheat_codes.ts +7 -4
- package/src/test/tx_delayer.ts +2 -2
- package/src/test/upgrade_utils.ts +2 -2
- package/src/types.ts +1 -1
- package/src/utils.ts +1 -1
- package/dest/l1_tx_utils.d.ts +0 -252
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -834
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -20
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -87
- package/src/l1_tx_utils.ts +0 -1124
- package/src/l1_tx_utils_with_blobs.ts +0 -150
package/dest/account.js
CHANGED
package/dest/chain.d.ts
CHANGED
package/dest/chain.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAK9C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CA+B/F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CASnE"}
|
package/dest/chain.js
CHANGED
package/dest/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import { type Chain, type HDAccount, type LocalAccount, type PrivateKeyAccount } from 'viem';
|
|
2
|
+
import { type Chain, type HDAccount, type LocalAccount, type PrivateKeyAccount } from '@spalladino/viem';
|
|
3
3
|
import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js';
|
|
4
4
|
type Config = {
|
|
5
5
|
/** The RPC Url of the ethereum host. */
|
package/dest/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAMvB,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAMvB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE7E,KAAK,MAAM,GAAG;IACZ,wCAAwC;IACxC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,YAAY,EAAE,MAAM,IAAI,oBAAoB,EAAE,CAAC;AAI/C,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAOhE;AAED,0FAA0F;AAC1F,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAIpG;AAyBD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EAAE,EACjB,+BAA+B,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,YAAY,EACtF,KAAK,GAAE,KAAe,EACtB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,YAAY,CAAC,EAAE,MAAM,GACpB,wBAAwB,CAgB1B"}
|
package/dest/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
2
|
-
import { createPublicClient, createWalletClient, fallback, http, publicActions } from 'viem';
|
|
3
|
-
import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
|
|
4
|
-
import { foundry } from 'viem/chains';
|
|
2
|
+
import { createPublicClient, createWalletClient, fallback, http, publicActions } from '@spalladino/viem';
|
|
3
|
+
import { mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts';
|
|
4
|
+
import { foundry } from '@spalladino/viem/chains';
|
|
5
5
|
import { createEthereumChain } from './chain.js';
|
|
6
6
|
// TODO: Use these methods to abstract the creation of viem clients.
|
|
7
7
|
/** Returns a viem public client given the L1 config. */ export function getPublicClient(config) {
|
package/dest/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ConfigMappingsType, type NetworkNames } from '@aztec/foundation/config';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { type L1TxUtilsConfig } from './l1_tx_utils.js';
|
|
3
|
+
import { type L1TxUtilsConfig } from './l1_tx_utils/index.js';
|
|
4
4
|
export type GenesisStateConfig = {
|
|
5
5
|
/** Whether to populate the genesis state with initial fee juice for the test accounts */
|
|
6
6
|
testAccounts: boolean;
|
|
@@ -16,12 +16,16 @@ export type L1ContractsConfig = {
|
|
|
16
16
|
aztecEpochDuration: number;
|
|
17
17
|
/** The target validator committee size. */
|
|
18
18
|
aztecTargetCommitteeSize: number;
|
|
19
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
20
|
+
lagInEpochs: number;
|
|
19
21
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
20
22
|
aztecProofSubmissionEpochs: number;
|
|
21
23
|
/** The deposit amount for a validator */
|
|
22
24
|
activationThreshold: bigint;
|
|
23
25
|
/** The minimum stake for a validator. */
|
|
24
26
|
ejectionThreshold: bigint;
|
|
27
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
28
|
+
localEjectionThreshold: bigint;
|
|
25
29
|
/** The slashing quorum, i.e. how many slots must signal for the same payload in a round for it to be submittable to the Slasher (defaults to slashRoundSize / 2 + 1) */
|
|
26
30
|
slashingQuorum?: number;
|
|
27
31
|
/** The slashing round size, i.e. how many epochs are in a slashing round */
|
|
@@ -34,6 +38,8 @@ export type L1ContractsConfig = {
|
|
|
34
38
|
slashingVetoer: EthAddress;
|
|
35
39
|
/** How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset) */
|
|
36
40
|
slashingOffsetInRounds: number;
|
|
41
|
+
/** How long slashing can be disabled for in seconds when vetoer disables it */
|
|
42
|
+
slashingDisableDuration: number;
|
|
37
43
|
/** Type of slasher proposer */
|
|
38
44
|
slasherFlavor: 'empire' | 'tally' | 'none';
|
|
39
45
|
/** Minimum amount that can be slashed in tally slashing */
|
|
@@ -58,9 +64,11 @@ export declare const DefaultL1ContractsConfig: {
|
|
|
58
64
|
aztecSlotDuration: number;
|
|
59
65
|
aztecEpochDuration: number;
|
|
60
66
|
aztecTargetCommitteeSize: number;
|
|
67
|
+
lagInEpochs: number;
|
|
61
68
|
aztecProofSubmissionEpochs: number;
|
|
62
69
|
activationThreshold: bigint;
|
|
63
70
|
ejectionThreshold: bigint;
|
|
71
|
+
localEjectionThreshold: bigint;
|
|
64
72
|
slashAmountSmall: bigint;
|
|
65
73
|
slashAmountMedium: bigint;
|
|
66
74
|
slashAmountLarge: bigint;
|
|
@@ -74,6 +82,7 @@ export declare const DefaultL1ContractsConfig: {
|
|
|
74
82
|
exitDelaySeconds: number;
|
|
75
83
|
slasherFlavor: "tally";
|
|
76
84
|
slashingOffsetInRounds: number;
|
|
85
|
+
slashingDisableDuration: number;
|
|
77
86
|
};
|
|
78
87
|
export declare const getGovernanceConfiguration: (networkName: NetworkNames) => {
|
|
79
88
|
proposeConfig: {
|
|
@@ -88,10 +97,6 @@ export declare const getGovernanceConfiguration: (networkName: NetworkNames) =>
|
|
|
88
97
|
requiredYeaMargin: bigint;
|
|
89
98
|
minimumVotes: bigint;
|
|
90
99
|
};
|
|
91
|
-
export declare const getGSEConfiguration: (networkName: NetworkNames) => {
|
|
92
|
-
activationThreshold: bigint;
|
|
93
|
-
ejectionThreshold: bigint;
|
|
94
|
-
};
|
|
95
100
|
export declare const getRewardConfig: (networkName: NetworkNames) => {
|
|
96
101
|
sequencerBps: number;
|
|
97
102
|
rewardDistributor: `0x${string}`;
|
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,
|
|
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,wBAAwB,CAAC;AAEvF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,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;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AA4D9B,eAAO,MAAM,0BAA0B,GAAI,aAAa,YAAY;;;;;;;;;;;;CAanE,CAAC;AAaF,eAAO,MAAM,eAAe,GAAI,aAAa,YAAY;;;;;CAUxD,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;CAUhC,CAAC;AAmCF,eAAO,MAAM,mBAAmB,GAAI,aAAa,YAAY;;;;;;CAa5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,CAAC,iBAAiB,CAkI3E,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
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { bigintConfigHelper, booleanConfigHelper, enumConfigHelper, getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper } from '@aztec/foundation/config';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { l1TxUtilsConfigMappings } from './l1_tx_utils.js';
|
|
3
|
+
import { l1TxUtilsConfigMappings } from './l1_tx_utils/index.js';
|
|
4
4
|
export const DefaultL1ContractsConfig = {
|
|
5
5
|
ethereumSlotDuration: 12,
|
|
6
6
|
aztecSlotDuration: 36,
|
|
7
7
|
aztecEpochDuration: 32,
|
|
8
8
|
aztecTargetCommitteeSize: 48,
|
|
9
|
+
lagInEpochs: 2,
|
|
9
10
|
aztecProofSubmissionEpochs: 1,
|
|
10
11
|
activationThreshold: 100n * 10n ** 18n,
|
|
11
12
|
ejectionThreshold: 50n * 10n ** 18n,
|
|
13
|
+
localEjectionThreshold: 98n * 10n ** 18n,
|
|
12
14
|
slashAmountSmall: 10n * 10n ** 18n,
|
|
13
15
|
slashAmountMedium: 20n * 10n ** 18n,
|
|
14
16
|
slashAmountLarge: 50n * 10n ** 18n,
|
|
@@ -21,7 +23,8 @@ export const DefaultL1ContractsConfig = {
|
|
|
21
23
|
provingCostPerMana: BigInt(100),
|
|
22
24
|
exitDelaySeconds: 2 * 24 * 60 * 60,
|
|
23
25
|
slasherFlavor: 'tally',
|
|
24
|
-
slashingOffsetInRounds: 2
|
|
26
|
+
slashingOffsetInRounds: 2,
|
|
27
|
+
slashingDisableDuration: 5 * 24 * 60 * 60
|
|
25
28
|
};
|
|
26
29
|
const LocalGovernanceConfiguration = {
|
|
27
30
|
proposeConfig: {
|
|
@@ -89,36 +92,6 @@ export const getGovernanceConfiguration = (networkName)=>{
|
|
|
89
92
|
throw new Error(`Unrecognized network name: ${networkName}`);
|
|
90
93
|
}
|
|
91
94
|
};
|
|
92
|
-
const LocalGSEConfiguration = {
|
|
93
|
-
activationThreshold: BigInt(100e18),
|
|
94
|
-
ejectionThreshold: BigInt(50e18)
|
|
95
|
-
};
|
|
96
|
-
const StagingPublicGSEConfiguration = {
|
|
97
|
-
activationThreshold: DefaultL1ContractsConfig.activationThreshold,
|
|
98
|
-
ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold
|
|
99
|
-
};
|
|
100
|
-
const TestnetGSEConfiguration = {
|
|
101
|
-
activationThreshold: BigInt(100e18),
|
|
102
|
-
ejectionThreshold: BigInt(50e18)
|
|
103
|
-
};
|
|
104
|
-
const StagingIgnitionGSEConfiguration = {
|
|
105
|
-
activationThreshold: DefaultL1ContractsConfig.activationThreshold,
|
|
106
|
-
ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold
|
|
107
|
-
};
|
|
108
|
-
export const getGSEConfiguration = (networkName)=>{
|
|
109
|
-
switch(networkName){
|
|
110
|
-
case 'local':
|
|
111
|
-
return LocalGSEConfiguration;
|
|
112
|
-
case 'staging-public':
|
|
113
|
-
return StagingPublicGSEConfiguration;
|
|
114
|
-
case 'testnet':
|
|
115
|
-
return TestnetGSEConfiguration;
|
|
116
|
-
case 'staging-ignition':
|
|
117
|
-
return StagingIgnitionGSEConfiguration;
|
|
118
|
-
default:
|
|
119
|
-
throw new Error(`Unrecognized network name: ${networkName}`);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
95
|
// Making a default config here as we are only using it thought the deployment
|
|
123
96
|
// and do not expect to be using different setups, so having environment variables
|
|
124
97
|
// for it seems overkill
|
|
@@ -160,8 +133,8 @@ const LocalEntryQueueConfig = {
|
|
|
160
133
|
};
|
|
161
134
|
const StagingPublicEntryQueueConfig = {
|
|
162
135
|
bootstrapValidatorSetSize: 48n,
|
|
163
|
-
bootstrapFlushSize:
|
|
164
|
-
normalFlushSizeMin:
|
|
136
|
+
bootstrapFlushSize: 48n,
|
|
137
|
+
normalFlushSizeMin: 1n,
|
|
165
138
|
normalFlushSizeQuotient: 2475n,
|
|
166
139
|
maxQueueFlushSize: 32n
|
|
167
140
|
};
|
|
@@ -173,11 +146,11 @@ const TestnetEntryQueueConfig = {
|
|
|
173
146
|
maxQueueFlushSize: 32n
|
|
174
147
|
};
|
|
175
148
|
const StagingIgnitionEntryQueueConfig = {
|
|
176
|
-
bootstrapValidatorSetSize:
|
|
177
|
-
bootstrapFlushSize:
|
|
149
|
+
bootstrapValidatorSetSize: 48n,
|
|
150
|
+
bootstrapFlushSize: 48n,
|
|
178
151
|
normalFlushSizeMin: 1n,
|
|
179
152
|
normalFlushSizeQuotient: 2048n,
|
|
180
|
-
maxQueueFlushSize:
|
|
153
|
+
maxQueueFlushSize: 24n
|
|
181
154
|
};
|
|
182
155
|
export const getEntryQueueConfig = (networkName)=>{
|
|
183
156
|
switch(networkName){
|
|
@@ -214,6 +187,11 @@ export const l1ContractsConfigMappings = {
|
|
|
214
187
|
description: 'The target validator committee size.',
|
|
215
188
|
...numberConfigHelper(DefaultL1ContractsConfig.aztecTargetCommitteeSize)
|
|
216
189
|
},
|
|
190
|
+
lagInEpochs: {
|
|
191
|
+
env: 'AZTEC_LAG_IN_EPOCHS',
|
|
192
|
+
description: 'The number of epochs to lag behind the current epoch for validator selection.',
|
|
193
|
+
...numberConfigHelper(DefaultL1ContractsConfig.lagInEpochs)
|
|
194
|
+
},
|
|
217
195
|
aztecProofSubmissionEpochs: {
|
|
218
196
|
env: 'AZTEC_PROOF_SUBMISSION_EPOCHS',
|
|
219
197
|
description: 'The number of epochs after an epoch ends that proofs are still accepted.',
|
|
@@ -229,6 +207,11 @@ export const l1ContractsConfigMappings = {
|
|
|
229
207
|
description: 'The minimum stake for a validator.',
|
|
230
208
|
...bigintConfigHelper(DefaultL1ContractsConfig.ejectionThreshold)
|
|
231
209
|
},
|
|
210
|
+
localEjectionThreshold: {
|
|
211
|
+
env: 'AZTEC_LOCAL_EJECTION_THRESHOLD',
|
|
212
|
+
description: 'The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup',
|
|
213
|
+
...bigintConfigHelper(DefaultL1ContractsConfig.localEjectionThreshold)
|
|
214
|
+
},
|
|
232
215
|
slashingOffsetInRounds: {
|
|
233
216
|
env: 'AZTEC_SLASHING_OFFSET_IN_ROUNDS',
|
|
234
217
|
description: 'How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset)',
|
|
@@ -284,6 +267,11 @@ export const l1ContractsConfigMappings = {
|
|
|
284
267
|
parseEnv: (val)=>EthAddress.fromString(val),
|
|
285
268
|
defaultValue: DefaultL1ContractsConfig.slashingVetoer
|
|
286
269
|
},
|
|
270
|
+
slashingDisableDuration: {
|
|
271
|
+
env: 'AZTEC_SLASHING_DISABLE_DURATION',
|
|
272
|
+
description: 'How long slashing can be disabled for in seconds when vetoer disables it',
|
|
273
|
+
...numberConfigHelper(DefaultL1ContractsConfig.slashingDisableDuration)
|
|
274
|
+
},
|
|
287
275
|
governanceProposerQuorum: {
|
|
288
276
|
env: 'AZTEC_GOVERNANCE_PROPOSER_QUORUM',
|
|
289
277
|
description: 'The governance proposing quorum',
|
|
@@ -347,12 +335,12 @@ export function getGenesisStateConfigEnvVars() {
|
|
|
347
335
|
errors.push(`aztecSlotDuration (${config.aztecSlotDuration}) must be a multiple of ethereumSlotDuration (${config.ethereumSlotDuration})`);
|
|
348
336
|
}
|
|
349
337
|
// EmpireBase constructor validations for governance/slashing proposers
|
|
350
|
-
// From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.
|
|
338
|
+
// From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.EmpireBase__InvalidQuorumAndRoundSize(QUORUM_SIZE, ROUND_SIZE));
|
|
351
339
|
const { governanceProposerQuorum, governanceProposerRoundSize } = config;
|
|
352
340
|
if (governanceProposerQuorum !== undefined && governanceProposerQuorum <= Math.floor(governanceProposerRoundSize / 2)) {
|
|
353
341
|
errors.push(`governanceProposerQuorum (${governanceProposerQuorum}) must be greater than half of governanceProposerRoundSize (${Math.floor(governanceProposerRoundSize / 2)})`);
|
|
354
342
|
}
|
|
355
|
-
// From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.
|
|
343
|
+
// From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.EmpireBase__QuorumCannotBeLargerThanRoundSize(QUORUM_SIZE, ROUND_SIZE));
|
|
356
344
|
if (governanceProposerQuorum !== undefined && governanceProposerQuorum > governanceProposerRoundSize) {
|
|
357
345
|
errors.push(`governanceProposerQuorum (${governanceProposerQuorum}) cannot be larger than governanceProposerRoundSize (${governanceProposerRoundSize})`);
|
|
358
346
|
}
|
package/dest/constants.d.ts
CHANGED
package/dest/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,eAAO,MAAM,QAAQ,EAAE,GAA+E,CAAC;AACvG,eAAO,MAAM,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
3
|
-
import { type Hex, type TypedDataDefinition } from 'viem';
|
|
4
|
-
import type { L1TxRequest } from '../l1_tx_utils.js';
|
|
3
|
+
import { type Hex, type TypedDataDefinition } from '@spalladino/viem';
|
|
4
|
+
import type { L1TxRequest } from '../l1_tx_utils/index.js';
|
|
5
5
|
export interface IEmpireBase {
|
|
6
6
|
get address(): EthAddress;
|
|
7
7
|
getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empire_base.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,mBAAmB,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"empire_base.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,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import { EmpireBaseAbi } from '@aztec/l1-artifacts/EmpireBaseAbi';
|
|
3
|
-
import { encodeFunctionData } from 'viem';
|
|
3
|
+
import { encodeFunctionData } from '@spalladino/viem';
|
|
4
4
|
export function encodeSignal(payload) {
|
|
5
5
|
return encodeFunctionData({
|
|
6
6
|
abi: EmpireBaseAbi,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { type Hex, type Log, type TypedDataDefinition } from '@spalladino/viem';
|
|
2
3
|
import EventEmitter from 'events';
|
|
3
|
-
import
|
|
4
|
-
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
|
|
4
|
+
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
5
5
|
import type { ViemClient } from '../types.js';
|
|
6
6
|
import { type IEmpireBase } from './empire_base.js';
|
|
7
7
|
export declare class ProposalAlreadyExecutedError extends Error {
|
|
@@ -32,16 +32,16 @@ export declare class EmpireSlashingProposerContract extends EventEmitter impleme
|
|
|
32
32
|
listenToSubmittablePayloads(callback: (args: {
|
|
33
33
|
payload: `0x${string}`;
|
|
34
34
|
round: bigint;
|
|
35
|
-
}) => unknown): import("viem").WatchContractEventReturnType;
|
|
35
|
+
}) => unknown): import("@spalladino/viem").WatchContractEventReturnType;
|
|
36
36
|
listenToPayloadSubmitted(callback: (args: {
|
|
37
37
|
round: bigint;
|
|
38
38
|
payload: `0x${string}`;
|
|
39
|
-
}) => unknown): import("viem").WatchContractEventReturnType;
|
|
39
|
+
}) => unknown): import("@spalladino/viem").WatchContractEventReturnType;
|
|
40
40
|
listenToSignalCasted(callback: (args: {
|
|
41
41
|
round: bigint;
|
|
42
42
|
payload: `0x${string}`;
|
|
43
43
|
signaler: `0x${string}`;
|
|
44
|
-
}) => unknown): import("viem").WatchContractEventReturnType;
|
|
44
|
+
}) => unknown): import("@spalladino/viem").WatchContractEventReturnType;
|
|
45
45
|
/** Creates an L1TxRequest to submit the round winner for the given round. */
|
|
46
46
|
buildExecuteRoundRequest(round: bigint): L1TxRequest;
|
|
47
47
|
/** Tries to extract a PayloadSubmitted event from the given logs. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empire_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_slashing_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,OAAO,
|
|
1
|
+
{"version":3,"file":"empire_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/empire_slashing_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,GAAG,EACR,KAAK,mBAAmB,EAGzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAEhH,qBAAa,4BAA6B,SAAQ,KAAK;gBACzC,KAAK,EAAE,MAAM;CAG1B;AAED,qBAAa,8BAA+B,SAAQ,YAAa,YAAW,WAAW;aAOnE,MAAM,EAAE,UAAU;IANpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+D;IACtF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsE;IAE/F,SAAgB,IAAI,EAAG,QAAQ,CAAU;gBAGvB,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG,GAAG,UAAU;IAU3B,IAAW,OAAO,eAEjB;IAEM,aAAa;IAIb,YAAY;IAIZ,mBAAmB;IAInB,yBAAyB;IAIzB,eAAe;IAIf,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA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YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,sBAAsB,GAAE,MAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IAe3E,YAAY,CACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,UAAU,CAAC,OAAO,OAAO,CAAC,yBAAyB,CAAC;CAiDxD"}
|
|
@@ -2,8 +2,8 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
4
|
import { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi';
|
|
5
|
+
import { encodeFunctionData, getContract } from '@spalladino/viem';
|
|
5
6
|
import EventEmitter from 'events';
|
|
6
|
-
import { encodeFunctionData, getContract } from 'viem';
|
|
7
7
|
import { FormattedViemError, tryExtractEvent } from '../utils.js';
|
|
8
8
|
import { encodeSignal, encodeSignalWithSignature, signSignalWithSig } from './empire_base.js';
|
|
9
9
|
export class ProposalAlreadyExecutedError extends Error {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import { type Hex } from 'viem';
|
|
3
|
-
import type { L1TxUtils } from '../l1_tx_utils.js';
|
|
2
|
+
import { type Hex } from '@spalladino/viem';
|
|
3
|
+
import type { L1TxUtils } from '../l1_tx_utils/index.js';
|
|
4
4
|
export declare class FeeAssetHandlerContract {
|
|
5
5
|
readonly txUtils: L1TxUtils;
|
|
6
6
|
address: EthAddress;
|
|
@@ -8,12 +8,12 @@ export declare class FeeAssetHandlerContract {
|
|
|
8
8
|
getOwner(): Promise<EthAddress>;
|
|
9
9
|
getMintAmount(): Promise<bigint>;
|
|
10
10
|
mint(recipient: Hex | EthAddress): Promise<{
|
|
11
|
-
receipt: import("viem").TransactionReceipt;
|
|
12
|
-
|
|
11
|
+
receipt: import("@spalladino/viem").TransactionReceipt;
|
|
12
|
+
state: import("../l1_tx_utils/types.js").L1TxState;
|
|
13
13
|
}>;
|
|
14
14
|
setMintAmount(amount: bigint): Promise<{
|
|
15
|
-
receipt: import("viem").TransactionReceipt;
|
|
16
|
-
|
|
15
|
+
receipt: import("@spalladino/viem").TransactionReceipt;
|
|
16
|
+
state: import("../l1_tx_utils/types.js").L1TxState;
|
|
17
17
|
}>;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=fee_asset_handler.d.ts.map
|
|
@@ -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,
|
|
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,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts/FeeAssetHandlerAbi';
|
|
3
|
-
import { encodeFunctionData, getContract } from 'viem';
|
|
3
|
+
import { encodeFunctionData, getContract } from '@spalladino/viem';
|
|
4
4
|
export class FeeAssetHandlerContract {
|
|
5
5
|
txUtils;
|
|
6
6
|
address;
|
|
@@ -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,
|
|
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,kBAAkB,CAAC;AAErF,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
3
|
-
import { getContract } from 'viem';
|
|
3
|
+
import { getContract } from '@spalladino/viem';
|
|
4
4
|
import { isExtendedClient } from '../types.js';
|
|
5
5
|
export class FeeJuiceContract {
|
|
6
6
|
client;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
3
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
4
|
-
import { type GetContractReturnType, type Hex, type Log } from 'viem';
|
|
4
|
+
import { type GetContractReturnType, type Hex, type Log } from '@spalladino/viem';
|
|
5
5
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
6
6
|
import { type ExtendedViemWalletClient, type ViemClient } from '../types.js';
|
|
7
7
|
export type L1GovernanceContractAddresses = Pick<L1ContractAddresses, 'governanceAddress' | 'rollupAddress' | 'registryAddress' | 'governanceProposerAddress'>;
|
|
@@ -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,KAAK,qBAAqB,EAC1B,KAAK,GAAG,EACR,KAAK,GAAG,EAIT,MAAM,
|
|
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,KAAK,qBAAqB,EAC1B,KAAK,GAAG,EACR,KAAK,GAAG,EAIT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAA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E,GAAG,GAAG,UAAU,EACA,MAAM,EAAE,wBAAwB;IAY9C,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;IAKvC,eAAe,CAAC,EAC3B,cAAc,EACd,eAAe,GAChB,EAAE;QACD,cAAc,EAAE,GAAG,CAAC;QACpB,eAAe,EAAE,GAAG,CAAC;KACtB,GAAG,OAAO,CAAC,MAAM,CAAC;IASN,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAK3B,IAAI,CAAC,EAChB,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAY,EACZ,MAAM,GACP,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB;IAiDY,eAAe,CAAC,EAC3B,UAAU,EACV,OAAY,EACZ,MAAM,GACP,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB;CA0CF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { sleep } from '@aztec/foundation/sleep';
|
|
3
3
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
4
|
-
import { encodeFunctionData, getContract, parseEventLogs } from 'viem';
|
|
5
|
-
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils.js';
|
|
4
|
+
import { encodeFunctionData, getContract, parseEventLogs } from '@spalladino/viem';
|
|
5
|
+
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
|
|
6
6
|
import { isExtendedClient } from '../types.js';
|
|
7
7
|
// NOTE: Must be kept in sync with DataStructures.ProposalState in l1-contracts
|
|
8
8
|
export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
@@ -156,7 +156,9 @@ export class GovernanceContract extends ReadOnlyGovernanceContract {
|
|
|
156
156
|
]);
|
|
157
157
|
}
|
|
158
158
|
async vote({ proposalId, voteAmount, inFavor, retries = 10, logger }) {
|
|
159
|
-
const l1TxUtils = createL1TxUtilsFromViemWallet(this.client,
|
|
159
|
+
const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, {
|
|
160
|
+
logger
|
|
161
|
+
});
|
|
160
162
|
const retryDelaySeconds = 12;
|
|
161
163
|
voteAmount = voteAmount ?? await this.getPower();
|
|
162
164
|
let success = false;
|
|
@@ -203,7 +205,9 @@ export class GovernanceContract extends ReadOnlyGovernanceContract {
|
|
|
203
205
|
logger.info(`Proposal [${proposalId}] has summedBallot nay [${proposal.summedBallot.nay}]`);
|
|
204
206
|
}
|
|
205
207
|
async executeProposal({ proposalId, retries = 10, logger }) {
|
|
206
|
-
const l1TxUtils = createL1TxUtilsFromViemWallet(this.client,
|
|
208
|
+
const l1TxUtils = createL1TxUtilsFromViemWallet(this.client, {
|
|
209
|
+
logger
|
|
210
|
+
});
|
|
207
211
|
const retryDelaySeconds = 12;
|
|
208
212
|
let success = false;
|
|
209
213
|
for(let i = 0; i < retries; i++){
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import { type Hex, type TransactionReceipt, type TypedDataDefinition } from 'viem';
|
|
3
|
-
import type {
|
|
2
|
+
import { type Hex, type TransactionReceipt, type TypedDataDefinition } from '@spalladino/viem';
|
|
3
|
+
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
4
4
|
import type { ViemClient } from '../types.js';
|
|
5
5
|
import { type IEmpireBase } from './empire_base.js';
|
|
6
6
|
export declare class GovernanceProposerContract implements IEmpireBase {
|
|
@@ -24,7 +24,6 @@ export declare class GovernanceProposerContract implements IEmpireBase {
|
|
|
24
24
|
createSignalRequestWithSignature(payload: Hex, slot: bigint, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
|
|
25
25
|
submitRoundWinner(round: bigint, l1TxUtils: L1TxUtils): Promise<{
|
|
26
26
|
receipt: TransactionReceipt;
|
|
27
|
-
gasPrice: GasPrice;
|
|
28
27
|
proposalId: bigint;
|
|
29
28
|
}>;
|
|
30
29
|
}
|
|
@@ -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,
|
|
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,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAGhH,qBAAa,0BAA2B,YAAW,WAAW;aAI1C,MAAM,EAAE,UAAU;IAHpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkE;gBAGzE,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG,GAAG,UAAU;IAQ3B,IAAW,OAAO,eAEjB;IAEY,gBAAgB;IAKhB,kBAAkB;IAIxB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAIhC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,WAAW;IAIX,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrC,YAAY,CACvB,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,sBAAsB,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAI/E,iBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAInF,mBAAmB,CAAC,OAAO,EAAE,GAAG,GAAG,WAAW;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,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CAYH"}
|
|
@@ -7,7 +7,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
7
7
|
import { memoize } from '@aztec/foundation/decorators';
|
|
8
8
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
9
|
import { GovernanceProposerAbi } from '@aztec/l1-artifacts/GovernanceProposerAbi';
|
|
10
|
-
import { encodeFunctionData, getContract } from 'viem';
|
|
10
|
+
import { encodeFunctionData, getContract } from '@spalladino/viem';
|
|
11
11
|
import { encodeSignal, encodeSignalWithSignature, signSignalWithSig } from './empire_base.js';
|
|
12
12
|
import { extractProposalIdFromLogs } from './governance.js';
|
|
13
13
|
export class GovernanceProposerContract {
|
|
@@ -74,7 +74,7 @@ export class GovernanceProposerContract {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
async submitRoundWinner(round, l1TxUtils) {
|
|
77
|
-
const { receipt
|
|
77
|
+
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
78
78
|
to: this.address.toString(),
|
|
79
79
|
data: encodeFunctionData({
|
|
80
80
|
abi: this.proposer.abi,
|
|
@@ -87,7 +87,6 @@ export class GovernanceProposerContract {
|
|
|
87
87
|
const proposalId = extractProposalIdFromLogs(receipt.logs);
|
|
88
88
|
return {
|
|
89
89
|
receipt,
|
|
90
|
-
gasPrice,
|
|
91
90
|
proposalId
|
|
92
91
|
};
|
|
93
92
|
}
|
package/dest/contracts/gse.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import type { ProjPointType } from '@noble/curves/abstract/weierstrass';
|
|
3
|
-
import { type Hex } from 'viem';
|
|
3
|
+
import { type Hex } from '@spalladino/viem';
|
|
4
4
|
import type { ViemClient } from '../types.js';
|
|
5
5
|
export type RegistrationTuple = {
|
|
6
6
|
publicKeyInG1: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gse.d.ts","sourceRoot":"","sources":["../../src/contracts/gse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAA8B,KAAK,GAAG,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"gse.d.ts","sourceRoot":"","sources":["../../src/contracts/gse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAA8B,KAAK,GAAG,EAAe,MAAM,kBAAkB,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE;QACb,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF,aAAa,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { GSEAbi } from '@aztec/l1-artifacts/GSEAbi';
|
|
3
3
|
import { bn254 } from '@noble/curves/bn254';
|
|
4
|
-
import { getContract } from 'viem';
|
|
4
|
+
import { getContract } from '@spalladino/viem';
|
|
5
5
|
export class GSEContract {
|
|
6
6
|
client;
|
|
7
7
|
address;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Buffer16 } from '@aztec/foundation/buffer';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import { InboxAbi } from '@aztec/l1-artifacts/InboxAbi';
|
|
4
|
-
import { type BlockTag, type GetContractReturnType, type Hex } from 'viem';
|
|
4
|
+
import { type BlockTag, type GetContractReturnType, type Hex } from '@spalladino/viem';
|
|
5
5
|
import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js';
|
|
6
6
|
import type { L1ReaderConfig } from '../l1_reader.js';
|
|
7
7
|
import type { ViemClient } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../src/contracts/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../src/contracts/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAAe,MAAM,kBAAkB,CAAC;AAGpG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,qBAAa,aAAa;aAkBN,MAAM,EAAE,UAAU;IAjBpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqD;IAE3E,MAAM,CAAC,wBAAwB,CAAC,uBAAuB,EAAE,2BAA2B;IAQpF,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc;gBAOzB,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG,GAAG,UAAU;IAQ3B,IAAW,OAAO,kBAEjB;IAEM,WAAW,IAAI,qBAAqB,CAAC,OAAO,QAAQ,EAAE,UAAU,CAAC;IAI3D,QAAQ,CAAC,IAAI,GAAE;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAS7G;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,QAAQ,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/dest/contracts/inbox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Buffer16 } from '@aztec/foundation/buffer';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import { InboxAbi } from '@aztec/l1-artifacts/InboxAbi';
|
|
4
|
-
import { getContract } from 'viem';
|
|
4
|
+
import { getContract } from '@spalladino/viem';
|
|
5
5
|
import { getPublicClient } from '../client.js';
|
|
6
6
|
import { checkBlockTag } from './utils.js';
|
|
7
7
|
export class InboxContract {
|