lib/etherlite/contract/event_base.rb in etherlite-0.2.4 vs lib/etherlite/contract/event_base.rb in etherlite-0.2.5
- old
+ new
@@ -23,18 +23,20 @@
def self.decode(_connection, _json)
new(
_json['blockNumber'].nil? ? nil : Etherlite::Utils.hex_to_uint(_json['blockNumber']),
_json['transactionHash'],
+ Etherlite::Address.new(_connection, Etherlite::Utils.normalize_address(_json['address'])),
DecodeLogInputs.for(connection: _connection, inputs: inputs, json: _json)
)
end
- attr_reader :block_number, :tx_hash, :attributes
+ attr_reader :block_number, :tx_hash, :address, :attributes
- def initialize(_block_number, _tx_hash, _attributes)
+ def initialize(_block_number, _tx_hash, _address, _attributes)
@block_number = _block_number
@tx_hash = _tx_hash
+ @address = _address
@attributes = _attributes
end
end
end