Unit ID
Z0WMO6VYgotLBzY/yD59gIg+ci1f5AoRFfw07gobWw0=
Received
07.07.2021 17:20:12
Confirmation delay (full node)
3 minutes 20 seconds
Confirmation delay (light node)
5 minutes 14 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": [ { "if": "{ $sentit == 'sortida' }", "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,492 bytes
(452 headers, 3040 payload)
Level:2065676
Witnessed level:2065669
Main chain index:2057677
Latest included mc index:2057676
Status:stable/confirmed/final