N42X3QD6AHF3NUXABVJDJ75LXTE66RB4
[
"autonomous agent",
{
"init": "{
$aa_name = "DANAA"; // Dynamic Asset Names Autonomous Agent;
$owner = "
O7NYCFUL5XIJTYE3O4MKGMGMTN6ATQAJ"; // could withdraw the dust is calculable.
$unit_id = trigger.data.unit_id otherwise false;
$shortName = trigger.data.shortName otherwise false;
$issuer = trigger.data.issuer otherwise trigger.address;
$ticker = trigger.data.ticker otherwise false;
$decimals = trigger.data.decimal otherwise false;
$name = trigger.data.decimal otherwise $shortName||" by "||$author;
$description = trigger.data.description otherwise "Asset called "||$shortName||" issued by "||$issuer||", with "||$decimals||" decimals available. Its ticker is "||$ticker||" and it is defined by the unit '"||$unit_id||"'.";
}",
"messages": {
"cases": [
{
"if": "{ $unit_id and $shortName and $ticker and $decimals }",
"init": "{
// check
if (var[$unit_id])
if (trigger.address != var[$unit_id||"_author"])
bounce ("Already registered and not by you!");
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$author}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
},
{
"app": "state",
"state": "{
var[$unit_id||"_shortName"] = $shortName;
var[$unit_id||"_issuer"] = $author;
var[$unit_id||"_name"] = $name;
var[$unit_id||"_ticker"] = $ticker;
var[$unit_id||"_decimals"] = $decimals;
var[$unit_id||"_description"] = $description;
}"
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
bounce ("Specify the following fields: 'unit_id', 'shotname', 'ticker', 'decimal' and optionaly 'name, 'issuer' and description' that can be by defualt build from the first fields'.");
}"
}
]
}
]
}
}
]
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount