Class: TezosClient::Tools::AnnotsToType

Inherits:
ActiveInteraction::Base
  • Object
show all
Defined in:
lib/tezos_client/tools/annots_to_type.rb

Constant Summary collapse

TYPES_MAPPING =
{
  int: :int,
  nat: :int,
  string: :string,
  signature: :string,
  bytes: :bytes,
  timestamp: :int,
  key: :string,
  address: :string
}.freeze

Instance Method Summary collapse

Instance Method Details

#executeObject



25
26
27
28
29
# File 'lib/tezos_client/tools/annots_to_type.rb', line 25

def execute
  return { "prim" => typed_annots.values.first } if typed_annots.size == 1

  { "prim" => "pair", "args" => generate_type_args(ordered_annots) }
end