Unit ID
phd2on51eG9YcH2oyVafx+cxhOZhk0ZKnITh/gs+7Xo=
Received
03.08.2019 07:03:06
Confirmation delay (full node)
4 minutes 9 seconds
Confirmation delay (light node)
6 minutes 54 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ $checkaddress = trigger.data.address; if ( !$checkaddress ) bounce( 'input: { address : address , [ data : passthur_data ] , [ newaddress : newaddress ] , [ checkonly : false ] }' ); // USAGE // doesn't matter if checkaddress is valid or not because it will bounce when routing to the invalid address $logicaladdress = var[ $checkaddress ]; if ( $logicaladdress ){ // FOUND LOGICAL ADDRESS $currentaddress = var[ $logicaladdress ]; // GET LATEST ADDRESS $newaddress = trigger.data.newaddress; if( $newaddress ){ // again doesn't matter if newaddress is valid or not , RECEIVED NEW ADDRESS if( var[ $currentaddress ][ 'authors' ] == trigger.address ){ // CHECK OWNERSHIP // transfer of arbitrary address types will be possible in the future when AA can explore DAG $route = $newaddress; // ROUTE TO NEW ADDRESS // actual ownership transfer done in app state } else { bounce( 'Trigger address does not match with var[ authors ] in ' || $currentaddress || ' which is require to make newaddress transfer' ); } } else { $route = $currentaddress; // ROUTE TO LATEST ADDRESS } }else{ $route = $checkaddress; // registration will be done at app state , ROUTE TO CHECK ADRESS FIRST TIME } if( trigger.data.checkonly ){ // CHECKONLY if( $checkaddress != $route ) bounce( 'Please use latest address at ' || $route ); else bounce( 'This address ' || $checkaddress || ' is the latest'); } // ROUTE with pass thur data $route }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$route}" } ] } }, { "app": "data", "payload": "{trigger.data}" }, { "app": "state", "state": "{ if( !$logicaladdress ){ var[ 'L' || $checkaddress ] = $checkaddress; // create logical address var[ $checkaddress ] = 'L' || $checkaddress; // set checkaddress to logical address $msg = ' a new address registration'; } if( $newaddress AND $logicaladdress AND $currentaddress AND var[ $currentaddress ][ 'authors' ] == trigger.address ){ var[ $logicaladdress ] = $newaddress; var[ $newaddress ] = $logicaladdress; $msg = ' address has been transferred from ' || $currentaddress; } response[ 'message' ] = 'Routing to ' || $route || $msg; var[ 'authors' ] = '7MDNSRYFRLJ4PQMPD5TZPIO5JHCTYNQI'; }" } ] } ] } } ]
Technical information
Fees:
2,826 bytes
(353 headers, 2473 payload)
Level:982129
Witnessed level:982121
Main chain index:980949
Latest included mc index:980948
Status:stable/confirmed/final