; This file is auto-generated. Do not edit manually: changes may be erased. ; Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. ; If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues ; Aqua version: 0.10.3 (xor (seq (seq (seq (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id) ) (call %init_peer_id% ("getDataSrv" "deal") [] deal) ) (xor (match true false (xor (seq (seq (seq (seq (new $array-inline (seq (seq (seq (seq (ap "skipping deal for deal id" $array-inline) (ap deal.$.info.deal_id! $array-inline) ) (ap "from_block" $array-inline) ) (ap deal.$.block_number! $array-inline) ) (canon %init_peer_id% $array-inline #array-inline-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title) ) (call %init_peer_id% ("run-console" "print") [title #array-inline-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-0] msg_str) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str]) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) ) ) (seq (seq (seq (seq (seq (seq (seq (new $array-inline-1 (seq (seq (seq (seq (ap "joining the deal" $array-inline-1) (ap deal.$.info.deal_id! $array-inline-1) ) (ap "from_block" $array-inline-1) ) (ap deal.$.block_number! $array-inline-1) ) (canon %init_peer_id% $array-inline-1 #array-inline-1-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-0) ) (call %init_peer_id% ("run-console" "print") [title-0 #array-inline-1-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-1-0] msg_str-0) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-0]) ) (null) ) (new $status (seq (seq (new $settings (new $result (seq (seq (seq (seq (seq (seq (new $status-0 (new $result-0 (seq (seq (seq (seq (call %init_peer_id% (spell_id "get_string") ["worker_script"] value) (xor (match value.$.success! false (ap false $status-0) ) (xor (match value.$.absent! true (ap false $status-0) ) (seq (ap value.$.str! $result-0) (ap true $status-0) ) ) ) ) (canon %init_peer_id% $result-0 #-result-fix-0) ) (ap #-result-fix-0 -result-flat-0) ) (new $status-0_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] status-0_incr) (fold $status-0 status-0_fold_var (seq (seq (ap status-0_fold_var $status-0_test) (canon %init_peer_id% $status-0_test #status-0_iter_canon) ) (xor (match #status-0_iter_canon.length status-0_incr (null) ) (next status-0_fold_var) ) ) (never) ) ) (canon %init_peer_id% $status-0_test #status-0_result_canon) ) (ap #status-0_result_canon status-0_gate) ) ) ) ) ) (new $status-1 (new $result-1 (seq (seq (seq (seq (call %init_peer_id% (spell_id "get_string") ["worker_config"] value-0) (xor (match value-0.$.success! false (ap false $status-1) ) (xor (match value-0.$.absent! true (ap false $status-1) ) (seq (ap value-0.$.str! $result-1) (ap true $status-1) ) ) ) ) (canon %init_peer_id% $result-1 #-result-fix-0-0) ) (ap #-result-fix-0-0 -result-flat-0-0) ) (new $status-1_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] status-1_incr) (fold $status-1 status-1_fold_var (seq (seq (ap status-1_fold_var $status-1_test) (canon %init_peer_id% $status-1_test #status-1_iter_canon) ) (xor (match #status-1_iter_canon.length status-1_incr (null) ) (next status-1_fold_var) ) ) (never) ) ) (canon %init_peer_id% $status-1_test #status-1_result_canon) ) (ap #status-1_result_canon status-1_gate) ) ) ) ) ) ) (new $status-2 (new $result-2 (seq (seq (seq (seq (call %init_peer_id% (spell_id "get_string") ["worker_ipfs"] value-1) (xor (match value-1.$.success! false (ap false $status-2) ) (xor (match value-1.$.absent! true (ap false $status-2) ) (seq (ap value-1.$.str! $result-2) (ap true $status-2) ) ) ) ) (canon %init_peer_id% $result-2 #-result-fix-0-1) ) (ap #-result-fix-0-1 -result-flat-0-1) ) (new $status-2_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] status-2_incr) (fold $status-2 status-2_fold_var (seq (seq (ap status-2_fold_var $status-2_test) (canon %init_peer_id% $status-2_test #status-2_iter_canon) ) (xor (match #status-2_iter_canon.length status-2_incr (null) ) (next status-2_fold_var) ) ) (never) ) ) (canon %init_peer_id% $status-2_test #status-2_result_canon) ) (ap #status-2_result_canon status-2_gate) ) ) ) ) ) ) (xor (match status-0_gate.$.[0]! false (xor (seq (seq (seq (seq (seq (new $array-inline-2 (seq (ap "worker_script doesn't set" $array-inline-2) (canon %init_peer_id% $array-inline-2 #array-inline-2-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-1) ) (call %init_peer_id% ("run-console" "print") [title-1 #array-inline-2-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-2-0] msg_str-1) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-1]) ) (ap false $result) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) ) ) (xor (match status-1_gate.$.[0]! false (xor (seq (seq (seq (seq (seq (new $array-inline-3 (seq (ap "worker_config doesn't set" $array-inline-3) (canon %init_peer_id% $array-inline-3 #array-inline-3-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-2) ) (call %init_peer_id% ("run-console" "print") [title-2 #array-inline-3-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-3-0] msg_str-2) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-2]) ) (ap false $result) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) ) ) (xor (match status-2_gate.$.[0]! false (xor (seq (seq (seq (seq (seq (new $array-inline-4 (seq (ap "worker_ipfs doesn't set" $array-inline-4) (canon %init_peer_id% $array-inline-4 #array-inline-4-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-3) ) (call %init_peer_id% ("run-console" "print") [title-3 #array-inline-4-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-4-0] msg_str-3) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-3]) ) (ap false $result) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) ) ) (seq (seq (seq (seq (seq (call %init_peer_id% ("json" "parse") [-result-flat-0.$.[0]!] worker_script) (call %init_peer_id% ("json" "parse") [-result-flat-0-0.$.[0]!] worker_config) ) (call %init_peer_id% ("json" "parse") [-result-flat-0-1.$.[0]!] worker_ipfs) ) (call %init_peer_id% ("json" "obj") ["worker_config" worker_config "worker_ipfs" worker_ipfs "worker_script" worker_script] WorkerSettings_obj) ) (ap WorkerSettings_obj $settings) ) (ap true $result) ) ) ) ) ) (canon %init_peer_id% $settings #-settings-fix-0) ) (ap #-settings-fix-0 -settings-flat-0) ) (new $result_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] result_incr) (fold $result result_fold_var (seq (seq (ap result_fold_var $result_test) (canon %init_peer_id% $result_test #result_iter_canon) ) (xor (match #result_iter_canon.length result_incr (null) ) (next result_fold_var) ) ) (never) ) ) (canon %init_peer_id% $result_test #result_result_canon) ) (ap #result_result_canon result_gate) ) ) ) ) ) (xor (match result_gate.$.[0]! false (ap false $status) ) (xor (seq (seq (call %init_peer_id% ("worker" "create") [deal.$.info.deal_id!] worker_id) (call -relay- ("op" "noop") []) ) (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (call worker_id ("json" "obj") ["deal_id" deal.$.info.deal_id! "ipfs" -settings-flat-0.$.[0].worker_ipfs! "worker_def_cid" deal.$.info.app_cid!] WorkerArgs_obj) (null) ) (call worker_id ("spell" "install") [-settings-flat-0.$.[0].worker_script! WorkerArgs_obj -settings-flat-0.$.[0].worker_config!] worker_spell_id) ) (new $array-inline-5 (seq (seq (seq (seq (seq (seq (ap "created worker for deal" $array-inline-5) (ap deal.$.info.deal_id! $array-inline-5) ) (ap "spell_id" $array-inline-5) ) (ap worker_spell_id $array-inline-5) ) (ap "worker_id" $array-inline-5) ) (ap worker_id $array-inline-5) ) (canon worker_id $array-inline-5 #array-inline-5-0) ) ) ) (call -relay- ("op" "noop") []) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-4) ) (call %init_peer_id% ("run-console" "print") [title-4 #array-inline-5-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-5-0] msg_str-4) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-4]) ) (call -relay- ("op" "noop") []) ) (call worker_id ("json" "obj") ["deal_id" deal.$.info.deal_id! "spell_id" worker_spell_id "worker_id" worker_id] JoinedDeal_obj) ) (call worker_id ("json" "stringify") [JoinedDeal_obj] msg) ) (call worker_id (spell_id "list_push_string") ["joined_deals" msg]) ) (call worker_id ("json" "obj") ["from_block" deal.$.block_number!] DealState_obj) ) (call worker_id ("json" "stringify") [DealState_obj] msg-0) ) (call worker_id (spell_id "set_string") [deal.$.info.deal_id! msg-0]) ) (ap true $status) ) (call -relay- ("op" "noop") []) ) (seq (call -relay- ("op" "noop") []) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5]) ) ) ) (seq (seq (seq (seq (seq (new $array-inline-6 (seq (seq (seq (seq (ap "cannot create worker" $array-inline-6) (ap deal.$.info.deal_id! $array-inline-6) ) (ap %last_error%.$.message! $array-inline-6) ) (ap "; skip" $array-inline-6) ) (canon %init_peer_id% $array-inline-6 #array-inline-6-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-5) ) (call %init_peer_id% ("run-console" "print") [title-5 #array-inline-6-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-6-0] msg_str-5) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-5]) ) (ap false $status) ) ) ) ) (new $status_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] status_incr) (fold $status status_fold_var (seq (seq (ap status_fold_var $status_test) (canon %init_peer_id% $status_test #status_iter_canon) ) (xor (match #status_iter_canon.length status_incr (null) ) (next status_fold_var) ) ) (never) ) ) (canon %init_peer_id% $status_test #status_result_canon) ) (ap #status_result_canon status_gate) ) ) ) ) ) (xor (match status_gate.$.[0]! true (xor (seq (seq (seq (seq (new $array-inline-7 (seq (seq (ap "joined the deal" $array-inline-7) (ap deal.$.info.deal_id! $array-inline-7) ) (canon %init_peer_id% $array-inline-7 #array-inline-7-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-6) ) (call %init_peer_id% ("run-console" "print") [title-6 #array-inline-7-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-7-0] msg_str-6) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-6]) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6]) ) ) (seq (seq (seq (seq (new $array-inline-8 (seq (seq (ap "couldn't join the deal" $array-inline-8) (ap deal.$.info.deal_id! $array-inline-8) ) (canon %init_peer_id% $array-inline-8 #array-inline-8-0) ) ) (call %init_peer_id% ("op" "concat_strings") ["decider <" spell_id ">"] title-7) ) (call %init_peer_id% ("run-console" "print") [title-7 #array-inline-8-0]) ) (call %init_peer_id% ("json" "stringify") [#array-inline-8-0] msg_str-7) ) (call %init_peer_id% (spell_id "list_push_string") ["logs" msg_str-7]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 7]) )