Unit ID
7Z6Bo8n6nSBUqtfiLxwHByQO9dMgP2G97eioiVl7MfE=
Received
13.07.2021 16:34:53
Confirmation delay (full node)
3 minutes 56 seconds
Confirmation delay (light node)
5 minutes 9 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $nom_AA = 'FOP'; $versio = '0.01'; //$_Registre = '5WVBJQHTEP54AEYUJGTQKWTXTXZSJQWA'; $_Registre = trigger.data._Registre; // * només x tests $adr__ = trigger.initial_address; $args = trigger.data; $unitat_entrant = trigger.output[[ asset != base ]].asset; // Retorna una dada del Registre $__dada = $refdada => data_feed[[ oracles = $_Registre, feed_name = $refdada, ifnone = 0 ]]; // $_Portal = $__dada( '_Portal' ); $_Portal = trigger.address; // * només x tests if ( $_Portal != trigger.address AND $__dada( '_Accions' ) != trigger.address ) bounce( 'Accés interdit' ); $id_estels = $__dada( 'Estels' ); $ref_asset = $unitat_entrant == 'none' ? 'base' : $unitat_entrant; $unitat = $unitat_entrant == 'none' ? 'Bytes' : $unitat_entrant == $id_estels ? 'Estels' : $__dada( 'geto_' || $unitat_entrant ); $sentit = $args.sentit; $unitat_entrada = $unitat; $unitat_sortida = $args.unitat; $total_entrades = $__dada( 'total_entrades_' || $unitat_entrada ) otherwise 0; $total_sortides = $__dada( 'total_sortides_' || $unitat_sortida ) otherwise 0; $registre = {}; $dades = {}; $qt_entrada = trigger.output[[ asset = $ref_asset ]]; $nou_total_entrades = $total_entrades + $qt_entrada; $ord_entrada = $__dada( 'ordinal_entrada' ) + 1; $ref_entrada = 'entrada_' || $ord_entrada; $ord_sortida = $__dada( 'ordinal_sortida' ) + 1; $ref_sortida = 'entrada_' || $ord_sortida; $qt_sortida = $args.qt; $rebedora = $args.rebedora; $nou_total_sortides = $total_sortides + $qt_sortida; if ( $sentit == 'entrada' OR $sentit == 'ambdos' ) { $dades[ $ref_entrada || '_data' ] = timestamp; $dades[ $ref_entrada || '_emissora' ] = $adr__; $dades[ $ref_entrada || '_unitat' ] = $unitat_entrada; $dades[ 'total_entrades_' || $unitat_entrada ] = $nou_total_entrades; $dades[ 'ordinal_entrada' ] = $ord_entrada; } if ( $sentit == 'sortida' OR $sentit == 'ambdos' ) { $dades[ $ref_sortida || '_data' ] = timestamp; $dades[ $ref_sortida || '_actuant' ] = $adr__; $dades[ $ref_sortida || '_rebedora' ] = $rebedora; $dades[ $ref_sortida || '_unitat' ] = $unitat_sortida; $dades[ 'total_sortides_' || $unitat_sortida ] = $nou_total_sortides; $dades[ 'ordinal_sortida' ] = $ord_sortida; } $registre.dades = $dades; }", "messages": [ { "if": "{ $sentit == 'sortida' }", "app": "payment", "payload": { "asset": "{ $unitat_sortida }", "outputs": [ { "address": "{ $rebedora }", "amount": "{ $qt_sortida }" } ] } }, { "app": "data", "payload": "{ $registre }" }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $_Registre }", "amount": "{ $__dada( 'Provisio' ) }" } ] } }, { "app": "state", "state": "{ if ( $sentit == 'entrada' OR $sentit == 'ambdos' ) { response[ 'Emissora' ] = $adr__; response[ 'Ref entrada' ] = $ref_entrada; response[ 'Qt entrada' ] = $qt_entrada; response[ 'Unitat entrada' ] = $unitat_entrada; } if ( $sentit == 'sortida' OR $sentit == 'ambdos' ) { response[ 'Rebedora' ] = $rebedora; response[ 'Ref sortida' ] = $ref_sortida; response[ 'Qt sortida' ] = $qt_sortida; response[ 'Unitat sortida' ] = $unitat_sortida; } response[ 'Total entrades en ' || $unitat_entrada ] = $nou_total_entrades otherwise $total_entrades; response[ 'Total sortides en ' || $unitat_sortida ] = $nou_total_sortides otherwise $total_sortides; response[ 'Romanent en Bytes' ] = balance[ this_address ][ base ]; response[ 'Romanent en Estels' ] = balance[ this_address ][ $id_estels ]; if( $unitat != 'Bytes' AND $unitat != 'Estels' ) response[ 'Romanent en ' || $unitat ] = balance[ this_address ][ $ref_asset ]; }" } ] } ]
Technical information
Fees:
5,258 bytes
(452 headers, 4806 payload)
Level:2083803
Witnessed level:2083796
Main chain index:2075484
Latest included mc index:2075483
Status:stable/confirmed/final