pub struct StaticContractVerifier { /* private fields */ }Expand description
A no-network ContractSignatureVerifier that approves exactly one
(address, message) pair and refuses everything else. It is the test
adapter for the EIP-1271 path — a unit test needs a contract wallet
that answers without a chain, and this is it. It is compiled into the
library rather than kept behind cfg(test) so an integration test can
compose one; it is deliberately not wired into any builder default.
Implementations§
Trait Implementations§
Source§impl Clone for StaticContractVerifier
impl Clone for StaticContractVerifier
Source§impl ContractSignatureVerifier for StaticContractVerifier
impl ContractSignatureVerifier for StaticContractVerifier
Source§fn is_valid_signature<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_chain_id: &'life1 str,
address: &'life2 str,
message_hash: [u8; 32],
_signature: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, ContractVerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn is_valid_signature<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_chain_id: &'life1 str,
address: &'life2 str,
message_hash: [u8; 32],
_signature: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, ContractVerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Whether the contract at
address (on chain_id) approves signature
for message_hash.Auto Trait Implementations§
impl Freeze for StaticContractVerifier
impl RefUnwindSafe for StaticContractVerifier
impl Send for StaticContractVerifier
impl Sync for StaticContractVerifier
impl Unpin for StaticContractVerifier
impl UnsafeUnpin for StaticContractVerifier
impl UnwindSafe for StaticContractVerifier
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