@aztec/ethereum 0.0.0-test.1 → 0.0.1-commit.017a351
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 +28 -4
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +73 -3
- package/dest/config.d.ts +70 -23
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +151 -34
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- 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/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 +59 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
- package/dest/contracts/fee_asset_price_oracle.js +656 -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 +131 -43
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +281 -87
- package/dest/contracts/governance_proposer.d.ts +49 -13
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +483 -26
- 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 +85 -0
- package/dest/contracts/index.d.ts +11 -2
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +10 -1
- 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 +136 -0
- package/dest/contracts/multicall.d.ts.map +1 -0
- package/dest/contracts/multicall.js +264 -0
- package/dest/contracts/outbox.d.ts +64 -0
- package/dest/contracts/outbox.d.ts.map +1 -0
- package/dest/contracts/outbox.js +113 -0
- package/dest/contracts/registry.d.ts +12 -5
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +74 -17
- package/dest/contracts/rollup.d.ts +5526 -52
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1446 -118
- 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/slashing_proposer.d.ts +133 -15
- package/dest/contracts/slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/slashing_proposer.js +293 -22
- 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 +256 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +411 -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 +79270 -0
- package/dest/l1_artifacts.d.ts.map +1 -0
- package/dest/l1_artifacts.js +151 -0
- package/dest/l1_contract_addresses.d.ts +61 -45
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +99 -76
- package/dest/l1_reader.d.ts +8 -6
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +20 -12
- package/dest/l1_tx_utils/config.d.ts +65 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +109 -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 +32 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +22 -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 +42 -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 +13 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +13 -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 +113 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +658 -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 +328 -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/tx_delayer.d.ts +58 -0
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
- package/dest/l1_tx_utils/tx_delayer.js +223 -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 +30 -0
- package/dest/publisher_manager.d.ts.map +1 -0
- package/dest/publisher_manager.js +162 -0
- package/dest/queries.d.ts +17 -4
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +120 -12
- package/dest/test/chain_monitor.d.ts +95 -0
- package/dest/test/chain_monitor.d.ts.map +1 -0
- package/dest/test/chain_monitor.js +249 -0
- package/dest/test/eth_cheat_codes.d.ts +237 -0
- package/dest/test/eth_cheat_codes.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes.js +573 -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 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +3 -2
- package/dest/test/rollup_cheat_codes.d.ts +118 -0
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/test/rollup_cheat_codes.js +344 -0
- package/dest/test/start_anvil.d.ts +30 -2
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +147 -24
- 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 +25 -4
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +142 -91
- package/dest/zkPassportVerifierAddress.d.ts +15 -0
- package/dest/zkPassportVerifierAddress.d.ts.map +1 -0
- package/dest/zkPassportVerifierAddress.js +11 -0
- package/package.json +52 -26
- package/src/account.ts +5 -0
- package/src/client.ts +107 -5
- package/src/config.ts +218 -43
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +77 -7
- package/src/contracts/errors.ts +13 -0
- package/src/contracts/fee_asset_handler.ts +66 -0
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/fee_juice.ts +29 -15
- package/src/contracts/governance.ts +343 -74
- package/src/contracts/governance_proposer.ts +128 -25
- package/src/contracts/gse.ts +88 -0
- package/src/contracts/inbox.ts +123 -0
- package/src/contracts/index.ts +10 -1
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +296 -0
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +81 -26
- package/src/contracts/rollup.ts +1246 -90
- package/src/contracts/slasher_contract.ts +89 -0
- package/src/contracts/slashing_proposer.ts +296 -27
- package/src/contracts/utils.ts +14 -0
- package/src/deploy_aztec_l1_contracts.ts +646 -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 +231 -0
- package/src/l1_contract_addresses.ts +121 -80
- package/src/l1_reader.ts +31 -16
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +181 -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 +108 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +15 -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 +789 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +424 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/tx_delayer.ts +303 -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 +203 -0
- package/src/queries.ts +149 -17
- package/src/test/chain_monitor.ts +307 -0
- package/src/test/eth_cheat_codes.ts +600 -0
- package/src/test/eth_cheat_codes_with_state.ts +1 -1
- package/src/test/index.ts +3 -2
- package/src/test/rollup_cheat_codes.ts +388 -0
- package/src/test/start_anvil.ts +189 -22
- package/src/test/upgrade_utils.ts +30 -21
- package/src/types.ts +71 -7
- package/src/utils.ts +164 -96
- 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/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/dest/test/delayed_tx_utils.d.ts +0 -8
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -21
- package/dest/test/tx_delayer.d.ts +0 -25
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/dest/test/tx_delayer.js +0 -116
- package/src/contracts/forwarder.ts +0 -132
- 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
- package/src/test/delayed_tx_utils.ts +0 -24
- package/src/test/tx_delayer.ts +0 -163
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CoinIssuerAbi,
|
|
3
|
+
CoinIssuerBytecode,
|
|
4
|
+
DateGatedRelayerAbi,
|
|
5
|
+
DateGatedRelayerBytecode,
|
|
6
|
+
FeeAssetHandlerAbi,
|
|
7
|
+
FeeAssetHandlerBytecode,
|
|
8
|
+
FeeJuicePortalAbi,
|
|
9
|
+
FeeJuicePortalBytecode,
|
|
10
|
+
GSEAbi,
|
|
11
|
+
GSEBytecode,
|
|
12
|
+
GovernanceAbi,
|
|
13
|
+
GovernanceBytecode,
|
|
14
|
+
GovernanceProposerAbi,
|
|
15
|
+
GovernanceProposerBytecode,
|
|
16
|
+
HonkVerifierAbi,
|
|
17
|
+
HonkVerifierBytecode,
|
|
18
|
+
InboxAbi,
|
|
19
|
+
InboxBytecode,
|
|
20
|
+
MockVerifierAbi,
|
|
21
|
+
MockVerifierBytecode,
|
|
22
|
+
MockZKPassportVerifierAbi,
|
|
23
|
+
MockZKPassportVerifierBytecode,
|
|
24
|
+
MultiAdderAbi,
|
|
25
|
+
MultiAdderBytecode,
|
|
26
|
+
OutboxAbi,
|
|
27
|
+
OutboxBytecode,
|
|
28
|
+
RegisterNewRollupVersionPayloadAbi,
|
|
29
|
+
RegisterNewRollupVersionPayloadBytecode,
|
|
30
|
+
RegistryAbi,
|
|
31
|
+
RegistryBytecode,
|
|
32
|
+
RewardDistributorAbi,
|
|
33
|
+
RewardDistributorBytecode,
|
|
34
|
+
RewardExtLibAbi,
|
|
35
|
+
RewardExtLibBytecode,
|
|
36
|
+
RollupAbi,
|
|
37
|
+
RollupBytecode,
|
|
38
|
+
RollupLinkReferences,
|
|
39
|
+
RollupOperationsExtLibAbi,
|
|
40
|
+
RollupOperationsExtLibBytecode,
|
|
41
|
+
SlasherAbi,
|
|
42
|
+
SlasherBytecode,
|
|
43
|
+
SlasherDeploymentExtLibAbi,
|
|
44
|
+
SlasherDeploymentExtLibBytecode,
|
|
45
|
+
SlashingProposerAbi,
|
|
46
|
+
SlashingProposerBytecode,
|
|
47
|
+
StakingAssetHandlerAbi,
|
|
48
|
+
StakingAssetHandlerBytecode,
|
|
49
|
+
TestERC20Abi,
|
|
50
|
+
TestERC20Bytecode,
|
|
51
|
+
ValidatorOperationsExtLibAbi,
|
|
52
|
+
ValidatorOperationsExtLibBytecode,
|
|
53
|
+
ValidatorSelectionLibAbi,
|
|
54
|
+
ValidatorSelectionLibBytecode,
|
|
55
|
+
} from '@aztec/l1-artifacts';
|
|
56
|
+
|
|
57
|
+
import type { Hex } from 'viem';
|
|
58
|
+
|
|
59
|
+
export const RegistryArtifact = {
|
|
60
|
+
name: 'Registry',
|
|
61
|
+
contractAbi: RegistryAbi,
|
|
62
|
+
contractBytecode: RegistryBytecode as Hex,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const InboxArtifact = {
|
|
66
|
+
name: 'Inbox',
|
|
67
|
+
contractAbi: InboxAbi,
|
|
68
|
+
contractBytecode: InboxBytecode as Hex,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const OutboxArtifact = {
|
|
72
|
+
name: 'Outbox',
|
|
73
|
+
contractAbi: OutboxAbi,
|
|
74
|
+
contractBytecode: OutboxBytecode as Hex,
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const RollupArtifact = {
|
|
78
|
+
name: 'Rollup',
|
|
79
|
+
contractAbi: RollupAbi,
|
|
80
|
+
contractBytecode: RollupBytecode as Hex,
|
|
81
|
+
libraries: {
|
|
82
|
+
linkReferences: RollupLinkReferences,
|
|
83
|
+
libraryCode: {
|
|
84
|
+
ValidatorSelectionLib: {
|
|
85
|
+
name: 'ValidatorSelectionLib',
|
|
86
|
+
contractAbi: ValidatorSelectionLibAbi,
|
|
87
|
+
contractBytecode: ValidatorSelectionLibBytecode as Hex,
|
|
88
|
+
},
|
|
89
|
+
RollupOperationsExtLib: {
|
|
90
|
+
name: 'RollupOperationsExtLib',
|
|
91
|
+
contractAbi: RollupOperationsExtLibAbi,
|
|
92
|
+
contractBytecode: RollupOperationsExtLibBytecode as Hex,
|
|
93
|
+
},
|
|
94
|
+
ValidatorOperationsExtLib: {
|
|
95
|
+
name: 'ValidatorOperationsExtLib',
|
|
96
|
+
contractAbi: ValidatorOperationsExtLibAbi,
|
|
97
|
+
contractBytecode: ValidatorOperationsExtLibBytecode as Hex,
|
|
98
|
+
},
|
|
99
|
+
RewardExtLib: {
|
|
100
|
+
name: 'RewardExtLib',
|
|
101
|
+
contractAbi: RewardExtLibAbi,
|
|
102
|
+
contractBytecode: RewardExtLibBytecode as Hex,
|
|
103
|
+
},
|
|
104
|
+
SlasherDeploymentExtLib: {
|
|
105
|
+
name: 'SlasherDeploymentExtLib',
|
|
106
|
+
contractAbi: SlasherDeploymentExtLibAbi,
|
|
107
|
+
contractBytecode: SlasherDeploymentExtLibBytecode as Hex,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const StakingAssetArtifact = {
|
|
114
|
+
name: 'StakingAsset',
|
|
115
|
+
contractAbi: TestERC20Abi,
|
|
116
|
+
contractBytecode: TestERC20Bytecode as Hex,
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const FeeAssetArtifact = {
|
|
120
|
+
name: 'FeeAsset',
|
|
121
|
+
contractAbi: TestERC20Abi,
|
|
122
|
+
contractBytecode: TestERC20Bytecode as Hex,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export const FeeJuicePortalArtifact = {
|
|
126
|
+
name: 'FeeJuicePortal',
|
|
127
|
+
contractAbi: FeeJuicePortalAbi,
|
|
128
|
+
contractBytecode: FeeJuicePortalBytecode as Hex,
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const RewardDistributorArtifact = {
|
|
132
|
+
name: 'RewardDistributor',
|
|
133
|
+
contractAbi: RewardDistributorAbi,
|
|
134
|
+
contractBytecode: RewardDistributorBytecode as Hex,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export const CoinIssuerArtifact = {
|
|
138
|
+
name: 'CoinIssuer',
|
|
139
|
+
contractAbi: CoinIssuerAbi,
|
|
140
|
+
contractBytecode: CoinIssuerBytecode as Hex,
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const DateGatedRelayerArtifact = {
|
|
144
|
+
name: 'DateGatedRelayer',
|
|
145
|
+
contractAbi: DateGatedRelayerAbi,
|
|
146
|
+
contractBytecode: DateGatedRelayerBytecode as Hex,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const GovernanceProposerArtifact = {
|
|
150
|
+
name: 'GovernanceProposer',
|
|
151
|
+
contractAbi: GovernanceProposerAbi,
|
|
152
|
+
contractBytecode: GovernanceProposerBytecode as Hex,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export const GovernanceArtifact = {
|
|
156
|
+
name: 'Governance',
|
|
157
|
+
contractAbi: GovernanceAbi,
|
|
158
|
+
contractBytecode: GovernanceBytecode as Hex,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const SlasherArtifact = {
|
|
162
|
+
name: 'Slasher',
|
|
163
|
+
contractAbi: SlasherAbi,
|
|
164
|
+
contractBytecode: SlasherBytecode as Hex,
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const SlashingProposerArtifact = {
|
|
168
|
+
name: 'SlashingProposer',
|
|
169
|
+
contractAbi: SlashingProposerAbi,
|
|
170
|
+
contractBytecode: SlashingProposerBytecode as Hex,
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const RegisterNewRollupVersionPayloadArtifact = {
|
|
174
|
+
name: 'RegisterNewRollupVersionPayload',
|
|
175
|
+
contractAbi: RegisterNewRollupVersionPayloadAbi,
|
|
176
|
+
contractBytecode: RegisterNewRollupVersionPayloadBytecode as Hex,
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export const FeeAssetHandlerArtifact = {
|
|
180
|
+
name: 'FeeAssetHandler',
|
|
181
|
+
contractAbi: FeeAssetHandlerAbi,
|
|
182
|
+
contractBytecode: FeeAssetHandlerBytecode as Hex,
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export const StakingAssetHandlerArtifact = {
|
|
186
|
+
name: 'StakingAssetHandler',
|
|
187
|
+
contractAbi: StakingAssetHandlerAbi,
|
|
188
|
+
contractBytecode: StakingAssetHandlerBytecode as Hex,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export const MultiAdderArtifact = {
|
|
192
|
+
name: 'MultiAdder',
|
|
193
|
+
contractAbi: MultiAdderAbi,
|
|
194
|
+
contractBytecode: MultiAdderBytecode as Hex,
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const GSEArtifact = {
|
|
198
|
+
name: 'GSE',
|
|
199
|
+
contractAbi: GSEAbi,
|
|
200
|
+
contractBytecode: GSEBytecode as Hex,
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// Verifier artifacts
|
|
204
|
+
export const HonkVerifierArtifact = {
|
|
205
|
+
name: 'HonkVerifier',
|
|
206
|
+
contractAbi: HonkVerifierAbi,
|
|
207
|
+
contractBytecode: HonkVerifierBytecode as Hex,
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export const MockVerifierArtifact = {
|
|
211
|
+
name: 'MockVerifier',
|
|
212
|
+
contractAbi: MockVerifierAbi,
|
|
213
|
+
contractBytecode: MockVerifierBytecode as Hex,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const MockZkPassportVerifierArtifact = {
|
|
217
|
+
name: 'MockZkPassportVerifier',
|
|
218
|
+
contractAbi: MockZKPassportVerifierAbi,
|
|
219
|
+
contractBytecode: MockZKPassportVerifierBytecode as Hex,
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Re-export the verifier artifacts for backwards compatibility
|
|
223
|
+
export const l1ArtifactsVerifiers = {
|
|
224
|
+
honkVerifier: HonkVerifierArtifact,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// Re-export the mock verifiers for backwards compatibility
|
|
228
|
+
export const mockVerifiers = {
|
|
229
|
+
mockVerifier: MockVerifierArtifact,
|
|
230
|
+
mockZkPassportVerifier: MockZkPassportVerifierArtifact,
|
|
231
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { ConfigMappingsType } from '@aztec/foundation/config';
|
|
1
|
+
import type { ConfigMapping, ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import {
|
|
3
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Required L1 contract address keys.
|
|
9
9
|
* NOTE: When changing this list, make sure to update CLI & CI scripts accordingly.
|
|
10
10
|
* For reference: https://github.com/AztecProtocol/aztec-packages/pull/5553
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
const REQUIRED_L1_CONTRACT_ADDRESS_KEYS = [
|
|
13
13
|
'rollupAddress',
|
|
14
14
|
'registryAddress',
|
|
15
15
|
'inboxAddress',
|
|
@@ -23,87 +23,128 @@ export const L1ContractsNames = [
|
|
|
23
23
|
'stakingAssetAddress',
|
|
24
24
|
] as const;
|
|
25
25
|
|
|
26
|
+
/** Optional L1 contract address keys — present only in some deployments. */
|
|
27
|
+
export const OPTIONAL_L1_CONTRACT_ADDRESS_KEYS = [
|
|
28
|
+
'feeAssetHandlerAddress',
|
|
29
|
+
'stakingAssetHandlerAddress',
|
|
30
|
+
'zkPassportVerifierAddress',
|
|
31
|
+
'gseAddress',
|
|
32
|
+
'dateGatedRelayerAddress',
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
type RequiredContractKey = (typeof REQUIRED_L1_CONTRACT_ADDRESS_KEYS)[number];
|
|
36
|
+
type OptionalContractKey = (typeof OPTIONAL_L1_CONTRACT_ADDRESS_KEYS)[number];
|
|
37
|
+
|
|
26
38
|
/** Provides the directory of current L1 contract addresses */
|
|
27
39
|
export type L1ContractAddresses = {
|
|
28
|
-
[K in
|
|
29
|
-
} & {
|
|
40
|
+
[K in RequiredContractKey]: EthAddress;
|
|
41
|
+
} & {
|
|
42
|
+
[K in OptionalContractKey]?: EthAddress;
|
|
43
|
+
};
|
|
30
44
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
stakingAssetAddress: schemas.EthAddress,
|
|
38
|
-
feeJuicePortalAddress: schemas.EthAddress,
|
|
39
|
-
coinIssuerAddress: schemas.EthAddress,
|
|
40
|
-
rewardDistributorAddress: schemas.EthAddress,
|
|
41
|
-
governanceProposerAddress: schemas.EthAddress,
|
|
42
|
-
governanceAddress: schemas.EthAddress,
|
|
43
|
-
slashFactoryAddress: schemas.EthAddress.optional(),
|
|
44
|
-
}) satisfies ZodFor<L1ContractAddresses>;
|
|
45
|
+
/**
|
|
46
|
+
* Names of required L1 contract addresses.
|
|
47
|
+
* NOTE: When changing the set of contracts, update CLI & CI scripts accordingly.
|
|
48
|
+
* For reference: https://github.com/AztecProtocol/aztec-packages/pull/5553
|
|
49
|
+
*/
|
|
50
|
+
export const L1ContractsNames = REQUIRED_L1_CONTRACT_ADDRESS_KEYS;
|
|
45
51
|
|
|
46
52
|
const parseEnv = (val: string) => EthAddress.fromString(val);
|
|
53
|
+
const addrEnv = (description: string, env?: ConfigMapping<EthAddress>['env']): ConfigMapping<EthAddress> => ({
|
|
54
|
+
description,
|
|
55
|
+
parseEnv,
|
|
56
|
+
...(env && { env }),
|
|
57
|
+
});
|
|
47
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Config mapping for all L1 contract addresses.
|
|
61
|
+
* This is the single source of truth for which contract addresses exist and how to parse them.
|
|
62
|
+
*/
|
|
48
63
|
export const l1ContractAddressesMapping: ConfigMappingsType<L1ContractAddresses> = {
|
|
49
|
-
rollupAddress:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
feeJuiceAddress: {
|
|
70
|
-
env: 'FEE_JUICE_CONTRACT_ADDRESS',
|
|
71
|
-
description: 'The deployed L1 Fee Juice contract address.',
|
|
72
|
-
parseEnv,
|
|
73
|
-
},
|
|
74
|
-
stakingAssetAddress: {
|
|
75
|
-
env: 'STAKING_ASSET_CONTRACT_ADDRESS',
|
|
76
|
-
description: 'The deployed L1 staking asset contract address.',
|
|
77
|
-
parseEnv,
|
|
78
|
-
},
|
|
79
|
-
feeJuicePortalAddress: {
|
|
80
|
-
env: 'FEE_JUICE_PORTAL_CONTRACT_ADDRESS',
|
|
81
|
-
description: 'The deployed L1 Fee Juice portal contract address.',
|
|
82
|
-
parseEnv,
|
|
83
|
-
},
|
|
84
|
-
coinIssuerAddress: {
|
|
85
|
-
env: 'COIN_ISSUER_CONTRACT_ADDRESS',
|
|
86
|
-
description: 'The deployed L1 coinIssuer contract address',
|
|
87
|
-
parseEnv,
|
|
88
|
-
},
|
|
89
|
-
rewardDistributorAddress: {
|
|
90
|
-
env: 'REWARD_DISTRIBUTOR_CONTRACT_ADDRESS',
|
|
91
|
-
description: 'The deployed L1 rewardDistributor contract address',
|
|
92
|
-
parseEnv,
|
|
93
|
-
},
|
|
94
|
-
governanceProposerAddress: {
|
|
95
|
-
env: 'GOVERNANCE_PROPOSER_CONTRACT_ADDRESS',
|
|
96
|
-
description: 'The deployed L1 governanceProposer contract address',
|
|
97
|
-
parseEnv,
|
|
98
|
-
},
|
|
99
|
-
governanceAddress: {
|
|
100
|
-
env: 'GOVERNANCE_CONTRACT_ADDRESS',
|
|
101
|
-
description: 'The deployed L1 governance contract address',
|
|
102
|
-
parseEnv,
|
|
103
|
-
},
|
|
104
|
-
slashFactoryAddress: {
|
|
105
|
-
env: 'SLASH_FACTORY_CONTRACT_ADDRESS',
|
|
106
|
-
description: 'The deployed L1 slashFactory contract address',
|
|
107
|
-
parseEnv,
|
|
108
|
-
},
|
|
64
|
+
rollupAddress: addrEnv('The deployed L1 rollup contract address.'),
|
|
65
|
+
registryAddress: addrEnv('The deployed L1 registry contract address.', 'REGISTRY_CONTRACT_ADDRESS'),
|
|
66
|
+
inboxAddress: addrEnv('The deployed L1 inbox contract address.'),
|
|
67
|
+
outboxAddress: addrEnv('The deployed L1 outbox contract address.'),
|
|
68
|
+
feeJuiceAddress: addrEnv('The deployed L1 Fee Juice contract address.'),
|
|
69
|
+
feeJuicePortalAddress: addrEnv('The deployed L1 Fee Juice portal contract address.'),
|
|
70
|
+
coinIssuerAddress: addrEnv('The deployed L1 coinIssuer contract address'),
|
|
71
|
+
rewardDistributorAddress: addrEnv('The deployed L1 rewardDistributor contract address'),
|
|
72
|
+
governanceProposerAddress: addrEnv('The deployed L1 governanceProposer contract address'),
|
|
73
|
+
governanceAddress: addrEnv('The deployed L1 governance contract address'),
|
|
74
|
+
stakingAssetAddress: addrEnv('The deployed L1 staking asset contract address.'),
|
|
75
|
+
feeAssetHandlerAddress: addrEnv(
|
|
76
|
+
'The deployed L1 feeAssetHandler contract address',
|
|
77
|
+
'FEE_ASSET_HANDLER_CONTRACT_ADDRESS',
|
|
78
|
+
),
|
|
79
|
+
stakingAssetHandlerAddress: addrEnv('The deployed L1 stakingAssetHandler contract address'),
|
|
80
|
+
zkPassportVerifierAddress: addrEnv('The deployed L1 ZK passport verifier contract address'),
|
|
81
|
+
gseAddress: addrEnv('The deployed L1 GSE contract address'),
|
|
82
|
+
dateGatedRelayerAddress: addrEnv('The deployed L1 date-gated relayer contract address'),
|
|
109
83
|
};
|
|
84
|
+
|
|
85
|
+
/** Keys present in {@link l1ContractAddressesMapping}. */
|
|
86
|
+
export type L1ContractAddressMappingKey = keyof typeof l1ContractAddressesMapping;
|
|
87
|
+
|
|
88
|
+
type RequiredAddressShape = { [K in RequiredContractKey]: typeof schemas.EthAddress };
|
|
89
|
+
type OptionalAddressShape = { [K in OptionalContractKey]: ReturnType<typeof schemas.EthAddress.optional> };
|
|
90
|
+
|
|
91
|
+
export const L1ContractAddressesSchema = z.object({
|
|
92
|
+
...(Object.fromEntries(REQUIRED_L1_CONTRACT_ADDRESS_KEYS.map(k => [k, schemas.EthAddress])) as RequiredAddressShape),
|
|
93
|
+
...(Object.fromEntries(
|
|
94
|
+
OPTIONAL_L1_CONTRACT_ADDRESS_KEYS.map(k => [k, schemas.EthAddress.optional()]),
|
|
95
|
+
) as OptionalAddressShape),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Selects entries from {@link l1ContractAddressesMapping} so composed configs can reuse the same
|
|
100
|
+
* env vars, descriptions, and parsers without duplicating definitions.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const mappings = {
|
|
105
|
+
* ...pickL1ContractAddressMappings('rollupAddress'),
|
|
106
|
+
* nodeId: { ... },
|
|
107
|
+
* };
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export function pickL1ContractAddressMappings<const K extends readonly L1ContractAddressMappingKey[]>(
|
|
111
|
+
...keys: K
|
|
112
|
+
): Pick<typeof l1ContractAddressesMapping, K[number]> {
|
|
113
|
+
return Object.fromEntries(keys.map(key => [key, l1ContractAddressesMapping[key]] as const)) as Pick<
|
|
114
|
+
typeof l1ContractAddressesMapping,
|
|
115
|
+
K[number]
|
|
116
|
+
>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Like {@link pickL1ContractAddressMappings}, but returns a fragment of {@link L1ContractAddressesSchema}'s shape for
|
|
121
|
+
* spreading into `z.object({ ...pickL1ContractAddressesSchemaShape('rollupAddress'), localField: z... })`.
|
|
122
|
+
*/
|
|
123
|
+
export function pickL1ContractAddressesSchema<const K extends readonly L1ContractAddressMappingKey[]>(
|
|
124
|
+
...keys: K
|
|
125
|
+
): Pick<typeof L1ContractAddressesSchema.shape, K[number]> {
|
|
126
|
+
return Object.fromEntries(keys.map(key => [key, L1ContractAddressesSchema.shape[key]])) as Pick<
|
|
127
|
+
typeof L1ContractAddressesSchema.shape,
|
|
128
|
+
K[number]
|
|
129
|
+
>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Builds an {@link L1ContractAddresses} object from config that stores those fields at the top level. */
|
|
133
|
+
export function pickL1ContractAddresses<T extends L1ContractAddresses>(config: T): L1ContractAddresses {
|
|
134
|
+
const result: Partial<L1ContractAddresses> = {};
|
|
135
|
+
for (const key of REQUIRED_L1_CONTRACT_ADDRESS_KEYS) {
|
|
136
|
+
result[key] = config[key];
|
|
137
|
+
}
|
|
138
|
+
for (const key of OPTIONAL_L1_CONTRACT_ADDRESS_KEYS) {
|
|
139
|
+
const v = config[key];
|
|
140
|
+
if (v !== undefined) {
|
|
141
|
+
result[key] = v;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return result as L1ContractAddresses;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function randomL1ContractAddresses(includeOptional: boolean = false): L1ContractAddresses {
|
|
148
|
+
const keys = includeOptional ? [...L1ContractsNames, ...OPTIONAL_L1_CONTRACT_ADDRESS_KEYS] : L1ContractsNames;
|
|
149
|
+
return Object.fromEntries(keys.map(name => [name, EthAddress.random()])) as L1ContractAddresses;
|
|
150
|
+
}
|
package/src/l1_reader.ts
CHANGED
|
@@ -1,40 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type ConfigMappingsType,
|
|
3
|
+
getConfigFromMappings,
|
|
4
|
+
numberConfigHelper,
|
|
5
|
+
optionalNumberConfigHelper,
|
|
6
|
+
} from '@aztec/foundation/config';
|
|
2
7
|
|
|
3
8
|
import { type L1ContractAddresses, l1ContractAddressesMapping } from './l1_contract_addresses.js';
|
|
4
9
|
|
|
5
10
|
/** Configuration of the L1GlobalReader. */
|
|
6
|
-
export
|
|
7
|
-
/**
|
|
11
|
+
export type L1ReaderConfig = {
|
|
12
|
+
/** List of URLs of Ethereum RPC nodes that services will connect to (comma separated). */
|
|
8
13
|
l1RpcUrls: string[];
|
|
14
|
+
/** The RPC Url of the ethereum debug host for trace and debug methods. */
|
|
15
|
+
l1DebugRpcUrls: string[];
|
|
9
16
|
/** The chain ID of the ethereum host. */
|
|
10
17
|
l1ChainId: number;
|
|
11
|
-
/** The deployed l1 contract addresses */
|
|
12
|
-
l1Contracts: L1ContractAddresses;
|
|
13
18
|
/** The polling interval viem uses in ms */
|
|
14
19
|
viemPollingIntervalMS: number;
|
|
15
|
-
|
|
20
|
+
/** Timeout for HTTP requests to the L1 RPC node in ms. */
|
|
21
|
+
l1HttpTimeoutMS?: number;
|
|
22
|
+
} & L1ContractAddresses;
|
|
16
23
|
|
|
17
24
|
export const l1ReaderConfigMappings: ConfigMappingsType<L1ReaderConfig> = {
|
|
18
|
-
l1RpcUrls: {
|
|
19
|
-
env: 'ETHEREUM_HOSTS',
|
|
20
|
-
description: 'The RPC Url of the ethereum host.',
|
|
21
|
-
parseEnv: (val: string) => val.split(',').map(url => url.trim()),
|
|
22
|
-
},
|
|
23
25
|
l1ChainId: {
|
|
24
26
|
env: 'L1_CHAIN_ID',
|
|
25
|
-
|
|
26
|
-
defaultValue: 31337,
|
|
27
|
+
...optionalNumberConfigHelper(),
|
|
27
28
|
description: 'The chain ID of the ethereum host.',
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
l1RpcUrls: {
|
|
31
|
+
env: 'ETHEREUM_HOSTS',
|
|
32
|
+
description: 'List of URLs of Ethereum RPC nodes that services will connect to (comma separated).',
|
|
33
|
+
parseEnv: (val: string) => val.split(',').map(url => url.trim()),
|
|
34
|
+
defaultValue: [],
|
|
35
|
+
},
|
|
36
|
+
l1DebugRpcUrls: {
|
|
37
|
+
env: 'ETHEREUM_DEBUG_HOSTS',
|
|
38
|
+
description: 'The RPC Url of the ethereum debug host for trace and debug methods.',
|
|
39
|
+
parseEnv: (val: string) => val.split(',').map(url => url.trim()),
|
|
40
|
+
defaultValue: [],
|
|
32
41
|
},
|
|
33
42
|
viemPollingIntervalMS: {
|
|
34
43
|
env: 'L1_READER_VIEM_POLLING_INTERVAL_MS',
|
|
35
44
|
description: 'The polling interval viem uses in ms',
|
|
36
45
|
...numberConfigHelper(1_000),
|
|
37
46
|
},
|
|
47
|
+
l1HttpTimeoutMS: {
|
|
48
|
+
env: 'ETHEREUM_HTTP_TIMEOUT_MS',
|
|
49
|
+
description: 'Timeout for HTTP requests to the L1 RPC node in ms.',
|
|
50
|
+
...optionalNumberConfigHelper(),
|
|
51
|
+
},
|
|
52
|
+
...l1ContractAddressesMapping,
|
|
38
53
|
};
|
|
39
54
|
|
|
40
55
|
export function getL1ReaderConfigFromEnv(): L1ReaderConfig {
|