OEH5PWI64SM2ZA7PV6FSQBKMGHAX6FXO
[
"autonomous agent",
{
"init": "{
$f = 1000;
$addr = trigger.address;
$inp = trigger.output[[asset=base]];
}",
"messages": {
"cases": [
{
"if": "{
$total = var[$addr] + $inp - $f;
trigger.data.withdraw AND trigger.data.withdraw != 'all'
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$addr}",
"amount": "{$total}"
}
]
}
},
{
"app": "state",
"state": "{
var[$addr] = 0;
response['message'] = 'withdrawn: ' || $total || ' bytes';
}"
}
]
},
{
"if": "{
$total = balance[base] - $f;
trigger.data.withdraw AND trigger.data.withdraw == 'all'
}",
"messages": [
{
"app": "definition",
"payload": {
"definition": [
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"messages": [
{
"{'if'}": "{trigger.address}",
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
}
]
}
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
var[$addr] = var[$addr] + $inp;
response['message'] = 'got: ' || $inp || ' bytes' ;
}"
}
]
}
]
}
}
]
- MCI: 1123037
- Bounced
- Response: {
"error": "bad if in message"
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
26.10.2019 22:36:19
in
OEH5PWI64SM2ZA7PV6FSQBKMGHAX6FXO