Unit ID
m0c4+KlezMan/GqqmOagK8MFTy3xw+xlal3Cjt9RAK0=
Received
12.02.2021 18:15:29
Confirmation delay (full node)
5 minutes 0 seconds
Confirmation delay (light node)
7 minutes 37 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 this_address; $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 ); response[ 'data inici confirmacio' ] = timestamp_to_string( $data_confirmacio ); $data_validacio = $__dada_AA( 'validacio_' || $id_proposta, $versions.Validacions ); response[ 'proposta validada' ] = $data_validacio ? timestamp_to_string( $data_validacio ) : 'NO'; } 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[ 'val 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 ); response[ 'data inici confirmacio' ] = timestamp_to_string( $data_confirmacio ); $data_validacio = $__dada_AA( 'validacio_' || $args.ref, $versions.Validacions ); response[ 'proposta validada' ] = $data_validacio ? timestamp_to_string( $data_validacio ) : 'NO'; } if ( $refcons == 'Validacio' ) { $data_validacio = $__dada_AA( 'validacio_' || $args.idprop, $versions.Validacions ); response[ 'Proposta' ] = $args.idprop; response[ 'Validada' ] = $data_validacio ? timestamp_to_string( $data_validacio ) : 'NO'; } 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[ 'temps' ] = timestamp_to_string( $__dada_getons( $refgeto ) ); } 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[ 'adr ' || $args.adr || ' activada per a' ] = $refgeto; response[ 'Nom' ] = $__dada_accions( $ref_activacio || '_nom' ); response[ 'Qt' ] = $__dada_accions( $ref_activacio || '_qt' ); response[ 'Cicle' ] = $__dada_accions( $ref_activacio || '_cicle' ); response[ 'Escala' ] = $__dada_accions( $ref_activacio || '_escala' ); response[ 'Data' ] = timestamp_to_string( $__dada_accions( $ref_activacio) ); $ref_subscripcio = 'subscripcio_' || $args.adr || '_en_' || $refgeto; $subscripcio = $__dada_accions( $ref_subscripcio ); if ( $subscripcio ) { response[ 'adr ' || $args.adr || ' subscrita per a' ] = $refgeto; response[ 'Nom' ] = $__dada_accions( $ref_subscripcio || '_nom' ); response[ '% Derivació' ] = $__dada_accions( $ref_subscripcio || '_derivacio' ); response[ 'Cicle Subscripció' ] = $__dada_accions( $ref_subscripcio || '_cicle' ); response[ 'Data' ] = timestamp_to_string( $__dada_accions( $ref_subscripcio ) ); response[ 'Total Derivacions' ] = $__dada( 'total_derivacions_' || $args.adr || '_en_' || $refgeto ); response[ 'Cicle Renovat' ] = $__dada_accions( 'renovacio_' || $args.adr || '_en_' || $refgeto ); } $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 i data' ] = timestamp_to_string( $temps_avis ); response[ 'Rebot' ] = $__dada_getons( $ref_avis || '_rebot' ); } } } else { response[ 'adr ' || $args.adr ] = 'NO activada per a ' || $refgeto; } } if ( $refcons == 'Totals' ) { $total_unitat = $__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 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[ 'Data Cicle Actual' ] = timestamp_to_string( $data_cicle_actual ); response[ 'Data Cicle Actual milisegons' ] = $data_cicle_actual; response[ 'Escala cicle Actual' ] = $__dada_accions( 'escala_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[ 'Temps' ] = timestamp_to_string( $temps_avis ); 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:
10,134 bytes
(452 headers, 9682 payload)
Level:1882381
Witnessed level:1882374
Main chain index:1874417
Latest included mc index:1874416
Status:stable/confirmed/final