class TezosClient::Tools::HashToMicheline
Public Instance Methods
execute()
click to toggle source
# File lib/tezos_client/tools/hash_to_micheline.rb, line 24 def execute TezosClient::Tools::HashToMicheline::Base.new(data: _params, type: _storage_type).value end
Private Instance Methods
_entrypoint()
click to toggle source
# File lib/tezos_client/tools/hash_to_micheline.rb, line 37 def _entrypoint @_entrypoint ||= blockchain_client.select_entrypoint( contract_address: contract_address, entrypoint: entrypoint ) end
_params()
click to toggle source
# File lib/tezos_client/tools/hash_to_micheline.rb, line 29 def _params if params.respond_to?(:keys) && params.keys.size == 1 && !_storage_type.key?(:annots) params.values.first else params end end
_storage_type()
click to toggle source
# File lib/tezos_client/tools/hash_to_micheline.rb, line 44 def _storage_type (storage_type.presence || blockchain_client.entrypoint(contract_address, _entrypoint)).deep_symbolize_keys end
storage_type_or_contract_address_presence()
click to toggle source
# File lib/tezos_client/tools/hash_to_micheline.rb, line 48 def storage_type_or_contract_address_presence return if storage_type.present? ^ (contract_address.present?) errors.add(:base, "You should provide the contract_address and the entrypoint only if storage_type is not provided") end