Unit ID
n8ROs8kDwX0iDoGgDfU1VdFpuYBjR8znkJFNHtKeHJg=
Received
07.07.2021 16:34:04
Confirmation delay (full node)
2 minutes 28 seconds
Confirmation delay (light node)
3 minutes 42 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $nom_AA = 'FOP'; $versio = '0.01'; //$_Registre = '5WVBJQHTEP54AEYUJGTQKWTXTXZSJQWA'; $_Registre = trigger.data._Registre; // * només x tests // Retorna una dada del Registre $__dada = $refdada => data_feed[[ oracles = $_Registre, feed_name = $refdada, ifnone = 0 ]]; $adr__ = trigger.address; $args = trigger.data; $proces = $args.proces; // $_Portal = $__dada( '_Portal' ); $_Portal = trigger.address; // * només x tests if ( $_Portal != trigger.address AND $__dada( '_Accions' ) != trigger.address ) bounce( 'Accés interdit' ); $qt = $args.qt; $unitat = $args.unitat == 'bytes' ? 'base' : $__dada( 'Estels' ); $emissora = $args.emissora; $rebedora = $args.rebedora; $sentit = $args.sentit; $ord_moviment = $__dada( 'ordinal_' || $sentit ) + 1; $ref_moviment = $sentit || '_' || $ord_moviment; $total_entrades = $__dada( 'total_entrades' ); $total_sortides = $__dada( 'total_sortides' ); $registre = {}; $dades = {}; $dades[ $ref_moviment || '_data' ] = timestamp; $dades[ $ref_moviment || '_qt' ] = $qt; $dades[ $ref_moviment || '_unitat' ] = $unitat; if ( $sentit == 'entrada' ) { $nou_total_entrades = $total_entrades + $qt; $dades[ $ref_moviment || '_emissora' ] = $emissora; $dades[ 'total_entrades' ] = $nou_total_entrades; } if ( $sentit == 'sortida' ) { $nou_total_sortides = $total_sortides + $qt; $dades[ $ref_moviment || '_rebedora' ] = $rebedora; $dades[ 'total_sortides' ] = $nou_total_sortides; } $dades[ 'ordinal_' || $sentit ] = $ord_moviment; $registre.dades = $dades; }", "messages": [ { "app": "payment", "payload": { "asset": "{ $unitat }", "outputs": [ { "address": "{ $rebedora }", "amount": "{ $args.qt }" } ] } }, { "app": "data", "payload": "{ $registre }" }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $_Registre }", "amount": "{ $__dada( 'Provisio' ) }" } ] } }, { "app": "state", "state": "{ response[ 'Ref moviment' ] = $ref_moviment; response[ 'Unitat' ] = $unitat; response[ 'Qt' ] = $qt; response[ 'Total entrades' ] = $nou_total_entrades otherwise $total_entrades; response[ 'Total sortides' ] = $nou_total_sortides otherwise $total_sortides; if ( $sentit == 'entrada' ) response[ 'Emissora' ] = $emissora; if ( $sentit == 'sortida' ) response[ 'Rebedora' ] = $rebedora; }" } ] } ]
Technical information
Fees:
3,466 bytes
(452 headers, 3014 payload)
Level:2065532
Witnessed level:2065525
Main chain index:2057533
Latest included mc index:2057532
Status:stable/confirmed/final