lib/etherlite/contract/event_base.rb in etherlite-0.5.1 vs lib/etherlite/contract/event_base.rb in etherlite-0.5.2

- old
+ new

@@ -21,19 +21,21 @@ '0x' + Etherlite::Utils.sha3(signature) end def self.decode(_connection, _json) new( + _json['blockHash'], _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, :address, :attributes + attr_reader :block_hash, :block_number, :tx_hash, :address, :attributes - def initialize(_block_number, _tx_hash, _address, _attributes) + def initialize(_block_hash, _block_number, _tx_hash, _address, _attributes) + @block_hash = _block_hash @block_number = _block_number @tx_hash = _tx_hash @address = _address @attributes = _attributes end