Unit ID
ggZCOcHW0283+2a352EJOKIzwnDX4FPzXwqkG1QwoKM=
Received
20.09.2021 12:22:46
Confirmation delay (full node)
3 minutes 24 seconds
Confirmation delay (light node)
5 minutes 20 seconds
Messages
Definition
Definition: [ "autonomous agent", { "doc_url": "https://counterstake.org/import-assistant-forward-factory.json", "bounce_fees": { "base": 10000 }, "init": "{ $assistant = trigger.data.assistant; if(!is_valid_address($assistant)) bounce("invalid assistant address: " || $assistant); $import_assistant_factory = "BRDUWQBFJZ277E3QUQXTMDGP3LLLGUO3"; $forward_base_aa = "S7QL75LGA72N6WNAPVKMKBQTYSGB3KL5"; $received_base_amount = trigger.output[[asset=base]]; $assistant_info = var[$import_assistant_factory]["assistant_" || $assistant]; if(!$assistant_info) bounce("assistant not found"); if(var["forward_aa_" || $assistant]) bounce("the forward already exists"); }", "messages": { "cases": [ { "if": "{ trigger.data.create AND $assistant}", "init": "{ $forward_aa = [ 'autonomous agent', { base_aa: $forward_base_aa, params: { assistant: $assistant } } ]; $forward_aa_address = chash160($forward_aa); }", "messages": [ { "app": "definition", "payload": { "definition": "{$forward_aa}" } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ trigger.address }", "amount": "{$received_base_amount - 6000}" } ] } }, { "app": "state", "state": "{ var["forward_aa_" || $assistant] = $forward_aa_address; response['forward'] = $forward_aa_address; }" } ] } ] } } ]
Technical information
Fees:
2,062 bytes
(452 headers, 1610 payload)
Level:2330972
Witnessed level:2330964
Main chain index:2318748
Latest included mc index:2318747
Status:stable/confirmed/final