-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: typing partial address, deduplicating
Point
, Point
-> `Gru…
- Loading branch information
Showing
21 changed files
with
183 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
use crate::types::point::Point; | ||
use dep::protocol_types::{ | ||
address::AztecAddress, | ||
constants::NUM_FIELDS_PER_SHA256, | ||
grumpkin_point::GrumpkinPoint, | ||
}; | ||
|
||
// TODO: Should take encrypted data. | ||
#[oracle(emitEncryptedLog)] | ||
fn emit_encrypted_log_oracle<N>(_contract_address: AztecAddress, _storage_slot: Field, _encryption_pub_key: Point, _preimage: [Field; N]) -> Field {} | ||
fn emit_encrypted_log_oracle<N>( | ||
_contract_address: AztecAddress, | ||
_storage_slot: Field, | ||
_encryption_pub_key: GrumpkinPoint, | ||
_preimage: [Field; N] | ||
) -> Field {} | ||
|
||
unconstrained pub fn emit_encrypted_log<N>(contract_address: AztecAddress, storage_slot: Field, encryption_pub_key: Point, preimage: [Field; N]) -> [Field; NUM_FIELDS_PER_SHA256] { | ||
unconstrained pub fn emit_encrypted_log<N>( | ||
contract_address: AztecAddress, | ||
storage_slot: Field, | ||
encryption_pub_key: GrumpkinPoint, | ||
preimage: [Field; N] | ||
) -> [Field; NUM_FIELDS_PER_SHA256] { | ||
[emit_encrypted_log_oracle(contract_address, storage_slot, encryption_pub_key, preimage), 0] | ||
} | ||
|
||
#[oracle(emitUnencryptedLog)] | ||
fn emit_unencrypted_log_oracle<T>(_contract_address: AztecAddress, _event_selector: Field, _message: T) -> Field {} | ||
|
||
unconstrained pub fn emit_unencrypted_log<T>(contract_address: AztecAddress, event_selector: Field, message: T) -> [Field; NUM_FIELDS_PER_SHA256] { | ||
unconstrained pub fn emit_unencrypted_log<T>( | ||
contract_address: AztecAddress, | ||
event_selector: Field, | ||
message: T | ||
) -> [Field; NUM_FIELDS_PER_SHA256] { | ||
// https://github.com/AztecProtocol/aztec-packages/issues/885 | ||
[emit_unencrypted_log_oracle(contract_address, event_selector, message), 0] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
mod point; | ||
mod vec; // This can/should be moved out into an official noir library | ||
mod type_serialization; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 15 additions & 12 deletions
27
yarn-project/noir-protocol-circuits/src/crates/types/src/abis/complete_address.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.