11//! Module contains code for parsing and manipulating event data.
22use crate :: { errors:: ExecutionError , tokens:: Tokenize } ;
33use ethcontract_common:: abi:: { Event as AbiEvent , RawLog as AbiRawLog , Token } ;
4- use web3:: types:: { Log , H256 } ;
4+ use web3:: types:: { Log , H160 , H256 } ;
55
66/// A contract event
77#[ derive( Clone , Debug , Eq , PartialEq ) ]
@@ -125,6 +125,8 @@ impl<T> Event<EventStatus<T>> {
125125/// Additional metadata from the log for the event.
126126#[ derive( Clone , Debug , Eq , PartialEq ) ]
127127pub struct EventMetadata {
128+ /// From which this event originated from
129+ pub address : H160 ,
128130 /// The hash of the block where the log was produced.
129131 pub block_hash : H256 ,
130132 /// The number of the block where the log was produced.
@@ -146,6 +148,7 @@ pub struct EventMetadata {
146148impl EventMetadata {
147149 fn from_log ( log : & Log ) -> Option < Self > {
148150 Some ( EventMetadata {
151+ address : log. address ,
149152 block_hash : log. block_hash ?,
150153 block_number : log. block_number ?. as_u64 ( ) ,
151154 transaction_hash : log. transaction_hash ?,
0 commit comments