Unit ID
ibpbWNaA3+lt+UOTbb9NH/NzPqSAbqHGXeMqJE6oDZ8=
Received
07.07.2021 15:30:15
Confirmation delay (full node)
2 minutes 15 seconds
Confirmation delay (light node)
3 minutes 23 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; if ( $__dada( '_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,378 bytes
(452 headers, 2926 payload)
Level:2065353
Witnessed level:2065346
Main chain index:2057354
Latest included mc index:2057353
Status:stable/confirmed/final