@aztec/ethereum 0.0.0-test.1 → 0.0.1-commit.0b941701
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.d.ts +2 -0
- package/dest/account.d.ts.map +1 -0
- package/dest/account.js +4 -0
- package/dest/chain.d.ts +1 -1
- package/dest/client.d.ts +6 -4
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +21 -3
- package/dest/config.d.ts +68 -23
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +145 -32
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts +25 -8
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +75 -2
- package/dest/contracts/empire_slashing_proposer.d.ts +67 -0
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/empire_slashing_proposer.js +209 -0
- package/dest/contracts/errors.d.ts +7 -0
- package/dest/contracts/errors.d.ts.map +1 -0
- package/dest/contracts/errors.js +12 -0
- package/dest/contracts/fee_asset_handler.d.ts +20 -0
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -0
- package/dest/contracts/fee_asset_handler.js +57 -0
- package/dest/contracts/fee_juice.d.ts +6 -7
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +27 -20
- package/dest/contracts/governance.d.ts +45 -32
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +96 -85
- package/dest/contracts/governance_proposer.d.ts +17 -13
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +428 -25
- package/dest/contracts/gse.d.ts +32 -0
- package/dest/contracts/gse.d.ts.map +1 -0
- package/dest/contracts/gse.js +72 -0
- package/dest/contracts/inbox.d.ts +47 -0
- package/dest/contracts/inbox.d.ts.map +1 -0
- package/dest/contracts/inbox.js +80 -0
- package/dest/contracts/index.d.ts +11 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +10 -2
- package/dest/contracts/log.d.ts +13 -0
- package/dest/contracts/log.d.ts.map +1 -0
- package/dest/contracts/log.js +1 -0
- package/dest/contracts/multicall.d.ts +21 -0
- package/dest/contracts/multicall.d.ts.map +1 -0
- package/dest/contracts/multicall.js +156 -0
- package/dest/contracts/outbox.d.ts +41 -0
- package/dest/contracts/outbox.d.ts.map +1 -0
- package/dest/contracts/outbox.js +86 -0
- package/dest/contracts/registry.d.ts +10 -5
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +44 -16
- package/dest/contracts/rollup.d.ts +297 -53
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1123 -116
- package/dest/contracts/slasher_contract.d.ts +44 -0
- package/dest/contracts/slasher_contract.d.ts.map +1 -0
- package/dest/contracts/slasher_contract.js +75 -0
- package/dest/contracts/tally_slashing_proposer.d.ts +140 -0
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/tally_slashing_proposer.js +313 -0
- package/dest/contracts/utils.d.ts +3 -0
- package/dest/contracts/utils.d.ts.map +1 -0
- package/dest/contracts/utils.js +11 -0
- package/dest/deploy_aztec_l1_contracts.d.ts +260 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +398 -0
- package/dest/deploy_l1_contract.d.ts +68 -0
- package/dest/deploy_l1_contract.d.ts.map +1 -0
- package/dest/deploy_l1_contract.js +312 -0
- package/dest/eth-signer/eth-signer.d.ts +21 -0
- package/dest/eth-signer/eth-signer.d.ts.map +1 -0
- package/dest/eth-signer/eth-signer.js +5 -0
- package/dest/eth-signer/index.d.ts +2 -0
- package/dest/eth-signer/index.d.ts.map +1 -0
- package/dest/eth-signer/index.js +1 -0
- package/dest/forwarder_proxy.d.ts +32 -0
- package/dest/forwarder_proxy.d.ts.map +1 -0
- package/dest/forwarder_proxy.js +93 -0
- package/dest/generated/l1-contracts-defaults.d.ts +30 -0
- package/dest/generated/l1-contracts-defaults.d.ts.map +1 -0
- package/dest/generated/l1-contracts-defaults.js +30 -0
- package/dest/l1_artifacts.d.ts +80735 -0
- package/dest/l1_artifacts.d.ts.map +1 -0
- package/dest/l1_artifacts.js +166 -0
- package/dest/l1_contract_addresses.d.ts +24 -4
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +25 -21
- package/dest/l1_reader.d.ts +4 -2
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +14 -8
- 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 +96 -0
- package/dest/l1_tx_utils/constants.d.ts +12 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +39 -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/fee-strategies/index.d.ts +10 -0
- package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +48 -0
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/index-blobs.js +2 -0
- package/dest/l1_tx_utils/index.d.ts +12 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +12 -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_fee_analyzer.d.ts +233 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +506 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +94 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +623 -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 +83 -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 +323 -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/l1_types.d.ts +6 -0
- package/dest/l1_types.d.ts.map +1 -0
- package/dest/l1_types.js +1 -0
- package/dest/publisher_manager.d.ts +15 -0
- package/dest/publisher_manager.d.ts.map +1 -0
- package/dest/publisher_manager.js +88 -0
- package/dest/queries.d.ts +5 -3
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +61 -12
- package/dest/test/chain_monitor.d.ts +75 -0
- package/dest/test/chain_monitor.d.ts.map +1 -0
- package/dest/test/chain_monitor.js +213 -0
- package/dest/test/delayed_tx_utils.d.ts +8 -3
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/delayed_tx_utils.js +13 -6
- package/dest/test/eth_cheat_codes.d.ts +229 -0
- package/dest/test/eth_cheat_codes.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes.js +560 -0
- package/dest/test/eth_cheat_codes_with_state.d.ts +2 -2
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes_with_state.js +1 -1
- package/dest/test/index.d.ts +4 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +3 -0
- package/dest/test/rollup_cheat_codes.d.ts +88 -0
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/test/rollup_cheat_codes.js +283 -0
- package/dest/test/start_anvil.d.ts +9 -1
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +16 -7
- package/dest/test/tx_delayer.d.ts +18 -7
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +97 -20
- package/dest/test/upgrade_utils.d.ts +6 -5
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +23 -16
- package/dest/types.d.ts +62 -8
- package/dest/types.d.ts.map +1 -1
- package/dest/types.js +3 -1
- package/dest/utils.d.ts +16 -3
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +61 -88
- package/dest/zkPassportVerifierAddress.d.ts +15 -0
- package/dest/zkPassportVerifierAddress.d.ts.map +1 -0
- package/dest/zkPassportVerifierAddress.js +11 -0
- package/package.json +51 -23
- package/src/account.ts +5 -0
- package/src/client.ts +43 -5
- package/src/config.ts +207 -41
- package/src/contracts/README.md +157 -0
- package/src/contracts/empire_base.ts +77 -7
- package/src/contracts/empire_slashing_proposer.ts +270 -0
- package/src/contracts/errors.ts +13 -0
- package/src/contracts/fee_asset_handler.ts +64 -0
- package/src/contracts/fee_juice.ts +29 -15
- package/src/contracts/governance.ts +88 -78
- package/src/contracts/governance_proposer.ts +71 -24
- package/src/contracts/gse.ts +88 -0
- package/src/contracts/inbox.ts +115 -0
- package/src/contracts/index.ts +10 -2
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +155 -0
- package/src/contracts/outbox.ts +98 -0
- package/src/contracts/registry.ts +51 -26
- package/src/contracts/rollup.ts +875 -89
- package/src/contracts/slasher_contract.ts +89 -0
- package/src/contracts/tally_slashing_proposer.ts +318 -0
- package/src/contracts/utils.ts +14 -0
- package/src/deploy_aztec_l1_contracts.ts +619 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/eth-signer/eth-signer.ts +25 -0
- package/src/eth-signer/index.ts +1 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/generated/l1-contracts-defaults.ts +32 -0
- package/src/l1_artifacts.ts +254 -0
- package/src/l1_contract_addresses.ts +49 -34
- package/src/l1_reader.ts +17 -9
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +161 -0
- package/src/l1_tx_utils/constants.ts +29 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
- package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +119 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +14 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_fee_analyzer.ts +803 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +738 -0
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +419 -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/l1_types.ts +6 -0
- package/src/publisher_manager.ts +106 -0
- package/src/queries.ts +82 -16
- package/src/test/chain_monitor.ts +245 -0
- package/src/test/delayed_tx_utils.ts +34 -6
- package/src/test/eth_cheat_codes.ts +588 -0
- package/src/test/eth_cheat_codes_with_state.ts +1 -1
- package/src/test/index.ts +3 -0
- package/src/test/rollup_cheat_codes.ts +321 -0
- package/src/test/start_anvil.ts +24 -5
- package/src/test/tx_delayer.ts +130 -27
- package/src/test/upgrade_utils.ts +30 -21
- package/src/types.ts +71 -7
- package/src/utils.ts +79 -91
- package/src/zkPassportVerifierAddress.ts +15 -0
- package/dest/contracts/forwarder.d.ts +0 -24
- package/dest/contracts/forwarder.d.ts.map +0 -1
- package/dest/contracts/forwarder.js +0 -101
- package/dest/contracts/slashing_proposer.d.ts +0 -21
- package/dest/contracts/slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/slashing_proposer.js +0 -47
- package/dest/deploy_l1_contracts.d.ts +0 -21210
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -687
- package/dest/eth_cheat_codes.d.ts +0 -147
- package/dest/eth_cheat_codes.d.ts.map +0 -1
- package/dest/eth_cheat_codes.js +0 -303
- package/dest/index.d.ts +0 -14
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -13
- package/dest/l1_tx_utils.d.ts +0 -192
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -641
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -12
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -64
- package/src/contracts/forwarder.ts +0 -132
- package/src/contracts/slashing_proposer.ts +0 -51
- package/src/deploy_l1_contracts.ts +0 -948
- package/src/eth_cheat_codes.ts +0 -314
- package/src/index.ts +0 -13
- package/src/l1_tx_utils.ts +0 -847
- package/src/l1_tx_utils_with_blobs.ts +0 -86
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zkPassportVerifierAddress.d.ts","sourceRoot":"","sources":["../src/zkPassportVerifierAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,4BAA4B,YAAsE,CAAC;AAChH;;GAEG;AACH,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAC1D;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
/**
|
|
3
|
+
* The address of the zk passport verifier on sepolia
|
|
4
|
+
* get address from: ROOT/l1-contracts/lib/circuits/src/solidity/deployments/deployment-11155111.json
|
|
5
|
+
*/ export const ZK_PASSPORT_VERIFIER_ADDRESS = EthAddress.fromString('0x3101Bad9eA5fACadA5554844a1a88F7Fe48D4DE0');
|
|
6
|
+
/**
|
|
7
|
+
* The default domain of the zk passport site
|
|
8
|
+
*/ export const ZK_PASSPORT_DOMAIN = 'testnet.aztec.network';
|
|
9
|
+
/**
|
|
10
|
+
* The default scope of the zk passport proofs
|
|
11
|
+
*/ export const ZK_PASSPORT_SCOPE = 'personhood';
|
package/package.json
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1-commit.0b941701",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
|
-
"
|
|
7
|
-
"./
|
|
8
|
-
"./
|
|
6
|
+
"./account": "./dest/account.js",
|
|
7
|
+
"./chain": "./dest/chain.js",
|
|
8
|
+
"./client": "./dest/client.js",
|
|
9
|
+
"./config": "./dest/config.js",
|
|
10
|
+
"./constants": "./dest/constants.js",
|
|
9
11
|
"./contracts": "./dest/contracts/index.js",
|
|
10
|
-
"./deploy-l1-contracts": "./dest/
|
|
12
|
+
"./deploy-aztec-l1-contracts": "./dest/deploy_aztec_l1_contracts.js",
|
|
13
|
+
"./deploy-l1-contract": "./dest/deploy_l1_contract.js",
|
|
14
|
+
"./contracts/registry": "./dest/contracts/registry.js",
|
|
15
|
+
"./contracts/rollup": "./dest/contracts/rollup.js",
|
|
16
|
+
"./eth-signer": "./dest/eth-signer/index.js",
|
|
17
|
+
"./forwarder-proxy": "./dest/forwarder_proxy.js",
|
|
18
|
+
"./l1-artifacts": "./dest/l1_artifacts.js",
|
|
11
19
|
"./l1-contract-addresses": "./dest/l1_contract_addresses.js",
|
|
12
|
-
"./l1-
|
|
20
|
+
"./l1-fee-analysis": "./dest/l1_tx_utils/l1_fee_analyzer.js",
|
|
21
|
+
"./l1-reader": "./dest/l1_reader.js",
|
|
22
|
+
"./l1-tx-utils": "./dest/l1_tx_utils/index.js",
|
|
23
|
+
"./l1-tx-utils-with-blobs": "./dest/l1_tx_utils/index-blobs.js",
|
|
24
|
+
"./l1-tx-utils/config": "./dest/l1_tx_utils/config.js",
|
|
25
|
+
"./l1-types": "./dest/l1_types.js",
|
|
26
|
+
"./publisher-manager": "./dest/publisher_manager.js",
|
|
27
|
+
"./queries": "./dest/queries.js",
|
|
28
|
+
"./test": "./dest/test/index.js",
|
|
29
|
+
"./types": "./dest/types.js",
|
|
13
30
|
"./utils": "./dest/utils.js"
|
|
14
31
|
},
|
|
15
32
|
"typedocOptions": {
|
|
@@ -20,45 +37,52 @@
|
|
|
20
37
|
"tsconfig": "./tsconfig.json"
|
|
21
38
|
},
|
|
22
39
|
"scripts": {
|
|
23
|
-
"build": "yarn clean && tsc
|
|
24
|
-
"build:dev": "tsc
|
|
40
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
41
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
25
42
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'",
|
|
43
|
+
"generate": "./scripts/generate.sh",
|
|
44
|
+
"start:dev": "concurrently -k \"../scripts/tsc.sh --watch\" \"nodemon --watch dest --exec yarn start\"",
|
|
29
45
|
"start": "node ./dest/index.js",
|
|
30
|
-
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
46
|
+
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
|
|
47
|
+
"proposer-address": "node ./dest/cli/forwarder_address.js"
|
|
31
48
|
},
|
|
32
49
|
"inherits": [
|
|
33
50
|
"../package.common.json"
|
|
34
51
|
],
|
|
35
52
|
"dependencies": {
|
|
36
|
-
"@aztec/blob-lib": "0.0.
|
|
37
|
-
"@aztec/
|
|
38
|
-
"@aztec/
|
|
53
|
+
"@aztec/blob-lib": "0.0.1-commit.0b941701",
|
|
54
|
+
"@aztec/constants": "0.0.1-commit.0b941701",
|
|
55
|
+
"@aztec/foundation": "0.0.1-commit.0b941701",
|
|
56
|
+
"@aztec/l1-artifacts": "0.0.1-commit.0b941701",
|
|
39
57
|
"@viem/anvil": "^0.0.10",
|
|
40
58
|
"dotenv": "^16.0.3",
|
|
59
|
+
"lodash.chunk": "^4.2.0",
|
|
60
|
+
"lodash.pickby": "^4.5.0",
|
|
41
61
|
"tslib": "^2.4.0",
|
|
42
|
-
"viem": "2.
|
|
62
|
+
"viem": "npm:@aztec/viem@2.38.2",
|
|
43
63
|
"zod": "^3.23.8"
|
|
44
64
|
},
|
|
45
65
|
"devDependencies": {
|
|
46
|
-
"@jest/globals": "^
|
|
47
|
-
"@
|
|
48
|
-
"@types/
|
|
66
|
+
"@jest/globals": "^30.0.0",
|
|
67
|
+
"@noble/curves": "=1.7.0",
|
|
68
|
+
"@types/jest": "^30.0.0",
|
|
69
|
+
"@types/lodash.pickby": "^4",
|
|
70
|
+
"@types/node": "^22.15.17",
|
|
71
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
49
72
|
"@viem/anvil": "^0.0.10",
|
|
50
73
|
"get-port": "^7.1.0",
|
|
51
|
-
"jest": "^
|
|
74
|
+
"jest": "^30.0.0",
|
|
75
|
+
"jest-mock-extended": "^4.0.0",
|
|
52
76
|
"lodash.omit": "^4.5.0",
|
|
53
77
|
"ts-node": "^10.9.1",
|
|
54
|
-
"typescript": "^5.
|
|
78
|
+
"typescript": "^5.3.3"
|
|
55
79
|
},
|
|
56
80
|
"files": [
|
|
57
81
|
"dest",
|
|
58
82
|
"src",
|
|
59
83
|
"!*.test.*"
|
|
60
84
|
],
|
|
61
|
-
"types": "./dest/
|
|
85
|
+
"types": "./dest/types.d.ts",
|
|
62
86
|
"jest": {
|
|
63
87
|
"moduleNameMapper": {
|
|
64
88
|
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
|
|
@@ -90,9 +114,13 @@
|
|
|
90
114
|
"testTimeout": 120000,
|
|
91
115
|
"setupFiles": [
|
|
92
116
|
"../../foundation/src/jest/setup.mjs"
|
|
117
|
+
],
|
|
118
|
+
"testEnvironment": "../../foundation/src/jest/env.mjs",
|
|
119
|
+
"setupFilesAfterEnv": [
|
|
120
|
+
"../../foundation/src/jest/setupAfterEnv.mjs"
|
|
93
121
|
]
|
|
94
122
|
},
|
|
95
123
|
"engines": {
|
|
96
|
-
"node": ">=
|
|
124
|
+
"node": ">=20.10"
|
|
97
125
|
}
|
|
98
126
|
}
|
package/src/account.ts
ADDED
package/src/client.ts
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
2
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
type Chain,
|
|
6
|
+
type HDAccount,
|
|
7
|
+
type LocalAccount,
|
|
8
|
+
type PrivateKeyAccount,
|
|
9
|
+
createPublicClient,
|
|
10
|
+
createWalletClient,
|
|
11
|
+
fallback,
|
|
12
|
+
http,
|
|
13
|
+
publicActions,
|
|
14
|
+
} from 'viem';
|
|
15
|
+
import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
|
|
16
|
+
import { foundry } from 'viem/chains';
|
|
5
17
|
|
|
6
18
|
import { createEthereumChain } from './chain.js';
|
|
7
|
-
import type { ViemPublicClient } from './types.js';
|
|
19
|
+
import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js';
|
|
8
20
|
|
|
9
21
|
type Config = {
|
|
10
|
-
/**
|
|
22
|
+
/** List of URLs of Ethereum RPC nodes that services will connect to (comma separated). */
|
|
11
23
|
l1RpcUrls: string[];
|
|
12
24
|
/** The chain ID of the ethereum host. */
|
|
13
25
|
l1ChainId: number;
|
|
@@ -15,6 +27,8 @@ type Config = {
|
|
|
15
27
|
viemPollingIntervalMS?: number;
|
|
16
28
|
};
|
|
17
29
|
|
|
30
|
+
export type { Config as EthereumClientConfig };
|
|
31
|
+
|
|
18
32
|
// TODO: Use these methods to abstract the creation of viem clients.
|
|
19
33
|
|
|
20
34
|
/** Returns a viem public client given the L1 config. */
|
|
@@ -22,7 +36,7 @@ export function getPublicClient(config: Config): ViemPublicClient {
|
|
|
22
36
|
const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId);
|
|
23
37
|
return createPublicClient({
|
|
24
38
|
chain: chain.chainInfo,
|
|
25
|
-
transport: fallback(config.l1RpcUrls.map(url => http(url))),
|
|
39
|
+
transport: fallback(config.l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
26
40
|
pollingInterval: config.viemPollingIntervalMS,
|
|
27
41
|
});
|
|
28
42
|
}
|
|
@@ -40,7 +54,7 @@ async function waitForRpc(client: ViemPublicClient, config: Config, logger?: Log
|
|
|
40
54
|
let chainId = 0;
|
|
41
55
|
try {
|
|
42
56
|
chainId = await client.getChainId();
|
|
43
|
-
} catch
|
|
57
|
+
} catch {
|
|
44
58
|
logger?.warn(`Failed to connect to Ethereum node at ${config.l1RpcUrls.join(', ')}. Retrying...`);
|
|
45
59
|
}
|
|
46
60
|
return chainId;
|
|
@@ -56,3 +70,27 @@ async function waitForRpc(client: ViemPublicClient, config: Config, logger?: Log
|
|
|
56
70
|
);
|
|
57
71
|
}
|
|
58
72
|
}
|
|
73
|
+
|
|
74
|
+
export function createExtendedL1Client(
|
|
75
|
+
rpcUrls: string[],
|
|
76
|
+
mnemonicOrPrivateKeyOrHdAccount: string | HDAccount | PrivateKeyAccount | LocalAccount,
|
|
77
|
+
chain: Chain = foundry,
|
|
78
|
+
pollingIntervalMS?: number,
|
|
79
|
+
addressIndex?: number,
|
|
80
|
+
): ExtendedViemWalletClient {
|
|
81
|
+
const hdAccount =
|
|
82
|
+
typeof mnemonicOrPrivateKeyOrHdAccount === 'string'
|
|
83
|
+
? mnemonicOrPrivateKeyOrHdAccount.startsWith('0x')
|
|
84
|
+
? privateKeyToAccount(mnemonicOrPrivateKeyOrHdAccount as `0x${string}`)
|
|
85
|
+
: mnemonicToAccount(mnemonicOrPrivateKeyOrHdAccount, { addressIndex })
|
|
86
|
+
: mnemonicOrPrivateKeyOrHdAccount;
|
|
87
|
+
|
|
88
|
+
const extendedClient = createWalletClient({
|
|
89
|
+
account: hdAccount,
|
|
90
|
+
chain,
|
|
91
|
+
transport: fallback(rpcUrls.map(url => http(url, { batch: false }))),
|
|
92
|
+
pollingInterval: pollingIntervalMS,
|
|
93
|
+
}).extend(publicActions);
|
|
94
|
+
|
|
95
|
+
return extendedClient;
|
|
96
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type ConfigMappingsType,
|
|
3
3
|
bigintConfigHelper,
|
|
4
|
+
booleanConfigHelper,
|
|
5
|
+
enumConfigHelper,
|
|
4
6
|
getConfigFromMappings,
|
|
7
|
+
getDefaultConfig,
|
|
5
8
|
numberConfigHelper,
|
|
9
|
+
optionalNumberConfigHelper,
|
|
6
10
|
} from '@aztec/foundation/config';
|
|
11
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
7
12
|
|
|
8
|
-
import {
|
|
13
|
+
import { l1ContractsDefaultEnv } from './generated/l1-contracts-defaults.js';
|
|
14
|
+
import { type L1TxUtilsConfig, l1TxUtilsConfigMappings } from './l1_tx_utils/config.js';
|
|
15
|
+
|
|
16
|
+
export type GenesisStateConfig = {
|
|
17
|
+
/** Whether to populate the genesis state with initial fee juice for the test accounts */
|
|
18
|
+
testAccounts: boolean;
|
|
19
|
+
/** Whether to populate the genesis state with initial fee juice for the sponsored FPC */
|
|
20
|
+
sponsoredFPC: boolean;
|
|
21
|
+
};
|
|
9
22
|
|
|
10
23
|
export type L1ContractsConfig = {
|
|
11
24
|
/** How many seconds an L1 slot lasts. */
|
|
@@ -16,88 +29,241 @@ export type L1ContractsConfig = {
|
|
|
16
29
|
aztecEpochDuration: number;
|
|
17
30
|
/** The target validator committee size. */
|
|
18
31
|
aztecTargetCommitteeSize: number;
|
|
19
|
-
/** The number of
|
|
20
|
-
|
|
32
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
33
|
+
lagInEpochsForValidatorSet: number;
|
|
34
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
35
|
+
lagInEpochsForRandao: number;
|
|
36
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */
|
|
37
|
+
inboxLag: number;
|
|
38
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
39
|
+
aztecProofSubmissionEpochs: number;
|
|
40
|
+
/** The deposit amount for a validator */
|
|
41
|
+
activationThreshold: bigint;
|
|
21
42
|
/** The minimum stake for a validator. */
|
|
22
|
-
|
|
23
|
-
/** The
|
|
24
|
-
|
|
25
|
-
/** The slashing round
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
43
|
+
ejectionThreshold: bigint;
|
|
44
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
45
|
+
localEjectionThreshold: bigint;
|
|
46
|
+
/** 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) */
|
|
47
|
+
slashingQuorum?: number;
|
|
48
|
+
/** The slashing round size, i.e. how many epochs are in a slashing round */
|
|
49
|
+
slashingRoundSizeInEpochs: number;
|
|
50
|
+
/** The slashing lifetime in rounds. I.e., if 1, round N must be submitted before round N + 2 */
|
|
51
|
+
slashingLifetimeInRounds: number;
|
|
52
|
+
/** The slashing execution delay in rounds. I.e., if 1, round N may not be submitted until round N + 2 */
|
|
53
|
+
slashingExecutionDelayInRounds: number;
|
|
54
|
+
/** The slashing vetoer. May blacklist a payload from being submitted. */
|
|
55
|
+
slashingVetoer: EthAddress;
|
|
56
|
+
/** How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset) */
|
|
57
|
+
slashingOffsetInRounds: number;
|
|
58
|
+
/** How long slashing can be disabled for in seconds when vetoer disables it */
|
|
59
|
+
slashingDisableDuration: number;
|
|
60
|
+
/** Type of slasher proposer */
|
|
61
|
+
slasherFlavor: 'empire' | 'tally' | 'none';
|
|
62
|
+
/** Minimum amount that can be slashed in tally slashing */
|
|
63
|
+
slashAmountSmall: bigint;
|
|
64
|
+
/** Medium amount to slash in tally slashing */
|
|
65
|
+
slashAmountMedium: bigint;
|
|
66
|
+
/** Largest amount that can be slashed per round in tally slashing */
|
|
67
|
+
slashAmountLarge: bigint;
|
|
68
|
+
/** Governance proposing quorum (defaults to roundSize/2 + 1) */
|
|
69
|
+
governanceProposerQuorum?: number;
|
|
29
70
|
/** Governance proposing round size */
|
|
30
71
|
governanceProposerRoundSize: number;
|
|
72
|
+
/** Governance voting duration in seconds (only for local/devnet/next-net, default 3600) */
|
|
73
|
+
governanceVotingDuration?: number;
|
|
74
|
+
/** The mana target for the rollup */
|
|
75
|
+
manaTarget: bigint;
|
|
76
|
+
/** The proving cost per mana */
|
|
77
|
+
provingCostPerMana: bigint;
|
|
78
|
+
/** The initial ETH per fee asset price (with 1e12 precision) */
|
|
79
|
+
initialEthPerFeeAsset: bigint;
|
|
80
|
+
/** The number of seconds to wait for an exit */
|
|
81
|
+
exitDelaySeconds: number;
|
|
31
82
|
} & L1TxUtilsConfig;
|
|
32
83
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
aztecProofSubmissionWindow: 31, // you have a full epoch to submit a proof after the epoch to prove ends
|
|
39
|
-
minimumStake: BigInt(100e18),
|
|
40
|
-
slashingQuorum: 6,
|
|
41
|
-
slashingRoundSize: 10,
|
|
42
|
-
governanceProposerQuorum: 6,
|
|
43
|
-
governanceProposerRoundSize: 10,
|
|
44
|
-
} satisfies L1ContractsConfig;
|
|
45
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Config mappings for L1ContractsConfig.
|
|
86
|
+
* Default values come from generated l1-contracts-defaults.json (source: defaults.yml).
|
|
87
|
+
* Real deployments use forge scripts which require explicit env vars (vm.envUint).
|
|
88
|
+
*/
|
|
46
89
|
export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> = {
|
|
47
90
|
ethereumSlotDuration: {
|
|
48
91
|
env: 'ETHEREUM_SLOT_DURATION',
|
|
49
92
|
description: 'How many seconds an L1 slot lasts.',
|
|
50
|
-
...numberConfigHelper(
|
|
93
|
+
...numberConfigHelper(l1ContractsDefaultEnv.ETHEREUM_SLOT_DURATION),
|
|
51
94
|
},
|
|
52
95
|
aztecSlotDuration: {
|
|
53
96
|
env: 'AZTEC_SLOT_DURATION',
|
|
54
97
|
description: 'How many seconds an L2 slots lasts (must be multiple of ethereum slot duration).',
|
|
55
|
-
...numberConfigHelper(
|
|
98
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLOT_DURATION),
|
|
56
99
|
},
|
|
57
100
|
aztecEpochDuration: {
|
|
58
101
|
env: 'AZTEC_EPOCH_DURATION',
|
|
59
102
|
description: `How many L2 slots an epoch lasts (maximum AZTEC_MAX_EPOCH_DURATION).`,
|
|
60
|
-
...numberConfigHelper(
|
|
103
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_EPOCH_DURATION),
|
|
61
104
|
},
|
|
62
105
|
aztecTargetCommitteeSize: {
|
|
63
106
|
env: 'AZTEC_TARGET_COMMITTEE_SIZE',
|
|
64
107
|
description: 'The target validator committee size.',
|
|
65
|
-
...numberConfigHelper(
|
|
108
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_TARGET_COMMITTEE_SIZE),
|
|
66
109
|
},
|
|
67
|
-
|
|
68
|
-
env: '
|
|
69
|
-
description:
|
|
70
|
-
|
|
71
|
-
|
|
110
|
+
lagInEpochsForValidatorSet: {
|
|
111
|
+
env: 'AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET',
|
|
112
|
+
description: 'The number of epochs to lag behind the current epoch for validator selection.',
|
|
113
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET),
|
|
114
|
+
},
|
|
115
|
+
lagInEpochsForRandao: {
|
|
116
|
+
env: 'AZTEC_LAG_IN_EPOCHS_FOR_RANDAO',
|
|
117
|
+
description: 'The number of epochs to lag behind the current epoch for randao selection.',
|
|
118
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_LAG_IN_EPOCHS_FOR_RANDAO),
|
|
119
|
+
},
|
|
120
|
+
inboxLag: {
|
|
121
|
+
env: 'AZTEC_INBOX_LAG',
|
|
122
|
+
description: 'The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks).',
|
|
123
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_INBOX_LAG),
|
|
124
|
+
},
|
|
125
|
+
aztecProofSubmissionEpochs: {
|
|
126
|
+
env: 'AZTEC_PROOF_SUBMISSION_EPOCHS',
|
|
127
|
+
description: 'The number of epochs after an epoch ends that proofs are still accepted.',
|
|
128
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_PROOF_SUBMISSION_EPOCHS),
|
|
129
|
+
},
|
|
130
|
+
activationThreshold: {
|
|
131
|
+
env: 'AZTEC_ACTIVATION_THRESHOLD',
|
|
132
|
+
description: 'The deposit amount for a validator',
|
|
133
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_ACTIVATION_THRESHOLD)),
|
|
72
134
|
},
|
|
73
|
-
|
|
74
|
-
env: '
|
|
135
|
+
ejectionThreshold: {
|
|
136
|
+
env: 'AZTEC_EJECTION_THRESHOLD',
|
|
75
137
|
description: 'The minimum stake for a validator.',
|
|
76
|
-
...bigintConfigHelper(
|
|
138
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_EJECTION_THRESHOLD)),
|
|
139
|
+
},
|
|
140
|
+
localEjectionThreshold: {
|
|
141
|
+
env: 'AZTEC_LOCAL_EJECTION_THRESHOLD',
|
|
142
|
+
description:
|
|
143
|
+
'The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup',
|
|
144
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_LOCAL_EJECTION_THRESHOLD)),
|
|
145
|
+
},
|
|
146
|
+
slashingOffsetInRounds: {
|
|
147
|
+
env: 'AZTEC_SLASHING_OFFSET_IN_ROUNDS',
|
|
148
|
+
description:
|
|
149
|
+
'How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset)',
|
|
150
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_OFFSET_IN_ROUNDS),
|
|
151
|
+
},
|
|
152
|
+
slasherFlavor: {
|
|
153
|
+
env: 'AZTEC_SLASHER_FLAVOR',
|
|
154
|
+
description: 'Type of slasher proposer (empire, tally, or none)',
|
|
155
|
+
...enumConfigHelper(
|
|
156
|
+
['empire', 'tally', 'none'] as const,
|
|
157
|
+
l1ContractsDefaultEnv.AZTEC_SLASHER_FLAVOR as 'empire' | 'tally' | 'none',
|
|
158
|
+
),
|
|
159
|
+
},
|
|
160
|
+
slashAmountSmall: {
|
|
161
|
+
env: 'AZTEC_SLASH_AMOUNT_SMALL',
|
|
162
|
+
description: 'Small slashing amount for light offenses',
|
|
163
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_SLASH_AMOUNT_SMALL)),
|
|
164
|
+
},
|
|
165
|
+
slashAmountMedium: {
|
|
166
|
+
env: 'AZTEC_SLASH_AMOUNT_MEDIUM',
|
|
167
|
+
description: 'Medium slashing amount for moderate offenses',
|
|
168
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_SLASH_AMOUNT_MEDIUM)),
|
|
169
|
+
},
|
|
170
|
+
slashAmountLarge: {
|
|
171
|
+
env: 'AZTEC_SLASH_AMOUNT_LARGE',
|
|
172
|
+
description: 'Large slashing amount for severe offenses',
|
|
173
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_SLASH_AMOUNT_LARGE)),
|
|
77
174
|
},
|
|
78
175
|
slashingQuorum: {
|
|
79
176
|
env: 'AZTEC_SLASHING_QUORUM',
|
|
80
177
|
description: 'The slashing quorum',
|
|
81
|
-
...
|
|
178
|
+
...optionalNumberConfigHelper(),
|
|
82
179
|
},
|
|
83
|
-
|
|
84
|
-
env: '
|
|
180
|
+
slashingRoundSizeInEpochs: {
|
|
181
|
+
env: 'AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS',
|
|
85
182
|
description: 'The slashing round size',
|
|
86
|
-
...numberConfigHelper(
|
|
183
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS),
|
|
184
|
+
},
|
|
185
|
+
slashingLifetimeInRounds: {
|
|
186
|
+
env: 'AZTEC_SLASHING_LIFETIME_IN_ROUNDS',
|
|
187
|
+
description: 'The slashing lifetime in rounds',
|
|
188
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_LIFETIME_IN_ROUNDS),
|
|
189
|
+
},
|
|
190
|
+
slashingExecutionDelayInRounds: {
|
|
191
|
+
env: 'AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS',
|
|
192
|
+
description: 'The slashing execution delay in rounds',
|
|
193
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS),
|
|
194
|
+
},
|
|
195
|
+
slashingVetoer: {
|
|
196
|
+
env: 'AZTEC_SLASHING_VETOER',
|
|
197
|
+
description: 'The slashing vetoer',
|
|
198
|
+
parseEnv: (val: string) => EthAddress.fromString(val),
|
|
199
|
+
defaultValue: EthAddress.fromString(l1ContractsDefaultEnv.AZTEC_SLASHING_VETOER),
|
|
200
|
+
},
|
|
201
|
+
slashingDisableDuration: {
|
|
202
|
+
env: 'AZTEC_SLASHING_DISABLE_DURATION',
|
|
203
|
+
description: 'How long slashing can be disabled for in seconds when vetoer disables it',
|
|
204
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_DISABLE_DURATION),
|
|
87
205
|
},
|
|
88
206
|
governanceProposerQuorum: {
|
|
89
207
|
env: 'AZTEC_GOVERNANCE_PROPOSER_QUORUM',
|
|
90
208
|
description: 'The governance proposing quorum',
|
|
91
|
-
...
|
|
209
|
+
...optionalNumberConfigHelper(),
|
|
92
210
|
},
|
|
93
211
|
governanceProposerRoundSize: {
|
|
94
212
|
env: 'AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE',
|
|
95
213
|
description: 'The governance proposing round size',
|
|
96
|
-
...numberConfigHelper(
|
|
214
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE),
|
|
215
|
+
},
|
|
216
|
+
governanceVotingDuration: {
|
|
217
|
+
env: 'AZTEC_GOVERNANCE_VOTING_DURATION',
|
|
218
|
+
description: 'Governance voting duration in seconds (only for local/devnet/next-net)',
|
|
219
|
+
...numberConfigHelper(3600), // 1 hour default, not in generated defaults as it's deployment-time only
|
|
220
|
+
},
|
|
221
|
+
manaTarget: {
|
|
222
|
+
env: 'AZTEC_MANA_TARGET',
|
|
223
|
+
description: 'The mana target for the rollup',
|
|
224
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_MANA_TARGET)),
|
|
225
|
+
},
|
|
226
|
+
provingCostPerMana: {
|
|
227
|
+
env: 'AZTEC_PROVING_COST_PER_MANA',
|
|
228
|
+
description: 'The proving cost per mana',
|
|
229
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_PROVING_COST_PER_MANA)),
|
|
230
|
+
},
|
|
231
|
+
initialEthPerFeeAsset: {
|
|
232
|
+
env: 'AZTEC_INITIAL_ETH_PER_FEE_ASSET',
|
|
233
|
+
description: 'The initial ETH per fee asset price (with 1e12 precision)',
|
|
234
|
+
...bigintConfigHelper(BigInt(l1ContractsDefaultEnv.AZTEC_INITIAL_ETH_PER_FEE_ASSET)),
|
|
235
|
+
},
|
|
236
|
+
exitDelaySeconds: {
|
|
237
|
+
env: 'AZTEC_EXIT_DELAY_SECONDS',
|
|
238
|
+
description: 'The delay before a validator can exit the set',
|
|
239
|
+
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_EXIT_DELAY_SECONDS),
|
|
97
240
|
},
|
|
98
241
|
...l1TxUtilsConfigMappings,
|
|
99
242
|
};
|
|
100
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Default L1 contracts configuration derived from l1ContractsConfigMappings.
|
|
246
|
+
* Source of truth: spartan/environments/defaults.yml -> defaults.l1-contracts
|
|
247
|
+
*/
|
|
248
|
+
export const DefaultL1ContractsConfig = getDefaultConfig(l1ContractsConfigMappings);
|
|
249
|
+
|
|
250
|
+
export const genesisStateConfigMappings: ConfigMappingsType<GenesisStateConfig> = {
|
|
251
|
+
testAccounts: {
|
|
252
|
+
env: 'TEST_ACCOUNTS',
|
|
253
|
+
description: 'Whether to populate the genesis state with initial fee juice for the test accounts.',
|
|
254
|
+
...booleanConfigHelper(false),
|
|
255
|
+
},
|
|
256
|
+
sponsoredFPC: {
|
|
257
|
+
env: 'SPONSORED_FPC',
|
|
258
|
+
description: 'Whether to populate the genesis state with initial fee juice for the sponsored FPC.',
|
|
259
|
+
...booleanConfigHelper(false),
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
|
|
101
263
|
export function getL1ContractsConfigEnvVars(): L1ContractsConfig {
|
|
102
264
|
return getConfigFromMappings(l1ContractsConfigMappings);
|
|
103
265
|
}
|
|
266
|
+
|
|
267
|
+
export function getGenesisStateConfigEnvVars(): GenesisStateConfig {
|
|
268
|
+
return getConfigFromMappings(genesisStateConfigMappings);
|
|
269
|
+
}
|