Transfers view
UTXO view
Obyte.org
Unit Legend
- not on main chain, not stable
- main chain, not stable
- bad unit
- not on main chain, stable/confirmed/final
- main chain, stable/confirmed/final
- not on main chain, selected
- main chain, selected
Close
Close
Unit ID
lj1KAZPLguqXiUiMDaMBI/k5hNHw1uXKqs6gl1E65ao=
Received
31.03.2021 08:05:17
Confirmation delay (full node)
4 minutes 6 seconds
Authors
XD7FVUM442NPIIMLRIT2FYWJEDQ4ILLJ
Children
2jZxPRAO/6gzzYK9sjt1NGt5wMOQEGb5nofgjgcPGwQ=
Parents
JP+quyjDpxBkZAUY8JRzKPYM+t6AHdVgQFxQy4NP944=
RGUXuwAlrUsdK6voIGER6fQTtAbVTqmNe6YGSTc37EU=
Messages
Definition
Address:
IQVEV5VIJVFZXI3AP2IHOXL5U2FWUFPN
Definition:
[ "autonomous agent", { "init": "{\r $nom_AA = 'Validadores';\r \r // Portal\r //$_Portal = '5WVBJQHTEP54AEYUJGTQKWTXTXZSJQWA';\r $_Portal = trigger.address; // * només x tests\r if ( $_Portal != trigger.address ) bounce ( 'Portal no reconegut' );\r \r $args = trigger.data;\r $adr__ = trigger.initial_address;\r $proces = $args.proces;\r $dades = $args.dades otherwise {};\r \r $__dada = $refval => {\r data_feed[[ oracles = $args._Registre, feed_name = $refval, ifnone = false ]]\r };\r \r // Retorna ordinal\r $__ordinal = $rf => {\r $ord = $__dada( 'ordinal_' || $rf );\r $ord ? $ord + 1 : 1\r };\r \r $_actuant_es_isox =\r $__dada( 'isox_000' ) == $adr__ OR\r ( !! $__dada( 'isox_' || $adr__ ) AND\r $__dada( 'isox_' || $adr__ || '_estat' ) == 'habilitat' );\r \r if ( ! $_actuant_es_isox ) bounce ( 'No autoritzada' );\r \r $baules_isox = $__dada( 'isox_' || $adr__ || '_baules' ) otherwise 1;\r $mitjana_baules = $__dada( 'mitjana_baules' ) otherwise 1;\r if ( $baules_isox > $mitjana_baules * 2 )\r bounce ( 'No autoritzada per massa baules' );\r \r \r // Admin isox\r if ( $proces == 'nou_isox' ) {\r if ( !! $__dada( 'isox_' || $args.adr ) )\r bounce ( 'Ja hi consta una isox amb aquesta adreça' );\r \r $_aspirant = $__dada( 'aspirant_' || $args.adr );\r $ord_isox = $__ordinal( 'isox' );\r \r if ( $adr__ == $__dada( 'isox_000' ) ) {\r $dades_alta = [ 'isox_000', 'isox_000', 1 ];\r } else {\r $ord_aval =\r $__dada( 'isox_' || $adr__ || '_aval_2' ) ? 2 :\r $__dada( 'isox_' || $adr__ || '_aval_1' ) ? 1 :\r 0;\r \r if ( $ord_aval == 2 ) bounce ( "Ja n'has avalat a 2" );\r \r if ( !! $_aspirant ) {\r if ( $_aspirant == $adr__ )\r bounce ( "Els dos avals han de provenir d'adreces diferents" );\r \r $proposant = $__dada( 'aspirant_' || $args.adr || '_proposant' );\r $baules_proposant = $__dada( 'isox_' || $proposant || '_baules' );\r $baules = round( ( $baules_proposant + $baules_isox ) / 2 );\r \r $mitjana_baules_nouisox =\r ( $__dada( 'mitjana_baules' ) + $baules ) / $ord_isox;\r $dades[ 'isox_' || $adr__ || '_aval_' || $ord_aval ] = $args.adr;\r $dades_alta = [ $proposant, $adr__, $mitjana_baules_nouisox ];\r \r } else {\r $dades[ 'aspirant_' || $args.adr ] = timestamp;\r $dades[ 'aspirant_' || $args.adr || '_proposant' ] = $adr__;\r $dades[ 'isox_' || $adr__ || '_aval_' || $ord_aval ] = $args.adr;\r }\r }\r \r if ( !! $dades_alta[0] ) {\r $dades[ 'isox_' || $ord_isox ] = $args.adr;\r $dades[ 'isox_' || $args.adr || '_proposant' ] = $dades_alta[0];\r $dades[ 'isox_' || $args.adr || '_confirmant' ] = $dades_alta[1];\r $dades[ 'isox_' || $args.adr || '_data' ] = timestamp;\r $dades[ 'isox_' || $args.adr || '_estat' ] = 'habilitat';\r $dades[ 'isox_' || $args.adr || '_mitjana_baules' ] = $dades_alta[2];\r }\r }\r \r if ( $proces == 'nou_estat_isox' ) {\r if ( ! $__dada( 'isox_' || $args.adr ) )\r bounce ( 'No hi consta cap isox amb aquesta adreça' );\r \r $dades[ 'isox_' || $args.adr || '_estat' ] = $args.estat;\r }\r \r // Admin delegacions\r if ( $proces == 'nova_delegacio' OR $proces == 'final_delegacio' ) {\r $_entitat = $__dada( 'entitat_' || $args.ord_entitat );\r $semiref_delegada = 'entitat_' || $_entitat || '_delegada_';\r \r if ( ! $_entitat ) bounce ( 'Entitat inexistent');\r \r if ( $_entitat != $adr__ )\r bounce ( "L'adreça actuant no és la de l'entitat" );\r \r $ords = [ "1", "2", "3", "4", "5" ];\r \r $ord_delegada_trobada = [];\r $__troba_delegada = $o => {\r if (\r $__dada( $semiref_delegada || $o ) == $args.adr AND\r ! $ord_delegada_trobada[0]\r )\r $ord_delegada_trobada[0] = $o;\r };\r \r $troba_delegada = map( $ords, 5, $__troba_delegada );\r \r if ( $proces == 'nova_delegacio' ) {\r if ( !! $ord_delegada_trobada[0] )\r bounce ( 'Ja hi consta una delegada amb aquesta adreça' );\r \r $lloc_trobat = [];\r $__troba_lloc_lliure = $o => {\r if (\r ! $__dada( $semiref_delegada || $o ) AND\r ! $lloc_trobat[0]\r )\r $dades[ $semiref_delegada || $o ] = $args.adr;\r $lloc_trobat[0] = true;\r };\r \r $troba_lloc_lliure = map( $ords, 5, $__troba_lloc_lliure );\r \r if ( ! $lloc_trobat[0] )\r bounce( 'Ja hi consten 5 delegacions habilitades' );\r }\r \r if ( $proces == 'final_delegacio' ) {\r if ( ! $ord_delegada_trobada[0] )\r bounce ( 'No hi consta cap delegada amb aquesta adreça' );\r \r $dades[ $semiref_delegada || $ord_delegada_trobada[0] ] = '';\r }\r }\r \r $registre = {};\r $registre.dades = $dades;\r }", "messages": [ { "app": "data", "payload": "{ $registre }" }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $args._Registre }", "amount": "{ $__dada( 'Provisio' ) }" } ] } }, { "app": "state", "state": "{\r response[ 'procés' ] = $proces;\r if ( $proces == 'nou_isox' ) {\r response[ 'Proposant' ] = $proposant;\r if ( !! $_aspirant ) {\r response[ 'Isox_' || $ord_isox ] = $args.adr;\r response[ 'Confirmant' ] = $adr__;\r response[ 'Estat' ] = 'habilitat';\r response[ 'Mitjana_baules' ] = $mitjana_baules;\r }\r response[ 'Nombre avals de ' || $adr__ ] = $ord_aval;\r }\r \r if ( $proces == 'nou_estat_isox' )\r response[ 'Nou estat isox_' || $args.adr ] = $args.estat;\r \r if ( $proces == 'nova_delegacio' )\r response[ 'Nova delegació' ] = \r 'entitat_' || $adr__ || '_delegada_' || $lloc_trobat[0];\r \r if ( $proces == 'final_delegacio' )\r response[ 'Final delegació' ] =\r 'entitat_' || $adr__ || '_delegada_' || $ord_delegada_trobada[0];\r }" } ] } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
6,446
bytes
(452 headers, 5994 payload)
Level:
1948257
Witnessed level:
1948250
Last ball unit:
XKqhOZuWBNAhbghhD8WXl3YQzIemcpiOo1YJqyI+Dw0=
Main chain index:
1940292
Latest included mc index:
1940291
Status:
stable/confirmed/final