diff --git a/ethers-contract/src/contract.rs b/ethers-contract/src/contract.rs index 90d97b3c..c4d4e8c0 100644 --- a/ethers-contract/src/contract.rs +++ b/ethers-contract/src/contract.rs @@ -178,7 +178,7 @@ impl Contract { } /// Returns an [`Event`](crate::builders::Event) builder with the provided name. - pub fn event_by_name(&self, name: &str) -> Result, Error> { + pub fn event_for_name(&self, name: &str) -> Result, Error> { // get the event's full name let event = self.base_contract.abi.event(name)?; Ok(self.event_with_filter(Filter::new().event(&event.abi_signature())))