diff --git a/src/lib.rs b/src/lib.rs index f677461..98ecde7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,7 +35,6 @@ const ERC1271_MOCK_BYTECODE: &[u8] = include_bytes!(concat!( "/../../../../.foundry/forge/out/Erc1271Mock.sol/Erc1271Mock.bytecode" )); - sol! { contract ValidateSigOffchain { constructor (address _signer, bytes32 _hash, bytes memory _signature); @@ -60,7 +59,6 @@ sol! { } - sol! { struct ERC6492Signature { address create2_factory; @@ -410,17 +408,16 @@ where .map(|code| !code.is_empty()) .unwrap(); if code_exists { - let call_request = - TransactionRequest::default() - .to(address) - .input(TransactionInput::new( - Erc1271Mock::isValidSignatureCall { - _hash: message, - _signature: signature.into(), - } - .abi_encode() - .into(), - )); + let call_request = TransactionRequest::default() + .to(address) + .input(TransactionInput::new( + Erc1271Mock::isValidSignatureCall { + _hash: message, + _signature: signature.into(), + } + .abi_encode() + .into(), + )); let result = provider.call(&call_request).await; @@ -523,7 +520,6 @@ mod test { .await .unwrap() .is_valid()); - } #[tokio::test] @@ -992,7 +988,7 @@ mod test { let (_anvil, _rpc_url, provider, _private_key) = // contract deployed at 0x3e5608baE5e195F7EB12792f0Ba1aEf911F364E9 on base sepolia spawn_anvil(Some("https://sepolia.base.org"), Some(13037026)); - + let message = "Example Message"; let hash_message: FixedBytes<32> = eip191_hash_message(message.as_bytes()); let signature:Bytes = alloy::hex::decode("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000000000111d8c5e6edcd92aeac9ee215372ebf3264300a429ae6dd79f93d71781d1a397d747b83a603182db717314be83bf9ae0d18d0652294a09d8d472a0cdd6f4a11c80000000000000000000000000000000000000000000000000000000000000025f9351d6932d2b1c9aca4fee013c4ff2672f712f28e9c37330bac4fa19292b8351d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008f7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2274337659526847564b6258504a476c506e51676d79495950573079442d356b497675536e497a494d485a4d222c226f726967696e223a2268747470733a2f2f6b6579732d626574612e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000").unwrap().into(); diff --git a/src/test_helpers.rs b/src/test_helpers.rs index f8f8465..b1f8896 100644 --- a/src/test_helpers.rs +++ b/src/test_helpers.rs @@ -26,7 +26,7 @@ pub fn spawn_anvil( block_number: Option, ) -> (AnvilInstance, String, ReqwestProvider, SigningKey) { // let anvil = if fork_url.is_none() && block_number.is_none() { - let anvil = Anvil::at(format_foundry_dir("bin/anvil")).spawn(); + let anvil = Anvil::at(format_foundry_dir("bin/anvil")).spawn(); let rpc_url = anvil.endpoint(); let provider = ReqwestProvider::::new_http(anvil.endpoint_url()); let private_key = anvil.keys().first().unwrap().clone();