-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: ContextInterface trait for private and public contexts (#4808)
Adds a small ContextInterface trait with methods shared between both private and public context. To be used for initialization handling later down the road.
- Loading branch information
1 parent
4feaea5
commit 237f870
Showing
4 changed files
with
111 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use dep::protocol_types::{ | ||
abis::function_selector::FunctionSelector, | ||
address::{AztecAddress, EthAddress}, | ||
}; | ||
|
||
trait ContextInterface { | ||
fn push_new_note_hash(&mut self, note_hash: Field); | ||
fn push_new_nullifier(&mut self, nullifier: Field, nullified_commitment: Field); | ||
fn msg_sender(self) -> AztecAddress; | ||
fn this_address(self) -> AztecAddress; | ||
fn this_portal_address(self) -> EthAddress; | ||
fn chain_id(self) -> Field; | ||
fn version(self) -> Field; | ||
fn selector(self) -> FunctionSelector; | ||
} |
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