Unit ID
KjBWqO6nYRrarAHyeh01rH9vXE7WQSN94PiRejn1oGw=
Received
01.02.2021 20:23:22
Confirmation delay (full node)
1 minute 53 seconds
Confirmation delay (light node)
4 minutes 24 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $nom_AA = 'Validacions'; $darrera_versio = '0000000000'; //$_Portal_original = '0000000000'; $_Portal_original = trigger.address; //Hauria de ser fix amb adr darrer Portal $_Portal_actual = var[ 'nou_portal' ] otherwise $_Portal_original; if ( $_Portal_actual != trigger.address ) { $_Portal = substring( var[ $_Portal_actual ][ 'versions' ], 0, 32 ); if( $_Portal != trigger.address ) { bounce ( 'Portal no reconegut' ); } } else { $_Portal = $_Portal_actual; } // Principals $args = trigger.data; $adr__ = trigger.initial_address; $_unitat = trigger.output[[ asset != base ]].asset; $qt = 10; // Pendent de definició!!! $proces = $args.proces; $idprop = $args.idprop; $generics = var[ $_Portal ][ 'generics' ]; $entitats = var[ $_Portal ][ 'entitats' ]; $versions_portal = var[ $_Portal ][ 'versions' ] otherwise $_Portal; $versions_validacions = var[ $_Portal ][ 'versions_validacions' ] otherwise this_address; // Funcions // Si no s'ha lliurat l'argument especificat bota l'accés $__arg = $arg => $args[ $arg ] otherwise bounce( "Cal proporcionar el valor de: " || $arg ); $__dada = $refval => { data_feed[[ oracles = $versions_validacions, feed_name = $refval, ifnone = false ]] }; $__dada_proposta = $refval => { data_feed[[ oracles = $versions_portal, feed_name = $refval, ifnone = false ]] }; // Comprovacions // La proposta encara no pot estar validada if ( $__dada_proposta( 'validacio_' || $idprop ) ) { bounce( 'Ja validada' ); } // La proposta ha d'existir if ( ! $__dada_proposta( $idprop ) ) { bounce( 'No hi ha cap proposta amb aquesta id' ); } // Processos // Temporalment, per als TESTS!!!............................... if ( $proces == 'validacio_directa_TEST' ) { $validacio_aprovada = true; } }", "messages": [ { "if": "{ $validacio_aprovada }", "app": "data_feed", "payload": { "{ 'validacio_' || $idprop }": "{ timestamp }" } }, { "app": "state", "state": "{ response[ 'Procés' ] = $proces; response[ 'Proposta' ] = $idprop; // -- Nou Portal if ( $_Portal != $_Portal_actual ) { var[ 'anterior_portal' ] = var[ 'nou_portal' ]; var[ 'nou_portal' ] = $_Portal; response[ 'Nou portal' ] = $_Portal; } }" } ] } ]
Technical information
Fees:
3,438 bytes
(452 headers, 2986 payload)
Level:1870249
Witnessed level:1870242
Main chain index:1862338
Latest included mc index:1862337
Status:stable/confirmed/final