2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
[
"autonomous agent",
{
"doc_url": "https://oswap-frontend.herokuapp.com/factory.json",
"init": "{
$base = '2FDSM5PJP6Q3NESWD5BVEMSY3KX74MFL';
$asset_a = trigger.data.assetA;
$asset_b = trigger.data.assetB;
$create_pair = trigger.data.createPair AND $asset_a AND $asset_b;
}",
"messages": {
"cases": [
{
"if": "{$create_pair}",
"init": "{
if ($asset_a == $asset_b) bounce("identical asset");
if (
!asset[$asset_a].exists
OR asset[$asset_a].is_private
OR !asset[$asset_a].is_transferrable
OR asset[$asset_a].fixed_denominations
OR !asset[$asset_b].exists
OR asset[$asset_b].is_private
OR !asset[$asset_b].is_transferrable
OR asset[$asset_b].fixed_denominations
)
bounce("invalid asset");
$order = number_from_seed($asset_a) > number_from_seed($asset_b);
$asset0 = $order ? $asset_a : $asset_b;
$asset1 = $order ? $asset_b : $asset_a;
if (var['all_pairs.' || $asset0 || '_' || $asset1]) bounce("pair exists");
}",
"messages": [
{
"app": "definition",
"payload": {
"definition": [
"autonomous agent",
{
"base_aa": "{$base}",
"params": {
"asset0": "{$asset0}",
"asset1": "{$asset1}"
}
}
]
}
},
{
"app": "state",
"state": "{
$address = unit[response_unit].messages[[.app='definition']].payload.address;
var['all_pairs.' || $asset0 || '_' || $asset1] = $address;
var['all_pairs.' || $asset1 || '_' || $asset0] = $address;
var['get_pair.' || $address] = $asset0 || '_' || $asset1;
var['pair_count'] += 1;
}"
}
]
}
]
}
}
]
- MCI: 1289955
- Not bounced
- Response unit:
- Response: {}
- MCI: 1289947
- Not bounced
- Response unit:
- Response: {}
- MCI: 1289784
- Not bounced
- Response unit:
- Response: {}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
05.04.2020 18:39:12
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
out
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
05.04.2020 18:39:12
in
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
05.04.2020 18:35:41
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
out
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
05.04.2020 18:35:41
in
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
05.04.2020 16:56:30
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT
out
2KWZD4YQNR2VIOTH3TPFRW3LG4JNAZAT