tx · BkVWUdsQ7JYxnNSBQC4rv1kZgMWPBgGeXmi2d41GYYvo

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.11.26 18:28 [2860550] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "BkVWUdsQ7JYxnNSBQC4rv1kZgMWPBgGeXmi2d41GYYvo", "fee": 1000000, "feeAssetId": null, "timestamp": 1701012536970, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "7dbXQ8REekcuY4kksF8cSMdgajDF9a6xExSKbaNqcoSwggx15rbLtWouW3eXobATsqHhkEiq4niT1raPXcV1yA2" ], "script": "base64:BgIfCAISBwoFEREICAESAwoBCBIGCgQICAgIEgUKAwgBCAQAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgARQUlfVE9LRU5fQVNTRVRfSUQBIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAQtyZW1vdmVNYXJrcwELbWFya3NTdHJpbmcEAWEJALACAgULbWFya3NTdHJpbmcAAQQBYgkAswICBQFhAAEFAWIBCXBhcnNlSnNvbgEEanNvbgQMbW9kaWZpZWRKc29uCQCwAgIFBGpzb24AAQQNbW9kaWZpZWRKc29uMgkAswICBQxtb2RpZmllZEpzb24AAQQGc3BsaXQxCQC1CQIFDW1vZGlmaWVkSnNvbjICASwECWtleVZhbHVlMQkAtQkCCQCRAwIFBnNwbGl0MQAAAgE6BARrZXkxCQELcmVtb3ZlTWFya3MBCQCRAwIFCWtleVZhbHVlMQAABAZ2YWx1ZTEJAQtyZW1vdmVNYXJrcwEJAJEDAgUJa2V5VmFsdWUxAAEECWtleVZhbHVlMgkAtQkCCQCRAwIFBnNwbG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l9hZGRyZXNzBAR0eElkCQDYBAEIBQFpDXRyYW5zYWN0aW9uSWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUNcHJlZGljdGlvbl9pZAUEdHhJZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCB19ndWlsdHkFFWd1aWx0eV9wZXJzb25fYWRkcmVzcwUDbmlsAWkBDXJlcXVlc3RQYXlvdXQDCXByZWRfdHhJZAZhbW91bnQCaWQEBmNsaWVudAkApQgBCAUBaQZjYWxsZXIEBHR4SWQJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFAmlkAg9fcmVxdWVzdF9wYXlvdXQFBHR4SWQJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUEdHhJZAIHX2Ftb3VudAUGYW1vdW50CQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUEdHhJZAIOX3ByZWRpY3Rpb25faWQFCXByZWRfdHhJZAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleTsQJKo=", "height": 2860550, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FrzYyNDfE7qTFC7Kv3qv9McMVJNjoS7cs7U7CnhjCAf1 Next: FNSH3SSR3B61ky3nG5kXf7G2o3Nu5oArN1SekwVTRZr8 Diff:
OldNewDifferences
2323 let key2 = removeMarks(keyValue2[0])
2424 let value2 = removeMarks(keyValue2[1])
2525 let keyValue3 = split(split1[2], ":")
26- let key3 = removeMarks(keyValue2[0])
27- let value3 = removeMarks(keyValue2[1])
26+ let key3 = removeMarks(keyValue3[0])
27+ let value3 = removeMarks(keyValue3[1])
2828 $Tuple3([key1, value1], [key2, value2], [key3, value3])
2929 }
3030
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BAI_ADDRESS = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
55
66 let AI_TOKEN_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
77
88 func removeMarks (marksString) = {
99 let a = drop(marksString, 1)
1010 let b = dropRight(a, 1)
1111 b
1212 }
1313
1414
1515 func parseJson (json) = {
1616 let modifiedJson = drop(json, 1)
1717 let modifiedJson2 = dropRight(modifiedJson, 1)
1818 let split1 = split(modifiedJson2, ",")
1919 let keyValue1 = split(split1[0], ":")
2020 let key1 = removeMarks(keyValue1[0])
2121 let value1 = removeMarks(keyValue1[1])
2222 let keyValue2 = split(split1[1], ":")
2323 let key2 = removeMarks(keyValue2[0])
2424 let value2 = removeMarks(keyValue2[1])
2525 let keyValue3 = split(split1[2], ":")
26- let key3 = removeMarks(keyValue2[0])
27- let value3 = removeMarks(keyValue2[1])
26+ let key3 = removeMarks(keyValue3[0])
27+ let value3 = removeMarks(keyValue3[1])
2828 $Tuple3([key1, value1], [key2, value2], [key3, value3])
2929 }
3030
3131
3232 @Callable(i)
3333 func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = {
3434 let searchForExistingData = match getString(id) {
3535 case s: String =>
3636 s
3737 case _ =>
3838 "no Data exists"
3939 }
4040 if ((searchForExistingData != "no Data exists"))
4141 then throw("There is already existing Data for this case!")
4242 else {
4343 let client = toString(i.caller)
4444 let txId = toBase58String(i.transactionId)
4545 [StringEntry(id, txId), IntegerEntry((((txId + "_") + client) + "_age"), clientInput[0]), IntegerEntry((((txId + "_") + client) + "_sex"), clientInput[1]), IntegerEntry((((txId + "_") + client) + "_damage"), clientInput[2]), IntegerEntry((((txId + "_") + client) + "_fac1"), clientInput[3]), IntegerEntry((((txId + "_") + client) + "_fac2"), clientInput[4]), IntegerEntry((((txId + "_") + client) + "_fac3"), clientInput[5]), IntegerEntry((((txId + "_") + client) + "_fac4"), clientInput[6]), IntegerEntry((((txId + "_") + client) + "_vio1"), clientInput[7]), IntegerEntry((((txId + "_") + client) + "_vio2"), clientInput[8]), IntegerEntry((((txId + "_") + client) + "_vio3"), clientInput[9]), IntegerEntry((((txId + "_") + client) + "_vio4"), clientInput[10]), IntegerEntry((((txId + "_") + client) + "_cost"), clientInput[11]), IntegerEntry((((txId + "_") + oppAddress) + "_age"), opponentInput[0]), IntegerEntry((((txId + "_") + oppAddress) + "_sex"), opponentInput[1]), IntegerEntry((((txId + "_") + oppAddress) + "_damage"), opponentInput[2]), IntegerEntry((((txId + "_") + oppAddress) + "_fac1"), opponentInput[3]), IntegerEntry((((txId + "_") + oppAddress) + "_fac2"), opponentInput[4]), IntegerEntry((((txId + "_") + oppAddress) + "_fac3"), opponentInput[5]), IntegerEntry((((txId + "_") + oppAddress) + "_fac4"), opponentInput[6]), IntegerEntry((((txId + "_") + oppAddress) + "_vio1"), opponentInput[7]), IntegerEntry((((txId + "_") + oppAddress) + "_vio2"), opponentInput[8]), IntegerEntry((((txId + "_") + oppAddress) + "_vio3"), opponentInput[9]), IntegerEntry((((txId + "_") + oppAddress) + "_vio4"), opponentInput[10]), IntegerEntry((((txId + "_") + oppAddress) + "_cost"), opponentInput[11]), IntegerEntry((id + "_lgt"), lgtCond), StringEntry((id + "_status"), "open")]
4646 }
4747 }
4848
4949
5050
5151 @Callable(i)
5252 func evaluatedDataCallback (response) = {
5353 let txId = toBase58String(i.transactionId)
5454 let parsedJson = parseJson(response)
5555 let crashId = parsedJson._1[1]
5656 let innocentAddress = parsedJson._2[1]
5757 let guiltyAddress = parsedJson._3[1]
5858 let RegisterTxId = match getString(crashId) {
5959 case s: String =>
6060 s
6161 case _ =>
6262 "no Data exists"
6363 }
6464 if ((RegisterTxId == "no Data exists"))
6565 then throw("There is no Data for this crashId!")
6666 else {
6767 let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
6868 case s: Int =>
6969 s
7070 case _ =>
7171 "No data Found"
7272 }
7373 if ((costEstimationOfInnocentPerson == "No data Found"))
7474 then throw("There is no data for this address!")
7575 else if ((costEstimationOfInnocentPerson == -1))
7676 then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
7777 else [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(innocentAddress)), 100000000, unit)]
7878 }
7979 }
8080
8181
8282
8383 @Callable(i)
8484 func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address) = {
8585 let txId = toBase58String(i.transactionId)
8686 [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address)]
8787 }
8888
8989
9090
9191 @Callable(i)
9292 func requestPayout (pred_txId,amount,id) = {
9393 let client = toString(i.caller)
9494 let txId = toBase58String(i.transactionId)
9595 [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)]
9696 }
9797
9898
9999 @Verifier(tx)
100100 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
101101

github/deemru/w8io/026f985 
29.66 ms