diff --git a/avm-transpiler/Cargo.lock b/avm-transpiler/Cargo.lock index bdac1771a70..4da74e41190 100644 --- a/avm-transpiler/Cargo.lock +++ b/avm-transpiler/Cargo.lock @@ -948,7 +948,6 @@ dependencies = [ "acvm", "iter-extended", "jsonrpc", - "regex", "serde", "serde_json", "thiserror", diff --git a/noir-projects/aztec-nr/aztec/src/macros/events/mod.nr b/noir-projects/aztec-nr/aztec/src/macros/events/mod.nr index 3a72031efc0..1fc3671dd7e 100644 --- a/noir-projects/aztec-nr/aztec/src/macros/events/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/macros/events/mod.nr @@ -1,5 +1,6 @@ use super::utils::compute_event_selector; use protocol_types::meta::flatten_to_fields; +use std::meta::typ::fresh_type_variable; comptime fn generate_event_interface(s: StructDefinition) -> Quoted { let name = s.name(); @@ -13,7 +14,6 @@ comptime fn generate_event_interface(s: StructDefinition) -> Quoted { impl aztec::event::event_interface::EventInterface<$content_len> for $name { fn to_be_bytes(self) -> [u8; $content_len * 32 + 32] { let mut buffer: [u8; $content_len * 32 + 32] = [0; $content_len * 32 + 32]; - let event_type_id_bytes: [u8; 32] = $name::get_event_type_id().to_field().to_be_bytes(); for i in 0..32 { diff --git a/noir-projects/noir-contracts/contracts/contract_instance_deployer_contract/src/main.nr b/noir-projects/noir-contracts/contracts/contract_instance_deployer_contract/src/main.nr index 04ef191bc9f..d686ee96cb3 100644 --- a/noir-projects/noir-contracts/contracts/contract_instance_deployer_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/contract_instance_deployer_contract/src/main.nr @@ -13,8 +13,8 @@ contract ContractInstanceDeployer { }; use std::meta::derive; - #[event] #[derive(Serialize)] + #[event] struct ContractInstanceDeployed { DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE: Field, address: AztecAddress, diff --git a/noir-projects/noir-contracts/contracts/crowdfunding_contract/src/main.nr b/noir-projects/noir-contracts/contracts/crowdfunding_contract/src/main.nr index 40d738a512c..b4e2a0e0b27 100644 --- a/noir-projects/noir-contracts/contracts/crowdfunding_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/crowdfunding_contract/src/main.nr @@ -27,8 +27,8 @@ contract Crowdfunding { use token::Token; // docs:end:all-deps - #[event] #[derive(Serialize)] + #[event] struct WithdrawalProcessed { who: AztecAddress, amount: u64, diff --git a/noir-projects/noir-contracts/contracts/nft_contract/src/main.nr b/noir-projects/noir-contracts/contracts/nft_contract/src/main.nr index ecec8c4a226..e5f76dc31ce 100644 --- a/noir-projects/noir-contracts/contracts/nft_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/nft_contract/src/main.nr @@ -30,12 +30,12 @@ contract NFT { utils::comparison::Comparator, }; use dep::compressed_string::FieldCompressedString; - use std::{embedded_curve_ops::EmbeddedCurvePoint, meta::derive}; + use std::meta::derive; // TODO(#8467): Rename this to Transfer - calling this NFTTransfer to avoid export conflict with the Transfer event // in the Token contract. - #[event] #[derive(Serialize)] + #[event] struct NFTTransfer { from: AztecAddress, to: AztecAddress, diff --git a/noir-projects/noir-contracts/contracts/test_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test_contract/src/main.nr index 30210cbdadb..36cb5e8375a 100644 --- a/noir-projects/noir-contracts/contracts/test_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test_contract/src/main.nr @@ -39,14 +39,11 @@ contract Test { get_mint_to_private_content_hash, get_mint_to_public_content_hash, }; use dep::value_note::value_note::ValueNote; - // TODO investigate why the macros require EmbeddedCurvePoint and EmbeddedCurveScalar - use std::embedded_curve_ops::{EmbeddedCurvePoint, EmbeddedCurveScalar}; use std::meta::derive; use crate::test_note::TestNote; - - #[event] #[derive(Serialize)] + #[event] struct ExampleEvent { value0: Field, value1: Field, diff --git a/noir-projects/noir-contracts/contracts/test_log_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test_log_contract/src/main.nr index fa7c33be0b3..85e57131c20 100644 --- a/noir-projects/noir-contracts/contracts/test_log_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test_log_contract/src/main.nr @@ -11,17 +11,15 @@ contract TestLog { use dep::value_note::value_note::ValueNote; use std::meta::derive; - use std::embedded_curve_ops::EmbeddedCurveScalar; - - #[event] #[derive(Serialize)] + #[event] struct ExampleEvent0 { value0: Field, value1: Field, } - #[event] #[derive(Serialize)] + #[event] struct ExampleEvent1 { value2: AztecAddress, value3: u8, @@ -32,9 +30,6 @@ contract TestLog { example_set: PrivateSet, } - // EXAMPLE_EVENT_0_BYTES_LEN + 16 - global EXAMPLE_EVENT_0_CIPHERTEXT_BYTES_LEN: Field = 144; - #[private] fn emit_encrypted_events(other: AztecAddress, preimages: [Field; 4]) { let event0 = ExampleEvent0 { value0: preimages[0], value1: preimages[1] };