tx · 6hxkDUmwFCNq3KcJgrwBsXWybdESaPvQt4urz2icGUbv
3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h: -0.01400000 Waves
2021.09.29 08:31 [1723815] smart account 3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h > SELF 0.00000000 Waves
{
"type": 13,
"id": "6hxkDUmwFCNq3KcJgrwBsXWybdESaPvQt4urz2icGUbv",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1632893535469,
"version": 2,
"chainId": 84,
"sender": "3Mzms5gHUDYufDRjSVN7g9DcCMG77pzFN4h",
"senderPublicKey": "CU8dJ2mJQjVBWaDHwXjPztuVdy9XAyAnTuqSCKuNPARn",
"proofs": [
"kxXBw32SGjUQJGiAGLYDe2t4DqFpoVRHHzqm7WACiv4zdvtLo8xZGhTcgSeQXF9VEnVxegzrPZnnJd3cqU81TAD"
],
"script": "base64:AAIFAAAAAAAAAB0IAhIDCgEBEgASBwoFCAgICAgSBAoCCAgSAwoBCAAAABMAAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAJc2lnbkFkbWluAgAAACMzTjF3UGdIRnRlem1SVkJhcW9valA4WEp3VGthcms0aGJpZgAAAAAIZmVlQWRtaW4CAAAAIzNOMXdQZ0hGdGV6bVJWQmFxb29qUDhYSndUa2FyazRoYmlmAAAAAARiYW5rAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAJc2lnblRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAANYWNjZXB0ZWRUb2tlbgEAAAAgYfHkwqhFFD81I1SLw0GO/ozjwqWx6THXqSKcOOhu9fcAAAAABnVzZG5JRAIAAAAsM0tGWEJHR0xDakE1WjJEdVc0RHE5ZkREckhqSkpQMVpFa2Fv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AAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAsE5F9Q==",
"height": 1723815,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: G9SCAFZ9oFy1qMF67kqPiEsfvJwPiMGBWUBuo5GooMJn
Next: 7tR92wrGrPZnQmj3JSivqhxHn2mdsrxvaatQfRzsQ7qj
Diff:
Old | New | | Differences |
---|
17 | 17 | | |
---|
18 | 18 | | let h = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" |
---|
19 | 19 | | |
---|
20 | | - | func i (j,k) = { |
---|
21 | | - | let l = getString(this, (j + k)) |
---|
22 | | - | if ($isInstanceOf(l, "String")) |
---|
| 20 | + | func i (j) = valueOrElse(getInteger(this, j), 0) |
---|
| 21 | + | |
---|
| 22 | + | |
---|
| 23 | + | func k (l,m) = { |
---|
| 24 | + | let n = getString(this, (l + m)) |
---|
| 25 | + | if ($isInstanceOf(n, "String")) |
---|
23 | 26 | | then { |
---|
24 | | - | let m = l |
---|
25 | | - | m |
---|
| 27 | + | let o = n |
---|
| 28 | + | o |
---|
26 | 29 | | } |
---|
27 | 30 | | else "NONE" |
---|
28 | 31 | | } |
---|
29 | 32 | | |
---|
30 | 33 | | |
---|
31 | | - | func n (k,o) = { |
---|
32 | | - | let l = getString(this, ((k + "@") + o)) |
---|
33 | | - | if ($isInstanceOf(l, "String")) |
---|
| 34 | + | func p (m,q) = { |
---|
| 35 | + | let n = getString(this, ((m + "@") + q)) |
---|
| 36 | + | if ($isInstanceOf(n, "String")) |
---|
34 | 37 | | then { |
---|
35 | | - | let m = l |
---|
36 | | - | m |
---|
| 38 | + | let o = n |
---|
| 39 | + | o |
---|
37 | 40 | | } |
---|
38 | 41 | | else "NONE" |
---|
39 | 42 | | } |
---|
40 | 43 | | |
---|
41 | 44 | | |
---|
42 | | - | func p (k) = { |
---|
43 | | - | let l = getString(this, k) |
---|
44 | | - | if ($isInstanceOf(l, "String")) |
---|
| 45 | + | func r (m) = { |
---|
| 46 | + | let n = getString(this, m) |
---|
| 47 | + | if ($isInstanceOf(n, "String")) |
---|
45 | 48 | | then { |
---|
46 | | - | let m = l |
---|
47 | | - | m |
---|
| 49 | + | let o = n |
---|
| 50 | + | o |
---|
48 | 51 | | } |
---|
49 | 52 | | else "NONE" |
---|
50 | 53 | | } |
---|
51 | 54 | | |
---|
52 | 55 | | |
---|
53 | | - | func q (r) = if (if (if ((size(r) == 35)) |
---|
54 | | - | then (take(r, 2) == "3P") |
---|
| 56 | + | func s (t) = if (if (if ((size(t) == 35)) |
---|
| 57 | + | then (take(t, 2) == "3P") |
---|
55 | 58 | | else false) |
---|
56 | 59 | | then true |
---|
57 | | - | else (take(r, 2) == "3N")) |
---|
| 60 | + | else (take(t, 2) == "3N")) |
---|
58 | 61 | | then true |
---|
59 | | - | else (take(r, 2) == "3M") |
---|
| 62 | + | else (take(t, 2) == "3M") |
---|
60 | 63 | | |
---|
61 | 64 | | |
---|
62 | | - | func s (t,r) = if ((size(r) > 0)) |
---|
63 | | - | then (t + 1) |
---|
64 | | - | else (t + 0) |
---|
| 65 | + | func u (v,t) = if ((size(t) > 0)) |
---|
| 66 | + | then (v + 1) |
---|
| 67 | + | else (v + 0) |
---|
65 | 68 | | |
---|
66 | 69 | | |
---|
67 | | - | func u (v) = { |
---|
68 | | - | let l = getString(this, v) |
---|
69 | | - | if ($isInstanceOf(l, "String")) |
---|
| 70 | + | func w (j) = { |
---|
| 71 | + | let n = getString(this, j) |
---|
| 72 | + | if ($isInstanceOf(n, "String")) |
---|
70 | 73 | | then { |
---|
71 | | - | let m = l |
---|
72 | | - | if ((m == "PENDING")) |
---|
| 74 | + | let o = n |
---|
| 75 | + | if ((o == "PENDING")) |
---|
73 | 76 | | then true |
---|
74 | 77 | | else false |
---|
75 | 78 | | } |
---|
|
77 | 80 | | } |
---|
78 | 81 | | |
---|
79 | 82 | | |
---|
80 | | - | func w (x) = take(drop(x, 1), value(indexOf(drop(x, 1), "\""))) |
---|
| 83 | + | func x (y) = take(drop(y, 1), value(indexOf(drop(y, 1), "\""))) |
---|
81 | 84 | | |
---|
82 | 85 | | |
---|
83 | | - | func y (x,v) = { |
---|
84 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
85 | | - | let A = drop(x, ((z + size(v)) + 3)) |
---|
86 | | - | let B = w(A) |
---|
| 86 | + | func z (y,j) = { |
---|
| 87 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 88 | + | let B = drop(y, ((A + size(j)) + 3)) |
---|
| 89 | + | let C = x(B) |
---|
| 90 | + | C |
---|
| 91 | + | } |
---|
| 92 | + | |
---|
| 93 | + | |
---|
| 94 | + | func D (y,j) = { |
---|
| 95 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 96 | + | let B = take(y, ((A + size(j)) + 3)) |
---|
87 | 97 | | B |
---|
88 | 98 | | } |
---|
89 | 99 | | |
---|
90 | 100 | | |
---|
91 | | - | func C (x,v) = { |
---|
92 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
93 | | - | let A = take(x, ((z + size(v)) + 3)) |
---|
94 | | - | A |
---|
| 101 | + | func E (y,j) = { |
---|
| 102 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 103 | + | let B = takeRight(y, (size(y) - ((((A + size(j)) + 3) + 0) + 2))) |
---|
| 104 | + | B |
---|
95 | 105 | | } |
---|
96 | 106 | | |
---|
97 | 107 | | |
---|
98 | | - | func D (x,v) = { |
---|
99 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
100 | | - | let A = takeRight(x, (size(x) - ((((z + size(v)) + 3) + 0) + 2))) |
---|
101 | | - | A |
---|
102 | | - | } |
---|
103 | | - | |
---|
104 | | - | |
---|
105 | | - | @Callable(E) |
---|
106 | | - | func setFee (F) = { |
---|
107 | | - | let G = toBase58String(E.caller.bytes) |
---|
108 | | - | if ((G == c)) |
---|
109 | | - | then [IntegerEntry(("certification_fee_" + toBase58String(f)), F)] |
---|
| 108 | + | @Callable(F) |
---|
| 109 | + | func setFee (G) = { |
---|
| 110 | + | let H = toBase58String(F.caller.bytes) |
---|
| 111 | + | if ((H == c)) |
---|
| 112 | + | then [IntegerEntry(("certification_fee_" + toBase58String(f)), G)] |
---|
110 | 113 | | else throw("You are not allowed to change fee") |
---|
111 | 114 | | } |
---|
112 | 115 | | |
---|
113 | 116 | | |
---|
114 | 117 | | |
---|
115 | | - | @Callable(E) |
---|
| 118 | + | @Callable(F) |
---|
116 | 119 | | func refillCredits () = { |
---|
117 | | - | let G = toBase58String(E.caller.bytes) |
---|
118 | | - | let H = value(E.payments[0]) |
---|
119 | | - | let I = value(H.amount) |
---|
120 | | - | let J = if (isDefined(H.assetId)) |
---|
121 | | - | then value(H.assetId) |
---|
| 120 | + | let H = toBase58String(F.caller.bytes) |
---|
| 121 | + | let I = value(F.payments[0]) |
---|
| 122 | + | let J = value(I.amount) |
---|
| 123 | + | let K = if (isDefined(I.assetId)) |
---|
| 124 | + | then value(I.assetId) |
---|
122 | 125 | | else throw("Accept SIGN token only") |
---|
123 | | - | if ((e != J)) |
---|
| 126 | + | if ((e != K)) |
---|
124 | 127 | | then throw("Accept SIGN token only") |
---|
125 | 128 | | else { |
---|
126 | | - | let K = getIntegerValue(a, ("certification_fee_" + toBase58String(value(J)))) |
---|
127 | | - | let L = (K / I) |
---|
128 | | - | if ((0 >= L)) |
---|
| 129 | + | let L = getIntegerValue(a, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 130 | + | let M = (L / J) |
---|
| 131 | + | if ((0 >= M)) |
---|
129 | 132 | | then throw("Not enough for at least 1 credit") |
---|
130 | | - | else [IntegerEntry(("credits_" + toBase58String(f)), L), ScriptTransfer(addressFromStringValue(h), I, H.assetId)] |
---|
| 133 | + | else [IntegerEntry(("credits_" + toBase58String(f)), M), ScriptTransfer(addressFromStringValue(h), J, I.assetId)] |
---|
131 | 134 | | } |
---|
132 | 135 | | } |
---|
133 | 136 | | |
---|
134 | 137 | | |
---|
135 | 138 | | |
---|
136 | | - | @Callable(M) |
---|
137 | | - | func fileCertification (N,O,k,A,P) = { |
---|
138 | | - | let Q = value(M.transactionId) |
---|
139 | | - | let R = i(N, k) |
---|
140 | | - | let S = p(k) |
---|
141 | | - | let G = toBase58String(M.caller.bytes) |
---|
142 | | - | if ((R != "NONE")) |
---|
| 139 | + | @Callable(N) |
---|
| 140 | + | func fileCertification (O,P,m,B,Q) = { |
---|
| 141 | + | let R = value(N.transactionId) |
---|
| 142 | + | let S = k(O, m) |
---|
| 143 | + | let T = r(m) |
---|
| 144 | + | let H = toBase58String(N.caller.bytes) |
---|
| 145 | + | if ((S != "NONE")) |
---|
143 | 146 | | then throw("This entry already exist") |
---|
144 | | - | else if ((S != "NONE")) |
---|
| 147 | + | else if ((T != "NONE")) |
---|
145 | 148 | | then throw("This uuid already exist") |
---|
146 | | - | else if ((size(k) != 36)) |
---|
| 149 | + | else if ((size(m) != 36)) |
---|
147 | 150 | | then throw("Uuid should be 36 characters.") |
---|
148 | | - | else if ((size(N) != 64)) |
---|
| 151 | + | else if ((size(O) != 64)) |
---|
149 | 152 | | then throw("Hash should be 64 characters.") |
---|
150 | | - | else if ((size(O) > 150)) |
---|
| 153 | + | else if ((size(P) > 150)) |
---|
151 | 154 | | then throw("Title is too long, 150 characters max.") |
---|
152 | 155 | | else { |
---|
153 | | - | let H = value(M.payments[0]) |
---|
154 | | - | let I = value(H.amount) |
---|
155 | | - | let J = if (isDefined(H.assetId)) |
---|
156 | | - | then value(H.assetId) |
---|
| 156 | + | let I = value(N.payments[0]) |
---|
| 157 | + | let J = value(I.amount) |
---|
| 158 | + | let K = if (isDefined(I.assetId)) |
---|
| 159 | + | then value(I.assetId) |
---|
157 | 160 | | else throw("Waves is not accepted as payment") |
---|
158 | | - | let T = getIntegerValue(this, ("certification_fee_" + toBase58String(value(J)))) |
---|
159 | | - | let U = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
160 | | - | if ((0 >= U)) |
---|
| 161 | + | let U = getIntegerValue(this, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 162 | + | let V = i(("credits_" + toBase58String(f))) |
---|
| 163 | + | if ((0 >= V)) |
---|
161 | 164 | | then throw("Not enough credit on the dapp, please refill") |
---|
162 | | - | else if ((f != J)) |
---|
| 165 | + | else if ((f != K)) |
---|
163 | 166 | | then throw("This token is not accepted at the moment") |
---|
164 | | - | else if ((I != T)) |
---|
| 167 | + | else if ((J != U)) |
---|
165 | 168 | | then throw("The price is wrong") |
---|
166 | | - | else [StringEntry(k, toBase58String(Q)), StringEntry((N + k), toBase58String(Q)), StringEntry((O + k), toBase58String(Q)), StringEntry(((("data_fc_" + toBase58String(Q)) + "_") + G), A), IntegerEntry(("credits_" + toBase58String(f)), (U - 1)), ScriptTransfer(addressFromStringValue(d), I, H.assetId)] |
---|
| 169 | + | else [StringEntry(m, toBase58String(R)), StringEntry((O + m), toBase58String(R)), StringEntry((P + m), toBase58String(R)), StringEntry(((("data_fc_" + toBase58String(R)) + "_") + H), B), IntegerEntry(("credits_" + toBase58String(f)), (V - 1)), ScriptTransfer(addressFromStringValue(d), J, I.assetId)] |
---|
167 | 170 | | } |
---|
168 | 171 | | } |
---|
169 | 172 | | |
---|
170 | 173 | | |
---|
171 | 174 | | |
---|
172 | | - | @Callable(M) |
---|
173 | | - | func revokeCertification (V,P) = { |
---|
174 | | - | let Q = value(M.transactionId) |
---|
175 | | - | let G = toBase58String(M.caller.bytes) |
---|
176 | | - | let R = { |
---|
177 | | - | let l = getString(this, ((("data_fc_" + V) + "_") + G)) |
---|
178 | | - | if ($isInstanceOf(l, "String")) |
---|
| 175 | + | @Callable(N) |
---|
| 176 | + | func revokeCertification (W,Q) = { |
---|
| 177 | + | let R = value(N.transactionId) |
---|
| 178 | + | let H = toBase58String(N.caller.bytes) |
---|
| 179 | + | let S = { |
---|
| 180 | + | let n = getString(this, ((("data_fc_" + W) + "_") + H)) |
---|
| 181 | + | if ($isInstanceOf(n, "String")) |
---|
179 | 182 | | then { |
---|
180 | | - | let m = l |
---|
181 | | - | m |
---|
| 183 | + | let o = n |
---|
| 184 | + | o |
---|
182 | 185 | | } |
---|
183 | 186 | | else "NONE" |
---|
184 | 187 | | } |
---|
185 | | - | let W = { |
---|
186 | | - | let l = getString(this, ("STATUS_FC_" + V)) |
---|
187 | | - | if ($isInstanceOf(l, "String")) |
---|
| 188 | + | let X = { |
---|
| 189 | + | let n = getString(this, ("STATUS_FC_" + W)) |
---|
| 190 | + | if ($isInstanceOf(n, "String")) |
---|
188 | 191 | | then { |
---|
189 | | - | let m = l |
---|
190 | | - | m |
---|
| 192 | + | let o = n |
---|
| 193 | + | o |
---|
191 | 194 | | } |
---|
192 | 195 | | else "NONE" |
---|
193 | 196 | | } |
---|
194 | | - | let X = (((dropRight(R, 1) + ",\"status\":\"REVOKED_") + toBase58String(Q)) + "\"}") |
---|
195 | | - | if ((W != "NONE")) |
---|
| 197 | + | let Y = (((dropRight(S, 1) + ",\"status\":\"REVOKED_") + toBase58String(R)) + "\"}") |
---|
| 198 | + | if ((X != "NONE")) |
---|
196 | 199 | | then throw("This certification have already been revoked.") |
---|
197 | | - | else if ((R == "NONE")) |
---|
| 200 | + | else if ((S == "NONE")) |
---|
198 | 201 | | then throw("You cannot change the status of this certification.") |
---|
199 | 202 | | else { |
---|
200 | | - | let H = value(M.payments[0]) |
---|
201 | | - | let I = value(H.amount) |
---|
202 | | - | let J = if (isDefined(H.assetId)) |
---|
203 | | - | then value(H.assetId) |
---|
| 203 | + | let I = value(N.payments[0]) |
---|
| 204 | + | let J = value(I.amount) |
---|
| 205 | + | let K = if (isDefined(I.assetId)) |
---|
| 206 | + | then value(I.assetId) |
---|
204 | 207 | | else throw("Waves is not accepted as payment") |
---|
205 | | - | let T = getIntegerValue(this, ("certification_fee_" + toBase58String(value(J)))) |
---|
206 | | - | let U = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
207 | | - | if ((0 >= U)) |
---|
| 208 | + | let U = getIntegerValue(this, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 209 | + | let V = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
| 210 | + | if ((0 >= V)) |
---|
208 | 211 | | then throw("Not enough credit on the dapp, please refill") |
---|
209 | | - | else if ((f != J)) |
---|
| 212 | + | else if ((f != K)) |
---|
210 | 213 | | then throw("This token is not accepted at the moment") |
---|
211 | | - | else if ((I != T)) |
---|
| 214 | + | else if ((J != U)) |
---|
212 | 215 | | then throw("The price is wrong") |
---|
213 | | - | else [StringEntry(("STATUS_FC_" + V), ("REVOKED_" + toBase58String(Q))), StringEntry(((("data_fc_" + V) + "_") + G), X), IntegerEntry(("credits_" + toBase58String(f)), (U - 1)), ScriptTransfer(addressFromStringValue(d), I, H.assetId)] |
---|
| 216 | + | else [StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(R))), StringEntry(((("data_fc_" + W) + "_") + H), Y), IntegerEntry(("credits_" + toBase58String(f)), (V - 1)), ScriptTransfer(addressFromStringValue(d), J, I.assetId)] |
---|
214 | 217 | | } |
---|
215 | 218 | | } |
---|
216 | 219 | | |
---|
217 | 220 | | |
---|
218 | 221 | | |
---|
219 | | - | @Callable(E) |
---|
220 | | - | func deleteEntry (Y) = { |
---|
221 | | - | let Z = toString(addressFromPublicKey(E.callerPublicKey)) |
---|
222 | | - | if ((Z == b)) |
---|
223 | | - | then [DeleteEntry(Y)] |
---|
| 222 | + | @Callable(F) |
---|
| 223 | + | func deleteEntry (Z) = { |
---|
| 224 | + | let aa = toString(addressFromPublicKey(F.callerPublicKey)) |
---|
| 225 | + | if ((aa == b)) |
---|
| 226 | + | then [DeleteEntry(Z)] |
---|
224 | 227 | | else throw("no") |
---|
225 | 228 | | } |
---|
226 | 229 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "3N1wPgHFtezmRVBaqoojP8XJwTkark4hbif" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' |
---|
13 | 13 | | |
---|
14 | 14 | | let f = base58'7bLUm2XNLWvVwgC9aPp9fNNAMVtbGwhwkqdgomJAgVbC' |
---|
15 | 15 | | |
---|
16 | 16 | | let g = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" |
---|
17 | 17 | | |
---|
18 | 18 | | let h = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" |
---|
19 | 19 | | |
---|
20 | | - | func i (j,k) = { |
---|
21 | | - | let l = getString(this, (j + k)) |
---|
22 | | - | if ($isInstanceOf(l, "String")) |
---|
| 20 | + | func i (j) = valueOrElse(getInteger(this, j), 0) |
---|
| 21 | + | |
---|
| 22 | + | |
---|
| 23 | + | func k (l,m) = { |
---|
| 24 | + | let n = getString(this, (l + m)) |
---|
| 25 | + | if ($isInstanceOf(n, "String")) |
---|
23 | 26 | | then { |
---|
24 | | - | let m = l |
---|
25 | | - | m |
---|
| 27 | + | let o = n |
---|
| 28 | + | o |
---|
26 | 29 | | } |
---|
27 | 30 | | else "NONE" |
---|
28 | 31 | | } |
---|
29 | 32 | | |
---|
30 | 33 | | |
---|
31 | | - | func n (k,o) = { |
---|
32 | | - | let l = getString(this, ((k + "@") + o)) |
---|
33 | | - | if ($isInstanceOf(l, "String")) |
---|
| 34 | + | func p (m,q) = { |
---|
| 35 | + | let n = getString(this, ((m + "@") + q)) |
---|
| 36 | + | if ($isInstanceOf(n, "String")) |
---|
34 | 37 | | then { |
---|
35 | | - | let m = l |
---|
36 | | - | m |
---|
| 38 | + | let o = n |
---|
| 39 | + | o |
---|
37 | 40 | | } |
---|
38 | 41 | | else "NONE" |
---|
39 | 42 | | } |
---|
40 | 43 | | |
---|
41 | 44 | | |
---|
42 | | - | func p (k) = { |
---|
43 | | - | let l = getString(this, k) |
---|
44 | | - | if ($isInstanceOf(l, "String")) |
---|
| 45 | + | func r (m) = { |
---|
| 46 | + | let n = getString(this, m) |
---|
| 47 | + | if ($isInstanceOf(n, "String")) |
---|
45 | 48 | | then { |
---|
46 | | - | let m = l |
---|
47 | | - | m |
---|
| 49 | + | let o = n |
---|
| 50 | + | o |
---|
48 | 51 | | } |
---|
49 | 52 | | else "NONE" |
---|
50 | 53 | | } |
---|
51 | 54 | | |
---|
52 | 55 | | |
---|
53 | | - | func q (r) = if (if (if ((size(r) == 35)) |
---|
54 | | - | then (take(r, 2) == "3P") |
---|
| 56 | + | func s (t) = if (if (if ((size(t) == 35)) |
---|
| 57 | + | then (take(t, 2) == "3P") |
---|
55 | 58 | | else false) |
---|
56 | 59 | | then true |
---|
57 | | - | else (take(r, 2) == "3N")) |
---|
| 60 | + | else (take(t, 2) == "3N")) |
---|
58 | 61 | | then true |
---|
59 | | - | else (take(r, 2) == "3M") |
---|
| 62 | + | else (take(t, 2) == "3M") |
---|
60 | 63 | | |
---|
61 | 64 | | |
---|
62 | | - | func s (t,r) = if ((size(r) > 0)) |
---|
63 | | - | then (t + 1) |
---|
64 | | - | else (t + 0) |
---|
| 65 | + | func u (v,t) = if ((size(t) > 0)) |
---|
| 66 | + | then (v + 1) |
---|
| 67 | + | else (v + 0) |
---|
65 | 68 | | |
---|
66 | 69 | | |
---|
67 | | - | func u (v) = { |
---|
68 | | - | let l = getString(this, v) |
---|
69 | | - | if ($isInstanceOf(l, "String")) |
---|
| 70 | + | func w (j) = { |
---|
| 71 | + | let n = getString(this, j) |
---|
| 72 | + | if ($isInstanceOf(n, "String")) |
---|
70 | 73 | | then { |
---|
71 | | - | let m = l |
---|
72 | | - | if ((m == "PENDING")) |
---|
| 74 | + | let o = n |
---|
| 75 | + | if ((o == "PENDING")) |
---|
73 | 76 | | then true |
---|
74 | 77 | | else false |
---|
75 | 78 | | } |
---|
76 | 79 | | else false |
---|
77 | 80 | | } |
---|
78 | 81 | | |
---|
79 | 82 | | |
---|
80 | | - | func w (x) = take(drop(x, 1), value(indexOf(drop(x, 1), "\""))) |
---|
| 83 | + | func x (y) = take(drop(y, 1), value(indexOf(drop(y, 1), "\""))) |
---|
81 | 84 | | |
---|
82 | 85 | | |
---|
83 | | - | func y (x,v) = { |
---|
84 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
85 | | - | let A = drop(x, ((z + size(v)) + 3)) |
---|
86 | | - | let B = w(A) |
---|
| 86 | + | func z (y,j) = { |
---|
| 87 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 88 | + | let B = drop(y, ((A + size(j)) + 3)) |
---|
| 89 | + | let C = x(B) |
---|
| 90 | + | C |
---|
| 91 | + | } |
---|
| 92 | + | |
---|
| 93 | + | |
---|
| 94 | + | func D (y,j) = { |
---|
| 95 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 96 | + | let B = take(y, ((A + size(j)) + 3)) |
---|
87 | 97 | | B |
---|
88 | 98 | | } |
---|
89 | 99 | | |
---|
90 | 100 | | |
---|
91 | | - | func C (x,v) = { |
---|
92 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
93 | | - | let A = take(x, ((z + size(v)) + 3)) |
---|
94 | | - | A |
---|
| 101 | + | func E (y,j) = { |
---|
| 102 | + | let A = value(indexOf(y, (("\"" + j) + "\":"))) |
---|
| 103 | + | let B = takeRight(y, (size(y) - ((((A + size(j)) + 3) + 0) + 2))) |
---|
| 104 | + | B |
---|
95 | 105 | | } |
---|
96 | 106 | | |
---|
97 | 107 | | |
---|
98 | | - | func D (x,v) = { |
---|
99 | | - | let z = value(indexOf(x, (("\"" + v) + "\":"))) |
---|
100 | | - | let A = takeRight(x, (size(x) - ((((z + size(v)) + 3) + 0) + 2))) |
---|
101 | | - | A |
---|
102 | | - | } |
---|
103 | | - | |
---|
104 | | - | |
---|
105 | | - | @Callable(E) |
---|
106 | | - | func setFee (F) = { |
---|
107 | | - | let G = toBase58String(E.caller.bytes) |
---|
108 | | - | if ((G == c)) |
---|
109 | | - | then [IntegerEntry(("certification_fee_" + toBase58String(f)), F)] |
---|
| 108 | + | @Callable(F) |
---|
| 109 | + | func setFee (G) = { |
---|
| 110 | + | let H = toBase58String(F.caller.bytes) |
---|
| 111 | + | if ((H == c)) |
---|
| 112 | + | then [IntegerEntry(("certification_fee_" + toBase58String(f)), G)] |
---|
110 | 113 | | else throw("You are not allowed to change fee") |
---|
111 | 114 | | } |
---|
112 | 115 | | |
---|
113 | 116 | | |
---|
114 | 117 | | |
---|
115 | | - | @Callable(E) |
---|
| 118 | + | @Callable(F) |
---|
116 | 119 | | func refillCredits () = { |
---|
117 | | - | let G = toBase58String(E.caller.bytes) |
---|
118 | | - | let H = value(E.payments[0]) |
---|
119 | | - | let I = value(H.amount) |
---|
120 | | - | let J = if (isDefined(H.assetId)) |
---|
121 | | - | then value(H.assetId) |
---|
| 120 | + | let H = toBase58String(F.caller.bytes) |
---|
| 121 | + | let I = value(F.payments[0]) |
---|
| 122 | + | let J = value(I.amount) |
---|
| 123 | + | let K = if (isDefined(I.assetId)) |
---|
| 124 | + | then value(I.assetId) |
---|
122 | 125 | | else throw("Accept SIGN token only") |
---|
123 | | - | if ((e != J)) |
---|
| 126 | + | if ((e != K)) |
---|
124 | 127 | | then throw("Accept SIGN token only") |
---|
125 | 128 | | else { |
---|
126 | | - | let K = getIntegerValue(a, ("certification_fee_" + toBase58String(value(J)))) |
---|
127 | | - | let L = (K / I) |
---|
128 | | - | if ((0 >= L)) |
---|
| 129 | + | let L = getIntegerValue(a, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 130 | + | let M = (L / J) |
---|
| 131 | + | if ((0 >= M)) |
---|
129 | 132 | | then throw("Not enough for at least 1 credit") |
---|
130 | | - | else [IntegerEntry(("credits_" + toBase58String(f)), L), ScriptTransfer(addressFromStringValue(h), I, H.assetId)] |
---|
| 133 | + | else [IntegerEntry(("credits_" + toBase58String(f)), M), ScriptTransfer(addressFromStringValue(h), J, I.assetId)] |
---|
131 | 134 | | } |
---|
132 | 135 | | } |
---|
133 | 136 | | |
---|
134 | 137 | | |
---|
135 | 138 | | |
---|
136 | | - | @Callable(M) |
---|
137 | | - | func fileCertification (N,O,k,A,P) = { |
---|
138 | | - | let Q = value(M.transactionId) |
---|
139 | | - | let R = i(N, k) |
---|
140 | | - | let S = p(k) |
---|
141 | | - | let G = toBase58String(M.caller.bytes) |
---|
142 | | - | if ((R != "NONE")) |
---|
| 139 | + | @Callable(N) |
---|
| 140 | + | func fileCertification (O,P,m,B,Q) = { |
---|
| 141 | + | let R = value(N.transactionId) |
---|
| 142 | + | let S = k(O, m) |
---|
| 143 | + | let T = r(m) |
---|
| 144 | + | let H = toBase58String(N.caller.bytes) |
---|
| 145 | + | if ((S != "NONE")) |
---|
143 | 146 | | then throw("This entry already exist") |
---|
144 | | - | else if ((S != "NONE")) |
---|
| 147 | + | else if ((T != "NONE")) |
---|
145 | 148 | | then throw("This uuid already exist") |
---|
146 | | - | else if ((size(k) != 36)) |
---|
| 149 | + | else if ((size(m) != 36)) |
---|
147 | 150 | | then throw("Uuid should be 36 characters.") |
---|
148 | | - | else if ((size(N) != 64)) |
---|
| 151 | + | else if ((size(O) != 64)) |
---|
149 | 152 | | then throw("Hash should be 64 characters.") |
---|
150 | | - | else if ((size(O) > 150)) |
---|
| 153 | + | else if ((size(P) > 150)) |
---|
151 | 154 | | then throw("Title is too long, 150 characters max.") |
---|
152 | 155 | | else { |
---|
153 | | - | let H = value(M.payments[0]) |
---|
154 | | - | let I = value(H.amount) |
---|
155 | | - | let J = if (isDefined(H.assetId)) |
---|
156 | | - | then value(H.assetId) |
---|
| 156 | + | let I = value(N.payments[0]) |
---|
| 157 | + | let J = value(I.amount) |
---|
| 158 | + | let K = if (isDefined(I.assetId)) |
---|
| 159 | + | then value(I.assetId) |
---|
157 | 160 | | else throw("Waves is not accepted as payment") |
---|
158 | | - | let T = getIntegerValue(this, ("certification_fee_" + toBase58String(value(J)))) |
---|
159 | | - | let U = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
160 | | - | if ((0 >= U)) |
---|
| 161 | + | let U = getIntegerValue(this, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 162 | + | let V = i(("credits_" + toBase58String(f))) |
---|
| 163 | + | if ((0 >= V)) |
---|
161 | 164 | | then throw("Not enough credit on the dapp, please refill") |
---|
162 | | - | else if ((f != J)) |
---|
| 165 | + | else if ((f != K)) |
---|
163 | 166 | | then throw("This token is not accepted at the moment") |
---|
164 | | - | else if ((I != T)) |
---|
| 167 | + | else if ((J != U)) |
---|
165 | 168 | | then throw("The price is wrong") |
---|
166 | | - | else [StringEntry(k, toBase58String(Q)), StringEntry((N + k), toBase58String(Q)), StringEntry((O + k), toBase58String(Q)), StringEntry(((("data_fc_" + toBase58String(Q)) + "_") + G), A), IntegerEntry(("credits_" + toBase58String(f)), (U - 1)), ScriptTransfer(addressFromStringValue(d), I, H.assetId)] |
---|
| 169 | + | else [StringEntry(m, toBase58String(R)), StringEntry((O + m), toBase58String(R)), StringEntry((P + m), toBase58String(R)), StringEntry(((("data_fc_" + toBase58String(R)) + "_") + H), B), IntegerEntry(("credits_" + toBase58String(f)), (V - 1)), ScriptTransfer(addressFromStringValue(d), J, I.assetId)] |
---|
167 | 170 | | } |
---|
168 | 171 | | } |
---|
169 | 172 | | |
---|
170 | 173 | | |
---|
171 | 174 | | |
---|
172 | | - | @Callable(M) |
---|
173 | | - | func revokeCertification (V,P) = { |
---|
174 | | - | let Q = value(M.transactionId) |
---|
175 | | - | let G = toBase58String(M.caller.bytes) |
---|
176 | | - | let R = { |
---|
177 | | - | let l = getString(this, ((("data_fc_" + V) + "_") + G)) |
---|
178 | | - | if ($isInstanceOf(l, "String")) |
---|
| 175 | + | @Callable(N) |
---|
| 176 | + | func revokeCertification (W,Q) = { |
---|
| 177 | + | let R = value(N.transactionId) |
---|
| 178 | + | let H = toBase58String(N.caller.bytes) |
---|
| 179 | + | let S = { |
---|
| 180 | + | let n = getString(this, ((("data_fc_" + W) + "_") + H)) |
---|
| 181 | + | if ($isInstanceOf(n, "String")) |
---|
179 | 182 | | then { |
---|
180 | | - | let m = l |
---|
181 | | - | m |
---|
| 183 | + | let o = n |
---|
| 184 | + | o |
---|
182 | 185 | | } |
---|
183 | 186 | | else "NONE" |
---|
184 | 187 | | } |
---|
185 | | - | let W = { |
---|
186 | | - | let l = getString(this, ("STATUS_FC_" + V)) |
---|
187 | | - | if ($isInstanceOf(l, "String")) |
---|
| 188 | + | let X = { |
---|
| 189 | + | let n = getString(this, ("STATUS_FC_" + W)) |
---|
| 190 | + | if ($isInstanceOf(n, "String")) |
---|
188 | 191 | | then { |
---|
189 | | - | let m = l |
---|
190 | | - | m |
---|
| 192 | + | let o = n |
---|
| 193 | + | o |
---|
191 | 194 | | } |
---|
192 | 195 | | else "NONE" |
---|
193 | 196 | | } |
---|
194 | | - | let X = (((dropRight(R, 1) + ",\"status\":\"REVOKED_") + toBase58String(Q)) + "\"}") |
---|
195 | | - | if ((W != "NONE")) |
---|
| 197 | + | let Y = (((dropRight(S, 1) + ",\"status\":\"REVOKED_") + toBase58String(R)) + "\"}") |
---|
| 198 | + | if ((X != "NONE")) |
---|
196 | 199 | | then throw("This certification have already been revoked.") |
---|
197 | | - | else if ((R == "NONE")) |
---|
| 200 | + | else if ((S == "NONE")) |
---|
198 | 201 | | then throw("You cannot change the status of this certification.") |
---|
199 | 202 | | else { |
---|
200 | | - | let H = value(M.payments[0]) |
---|
201 | | - | let I = value(H.amount) |
---|
202 | | - | let J = if (isDefined(H.assetId)) |
---|
203 | | - | then value(H.assetId) |
---|
| 203 | + | let I = value(N.payments[0]) |
---|
| 204 | + | let J = value(I.amount) |
---|
| 205 | + | let K = if (isDefined(I.assetId)) |
---|
| 206 | + | then value(I.assetId) |
---|
204 | 207 | | else throw("Waves is not accepted as payment") |
---|
205 | | - | let T = getIntegerValue(this, ("certification_fee_" + toBase58String(value(J)))) |
---|
206 | | - | let U = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
207 | | - | if ((0 >= U)) |
---|
| 208 | + | let U = getIntegerValue(this, ("certification_fee_" + toBase58String(value(K)))) |
---|
| 209 | + | let V = getIntegerValue(this, ("credits_" + toBase58String(f))) |
---|
| 210 | + | if ((0 >= V)) |
---|
208 | 211 | | then throw("Not enough credit on the dapp, please refill") |
---|
209 | | - | else if ((f != J)) |
---|
| 212 | + | else if ((f != K)) |
---|
210 | 213 | | then throw("This token is not accepted at the moment") |
---|
211 | | - | else if ((I != T)) |
---|
| 214 | + | else if ((J != U)) |
---|
212 | 215 | | then throw("The price is wrong") |
---|
213 | | - | else [StringEntry(("STATUS_FC_" + V), ("REVOKED_" + toBase58String(Q))), StringEntry(((("data_fc_" + V) + "_") + G), X), IntegerEntry(("credits_" + toBase58String(f)), (U - 1)), ScriptTransfer(addressFromStringValue(d), I, H.assetId)] |
---|
| 216 | + | else [StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(R))), StringEntry(((("data_fc_" + W) + "_") + H), Y), IntegerEntry(("credits_" + toBase58String(f)), (V - 1)), ScriptTransfer(addressFromStringValue(d), J, I.assetId)] |
---|
214 | 217 | | } |
---|
215 | 218 | | } |
---|
216 | 219 | | |
---|
217 | 220 | | |
---|
218 | 221 | | |
---|
219 | | - | @Callable(E) |
---|
220 | | - | func deleteEntry (Y) = { |
---|
221 | | - | let Z = toString(addressFromPublicKey(E.callerPublicKey)) |
---|
222 | | - | if ((Z == b)) |
---|
223 | | - | then [DeleteEntry(Y)] |
---|
| 222 | + | @Callable(F) |
---|
| 223 | + | func deleteEntry (Z) = { |
---|
| 224 | + | let aa = toString(addressFromPublicKey(F.callerPublicKey)) |
---|
| 225 | + | if ((aa == b)) |
---|
| 226 | + | then [DeleteEntry(Z)] |
---|
224 | 227 | | else throw("no") |
---|
225 | 228 | | } |
---|
226 | 229 | | |
---|
227 | 230 | | |
---|