From 192234c3dc5c3f390ecbe999ec94feef76839643 Mon Sep 17 00:00:00 2001 From: saleel Date: Thu, 22 May 2025 17:47:01 +0000 Subject: [PATCH] ix(playground): configure sfpc version when creating account --- ...nsored_fpc_contract-SponsoredFPC.d.json.ts | 3 + .../sponsored_fpc_contract-SponsoredFPC.json | 1717 +++++++++++++++++ .../components/home/components/Landing.tsx | 8 +- playground/src/utils/networks.ts | 6 +- playground/src/utils/sponsoredFPC.ts | 3 + playground/update-artifacts.sh | 12 + 6 files changed, 1744 insertions(+), 5 deletions(-) create mode 100644 playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.d.json.ts create mode 100644 playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.json create mode 100755 playground/update-artifacts.sh diff --git a/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.d.json.ts b/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.d.json.ts new file mode 100644 index 000000000000..2d81c508df16 --- /dev/null +++ b/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.d.json.ts @@ -0,0 +1,3 @@ +import { type NoirCompiledContract } from '@aztec/stdlib/noir'; +const circuit: NoirCompiledContract; +export = circuit; diff --git a/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.json b/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.json new file mode 100644 index 000000000000..21c6e58ec720 --- /dev/null +++ b/playground/src/assets/artifacts/0.87.2/sponsored_fpc_contract-SponsoredFPC.json @@ -0,0 +1,1717 @@ +{ + "transpiled": true, + "noir_version": "1.0.0-beta.5+0000000000000000000000000000000000000000", + "name": "SponsoredFPC", + "functions": [ + { + "name": "sponsor_unconditionally", + "is_unconstrained": false, + "custom_attributes": [ + "private" + ], + "abi": { + "parameters": [ + { + "name": "inputs", + "type": { + "kind": "struct", + "path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs", + "fields": [ + { + "name": "call_context", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::call_context::CallContext", + "fields": [ + { + "name": "msg_sender", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "contract_address", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "function_selector", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::function_selector::FunctionSelector", + "fields": [ + { + "name": "inner", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "is_static_call", + "type": { + "kind": "boolean" + } + } + ] + } + }, + { + "name": "historical_header", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::block_header::BlockHeader", + "fields": [ + { + "name": "last_archive", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "content_commitment", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::content_commitment::ContentCommitment", + "fields": [ + { + "name": "num_txs", + "type": { + "kind": "field" + } + }, + { + "name": "blobs_hash", + "type": { + "kind": "field" + } + }, + { + "name": "in_hash", + "type": { + "kind": "field" + } + }, + { + "name": "out_hash", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "state", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::state_reference::StateReference", + "fields": [ + { + "name": "l1_to_l2_message_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "partial", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::partial_state_reference::PartialStateReference", + "fields": [ + { + "name": "note_hash_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "nullifier_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "public_data_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "name": "global_variables", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::global_variables::GlobalVariables", + "fields": [ + { + "name": "chain_id", + "type": { + "kind": "field" + } + }, + { + "name": "version", + "type": { + "kind": "field" + } + }, + { + "name": "block_number", + "type": { + "kind": "field" + } + }, + { + "name": "slot_number", + "type": { + "kind": "field" + } + }, + { + "name": "timestamp", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 64 + } + }, + { + "name": "coinbase", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::eth_address::EthAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "fee_recipient", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "gas_fees", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + } + ] + } + }, + { + "name": "total_fees", + "type": { + "kind": "field" + } + }, + { + "name": "total_mana_used", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "tx_context", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::transaction::tx_context::TxContext", + "fields": [ + { + "name": "chain_id", + "type": { + "kind": "field" + } + }, + { + "name": "version", + "type": { + "kind": "field" + } + }, + { + "name": "gas_settings", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_settings::GasSettings", + "fields": [ + { + "name": "gas_limits", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas::Gas", + "fields": [ + { + "name": "da_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "l2_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "teardown_gas_limits", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas::Gas", + "fields": [ + { + "name": "da_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "l2_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "max_fees_per_gas", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "max_priority_fees_per_gas", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "name": "start_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs", + "fields": [ + { + "name": "call_context", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::call_context::CallContext", + "fields": [ + { + "name": "msg_sender", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "contract_address", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "function_selector", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::function_selector::FunctionSelector", + "fields": [ + { + "name": "inner", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "is_static_call", + "type": { + "kind": "boolean" + } + } + ] + } + }, + { + "name": "args_hash", + "type": { + "kind": "field" + } + }, + { + "name": "returns_hash", + "type": { + "kind": "field" + } + }, + { + "name": "min_revertible_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "is_fee_payer", + "type": { + "kind": "boolean" + } + }, + { + "name": "max_block_number", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::max_block_number::MaxBlockNumber", + "fields": [ + { + "name": "_opt", + "type": { + "kind": "struct", + "path": "std::option::Option", + "fields": [ + { + "name": "_is_some", + "type": { + "kind": "boolean" + } + }, + { + "name": "_value", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + ] + } + }, + { + "name": "note_hash_read_requests", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::read_request::ReadRequest", + "fields": [ + { + "name": "value", + "type": { + "kind": "field" + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "nullifier_read_requests", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::read_request::ReadRequest", + "fields": [ + { + "name": "value", + "type": { + "kind": "field" + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "key_validation_requests_and_generators", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator", + "fields": [ + { + "name": "request", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest", + "fields": [ + { + "name": "pk_m", + "type": { + "kind": "struct", + "path": "std::embedded_curve_ops::EmbeddedCurvePoint", + "fields": [ + { + "name": "x", + "type": { + "kind": "field" + } + }, + { + "name": "y", + "type": { + "kind": "field" + } + }, + { + "name": "is_infinite", + "type": { + "kind": "boolean" + } + } + ] + } + }, + { + "name": "sk_app", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "sk_app_generator", + "type": { + "kind": "field" + } + } + ] + } + } + }, + { + "name": "note_hashes", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::note_hash::NoteHash", + "fields": [ + { + "name": "value", + "type": { + "kind": "field" + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "nullifiers", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::nullifier::Nullifier", + "fields": [ + { + "name": "value", + "type": { + "kind": "field" + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "note_hash", + "type": { + "kind": "field" + } + } + ] + } + } + }, + { + "name": "private_call_requests", + "type": { + "kind": "array", + "length": 5, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest", + "fields": [ + { + "name": "call_context", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::call_context::CallContext", + "fields": [ + { + "name": "msg_sender", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "contract_address", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "function_selector", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::function_selector::FunctionSelector", + "fields": [ + { + "name": "inner", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "is_static_call", + "type": { + "kind": "boolean" + } + } + ] + } + }, + { + "name": "args_hash", + "type": { + "kind": "field" + } + }, + { + "name": "returns_hash", + "type": { + "kind": "field" + } + }, + { + "name": "start_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "end_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "public_call_requests", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::side_effect::counted::Counted", + "fields": [ + { + "name": "inner", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest", + "fields": [ + { + "name": "msg_sender", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "contract_address", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "is_static_call", + "type": { + "kind": "boolean" + } + }, + { + "name": "calldata_hash", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "public_teardown_call_request", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest", + "fields": [ + { + "name": "msg_sender", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "contract_address", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "is_static_call", + "type": { + "kind": "boolean" + } + }, + { + "name": "calldata_hash", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "l2_to_l1_msgs", + "type": { + "kind": "array", + "length": 2, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message", + "fields": [ + { + "name": "recipient", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::eth_address::EthAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "content", + "type": { + "kind": "field" + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "private_logs", + "type": { + "kind": "array", + "length": 16, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::private_log::PrivateLogData", + "fields": [ + { + "name": "log", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::log::Log", + "fields": [ + { + "name": "fields", + "type": { + "kind": "array", + "length": 18, + "type": { + "kind": "field" + } + } + }, + { + "name": "length", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "note_hash_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "contract_class_logs_hashes", + "type": { + "kind": "array", + "length": 1, + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::side_effect::counted::Counted", + "fields": [ + { + "name": "inner", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::log_hash::LogHash", + "fields": [ + { + "name": "value", + "type": { + "kind": "field" + } + }, + { + "name": "length", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + }, + { + "name": "start_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "end_side_effect_counter", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "historical_header", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::block_header::BlockHeader", + "fields": [ + { + "name": "last_archive", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "content_commitment", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::content_commitment::ContentCommitment", + "fields": [ + { + "name": "num_txs", + "type": { + "kind": "field" + } + }, + { + "name": "blobs_hash", + "type": { + "kind": "field" + } + }, + { + "name": "in_hash", + "type": { + "kind": "field" + } + }, + { + "name": "out_hash", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "state", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::state_reference::StateReference", + "fields": [ + { + "name": "l1_to_l2_message_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "partial", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::partial_state_reference::PartialStateReference", + "fields": [ + { + "name": "note_hash_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "nullifier_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "public_data_tree", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot", + "fields": [ + { + "name": "root", + "type": { + "kind": "field" + } + }, + { + "name": "next_available_leaf_index", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "name": "global_variables", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::global_variables::GlobalVariables", + "fields": [ + { + "name": "chain_id", + "type": { + "kind": "field" + } + }, + { + "name": "version", + "type": { + "kind": "field" + } + }, + { + "name": "block_number", + "type": { + "kind": "field" + } + }, + { + "name": "slot_number", + "type": { + "kind": "field" + } + }, + { + "name": "timestamp", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 64 + } + }, + { + "name": "coinbase", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::eth_address::EthAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "fee_recipient", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::address::aztec_address::AztecAddress", + "fields": [ + { + "name": "inner", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "gas_fees", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + } + ] + } + }, + { + "name": "total_fees", + "type": { + "kind": "field" + } + }, + { + "name": "total_mana_used", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "tx_context", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::transaction::tx_context::TxContext", + "fields": [ + { + "name": "chain_id", + "type": { + "kind": "field" + } + }, + { + "name": "version", + "type": { + "kind": "field" + } + }, + { + "name": "gas_settings", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_settings::GasSettings", + "fields": [ + { + "name": "gas_limits", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas::Gas", + "fields": [ + { + "name": "da_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "l2_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "teardown_gas_limits", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas::Gas", + "fields": [ + { + "name": "da_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + }, + { + "name": "l2_gas", + "type": { + "kind": "integer", + "sign": "unsigned", + "width": 32 + } + } + ] + } + }, + { + "name": "max_fees_per_gas", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + }, + { + "name": "max_priority_fees_per_gas", + "type": { + "kind": "struct", + "path": "aztec::protocol_types::abis::gas_fees::GasFees", + "fields": [ + { + "name": "fee_per_da_gas", + "type": { + "kind": "field" + } + }, + { + "name": "fee_per_l2_gas", + "type": { + "kind": "field" + } + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "visibility": "databus" + }, + "error_types": { + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": "H4sIAAAAAAAA/93dBXRT99/H8dQpLoPBDJngkDRNm+Lu7g4tbWHK2MZcOnd3Z8rcXZnj7u7u7jyf72ieXUKyc/6Hm+d/3k/OeZ+W5MfN63ebpm1yJc5z4lI8wePZG3/i8ziVUPjRrqoSdl3oo/PzpAjjikW4rkSE60pFuK5MhOsqqGZh11WOMK5KhOuqRriuWoTrqhde57wUrpa/79su3tO7+Ko7luX3ZqSn52Wm5fn8vmxvWlZOMOBND+RkBH1BXyAYyE0L+v15wfRgZlZOVqY3y5fuz/PlB7L8+YULs6+bWy7nerDl2npIDFsHdltFT+SLO46APzbLzQjEZrmZ6azlZmTFaLl5MVpuZmyWm+aNzXIzc2KzXH+svLms9Zvhi9F6iNHzTszWQ0aMlhtgLTdm38e0x2+sntdj9XMzLfQ7pPMS5+p9nPidxqVlnfJ4+PsS/svh6f5C5+bka8Ro8m7P2cUvkq8mZM7xLs65FmTOCS7OuXaM5uz2E1AdiLMuxFkP4qzvcfdnQqycXsj69EGcaRCnH+JMhzgDEGcGxJkJcQYhziyIswHE2RDibARxNoY4m0CcTSHOZhBnc4izBcTZEuJsBXG2hjjbQJxtIc52EGd7iLMDxNkR4uwEcXaGOLtAnF0hzm4QZ3eIswfE2RPi7AVx9oY4+0CcfSHOfhBnf4hzAMQ5EOIcBHEOhjiHQJxDIc5hEGc2xJkDcQ6HOHMhzjyIMx/iHAFxjoQ4L4Y4L4E4L4U4L4M4L4c4r4A4R0GcV0KcoyHOqyDOqyHOayDOMRDntRDndRDn9R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Bvb0WWICMBtq5OsOu+rdIDNABm8oE1dI8RljHD/gf6nXAANOPidFTvmStL+EuXuqdHEuJXg1Ud9QwATsfNH03Ys7ZKZvKsSXm2XlZWjFoxsU7Rj3bPDO7MtHmN50GuibZOglj4RHfBtiVlpVm6e7OIMuLSmftoZ40BULzFsW3IJSNT1D+nDpkjnBwcZ+JxoO6sUV06xaGZq7dJM6TvyYxZsoFO3nzSfa7QDDPBKGC8SwRi041tS6Hkdjp07NsRyh80aWgMJw5VFRU0RZL1kYj6dlEts56JKCazJhDuCCUeAF/OkXwNXcoBlHfFL2B1MythIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACIchEEIRIghQTeM431QkDcNgrl+ORpCY745Fl4pVyhOgRRLft+IkjlMo9TsBE1U5kx5Jy8ltXl+ZMhG174aqKOQDENyb3W2/aDeIs4ODfq2vMegX/lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH" + }, + { + "name": "sync_private_state", + "is_unconstrained": true, + "custom_attributes": [ + "utility" + ], + "abi": { + "parameters": [], + "return_type": null, + "error_types": { + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": "H4sIAAAAAAAA/7WTPQ+CMBCGi2KUjzjgoD+jBAyM+LG4OLpXCkpUSAB3frqQXENtwKjAJU17FJ5736OVUB0SzDLqEAyyglmBecTtj8vhQY67hakIdfvku9i2lQZ/Peq3FGBKw/Ax4w/UfzwFzr6o+bwXVndWDo1b66g+H0P5Z/9vSP+LD5418GpAXnmew/oS5Nt74t+Oz8c5SNnXTR1EgnIxdK5CSd0lcZ4SP99QmgZZJhJGDWTUQlU56pVE8YG26fmRdgrSLEpikSZ/Sav6yu6lXLyr8eA57hCOizHTMAb+BDV3X+b2+feXkKuCJ+bT+1Nn6BAztEhI1oRS2yeGwK+CP38vlizs4eEFAAA=", + "debug_symbols": "nZPfioQgFIff5Vx34f+0VxmGwcoGQSycWliid18bdKYWXJa58WSe7+tX6Qq9aZf7zfphfEBzWaEN1jl7v7mx07Mdfby7AtoHTKGhFWAGDY+FQ1PHIqBR21ZB7r/NwZi9/SCI2kkH42do/OJcBV/aLc+mx6T9s846xFVUgfF9rFE4WGf2q61606iMYsSZSDhGAvGXQvGTA5cdtcwGidiLF+TEkzLPCU885+9XwLT+bwBJ6xyAq1IAVuYZVYlnQn4UQLIcQMlSAFHm43dPvCDikwCKkCRQlJcCyD8CyLyHavTrF1zjVHc2nLb2tquC1a0zaTosvjuszt9TXslHYwpjZ/olmN10OB9xvGBZEXrd9qf9AA==", + "brillig_names": [ + "sync_private_state" + ] + }, + { + "name": "public_dispatch", + "is_unconstrained": true, + "custom_attributes": [ + "public" + ], + "abi": { + "parameters": [ + { + "name": "selector", + "type": { + "kind": "field" + }, + "visibility": "private" + } + ], + "return_type": null, + "error_types": { + "1752556835457866331": { + "error_kind": "string", + "string": "No public functions" + } + } + }, + "bytecode": "JwAABAEqAAABBRhSVSgKJhpbPAAAAQ==", + "debug_symbols": "XY1bCoAgEEX3Mt+toK1EiI9RBkRl0iDEvWeRIH3ee+6jgkFVnKBg4wHrVkExeU9O+Khlphi6W9sCQ4rMiN2CiW97D0hN/C+dkkkqj5+0JeiJ5isNMk4TR42mMD5LL2t7uwE=", + "brillig_names": [ + "public_dispatch" + ] + } + ], + "outputs": { + "globals": {}, + "structs": { + "functions": [ + { + "fields": [ + { + "name": "parameters", + "type": { + "fields": [], + "kind": "struct", + "path": "SponsoredFPC::sponsor_unconditionally_parameters" + } + } + ], + "kind": "struct", + "path": "SponsoredFPC::sponsor_unconditionally_abi" + }, + { + "fields": [ + { + "name": "parameters", + "type": { + "fields": [], + "kind": "struct", + "path": "SponsoredFPC::sync_private_state_parameters" + } + } + ], + "kind": "struct", + "path": "SponsoredFPC::sync_private_state_abi" + } + ] + } + }, + "file_map": { + "137": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/execution.nr", + "source": "use dep::protocol_types::address::AztecAddress;\n\n#[oracle(getContractAddress)]\nunconstrained fn get_contract_address_oracle() -> AztecAddress {}\n\n#[oracle(getBlockNumber)]\nunconstrained fn get_block_number_oracle() -> u32 {}\n\n#[oracle(getChainId)]\nunconstrained fn get_chain_id_oracle() -> Field {}\n\n#[oracle(getVersion)]\nunconstrained fn get_version_oracle() -> Field {}\n\npub unconstrained fn get_contract_address() -> AztecAddress {\n get_contract_address_oracle()\n}\n\npub unconstrained fn get_block_number() -> u32 {\n get_block_number_oracle()\n}\n\npub unconstrained fn get_chain_id() -> Field {\n get_chain_id_oracle()\n}\n\npub unconstrained fn get_version() -> Field {\n get_version_oracle()\n}\n" + }, + "279": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/debug_log.nr", + "source": "/// Utility function to console.log data in the acir simulator.\n/// Example:\n/// debug_log(\"blah blah this is a debug string\");\npub fn debug_log(msg: str) {\n debug_log_format(msg, []);\n}\n\n/// Utility function to console.log data in the acir simulator. This variant receives a format string in which the\n/// `${k}` tokens will be replaced with the k-eth value in the `args` array.\n/// Examples:\n/// debug_log_format(\"get_2(slot:{0}) =>\\n\\t0:{1}\\n\\t1:{2}\", [storage_slot, note0_hash, note1_hash]);\n/// debug_log_format(\"whole array: {}\", [e1, e2, e3, e4]);\npub fn debug_log_format(msg: str, args: [Field; N]) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe\n // to call.\n unsafe { debug_log_oracle_wrapper(msg, args) };\n}\n\npub unconstrained fn debug_log_oracle_wrapper(\n msg: str,\n args: [Field; N],\n) {\n debug_log_oracle(msg, args.as_slice());\n}\n\n// WARNING: sometimes when using debug logs the ACVM errors with: `thrown: \"solver opcode resolution error: cannot solve opcode: expression has too many unknowns x155\"`\n#[oracle(debugLog)]\nunconstrained fn debug_log_oracle(_msg: str, args: [Field]) {}\n" + }, + "50": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/fees/sponsored_fpc_contract/src/main.nr", + "source": "use dep::aztec::macros::aztec;\n\n/// FOR TESTING ONLY\n/// Sponsored Fee Payment Contract (Sponsored FPC)\n/// This contract covers transaction fees for users unconditionally.\n#[aztec]\npub contract SponsoredFPC {\n use dep::aztec::macros::functions::private;\n\n /// Sponsors the transaction unconditionally.\n #[private]\n fn sponsor_unconditionally() {\n // Set the FPC as the fee payer of the tx.\n context.set_as_fee_payer();\n }\n}\n" + }, + "59": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/private_context.nr", + "source": "use crate::{\n context::{inputs::PrivateContextInputs, returns_hash::ReturnsHash},\n hash::{ArgsHasher, hash_args_array, hash_calldata_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n block_header::get_block_header_at,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n notify_enqueued_public_function_call, notify_set_min_revertible_side_effect_counter,\n notify_set_public_teardown_function_call,\n },\n execution_cache,\n key_validation_request::get_key_validation_request,\n notes::{notify_created_nullifier, notify_nullified_note},\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log_hash::LogHash,\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n private_log::{PrivateLog, PrivateLogData},\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n block_header::BlockHeader,\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, MAX_NOTE_HASHES_PER_CALL,\n MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PRIVATE_LOGS_PER_CALL,\n PRIVATE_LOG_SIZE_IN_FIELDS,\n },\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::{Empty, Hash, ToField},\n utils::arrays::array_concat,\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec,\n pub nullifier_read_requests: BoundedVec,\n key_validation_requests_and_generators: BoundedVec,\n\n pub note_hashes: BoundedVec,\n pub nullifiers: BoundedVec,\n\n pub private_call_requests: BoundedVec,\n pub public_call_requests: BoundedVec, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: BlockHeader,\n\n pub private_logs: BoundedVec,\n pub contract_class_logs_hashes: BoundedVec, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn gas_settings(self) -> GasSettings {\n self.inputs.tx_context.gas_settings\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n notify_created_nullifier(nullifier);\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n let nullifier_counter = self.next_counter();\n notify_nullified_note(nullifier, nullified_note_hash, nullifier_counter);\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: nullifier_counter,\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_block_header(self) -> BlockHeader {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_block_header_at(self, block_number: u32) -> BlockHeader {\n get_block_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n self.return_hash = returns_hasher.hash();\n execution_cache::store(returns_hasher.fields, self.return_hash);\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n private_logs: self.private_logs.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request = self.last_key_validation_requests[key_index as u32].unwrap_or(\n KeyValidationRequest::empty(),\n );\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n\n // Safety: Kernels verify that the key validation request is valid and below we verify that a request\n // for the correct public key has been received.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert_eq(request.pk_m.hash(), pk_m_hash, \"Obtained invalid key validation request\");\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index as u32],\n },\n );\n self.last_key_validation_requests[key_index as u32] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n pub fn emit_private_log(&mut self, log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS], length: u32) {\n let counter = self.next_counter();\n let private_log =\n PrivateLogData { log: PrivateLog::new(log, length), note_hash_counter: 0, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn emit_raw_note_log(\n &mut self,\n log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS],\n length: u32,\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let private_log =\n PrivateLogData { log: PrivateLog::new(log, length), note_hash_counter, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> ReturnsHash {\n let args_hash = hash_args_array(args);\n execution_cache::store(args, args_hash);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> ReturnsHash {\n let args_hash = hash_args_array(args);\n execution_cache::store(args, args_hash);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_args_hash(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> ReturnsHash {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // Safety: The oracle simulates the private call and returns the value of the side effects counter after\n // execution of the call (which means that end_side_effect_counter - start_side_effect_counter is\n // the number of side effects that took place), along with the hash of the return values. We validate these\n // by requesting a private kernel iteration in which the return values are constrained to hash\n // to `returns_hash` and the side effects counter to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n ReturnsHash::new(returns_hash)\n }\n\n pub fn call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let calldata = array_concat([function_selector.to_field()], args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.call_public_function_with_calldata_hash(contract_address, calldata_hash, false)\n }\n\n pub fn static_call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let calldata = array_concat([function_selector.to_field()], args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.call_public_function_with_calldata_hash(contract_address, calldata_hash, true)\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n let calldata_hash = hash_calldata_array([function_selector.to_field()]);\n self.call_public_function_with_calldata_hash(contract_address, calldata_hash, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n let calldata_hash = hash_calldata_array([function_selector.to_field()]);\n self.call_public_function_with_calldata_hash(contract_address, calldata_hash, true)\n }\n\n pub fn call_public_function_with_calldata_hash(\n &mut self,\n contract_address: AztecAddress,\n calldata_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n notify_enqueued_public_function_call(\n contract_address,\n calldata_hash,\n counter,\n is_static_call,\n );\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n is_static_call,\n calldata_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let calldata = array_concat([function_selector.to_field()], args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.set_public_teardown_function_with_calldata_hash(contract_address, calldata_hash, false)\n }\n\n pub fn set_public_teardown_function_with_calldata_hash(\n &mut self,\n contract_address: AztecAddress,\n calldata_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n notify_set_public_teardown_function_call(\n contract_address,\n calldata_hash,\n counter,\n is_static_call,\n );\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n is_static_call,\n calldata_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: BlockHeader::empty(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n" + }, + "62": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/utility_context.nr", + "source": "use crate::oracle::{\n execution::{get_block_number, get_chain_id, get_contract_address, get_version},\n storage::storage_read,\n};\nuse dep::protocol_types::{address::AztecAddress, traits::Packable};\n\npub struct UtilityContext {\n block_number: u32,\n contract_address: AztecAddress,\n version: Field,\n chain_id: Field,\n}\n\nimpl UtilityContext {\n pub unconstrained fn new() -> Self {\n // We could call these oracles on the getters instead of at creation, which makes sense given that they might\n // not even be accessed. However any performance gains are minimal, and we'd rather fail early if a user\n // incorrectly attempts to create a UtilityContext in an environment in which these oracles are not\n // available.\n let block_number = get_block_number();\n let contract_address = get_contract_address();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n let block_number = get_block_number();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at_historical(contract_address: AztecAddress, block_number: u32) -> Self {\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub fn block_number(self) -> u32 {\n self.block_number\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n pub fn version(self) -> Field {\n self.version\n }\n\n pub fn chain_id(self) -> Field {\n self.chain_id\n }\n\n pub unconstrained fn raw_storage_read(\n self: Self,\n storage_slot: Field,\n ) -> [Field; N] {\n storage_read(self.this_address(), storage_slot, self.block_number())\n }\n\n pub unconstrained fn storage_read(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n}\n" + }, + "95": { + "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/functions/utils.nr", + "source": "use crate::macros::{\n functions::{abi_export::create_fn_abi_export, call_interface_stubs::stub_fn, stub_registry},\n notes::NOTES,\n utils::{\n add_to_hasher, fn_has_noinitcheck, get_fn_visibility, is_fn_contract_library_method,\n is_fn_initializer, is_fn_internal, is_fn_private, is_fn_public, is_fn_test, is_fn_utility,\n is_fn_view, modify_fn_body, module_has_initializer, module_has_storage,\n },\n};\nuse protocol_types::meta::generate_serialize_to_fields;\nuse std::meta::type_of;\n\npub(crate) comptime fn transform_private(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[private] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Private functions undergo a lot of transformations from their Aztec.nr form into a circuit that can be fed to the\n // Private Kernel Circuit.\n // First we change the function signature so that it also receives `PrivateContextInputs`, which contain information\n // about the execution context (e.g. the caller).\n let original_params = f.parameters();\n f.set_parameters(&[(\n quote { inputs },\n quote { crate::context::inputs::private_context_inputs::PrivateContextInputs }.as_type(),\n )]\n .append(original_params));\n\n let mut body = f.body().as_block().unwrap();\n\n // The original params are hashed and passed to the `context` object, so that the kernel can verify we've received\n // the correct values.\n // TODO: Optimize args_hasher for small number of arguments\n let args_hasher_name = quote { args_hasher };\n let args_hasher = original_params.fold(\n quote {\n let mut $args_hasher_name = dep::aztec::hash::ArgsHasher::new();\n },\n |args_hasher, param: (Quoted, Type)| {\n let (name, typ) = param;\n let appended_arg = add_to_hasher(args_hasher_name, name, typ);\n quote {\n $args_hasher\n $appended_arg\n }\n },\n );\n\n let context_creation = quote {\n let mut context = dep::aztec::context::private_context::PrivateContext::new(inputs, dep::aztec::protocol_types::traits::Hash::hash($args_hasher_name));\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !is_fn_initializer(f) & !fn_has_noinitcheck(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n // All private functions perform message discovery, since they may need to access notes. This is slightly\n // inefficient and could be improved by only doing it once we actually attempt to read any.\n let message_discovery_call = if NOTES.len() > 0 {\n create_message_discovery_call()\n } else {\n quote {}\n };\n\n // Finally, we need to change the return type to be `PrivateCircuitPublicInputs`, which is what the Private Kernel\n // circuit expects.\n let return_value_var_name = quote { macro__returned__values };\n\n let return_value_type = f.return_type();\n let return_value = if body.len() == 0 {\n quote {}\n } else if return_value_type != type_of(()) {\n // The original return value is passed to a second args hasher which the context receives.\n let (body_without_return, last_body_expr) = body.pop_back();\n let return_value = last_body_expr.quoted();\n let return_value_assignment =\n quote { let $return_value_var_name: $return_value_type = $return_value; };\n let return_hasher_name = quote { return_hasher };\n let return_value_into_hasher =\n add_to_hasher(return_hasher_name, return_value_var_name, return_value_type);\n\n body = body_without_return;\n\n quote {\n let mut $return_hasher_name = dep::aztec::hash::ArgsHasher::new();\n $return_value_assignment\n $return_value_into_hasher\n context.set_return_hash($return_hasher_name);\n }\n } else {\n let (body_without_return, last_body_expr) = body.pop_back();\n if !last_body_expr.has_semicolon()\n & last_body_expr.as_for().is_none()\n & last_body_expr.as_assert().is_none()\n & last_body_expr.as_for_range().is_none()\n & last_body_expr.as_assert_eq().is_none()\n & last_body_expr.as_let().is_none() {\n let unused_return_value_name = f\"_{return_value_var_name}\".quoted_contents();\n body = body_without_return.push_back(\n quote { let $unused_return_value_name = $last_body_expr; }.as_expr().unwrap(),\n );\n }\n quote {}\n };\n\n let context_finish = quote { context.finish() };\n\n let to_prepend = quote {\n $args_hasher\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n $message_discovery_call\n };\n\n let to_append = quote {\n $return_value\n $mark_as_initialized\n $context_finish\n };\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n f.set_return_type(\n quote { dep::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs }\n .as_type(),\n );\n f.set_return_data();\n\n fn_abi\n}\n\npub(crate) comptime fn transform_public(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[public] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Public functions undergo a lot of transformations from their Aztec.nr form.\n let original_params = f.parameters();\n let args_len = original_params\n .map(|(name, typ): (Quoted, Type)| {\n generate_serialize_to_fields(name, typ, false).0.len()\n })\n .fold(0, |acc: u32, val: u32| acc + val);\n\n // Unlike in the private case, in public the `context` does not need to receive the hash of the original params.\n let context_creation = quote {\n let mut context = dep::aztec::context::public_context::PublicContext::new(|| {\n // We start from 1 because we skip the selector for the dispatch function.\n let serialized_args : [Field; $args_len] = dep::aztec::context::public_context::calldata_copy(1, $args_len);\n dep::aztec::hash::hash_args_array(serialized_args)\n });\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n quote {\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !fn_has_noinitcheck(f) & !is_fn_initializer(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n };\n\n let to_append = quote {\n $mark_as_initialized\n };\n\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n\n // All public functions are automatically made unconstrained, even if they were not marked as such. This is because\n // instead of compiling into a circuit, they will compile to bytecode that will be later transpiled into AVM\n // bytecode.\n f.set_unconstrained(true);\n f.set_return_public(true);\n\n fn_abi\n}\n\npub(crate) comptime fn transform_utility(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // Check if function is marked as unconstrained\n if !f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[utility] but not marked as unconstrained, add unconstrained keyword\",\n );\n }\n\n // Create utility context\n let context_creation =\n quote { let mut context = dep::aztec::context::utility_context::UtilityContext::new(); };\n let module_has_storage = module_has_storage(f.module());\n\n // Initialize Storage if module has storage\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(context);\n }\n } else {\n quote {}\n };\n\n // All utility functions perform message discovery, since they may need to access private notes that would be\n // found during this process. This is slightly inefficient and could be improved by only doing it once we actually\n // attempt to read any.\n let message_discovery_call = if NOTES.len() > 0 {\n create_message_discovery_call()\n } else {\n quote {}\n };\n\n // Inject context creation, storage initialization, and message discovery call at the beginning of the function\n // body.\n let to_prepend = quote {\n $context_creation\n $storage_init\n $message_discovery_call\n };\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, quote {});\n f.set_body(modified_body);\n\n f.set_return_public(true);\n\n fn_abi\n}\n\ncomptime fn create_internal_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called internally\";\n quote { assert(context.msg_sender() == context.this_address(), $assertion_message); }\n}\n\ncomptime fn create_view_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called statically\";\n if is_fn_private(f) {\n // Here `context` is of type context::PrivateContext\n quote { assert(context.inputs.call_context.is_static_call == true, $assertion_message); }\n } else {\n // Here `context` is of type context::PublicContext\n quote { assert(context.is_static_call(), $assertion_message); }\n }\n}\n\ncomptime fn create_assert_correct_initializer_args(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_{fn_visibility}(context);\"\n .quoted_contents()\n}\n\ncomptime fn create_mark_as_initialized(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::mark_as_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\ncomptime fn create_init_check(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_is_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\n/// Injects a call to `aztec::messages::discovery::discover_new_messages`, causing for new notes to be added to PXE and made\n/// available for the current execution.\npub(crate) comptime fn create_message_discovery_call() -> Quoted {\n quote {\n /// Safety: message discovery returns nothing and is performed solely for its side-effects. It is therefore\n /// always safe to call.\n unsafe {\n dep::aztec::messages::discovery::discover_new_messages(\n context.this_address(),\n _compute_note_hash_and_nullifier,\n );\n };\n }\n}\n\n/// Checks if each function in the module is marked with either #[private], #[public], #[utility],\n/// #[contract_library_method], or #[test]. Non-macroified functions are not allowed in contracts.\npub(crate) comptime fn check_each_fn_macroified(m: Module) {\n for f in m.functions() {\n let name = f.name();\n if !is_fn_private(f)\n & !is_fn_public(f)\n & !is_fn_utility(f)\n & !is_fn_contract_library_method(f)\n & !is_fn_test(f) {\n panic(\n f\"Function {name} must be marked as either #[private], #[public], #[utility], #[contract_library_method], or #[test]\",\n );\n }\n }\n}\n" + } + } +} diff --git a/playground/src/components/home/components/Landing.tsx b/playground/src/components/home/components/Landing.tsx index d3118ec524a3..02e4d01eb625 100644 --- a/playground/src/components/home/components/Landing.tsx +++ b/playground/src/components/home/components/Landing.tsx @@ -267,7 +267,7 @@ export function Landing() { pxe, currentTx, isPXEInitialized, - isNetworkCongested, + network, setWallet, } = useContext(AztecContext); @@ -380,7 +380,11 @@ export function Landing() { }); const { prepareForFeePayment } = await import('../../../utils/sponsoredFPC'); - const feePaymentMethod = await prepareForFeePayment(pxe); + const feePaymentMethod = await prepareForFeePayment( + pxe, + network.sponsoredFPC?.address, + network.sponsoredFPC?.version, + ); const deployMethod = await accountManager.getDeployMethod(); const opts = { diff --git a/playground/src/utils/networks.ts b/playground/src/utils/networks.ts index d6af1d3f1fa6..96908fd3f509 100644 --- a/playground/src/utils/networks.ts +++ b/playground/src/utils/networks.ts @@ -22,10 +22,10 @@ export const NETWORKS: Network[] = [ description: 'Public testnet', hasTestAccounts: false, hasSponsoredFPC: true, - version: '0.85.0-alpha-testnet.4', + version: '0.87.2', sponsoredFPC: { - version: '0.85.0-alpha-testnet.2', - address: AztecAddress.fromString('0x0b27e30667202907fc700d50e9bc816be42f8141fae8b9f2281873dbdb9fc2e5'), + version: '0.87.2', + address: AztecAddress.fromString('0x1260a43ecf03e985727affbbe3e483e60b836ea821b6305bea1c53398b986047'), }, transactionCongestionThreshold: 40, }, diff --git a/playground/src/utils/sponsoredFPC.ts b/playground/src/utils/sponsoredFPC.ts index c3ec9bfb95fb..e3c6f7b85f2d 100644 --- a/playground/src/utils/sponsoredFPC.ts +++ b/playground/src/utils/sponsoredFPC.ts @@ -25,6 +25,9 @@ export async function prepareForFeePayment( sponsoredFPCVersion?: string, ): Promise { try { + console.log('sponsoredFPCAddress', sponsoredFPCAddress); + console.log('sponsoredFPCVersion', sponsoredFPCVersion); + const contractArtifact = await getSponsoredFPCArtifact(sponsoredFPCVersion); const instance = await getContractInstanceFromDeployParams(contractArtifact, { diff --git a/playground/update-artifacts.sh b/playground/update-artifacts.sh new file mode 100755 index 000000000000..f80b41e2a80a --- /dev/null +++ b/playground/update-artifacts.sh @@ -0,0 +1,12 @@ +VERSION=$(cat ../.release-please-manifest.json | jq -r '."."') + +echo "Adding latest artifact for version $VERSION" + +mkdir -p src/assets/artifacts/$VERSION + +cp \ + ../yarn-project/noir-contracts.js/artifacts/sponsored_fpc_contract-SponsoredFPC.json \ + ../yarn-project/noir-contracts.js/artifacts/sponsored_fpc_contract-SponsoredFPC.d.json.ts \ + src/assets/artifacts/$VERSION + +echo "Done"