VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
[
"autonomous agent",
{
"init": "{\r
$nom_AA = 'Getons';\r
// Portal\r
//$_Portal = '5WVBJQHTEP54AEYUJGTQKWTXTXZSJQWA';\r
$_Portal = trigger.address; //Hauria de ser fix amb adr Portal original\r
if ( $_Portal != trigger.address ) bounce ( 'Portal no reconegut' );\r
\r
// Principals\r
$args = trigger.data;\r
$adr__ = trigger.initial_address;\r
$idgeto = trigger.output[[ asset != base ]].asset;\r
$dades = $args.dades otherwise {};\r
\r
$__dada = $refval => {\r
data_feed[[ oracles = $args._Registre, feed_name = $refval, ifnone = false ]]\r
};\r
\r
// Abreviacions\r
$proces = $args.proces;\r
$operacio = $args.operacio;\r
$idprop = $args.idprop;\r
$ref = $args.ref;\r
$val = $args.val;\r
\r
// Si no s'ha lliurat l'argument especificat bota l'accés\r
$__arg = $arg =>\r
$args[ $arg ] otherwise\r
bounce( "Cal proporcionar el valor de: " || $arg );\r
\r
$refgeto = 'geto_' || $__arg( 'nomgeto' );\r
\r
// El getó ha de constar com a operatiu\r
$estat = $__dada( $refgeto || '_estat' ) otherwise '';\r
if ( $estat != 'operatiu' )\r
bounce( 'Getó inexistent o no operatiu' );\r
\r
// Només les admins...\r
$_AUT_A = $__dada( $refgeto || '_AUT_A' ) otherwise '';\r
$_AUT_B = $__dada( $refgeto || '_AUT_B' ) otherwise '';\r
$_AUT_C = $__dada( $refgeto || '_AUT_C' ) otherwise '';\r
\r
$aut_provisional = ! $__dada( $refgeto || '_AUT_0' );\r
\r
if ( ! $aut_provisional AND \r
$_AUT_A != $adr__ AND $_AUT_B != $adr__ AND $_AUT_C != $adr__ )\r
bounce ( 'No autoritzada per administrar el getó' );\r
\r
if ( $proces == 'esmena_geto' ) {\r
$definidors_esmenables = \r
'taxa_conversio, derivacio, import_activacio, ' ||\r
'import_subscripcio, import_renovacio, ' ||\r
'cicles_diposit, _AUT_A, _AUT_B, _AUT_C';\r
\r
if ( $operacio == 'proposta' ) {\r
$refdef = $ref otherwise 'cap';\r
if ( ! contains( $definidors_esmenables, $refdef ) )\r
bounce( 'Definidor inexistent o no esmenable' );\r
\r
if ( $__dada( $refgeto || '_valors_esmenables') < 1 )\r
bounce( "Els valors definidors d'aquest getó no són esmenables" );\r
\r
$dades[ $idprop ] = timestamp;\r
$dades[ $idprop || '_proposant' ] = $adr__;\r
$dades[ $idprop || '_refgeto' ] = $refgeto;\r
$dades[ $idprop || '_ref' ] = $__arg( 'ref' );\r
$dades[ $idprop || '_val' ] = $__arg( 'val' );\r
}\r
if ( $operacio == 'confirmacio' ) {\r
$refg = $__dada( $idprop || '_refgeto' );\r
$refval = $__dada( $idprop || '_ref' );\r
$dades[ $refg || '_' || $refval ] = $__dada( $idprop || '_val' );\r
}\r
if ( $operacio == 'drecera' AND $aut_provisional ) {\r
$dades[ $refgeto || '_' || $__arg( 'ref' ) ] = $__arg( 'val' );\r
}\r
}\r
\r
if ( $proces == 'capacitacio' ) {\r
if ( $__dada( $refgeto || '_' || $__arg( 'accio' ) || 'ns_restringides') < 1 )\r
bounce( 'Acció no restringible per a aquest getó' );\r
\r
if ( $operacio == 'proposta' ) {\r
$dades[ $idprop ] = timestamp;\r
$dades[ $idprop || '_capacitadora' ] = $adr__;\r
$dades[ $idprop || '_geto' ] = $refgeto;\r
$dades[ $idprop || '_accio' ] = $__arg( 'accio' );\r
$dades[ $idprop || '_capacitada' ] = $__arg( 'adr' );\r
$dades[ $idprop || '_estat' ] = $__arg( 'estat' );\r
}\r
if ( $operacio == 'confirmacio' ) {\r
$get = $__dada( $idprop || '_refgeto' );\r
$acc = $__dada( $idprop || '_accio' );\r
$adr = $__dada( $idprop || '_capacitada' );\r
$ref_capacitacio = 'CPC_' || $get || '_' || $acc || '_' || $adr;\r
$dades[ $ref_capacitacio ] = $__dada( $idprop || '_estat' );\r
}\r
if ( $operacio == 'drecera' AND $aut_provisional ) {\r
$ref_capacitacio =\r
'CPC_' || $refgeto || '_' || $__arg( 'accio' ) || '_' || $__arg( 'adr' );\r
$dades[ $ref_capacitacio ] = $__arg( 'estat' );\r
}\r
}\r
\r
if ( $proces == 'avis' ) {\r
$rebot =\r
$__dada( $refgeto || '_bloqueig_possible' ) ?\r
$__arg( 'rebot' ) :\r
false;\r
\r
if ( $operacio == 'proposta' ) {\r
$dades[ $idprop ] = timestamp;\r
$dades[ $idprop || '_redactora' ] = $adr__;\r
$dades[ $idprop || '_geto' ] = $refgeto;\r
$dades[ $idprop || '_destinataria' ] = $__arg( 'adr' );\r
$dades[ $idprop || '_rebot' ] = $rebot;\r
$dades[ $idprop || '_text' ] = $__arg( 'text' );\r
}\r
if ( $operacio == 'confirmacio' ) {\r
$get = $__dada( $idprop || '_refgeto' );\r
$adr = $__dada( $idprop || '_destinataria' );\r
$refavis = 'avis_' || $get || '_' || $adr;\r
$dades[ $refavis ] = timestamp;\r
$dades[ $refavis || '_rebot' ] = $__dada( $idprop || '_rebot' );\r
$dades[ $refavis || '_text' ] = $__dada( $idprop || '_text' );\r
}\r
if ( $operacio == 'drecera' AND $aut_provisional ) {\r
$refavis = 'avis_' || $refgeto || '_' || $__arg( 'adr' );\r
$dades[ $refavis ] = timestamp;\r
$dades[ $refavis || '_rebot' ] = $rebot;\r
$dades[ $refavis || '_text' ] = $__arg( 'text' );\r
}\r
}\r
\r
$registre = {};\r
$registre.dades = $dades;\r
}",
"messages": [
{
"app": "data",
"payload": "{ $registre }"
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{ $args._Registre }",
"amount": "{ $__dada( 'Provisio' ) }"
}
]
}
},
{
"app": "state",
"state": "{\r
response[ 'valors_esmenables' ] = $__dada( $refgeto || '_valors_esmenables');\r
response[ 'Romanent Getons' ] = balance[ base ] || ' bytes';\r
response[ 'proces' ] = $proces;\r
response[ 'operacio' ] = $operacio;\r
}"
}
]
}
]
- MCI: 2042567
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "17620 bytes",
"proces": "avis",
"operacio": "drecera"
}
}
- MCI: 2042298
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "18536 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042277
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "19455 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042262
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "20370 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042254
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "21377 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042246
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "22180 bytes",
"proces": "esmena_geto",
"operacio": "drecera"
}
}
- MCI: 2042204
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "23098 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042198
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "24108 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
- MCI: 2042191
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "24911 bytes",
"proces": "esmena_geto",
"operacio": "drecera"
}
}
- MCI: 2042153
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"valors_esmenables": 1,
"Romanent Getons": "25827 bytes",
"proces": "capacitacio",
"operacio": "drecera"
}
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
22.06.2021 10:16:55
VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
out
22.06.2021 10:16:55
in
VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
21.06.2021 17:12:48
VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
out
21.06.2021 17:12:48
in
VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
21.06.2021 17:07:12
VAGXAQLIJZDP2XRH4O7LBISE4ZLAD44A
out