Unit ID
JatzIi471SXa1I9PpopvZlVNV2kxZeoIM9dfRNywNwg=
Received
22.02.2021 09:39:26
Confirmation delay (full node)
2 minutes 10 seconds
Confirmation delay (light node)
4 minutes 55 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $nom_AA = 'Consultes'; $versio = '0.1'; $args = trigger.data; $_Portal = $args._Portal; $refcons = $args.refcons; $refgeto = $args.geto; $generics = var[ $_Portal ][ 'generics' ]; $versions = var[ $_Portal ][ 'versions' ] otherwise {}; $versions.Portal = $versions.Portal otherwise $_Portal; $versions.Accions = $versions.Accions otherwise $generics._Accions; $versions.Getons = $versions.Getons otherwise $generics._Getons; $versions.Validacions = $versions.Validacions otherwise $generics._Validacions; $versions.Validadores = $versions.Validadores otherwise $generics.Validadores; $dades_accions = var[ $generics._Accions ]; $__dada = $refval => { data_feed[[ oracles = $versions.Portal, feed_name = $refval, ifnone = false ]] }; $__dada_accions = $refval => { data_feed[[ oracles = $versions.Accions, feed_name = $refval, ifnone = false ]] }; $__dada_getons = $refval => { data_feed[[ oracles = $versions.Getons, feed_name = $refval, ifnone = false ]] }; $__dada_AA = $refval, $vers => { data_feed[[ oracles = $vers, feed_name = $refval, ifnone = false ]] }; }", "messages": [ { "app": "state", "state": "{ response[ 'consulta' ] = $refcons; if ( $refcons == 'Portal' ) { $__resp = $r => { response[ $r ] = $generics[ $r ]; }; $refs_generics = [ '_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', '_AUT_0', '_AUT_A', '_AUT_B', '_AUT_C' ]; $respon = map( $refs_generics, 21, $__resp ); response[ 'Versions portal' ] = $versions.Portal; response[ 'Versions Accions' ] = $versions.Accions; response[ 'Versions Getons' ] = $versions.Getons; response[ 'Versions Validacions' ] = $versions.Validacions; response[ 'Versions Validadores' ] = $versions.Validadores; } if ( $refcons == 'Valor_Generic' ) { response[ 'Valor ' || $args.ref ] = $generics[ $args.ref ]; } if ( $refcons == 'Valor_Dada' ) { response[ 'Valor ' || $args.ref ] = $__dada( $args.ref ); } if ( $refcons == 'Darrera_Proposta' ) { $ordinals = var[ $_Portal ][ 'ordinals' ]; $id_proposta = $args.ref || '_' || $ordinals[ $args.ref ]; if ( $__dada( $id_proposta ) ) { $temps_prop = $__dada( $id_proposta ); $data_confirmacio = $temps_prop + $generics.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_AA( 'validacio_' || $id_proposta, $versions.Validacions ); if ( is_integer( $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 genèric' ] = $id_proposta; } } 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 + $generics.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_AA( 'validacio_' || $args.ref, $versions.Validacions ); if ( is_integer( $data_validacio ) ) { response[ 'Hora validació' ] = timestamp_to_string( $data_validacio, 'time' ); response[ 'Data validació' ] = timestamp_to_string( $data_validacio, 'date' ); } } if ( $refcons == 'Validacio' ) { $data_validacio = $__dada_AA( 'validacio_' || $args.idprop, $versions.Validacions ); response[ 'Proposta' ] = $args.idprop; if ( is_integer( $data_validacio ) ) { response[ 'Hora validació' ] = timestamp_to_string( $data_validacio, 'time' ); response[ 'Data validació' ] = timestamp_to_string( $data_validacio, 'date' ); } } if ( $refcons == 'Dades_Geto' ) { $refs_getons = var[ $_Portal ][ 'refs_getons' ]; $ids_getons = var[ $_Portal ][ 'ids_getons' ]; 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_getons( $refgeto || '_' || $r ); }; $resps = map( $refs, 6, $__resposta ); response[ 'Data implementació' ] = timestamp_to_string( $__dada_getons( $refgeto ), 'date' ); response[ 'Hora implementació' ] = timestamp_to_string( $__dada_getons( $refgeto ), 'time' ); } if ( $refcons == 'Dades_Node' ) { $ref_activacio = 'activacio_' || $args.adr || '_en_' || $refgeto; $activacio = $__dada_accions( $ref_activacio ); if ( $activacio ) { $cicle_renovacio = $dades_accions[ 'renovacio_' || $args.adr || '_' || $refgeto ]; response[ 'Node ' || $args.adr || ' activat per a' ] = $refgeto; response[ 'Nom node' ] = $__dada_accions( $ref_activacio || '_nom' ); response[ 'Aportació per activació' ] = $__dada_accions( $ref_activacio || '_qt' ); response[ 'Cicle activació' ] = $__dada_accions( $ref_activacio || '_cicle' ); response[ 'Escala activació' ] = $__dada_accions( $ref_activacio || '_escala' ); response[ 'Data activació' ] = timestamp_to_string( $__dada_accions( $ref_activacio), 'date' ); $ref_subscripcio = 'subscripcio_' || $args.adr || '_en_' || $refgeto; $subscripcio = $__dada_accions( $ref_subscripcio ); if ( $subscripcio ) { response[ 'Subscripció per a ' || $refgeto || ' de' ] = $args.adr; response[ 'Nom subscripció' ] = $__dada_accions( $ref_subscripcio || '_nom' ); response[ '% derivació' ] = $__dada_accions( $ref_subscripcio || '_derivacio' ); response[ 'Cicle subscripció' ] = $__dada_accions( $ref_subscripcio || '_cicle' ); response[ 'Data subscripció' ] = timestamp_to_string( $__dada_accions( $ref_subscripcio ), 'date' ); response[ 'Hora subscripció' ] = timestamp_to_string( $__dada_accions( $ref_subscripcio ), 'time' ); response[ 'Total derivacions' ] = $__dada( 'total_derivacions_' || $args.adr || '_en_' || $refgeto ); response[ 'Darrer cicle renovat' ] = $__dada_accions( 'renovacio_' || $args.adr || '_en_' || $refgeto || '_cicle' ); } $ref_avis = 'avis_' || $refgeto || '_' || $args.adr; $temps_avis = $__dada_getons( $ref_avis ); if ( $temps_avis ) { $avis_es_actual = $temps_avis + ( $generics.Lapse * 2 ) < timestamp; if ( $avis_es_actual ) { response[ 'Avís' ] = $__dada_getons( $ref_avis ); response[ 'Hora' ] = timestamp_to_string( $temps_avis, 'time' ); response[ 'Data' ] = timestamp_to_string( $temps_avis, 'date' ); response[ 'Rebot' ] = $__dada_getons( $ref_avis || '_rebot' ); } } } else { response[ 'adr ' || $args.adr ] = 'NO activada per a ' || $refgeto; } response[ 'Cicle actual' ] = $__dada_accions( 'cicle_actual' ); } 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_accions( 'total_activacions_en_' || $refgeto ); $total_subscripcions = $__dada_accions( 'total_subscripcions_en_' || $refgeto ); $total_renovacions = $__dada_accions( 'total_renovacions_en_' || $refgeto ); $total_diposits = $__dada_accions( 'total_diposits_en_' || $refgeto ); $total_contribucions = $__dada_accions( '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' ) { $cicle_actual = $__dada_accions( 'cicle_actual' ); $data_cicle_actual = $__dada_accions( 'data_cicle_actual' ); response[ 'Cicle Actual' ] = $cicle_actual; response[ 'Escala del cicle' ] = $__dada_accions( 'escala_cicle_actual' ); response[ 'Data del cicle' ] = timestamp_to_string( $data_cicle_actual, 'date' ); response[ 'Data en segons' ] = $data_cicle_actual; } if ( $refcons == 'Avis' ) { $ref_avis = 'avis_' || $refgeto || '_' || $args.adr; $temps_avis = $__dada_getons( $ref_avis ); $avis_es_actual = $temps_avis + ( $generics.Lapse * 2 ) < timestamp; if ( $avis_es_actual ) { response[ 'Avís' ] = $__dada_getons( $ref_avis ); response[ 'Hora' ] = timestamp_to_string( $temps_avis, 'time' ); response[ 'Data' ] = timestamp_to_string( $temps_avis, 'date' ); response[ 'Rebot' ] = $__dada_getons( $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_getons( $ref_capacitacio ); } }" } ] } ]
Technical information
Fees:
11,124 bytes
(452 headers, 10672 payload)
Level:1892494
Witnessed level:1892487
Main chain index:1884530
Latest included mc index:1884529
Status:stable/confirmed/final