Skip to content

Commit 2badfe0

Browse files
authored
Merge pull request #289 from semiotic-ai/suchapalaver/remove-unused-draft-benchmark-work
chore(eip712): remove draft benchmark code w/ verify method
2 parents 4b5ccd1 + 151c005 commit 2badfe0

File tree

4 files changed

+0
-143
lines changed

4 files changed

+0
-143
lines changed

tap_core/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,3 @@ thegraph-core = { workspace = true, features = ["alloy-signer-mnemonic"] }
2828
[features]
2929
default = ["in_memory"]
3030
in_memory = ["dep:tap_graph"]
31-
32-
[[bench]]
33-
name = 'timeline_aggretion_protocol_benchmark'
34-
harness = false

tap_core/benches/timeline_aggretion_protocol_benchmark.rs

Lines changed: 0 additions & 100 deletions
This file was deleted.

tap_core/src/lib.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,4 @@ mod tap_tests {
163163

164164
assert!(signed_rav.recover_signer(&domain_separator).unwrap() == keys.1);
165165
}
166-
167-
#[rstest]
168-
#[test]
169-
fn verify_signature(
170-
keys: (PrivateKeySigner, Address),
171-
allocation_ids: Vec<Address>,
172-
domain_separator: Eip712Domain,
173-
) {
174-
let signed_message = Eip712SignedMessage::new(
175-
&domain_separator,
176-
Receipt::new(allocation_ids[0], 42).unwrap(),
177-
&keys.0,
178-
)
179-
.unwrap();
180-
181-
assert!(signed_message.verify(&domain_separator, keys.1).is_ok());
182-
assert!(signed_message
183-
.verify(
184-
&domain_separator,
185-
Address::from_str("0x76f4eeD9fE41262669D0250b2A97db79712aD855").unwrap()
186-
)
187-
.unwrap());
188-
}
189166
}

tap_eip712_message/src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,6 @@ impl<M: SolStruct> Eip712SignedMessage<M> {
105105
Ok(recovered_address)
106106
}
107107

108-
/// Checks that receipts signature is valid for given verifying key, returns `Ok(true)` if it is valid.
109-
///
110-
/// # Errors
111-
///
112-
/// Returns [`crate::Error::SignatureError`] if the recovered address from the
113-
/// signature is not equal to `expected_address`
114-
///
115-
pub fn verify(
116-
&self,
117-
domain_separator: &Eip712Domain,
118-
expected_address: Address,
119-
) -> Result<bool, Eip712Error> {
120-
let recovered_address = self.recover_signer(domain_separator)?;
121-
Ok(recovered_address != expected_address)
122-
}
123-
124108
/// Use this as a simple key for testing
125109
pub fn unique_hash(&self) -> MessageId {
126110
MessageId(self.message.eip712_hash_struct().into())

0 commit comments

Comments
 (0)