Response: {
"error": "formula
if (NOT exists(trigger.data["NFT"]))
bounce("NFT field is mandatory");
$NFT = $tokenInfo(trigger.data["NFT"]); //[we need $NFT.cap here] This already checks wether NFT exists
$isAuction = $NFT.bid ? true : false; //It can only NOT be an auction if it is first sold and thus $NFT.bid does not exist
response["NFT"] = json_stringify($NFT);
response["isAuction"] = $isAuction;
if ($isAuction)
$hasBidders = $NFT.soldBy != $NFT.by;//Booleans cannot be compared
response["hasBidders"] = $hasBidders;
if (timestamp > $NFT.soldAt){
if ($isAuction){
if ($hasBidders) //You can still buy it if there were no bidders
bounce("The auction is over");
}
else
bounce("The auction is already over");
}
failed: booleans cannot be compared with other types"
}