Class: TezosClient::SmartpyInterface
- Inherits:
-
Object
- Object
- TezosClient::SmartpyInterface
- Includes:
- Logger, SmartpyWrapper
- Defined in:
- lib/tezos_client/smartpy_interface.rb,
lib/tezos_client/smartpy_inteface/smartpy_wrapper.rb
Defined Under Namespace
Modules: 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 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.
10 11 12 |
# File 'lib/tezos_client/smartpy_interface.rb', line 10 def @options end |
Instance Method Details
#json_scripts(args) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/tezos_client/smartpy_interface.rb', line 12 def json_scripts(args) compile_to_michelson(args) do |contract_script_filename, init_script_filename| micheline_contract = File.read(contract_script_filename) micheline_storage = File.read(init_script_filename) [JSON.parse(micheline_storage), JSON.parse(micheline_contract)] end end |
#origination_script(args) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/tezos_client/smartpy_interface.rb', line 21 def origination_script(args) json_init_script, json_contract_script = json_scripts(args) { code: json_contract_script, storage: json_init_script } end |