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:BgIWCAISBwoFEREICAESAwoBCBIECgIIAQYAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAEVFlQRQIPY3Jhc2hFdmFsdWF0aW9uAAdCQUlfRkVFAICt4gQAEUFJX1RPS0VOX0FTU0VUX0lEASCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgELcmVtb3ZlTWFya3MBC21hcmtzU3RyaW5nBAFhCQCwAgIFC21hcmtzU3RyaW5nAAEEAWIJALMCAgUBYQABBQFiAQlwYXJzZUpzb24BBGpzb24EDG1vZGlmaWVkSnNvbgkAsAICBQRqc29uAAEEDW1vZGlmaWVkSnNvbjIJALMCAgUMbW9kaWZpZWRKc29uAAEEBnNwbGl0MQkAtQkCBQ1tb2RpZmllZEpzb24yAgEsBAlrZXlWYWx1ZTEJALUJAgkAkQMCBQZzcGxpdDEAAAIBOgQEa2V5MQkBC3JlbW92ZU1hcmtzAQkAkQMCBQlrZXlWYWx1ZTEAAAQGdmFsdWUxCQELcmVtb3ZlTWFya3MB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MAAMJYru4pbfhrNCTUkZAhGufHbofgEFJpqJVP5cGUi Next: H7ZvmpTSvZN6uH3TDXDNmQx13EQjhZCrLSCGFNnKx9KY Diff:
Old | New | Differences | |
---|---|---|---|
50 | 50 | let F = [z, b, "evaluatedDataCallback"] | |
51 | 51 | let G = toString(w.caller) | |
52 | 52 | let H = toBase58String(w.transactionId) | |
53 | - | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
54 | - | if ((I != I)) | |
55 | - | then throw("Strict value is not equal to itself.") | |
56 | - | else [StringEntry(z, H), IntegerEntry((((z + "_") + G) + "_age"), x[0]), IntegerEntry((((z + "_") + G) + "_sex"), x[1]), IntegerEntry((((z + "_") + G) + "_damage"), x[2]), IntegerEntry((((z + "_") + G) + "_fac1"), x[3]), IntegerEntry((((z + "_") + G) + "_fac2"), x[4]), IntegerEntry((((z + "_") + G) + "_fac3"), x[5]), IntegerEntry((((z + "_") + G) + "_fac4"), x[6]), IntegerEntry((((z + "_") + G) + "_vio1"), x[7]), IntegerEntry((((z + "_") + G) + "_vio2"), x[8]), IntegerEntry((((z + "_") + G) + "_vio3"), x[9]), IntegerEntry((((z + "_") + G) + "_vio4"), x[10]), IntegerEntry((((z + "_") + G) + "_cost"), x[11]), IntegerEntry((((z + "_") + A) + "_age"), y[0]), IntegerEntry((((z + "_") + A) + "_sex"), y[1]), IntegerEntry((((z + "_") + A) + "_damage"), y[2]), IntegerEntry((((z + "_") + A) + "_fac1"), y[3]), IntegerEntry((((z + "_") + A) + "_fac2"), y[4]), IntegerEntry((((z + "_") + A) + "_fac3"), y[5]), IntegerEntry((((z + "_") + A) + "_fac4"), y[6]), IntegerEntry((((z + "_") + A) + "_vio1"), y[7]), IntegerEntry((((z + "_") + A) + "_vio2"), y[8]), IntegerEntry((((z + "_") + A) + "_vio3"), y[9]), IntegerEntry((((z + "_") + A) + "_vio4"), y[10]), IntegerEntry((((z + "_") + A) + "_cost"), y[11]), IntegerEntry((z + "_lgt"), B), StringEntry((z + "_status"), "open"), StringEntry((z + "_sender"), G)] | |
53 | + | if ((G == A)) | |
54 | + | then throw("Forbidden: Sender address equals opponents address!") | |
55 | + | else { | |
56 | + | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
57 | + | if ((I != I)) | |
58 | + | then throw("Strict value is not equal to itself.") | |
59 | + | else [StringEntry(z, H), IntegerEntry((((z + "_") + G) + "_age"), x[0]), IntegerEntry((((z + "_") + G) + "_sex"), x[1]), IntegerEntry((((z + "_") + G) + "_damage"), x[2]), IntegerEntry((((z + "_") + G) + "_fac1"), x[3]), IntegerEntry((((z + "_") + G) + "_fac2"), x[4]), IntegerEntry((((z + "_") + G) + "_fac3"), x[5]), IntegerEntry((((z + "_") + G) + "_fac4"), x[6]), IntegerEntry((((z + "_") + G) + "_vio1"), x[7]), IntegerEntry((((z + "_") + G) + "_vio2"), x[8]), IntegerEntry((((z + "_") + G) + "_vio3"), x[9]), IntegerEntry((((z + "_") + G) + "_vio4"), x[10]), IntegerEntry((((z + "_") + G) + "_cost"), x[11]), IntegerEntry((((z + "_") + A) + "_age"), y[0]), IntegerEntry((((z + "_") + A) + "_sex"), y[1]), IntegerEntry((((z + "_") + A) + "_damage"), y[2]), IntegerEntry((((z + "_") + A) + "_fac1"), y[3]), IntegerEntry((((z + "_") + A) + "_fac2"), y[4]), IntegerEntry((((z + "_") + A) + "_fac3"), y[5]), IntegerEntry((((z + "_") + A) + "_fac4"), y[6]), IntegerEntry((((z + "_") + A) + "_vio1"), y[7]), IntegerEntry((((z + "_") + A) + "_vio2"), y[8]), IntegerEntry((((z + "_") + A) + "_vio3"), y[9]), IntegerEntry((((z + "_") + A) + "_vio4"), y[10]), IntegerEntry((((z + "_") + A) + "_cost"), y[11]), IntegerEntry((z + "_lgt"), B), StringEntry((z + "_status"), "open"), StringEntry((z + "_sender"), G)] | |
60 | + | } | |
57 | 61 | } | |
58 | 62 | } | |
59 | 63 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | 5 | ||
6 | 6 | let b = "crashEvaluation" | |
7 | 7 | ||
8 | 8 | let c = 10000000 | |
9 | 9 | ||
10 | 10 | let d = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
11 | 11 | ||
12 | 12 | func e (f) = { | |
13 | 13 | let g = drop(f, 1) | |
14 | 14 | let h = dropRight(g, 1) | |
15 | 15 | h | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func i (j) = { | |
20 | 20 | let k = drop(j, 1) | |
21 | 21 | let l = dropRight(k, 1) | |
22 | 22 | let m = split(l, ",") | |
23 | 23 | let n = split(m[0], ":") | |
24 | 24 | let o = e(n[0]) | |
25 | 25 | let p = e(n[1]) | |
26 | 26 | let q = split(m[1], ":") | |
27 | 27 | let r = e(q[0]) | |
28 | 28 | let s = e(q[1]) | |
29 | 29 | let t = split(m[2], ":") | |
30 | 30 | let u = e(t[0]) | |
31 | 31 | let v = e(t[1]) | |
32 | 32 | $Tuple3([o, p], [r, s], [u, v]) | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(w) | |
37 | 37 | func registerData (x,y,z,A,B) = { | |
38 | 38 | let C = { | |
39 | 39 | let D = getString(z) | |
40 | 40 | if ($isInstanceOf(D, "String")) | |
41 | 41 | then { | |
42 | 42 | let E = D | |
43 | 43 | E | |
44 | 44 | } | |
45 | 45 | else "no Data exists" | |
46 | 46 | } | |
47 | 47 | if ((C != "no Data exists")) | |
48 | 48 | then throw("There is already existing Data for this case!") | |
49 | 49 | else { | |
50 | 50 | let F = [z, b, "evaluatedDataCallback"] | |
51 | 51 | let G = toString(w.caller) | |
52 | 52 | let H = toBase58String(w.transactionId) | |
53 | - | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
54 | - | if ((I != I)) | |
55 | - | then throw("Strict value is not equal to itself.") | |
56 | - | else [StringEntry(z, H), IntegerEntry((((z + "_") + G) + "_age"), x[0]), IntegerEntry((((z + "_") + G) + "_sex"), x[1]), IntegerEntry((((z + "_") + G) + "_damage"), x[2]), IntegerEntry((((z + "_") + G) + "_fac1"), x[3]), IntegerEntry((((z + "_") + G) + "_fac2"), x[4]), IntegerEntry((((z + "_") + G) + "_fac3"), x[5]), IntegerEntry((((z + "_") + G) + "_fac4"), x[6]), IntegerEntry((((z + "_") + G) + "_vio1"), x[7]), IntegerEntry((((z + "_") + G) + "_vio2"), x[8]), IntegerEntry((((z + "_") + G) + "_vio3"), x[9]), IntegerEntry((((z + "_") + G) + "_vio4"), x[10]), IntegerEntry((((z + "_") + G) + "_cost"), x[11]), IntegerEntry((((z + "_") + A) + "_age"), y[0]), IntegerEntry((((z + "_") + A) + "_sex"), y[1]), IntegerEntry((((z + "_") + A) + "_damage"), y[2]), IntegerEntry((((z + "_") + A) + "_fac1"), y[3]), IntegerEntry((((z + "_") + A) + "_fac2"), y[4]), IntegerEntry((((z + "_") + A) + "_fac3"), y[5]), IntegerEntry((((z + "_") + A) + "_fac4"), y[6]), IntegerEntry((((z + "_") + A) + "_vio1"), y[7]), IntegerEntry((((z + "_") + A) + "_vio2"), y[8]), IntegerEntry((((z + "_") + A) + "_vio3"), y[9]), IntegerEntry((((z + "_") + A) + "_vio4"), y[10]), IntegerEntry((((z + "_") + A) + "_cost"), y[11]), IntegerEntry((z + "_lgt"), B), StringEntry((z + "_status"), "open"), StringEntry((z + "_sender"), G)] | |
53 | + | if ((G == A)) | |
54 | + | then throw("Forbidden: Sender address equals opponents address!") | |
55 | + | else { | |
56 | + | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
57 | + | if ((I != I)) | |
58 | + | then throw("Strict value is not equal to itself.") | |
59 | + | else [StringEntry(z, H), IntegerEntry((((z + "_") + G) + "_age"), x[0]), IntegerEntry((((z + "_") + G) + "_sex"), x[1]), IntegerEntry((((z + "_") + G) + "_damage"), x[2]), IntegerEntry((((z + "_") + G) + "_fac1"), x[3]), IntegerEntry((((z + "_") + G) + "_fac2"), x[4]), IntegerEntry((((z + "_") + G) + "_fac3"), x[5]), IntegerEntry((((z + "_") + G) + "_fac4"), x[6]), IntegerEntry((((z + "_") + G) + "_vio1"), x[7]), IntegerEntry((((z + "_") + G) + "_vio2"), x[8]), IntegerEntry((((z + "_") + G) + "_vio3"), x[9]), IntegerEntry((((z + "_") + G) + "_vio4"), x[10]), IntegerEntry((((z + "_") + G) + "_cost"), x[11]), IntegerEntry((((z + "_") + A) + "_age"), y[0]), IntegerEntry((((z + "_") + A) + "_sex"), y[1]), IntegerEntry((((z + "_") + A) + "_damage"), y[2]), IntegerEntry((((z + "_") + A) + "_fac1"), y[3]), IntegerEntry((((z + "_") + A) + "_fac2"), y[4]), IntegerEntry((((z + "_") + A) + "_fac3"), y[5]), IntegerEntry((((z + "_") + A) + "_fac4"), y[6]), IntegerEntry((((z + "_") + A) + "_vio1"), y[7]), IntegerEntry((((z + "_") + A) + "_vio2"), y[8]), IntegerEntry((((z + "_") + A) + "_vio3"), y[9]), IntegerEntry((((z + "_") + A) + "_vio4"), y[10]), IntegerEntry((((z + "_") + A) + "_cost"), y[11]), IntegerEntry((z + "_lgt"), B), StringEntry((z + "_status"), "open"), StringEntry((z + "_sender"), G)] | |
60 | + | } | |
57 | 61 | } | |
58 | 62 | } | |
59 | 63 | ||
60 | 64 | ||
61 | 65 | ||
62 | 66 | @Callable(w) | |
63 | 67 | func evaluatedDataCallback (J) = { | |
64 | 68 | let H = toBase58String(w.transactionId) | |
65 | 69 | let K = i(J) | |
66 | 70 | let L = K._1[1] | |
67 | 71 | let M = K._2[1] | |
68 | 72 | let N = K._3[1] | |
69 | 73 | let O = { | |
70 | 74 | let D = getString(L) | |
71 | 75 | if ($isInstanceOf(D, "String")) | |
72 | 76 | then { | |
73 | 77 | let E = D | |
74 | 78 | E | |
75 | 79 | } | |
76 | 80 | else "no Data exists" | |
77 | 81 | } | |
78 | 82 | if ((O == "no Data exists")) | |
79 | 83 | then throw("There is no Data for this crashId!") | |
80 | 84 | else { | |
81 | 85 | let P = { | |
82 | 86 | let D = getString((L + "_status")) | |
83 | 87 | if ($isInstanceOf(D, "String")) | |
84 | 88 | then { | |
85 | 89 | let E = D | |
86 | 90 | E | |
87 | 91 | } | |
88 | 92 | else "no Data exists" | |
89 | 93 | } | |
90 | 94 | if ((P == "no Data exists")) | |
91 | 95 | then throw("There is no status for this case!") | |
92 | 96 | else if ((P == "closed")) | |
93 | 97 | then throw("A case should not be payed out twice!") | |
94 | 98 | else if ((P == "evaluated")) | |
95 | 99 | then throw("A case should not be evaluated twice!") | |
96 | 100 | else { | |
97 | 101 | let Q = { | |
98 | 102 | let D = getInteger((((L + "_") + M) + "_cost")) | |
99 | 103 | if ($isInstanceOf(D, "Int")) | |
100 | 104 | then { | |
101 | 105 | let E = D | |
102 | 106 | E | |
103 | 107 | } | |
104 | 108 | else "No data Found" | |
105 | 109 | } | |
106 | 110 | if ((Q == "No data Found")) | |
107 | 111 | then throw("There is no cost data for this address!") | |
108 | 112 | else if ((Q == -1)) | |
109 | 113 | then [StringEntry((L + "_eval"), H), StringEntry((L + "_innocent_address"), M), StringEntry((L + "_guilty_address"), N), StringEntry((L + "_status"), "evaluated")] | |
110 | 114 | else [StringEntry((L + "_eval"), H), StringEntry((L + "_innocent_address"), M), StringEntry((L + "_guilty_address"), N), StringEntry((L + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(M)), 100000000, unit)] | |
111 | 115 | } | |
112 | 116 | } | |
113 | 117 | } | |
114 | 118 | ||
115 | 119 | ||
116 | 120 | ||
117 | 121 | @Callable(w) | |
118 | 122 | func requestPayout (L,R) = { | |
119 | 123 | let S = toString(w.caller) | |
120 | 124 | let H = toBase58String(w.transactionId) | |
121 | 125 | let P = { | |
122 | 126 | let D = getString((L + "_status")) | |
123 | 127 | if ($isInstanceOf(D, "String")) | |
124 | 128 | then { | |
125 | 129 | let E = D | |
126 | 130 | E | |
127 | 131 | } | |
128 | 132 | else "no Data exists" | |
129 | 133 | } | |
130 | 134 | if ((P == "no Data exists")) | |
131 | 135 | then throw("There is no status for this case!") | |
132 | 136 | else if ((P != "evaluated")) | |
133 | 137 | then throw("Only cases with evaluated status can request a payout!") | |
134 | 138 | else { | |
135 | 139 | let T = { | |
136 | 140 | let D = getString((L + "_innocent_address")) | |
137 | 141 | if ($isInstanceOf(D, "String")) | |
138 | 142 | then { | |
139 | 143 | let E = D | |
140 | 144 | E | |
141 | 145 | } | |
142 | 146 | else "no Data exists" | |
143 | 147 | } | |
144 | 148 | if ((P == "no Data exists")) | |
145 | 149 | then throw("There is no eligible person for this case!") | |
146 | 150 | else if ((T != S)) | |
147 | 151 | then throw("You are not allowed to request a payout!") | |
148 | 152 | else [IntegerEntry((((L + "_") + S) + "_cost"), R), StringEntry((L + "_status"), "closed"), ScriptTransfer(Address(fromBase58String(S)), 100000000, unit)] | |
149 | 153 | } | |
150 | 154 | } | |
151 | 155 | ||
152 | 156 | ||
153 | 157 | @Verifier(U) | |
154 | 158 | func V () = sigVerify(U.bodyBytes, U.proofs[0], U.senderPublicKey) | |
155 | 159 |
github/deemru/w8io/026f985 30.00 ms ◑