tx · HmYBQbvZdyuwweEovLoRFNfW1DMGabxzsB7UC44iGAUQ

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.11.27 16:22 [2861864] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "HmYBQbvZdyuwweEovLoRFNfW1DMGabxzsB7UC44iGAUQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1701091375993, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "2nmcP4yighd3UmBPMGRHuiDNpmG5WpZVzZ91GkSAZXHrqA7HMUohbB3UE8w6mfqfm2t2pntydkx2WBRheQDNVRUS" ], "script": "base64:BgIfCAISBwoFEREICAESAwoBCBIGCgQICAgIEgUKAwgBCAYAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAEVFlQRQIPY3Jhc2hFdmFsdWF0aW9uAAdCQUlfRkVFAICt4gQAEUFJX1RPS0VOX0FTU0VUX0lEASCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgELcmVtb3ZlTWFya3MBC21hcmtzU3RyaW5nBAFhCQCwAgIFC21hcmtzU3RyaW5nAAEEAWIJALMCAgUBYQABBQFiAQlwYXJzZUpzb24BBGpzb24EDG1vZGlmaWVkSnNvbgkAsAICBQRqc29uAAEEDW1vZGlmaWVkSnNvbjIJALMCAgUMbW9kaWZpZWRKc29uAAEEBnNwbGl0MQkAtQkCBQ1tb2RpZmllZEpzb24yAgEsBAlrZXlWYWx1ZTEJALUJAgkAkQMCBQZzcGxpdDEAAAIBOgQEa2V5MQkBC3JlbW92ZU1hcmtzAQkAkQMCBQlrZXlWYWx1ZTEAAAQGdmFsdWUxCQELcmVtb3ZlTWFya3M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YW1vdW50BQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAg5fcHJlZGljdGlvbl9pZAUJcHJlZF90eElkBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5QHyvzA==", "height": 2861864, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Sb3EdLjZWEpcnqC5viD1WtRruU6JFVaWqkKASR3rXj5 Next: 84k5n7ksXa7RqBgwyQ1GjLRxNZv7mDQ9KrHbX3DHGn75 Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BAI_ADDRESS = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
5+
6+let TYPE = "crashEvaluation"
7+
8+let BAI_FEE = 10000000
59
610 let AI_TOKEN_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
711
4044 if ((searchForExistingData != "no Data exists"))
4145 then throw("There is already existing Data for this case!")
4246 else {
47+ let parameters = [id, TYPE, "evaluatedDataCallback"]
4348 let client = toString(i.caller)
4449 let txId = toBase58String(i.transactionId)
50+ let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
4551 [StringEntry(id, txId), IntegerEntry((((id + "_") + client) + "_age"), clientInput[0]), IntegerEntry((((id + "_") + client) + "_sex"), clientInput[1]), IntegerEntry((((id + "_") + client) + "_damage"), clientInput[2]), IntegerEntry((((id + "_") + client) + "_fac1"), clientInput[3]), IntegerEntry((((id + "_") + client) + "_fac2"), clientInput[4]), IntegerEntry((((id + "_") + client) + "_fac3"), clientInput[5]), IntegerEntry((((id + "_") + client) + "_fac4"), clientInput[6]), IntegerEntry((((id + "_") + client) + "_vio1"), clientInput[7]), IntegerEntry((((id + "_") + client) + "_vio2"), clientInput[8]), IntegerEntry((((id + "_") + client) + "_vio3"), clientInput[9]), IntegerEntry((((id + "_") + client) + "_vio4"), clientInput[10]), IntegerEntry((((id + "_") + client) + "_cost"), clientInput[11]), IntegerEntry((((id + "_") + oppAddress) + "_age"), opponentInput[0]), IntegerEntry((((id + "_") + oppAddress) + "_sex"), opponentInput[1]), IntegerEntry((((id + "_") + oppAddress) + "_damage"), opponentInput[2]), IntegerEntry((((id + "_") + oppAddress) + "_fac1"), opponentInput[3]), IntegerEntry((((id + "_") + oppAddress) + "_fac2"), opponentInput[4]), IntegerEntry((((id + "_") + oppAddress) + "_fac3"), opponentInput[5]), IntegerEntry((((id + "_") + oppAddress) + "_fac4"), opponentInput[6]), IntegerEntry((((id + "_") + oppAddress) + "_vio1"), opponentInput[7]), IntegerEntry((((id + "_") + oppAddress) + "_vio2"), opponentInput[8]), IntegerEntry((((id + "_") + oppAddress) + "_vio3"), opponentInput[9]), IntegerEntry((((id + "_") + oppAddress) + "_vio4"), opponentInput[10]), IntegerEntry((((id + "_") + oppAddress) + "_cost"), opponentInput[11]), IntegerEntry((id + "_lgt"), lgtCond), StringEntry((id + "_status"), "open"), StringEntry((id + "_sender"), client)]
4652 }
4753 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BAI_ADDRESS = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
5+
6+let TYPE = "crashEvaluation"
7+
8+let BAI_FEE = 10000000
59
610 let AI_TOKEN_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
711
812 func removeMarks (marksString) = {
913 let a = drop(marksString, 1)
1014 let b = dropRight(a, 1)
1115 b
1216 }
1317
1418
1519 func parseJson (json) = {
1620 let modifiedJson = drop(json, 1)
1721 let modifiedJson2 = dropRight(modifiedJson, 1)
1822 let split1 = split(modifiedJson2, ",")
1923 let keyValue1 = split(split1[0], ":")
2024 let key1 = removeMarks(keyValue1[0])
2125 let value1 = removeMarks(keyValue1[1])
2226 let keyValue2 = split(split1[1], ":")
2327 let key2 = removeMarks(keyValue2[0])
2428 let value2 = removeMarks(keyValue2[1])
2529 let keyValue3 = split(split1[2], ":")
2630 let key3 = removeMarks(keyValue3[0])
2731 let value3 = removeMarks(keyValue3[1])
2832 $Tuple3([key1, value1], [key2, value2], [key3, value3])
2933 }
3034
3135
3236 @Callable(i)
3337 func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = {
3438 let searchForExistingData = match getString(id) {
3539 case s: String =>
3640 s
3741 case _ =>
3842 "no Data exists"
3943 }
4044 if ((searchForExistingData != "no Data exists"))
4145 then throw("There is already existing Data for this case!")
4246 else {
47+ let parameters = [id, TYPE, "evaluatedDataCallback"]
4348 let client = toString(i.caller)
4449 let txId = toBase58String(i.transactionId)
50+ let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
4551 [StringEntry(id, txId), IntegerEntry((((id + "_") + client) + "_age"), clientInput[0]), IntegerEntry((((id + "_") + client) + "_sex"), clientInput[1]), IntegerEntry((((id + "_") + client) + "_damage"), clientInput[2]), IntegerEntry((((id + "_") + client) + "_fac1"), clientInput[3]), IntegerEntry((((id + "_") + client) + "_fac2"), clientInput[4]), IntegerEntry((((id + "_") + client) + "_fac3"), clientInput[5]), IntegerEntry((((id + "_") + client) + "_fac4"), clientInput[6]), IntegerEntry((((id + "_") + client) + "_vio1"), clientInput[7]), IntegerEntry((((id + "_") + client) + "_vio2"), clientInput[8]), IntegerEntry((((id + "_") + client) + "_vio3"), clientInput[9]), IntegerEntry((((id + "_") + client) + "_vio4"), clientInput[10]), IntegerEntry((((id + "_") + client) + "_cost"), clientInput[11]), IntegerEntry((((id + "_") + oppAddress) + "_age"), opponentInput[0]), IntegerEntry((((id + "_") + oppAddress) + "_sex"), opponentInput[1]), IntegerEntry((((id + "_") + oppAddress) + "_damage"), opponentInput[2]), IntegerEntry((((id + "_") + oppAddress) + "_fac1"), opponentInput[3]), IntegerEntry((((id + "_") + oppAddress) + "_fac2"), opponentInput[4]), IntegerEntry((((id + "_") + oppAddress) + "_fac3"), opponentInput[5]), IntegerEntry((((id + "_") + oppAddress) + "_fac4"), opponentInput[6]), IntegerEntry((((id + "_") + oppAddress) + "_vio1"), opponentInput[7]), IntegerEntry((((id + "_") + oppAddress) + "_vio2"), opponentInput[8]), IntegerEntry((((id + "_") + oppAddress) + "_vio3"), opponentInput[9]), IntegerEntry((((id + "_") + oppAddress) + "_vio4"), opponentInput[10]), IntegerEntry((((id + "_") + oppAddress) + "_cost"), opponentInput[11]), IntegerEntry((id + "_lgt"), lgtCond), StringEntry((id + "_status"), "open"), StringEntry((id + "_sender"), client)]
4652 }
4753 }
4854
4955
5056
5157 @Callable(i)
5258 func evaluatedDataCallback (response) = {
5359 let txId = toBase58String(i.transactionId)
5460 let parsedJson = parseJson(response)
5561 let crashId = parsedJson._1[1]
5662 let innocentAddress = parsedJson._2[1]
5763 let guiltyAddress = parsedJson._3[1]
5864 let RegisterTxId = match getString(crashId) {
5965 case s: String =>
6066 s
6167 case _ =>
6268 "no Data exists"
6369 }
6470 if ((RegisterTxId == "no Data exists"))
6571 then throw("There is no Data for this crashId!")
6672 else {
6773 let status = match getString((crashId + "_status")) {
6874 case s: String =>
6975 s
7076 case _ =>
7177 "no Data exists"
7278 }
7379 if ((status == "no Data exists"))
7480 then throw("There is no status for this case!")
7581 else if ((status == "closed"))
7682 then throw("A case should not be evaluated twice!")
7783 else {
7884 let costEstimationOfInnocentPerson = match getInteger((((RegisterTxId + "_") + innocentAddress) + "_cost")) {
7985 case s: Int =>
8086 s
8187 case _ =>
8288 "No data Found"
8389 }
8490 if ((costEstimationOfInnocentPerson == "No data Found"))
8591 then throw("There is no data for this address!")
8692 else if ((costEstimationOfInnocentPerson == -1))
8793 then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
8894 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)]
8995 }
9096 }
9197 }
9298
9399
94100
95101 @Callable(i)
96102 func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address) = {
97103 let txId = toBase58String(i.transactionId)
98104 [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address)]
99105 }
100106
101107
102108
103109 @Callable(i)
104110 func requestPayout (pred_txId,amount,id) = {
105111 let client = toString(i.caller)
106112 let txId = toBase58String(i.transactionId)
107113 [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)]
108114 }
109115
110116
111117 @Verifier(tx)
112118 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
113119

github/deemru/w8io/026f985 
59.46 ms