throw an exception if event name isn't found
This commit is contained in:
parent
91ef36fa4c
commit
d4e9e4a533
@ -893,9 +893,9 @@ class Contract
|
||||
|
||||
$eventLogData = [];
|
||||
|
||||
//if there's no data for this event, no need to proceed further
|
||||
//ensure the event actually exists before trying to filter for it
|
||||
if (!array_key_exists($eventName, $this->events)) {
|
||||
return $eventLogData;
|
||||
throw new InvalidArgumentException("'{$eventName}' does not exist in the ABI for this contract");
|
||||
}
|
||||
|
||||
//indexed and non-indexed event parameters must be treated separately
|
||||
|
Loading…
Reference in New Issue
Block a user