[
"autonomous agent",
{
"init": "{
$nom_AA = 'Implementacions';
$adr__ = trigger.address;
$args = trigger.data;
$proces = $args.proces;
$qt = 1e9;
}",
"messages": {
"cases": [
{
"if": "{ $proces == "configuracio" }",
"messages": [
{
"app": "asset",
"payload": {
"cap": "{ $qt }",
"is_private": false,
"is_transferrable": true,
"auto_destroy": false,
"fixed_denominations": false,
"issued_by_definer_only": true,
"cosigned_by_definer": false,
"spender_attested": false
}
},
{
"app": "state",
"state": "{ var[ response_unit ] = $adr__; }"
}
]
},
{
"if": "{ $proces == "dotacio" }",
"init": "{
$resp_unit = $args.resp_unit;
$_configuradora = var[ $resp_unit ] otherwise '_';
if( $_configuradora != $adr__ )
bounce( 'No autoritzada. Configuradora: ' || $_configuradora );
}",
"messages": [
{
"app": "data",
"payload": "{ $args }"
},
{
"app": "payment",
"payload": {
"asset": "{ $resp_unit }",
"outputs": [
{
"address": "{ $args._Emissions }",
"amount": "{ $qt }"
}
]
}
}
]
}
]
}
}
]