HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
[
"autonomous agent",
{
"init": "{
$banker = 'JBGMJI7XSKLKNHZF26BUBWHVUZSDV3P5';
$base_key = 'balance_'||trigger.address;
}",
"messages": {
"cases": [
{
"if": "{
$secret = trigger.data.secret;
$total = var[$base_key]+trigger.output[[asset=base]]-1000;
$secret
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{$total}"
}
]
}
},
{
"app": "state",
"state": "{
var['total'] = var['total']-var[$base_key];
var[$base_key] = 0;
response['message'] = 'withdrawn:' || $total|| ' bytes';
}"
}
]
},
{
"if": "{
$allowed = balance[base]-trigger.output[[asset=base]]-var['total']-1000;
$banker == trigger.address AND trigger.data.withdraw AND $allowed > 0
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{$allowed}"
}
]
}
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
var['total'] = var['total']+trigger.output[[asset=base]];
var[$base_key] = var[$base_key] + trigger.output[[asset=base]];
response['message'] = 'accepted:' || trigger.output[[asset=base]] || ' bytes' ;
}"
}
]
}
]
}
}
]
- MCI: 972001
- Not bounced
- Response unit:
- Response: {}
- MCI: 971971
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"message": "withdrawn:19000 bytes"
}
}
- MCI: 971967
- Not bounced
- Response: {
"responseVars": {
"message": "accepted:10000 bytes"
},
"error": "no messages after filtering"
}
- MCI: 971964
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"message": "withdrawn:19000 bytes"
}
}
- MCI: 971943
- Not bounced
- Response: {
"responseVars": {
"message": "accepted:10000 bytes"
},
"error": "no messages after filtering"
}
- MCI: 971924
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"message": "withdrawn:19000 bytes"
}
}
- MCI: 971909
- Not bounced
- Response: {
"responseVars": {
"message": "accepted:10000 bytes"
},
"error": "no messages after filtering"
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
28.07.2019 12:50:16
HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
out
28.07.2019 12:50:16
in
HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
28.07.2019 12:42:47
HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
out
28.07.2019 12:42:47
in
HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
28.07.2019 12:41:15
HSS2VBIIJHU3QINLZUAGI5PYNW6KUILA
out