tx · FNSH3SSR3B61ky3nG5kXf7G2o3Nu5oArN1SekwVTRZr8

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.11.26 18:35 [2860556] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "FNSH3SSR3B61ky3nG5kXf7G2o3Nu5oArN1SekwVTRZr8", "fee": 1000000, "feeAssetId": null, "timestamp": 1701012943909, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "29PsYvsAsMCqD6cLteWyrEcqhJfg3sce9ydfgAxh59D2PVeM1vF4nPgsiQbCnF15ysVTzdEzuAjqwNyBSsWtWWcq" ], "script": "base64:BgIfCAISBwoFEREICAESAwoBCBIGCgQICAgIEgUKAwgBCAQAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgARQUlfVE9LRU5fQVNTRVRfSUQBIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAQtyZW1vdmVNYXJrcwELbWFya3NTdHJpbmcEAWEJALACAgULbWFya3NTdHJpbmcAAQQBYgkAswICBQFhAAEFAWIBCXBhcnNlSnNvbgEEanNvbgQMbW9kaWZpZWRKc29uCQCwAgIFBGpzb24AAQQNbW9kaWZpZWRKc29uMgkAswICBQxtb2RpZmllZEpzb24AAQQGc3BsaXQxCQC1CQIFDW1vZGlmaWVkSnNvbjICASwECWtleVZhbHVlMQkAtQkCCQCRAwIFBnNwbGl0MQAAAgE6BARrZXkxCQELcmVtb3ZlTWFya3MBCQCRAwIFCWtleVZhbHVlMQAABAZ2YWx1ZTEJAQtyZW1vdmVNYXJrcwEJAJEDAgUJa2V5VmFsdWUxAAEECWtleVZhbHVlMgkAtQkCCQCRAwIFBnN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aWx0eV9hZGRyZXNzBQ1ndWlsdHlBZGRyZXNzCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHY3Jhc2hJZAIHX3N0YXR1cwIGY2xvc2VkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBBQ9pbm5vY2VudEFkZHJlc3MAgMLXLwUEdW5pdAUDbmlsAWkBDWV2YWx1YXRlZERhdGEEDXByZWRpY3Rpb25faWQPcGVyX29uZV9hZGRyZXNzD3Blcl90d29fYWRkcmVzcxVndWlsdHlfcGVyc29uX2FkZHJlc3MEBHR4SWQJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAkAzAgCCQELU3RyaW5nRW50cnkCBQ1wcmVkaWN0aW9uX2lkBQR0eElkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUEdHhJZAIHX2d1aWx0eQUVZ3VpbHR5X3BlcnNvbl9hZGRyZXNzBQNuaWwBaQENcmVxdWVzdFBheW91dAMJcHJlZF90eElkBmFtb3VudAJpZAQGY2xpZW50CQClCAEIBQFpBmNhbGxlcgQEdHhJZAkA2AQBCAUBaQ10cmFuc2FjdGlvbklkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUCaWQCD19yZXF1ZXN0X3BheW91dAUEdHhJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQR0eElkAgdfYW1vdW50BQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAg5fcHJlZGljdGlvbl9pZAUJcHJlZF90eElkBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V59O/fZw==", "height": 2860556, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BkVWUdsQ7JYxnNSBQC4rv1kZgMWPBgGeXmi2d41GYYvo Next: 6YCKoRKpJ435sKBbp4K6CfC6Gtb83Y5aKC8wxd21L8pj Diff:
OldNewDifferences
6464 if ((RegisterTxId == "no Data exists"))
6565 then throw("There is no Data for this crashId!")
6666 else {
67- let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
68- case s: Int =>
67+ let status = match getString((crashId + "_status")) {
68+ case s: String =>
6969 s
7070 case _ =>
71- "No data Found"
71+ "no Data exists"
7272 }
73- if ((costEstimationOfInnocentPerson == "No data Found"))
74- then throw("There is no data for this address!")
75- else if ((costEstimationOfInnocentPerson == -1))
76- then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
77- 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)]
73+ if ((status == "no Data exists"))
74+ then throw("There is no status for this case!")
75+ else if ((status == "closed"))
76+ then throw("A case should not be evaluated twice!")
77+ else {
78+ let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
79+ case s: Int =>
80+ s
81+ case _ =>
82+ "No data Found"
83+ }
84+ if ((costEstimationOfInnocentPerson == "No data Found"))
85+ then throw("There is no data for this address!")
86+ else if ((costEstimationOfInnocentPerson == -1))
87+ then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
88+ 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)]
89+ }
7890 }
7991 }
8092
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], ":")
2626 let key3 = removeMarks(keyValue3[0])
2727 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 {
67- let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
68- case s: Int =>
67+ let status = match getString((crashId + "_status")) {
68+ case s: String =>
6969 s
7070 case _ =>
71- "No data Found"
71+ "no Data exists"
7272 }
73- if ((costEstimationOfInnocentPerson == "No data Found"))
74- then throw("There is no data for this address!")
75- else if ((costEstimationOfInnocentPerson == -1))
76- then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
77- 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)]
73+ if ((status == "no Data exists"))
74+ then throw("There is no status for this case!")
75+ else if ((status == "closed"))
76+ then throw("A case should not be evaluated twice!")
77+ else {
78+ let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
79+ case s: Int =>
80+ s
81+ case _ =>
82+ "No data Found"
83+ }
84+ if ((costEstimationOfInnocentPerson == "No data Found"))
85+ then throw("There is no data for this address!")
86+ else if ((costEstimationOfInnocentPerson == -1))
87+ then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
88+ 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)]
89+ }
7890 }
7991 }
8092
8193
8294
8395 @Callable(i)
8496 func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address) = {
8597 let txId = toBase58String(i.transactionId)
8698 [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address)]
8799 }
88100
89101
90102
91103 @Callable(i)
92104 func requestPayout (pred_txId,amount,id) = {
93105 let client = toString(i.caller)
94106 let txId = toBase58String(i.transactionId)
95107 [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)]
96108 }
97109
98110
99111 @Verifier(tx)
100112 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
101113

github/deemru/w8io/026f985 
30.76 ms