Method: Etherlite::Contract::EventBase.decode

Defined in:
lib/etherlite/contract/event_base.rb

.decode(_connection, _json) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/etherlite/contract/event_base.rb', line 24

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