| 1 | [ |
| 2 | "autonomous agent", |
| 3 | { |
| 4 | "init": "{ |
| 5 | $nom_AA = 'Emissions'; |
| 6 | |
| 7 | |
| 8 | $_Registre = trigger.data._Registre; |
| 9 | |
| 10 | |
| 11 | $__dada = $refdada => |
| 12 | data_feed[[ oracles = $_Registre, feed_name = $refdada, ifnone = '' ]]; |
| 13 | |
| 14 | |
| 15 | $_Portal = trigger.address; |
| 16 | if ( $_Portal != trigger.address ) bounce ( 'Portal no reconegut' ); |
| 17 | |
| 18 | $args = trigger.data; |
| 19 | $proces = $args.proces; |
| 20 | }", |
| 21 | "messages": { |
| 22 | "cases": [ |
| 23 | { |
| 24 | "if": "{ $proces == "emissio" }", |
| 25 | "messages": [ |
| 26 | { |
| 27 | "app": "payment", |
| 28 | "payload": { |
| 29 | "asset": "{ $args.idgeto }", |
| 30 | "outputs": [ |
| 31 | { |
| 32 | "address": "{ $args._FOP }", |
| 33 | "amount": "{ $args.total_emissio }" |
| 34 | } |
| 35 | ] |
| 36 | } |
| 37 | } |
| 38 | ] |
| 39 | }, |
| 40 | { |
| 41 | "if": "{ $proces == 'dotacio' }", |
| 42 | "messages": [ |
| 43 | { |
| 44 | "app": "state", |
| 45 | "state": "{ |
| 46 | $refgeto = $args.refgeto; |
| 47 | $resp_unit = $args.resp_unit; |
| 48 | var[ 'refgeto_' || $resp_unit ] = $refgeto; |
| 49 | var[ $refgeto || '_id' ] = $resp_unit; |
| 50 | response[ 'Id' ] = $resp_unit; |
| 51 | response[ 'Procés' ] = 'dotacio'; |
| 52 | }" |
| 53 | } |
| 54 | ] |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | } |
| 59 | ] |