| 1 | [ |
| 2 | "autonomous agent", |
| 3 | { |
| 4 | "init": "{ |
| 5 | $nom_AA = 'Implementacions'; |
| 6 | |
| 7 | $accio = trigger.data.accio; |
| 8 | $resp_unit = trigger.data.resp_unit; |
| 9 | $receptora = trigger.data.receptora; |
| 10 | $qt = 1e9; |
| 11 | }", |
| 12 | "messages": { |
| 13 | "cases": [ |
| 14 | { |
| 15 | "if": "{ $accio == "configuracio" }", |
| 16 | "messages": [ |
| 17 | { |
| 18 | "app": "asset", |
| 19 | "payload": { |
| 20 | "cap": "{ $qt }", |
| 21 | "is_private": false, |
| 22 | "is_transferrable": true, |
| 23 | "auto_destroy": false, |
| 24 | "fixed_denominations": false, |
| 25 | "issued_by_definer_only": true, |
| 26 | "cosigned_by_definer": false, |
| 27 | "spender_attested": false |
| 28 | } |
| 29 | }, |
| 30 | { |
| 31 | "app": "state", |
| 32 | "state": "{ var[response_unit] = trigger.address; }" |
| 33 | } |
| 34 | ] |
| 35 | }, |
| 36 | { |
| 37 | "if": "{ $accio == "dotacio" AND $resp_unit AND var[$resp_unit] == trigger.address }", |
| 38 | "messages": [ |
| 39 | { |
| 40 | "app": "payment", |
| 41 | "payload": { |
| 42 | "asset": "{ $resp_unit }", |
| 43 | "outputs": [ |
| 44 | { |
| 45 | "address": "{ $receptora }", |
| 46 | "amount": "{ $qt }" |
| 47 | } |
| 48 | ] |
| 49 | } |
| 50 | } |
| 51 | ] |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | } |
| 56 | ] |