S5GWLH7OZFUKN3S7MTYJF7BC7MIS52AD
[
"autonomous agent",
{
"messages": {
"cases": [
{
"if": "{
$define_usd = trigger.data.define_usd AND !var['usd_asset'];
$define_byte = trigger.data.define_byte AND !var['byte_asset'];
if ($define_usd AND $define_byte)
bounce("can't define both assets at the same time");
$define_usd OR $define_byte
}",
"messages": [
{
"app": "asset",
"payload": {
"is_private": false,
"is_transferrable": false,
"auto_destroy": false,
"fixed_denominations": false,
"issued_by_definer_only": false,
"cosigned_by_definer": false,
"spender_attested": false
}
},
{
"app": "state",
"state": "{
$asset = $define_usd ? 'usd_asset' : 'byte_asset';
var[$asset] = response_unit;
response[$asset] = response_unit;
}"
}
]
},
{
"if": "{trigger.output[[asset=base]] >= 1e5 AND var['usd_asset'] AND var['byte_asset']}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{var['usd_asset']}",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{ trigger.output[[asset=base]] }"
}
]
}
},
{
"app": "payment",
"payload": {
"asset": "{var['byte_asset']}",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{ trigger.output[[asset=base]] }"
}
]
}
}
]
}
]
}
}
]
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount