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