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:BgIfCAISBwoFEREICAESAwoBCBIGCgQICAgIEgUKAwgBCAYAC0JBSV9BRERSRVNTAiMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAEVFlQRQIPY3Jhc2hFdmFsdWF0aW9uAAdCQUlfRkVFAICt4gQAEUFJX1RPS0VOX0FTU0VUX0lEASCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgELcmVtb3ZlTWFya3MBC21hcmtzU3RyaW5nBAFhCQCwAgIFC21hcmtzU3RyaW5nAAEEAWIJALMCAgUBYQABBQFiAQlwYXJzZUpzb24BBGpzb24EDG1vZGlmaWVkSnNvbgkAsAICBQRqc29uAAEEDW1vZGlmaWVkSnNvbjIJALMCAgUMbW9kaWZpZWRKc29uAAEEBnNwbGl0MQkAtQkCBQ1tb2RpZmllZEpzb24yAgEsBAlrZXlWYWx1ZTEJALUJAgkAkQMCBQZzcGxpdDEAAAIBOgQEa2V5MQkBC3JlbW92ZU1hcmtzAQkAkQMCBQlrZXlWYWx1ZTEAAAQGdmFsdWUxCQELcmVtb3ZlTWFya3MB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W1vdW50BQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQR0eElkAg5fcHJlZGljdGlvbl9pZAUJcHJlZF90eElkBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5QHyvzA==", "height": 2861864, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Sb3EdLjZWEpcnqC5viD1WtRruU6JFVaWqkKASR3rXj5 Next: 84k5n7ksXa7RqBgwyQ1GjLRxNZv7mDQ9KrHbX3DHGn75 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = "crashEvaluation" | |
7 | 7 | ||
8 | - | func c (d) = { | |
9 | - | let e = drop(d, 1) | |
10 | - | let f = dropRight(e, 1) | |
11 | - | f | |
8 | + | let c = 10000000 | |
9 | + | ||
10 | + | let d = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
11 | + | ||
12 | + | func e (f) = { | |
13 | + | let g = drop(f, 1) | |
14 | + | let h = dropRight(g, 1) | |
15 | + | h | |
12 | 16 | } | |
13 | 17 | ||
14 | 18 | ||
15 | - | func | |
16 | - | let | |
17 | - | let | |
18 | - | let | |
19 | - | let | |
20 | - | let | |
21 | - | let | |
22 | - | let | |
23 | - | let | |
24 | - | let | |
25 | - | let | |
26 | - | let | |
27 | - | let | |
28 | - | $Tuple3([ | |
19 | + | func i (j) = { | |
20 | + | let k = drop(j, 1) | |
21 | + | let l = dropRight(k, 1) | |
22 | + | let m = split(l, ",") | |
23 | + | let n = split(m[0], ":") | |
24 | + | let o = e(n[0]) | |
25 | + | let p = e(n[1]) | |
26 | + | let q = split(m[1], ":") | |
27 | + | let r = e(q[0]) | |
28 | + | let s = e(q[1]) | |
29 | + | let t = split(m[2], ":") | |
30 | + | let u = e(t[0]) | |
31 | + | let v = e(t[1]) | |
32 | + | $Tuple3([o, p], [r, s], [u, v]) | |
29 | 33 | } | |
30 | 34 | ||
31 | 35 | ||
32 | - | @Callable( | |
33 | - | func registerData ( | |
34 | - | let | |
35 | - | let | |
36 | - | if ($isInstanceOf( | |
36 | + | @Callable(w) | |
37 | + | func registerData (x,y,z,A,B) = { | |
38 | + | let C = { | |
39 | + | let D = getString(z) | |
40 | + | if ($isInstanceOf(D, "String")) | |
37 | 41 | then { | |
38 | - | let | |
39 | - | | |
42 | + | let E = D | |
43 | + | E | |
40 | 44 | } | |
41 | 45 | else "no Data exists" | |
42 | 46 | } | |
43 | - | if (( | |
47 | + | if ((C != "no Data exists")) | |
44 | 48 | then throw("There is already existing Data for this case!") | |
45 | 49 | else { | |
46 | - | let D = toString(u.caller) | |
47 | - | let E = toBase58String(u.transactionId) | |
48 | - | [StringEntry(x, E), IntegerEntry((((x + "_") + D) + "_age"), v[0]), IntegerEntry((((x + "_") + D) + "_sex"), v[1]), IntegerEntry((((x + "_") + D) + "_damage"), v[2]), IntegerEntry((((x + "_") + D) + "_fac1"), v[3]), IntegerEntry((((x + "_") + D) + "_fac2"), v[4]), IntegerEntry((((x + "_") + D) + "_fac3"), v[5]), IntegerEntry((((x + "_") + D) + "_fac4"), v[6]), IntegerEntry((((x + "_") + D) + "_vio1"), v[7]), IntegerEntry((((x + "_") + D) + "_vio2"), v[8]), IntegerEntry((((x + "_") + D) + "_vio3"), v[9]), IntegerEntry((((x + "_") + D) + "_vio4"), v[10]), IntegerEntry((((x + "_") + D) + "_cost"), v[11]), IntegerEntry((((x + "_") + y) + "_age"), w[0]), IntegerEntry((((x + "_") + y) + "_sex"), w[1]), IntegerEntry((((x + "_") + y) + "_damage"), w[2]), IntegerEntry((((x + "_") + y) + "_fac1"), w[3]), IntegerEntry((((x + "_") + y) + "_fac2"), w[4]), IntegerEntry((((x + "_") + y) + "_fac3"), w[5]), IntegerEntry((((x + "_") + y) + "_fac4"), w[6]), IntegerEntry((((x + "_") + y) + "_vio1"), w[7]), IntegerEntry((((x + "_") + y) + "_vio2"), w[8]), IntegerEntry((((x + "_") + y) + "_vio3"), w[9]), IntegerEntry((((x + "_") + y) + "_vio4"), w[10]), IntegerEntry((((x + "_") + y) + "_cost"), w[11]), IntegerEntry((x + "_lgt"), z), StringEntry((x + "_status"), "open"), StringEntry((x + "_sender"), D)] | |
50 | + | let F = [z, b, "evaluatedDataCallback"] | |
51 | + | let G = toString(w.caller) | |
52 | + | let H = toBase58String(w.transactionId) | |
53 | + | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
54 | + | [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)] | |
49 | 55 | } | |
50 | 56 | } | |
51 | 57 | ||
52 | 58 | ||
53 | 59 | ||
54 | - | @Callable( | |
55 | - | func evaluatedDataCallback ( | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | let | |
60 | - | let | |
61 | - | let | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
60 | + | @Callable(w) | |
61 | + | func evaluatedDataCallback (J) = { | |
62 | + | let H = toBase58String(w.transactionId) | |
63 | + | let K = i(J) | |
64 | + | let L = K._1[1] | |
65 | + | let M = K._2[1] | |
66 | + | let N = K._3[1] | |
67 | + | let O = { | |
68 | + | let D = getString(L) | |
69 | + | if ($isInstanceOf(D, "String")) | |
64 | 70 | then { | |
65 | - | let | |
66 | - | | |
71 | + | let E = D | |
72 | + | E | |
67 | 73 | } | |
68 | 74 | else "no Data exists" | |
69 | 75 | } | |
70 | - | if (( | |
76 | + | if ((O == "no Data exists")) | |
71 | 77 | then throw("There is no Data for this crashId!") | |
72 | 78 | else { | |
73 | - | let | |
74 | - | let | |
75 | - | if ($isInstanceOf( | |
79 | + | let P = { | |
80 | + | let D = getString((L + "_status")) | |
81 | + | if ($isInstanceOf(D, "String")) | |
76 | 82 | then { | |
77 | - | let | |
78 | - | | |
83 | + | let E = D | |
84 | + | E | |
79 | 85 | } | |
80 | 86 | else "no Data exists" | |
81 | 87 | } | |
82 | - | if (( | |
88 | + | if ((P == "no Data exists")) | |
83 | 89 | then throw("There is no status for this case!") | |
84 | - | else if (( | |
90 | + | else if ((P == "closed")) | |
85 | 91 | then throw("A case should not be evaluated twice!") | |
86 | 92 | else { | |
87 | - | let | |
88 | - | let | |
89 | - | if ($isInstanceOf( | |
93 | + | let Q = { | |
94 | + | let D = getInteger((((O + "_") + M) + "_cost")) | |
95 | + | if ($isInstanceOf(D, "Int")) | |
90 | 96 | then { | |
91 | - | let | |
92 | - | | |
97 | + | let E = D | |
98 | + | E | |
93 | 99 | } | |
94 | 100 | else "No data Found" | |
95 | 101 | } | |
96 | - | if (( | |
102 | + | if ((Q == "No data Found")) | |
97 | 103 | then throw("There is no data for this address!") | |
98 | - | else if (( | |
99 | - | then [StringEntry(( | |
100 | - | else [StringEntry(( | |
104 | + | else if ((Q == -1)) | |
105 | + | then [StringEntry((L + "_eval"), H), StringEntry((L + "_innocent_address"), M), StringEntry((L + "_guilty_address"), N), StringEntry((L + "_status"), "evaluated")] | |
106 | + | 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)] | |
101 | 107 | } | |
102 | 108 | } | |
103 | 109 | } | |
104 | 110 | ||
105 | 111 | ||
106 | 112 | ||
107 | - | @Callable( | |
108 | - | func evaluatedData ( | |
109 | - | let | |
110 | - | [StringEntry( | |
113 | + | @Callable(w) | |
114 | + | func evaluatedData (R,S,T,U) = { | |
115 | + | let H = toBase58String(w.transactionId) | |
116 | + | [StringEntry(R, H), StringEntry((H + "_guilty"), U)] | |
111 | 117 | } | |
112 | 118 | ||
113 | 119 | ||
114 | 120 | ||
115 | - | @Callable( | |
116 | - | func requestPayout ( | |
117 | - | let | |
118 | - | let | |
119 | - | [StringEntry(( | |
121 | + | @Callable(w) | |
122 | + | func requestPayout (V,W,z) = { | |
123 | + | let G = toString(w.caller) | |
124 | + | let H = toBase58String(w.transactionId) | |
125 | + | [StringEntry((z + "_request_payout"), H), IntegerEntry((H + "_amount"), W), StringEntry((H + "_prediction_id"), V)] | |
120 | 126 | } | |
121 | 127 | ||
122 | 128 | ||
123 | - | @Verifier( | |
124 | - | func | |
129 | + | @Verifier(X) | |
130 | + | func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey) | |
125 | 131 |
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 | - | let b = | |
6 | + | let b = "crashEvaluation" | |
7 | 7 | ||
8 | - | func c (d) = { | |
9 | - | let e = drop(d, 1) | |
10 | - | let f = dropRight(e, 1) | |
11 | - | f | |
8 | + | let c = 10000000 | |
9 | + | ||
10 | + | let d = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
11 | + | ||
12 | + | func e (f) = { | |
13 | + | let g = drop(f, 1) | |
14 | + | let h = dropRight(g, 1) | |
15 | + | h | |
12 | 16 | } | |
13 | 17 | ||
14 | 18 | ||
15 | - | func | |
16 | - | let | |
17 | - | let | |
18 | - | let | |
19 | - | let | |
20 | - | let | |
21 | - | let | |
22 | - | let | |
23 | - | let | |
24 | - | let | |
25 | - | let | |
26 | - | let | |
27 | - | let | |
28 | - | $Tuple3([ | |
19 | + | func i (j) = { | |
20 | + | let k = drop(j, 1) | |
21 | + | let l = dropRight(k, 1) | |
22 | + | let m = split(l, ",") | |
23 | + | let n = split(m[0], ":") | |
24 | + | let o = e(n[0]) | |
25 | + | let p = e(n[1]) | |
26 | + | let q = split(m[1], ":") | |
27 | + | let r = e(q[0]) | |
28 | + | let s = e(q[1]) | |
29 | + | let t = split(m[2], ":") | |
30 | + | let u = e(t[0]) | |
31 | + | let v = e(t[1]) | |
32 | + | $Tuple3([o, p], [r, s], [u, v]) | |
29 | 33 | } | |
30 | 34 | ||
31 | 35 | ||
32 | - | @Callable( | |
33 | - | func registerData ( | |
34 | - | let | |
35 | - | let | |
36 | - | if ($isInstanceOf( | |
36 | + | @Callable(w) | |
37 | + | func registerData (x,y,z,A,B) = { | |
38 | + | let C = { | |
39 | + | let D = getString(z) | |
40 | + | if ($isInstanceOf(D, "String")) | |
37 | 41 | then { | |
38 | - | let | |
39 | - | | |
42 | + | let E = D | |
43 | + | E | |
40 | 44 | } | |
41 | 45 | else "no Data exists" | |
42 | 46 | } | |
43 | - | if (( | |
47 | + | if ((C != "no Data exists")) | |
44 | 48 | then throw("There is already existing Data for this case!") | |
45 | 49 | else { | |
46 | - | let D = toString(u.caller) | |
47 | - | let E = toBase58String(u.transactionId) | |
48 | - | [StringEntry(x, E), IntegerEntry((((x + "_") + D) + "_age"), v[0]), IntegerEntry((((x + "_") + D) + "_sex"), v[1]), IntegerEntry((((x + "_") + D) + "_damage"), v[2]), IntegerEntry((((x + "_") + D) + "_fac1"), v[3]), IntegerEntry((((x + "_") + D) + "_fac2"), v[4]), IntegerEntry((((x + "_") + D) + "_fac3"), v[5]), IntegerEntry((((x + "_") + D) + "_fac4"), v[6]), IntegerEntry((((x + "_") + D) + "_vio1"), v[7]), IntegerEntry((((x + "_") + D) + "_vio2"), v[8]), IntegerEntry((((x + "_") + D) + "_vio3"), v[9]), IntegerEntry((((x + "_") + D) + "_vio4"), v[10]), IntegerEntry((((x + "_") + D) + "_cost"), v[11]), IntegerEntry((((x + "_") + y) + "_age"), w[0]), IntegerEntry((((x + "_") + y) + "_sex"), w[1]), IntegerEntry((((x + "_") + y) + "_damage"), w[2]), IntegerEntry((((x + "_") + y) + "_fac1"), w[3]), IntegerEntry((((x + "_") + y) + "_fac2"), w[4]), IntegerEntry((((x + "_") + y) + "_fac3"), w[5]), IntegerEntry((((x + "_") + y) + "_fac4"), w[6]), IntegerEntry((((x + "_") + y) + "_vio1"), w[7]), IntegerEntry((((x + "_") + y) + "_vio2"), w[8]), IntegerEntry((((x + "_") + y) + "_vio3"), w[9]), IntegerEntry((((x + "_") + y) + "_vio4"), w[10]), IntegerEntry((((x + "_") + y) + "_cost"), w[11]), IntegerEntry((x + "_lgt"), z), StringEntry((x + "_status"), "open"), StringEntry((x + "_sender"), D)] | |
50 | + | let F = [z, b, "evaluatedDataCallback"] | |
51 | + | let G = toString(w.caller) | |
52 | + | let H = toBase58String(w.transactionId) | |
53 | + | let I = invoke(Address(fromBase58String(a)), "registerTaskCallback", F, [AttachedPayment(d, c)]) | |
54 | + | [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)] | |
49 | 55 | } | |
50 | 56 | } | |
51 | 57 | ||
52 | 58 | ||
53 | 59 | ||
54 | - | @Callable( | |
55 | - | func evaluatedDataCallback ( | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | let | |
60 | - | let | |
61 | - | let | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
60 | + | @Callable(w) | |
61 | + | func evaluatedDataCallback (J) = { | |
62 | + | let H = toBase58String(w.transactionId) | |
63 | + | let K = i(J) | |
64 | + | let L = K._1[1] | |
65 | + | let M = K._2[1] | |
66 | + | let N = K._3[1] | |
67 | + | let O = { | |
68 | + | let D = getString(L) | |
69 | + | if ($isInstanceOf(D, "String")) | |
64 | 70 | then { | |
65 | - | let | |
66 | - | | |
71 | + | let E = D | |
72 | + | E | |
67 | 73 | } | |
68 | 74 | else "no Data exists" | |
69 | 75 | } | |
70 | - | if (( | |
76 | + | if ((O == "no Data exists")) | |
71 | 77 | then throw("There is no Data for this crashId!") | |
72 | 78 | else { | |
73 | - | let | |
74 | - | let | |
75 | - | if ($isInstanceOf( | |
79 | + | let P = { | |
80 | + | let D = getString((L + "_status")) | |
81 | + | if ($isInstanceOf(D, "String")) | |
76 | 82 | then { | |
77 | - | let | |
78 | - | | |
83 | + | let E = D | |
84 | + | E | |
79 | 85 | } | |
80 | 86 | else "no Data exists" | |
81 | 87 | } | |
82 | - | if (( | |
88 | + | if ((P == "no Data exists")) | |
83 | 89 | then throw("There is no status for this case!") | |
84 | - | else if (( | |
90 | + | else if ((P == "closed")) | |
85 | 91 | then throw("A case should not be evaluated twice!") | |
86 | 92 | else { | |
87 | - | let | |
88 | - | let | |
89 | - | if ($isInstanceOf( | |
93 | + | let Q = { | |
94 | + | let D = getInteger((((O + "_") + M) + "_cost")) | |
95 | + | if ($isInstanceOf(D, "Int")) | |
90 | 96 | then { | |
91 | - | let | |
92 | - | | |
97 | + | let E = D | |
98 | + | E | |
93 | 99 | } | |
94 | 100 | else "No data Found" | |
95 | 101 | } | |
96 | - | if (( | |
102 | + | if ((Q == "No data Found")) | |
97 | 103 | then throw("There is no data for this address!") | |
98 | - | else if (( | |
99 | - | then [StringEntry(( | |
100 | - | else [StringEntry(( | |
104 | + | else if ((Q == -1)) | |
105 | + | then [StringEntry((L + "_eval"), H), StringEntry((L + "_innocent_address"), M), StringEntry((L + "_guilty_address"), N), StringEntry((L + "_status"), "evaluated")] | |
106 | + | 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)] | |
101 | 107 | } | |
102 | 108 | } | |
103 | 109 | } | |
104 | 110 | ||
105 | 111 | ||
106 | 112 | ||
107 | - | @Callable( | |
108 | - | func evaluatedData ( | |
109 | - | let | |
110 | - | [StringEntry( | |
113 | + | @Callable(w) | |
114 | + | func evaluatedData (R,S,T,U) = { | |
115 | + | let H = toBase58String(w.transactionId) | |
116 | + | [StringEntry(R, H), StringEntry((H + "_guilty"), U)] | |
111 | 117 | } | |
112 | 118 | ||
113 | 119 | ||
114 | 120 | ||
115 | - | @Callable( | |
116 | - | func requestPayout ( | |
117 | - | let | |
118 | - | let | |
119 | - | [StringEntry(( | |
121 | + | @Callable(w) | |
122 | + | func requestPayout (V,W,z) = { | |
123 | + | let G = toString(w.caller) | |
124 | + | let H = toBase58String(w.transactionId) | |
125 | + | [StringEntry((z + "_request_payout"), H), IntegerEntry((H + "_amount"), W), StringEntry((H + "_prediction_id"), V)] | |
120 | 126 | } | |
121 | 127 | ||
122 | 128 | ||
123 | - | @Verifier( | |
124 | - | func | |
129 | + | @Verifier(X) | |
130 | + | func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey) | |
125 | 131 |
github/deemru/w8io/026f985 65.31 ms ◑