pub struct ContractSyncService<N: AztecNode> { /* private fields */ }Expand description
Service that ensures contracts’ private state is synced before execution.
Maintains a cache of already-synced contracts to avoid redundant sync operations within a transaction.
Implementations§
Source§impl<N: AztecNode> ContractSyncService<N>
impl<N: AztecNode> ContractSyncService<N>
pub fn new(node: Arc<N>, note_store: Arc<NoteStore>) -> Self
Sourcepub async fn ensure_contract_synced<F, Fut>(
&self,
contract_address: &AztecAddress,
scopes: &[AztecAddress],
anchor_block_hash: &str,
utility_executor: F,
) -> Result<(), Error>
pub async fn ensure_contract_synced<F, Fut>( &self, contract_address: &AztecAddress, scopes: &[AztecAddress], anchor_block_hash: &str, utility_executor: F, ) -> Result<(), Error>
Ensure a contract’s private state is synchronized.
If the contract has already been synced for the given scopes in the current anchor block, this is a no-op.
pub async fn ensure_contract_synced_with<F, Fut>( &self, contract_address: &AztecAddress, scopes: &[AztecAddress], anchor_block_hash: &str, utility_executor: &F, ) -> Result<(), Error>
Auto Trait Implementations§
impl<N> !Freeze for ContractSyncService<N>
impl<N> !RefUnwindSafe for ContractSyncService<N>
impl<N> Send for ContractSyncService<N>
impl<N> Sync for ContractSyncService<N>
impl<N> Unpin for ContractSyncService<N>
impl<N> !UnwindSafe for ContractSyncService<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more