Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
[
"autonomous agent",
{
"doc_url": "https://oswap-frontend.herokuapp.com/oscript/factory.json",
"init": "{
$exchange_template = 'X43WXFDJCKLBVFXEVMUOKVPD5GY4VVUZ';
}",
"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("wrong 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: 1289090
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "zRibtpPVIgICqMCM7kvJ4yHJVNnxZsK4FDKVOBhanKc=",
"exchange": "PF7P5ZDGDK34YIJHXSBW47G73JAVHX3J"
}
}
- MCI: 1280565
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "nAoGnyxZN4eLyjLuTH+KArz5/DvC2ktIUt/IDq7OZd0=",
"exchange": "BB7IT5V4RRR5MCLT7I33C5P6MJSQIBKQ"
}
}
- MCI: 1257239
- Not bounced
- Response unit:
- Response: {
"responseVars": {
"asset": "WhsD5Y/1NeKROgQojGwfe9EBC7NH4KnAk4CorCrVRhs=",
"exchange": "IPTRNDJ3XSDBGC7MBPCRFVFADGESVXDP"
}
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
05.04.2020 04:08:15
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
out
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
05.04.2020 04:08:15
in
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
27.03.2020 11:49:01
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
out
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
27.03.2020 11:49:01
in
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
04.03.2020 15:57:32
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD
out
Q6PDJSK37W2M7VG5EYU4VE5PLTDSSSPD