Method: Eth::Abi::Event#type

Defined in:
lib/eth/abi/event.rb

#type(input) ⇒ String

Gets the input type for events.



51
52
53
54
55
56
57
58
59
# File 'lib/eth/abi/event.rb', line 51

def type(input)
  if input["type"] == "tuple"
    "(#{input["components"].map { |c| type(c) }.join(",")})"
  elsif input["type"] == "enum"
    "uint8"
  else
    input["type"]
  end
end