Unit ID
1Cv/TOXj1tjA15MV/2wLlEc7fgtl4KCsjxkbPRVUHH8=
Received
08.09.2020 16:19:26
Confirmation delay (full node)
2 minutes 42 seconds
Confirmation delay (light node)
4 minutes 28 seconds
Messages
Definition
Definition: [ "autonomous agent", { "doc_url": "https://ostable.org/stablecoin-t1-arbitrage-factory.json", "init": "{ $arbitrage_base_aa = 'CBAZKMFTNRV6DHXGPTVAEJWX5F2Y752F'; }", "messages": { "cases": [ { "if": "{var['creating']}", "messages": [ { "app": "state", "state": "{ $params = var['arb_' || trigger.address]; $params.shares_asset = trigger.unit; var['arb_' || trigger.address] = $params; var['creating'] = false; }" } ] }, { "init": "{ if (!is_aa(trigger.data.curve_aa)) bounce("curve_aa must be an AA"); $reserve_asset = definition[trigger.data.curve_aa][1].params.reserve_asset OTHERWISE 'base'; $asset1 = var[trigger.data.curve_aa]['asset1']; $asset2 = var[trigger.data.curve_aa]['asset2']; $params = { curve_aa: trigger.data.curve_aa, }; $governance_params = [ 'max_reserve_share', 'min_reserve_share', 'triggerer_reward_share', 'min_reserve_delta', ]; foreach($governance_params, 4, $p => { $value = trigger.data[$p]; // use AA default if missing if (exists($value)) { if ($p == 'min_reserve_delta'){ if (!is_integer($value) OR $value < 0) bounce("bad " || $p); } else { if (typeof($value) != 'number' OR $value < 0 OR $value > 1) bounce("bad " || $p); } $params[$p] = $value; } }); $arbitrage_aa = [ 'autonomous agent', { base_aa: $arbitrage_base_aa, params: $params } ]; $arbitrage_aa_address = chash160($arbitrage_aa); }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{ $arbitrage_aa_address }", "amount": 4000 } ] } }, { "app": "data", "payload": { "define": 1, "factory": "{this_address}" } }, { "app": "definition", "payload": { "definition": "{$arbitrage_aa}" } }, { "app": "state", "state": "{ $params.reserve_asset = $reserve_asset; $params.asset1 = $asset1; $params.asset2 = $asset2; var['arb_' || $arbitrage_aa_address] = $params; var['creating'] = 1; response['address'] = $arbitrage_aa_address; }" } ] } ] } } ]
Technical information
Fees:
2,820 bytes
(452 headers, 2368 payload)
Level:1605069
Witnessed level:1605062
Main chain index:1597749
Latest included mc index:1597748
Status:stable/confirmed/final