diff --git a/crates/rs/src/expand/contract.rs b/crates/rs/src/expand/contract.rs index 4112e78..2797eb2 100644 --- a/crates/rs/src/expand/contract.rs +++ b/crates/rs/src/expand/contract.rs @@ -40,6 +40,7 @@ impl CairoContract { pub struct #reader { pub address: #snrs_types::FieldElement, pub provider: P, + pub block_id: Option<#snrs_types::BlockId>, } impl #reader

{ @@ -47,7 +48,7 @@ impl CairoContract { address: #snrs_types::FieldElement, provider: P, ) -> Self { - Self { address, provider } + Self { address, provider, block_id: None } } pub fn set_contract_address(mut self, address: #snrs_types::FieldElement) { @@ -57,6 +58,10 @@ impl CairoContract { pub fn provider(&self) -> &P { &self.provider } + + pub fn with_block(self, block_id: #snrs_types::BlockId) -> Self { + Self { block_id: Some(block_id), ..self } + } } };