VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2
[
"autonomous agent",
{
"init": "{
$status_index = var['status.index'];
$address = trigger.address;
$data = trigger.data;
$unit = trigger.unit;
}",
"messages": {
"cases": [
{
"if": "{$data.status}",
"messages": [
{
"app": "state",
"state": "{
$next_index = $status_index + 1;
var['status.index'] = $next_index;
var['status.' || $next_index || '.unit'] = $unit;
var['status.' || $next_index || '.author'] = $address;
response['message'] = 'created status ' || $next_index;
response['status_id'] = $next_index;
}"
}
]
},
{
"if": "{$data.like AND var['status.' || $data.like || '.unit']}",
"messages": [
{
"app": "payment",
"if": "{$rewards > 0}",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{var['status.' || $data.like || '.author']}",
"amount": "{$rewards}"
}
]
}
},
{
"app": "state",
"state": "{
$rewards = (trigger.output[[asset=base]] - 10000);
if (!var['status.' || $data.like || '.like.' || $address || '.rewards'])
var['status.' || $data.like || '.likes'] += 1;
var['status.' || $data.like || '.rewards'] += $rewards;
var['status.' || $data.like || '.like.' || $address || '.rewards'] += $rewards;
response['message'] = 'liked status ' || $data.like;
response['status_id'] = $data.like;
response['rewards'] = $rewards;
}"
}
]
},
{
"if": "{$data.profile AND ($data.name OR $data.about OR $data.location OR $data.website)}",
"messages": [
{
"app": "state",
"state": "{
if ($data.name) var['user.' || $address || '.name'] = $data.name;
if ($data.about) var['user.' || $address || '.about'] = $data.about;
if ($data.location) var['user.' || $address || '.location'] = $data.location;
if ($data.website) var['user.' || $address || '.website'] = $data.website;
response['message'] = 'updated profile for ' || $address;
response['user_address'] = $address;
}"
}
]
}
]
}
}
]
- MCI: 1030550
- Bounced
- Response unit:
- Response: {
"error": "formula {$rewards > 0} failed: booleans cannot be compared with other types"
}
- MCI: 1030510
- Not bounced
- Response: {
"responseVars": {
"message": "created status 3",
"status_id": 3
},
"error": "no messages after filtering"
}
- MCI: 1030505
- Not bounced
- Response: {
"responseVars": {
"message": "created status 2",
"status_id": 2
},
"error": "no messages after filtering"
}
- MCI: 1030500
- Not bounced
- Response: {
"responseVars": {
"message": "created status 1",
"status_id": 1
},
"error": "no messages after filtering"
}
- MCI: 1030498
- Not bounced
- Response: {
"responseVars": {
"message": "updated profile for FNRKIXNPGKFFCWEBNWEH53SXKATU5PL3",
"user_address": "FNRKIXNPGKFFCWEBNWEH53SXKATU5PL3"
},
"error": "no messages after filtering"
}
Show transactions in assets:
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
29.08.2019 09:56:39
VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2
out
29.08.2019 09:56:39
in
VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2
29.08.2019 09:35:21
in
VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2
29.08.2019 09:34:58
in
VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2
29.08.2019 09:34:19
in
VD5FG6HEANQ3XLFJ4GG67EEWJ4YEJNM2