tx · 2mQu1Zd2j7zagJ7sL7S2gLTmTpoTfXAQvGWiFMtfg9h2

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.12.07 13:58 [2876145] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "2mQu1Zd2j7zagJ7sL7S2gLTmTpoTfXAQvGWiFMtfg9h2", "fee": 1000000, "feeAssetId": null, "timestamp": 1701946677709, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "YeJYwAbAKrDDRhUm8ygX7NxrvkHhpNYzjCrUyg99c55cjfWptFSEtvzuTzD4hTY2Si6pW1Qh9fmEYqTAGXmrx4x" ], "script": "base64:BgIWCAISBwoFEREICAESAwoBCBIECgIIAQYAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAEVFlQRQIPY3Jhc2hFdmFsdWF0aW9uAAdCQUlfRkVFAICt4gQAEUFJX1RPS0VOX0FTU0VUX0lEASCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgELcmVtb3ZlTWFya3MBC21hcmtzU3RyaW5nBAFhCQCwAgIFC21hcmtzU3RyaW5nAAEEAWIJALMCAgUBYQABBQFiAQlwYXJzZUpzb24BBGpzb24EDG1vZGlmaWVkSnNvbgkAsAICBQRqc29uAAEEDW1vZGlmaWVkSnNvbjIJALMCAgUMbW9kaWZpZWRKc29uAAEEBnNwbGl0MQkAtQkCBQ1tb2RpZmllZEpzb24yAgEsBAlrZXlWYWx1ZTEJALUJAgkAkQMCBQZzcGxpdDEAAAIBOgQEa2V5MQkBC3JlbW92ZU1hcmtzAQkAkQMCBQlrZXlWYWx1ZTEAAAQGdmFsdWUxCQELcmVtb3ZlTWFya3M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3MAAMJYru4pbfhrNCTUkZAhGufHbofgEFJpqJVP5cGUi Next: H7ZvmpTSvZN6uH3TDXDNmQx13EQjhZCrLSCGFNnKx9KY Diff:
OldNewDifferences
4747 let parameters = [id, TYPE, "evaluatedDataCallback"]
4848 let client = toString(i.caller)
4949 let txId = toBase58String(i.transactionId)
50- let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
51- if ((invokeTask != invokeTask))
52- then throw("Strict value is not equal to itself.")
53- else [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)]
50+ if ((client == oppAddress))
51+ then throw("Forbidden: Sender address equals opponents address!")
52+ else {
53+ let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
54+ if ((invokeTask != invokeTask))
55+ then throw("Strict value is not equal to itself.")
56+ else [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)]
57+ }
5458 }
5559 }
5660
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BAI_ADDRESS = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
55
66 let TYPE = "crashEvaluation"
77
88 let BAI_FEE = 10000000
99
1010 let AI_TOKEN_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
1111
1212 func removeMarks (marksString) = {
1313 let a = drop(marksString, 1)
1414 let b = dropRight(a, 1)
1515 b
1616 }
1717
1818
1919 func parseJson (json) = {
2020 let modifiedJson = drop(json, 1)
2121 let modifiedJson2 = dropRight(modifiedJson, 1)
2222 let split1 = split(modifiedJson2, ",")
2323 let keyValue1 = split(split1[0], ":")
2424 let key1 = removeMarks(keyValue1[0])
2525 let value1 = removeMarks(keyValue1[1])
2626 let keyValue2 = split(split1[1], ":")
2727 let key2 = removeMarks(keyValue2[0])
2828 let value2 = removeMarks(keyValue2[1])
2929 let keyValue3 = split(split1[2], ":")
3030 let key3 = removeMarks(keyValue3[0])
3131 let value3 = removeMarks(keyValue3[1])
3232 $Tuple3([key1, value1], [key2, value2], [key3, value3])
3333 }
3434
3535
3636 @Callable(i)
3737 func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = {
3838 let searchForExistingData = match getString(id) {
3939 case s: String =>
4040 s
4141 case _ =>
4242 "no Data exists"
4343 }
4444 if ((searchForExistingData != "no Data exists"))
4545 then throw("There is already existing Data for this case!")
4646 else {
4747 let parameters = [id, TYPE, "evaluatedDataCallback"]
4848 let client = toString(i.caller)
4949 let txId = toBase58String(i.transactionId)
50- let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
51- if ((invokeTask != invokeTask))
52- then throw("Strict value is not equal to itself.")
53- else [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)]
50+ if ((client == oppAddress))
51+ then throw("Forbidden: Sender address equals opponents address!")
52+ else {
53+ let invokeTask = invoke(Address(fromBase58String(BAI_ADDRESS)), "registerTaskCallback", parameters, [AttachedPayment(AI_TOKEN_ASSET_ID, BAI_FEE)])
54+ if ((invokeTask != invokeTask))
55+ then throw("Strict value is not equal to itself.")
56+ else [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)]
57+ }
5458 }
5559 }
5660
5761
5862
5963 @Callable(i)
6064 func evaluatedDataCallback (response) = {
6165 let txId = toBase58String(i.transactionId)
6266 let parsedJson = parseJson(response)
6367 let crashId = parsedJson._1[1]
6468 let innocentAddress = parsedJson._2[1]
6569 let guiltyAddress = parsedJson._3[1]
6670 let RegisterTxId = match getString(crashId) {
6771 case s: String =>
6872 s
6973 case _ =>
7074 "no Data exists"
7175 }
7276 if ((RegisterTxId == "no Data exists"))
7377 then throw("There is no Data for this crashId!")
7478 else {
7579 let status = match getString((crashId + "_status")) {
7680 case s: String =>
7781 s
7882 case _ =>
7983 "no Data exists"
8084 }
8185 if ((status == "no Data exists"))
8286 then throw("There is no status for this case!")
8387 else if ((status == "closed"))
8488 then throw("A case should not be payed out twice!")
8589 else if ((status == "evaluated"))
8690 then throw("A case should not be evaluated twice!")
8791 else {
8892 let costEstimationOfInnocentPerson = match getInteger((((crashId + "_") + innocentAddress) + "_cost")) {
8993 case s: Int =>
9094 s
9195 case _ =>
9296 "No data Found"
9397 }
9498 if ((costEstimationOfInnocentPerson == "No data Found"))
9599 then throw("There is no cost data for this address!")
96100 else if ((costEstimationOfInnocentPerson == -1))
97101 then [StringEntry((crashId + "_eval"), txId), StringEntry((crashId + "_innocent_address"), innocentAddress), StringEntry((crashId + "_guilty_address"), guiltyAddress), StringEntry((crashId + "_status"), "evaluated")]
98102 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)]
99103 }
100104 }
101105 }
102106
103107
104108
105109 @Callable(i)
106110 func requestPayout (crashId,amount) = {
107111 let sender = toString(i.caller)
108112 let txId = toBase58String(i.transactionId)
109113 let status = match getString((crashId + "_status")) {
110114 case s: String =>
111115 s
112116 case _ =>
113117 "no Data exists"
114118 }
115119 if ((status == "no Data exists"))
116120 then throw("There is no status for this case!")
117121 else if ((status != "evaluated"))
118122 then throw("Only cases with evaluated status can request a payout!")
119123 else {
120124 let eligible_address = match getString((crashId + "_innocent_address")) {
121125 case s: String =>
122126 s
123127 case _ =>
124128 "no Data exists"
125129 }
126130 if ((status == "no Data exists"))
127131 then throw("There is no eligible person for this case!")
128132 else if ((eligible_address != sender))
129133 then throw("You are not allowed to request a payout!")
130134 else [IntegerEntry((((crashId + "_") + sender) + "_cost"), amount), StringEntry((crashId + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(sender)), 100000000, unit)]
131135 }
132136 }
133137
134138
135139 @Verifier(tx)
136140 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
137141

github/deemru/w8io/026f985 
32.20 ms