tx · FrzYyNDfE7qTFC7Kv3qv9McMVJNjoS7cs7U7CnhjCAf1

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.11.26 18:04 [2860523] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "FrzYyNDfE7qTFC7Kv3qv9McMVJNjoS7cs7U7CnhjCAf1", "fee": 1000000, "feeAssetId": null, "timestamp": 1701011093672, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "3kzSgjAQUC6RqMbQbUFgxLgx1toPz3zP2z85hvBfFw8jAWto3uWiTXU2PRwmFrWDh1b7MdfeD5KZnjzHnuF2aor3" ], "script": "base64:BgIfCAISBwoFEREICAESAwoBCBIGCgQICAgIEgUKAwgBCAQAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgARQUlfVE9LRU5fQVNTRVRfSUQBIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAQtyZW1vdmVNYXJrcwELbWFya3NTdHJpbmcEAWEJALACAgULbWFya3NTdHJpbmcAAQQBYgkAswICBQFhAAEFAWIBCXBhcnNlSnNvbgEEanNvbgQMbW9kaWZpZWRKc29uCQCwAgIFBGpzb24AAQQNbW9kaWZpZWRKc29uMgkAswICBQxtb2RpZmllZEpzb24AAQQGc3BsaXQxCQC1CQIFDW1vZGlmaWVkSnNvbjICASwECWtleVZhbHVlMQkAtQkCCQCRAwIFBnNwbGl0MQAAAgE6BARrZXkxCQELcmVtb3ZlTWFya3MBCQCRAwIFCWtleVZhbHVlMQAABAZ2YWx1ZTEJAQtyZW1vdmVNYXJrcwEJAJEDAgUJa2V5VmFsdWUxAAEECWtleVZhbHVlMgkAtQkCCQCRAw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3BlcnNvbl9hZGRyZXNzBAR0eElkCQDYBAEIBQFpDXRyYW5zYWN0aW9uSWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUNcHJlZGljdGlvbl9pZAUEdHhJZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBHR4SWQCB19ndWlsdHkFFWd1aWx0eV9wZXJzb25fYWRkcmVzcwUDbmlsAWkBDXJlcXVlc3RQYXlvdXQDCXByZWRfdHhJZAZhbW91bnQCaWQEBmNsaWVudAkApQgBCAUBaQZjYWxsZXIEBHR4SWQJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFAmlkAg9fcmVxdWVzdF9wYXlvdXQFBHR4SWQJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUEdHhJZAIHX2Ftb3VudAUGYW1vdW50CQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUEdHhJZAIOX3ByZWRpY3Rpb25faWQFCXByZWRfdHhJZAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleVnde6c=", "height": 2860523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CaKWhUsAsyTQLa8YrkUgsChEhwu7ScwE8rxY3xj1ttaN Next: BkVWUdsQ7JYxnNSBQC4rv1kZgMWPBgGeXmi2d41GYYvo Diff:
OldNewDifferences
55
66 let b = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
77
8-@Callable(c)
9-func registerData (d,e,f,g,h) = {
10- let i = {
11- let j = getString(f)
12- if ($isInstanceOf(j, "String"))
8+func c (d) = {
9+ let e = drop(d, 1)
10+ let f = dropRight(e, 1)
11+ f
12+ }
13+
14+
15+func g (h) = {
16+ let i = drop(h, 1)
17+ let j = dropRight(i, 1)
18+ let k = split(j, ",")
19+ let l = split(k[0], ":")
20+ let m = c(l[0])
21+ let n = c(l[1])
22+ let o = split(k[1], ":")
23+ let p = c(o[0])
24+ let q = c(o[1])
25+ let r = split(k[2], ":")
26+ let s = c(o[0])
27+ let t = c(o[1])
28+ $Tuple3([m, n], [p, q], [s, t])
29+ }
30+
31+
32+@Callable(u)
33+func registerData (v,w,x,y,z) = {
34+ let A = {
35+ let B = getString(x)
36+ if ($isInstanceOf(B, "String"))
1337 then {
14- let k = j
15- k
38+ let C = B
39+ C
1640 }
1741 else "no Data exists"
1842 }
19- if ((i != "no Data exists"))
43+ if ((A != "no Data exists"))
2044 then throw("There is already existing Data for this case!")
2145 else {
22- let l = toString(c.caller)
23- let m = toBase58String(c.transactionId)
24-[StringEntry(f, m), IntegerEntry((((m + "_") + l) + "_age"), d[0]), IntegerEntry((((m + "_") + l) + "_sex"), d[1]), IntegerEntry((((m + "_") + l) + "_damage"), d[2]), IntegerEntry((((m + "_") + l) + "_fac1"), d[3]), IntegerEntry((((m + "_") + l) + "_fac2"), d[4]), IntegerEntry((((m + "_") + l) + "_fac3"), d[5]), IntegerEntry((((m + "_") + l) + "_fac4"), d[6]), IntegerEntry((((m + "_") + l) + "_vio1"), d[7]), IntegerEntry((((m + "_") + l) + "_vio2"), d[8]), IntegerEntry((((m + "_") + l) + "_vio3"), d[9]), IntegerEntry((((m + "_") + l) + "_vio4"), d[10]), IntegerEntry((((m + "_") + l) + "_cost"), d[11]), IntegerEntry((((m + "_") + g) + "_age"), e[0]), IntegerEntry((((m + "_") + g) + "_sex"), e[1]), IntegerEntry((((m + "_") + g) + "_damage"), e[2]), IntegerEntry((((m + "_") + g) + "_fac1"), e[3]), IntegerEntry((((m + "_") + g) + "_fac2"), e[4]), IntegerEntry((((m + "_") + g) + "_fac3"), e[5]), IntegerEntry((((m + "_") + g) + "_fac4"), e[6]), IntegerEntry((((m + "_") + g) + "_vio1"), e[7]), IntegerEntry((((m + "_") + g) + "_vio2"), e[8]), IntegerEntry((((m + "_") + g) + "_vio3"), e[9]), IntegerEntry((((m + "_") + g) + "_vio4"), e[10]), IntegerEntry((((m + "_") + g) + "_cost"), e[11]), IntegerEntry((m + "_lgt"), h)]
46+ let D = toString(u.caller)
47+ let E = toBase58String(u.transactionId)
48+[StringEntry(x, E), IntegerEntry((((E + "_") + D) + "_age"), v[0]), IntegerEntry((((E + "_") + D) + "_sex"), v[1]), IntegerEntry((((E + "_") + D) + "_damage"), v[2]), IntegerEntry((((E + "_") + D) + "_fac1"), v[3]), IntegerEntry((((E + "_") + D) + "_fac2"), v[4]), IntegerEntry((((E + "_") + D) + "_fac3"), v[5]), IntegerEntry((((E + "_") + D) + "_fac4"), v[6]), IntegerEntry((((E + "_") + D) + "_vio1"), v[7]), IntegerEntry((((E + "_") + D) + "_vio2"), v[8]), IntegerEntry((((E + "_") + D) + "_vio3"), v[9]), IntegerEntry((((E + "_") + D) + "_vio4"), v[10]), IntegerEntry((((E + "_") + D) + "_cost"), v[11]), IntegerEntry((((E + "_") + y) + "_age"), w[0]), IntegerEntry((((E + "_") + y) + "_sex"), w[1]), IntegerEntry((((E + "_") + y) + "_damage"), w[2]), IntegerEntry((((E + "_") + y) + "_fac1"), w[3]), IntegerEntry((((E + "_") + y) + "_fac2"), w[4]), IntegerEntry((((E + "_") + y) + "_fac3"), w[5]), IntegerEntry((((E + "_") + y) + "_fac4"), w[6]), IntegerEntry((((E + "_") + y) + "_vio1"), w[7]), IntegerEntry((((E + "_") + y) + "_vio2"), w[8]), IntegerEntry((((E + "_") + y) + "_vio3"), w[9]), IntegerEntry((((E + "_") + y) + "_vio4"), w[10]), IntegerEntry((((E + "_") + y) + "_cost"), w[11]), IntegerEntry((x + "_lgt"), z), StringEntry((x + "_status"), "open")]
2549 }
2650 }
2751
2852
2953
30-@Callable(c)
31-func evaluatedData (n,o,p,q) = {
32- let m = toBase58String(c.transactionId)
33-[StringEntry(n, m), StringEntry((m + "_guilty"), q)]
54+@Callable(u)
55+func evaluatedDataCallback (F) = {
56+ let E = toBase58String(u.transactionId)
57+ let G = g(F)
58+ let H = G._1[1]
59+ let I = G._2[1]
60+ let J = G._3[1]
61+ let K = {
62+ let B = getString(H)
63+ if ($isInstanceOf(B, "String"))
64+ then {
65+ let C = B
66+ C
67+ }
68+ else "no Data exists"
69+ }
70+ if ((K == "no Data exists"))
71+ then throw("There is no Data for this crashId!")
72+ else {
73+ let L = {
74+ let B = getInteger((((K + "_") + I) + "_cost"))
75+ if ($isInstanceOf(B, "Int"))
76+ then {
77+ let C = B
78+ C
79+ }
80+ else "No data Found"
81+ }
82+ if ((L == "No data Found"))
83+ then throw("There is no data for this address!")
84+ else if ((L == -1))
85+ then [StringEntry((H + "_eval"), E), StringEntry((H + "_innocent_address"), I), StringEntry((H + "_guilty_address"), J), StringEntry((H + "_status"), "evaluated")]
86+ else [StringEntry((H + "_eval"), E), StringEntry((H + "_innocent_address"), I), StringEntry((H + "_guilty_address"), J), StringEntry((H + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(I)), 100000000, unit)]
87+ }
3488 }
3589
3690
3791
38-@Callable(c)
39-func requestPayout (r,s,f) = {
40- let l = toString(c.caller)
41- let m = toBase58String(c.transactionId)
42-[StringEntry((f + "_request_payout"), m), IntegerEntry((m + "_amount"), s), StringEntry((m + "_prediction_id"), r)]
92+@Callable(u)
93+func evaluatedData (M,N,O,P) = {
94+ let E = toBase58String(u.transactionId)
95+[StringEntry(M, E), StringEntry((E + "_guilty"), P)]
4396 }
4497
4598
46-@Verifier(t)
47-func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
99+
100+@Callable(u)
101+func requestPayout (Q,R,x) = {
102+ let D = toString(u.caller)
103+ let E = toBase58String(u.transactionId)
104+[StringEntry((x + "_request_payout"), E), IntegerEntry((E + "_amount"), R), StringEntry((E + "_prediction_id"), Q)]
105+ }
106+
107+
108+@Verifier(S)
109+func T () = sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey)
48110
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
55
66 let b = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
77
8-@Callable(c)
9-func registerData (d,e,f,g,h) = {
10- let i = {
11- let j = getString(f)
12- if ($isInstanceOf(j, "String"))
8+func c (d) = {
9+ let e = drop(d, 1)
10+ let f = dropRight(e, 1)
11+ f
12+ }
13+
14+
15+func g (h) = {
16+ let i = drop(h, 1)
17+ let j = dropRight(i, 1)
18+ let k = split(j, ",")
19+ let l = split(k[0], ":")
20+ let m = c(l[0])
21+ let n = c(l[1])
22+ let o = split(k[1], ":")
23+ let p = c(o[0])
24+ let q = c(o[1])
25+ let r = split(k[2], ":")
26+ let s = c(o[0])
27+ let t = c(o[1])
28+ $Tuple3([m, n], [p, q], [s, t])
29+ }
30+
31+
32+@Callable(u)
33+func registerData (v,w,x,y,z) = {
34+ let A = {
35+ let B = getString(x)
36+ if ($isInstanceOf(B, "String"))
1337 then {
14- let k = j
15- k
38+ let C = B
39+ C
1640 }
1741 else "no Data exists"
1842 }
19- if ((i != "no Data exists"))
43+ if ((A != "no Data exists"))
2044 then throw("There is already existing Data for this case!")
2145 else {
22- let l = toString(c.caller)
23- let m = toBase58String(c.transactionId)
24-[StringEntry(f, m), IntegerEntry((((m + "_") + l) + "_age"), d[0]), IntegerEntry((((m + "_") + l) + "_sex"), d[1]), IntegerEntry((((m + "_") + l) + "_damage"), d[2]), IntegerEntry((((m + "_") + l) + "_fac1"), d[3]), IntegerEntry((((m + "_") + l) + "_fac2"), d[4]), IntegerEntry((((m + "_") + l) + "_fac3"), d[5]), IntegerEntry((((m + "_") + l) + "_fac4"), d[6]), IntegerEntry((((m + "_") + l) + "_vio1"), d[7]), IntegerEntry((((m + "_") + l) + "_vio2"), d[8]), IntegerEntry((((m + "_") + l) + "_vio3"), d[9]), IntegerEntry((((m + "_") + l) + "_vio4"), d[10]), IntegerEntry((((m + "_") + l) + "_cost"), d[11]), IntegerEntry((((m + "_") + g) + "_age"), e[0]), IntegerEntry((((m + "_") + g) + "_sex"), e[1]), IntegerEntry((((m + "_") + g) + "_damage"), e[2]), IntegerEntry((((m + "_") + g) + "_fac1"), e[3]), IntegerEntry((((m + "_") + g) + "_fac2"), e[4]), IntegerEntry((((m + "_") + g) + "_fac3"), e[5]), IntegerEntry((((m + "_") + g) + "_fac4"), e[6]), IntegerEntry((((m + "_") + g) + "_vio1"), e[7]), IntegerEntry((((m + "_") + g) + "_vio2"), e[8]), IntegerEntry((((m + "_") + g) + "_vio3"), e[9]), IntegerEntry((((m + "_") + g) + "_vio4"), e[10]), IntegerEntry((((m + "_") + g) + "_cost"), e[11]), IntegerEntry((m + "_lgt"), h)]
46+ let D = toString(u.caller)
47+ let E = toBase58String(u.transactionId)
48+[StringEntry(x, E), IntegerEntry((((E + "_") + D) + "_age"), v[0]), IntegerEntry((((E + "_") + D) + "_sex"), v[1]), IntegerEntry((((E + "_") + D) + "_damage"), v[2]), IntegerEntry((((E + "_") + D) + "_fac1"), v[3]), IntegerEntry((((E + "_") + D) + "_fac2"), v[4]), IntegerEntry((((E + "_") + D) + "_fac3"), v[5]), IntegerEntry((((E + "_") + D) + "_fac4"), v[6]), IntegerEntry((((E + "_") + D) + "_vio1"), v[7]), IntegerEntry((((E + "_") + D) + "_vio2"), v[8]), IntegerEntry((((E + "_") + D) + "_vio3"), v[9]), IntegerEntry((((E + "_") + D) + "_vio4"), v[10]), IntegerEntry((((E + "_") + D) + "_cost"), v[11]), IntegerEntry((((E + "_") + y) + "_age"), w[0]), IntegerEntry((((E + "_") + y) + "_sex"), w[1]), IntegerEntry((((E + "_") + y) + "_damage"), w[2]), IntegerEntry((((E + "_") + y) + "_fac1"), w[3]), IntegerEntry((((E + "_") + y) + "_fac2"), w[4]), IntegerEntry((((E + "_") + y) + "_fac3"), w[5]), IntegerEntry((((E + "_") + y) + "_fac4"), w[6]), IntegerEntry((((E + "_") + y) + "_vio1"), w[7]), IntegerEntry((((E + "_") + y) + "_vio2"), w[8]), IntegerEntry((((E + "_") + y) + "_vio3"), w[9]), IntegerEntry((((E + "_") + y) + "_vio4"), w[10]), IntegerEntry((((E + "_") + y) + "_cost"), w[11]), IntegerEntry((x + "_lgt"), z), StringEntry((x + "_status"), "open")]
2549 }
2650 }
2751
2852
2953
30-@Callable(c)
31-func evaluatedData (n,o,p,q) = {
32- let m = toBase58String(c.transactionId)
33-[StringEntry(n, m), StringEntry((m + "_guilty"), q)]
54+@Callable(u)
55+func evaluatedDataCallback (F) = {
56+ let E = toBase58String(u.transactionId)
57+ let G = g(F)
58+ let H = G._1[1]
59+ let I = G._2[1]
60+ let J = G._3[1]
61+ let K = {
62+ let B = getString(H)
63+ if ($isInstanceOf(B, "String"))
64+ then {
65+ let C = B
66+ C
67+ }
68+ else "no Data exists"
69+ }
70+ if ((K == "no Data exists"))
71+ then throw("There is no Data for this crashId!")
72+ else {
73+ let L = {
74+ let B = getInteger((((K + "_") + I) + "_cost"))
75+ if ($isInstanceOf(B, "Int"))
76+ then {
77+ let C = B
78+ C
79+ }
80+ else "No data Found"
81+ }
82+ if ((L == "No data Found"))
83+ then throw("There is no data for this address!")
84+ else if ((L == -1))
85+ then [StringEntry((H + "_eval"), E), StringEntry((H + "_innocent_address"), I), StringEntry((H + "_guilty_address"), J), StringEntry((H + "_status"), "evaluated")]
86+ else [StringEntry((H + "_eval"), E), StringEntry((H + "_innocent_address"), I), StringEntry((H + "_guilty_address"), J), StringEntry((H + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(I)), 100000000, unit)]
87+ }
3488 }
3589
3690
3791
38-@Callable(c)
39-func requestPayout (r,s,f) = {
40- let l = toString(c.caller)
41- let m = toBase58String(c.transactionId)
42-[StringEntry((f + "_request_payout"), m), IntegerEntry((m + "_amount"), s), StringEntry((m + "_prediction_id"), r)]
92+@Callable(u)
93+func evaluatedData (M,N,O,P) = {
94+ let E = toBase58String(u.transactionId)
95+[StringEntry(M, E), StringEntry((E + "_guilty"), P)]
4396 }
4497
4598
46-@Verifier(t)
47-func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
99+
100+@Callable(u)
101+func requestPayout (Q,R,x) = {
102+ let D = toString(u.caller)
103+ let E = toBase58String(u.transactionId)
104+[StringEntry((x + "_request_payout"), E), IntegerEntry((E + "_amount"), R), StringEntry((E + "_prediction_id"), Q)]
105+ }
106+
107+
108+@Verifier(S)
109+func T () = sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey)
48110

github/deemru/w8io/026f985 
374.59 ms