ELTLI3LXOXTJYK5PZBWAUV7PF4HZMKUG
[
"autonomous agent",
{
"bounce_fees": {
"base": 10000
},
"init": "{ \r
\r
$nom_AA = 'Compensacions';\r
$versio = '3';\r
\r
$AA_PF = trigger.data.AA_PF;\r
$adr__ = trigger.initial_address;\r
$qt = trigger.output[[asset=base]] - 10000; //bounce-fees \r
$receptora = trigger.data.receptora;\r
\r
$unitat = var[ $AA_PF ][ 'unitat' ]; \r
$AA_Transfers = var[ $AA_PF ][ '_AA_Transfers' ];\r
$AA_Subscripcions = var[ $AA_PF ][ '_AA_Subscripcions' ];\r
$AA_Renovacions = var[ $AA_PF ][ '_AA_Renovacions' ];\r
$AA_Derivacions = var[ $AA_PF ][ '_AA_Derivacions' ];\r
\r
$subscripcio = var[ $AA_Subscripcions ][ 'subscripcio_' || $receptora ]; \r
$derivacio = $qt * $subscripcio.aFOP / 100; \r
\r
// Comprova q cicle renovat per adr__ no és inferior a l'actual\r
$cicle_subscripcio = $subscripcio['cicle'];\r
\r
$cicle_actual = var[ $AA_Transfers ][ 'cicle_actual'];\r
$cicle_renovat = var[ $AA_Renovacions ][ 'cicle_' || $receptora ];\r
\r
if ( $cicle_actual > $cicle_subscripcio ){\r
if ( ! $cicle_renovat ) \r
{ bounce ( $nom_AA || ': Renovació pendent 1 ' || $cicle_actual || ' recep ' || $receptora ); }\r
\r
if ( ! $cicle_renovat ) { bounce ( $nom_AA || ': Renovació pendent' ); }\r
if ( $cicle_actual > $cicle_renovat ) { bounce ( $nom_AA || ': Renovació pendent' ); }\r
}\r
\r
}",
"messages": [
{
"app": "data",
"payload": {
"AA_PF": "{ $AA_PF }",
"emissora": "{ $adr__ }",
"receptora": "{ $receptora }",
"derivacio": "{ $derivacio }",
"accio": "{ $nom_AA }"
}
},
{
"app": "payment",
"payload": {
"asset": "{ $unitat }",
"outputs": [
{
"address": "{ $AA_Transfers }",
"amount": "{ $qt - $derivacio }"
},
{
"address": "{ $AA_Derivacions }",
"amount": "{ $derivacio }"
}
]
}
}
]
}
]
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount