PH6VC6DVWUXPJKFIJG4QI7JC26V3XFSG
[
"autonomous agent",
{
"doc_url": "api.myjson.com/bins/708ae",
"messages": {
"cases": [
{
"if": "{
$key = 'balance_'||trigger.address||'_'||trigger.data.asset;
$base_key = 'balance_'||trigger.address||'_'||'base';
$fee = 1000;
$required_amount = trigger.data.amount + ((trigger.data.asset == 'base') ? $fee : 0);
trigger.data.withdraw AND trigger.data.asset AND trigger.data.amount AND $required_amount <= var[$key] AND $fee <= var[$base_key]
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{trigger.data.asset}",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{trigger.data.amount}"
}
]
}
},
{
"app": "state",
"state": "{
var[$key] = var[$key] - trigger.data.amount;
var[$base_key] = var[$base_key] - $fee;
}"
}
]
},
{
"if": "{!trigger.data.withdraw}",
"messages": [
{
"app": "state",
"state": "{
$asset = trigger.output[[asset!=base]].asset;
if ($asset == 'ambiguous')
bounce('ambiguous asset');
if (trigger.output[[asset=base]] > 10000){
$base_key = 'balance_'||trigger.address||'_'||'base';
var[$base_key] = var[$base_key] + trigger.output[[asset=base]];
$response_base = trigger.output[[asset=base]] || ' bytes\
';
}
if ($asset != 'none'){
$asset_key = 'balance_'||trigger.address||'_'||$asset;
var[$asset_key] = var[$asset_key] + trigger.output[[asset=$asset]];
$response_asset = trigger.output[[asset=$asset]] || ' of ' || $asset || '\
';
}
response['message'] = 'accepted coins:\
' || ($response_base otherwise '') || ($response_asset otherwise '');
}"
}
]
}
]
}
}
]
- MCI: 1182380
- Not bounced
- Response: {
"responseVars": {
"message": "accepted coins:\
88 of U135uzLs2PDLUkZKBiJDuNS9I/1eR9WbbCHwMzrml/Y=\
"
},
"info": "no messages after filtering"
}
- MCI: 1182361
- Not bounced
- Response: {
"responseVars": {
"message": "accepted coins:\
3 of UccpQo12uLmufihkzdK7Kcrb5BlHp8GcMrSEA7NVdNw=\
"
},
"info": "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
12.01.2020 01:24:36
in
PH6VC6DVWUXPJKFIJG4QI7JC26V3XFSG
12.01.2020 01:24:36
in
PH6VC6DVWUXPJKFIJG4QI7JC26V3XFSG
12.01.2020 01:15:54
in
PH6VC6DVWUXPJKFIJG4QI7JC26V3XFSG
12.01.2020 01:15:54
in
PH6VC6DVWUXPJKFIJG4QI7JC26V3XFSG