Class: TezosClient::SmartpyInterface
- Inherits:
-
Object
- Object
- TezosClient::SmartpyInterface
- Includes:
- Logger, MichelineSerializerWrapper, SmartpyWrapper
- Defined in:
- lib/tezos_client/smartpy_interface.rb,
lib/tezos_client/smartpy_inteface/smartpy_wrapper.rb,
lib/tezos_client/smartpy_inteface/micheline_serializer_wrapper.rb
Defined Under Namespace
Modules: MichelineSerializerWrapper, SmartpyWrapper
Constant Summary
Constants included from Logger
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Methods included from MichelineSerializerWrapper
#actual_project_path, #convert_michelson_to_micheline
Methods included from SmartpyWrapper
Methods included from Logger
#log, #tezos_contents_log, #tezos_contents_log_filter
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/tezos_client/smartpy_interface.rb', line 12 def end |
Instance Method Details
#json_scripts(args) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/tezos_client/smartpy_interface.rb', line 14 def json_scripts(args) compile_to_michelson(args) do |contract_script_filename, init_script_filename| micheline_contract = File.read(contract_script_filename) micheline_storage = convert_michelson_to_micheline(File.read(init_script_filename)) [JSON.parse(micheline_storage), JSON.parse(micheline_contract)] end end |
#origination_script(args) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/tezos_client/smartpy_interface.rb', line 23 def origination_script(args) json_init_script, json_contract_script = json_scripts(args) { code: json_contract_script, storage: json_init_script } end |