IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
[
"autonomous agent",
{
"doc_url": "https://oswap-frontend.herokuapp.com/oscript/factory.json",
"init": "{
$exchange_template = 'QOCT4JF4C3L725QJE56QFQEYSUTUUE2T';
}",
"messages": {
"cases": [
{
"if": "{trigger.data.createExchange AND trigger.data.asset}",
"init": "{
$asset = trigger.data.asset;
if (
!asset[$asset].exists
OR asset[$asset].is_private
OR !asset[$asset].is_transferrable
OR asset[$asset].fixed_denominations
)
bounce("INVALID_ASSET");
if (var['asset_to_exchange.' || $asset])
bounce("DUPLICATE_EXCHANGE");
}",
"messages": [
{
"app": "definition",
"payload": {
"definition": [
"autonomous agent",
{
"base_aa": "{$exchange_template}",
"params": {
"asset": "{$asset}"
}
}
]
}
},
{
"app": "state",
"state": "{
$exchange = unit[response_unit].messages[[.app='definition']].payload.address;
$asset_id = var['asset_count'] + 1;
var['asset_to_exchange.' || $asset] = $exchange;
var['exchange_to_asset.' || $exchange] = $asset;
var['asset_count'] = $asset_id;
var['id_to_asset.' || $asset_id] = $asset;
response['asset'] = $asset;
response['exchange'] = $exchange;
}"
}
]
}
]
}
}
]
- MCI: 1256501
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "WhsD5Y/1NeKROgQojGwfe9EBC7NH4KnAk4CorCrVRhs=",
"exchange": "WBDWQT3WBBQKN3DCODSZ7HEJWWEWAXL6"
}
}
- MCI: 1256500
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "UccpQo12uLmufihkzdK7Kcrb5BlHp8GcMrSEA7NVdNw=",
"exchange": "YVHY7LUQBMLYHGQWTLVZBPGWDIFLRYG3"
}
}
- MCI: 1256493
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "EqYYIDJqWKtQptT73bFC6tl7roS80yfJkwi9iVQyoz8=",
"exchange": "CIX5ZAVBEC4TQAX7TJCGZV4R7ZRYN2JP"
}
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
04.03.2020 04:35:54
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
out
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
04.03.2020 04:35:54
in
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
04.03.2020 04:35:51
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
out
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
04.03.2020 04:35:37
in
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
04.03.2020 04:35:15
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS
out
IVZQUM2KZSWPU5JU2TMMZIFKBLG7M2KS