@aztec/aztec.js 0.0.0-test.1 → 0.0.1-commit.5daedc8
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/README.md +1 -1
- package/dest/account/account.d.ts +59 -0
- package/dest/account/account.d.ts.map +1 -0
- package/dest/account/account.js +59 -0
- package/dest/account/account_contract.d.ts +43 -0
- package/dest/account/account_contract.d.ts.map +1 -0
- package/dest/account/{contract.js → account_contract.js} +7 -4
- package/dest/account/account_with_secret_key.d.ts +24 -0
- package/dest/account/account_with_secret_key.d.ts.map +1 -0
- package/dest/{wallet/account_wallet_with_private_key.js → account/account_with_secret_key.js} +5 -5
- package/dest/account/index.d.ts +4 -8
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/index.js +2 -6
- package/dest/account/interface.d.ts +2 -14
- package/dest/account/interface.d.ts.map +1 -1
- package/dest/account/interface.js +1 -0
- package/dest/account/signerless_account.d.ts +23 -0
- package/dest/account/signerless_account.d.ts.map +1 -0
- package/dest/account/signerless_account.js +27 -0
- package/dest/api/abi.d.ts +3 -2
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/abi.js +1 -1
- package/dest/api/account.d.ts +7 -3
- package/dest/api/account.d.ts.map +1 -1
- package/dest/api/account.js +4 -1
- package/dest/api/addresses.d.ts +2 -1
- package/dest/api/addresses.d.ts.map +1 -1
- package/dest/api/addresses.js +1 -0
- package/dest/api/authorization.d.ts +5 -0
- package/dest/api/authorization.d.ts.map +1 -0
- package/dest/api/authorization.js +4 -0
- package/dest/api/block.d.ts +3 -0
- package/dest/api/block.d.ts.map +1 -0
- package/dest/api/block.js +2 -0
- package/dest/api/contract.d.ts +49 -0
- package/dest/api/contract.d.ts.map +1 -0
- package/dest/{contract/index.js → api/contract.js} +15 -11
- package/dest/api/crypto.d.ts +2 -0
- package/dest/api/crypto.d.ts.map +1 -0
- package/dest/api/crypto.js +1 -0
- package/dest/api/deployment.d.ts +5 -4
- package/dest/api/deployment.d.ts.map +1 -1
- package/dest/api/deployment.js +4 -3
- package/dest/api/eth_address.d.ts +1 -1
- package/dest/api/ethereum.d.ts +2 -0
- package/dest/api/ethereum.d.ts.map +1 -0
- package/dest/api/ethereum.js +1 -0
- package/dest/api/events.d.ts +12 -0
- package/dest/api/events.d.ts.map +1 -0
- package/dest/api/events.js +30 -0
- package/dest/api/fee.d.ts +2 -2
- package/dest/api/fee.d.ts.map +1 -1
- package/dest/api/fee.js +1 -1
- package/dest/api/fee_testing.d.ts +2 -0
- package/dest/api/fee_testing.d.ts.map +1 -0
- package/dest/api/fee_testing.js +1 -0
- package/dest/api/fields.d.ts +1 -1
- package/dest/api/keys.d.ts +4 -0
- package/dest/api/keys.d.ts.map +1 -0
- package/dest/api/keys.js +3 -0
- package/dest/api/log.d.ts +2 -1
- package/dest/api/log.d.ts.map +1 -1
- package/dest/api/log.js +1 -0
- package/dest/api/messaging.d.ts +3 -0
- package/dest/api/messaging.d.ts.map +1 -0
- package/dest/api/messaging.js +2 -0
- package/dest/api/node.d.ts +21 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +18 -0
- package/dest/api/note.d.ts +2 -0
- package/dest/api/note.d.ts.map +1 -0
- package/dest/api/note.js +1 -0
- package/dest/api/protocol.d.ts +3 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +2 -0
- package/dest/api/trees.d.ts +3 -0
- package/dest/api/trees.d.ts.map +1 -0
- package/dest/api/trees.js +2 -0
- package/dest/api/tx.d.ts +2 -0
- package/dest/api/tx.d.ts.map +1 -0
- package/dest/api/tx.js +1 -0
- package/dest/api/utils.d.ts +13 -0
- package/dest/api/utils.d.ts.map +1 -0
- package/dest/api/utils.js +12 -0
- package/dest/api/wallet.d.ts +4 -2
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +3 -1
- package/dest/authorization/call_authorization_request.d.ts +46 -0
- package/dest/authorization/call_authorization_request.d.ts.map +1 -0
- package/dest/authorization/call_authorization_request.js +49 -0
- package/dest/contract/base_contract_interaction.d.ts +16 -80
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +15 -128
- package/dest/contract/batch_call.d.ts +19 -21
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +86 -68
- package/dest/contract/checker.d.ts +2 -2
- package/dest/contract/checker.d.ts.map +1 -1
- package/dest/contract/checker.js +2 -2
- package/dest/contract/contract.d.ts +9 -8
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract.js +10 -20
- package/dest/contract/contract_base.d.ts +7 -20
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +7 -14
- package/dest/contract/contract_function_interaction.d.ts +53 -45
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +78 -74
- package/dest/contract/deploy_method.d.ts +106 -60
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +125 -133
- package/dest/contract/deploy_sent_tx.d.ts +14 -11
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.js +18 -15
- package/dest/contract/get_gas_limits.d.ts +6 -7
- package/dest/contract/get_gas_limits.d.ts.map +1 -1
- package/dest/contract/get_gas_limits.js +9 -3
- package/dest/contract/interaction_options.d.ts +114 -0
- package/dest/contract/interaction_options.d.ts.map +1 -0
- package/dest/contract/interaction_options.js +46 -0
- package/dest/contract/protocol_contracts.d.ts +7 -7
- package/dest/contract/protocol_contracts.d.ts.map +1 -1
- package/dest/contract/protocol_contracts.js +7 -7
- package/dest/contract/sent_tx.d.ts +9 -19
- package/dest/contract/sent_tx.d.ts.map +1 -1
- package/dest/contract/sent_tx.js +31 -43
- package/dest/contract/unsafe_contract.d.ts +2 -2
- package/dest/contract/unsafe_contract.d.ts.map +1 -1
- package/dest/contract/unsafe_contract.js +1 -1
- package/dest/contract/wait_for_proven.d.ts +17 -0
- package/dest/contract/wait_for_proven.d.ts.map +1 -0
- package/dest/contract/wait_for_proven.js +17 -0
- package/dest/deployment/broadcast_function.d.ts +4 -4
- package/dest/deployment/broadcast_function.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.js +27 -23
- package/dest/deployment/contract_deployer.d.ts +2 -2
- package/dest/deployment/contract_deployer.d.ts.map +1 -1
- package/dest/deployment/contract_deployer.js +1 -1
- package/dest/deployment/publish_class.d.ts +6 -0
- package/dest/deployment/publish_class.d.ts.map +1 -0
- package/dest/deployment/publish_class.js +17 -0
- package/dest/deployment/publish_instance.d.ts +10 -0
- package/dest/deployment/publish_instance.d.ts.map +1 -0
- package/dest/deployment/publish_instance.js +11 -0
- package/dest/ethereum/portal_manager.d.ts +138 -0
- package/dest/ethereum/portal_manager.d.ts.map +1 -0
- package/dest/{api/ethereum → ethereum}/portal_manager.js +136 -76
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +17 -12
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.js +26 -16
- package/dest/fee/fee_payment_method.d.ts +12 -8
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.d.ts +26 -9
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.js +44 -22
- package/dest/fee/public_fee_payment_method.d.ts +27 -10
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +46 -24
- package/dest/fee/sponsored_fee_payment.d.ts +17 -0
- package/dest/fee/sponsored_fee_payment.d.ts.map +1 -0
- package/dest/fee/sponsored_fee_payment.js +34 -0
- package/dest/utils/abi_types.d.ts +1 -3
- package/dest/utils/abi_types.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +82 -25
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +237 -40
- package/dest/utils/cross_chain.d.ts +24 -0
- package/dest/utils/cross_chain.d.ts.map +1 -0
- package/dest/utils/cross_chain.js +30 -0
- package/dest/utils/fee_juice.d.ts +4 -3
- package/dest/utils/fee_juice.d.ts.map +1 -1
- package/dest/utils/fee_juice.js +3 -2
- package/dest/utils/field_compressed_string.d.ts +1 -1
- package/dest/utils/field_compressed_string.d.ts.map +1 -1
- package/dest/utils/node.d.ts +2 -2
- package/dest/utils/node.d.ts.map +1 -1
- package/dest/utils/node.js +1 -1
- package/dest/utils/pub_key.d.ts +1 -1
- package/dest/utils/pub_key.d.ts.map +1 -1
- package/dest/utils/pub_key.js +1 -2
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +34 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.js +76 -0
- package/dest/wallet/account_manager.d.ts +66 -0
- package/dest/wallet/account_manager.d.ts.map +1 -0
- package/dest/wallet/account_manager.js +113 -0
- package/dest/wallet/deploy_account_method.d.ts +52 -0
- package/dest/wallet/deploy_account_method.d.ts.map +1 -0
- package/dest/wallet/deploy_account_method.js +77 -0
- package/dest/wallet/index.d.ts +3 -17
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/index.js +2 -20
- package/dest/wallet/wallet.d.ts +1965 -0
- package/dest/wallet/wallet.d.ts.map +1 -0
- package/dest/wallet/wallet.js +186 -0
- package/package.json +44 -35
- package/src/account/account.ts +96 -0
- package/src/account/{contract.ts → account_contract.ts} +24 -13
- package/src/{wallet/account_wallet_with_private_key.ts → account/account_with_secret_key.ts} +6 -8
- package/src/account/index.ts +3 -7
- package/src/account/interface.ts +1 -12
- package/src/account/signerless_account.ts +45 -0
- package/src/api/abi.ts +26 -0
- package/src/api/account.ts +6 -9
- package/src/api/addresses.ts +1 -0
- package/src/api/authorization.ts +14 -0
- package/src/api/block.ts +2 -0
- package/src/{contract/index.ts → api/contract.ts} +39 -14
- package/src/api/crypto.ts +1 -0
- package/src/api/deployment.ts +4 -3
- package/src/api/ethereum.ts +10 -0
- package/src/api/events.ts +44 -0
- package/src/api/fee.ts +1 -1
- package/src/api/fee_testing.ts +1 -0
- package/src/api/keys.ts +8 -0
- package/src/api/log.ts +1 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +20 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +2 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +13 -0
- package/src/api/utils.ts +14 -0
- package/src/api/wallet.ts +27 -5
- package/src/authorization/call_authorization_request.ts +63 -0
- package/src/contract/base_contract_interaction.ts +23 -166
- package/src/contract/batch_call.ts +106 -57
- package/src/contract/checker.ts +8 -3
- package/src/contract/contract.ts +14 -21
- package/src/contract/contract_base.ts +9 -26
- package/src/contract/contract_function_interaction.ts +135 -106
- package/src/contract/deploy_method.ts +205 -134
- package/src/contract/deploy_sent_tx.ts +24 -23
- package/src/contract/get_gas_limits.ts +15 -8
- package/src/contract/interaction_options.ts +163 -0
- package/src/contract/protocol_contracts.ts +10 -10
- package/src/contract/sent_tx.ts +41 -52
- package/src/contract/unsafe_contract.ts +2 -2
- package/src/contract/wait_for_proven.ts +38 -0
- package/src/deployment/broadcast_function.ts +57 -57
- package/src/deployment/contract_deployer.ts +4 -3
- package/src/deployment/publish_class.ts +34 -0
- package/src/deployment/publish_instance.ts +26 -0
- package/src/{api/ethereum → ethereum}/portal_manager.ts +164 -83
- package/src/fee/fee_juice_payment_method_with_claim.ts +48 -33
- package/src/fee/fee_payment_method.ts +11 -7
- package/src/fee/private_fee_payment_method.ts +79 -57
- package/src/fee/public_fee_payment_method.ts +93 -67
- package/src/fee/sponsored_fee_payment.ts +46 -0
- package/src/utils/authwit.ts +261 -53
- package/src/utils/cross_chain.ts +53 -0
- package/src/utils/fee_juice.ts +4 -4
- package/src/utils/node.ts +1 -1
- package/src/utils/pub_key.ts +1 -2
- package/src/wallet/account_entrypoint_meta_payment_method.ts +106 -0
- package/src/wallet/account_manager.ts +154 -0
- package/src/wallet/deploy_account_method.ts +126 -0
- package/src/wallet/index.ts +2 -33
- package/src/wallet/wallet.ts +318 -0
- package/dest/account/contract.d.ts +0 -37
- package/dest/account/contract.d.ts.map +0 -1
- package/dest/account/wallet.d.ts +0 -11
- package/dest/account/wallet.d.ts.map +0 -1
- package/dest/account/wallet.js +0 -3
- package/dest/account_manager/deploy_account_method.d.ts +0 -15
- package/dest/account_manager/deploy_account_method.d.ts.map +0 -1
- package/dest/account_manager/deploy_account_method.js +0 -43
- package/dest/account_manager/deploy_account_sent_tx.d.ts +0 -30
- package/dest/account_manager/deploy_account_sent_tx.d.ts.map +0 -1
- package/dest/account_manager/deploy_account_sent_tx.js +0 -29
- package/dest/account_manager/index.d.ts +0 -108
- package/dest/account_manager/index.d.ts.map +0 -1
- package/dest/account_manager/index.js +0 -159
- package/dest/api/cheat_codes.d.ts +0 -26
- package/dest/api/cheat_codes.d.ts.map +0 -1
- package/dest/api/cheat_codes.js +0 -25
- package/dest/api/entrypoint.d.ts +0 -2
- package/dest/api/entrypoint.d.ts.map +0 -1
- package/dest/api/entrypoint.js +0 -1
- package/dest/api/ethereum/anvil_test_watcher.d.ts +0 -32
- package/dest/api/ethereum/anvil_test_watcher.d.ts.map +0 -1
- package/dest/api/ethereum/anvil_test_watcher.js +0 -133
- package/dest/api/ethereum/chain_monitor.d.ts +0 -25
- package/dest/api/ethereum/chain_monitor.d.ts.map +0 -1
- package/dest/api/ethereum/chain_monitor.js +0 -74
- package/dest/api/ethereum/cheat_codes.d.ts +0 -63
- package/dest/api/ethereum/cheat_codes.d.ts.map +0 -1
- package/dest/api/ethereum/cheat_codes.js +0 -162
- package/dest/api/ethereum/index.d.ts +0 -7
- package/dest/api/ethereum/index.d.ts.map +0 -1
- package/dest/api/ethereum/index.js +0 -6
- package/dest/api/ethereum/l1_contracts.d.ts +0 -3
- package/dest/api/ethereum/l1_contracts.d.ts.map +0 -1
- package/dest/api/ethereum/l1_contracts.js +0 -13
- package/dest/api/ethereum/portal_manager.d.ts +0 -136
- package/dest/api/ethereum/portal_manager.d.ts.map +0 -1
- package/dest/api/interfaces/pxe.d.ts +0 -2
- package/dest/api/interfaces/pxe.d.ts.map +0 -1
- package/dest/api/interfaces/pxe.js +0 -1
- package/dest/api/log_id.d.ts +0 -2
- package/dest/api/log_id.d.ts.map +0 -1
- package/dest/api/log_id.js +0 -1
- package/dest/api/tx_hash.d.ts +0 -2
- package/dest/api/tx_hash.d.ts.map +0 -1
- package/dest/api/tx_hash.js +0 -1
- package/dest/contract/deploy_proven_tx.d.ts +0 -21
- package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
- package/dest/contract/deploy_proven_tx.js +0 -19
- package/dest/contract/index.d.ts +0 -45
- package/dest/contract/index.d.ts.map +0 -1
- package/dest/contract/proven_tx.d.ts +0 -17
- package/dest/contract/proven_tx.d.ts.map +0 -1
- package/dest/contract/proven_tx.js +0 -22
- package/dest/deployment/deploy_instance.d.ts +0 -10
- package/dest/deployment/deploy_instance.d.ts.map +0 -1
- package/dest/deployment/deploy_instance.js +0 -14
- package/dest/deployment/index.d.ts +0 -2
- package/dest/deployment/index.d.ts.map +0 -1
- package/dest/deployment/index.js +0 -1
- package/dest/deployment/register_class.d.ts +0 -6
- package/dest/deployment/register_class.d.ts.map +0 -1
- package/dest/deployment/register_class.js +0 -22
- package/dest/entrypoint/default_entrypoint.d.ts +0 -12
- package/dest/entrypoint/default_entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/default_entrypoint.js +0 -28
- package/dest/entrypoint/default_multi_call_entrypoint.d.ts +0 -15
- package/dest/entrypoint/default_multi_call_entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/default_multi_call_entrypoint.js +0 -130
- package/dest/entrypoint/entrypoint.d.ts +0 -35
- package/dest/entrypoint/entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/entrypoint.js +0 -4
- package/dest/entrypoint/payload.d.ts +0 -128
- package/dest/entrypoint/payload.d.ts.map +0 -1
- package/dest/entrypoint/payload.js +0 -143
- package/dest/fee/fee_juice_payment_method.d.ts +0 -14
- package/dest/fee/fee_juice_payment_method.d.ts.map +0 -1
- package/dest/fee/fee_juice_payment_method.js +0 -20
- package/dest/index.d.ts +0 -66
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -69
- package/dest/rpc_clients/index.d.ts +0 -3
- package/dest/rpc_clients/index.d.ts.map +0 -1
- package/dest/rpc_clients/index.js +0 -2
- package/dest/rpc_clients/node/index.d.ts +0 -12
- package/dest/rpc_clients/node/index.d.ts.map +0 -1
- package/dest/rpc_clients/node/index.js +0 -78
- package/dest/rpc_clients/pxe_client.d.ts +0 -10
- package/dest/rpc_clients/pxe_client.d.ts.map +0 -1
- package/dest/rpc_clients/pxe_client.js +0 -23
- package/dest/utils/aztec_cheatcodes.d.ts +0 -59
- package/dest/utils/aztec_cheatcodes.d.ts.map +0 -1
- package/dest/utils/aztec_cheatcodes.js +0 -62
- package/dest/utils/index.d.ts +0 -8
- package/dest/utils/index.d.ts.map +0 -1
- package/dest/utils/index.js +0 -6
- package/dest/utils/pxe.d.ts +0 -4
- package/dest/utils/pxe.d.ts.map +0 -1
- package/dest/utils/pxe.js +0 -14
- package/dest/wallet/account_wallet.d.ts +0 -76
- package/dest/wallet/account_wallet.d.ts.map +0 -1
- package/dest/wallet/account_wallet.js +0 -231
- package/dest/wallet/account_wallet_with_private_key.d.ts +0 -26
- package/dest/wallet/account_wallet_with_private_key.d.ts.map +0 -1
- package/dest/wallet/base_wallet.d.ts +0 -73
- package/dest/wallet/base_wallet.d.ts.map +0 -1
- package/dest/wallet/base_wallet.js +0 -123
- package/dest/wallet/signerless_wallet.d.ts +0 -25
- package/dest/wallet/signerless_wallet.d.ts.map +0 -1
- package/dest/wallet/signerless_wallet.js +0 -36
- package/src/account/wallet.ts +0 -13
- package/src/account_manager/deploy_account_method.ts +0 -86
- package/src/account_manager/deploy_account_sent_tx.ts +0 -42
- package/src/account_manager/index.ts +0 -229
- package/src/api/cheat_codes.ts +0 -35
- package/src/api/entrypoint.ts +0 -1
- package/src/api/ethereum/anvil_test_watcher.ts +0 -158
- package/src/api/ethereum/chain_monitor.ts +0 -88
- package/src/api/ethereum/cheat_codes.ts +0 -184
- package/src/api/ethereum/index.ts +0 -19
- package/src/api/ethereum/l1_contracts.ts +0 -21
- package/src/api/interfaces/pxe.ts +0 -1
- package/src/api/log_id.ts +0 -1
- package/src/api/tx_hash.ts +0 -1
- package/src/contract/deploy_proven_tx.ts +0 -34
- package/src/contract/proven_tx.ts +0 -42
- package/src/deployment/deploy_instance.ts +0 -31
- package/src/deployment/index.ts +0 -1
- package/src/deployment/register_class.ts +0 -44
- package/src/entrypoint/default_entrypoint.ts +0 -39
- package/src/entrypoint/default_multi_call_entrypoint.ts +0 -93
- package/src/entrypoint/entrypoint.ts +0 -39
- package/src/entrypoint/payload.ts +0 -238
- package/src/fee/fee_juice_payment_method.ts +0 -26
- package/src/index.ts +0 -106
- package/src/rpc_clients/index.ts +0 -2
- package/src/rpc_clients/node/index.ts +0 -77
- package/src/rpc_clients/pxe_client.ts +0 -25
- package/src/utils/aztec_cheatcodes.ts +0 -77
- package/src/utils/index.ts +0 -21
- package/src/utils/pxe.ts +0 -17
- package/src/wallet/account_wallet.ts +0 -242
- package/src/wallet/base_wallet.ts +0 -198
- package/src/wallet/signerless_wallet.ts +0 -52
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
-
/** Utility class that polls the chain on quick intervals and logs new L1 blocks, L2 blocks, and L2 proofs. */
|
|
3
|
-
export declare class ChainMonitor {
|
|
4
|
-
private readonly rollup;
|
|
5
|
-
private logger;
|
|
6
|
-
private readonly intervalMs;
|
|
7
|
-
private readonly l1Client;
|
|
8
|
-
private handle;
|
|
9
|
-
/** Current L1 block number */
|
|
10
|
-
l1BlockNumber: number;
|
|
11
|
-
/** Current L2 block number */
|
|
12
|
-
l2BlockNumber: number;
|
|
13
|
-
/** Current L2 proven block number */
|
|
14
|
-
l2ProvenBlockNumber: number;
|
|
15
|
-
/** L1 timestamp for the current L2 block */
|
|
16
|
-
l2BlockTimestamp: bigint;
|
|
17
|
-
/** L1 timestamp for the proven L2 block */
|
|
18
|
-
l2ProvenBlockTimestamp: bigint;
|
|
19
|
-
constructor(rollup: RollupContract, logger?: import("@aztec/foundation/log").Logger, intervalMs?: number);
|
|
20
|
-
start(): this;
|
|
21
|
-
stop(): void;
|
|
22
|
-
private safeRun;
|
|
23
|
-
run(): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=chain_monitor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain_monitor.d.ts","sourceRoot":"","sources":["../../../src/api/ethereum/chain_monitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE,8GAA8G;AAC9G,qBAAa,YAAY;IAgBrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU;IAjB7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IACxC,OAAO,CAAC,MAAM,CAA6B;IAE3C,8BAA8B;IACvB,aAAa,EAAG,MAAM,CAAC;IAC9B,8BAA8B;IACvB,aAAa,EAAG,MAAM,CAAC;IAC9B,qCAAqC;IAC9B,mBAAmB,EAAG,MAAM,CAAC;IACpC,4CAA4C;IACrC,gBAAgB,EAAG,MAAM,CAAC;IACjC,2CAA2C;IACpC,sBAAsB,EAAG,MAAM,CAAC;gBAGpB,MAAM,EAAE,cAAc,EAC/B,MAAM,yCAA8C,EAC3C,UAAU,SAAM;IAKnC,KAAK;IAQL,IAAI;IAOJ,OAAO,CAAC,OAAO;IAMT,GAAG;CAqCV"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
/** Utility class that polls the chain on quick intervals and logs new L1 blocks, L2 blocks, and L2 proofs. */ export class ChainMonitor {
|
|
3
|
-
rollup;
|
|
4
|
-
logger;
|
|
5
|
-
intervalMs;
|
|
6
|
-
l1Client;
|
|
7
|
-
handle;
|
|
8
|
-
/** Current L1 block number */ l1BlockNumber;
|
|
9
|
-
/** Current L2 block number */ l2BlockNumber;
|
|
10
|
-
/** Current L2 proven block number */ l2ProvenBlockNumber;
|
|
11
|
-
/** L1 timestamp for the current L2 block */ l2BlockTimestamp;
|
|
12
|
-
/** L1 timestamp for the proven L2 block */ l2ProvenBlockTimestamp;
|
|
13
|
-
constructor(rollup, logger = createLogger('aztecjs:utils:chain_monitor'), intervalMs = 200){
|
|
14
|
-
this.rollup = rollup;
|
|
15
|
-
this.logger = logger;
|
|
16
|
-
this.intervalMs = intervalMs;
|
|
17
|
-
this.l1Client = rollup.client;
|
|
18
|
-
}
|
|
19
|
-
start() {
|
|
20
|
-
if (this.handle) {
|
|
21
|
-
throw new Error('Chain monitor already started');
|
|
22
|
-
}
|
|
23
|
-
this.handle = setInterval(this.safeRun.bind(this), this.intervalMs);
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
stop() {
|
|
27
|
-
if (this.handle) {
|
|
28
|
-
clearInterval(this.handle);
|
|
29
|
-
this.handle = undefined;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
safeRun() {
|
|
33
|
-
void this.run().catch((error)=>{
|
|
34
|
-
this.logger.error('Error in chain monitor loop', error);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
async run() {
|
|
38
|
-
const newL1BlockNumber = Number(await this.l1Client.getBlockNumber({
|
|
39
|
-
cacheTime: 0
|
|
40
|
-
}));
|
|
41
|
-
if (this.l1BlockNumber === newL1BlockNumber) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.l1BlockNumber = newL1BlockNumber;
|
|
45
|
-
const block = await this.l1Client.getBlock({
|
|
46
|
-
blockNumber: BigInt(newL1BlockNumber),
|
|
47
|
-
includeTransactions: false
|
|
48
|
-
});
|
|
49
|
-
const timestamp = block.timestamp;
|
|
50
|
-
const timestampString = new Date(Number(timestamp) * 1000).toTimeString().split(' ')[0];
|
|
51
|
-
let msg = `L1 block ${newL1BlockNumber} mined at ${timestampString}`;
|
|
52
|
-
const newL2BlockNumber = Number(await this.rollup.getBlockNumber());
|
|
53
|
-
if (this.l2BlockNumber !== newL2BlockNumber) {
|
|
54
|
-
const epochNumber = await this.rollup.getEpochNumber(BigInt(newL2BlockNumber));
|
|
55
|
-
msg += ` with new L2 block ${newL2BlockNumber} for epoch ${epochNumber}`;
|
|
56
|
-
this.l2BlockNumber = newL2BlockNumber;
|
|
57
|
-
this.l2BlockTimestamp = timestamp;
|
|
58
|
-
}
|
|
59
|
-
const newL2ProvenBlockNumber = Number(await this.rollup.getProvenBlockNumber());
|
|
60
|
-
if (this.l2ProvenBlockNumber !== newL2ProvenBlockNumber) {
|
|
61
|
-
const epochNumber = await this.rollup.getEpochNumber(BigInt(newL2ProvenBlockNumber));
|
|
62
|
-
msg += ` with proof up to L2 block ${newL2ProvenBlockNumber} for epoch ${epochNumber}`;
|
|
63
|
-
this.l2ProvenBlockNumber = newL2ProvenBlockNumber;
|
|
64
|
-
this.l2ProvenBlockTimestamp = timestamp;
|
|
65
|
-
}
|
|
66
|
-
this.logger.info(msg, {
|
|
67
|
-
l1Timestamp: timestamp,
|
|
68
|
-
l1BlockNumber: this.l1BlockNumber,
|
|
69
|
-
l2SlotNumber: await this.rollup.getSlotNumber(),
|
|
70
|
-
l2BlockNumber: this.l2BlockNumber,
|
|
71
|
-
l2ProvenBlockNumber: this.l2ProvenBlockNumber
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { ViemPublicClient } from '@aztec/ethereum';
|
|
2
|
-
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
3
|
-
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
4
|
-
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
5
|
-
import { type GetContractReturnType, type Hex } from 'viem';
|
|
6
|
-
export { EthCheatCodes };
|
|
7
|
-
/** Cheat codes for the L1 rollup contract. */
|
|
8
|
-
export declare class RollupCheatCodes {
|
|
9
|
-
private ethCheatCodes;
|
|
10
|
-
private client;
|
|
11
|
-
private rollup;
|
|
12
|
-
private logger;
|
|
13
|
-
constructor(ethCheatCodes: EthCheatCodes, addresses: Pick<L1ContractAddresses, 'rollupAddress'>);
|
|
14
|
-
/** Returns the current slot */
|
|
15
|
-
getSlot(): Promise<bigint>;
|
|
16
|
-
/** Returns the current epoch */
|
|
17
|
-
getEpoch(): Promise<bigint>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the pending and proven chain tips
|
|
20
|
-
* @returns The pending and proven chain tips
|
|
21
|
-
*/
|
|
22
|
-
getTips(): Promise<{
|
|
23
|
-
/** The pending chain tip */ pending: bigint;
|
|
24
|
-
/** The proven chain tip */ proven: bigint;
|
|
25
|
-
}>;
|
|
26
|
-
/** Fetches the epoch and slot duration config from the rollup contract */
|
|
27
|
-
getConfig(): Promise<{
|
|
28
|
-
/** Epoch duration */ epochDuration: bigint;
|
|
29
|
-
/** Slot duration */ slotDuration: bigint;
|
|
30
|
-
}>;
|
|
31
|
-
/** Warps time in L1 until the next epoch */
|
|
32
|
-
advanceToNextEpoch(): Promise<void>;
|
|
33
|
-
/** Warps time in L1 until the beginning of the next slot. */
|
|
34
|
-
advanceToNextSlot(): Promise<bigint[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Warps time in L1 equivalent to however many slots.
|
|
37
|
-
* @param howMany - The number of slots to advance.
|
|
38
|
-
*/
|
|
39
|
-
advanceSlots(howMany: number): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Marks the specified block (or latest if none) as proven
|
|
42
|
-
* @param maybeBlockNumber - The block number to mark as proven (defaults to latest pending)
|
|
43
|
-
*/
|
|
44
|
-
markAsProven(maybeBlockNumber?: number | bigint): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Executes an action impersonated as the owner of the Rollup contract.
|
|
47
|
-
* @param action - The action to execute
|
|
48
|
-
*/
|
|
49
|
-
asOwner(action: (owner: Hex, rollup: GetContractReturnType<typeof RollupAbi, ViemPublicClient>) => Promise<void>): Promise<void>;
|
|
50
|
-
/** Directly calls the L1 gas fee oracle. */
|
|
51
|
-
updateL1GasFeeOracle(): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Bumps proving cost per mana.
|
|
54
|
-
* @param bumper - Callback to calculate the new proving cost per mana based on current value.
|
|
55
|
-
*/
|
|
56
|
-
bumpProvingCostPerMana(bumper: (before: bigint) => bigint): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Directly updates proving cost per mana.
|
|
59
|
-
* @param ethValue - The new proving cost per mana in ETH
|
|
60
|
-
*/
|
|
61
|
-
setProvingCostPerMana(ethValue: bigint): Promise<void>;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=cheat_codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../../src/api/ethereum/cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAA8D,MAAM,MAAM,CAAC;AAGxH,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,8CAA8C;AAC9C,qBAAa,gBAAgB;IAMf,OAAO,CAAC,aAAa;IALjC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAA4D;IAE1E,OAAO,CAAC,MAAM,CAAuC;gBAEjC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAYvG,+BAA+B;IAClB,OAAO;IAKpB,gCAAgC;IACnB,QAAQ;IAKrB;;;OAGG;IACU,OAAO,IAAI,OAAO,CAAC;QAC9B,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;QAC7C,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC;KAC5C,CAAC;IAQF,0EAA0E;IAC7D,SAAS,IAAI,OAAO,CAAC;QAChC,qBAAqB,CAAC,aAAa,EAAE,MAAM,CAAC;QAC5C,oBAAoB,CAAC,YAAY,EAAE,MAAM,CAAC;KAC3C,CAAC;IAQF,4CAA4C;IAC/B,kBAAkB;IAU/B,6DAA6D;IAChD,iBAAiB;IAQ9B;;;OAGG;IACU,YAAY,CAAC,OAAO,EAAE,MAAM;IASzC;;;OAGG;IACU,YAAY,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;IAiC5D;;;OAGG;IACU,OAAO,CAClB,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,qBAAqB,CAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;IAQ1G,4CAA4C;IAC/B,oBAAoB;IAQjC;;;OAGG;IACU,sBAAsB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IAMtE;;;OAGG;IACU,qBAAqB,CAAC,QAAQ,EAAE,MAAM;CAOpD"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
|
|
2
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
5
|
-
import { createPublicClient, fallback, getContract, http, keccak256 } from 'viem';
|
|
6
|
-
import { foundry } from 'viem/chains';
|
|
7
|
-
export { EthCheatCodes };
|
|
8
|
-
/** Cheat codes for the L1 rollup contract. */ export class RollupCheatCodes {
|
|
9
|
-
ethCheatCodes;
|
|
10
|
-
client;
|
|
11
|
-
rollup;
|
|
12
|
-
logger;
|
|
13
|
-
constructor(ethCheatCodes, addresses){
|
|
14
|
-
this.ethCheatCodes = ethCheatCodes;
|
|
15
|
-
this.logger = createLogger('aztecjs:cheat_codes');
|
|
16
|
-
this.client = createPublicClient({
|
|
17
|
-
chain: foundry,
|
|
18
|
-
transport: fallback(ethCheatCodes.rpcUrls.map((url)=>http(url)))
|
|
19
|
-
});
|
|
20
|
-
this.rollup = getContract({
|
|
21
|
-
abi: RollupAbi,
|
|
22
|
-
address: addresses.rollupAddress.toString(),
|
|
23
|
-
client: this.client
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/** Returns the current slot */ async getSlot() {
|
|
27
|
-
const ts = BigInt((await this.client.getBlock()).timestamp);
|
|
28
|
-
return await this.rollup.read.getSlotAt([
|
|
29
|
-
ts
|
|
30
|
-
]);
|
|
31
|
-
}
|
|
32
|
-
/** Returns the current epoch */ async getEpoch() {
|
|
33
|
-
const slotNumber = await this.getSlot();
|
|
34
|
-
return await this.rollup.read.getEpochAtSlot([
|
|
35
|
-
slotNumber
|
|
36
|
-
]);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Returns the pending and proven chain tips
|
|
40
|
-
* @returns The pending and proven chain tips
|
|
41
|
-
*/ async getTips() {
|
|
42
|
-
const res = await this.rollup.read.getTips();
|
|
43
|
-
return {
|
|
44
|
-
pending: res.pendingBlockNumber,
|
|
45
|
-
proven: res.provenBlockNumber
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/** Fetches the epoch and slot duration config from the rollup contract */ async getConfig() {
|
|
49
|
-
const [epochDuration, slotDuration] = await Promise.all([
|
|
50
|
-
this.rollup.read.getEpochDuration(),
|
|
51
|
-
this.rollup.read.getSlotDuration()
|
|
52
|
-
]);
|
|
53
|
-
return {
|
|
54
|
-
epochDuration,
|
|
55
|
-
slotDuration
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/** Warps time in L1 until the next epoch */ async advanceToNextEpoch() {
|
|
59
|
-
const slot = await this.getSlot();
|
|
60
|
-
const { epochDuration, slotDuration } = await this.getConfig();
|
|
61
|
-
const slotsUntilNextEpoch = epochDuration - slot % epochDuration + 1n;
|
|
62
|
-
const timeToNextEpoch = slotsUntilNextEpoch * slotDuration;
|
|
63
|
-
const l1Timestamp = BigInt((await this.client.getBlock()).timestamp);
|
|
64
|
-
await this.ethCheatCodes.warp(Number(l1Timestamp + timeToNextEpoch), true);
|
|
65
|
-
this.logger.warn(`Advanced to next epoch`);
|
|
66
|
-
}
|
|
67
|
-
/** Warps time in L1 until the beginning of the next slot. */ async advanceToNextSlot() {
|
|
68
|
-
const currentSlot = await this.getSlot();
|
|
69
|
-
const timestamp = await this.rollup.read.getTimestampForSlot([
|
|
70
|
-
currentSlot + 1n
|
|
71
|
-
]);
|
|
72
|
-
await this.ethCheatCodes.warp(Number(timestamp));
|
|
73
|
-
this.logger.warn(`Advanced to slot ${currentSlot + 1n}`);
|
|
74
|
-
return [
|
|
75
|
-
timestamp,
|
|
76
|
-
currentSlot + 1n
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Warps time in L1 equivalent to however many slots.
|
|
81
|
-
* @param howMany - The number of slots to advance.
|
|
82
|
-
*/ async advanceSlots(howMany) {
|
|
83
|
-
const l1Timestamp = (await this.client.getBlock()).timestamp;
|
|
84
|
-
const slotDuration = await this.rollup.read.getSlotDuration();
|
|
85
|
-
const timeToWarp = BigInt(howMany) * slotDuration;
|
|
86
|
-
await this.ethCheatCodes.warp(l1Timestamp + timeToWarp, true);
|
|
87
|
-
const [slot, epoch] = await Promise.all([
|
|
88
|
-
this.getSlot(),
|
|
89
|
-
this.getEpoch()
|
|
90
|
-
]);
|
|
91
|
-
this.logger.warn(`Advanced ${howMany} slots up to slot ${slot} in epoch ${epoch}`);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Marks the specified block (or latest if none) as proven
|
|
95
|
-
* @param maybeBlockNumber - The block number to mark as proven (defaults to latest pending)
|
|
96
|
-
*/ async markAsProven(maybeBlockNumber) {
|
|
97
|
-
const { pending, proven } = await this.getTips();
|
|
98
|
-
let blockNumber = maybeBlockNumber;
|
|
99
|
-
if (blockNumber === undefined || blockNumber > pending) {
|
|
100
|
-
blockNumber = pending;
|
|
101
|
-
}
|
|
102
|
-
if (blockNumber <= proven) {
|
|
103
|
-
this.logger.warn(`Block ${blockNumber} is already proven`);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
// @note @LHerskind this is heavily dependent on the storage layout and size of values
|
|
107
|
-
// The rollupStore is a struct and if the size of elements or the struct changes, this can break
|
|
108
|
-
// Convert string to bytes and then compute keccak256
|
|
109
|
-
const storageSlot = keccak256(Buffer.from('aztec.stf.storage', 'utf-8'));
|
|
110
|
-
const provenBlockNumberSlot = BigInt(storageSlot) + 1n;
|
|
111
|
-
const tipsBefore = await this.getTips();
|
|
112
|
-
await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provenBlockNumberSlot, BigInt(blockNumber));
|
|
113
|
-
const tipsAfter = await this.getTips();
|
|
114
|
-
this.logger.info(`Proven tip moved: ${tipsBefore.proven} -> ${tipsAfter.proven}. Pending tip: ${tipsAfter.pending}.`);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Executes an action impersonated as the owner of the Rollup contract.
|
|
118
|
-
* @param action - The action to execute
|
|
119
|
-
*/ async asOwner(action) {
|
|
120
|
-
const owner = await this.rollup.read.owner();
|
|
121
|
-
await this.ethCheatCodes.startImpersonating(owner);
|
|
122
|
-
await action(owner, this.rollup);
|
|
123
|
-
await this.ethCheatCodes.stopImpersonating(owner);
|
|
124
|
-
}
|
|
125
|
-
/** Directly calls the L1 gas fee oracle. */ async updateL1GasFeeOracle() {
|
|
126
|
-
await this.asOwner(async (account, rollup)=>{
|
|
127
|
-
const hash = await rollup.write.updateL1GasFeeOracle({
|
|
128
|
-
account,
|
|
129
|
-
chain: this.client.chain
|
|
130
|
-
});
|
|
131
|
-
await this.client.waitForTransactionReceipt({
|
|
132
|
-
hash
|
|
133
|
-
});
|
|
134
|
-
this.logger.warn(`Updated L1 gas fee oracle`);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Bumps proving cost per mana.
|
|
139
|
-
* @param bumper - Callback to calculate the new proving cost per mana based on current value.
|
|
140
|
-
*/ async bumpProvingCostPerMana(bumper) {
|
|
141
|
-
const currentCost = await this.rollup.read.getProvingCostPerManaInEth();
|
|
142
|
-
const newCost = bumper(currentCost);
|
|
143
|
-
await this.setProvingCostPerMana(newCost);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Directly updates proving cost per mana.
|
|
147
|
-
* @param ethValue - The new proving cost per mana in ETH
|
|
148
|
-
*/ async setProvingCostPerMana(ethValue) {
|
|
149
|
-
await this.asOwner(async (account, rollup)=>{
|
|
150
|
-
const hash = await rollup.write.setProvingCostPerMana([
|
|
151
|
-
ethValue
|
|
152
|
-
], {
|
|
153
|
-
account,
|
|
154
|
-
chain: this.client.chain
|
|
155
|
-
});
|
|
156
|
-
await this.client.waitForTransactionReceipt({
|
|
157
|
-
hash
|
|
158
|
-
});
|
|
159
|
-
this.logger.warn(`Updated proving cost per mana to ${ethValue}`);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { L1FeeJuicePortalManager, L1ToL2TokenPortalManager, L1TokenManager, L1TokenPortalManager, type L2AmountClaim, type L2AmountClaimWithRecipient, type L2Claim, generateClaimSecret, } from './portal_manager.js';
|
|
2
|
-
export { getL1ContractAddresses } from './l1_contracts.js';
|
|
3
|
-
export { RollupCheatCodes, EthCheatCodes } from './cheat_codes.js';
|
|
4
|
-
export { ChainMonitor } from './chain_monitor.js';
|
|
5
|
-
export { AnvilTestWatcher } from './anvil_test_watcher.js';
|
|
6
|
-
export { deployL1Contract, deployL1Contracts, type DeployL1ContractsReturnType, } from '@aztec/ethereum/deploy-l1-contracts';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/ethereum/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,OAAO,EACZ,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,2BAA2B,GACjC,MAAM,qCAAqC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { L1FeeJuicePortalManager, L1ToL2TokenPortalManager, L1TokenManager, L1TokenPortalManager, generateClaimSecret } from './portal_manager.js';
|
|
2
|
-
export { getL1ContractAddresses } from './l1_contracts.js';
|
|
3
|
-
export { RollupCheatCodes, EthCheatCodes } from './cheat_codes.js';
|
|
4
|
-
export { ChainMonitor } from './chain_monitor.js';
|
|
5
|
-
export { AnvilTestWatcher } from './anvil_test_watcher.js';
|
|
6
|
-
export { deployL1Contract, deployL1Contracts } from '@aztec/ethereum/deploy-l1-contracts';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/api/ethereum/l1_contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAKjF,eAAO,MAAM,sBAAsB,QAAe,MAAM,KAAG,QAAQ,mBAAmB,CAerF,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { retryUntil } from '@aztec/foundation/retry';
|
|
2
|
-
import { createPXEClient } from '../../rpc_clients/index.js';
|
|
3
|
-
export const getL1ContractAddresses = async (url)=>{
|
|
4
|
-
const pxeClient = createPXEClient(url, {});
|
|
5
|
-
const response = await retryUntil(async ()=>{
|
|
6
|
-
try {
|
|
7
|
-
return (await pxeClient.getNodeInfo()).l1ContractAddresses;
|
|
8
|
-
} catch (err) {
|
|
9
|
-
// do nothing
|
|
10
|
-
}
|
|
11
|
-
}, 'isNodeReady', 120, 1);
|
|
12
|
-
return response;
|
|
13
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type { ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
|
|
2
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
5
|
-
import type { SiblingPath } from '@aztec/foundation/trees';
|
|
6
|
-
import { TokenPortalAbi } from '@aztec/l1-artifacts';
|
|
7
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
-
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
9
|
-
import { type GetContractReturnType, type Hex } from 'viem';
|
|
10
|
-
/** L1 to L2 message info to claim it on L2. */
|
|
11
|
-
export type L2Claim = {
|
|
12
|
-
/** Secret for claiming. */
|
|
13
|
-
claimSecret: Fr;
|
|
14
|
-
/** Hash of the secret for claiming. */
|
|
15
|
-
claimSecretHash: Fr;
|
|
16
|
-
/** Hash of the message. */
|
|
17
|
-
messageHash: Hex;
|
|
18
|
-
/** Leaf index in the L1 to L2 message tree. */
|
|
19
|
-
messageLeafIndex: bigint;
|
|
20
|
-
};
|
|
21
|
-
/** L1 to L2 message info that corresponds to an amount to claim. */
|
|
22
|
-
export type L2AmountClaim = L2Claim & {
|
|
23
|
-
claimAmount: bigint;
|
|
24
|
-
};
|
|
25
|
-
/** L1 to L2 message info that corresponds to an amount to claim with associated recipient. */
|
|
26
|
-
export type L2AmountClaimWithRecipient = L2AmountClaim & {
|
|
27
|
-
/** Address that will receive the newly minted notes. */ recipient: AztecAddress;
|
|
28
|
-
};
|
|
29
|
-
/** Generates a pair secret and secret hash */
|
|
30
|
-
export declare function generateClaimSecret(logger?: Logger): Promise<[Fr, Fr]>;
|
|
31
|
-
/** Helper for managing an ERC20 on L1. */
|
|
32
|
-
export declare class L1TokenManager {
|
|
33
|
-
/** Address of the ERC20 contract. */
|
|
34
|
-
readonly address: EthAddress;
|
|
35
|
-
private publicClient;
|
|
36
|
-
private walletClient;
|
|
37
|
-
private logger;
|
|
38
|
-
private contract;
|
|
39
|
-
constructor(
|
|
40
|
-
/** Address of the ERC20 contract. */
|
|
41
|
-
address: EthAddress, publicClient: ViemPublicClient, walletClient: ViemWalletClient, logger: Logger);
|
|
42
|
-
/**
|
|
43
|
-
* Returns the balance of the given address.
|
|
44
|
-
* @param address - Address to get the balance of.
|
|
45
|
-
*/
|
|
46
|
-
getL1TokenBalance(address: Hex): Promise<bigint>;
|
|
47
|
-
/**
|
|
48
|
-
* Mints tokens for the given address. Returns once the tx has been mined.
|
|
49
|
-
* @param amount - Amount to mint.
|
|
50
|
-
* @param address - Address to mint the tokens for.
|
|
51
|
-
* @param addressName - Optional name of the address for logging.
|
|
52
|
-
*/
|
|
53
|
-
mint(amount: bigint, address: Hex, addressName?: string): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Approves tokens for the given address. Returns once the tx has been mined.
|
|
56
|
-
* @param amount - Amount to approve.
|
|
57
|
-
* @param address - Address to approve the tokens for.
|
|
58
|
-
* @param addressName - Optional name of the address for logging.
|
|
59
|
-
*/
|
|
60
|
-
approve(amount: bigint, address: Hex, addressName?: string): Promise<void>;
|
|
61
|
-
}
|
|
62
|
-
/** Helper for interacting with the FeeJuicePortal on L1. */
|
|
63
|
-
export declare class L1FeeJuicePortalManager {
|
|
64
|
-
private readonly publicClient;
|
|
65
|
-
private readonly walletClient;
|
|
66
|
-
private readonly logger;
|
|
67
|
-
private readonly tokenManager;
|
|
68
|
-
private readonly contract;
|
|
69
|
-
constructor(portalAddress: EthAddress, tokenAddress: EthAddress, publicClient: ViemPublicClient, walletClient: ViemWalletClient, logger: Logger);
|
|
70
|
-
/** Returns the associated token manager for the L1 ERC20. */
|
|
71
|
-
getTokenManager(): L1TokenManager;
|
|
72
|
-
/**
|
|
73
|
-
* Bridges fee juice from L1 to L2 publicly. Handles L1 ERC20 approvals. Returns once the tx has been mined.
|
|
74
|
-
* @param to - Address to send the tokens to on L2.
|
|
75
|
-
* @param amount - Amount of tokens to send.
|
|
76
|
-
* @param mint - Whether to mint the tokens before sending (only during testing).
|
|
77
|
-
*/
|
|
78
|
-
bridgeTokensPublic(to: AztecAddress, amount: bigint, mint?: boolean): Promise<L2AmountClaim>;
|
|
79
|
-
/**
|
|
80
|
-
* Creates a new instance
|
|
81
|
-
* @param pxe - PXE client used for retrieving the L1 contract addresses.
|
|
82
|
-
* @param publicClient - L1 public client.
|
|
83
|
-
* @param walletClient - L1 wallet client.
|
|
84
|
-
* @param logger - Logger.
|
|
85
|
-
*/
|
|
86
|
-
static new(pxe: PXE, publicClient: ViemPublicClient, walletClient: ViemWalletClient, logger: Logger): Promise<L1FeeJuicePortalManager>;
|
|
87
|
-
}
|
|
88
|
-
/** Helper for interacting with a test TokenPortal on L1 for sending tokens to L2. */
|
|
89
|
-
export declare class L1ToL2TokenPortalManager {
|
|
90
|
-
protected publicClient: ViemPublicClient;
|
|
91
|
-
protected walletClient: ViemWalletClient;
|
|
92
|
-
protected logger: Logger;
|
|
93
|
-
protected readonly portal: GetContractReturnType<typeof TokenPortalAbi, ViemWalletClient>;
|
|
94
|
-
protected readonly tokenManager: L1TokenManager;
|
|
95
|
-
constructor(portalAddress: EthAddress, tokenAddress: EthAddress, publicClient: ViemPublicClient, walletClient: ViemWalletClient, logger: Logger);
|
|
96
|
-
/** Returns the token manager for the underlying L1 token. */
|
|
97
|
-
getTokenManager(): L1TokenManager;
|
|
98
|
-
/**
|
|
99
|
-
* Bridges tokens from L1 to L2. Handles token approvals. Returns once the tx has been mined.
|
|
100
|
-
* @param to - Address to send the tokens to on L2.
|
|
101
|
-
* @param amount - Amount of tokens to send.
|
|
102
|
-
* @param mint - Whether to mint the tokens before sending (only during testing).
|
|
103
|
-
*/
|
|
104
|
-
bridgeTokensPublic(to: AztecAddress, amount: bigint, mint?: boolean): Promise<L2AmountClaim>;
|
|
105
|
-
/**
|
|
106
|
-
* Bridges tokens from L1 to L2 privately. Handles token approvals. Returns once the tx has been mined.
|
|
107
|
-
* @param to - Address to send the tokens to on L2.
|
|
108
|
-
* @param amount - Amount of tokens to send.
|
|
109
|
-
* @param mint - Whether to mint the tokens before sending (only during testing).
|
|
110
|
-
*/
|
|
111
|
-
bridgeTokensPrivate(to: AztecAddress, amount: bigint, mint?: boolean): Promise<L2AmountClaimWithRecipient>;
|
|
112
|
-
private bridgeSetup;
|
|
113
|
-
}
|
|
114
|
-
/** Helper for interacting with a test TokenPortal on L1 for both withdrawing from and bridging to L2. */
|
|
115
|
-
export declare class L1TokenPortalManager extends L1ToL2TokenPortalManager {
|
|
116
|
-
private readonly outbox;
|
|
117
|
-
constructor(portalAddress: EthAddress, tokenAddress: EthAddress, outboxAddress: EthAddress, publicClient: ViemPublicClient, walletClient: ViemWalletClient, logger: Logger);
|
|
118
|
-
/**
|
|
119
|
-
* Withdraws funds from the portal by consuming an L2 to L1 message. Returns once the tx is mined on L1.
|
|
120
|
-
* @param amount - Amount to withdraw.
|
|
121
|
-
* @param recipient - Who will receive the funds.
|
|
122
|
-
* @param blockNumber - L2 block number of the message.
|
|
123
|
-
* @param messageIndex - Index of the message.
|
|
124
|
-
* @param siblingPath - Sibling path of the message.
|
|
125
|
-
*/
|
|
126
|
-
withdrawFunds(amount: bigint, recipient: EthAddress, blockNumber: bigint, messageIndex: bigint, siblingPath: SiblingPath<number>): Promise<void>;
|
|
127
|
-
/**
|
|
128
|
-
* Computes the L2 to L1 message leaf for the given parameters.
|
|
129
|
-
* @param amount - Amount to bridge.
|
|
130
|
-
* @param recipient - Recipient on L1.
|
|
131
|
-
* @param l2Bridge - Address of the L2 bridge.
|
|
132
|
-
* @param callerOnL1 - Caller address on L1.
|
|
133
|
-
*/
|
|
134
|
-
getL2ToL1MessageLeaf(amount: bigint, recipient: EthAddress, l2Bridge: AztecAddress, callerOnL1?: EthAddress): Fr;
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=portal_manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portal_manager.d.ts","sourceRoot":"","sources":["../../../src/api/ethereum/portal_manager.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../../src/api/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dest/api/log_id.d.ts
DELETED
package/dest/api/log_id.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log_id.d.ts","sourceRoot":"","sources":["../../src/api/log_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dest/api/log_id.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LogId } from '@aztec/stdlib/logs';
|
package/dest/api/tx_hash.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tx_hash.d.ts","sourceRoot":"","sources":["../../src/api/tx_hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dest/api/tx_hash.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TxHash } from '@aztec/stdlib/tx';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
-
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
3
|
-
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
4
|
-
import type { Tx } from '@aztec/stdlib/tx';
|
|
5
|
-
import type { Wallet } from '../account/index.js';
|
|
6
|
-
import type { Contract } from './contract.js';
|
|
7
|
-
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
8
|
-
import { ProvenTx } from './proven_tx.js';
|
|
9
|
-
/**
|
|
10
|
-
* A proven transaction that can be sent to the network. Returned by the `prove` method of a contract deployment.
|
|
11
|
-
*/
|
|
12
|
-
export declare class DeployProvenTx<TContract extends Contract = Contract> extends ProvenTx {
|
|
13
|
-
private postDeployCtor;
|
|
14
|
-
private instanceGetter;
|
|
15
|
-
constructor(wallet: PXE | Wallet, tx: Tx, postDeployCtor: (address: AztecAddress, wallet: Wallet) => Promise<TContract>, instanceGetter: () => Promise<ContractInstanceWithAddress>);
|
|
16
|
-
/**
|
|
17
|
-
* Sends the transaction to the network via the provided wallet.
|
|
18
|
-
*/
|
|
19
|
-
send(): DeploySentTx<TContract>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=deploy_proven_tx.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_proven_tx.d.ts","sourceRoot":"","sources":["../../src/contract/deploy_proven_tx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;GAEG;AACH,qBAAa,cAAc,CAAC,SAAS,SAAS,QAAQ,GAAG,QAAQ,CAAE,SAAQ,QAAQ;IAI/E,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,cAAc;gBAHtB,MAAM,EAAE,GAAG,GAAG,MAAM,EACpB,EAAE,EAAE,EAAE,EACE,cAAc,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,EAC7E,cAAc,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC;IAKpE;;OAEG;IACa,IAAI,IAAI,YAAY,CAAC,SAAS,CAAC;CAOhD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
2
|
-
import { ProvenTx } from './proven_tx.js';
|
|
3
|
-
/**
|
|
4
|
-
* A proven transaction that can be sent to the network. Returned by the `prove` method of a contract deployment.
|
|
5
|
-
*/ export class DeployProvenTx extends ProvenTx {
|
|
6
|
-
postDeployCtor;
|
|
7
|
-
instanceGetter;
|
|
8
|
-
constructor(wallet, tx, postDeployCtor, instanceGetter){
|
|
9
|
-
super(wallet, tx), this.postDeployCtor = postDeployCtor, this.instanceGetter = instanceGetter;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Sends the transaction to the network via the provided wallet.
|
|
13
|
-
*/ send() {
|
|
14
|
-
const promise = (()=>{
|
|
15
|
-
return this.wallet.sendTx(this.getPlainDataTx());
|
|
16
|
-
})();
|
|
17
|
-
return new DeploySentTx(this.wallet, promise, this.postDeployCtor, this.instanceGetter);
|
|
18
|
-
}
|
|
19
|
-
}
|