Unit ID
qMrHfRe2INapkuDPC7uN8muXBv7ItTDhxPBhUJFGdLs=
Received
04.03.2021 11:23:25
Confirmation delay (full node)
6 minutes 28 seconds
Confirmation delay (light node)
8 minutes 41 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $nom_AA = 'Consultes'; $versio = '0.1'; $args = trigger.data; $refcons = $args.refcons; $refgeto = $args.geto; $__dada = $refval => var[ $args._Registre ][ $refval ]; }", "messages": [ { "app": "state", "state": "{ response[ 'consulta' ] = $refcons; $Lapse = $__dada( 'Lapse' ); $cicle_actual = $__dada( 'cicle_actual' ); // Definidors if ( $refcons == 'Definidors' ) { $__resp = $r => { response[ $r ] = $__dada( $r ); }; $refs_definidors = [ '_Accions', '_Getons', '_Validacions', '_Validadores', '_FRO', '_Estels', 'Interval', 'Lapse', 'Import_Activacio', 'Import_Subscripcio', 'Import_Renovacio', 'Taxa_Conversio', 'Factor_Conversio', 'Generacio_Minima', 'Nombre_Delegades', 'Nombre_Aprovacions', 'Cicles_Diposit', 'Diposit_Minim', '_AUT_0', '_AUT_A', '_AUT_B', '_AUT_C' ]; $respon = map( $refs_definidors, 22, $__resp ); } if ( $refcons == 'Valor_Definidor' ) response[ 'Valor ' || $args.ref ] = $__dada( $args.ref ); if ( $refcons == 'Valor_Proposta' ) { response[ 'Ref proposta ' || $args.ref ] = $__dada( $args.ref || '_ref' ); response[ 'Valor proposta ' || $args.ref ] = $__dada( $args.ref || '_val' ); response[ 'Proposant proposta ' || $args.ref ] = $__dada( $args.ref || '_proposant' ); $temps_prop = $__dada( $args.ref ); $data_confirmacio = $temps_prop + $Lapse; response[ 'Data de la proposta' ] = timestamp_to_string( $temps_prop, 'date' ); response[ 'Data inici confirmacio' ] = timestamp_to_string( $data_confirmacio, 'date' ); $data_validacio = $__dada( 'validacio_' || $args.ref ); if ( !! $data_validacio ) { response[ 'Hora validació' ] = timestamp_to_string( $data_validacio, 'time' ); response[ 'Data validació' ] = timestamp_to_string( $data_validacio, 'date' ); } } if ( $refcons == 'Darrera_Proposta' ) { $ordinal_prop = $__dada( 'ordinal_' || $args.ref ); $id_proposta = $args.ref || '_' || $ordinal_prop; if ( !! $__dada( $id_proposta ) ) { $temps_prop = $__dada( $id_proposta ); $data_confirmacio = $temps_prop + $Lapse; response[ 'Proposant' ] = $__dada( $id_proposta || '_proposant' ); response[ 'Data de la proposta' ] = timestamp_to_string( $temps_prop, 'date' ); response[ 'Data inici confirmacio' ] = timestamp_to_string( $data_confirmacio, 'date' ); $data_validacio = $__dada( 'validacio_' || $id_proposta ); if ( !! $data_validacio ) { response[ 'Hora validació' ] = timestamp_to_string( $data_validacio, 'time' ); response[ 'Data validació' ] = timestamp_to_string( $data_validacio, 'date' ); } } else response[ 'No hi ha cap proposta per a aquest param definidor' ] = $id_proposta; } if ( $refcons == 'Validacio' ) { $data_validacio = $__dada( 'validacio_' || $args.idprop ); response[ 'Proposta' ] = $args.idprop; if ( !! $data_validacio ) { response[ 'Hora validació' ] = timestamp_to_string( $data_validacio, 'time' ); response[ 'Data validació' ] = timestamp_to_string( $data_validacio, 'date' ); } } /* if ( $refcons == 'Dades_Geto' ) { response[ 'Id getó' ] = $ids_getons[ $refgeto ]; $refs = [ '_FOG', '_AUT_A', 'factor_conversio', 'valors_esmenables', 'llistats_editables', 'bloqueig_possible', 'import_activacio', 'import_subscripcio', 'import_renovacio', 'taxa_conversio', 'cicles_diposit', 'derivacio', '_AUT_B', '_AUT_C', '_AUT_0' ]; $__resposta = $r => { response[ $r ] = $__dada( $refgeto || '_' || $r ); }; $resps = map( $refs, 15, $__resposta ); response[ 'Data implementació' ] = timestamp_to_string( $__dada( $refgeto ), 'date' ); response[ 'Hora implementació' ] = timestamp_to_string( $__dada( $refgeto ), 'time' ); } */ if ( $refcons == 'Dades_Node' ) { $ref_activacio = 'activacio_' || $args.adr || '_en_' || $refgeto; $activacio = $__dada( $ref_activacio ); if ( !! $activacio ) { $cicle_renovacio = $__dada( 'renovacio_' || $args.adr || '_' || $refgeto ); response[ 'Node ' || $args.adr || ' activat per a' ] = $refgeto; response[ 'Nom node' ] = $__dada( $ref_activacio || '_nom' ); response[ 'Aportació per activació' ] = $__dada( $ref_activacio || '_qt' ); response[ 'Cicle activació' ] = $__dada( $ref_activacio || '_cicle' ); response[ 'Escala activació' ] = $__dada( $ref_activacio || '_escala' ); response[ 'Data activació' ] = timestamp_to_string( $__dada( $ref_activacio), 'date' ); $ref_subscripcio = 'subscripcio_' || $args.adr || '_en_' || $refgeto; $subscripcio = $__dada( $ref_subscripcio ); if ( !! $subscripcio ) { response[ 'Subscripció per a ' || $refgeto || ' de' ] = $args.adr; response[ 'Nom subscripció' ] = $__dada( $ref_subscripcio || '_nom' ); response[ '% derivació' ] = $__dada( $ref_subscripcio || '_derivacio' ); response[ 'Cicle subscripció' ] = $__dada( $ref_subscripcio || '_cicle' ); response[ 'Data subscripció' ] = timestamp_to_string( $__dada( $ref_subscripcio ), 'date' ); response[ 'Hora subscripció' ] = timestamp_to_string( $__dada( $ref_subscripcio ), 'time' ); response[ 'Total derivacions' ] = $__dada( 'total_derivacions_' || $args.adr || '_en_' || $refgeto ); response[ 'Darrer cicle renovat' ] = $__dada( 'renovacio_' || $args.adr || '_en_' || $refgeto || '_cicle' ); } $ref_avis = 'avis_' || $refgeto || '_' || $args.adr; $temps_avis = $__dada( $ref_avis ); if ( !! $temps_avis ) { $avis_es_actual = $temps_avis + ( $Lapse * 2 ) < timestamp; if ( $avis_es_actual ) { response[ 'Avís' ] = $__dada( $ref_avis || '_text' ); response[ 'Hora' ] = timestamp_to_string( $temps_avis, 'time' ); response[ 'Data' ] = timestamp_to_string( $temps_avis, 'date' ); response[ 'Rebot' ] = $__dada( $ref_avis || '_rebot' ); } } } else { response[ 'adr ' || $args.adr ] = 'NO activada per a ' || $refgeto; } response[ 'Cicle actual' ] = $cicle_actual; } if ( $refcons == 'Dades_Diposit' ) { response[ 'Ref' ] = $args.ref; response[ 'Quantitat dipositada' ] = $__dada( $args.ref ); response[ 'Dipositant' ] = $__dada( $args.ref || '_dipositant' ); response[ 'Cicle dipòsit' ] = $__dada( $args.ref || '_cicle' ); response[ 'Getó dipòsit' ] = $__dada( $args.ref || '_geto_diposit' ); response[ 'Data dipòsit' ] = $__dada( $args.ref || '_data'); //response[ 'Data dipòsit' ] = timestamp_to_string( $__dada( $args.ref || '_data'), 'date' ); response[ 'Taxa' ] = $__dada( $args.ref || '_taxa' ); response[ 'Qt conversió' ] = $__dada( $args.ref || '_qt_conversio' ); response[ 'Cicle conversió' ] = $__dada( $args.ref || '_cicle_conversio' ); } if ( $refcons == 'Dades_Contribucio' ) { $data_cont = $__dada( $args.ref || '_data'); response[ 'Ref' ] = $args.ref; response[ 'Quantitat' ] = $__dada( $args.ref ); response[ 'Contribuidora' ] = $__dada( $args.ref || '_contribuidora' ); response[ 'Cicle contribució' ] = $__dada( $args.ref || '_cicle' ); response[ 'Escala contribució' ] = $__dada( $args.ref || '_escala' ); response[ 'Data contribució' ] = $data_cont; response[ 'Data contribució' ] = timestamp_to_string( $data_cont, 'date' ); response[ 'Total Contribucions' ] = $__dada( 'total_contribucions_en_estels' ); } if ( $refcons == 'Totals' ) { $total_geto = $__dada( 'total_en_' || $refgeto ); $total_FOP = $__dada( 'total_FOP_en_' || $refgeto ); $total_derivacions = $__dada( 'total_derivacions_en_' || $refgeto ); $total_activacions = $__dada( 'total_activacions_en_' || $refgeto ); $total_subscripcions = $__dada( 'total_subscripcions_en_' || $refgeto ); $total_renovacions = $__dada( 'total_renovacions_en_' || $refgeto ); $total_diposits = $__dada( 'total_diposits_en_' || $refgeto ); $total_contribucions = $__dada( 'total_contribucions_en_' || $refgeto ); response[ 'Total Getó' ] = $total_geto; response[ 'Total FOP' ] = $total_FOP; response[ 'Total Activacions' ] = $total_activacions; response[ 'Total Subscripcions' ] = $total_subscripcions; response[ 'Total Renovacions' ] = $total_renovacions; response[ 'Total Contribucions' ] = $total_contribucions; response[ 'Total Derivacions' ] = $total_derivacions; response[ 'Total Diposits' ] = $total_diposits; } if ( $refcons == 'Cicle_Actual' ) { $data_cicle = $__dada( 'data_cicle_' || $cicle_actual ); response[ 'Cicle Actual' ] = $cicle_actual; response[ 'Escala del cicle' ] = $__dada( 'escala_cicle_' || $cicle_actual ); response[ 'Data en segons' ] = $data_cicle; response[ 'Data del cicle' ] = timestamp_to_string( $data_cicle, 'date' ); } if ( $refcons == 'Escala_Actual' ) { $escala_actual = $__dada( 'escala_actual' ); $data_escala = $__dada( 'data_escala_' || $escala_actual ); response[ 'Escala Actual' ] = $escala_actual; response[ "Cicle del salt d'escala" ] = $__dada( 'cicle_escala_' || $escala_actual ); response[ "Data del salt d'escala" ] = timestamp_to_string( $data_escala, 'date' ); response[ 'Data en segons' ] = $data_escala; response[ 'Total Aportacions a FOP' ] = $__dada( 'total_FOP_en_estels' ); } if ( $refcons == 'Avis' ) { $ref_avis = 'avis_' || $refgeto || '_' || $args.adr; $temps_avis = $__dada( $ref_avis ); $avis_es_actual = $temps_avis + ( $Lapse * 2 ) < timestamp; if ( $avis_es_actual ) { response[ 'Avís' ] = $__dada( $ref_avis|| '_text' ); response[ 'Hora' ] = timestamp_to_string( $temps_avis, 'time' ); response[ 'Data' ] = timestamp_to_string( $temps_avis, 'date' ); response[ 'Rebot' ] = $__dada( $ref_avis || '_rebot' ); } else { response[ 'No hi ha cap avís per a' ] = $args.adr; } } if ( $refcons == 'Capacitacio' ) { $ref_capacitacio = 'capacitacio_' || $refgeto || '_' || $args.accio || '_' || $args.adr; response[ 'Capacitacio' ] = $__dada( $ref_capacitacio ); } if ( $refcons == 'Romanents' ) { $_Portal = $args._Portal; response[ 'Romanent en bytes' ] = balance[ $_Portal ][ base ]; response[ "Romanent en estels" ] = balance[ $_Portal ][ $__dada( '_Estels' ) ]; } }" } ] } ]
Technical information
Fees:
11,478 bytes
(452 headers, 11026 payload)
Level:1905639
Witnessed level:1905631
Main chain index:1897675
Latest included mc index:1897674
Status:stable/confirmed/final