QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
[
"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
$adr_FOP = var[ $AA_PF ][ '_FOP' ]; \r
\r
// Comprova existeix Subscripcio receptora\r
$subscripcio = var[ $AA_Subscripcions ][ 'subscripcio_' || $receptora ]; \r
if ( ! $subscripcio ) \r
{ bounce ( $nom_AA || ": L'adreça receptora no està subscrita per rebre compensacions." ); }\r
\r
// Comprova q cicle renovat per receptora 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
$resp = $nom_AA || ": L'adreça receptora no ha renovat la subscripció per rebre compensacions.";\r
if ( ! $cicle_renovat ) { bounce ( $resp ); }\r
if ( $cicle_actual > $cicle_renovat ) { bounce ( $resp ); }\r
}\r
\r
$derivacio = $qt * $subscripcio.aFOP / 100; \r
\r
}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "{ $unitat }",
"outputs": [
{
"address": "{ $receptora }",
"amount": "{ $qt - $derivacio }"
},
{
"address": "{ $adr_FOP }",
"amount": "{ $derivacio }"
}
]
}
},
{
"app": "state",
"state": "{\r
\r
var[ 'total_Compensacions' ] += $qt;\r
var[ 'total_Compensacions_de_' || $adr__ ] += $qt;\r
var[ 'total_Compensacions_a_' || $receptora ] += $qt;\r
var[ 'total_Compensacions_de_' || $adr__ || '_a_' || $receptora ] += $qt;\r
\r
response[ 'Total Compensacions ' ] = var[ 'total_Compensacions' ];\r
response[ 'Total Compensacions ' || ' de ' || $adr__ ] = var[ 'total_Compensacions_de_' || $adr__ ];\r
response[ 'Total Compensacions ' || ' a ' || $receptora ] = var[ 'total_Compensacions_a_' || $receptora ];\r
response[ 'Total Compensacions ' || ' de ' || $adr__ || ' a ' || $receptora ] = var[ 'total_Compensacions_de_' || $adr__ || '_a_' || $receptora ];\r
\r
var[ 'total_Derivacions' ] += $qt;\r
var[ 'total_Derivacions_de_' || $receptora ] += $qt;\r
\r
response[ 'Total Derivacions ' ] = var[ 'total_Derivacions' ];\r
response[ 'Total Derivacions ' || ' de ' || $receptora ] = var[ 'total_Derivacions_de_' || $receptora ];\r
\r
}"
}
]
}
]
- MCI: 1740367
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"Total Compensacions ": 240000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W": 240000,
"Total Compensacions a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 240000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 240000,
"Total Derivacions ": 240000,
"Total Derivacions de GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 240000
}
}
- MCI: 1739602
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"Total Compensacions ": 160000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W": 160000,
"Total Compensacions a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 160000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 160000,
"Total Derivacions ": 160000,
"Total Derivacions de GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 160000
}
}
- MCI: 1737912
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"Total Compensacions ": 80000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W": 80000,
"Total Compensacions a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 80000,
"Total Compensacions de C4KIJSUWVM7BGWTLXKX3K4PNRXV7OY4W a GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 80000,
"Total Derivacions ": 80000,
"Total Derivacions de GIIYFJXPZW3KH5MPQKRLZTWO4LIXX25R": 80000
}
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
10.11.2020 18:04:49
QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
out
10.11.2020 18:04:49
in
QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
10.11.2020 09:34:39
QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
out
10.11.2020 09:34:39
in
QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
09.11.2020 10:48:31
QMWILGUTUC7NMNXGHZXLCE445SHNC26Y
out