| 1 | [ |
| 2 | "autonomous agent", |
| 3 | { |
| 4 | "bounce_fees": { |
| 5 | "base": 10000 |
| 6 | }, |
| 7 | "init": "{$operator = var['operator'];}", |
| 8 | "messages": [ |
| 9 | { |
| 10 | "if": "{$operator}", |
| 11 | "app": "payment", |
| 12 | "payload": { |
| 13 | "asset": "base", |
| 14 | "outputs": [ |
| 15 | { |
| 16 | "if": "{$operator == trigger.address}", |
| 17 | "address": "{trigger.address}" |
| 18 | }, |
| 19 | { |
| 20 | "if": "{$operator != trigger.address}", |
| 21 | "address": "{trigger.data.address ? trigger.data.address : trigger.address}", |
| 22 | "amount": "{trigger.output[[asset=base]] - 1000}" |
| 23 | } |
| 24 | ] |
| 25 | } |
| 26 | }, |
| 27 | { |
| 28 | "if": "{!$operator}", |
| 29 | "app": "state", |
| 30 | "state": "{var['operator'] = trigger.address;}" |
| 31 | } |
| 32 | ] |
| 33 | } |
| 34 | ] |