tx · EgWXwdPZ3wgVer7b8GqNk4aCwTFNidQUGMKzvMNHvZH

3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB:  -0.01000000 Waves

2023.01.21 12:25 [2414552] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves

{ "type": 13, "id": "EgWXwdPZ3wgVer7b8GqNk4aCwTFNidQUGMKzvMNHvZH", "fee": 1000000, "feeAssetId": null, "timestamp": 1674293191201, "version": 2, "chainId": 84, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "4DhCm5dBrUfuhWYHLXRUmEjNmzdrvd4RmxBwzMb1HYvUNd9rvZdDGnnd5YnoPdmWyZeQC8Qgm4WCXzLgU1QmDD9A" ], "script": "base64:BgITCAISBwoFCAgICAgSBAoCCAgSABIAD3N0b3JhZ2VWZXJpZmllcgkBBXZhbHVlAQkApggBAiMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAEYmFuawIjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIADWFjY2VwdGVkVG9rZW4BIOilarzKd0LycGEyNUpPRYO5uR7lmWcXw3Hq2QuhBK3rAAZ1c2RuSUQCLDNLRlhCR0dMQ2pBNVoyRHVXNERxOWZERHJIakpKUDFaRWthb2FqU3p1S3NDAAdWRVJTSU9OAgUxLjEuOQAUc3RvcmFnZUZlZU11bHRpcGxpZXIAAQEKY2hlY2tFbnRyeQIGcHJlZml4BHV1aWQEByRtYXRjaDAJAJ0IAgUEdGhpcwkArAICBQZwcmVmaXgFBHV1aWQDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgROT05FAQ9jaGVja0VudHJ5RW1haWwCBHV1aWQGZG9tYWluBAckbWF0Y2gwCQCdCAIFBHRoaXMJAKwCAg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m9rZUNlcnRpZmljYXRpb24JAAACCAUDaW52BGRBcHAFBHRoaXMHCQAAAggFA2ludgNmZWUAoMIeBwkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MAAQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleSRbFSI=", "height": 2414552, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D8LCo4WrxBiYapL9LebP1bjp6x8U265R3NjBiHPeu9zw Next: 2o2dtQg6hmzgc1oU1odW2V3t2QnEQ66GRmfwXFc3bozr Diff:
OldNewDifferences
99
1010 let d = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
1111
12-let e = 1
12+let e = "1.1.9"
1313
14-func f (g,h) = {
15- let i = getString(this, (g + h))
16- if ($isInstanceOf(i, "String"))
14+let f = 1
15+
16+func g (h,i) = {
17+ let j = getString(this, (h + i))
18+ if ($isInstanceOf(j, "String"))
1719 then {
18- let j = i
19- j
20+ let k = j
21+ k
2022 }
2123 else "NONE"
2224 }
2325
2426
25-func k (h,l) = {
26- let i = getString(this, ((h + "@") + l))
27- if ($isInstanceOf(i, "String"))
27+func l (i,m) = {
28+ let j = getString(this, ((i + "@") + m))
29+ if ($isInstanceOf(j, "String"))
2830 then {
29- let j = i
30- j
31+ let k = j
32+ k
3133 }
3234 else "NONE"
3335 }
3436
3537
36-func m (h) = {
37- let i = getString(this, h)
38- if ($isInstanceOf(i, "String"))
38+func n (i) = {
39+ let j = getString(this, i)
40+ if ($isInstanceOf(j, "String"))
3941 then {
40- let j = i
41- j
42+ let k = j
43+ k
4244 }
4345 else "NONE"
4446 }
4547
4648
47-func n (o) = {
48- let i = getInteger(this, ("addr_WHITELISTED_" + o))
49- if ($isInstanceOf(i, "Int"))
49+func o (p) = {
50+ let j = getInteger(this, ("addr_WHITELISTED_" + p))
51+ if ($isInstanceOf(j, "Int"))
5052 then {
51- let j = i
52- j
53+ let k = j
54+ k
5355 }
5456 else 0
5557 }
5658
5759
58-func p (q) = if (if (if ((size(q) == 35))
59- then (take(q, 2) == "3P")
60+func q (r) = if (if (if ((size(r) == 35))
61+ then (take(r, 2) == "3P")
6062 else false)
6163 then true
62- else (take(q, 2) == "3N"))
64+ else (take(r, 2) == "3N"))
6365 then true
64- else (take(q, 2) == "3M")
66+ else (take(r, 2) == "3M")
6567
6668
67-func r (s,q) = if ((size(q) > 0))
68- then (s + 1)
69- else (s + 0)
69+func s (t,r) = if ((size(r) > 0))
70+ then (t + 1)
71+ else (t + 0)
7072
7173
72-func t (u) = {
73- let i = getString(this, u)
74- if ($isInstanceOf(i, "String"))
74+func u (v) = {
75+ let j = getString(this, v)
76+ if ($isInstanceOf(j, "String"))
7577 then {
76- let j = i
77- if ((j == "PENDING"))
78+ let k = j
79+ if ((k == "PENDING"))
7880 then true
7981 else false
8082 }
8284 }
8385
8486
85-func v (w) = take(drop(w, 1), value(indexOf(drop(w, 1), "\"")))
87+func w (x) = take(drop(x, 1), value(indexOf(drop(x, 1), "\"")))
8688
8789
88-func x (w,u) = {
89- let y = value(indexOf(w, (("\"" + u) + "\":")))
90- let z = drop(w, ((y + size(u)) + 3))
91- let A = v(z)
90+func y (x,v) = {
91+ let z = value(indexOf(x, (("\"" + v) + "\":")))
92+ let A = drop(x, ((z + size(v)) + 3))
93+ let B = w(A)
94+ B
95+ }
96+
97+
98+func C (x,v) = {
99+ let z = value(indexOf(x, (("\"" + v) + "\":")))
100+ let A = take(x, ((z + size(v)) + 3))
92101 A
93102 }
94103
95104
96-func B (w,u) = {
97- let y = value(indexOf(w, (("\"" + u) + "\":")))
98- let z = take(w, ((y + size(u)) + 3))
99- z
105+func D (x,v) = {
106+ let z = value(indexOf(x, (("\"" + v) + "\":")))
107+ let A = takeRight(x, (size(x) - ((((z + size(v)) + 3) + 0) + 2)))
108+ A
100109 }
101110
102111
103-func C (w,u) = {
104- let y = value(indexOf(w, (("\"" + u) + "\":")))
105- let z = takeRight(w, (size(w) - ((((y + size(u)) + 3) + 0) + 2)))
106- z
107- }
108-
109-
110-func D (E) = {
111- let i = E
112- if ($isInstanceOf(i, "String"))
112+func E (F) = {
113+ let j = F
114+ if ($isInstanceOf(j, "String"))
113115 then {
114- let F = i
115- F
116+ let G = j
117+ G
116118 }
117119 else throw("Sponsored Public Key String expected")
118120 }
119121
120122
121-@Callable(G)
122-func fileCertification (H,I,h,J,K) = {
123- let L = value(G.transactionId)
124- let M = f(H, h)
125- let N = m(h)
126- let O = (this == G.caller)
127- let o = if (O)
128- then toString(addressFromPublicKey(fromBase58String(K)))
129- else toBase58String(G.caller.bytes)
130- let P = n(o)
131- if ((M != "NONE"))
123+@Callable(H)
124+func fileCertification (I,J,i,K,L) = {
125+ let M = value(H.transactionId)
126+ let N = g(I, i)
127+ let O = n(i)
128+ let P = (this == H.caller)
129+ let p = if (P)
130+ then toString(addressFromPublicKey(fromBase58String(L)))
131+ else toBase58String(H.caller.bytes)
132+ let Q = o(p)
133+ if ((N != "NONE"))
132134 then throw("This entry already exist")
133- else if ((N != "NONE"))
135+ else if ((O != "NONE"))
134136 then throw("This uuid already exist")
135- else if ((size(h) != 36))
137+ else if ((size(i) != 36))
136138 then throw("Uuid should be 36 characters.")
137- else if ((size(H) != 64))
139+ else if ((size(I) != 64))
138140 then throw("Hash should be 64 characters.")
139- else if ((size(I) > 100))
141+ else if ((size(J) > 100))
140142 then throw("Title is too long, 100 characters max.")
141- else if (if (if (contains(H, "\""))
142- then true
143- else contains(I, "\""))
143+ else if (if (if (contains(I, "\""))
144144 then true
145145 else contains(J, "\""))
146+ then true
147+ else contains(K, "\""))
146148 then throw("No \" allowed")
147149 else {
148- let z = (((((((("{\"hash\":\"" + H) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + I) + "\",\"ipfs\":\"") + J) + "\"}")
149- if ((P > 0))
150+ let A = (((((((("{\"hash\":\"" + I) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + J) + "\",\"ipfs\":\"") + K) + "\"}")
151+ if ((Q > 0))
150152 then {
151- let Q = if ((size(J) != 0))
152- then (1 + e)
153+ let R = if ((size(K) != 0))
154+ then (1 + f)
153155 else 1
154- if ((0 > (P - Q)))
156+ if ((0 > (Q - R)))
155157 then throw("Not enough credit")
156- else [StringEntry(h, toBase58String(L)), StringEntry((H + h), toBase58String(L)), StringEntry((I + h), toBase58String(L)), IntegerEntry(("addr_WHITELISTED_" + o), (P - Q)), StringEntry(((("data_fc_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(o), 0, c)]
158+ else [StringEntry(i, toBase58String(M)), StringEntry((I + i), toBase58String(M)), StringEntry((J + i), toBase58String(M)), IntegerEntry(("addr_WHITELISTED_" + p), (Q - R)), StringEntry(((("data_fc_" + toBase58String(M)) + "_") + p), A), ScriptTransfer(addressFromStringValue(p), 0, c)]
157159 }
158- else if (!(O))
160+ else if (!(P))
159161 then {
160- let R = value(G.payments[0])
161- let S = value(R.amount)
162- let T = if (isDefined(R.assetId))
163- then value(R.assetId)
162+ let S = value(H.payments[0])
163+ let T = value(S.amount)
164+ let U = if (isDefined(S.assetId))
165+ then value(S.assetId)
164166 else throw("Waves is not accepted as payment")
165- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
166- let V = if ((size(J) != 0))
167- then (U + (e * U))
168- else U
169- if ((c != T))
167+ let V = getIntegerValue(a, ("certification_fee_" + toBase58String(value(U))))
168+ let W = if ((size(K) != 0))
169+ then (V + (f * V))
170+ else V
171+ if ((c != U))
170172 then throw("This token is not accepted at the moment")
171- else if (if ((S != V))
172- then (0 >= P)
173+ else if (if ((T != W))
174+ then (0 >= Q)
173175 else false)
174176 then throw("The price is wrong")
175- else [StringEntry(h, toBase58String(L)), StringEntry((H + h), toBase58String(L)), StringEntry((I + h), toBase58String(L)), StringEntry(((("data_fc_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(b), V, R.assetId)]
177+ else [StringEntry(i, toBase58String(M)), StringEntry((I + i), toBase58String(M)), StringEntry((J + i), toBase58String(M)), StringEntry(((("data_fc_" + toBase58String(M)) + "_") + p), A), ScriptTransfer(addressFromStringValue(b), W, S.assetId)]
176178 }
177179 else throw("You are not allowed to do that")
178180 }
180182
181183
182184
183-@Callable(G)
184-func revokeCertification (W,K) = {
185- let L = value(G.transactionId)
186- let O = (this == G.caller)
187- let o = if (O)
188- then toString(addressFromPublicKey(fromBase58String(K)))
189- else toBase58String(G.caller.bytes)
190- let M = {
191- let i = getString(this, ((("data_fc_" + W) + "_") + o))
192- if ($isInstanceOf(i, "String"))
185+@Callable(H)
186+func revokeCertification (X,L) = {
187+ let M = value(H.transactionId)
188+ let P = (this == H.caller)
189+ let p = if (P)
190+ then toString(addressFromPublicKey(fromBase58String(L)))
191+ else toBase58String(H.caller.bytes)
192+ let N = {
193+ let j = getString(this, ((("data_fc_" + X) + "_") + p))
194+ if ($isInstanceOf(j, "String"))
193195 then {
194- let j = i
195- j
196+ let k = j
197+ k
196198 }
197199 else "NONE"
198200 }
199- let X = {
200- let i = getString(this, ("STATUS_FC_" + W))
201- if ($isInstanceOf(i, "String"))
201+ let Y = {
202+ let j = getString(this, ("STATUS_FC_" + X))
203+ if ($isInstanceOf(j, "String"))
202204 then {
203- let j = i
204- j
205+ let k = j
206+ k
205207 }
206208 else "NONE"
207209 }
208- let P = n(o)
209- let Y = (((dropRight(M, 1) + ",\"status\":\"REVOKED_") + toBase58String(L)) + "\"}")
210- if ((X != "NONE"))
210+ let Q = o(p)
211+ let Z = (((dropRight(N, 1) + ",\"status\":\"REVOKED_") + toBase58String(M)) + "\"}")
212+ if ((Y != "NONE"))
211213 then throw("This certification have already been revoked.")
212- else if ((M == "NONE"))
214+ else if ((N == "NONE"))
213215 then throw("You cannot change the status of this certification.")
214- else if ((P > 0))
215- then [IntegerEntry(("addr_WHITELISTED_" + o), (P - 1)), StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(L))), StringEntry(((("data_fc_" + W) + "_") + o), Y), ScriptTransfer(addressFromStringValue(o), 0, c)]
216- else if (!(O))
216+ else if ((Q > 0))
217+ then [IntegerEntry(("addr_WHITELISTED_" + p), (Q - 1)), StringEntry(("STATUS_FC_" + X), ("REVOKED_" + toBase58String(M))), StringEntry(((("data_fc_" + X) + "_") + p), Z), ScriptTransfer(addressFromStringValue(p), 0, c)]
218+ else if (!(P))
217219 then {
218- let R = value(G.payments[0])
219- let S = value(R.amount)
220- let T = if (isDefined(R.assetId))
221- then value(R.assetId)
220+ let S = value(H.payments[0])
221+ let T = value(S.amount)
222+ let U = if (isDefined(S.assetId))
223+ then value(S.assetId)
222224 else throw("Waves is not accepted as payment")
223- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
224- if ((c != T))
225+ let V = getIntegerValue(a, ("certification_fee_" + toBase58String(value(U))))
226+ if ((c != U))
225227 then throw("This token is not accepted at the moment")
226- else if (if ((S != U))
227- then (0 >= P)
228+ else if (if ((T != V))
229+ then (0 >= Q)
228230 else false)
229231 then throw("The price is wrong")
230- else [StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(L))), StringEntry(((("data_fc_" + W) + "_") + o), Y), ScriptTransfer(addressFromStringValue(b), S, R.assetId)]
232+ else [StringEntry(("STATUS_FC_" + X), ("REVOKED_" + toBase58String(M))), StringEntry(((("data_fc_" + X) + "_") + p), Z), ScriptTransfer(addressFromStringValue(b), T, S.assetId)]
231233 }
232234 else throw("You are not allowed to do that")
233235 }
234236
235237
236238
237-@Callable(G)
238-func emailCertification (l,I,h,K) = {
239- let L = value(G.transactionId)
240- let M = k(l, h)
241- let N = m(h)
242- let O = (this == G.caller)
243- let o = if (O)
244- then toString(addressFromPublicKey(fromBase58String(K)))
245- else toBase58String(G.caller.bytes)
246- let P = n(o)
247- if ((M != "NONE"))
248- then throw("This entry already exist")
249- else if ((N != "NONE"))
250- then throw("This uuid already exist")
251- else if ((size(h) > 36))
252- then throw("Uuid is too long, 36 characters max.")
253- else if ((size(l) > 150))
254- then throw("Domain is too long, 150 characters max.")
255- else if ((size(I) > 100))
256- then throw("Title is too long, 100 characters max.")
257- else if (if (if (contains(h, "\""))
258- then true
259- else contains(I, "\""))
260- then true
261- else contains(l, "\""))
262- then throw("No \" allowed")
263- else {
264- let z = (((((((("{\"messageid\":\"" + h) + "@") + l) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"reference\":\"") + I) + "\"}")
265- if ((P > 0))
266- then [StringEntry(h, toBase58String(L)), StringEntry(((h + "@") + l), toBase58String(L)), StringEntry((I + h), toBase58String(L)), IntegerEntry(("addr_WHITELISTED_" + o), (P - 1)), StringEntry(((("data_ec_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(o), 0, c)]
267- else if (!(O))
268- then {
269- let R = value(G.payments[0])
270- let S = value(R.amount)
271- let T = if (isDefined(R.assetId))
272- then value(R.assetId)
273- else throw("Waves is not accepted as payment")
274- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
275- if ((c != T))
276- then throw("This token is not accepted at the moment")
277- else if (if ((S != U))
278- then (0 >= P)
279- else false)
280- then throw("The price is wrong")
281- else [StringEntry(h, toBase58String(L)), StringEntry(((h + "@") + l), toBase58String(L)), StringEntry((I + h), toBase58String(L)), StringEntry(((("data_ec_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(b), S, R.assetId)]
282- }
283- else throw("You are not allowed to do that")
284- }
239+@Callable(H)
240+func usdnSignCredits () = {
241+ let S = value(H.payments[0])
242+ let p = toBase58String(H.caller.bytes)
243+ let aa = value(S.assetId)
244+ let T = value(S.amount)
245+ let ab = ((T * 2) / 1000000)
246+ let Q = o(p)
247+ if ((toBase58String(aa) != d))
248+ then throw("Only USDN can be exchanged")
249+ else if (if (((T % 1000000) != 0))
250+ then ((T % 1000000) != 500000)
251+ else false)
252+ then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(T), 6)) + ".") + takeRight(toString(T), 6)))
253+ else [IntegerEntry(("addr_WHITELISTED_" + p), (Q + ab)), ScriptTransfer(addressFromStringValue(b), T, aa)]
285254 }
286255
287256
288-
289-@Callable(G)
290-func createAgreement (H,I,Z,aa,K,h) = {
291- let L = value(G.transactionId)
292- let M = f(H, h)
293- let N = m(h)
294- let O = (this == G.caller)
295- let o = if (O)
296- then toString(addressFromPublicKey(fromBase58String(K)))
297- else toBase58String(G.caller.bytes)
298- let P = n(o)
299- let ab = ((((B(Z, "creator") + "\"") + o) + "\"") + C(Z, "creator"))
300- let ac = split(aa, ",")
301- let ad = size(ac)
302- let ae = StringEntry((I + h), toBase58String(L))
303- let af = StringEntry((H + h), toBase58String(L))
304- let ag = StringEntry(((("data_MA_" + toBase58String(L)) + "_") + o), ab)
305- let ah = StringEntry(((o + "_MA_") + toBase58String(L)), ("SIGNED_" + toBase58String(L)))
306- let ai = IntegerEntry(("addr_WHITELISTED_" + o), (P - (ad + 1)))
307- if ((M != "NONE"))
308- then throw("This entry already exist")
309- else if ((N != "NONE"))
310- then throw("This uuid already exist")
311- else if ((size(h) > 36))
312- then throw("Uuid is too long, 36 characters max.")
313- else if ((size(H) > 64))
314- then throw("Message-id is too long, 64 characters max.")
315- else if ((size(I) > 100))
316- then throw("Title is too long, 100 characters max.")
317- else if ((P > 0))
318- then if (((ad + 1) > P))
319- then throw("You don't have enough certification credit")
320- else if ((ad == 6))
321- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[5] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c), ScriptTransfer(addressFromStringValue(ac[5]), 0, c)]
322- else if ((ad == 5))
323- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c)]
324- else if ((ad == 4))
325- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c)]
326- else if ((ad == 3))
327- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c)]
328- else if ((ad == 2))
329- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c)]
330- else if ((ad == 1))
331- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c)]
332- else throw("Wrong number of participants")
333- else if (!(O))
334- then {
335- let R = value(G.payments[0])
336- let S = if (isDefined(R.amount))
337- then value(R.amount)
338- else 0
339- let T = if (isDefined(R.assetId))
340- then value(R.assetId)
341- else c
342- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
343- if (((U * (ad + 1)) > S))
344- then throw(("The price is wrong, it should be " + toString((U * (ad + 1)))))
345- else if ((ad == 6))
346- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[5] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c), ScriptTransfer(addressFromStringValue(ac[5]), 0, c)]
347- else if ((ad == 5))
348- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c)]
349- else if ((ad == 4))
350- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c)]
351- else if ((ad == 3))
352- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c)]
353- else if ((ad == 2))
354- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c)]
355- else if ((ad == 1))
356- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c)]
357- else throw(("Needs 1 to 6 recipient addresses, currently sent: " + toString(ad)))
358- }
359- else throw("You are not allowed to do that")
360- }
361-
362-
363-
364-@Callable(G)
365-func signAgreement (H,aj,K) = {
366- let R = value(G.payments[0])
367- let S = value(R.amount)
368- let L = value(G.transactionId)
369- let O = (this == G.caller)
370- let ak = if (O)
371- then toString(addressFromPublicKey(fromBase58String(K)))
372- else toBase58String(G.caller.bytes)
373- let al = t(((ak + "_MA_") + aj))
374- if (!(al))
375- then throw("Sorry there is no pending signature")
376- else [StringEntry(((ak + "_MA_") + aj), ("SIGNED_" + toBase58String(L))), ScriptTransfer(addressFromStringValue(ak), 0, c)]
377- }
378-
379-
380-
381-@Callable(G)
382-func usdnSignCredits () = {
383- let R = value(G.payments[0])
384- let o = toBase58String(G.caller.bytes)
385- let am = value(R.assetId)
386- let S = value(R.amount)
387- let an = ((S * 2) / 1000000)
388- let P = n(o)
389- if ((toBase58String(am) != d))
390- then throw("Only USDN can be exchanged")
391- else if (if (((S % 1000000) != 0))
392- then ((S % 1000000) != 500000)
393- else false)
394- then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(S), 6)) + ".") + takeRight(toString(S), 6)))
395- else [IntegerEntry(("addr_WHITELISTED_" + o), (P + an)), ScriptTransfer(addressFromStringValue(b), S, am)]
396- }
397-
398-
399-@Verifier(ao)
400-func ap () = {
401- let i = ao
402- if ($isInstanceOf(i, "InvokeScriptTransaction"))
257+@Verifier(ac)
258+func ad () = {
259+ let j = ac
260+ if ($isInstanceOf(j, "InvokeScriptTransaction"))
403261 then {
404- let aq = i
405- if (if ((aq.function == "fileCertification"))
406- then true
407- else (aq.function == "createAgreement"))
408- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[4])))
409- else if ((aq.function == "emailCertification"))
410- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[3])))
411- else if ((aq.function == "signAgreement"))
412- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[2])))
413- else if ((aq.function == "revokeCertification"))
414- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[1])))
415- else sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey)
262+ let ae = j
263+ if (if (if (if ((ae.function == "fileCertification"))
264+ then (ae.dApp == this)
265+ else false)
266+ then (ae.fee == 500000)
267+ else false)
268+ then (ae.feeAssetId == unit)
269+ else false)
270+ then sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(E(ae.args[4])))
271+ else if (if (if (if ((ae.function == "revokeCertification"))
272+ then (ae.dApp == this)
273+ else false)
274+ then (ae.fee == 500000)
275+ else false)
276+ then (ae.feeAssetId == unit)
277+ else false)
278+ then sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(E(ae.args[1])))
279+ else sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
416280 }
417- else sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey)
281+ else sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
418282 }
419283
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
66 let b = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
77
88 let c = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
99
1010 let d = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
1111
12-let e = 1
12+let e = "1.1.9"
1313
14-func f (g,h) = {
15- let i = getString(this, (g + h))
16- if ($isInstanceOf(i, "String"))
14+let f = 1
15+
16+func g (h,i) = {
17+ let j = getString(this, (h + i))
18+ if ($isInstanceOf(j, "String"))
1719 then {
18- let j = i
19- j
20+ let k = j
21+ k
2022 }
2123 else "NONE"
2224 }
2325
2426
25-func k (h,l) = {
26- let i = getString(this, ((h + "@") + l))
27- if ($isInstanceOf(i, "String"))
27+func l (i,m) = {
28+ let j = getString(this, ((i + "@") + m))
29+ if ($isInstanceOf(j, "String"))
2830 then {
29- let j = i
30- j
31+ let k = j
32+ k
3133 }
3234 else "NONE"
3335 }
3436
3537
36-func m (h) = {
37- let i = getString(this, h)
38- if ($isInstanceOf(i, "String"))
38+func n (i) = {
39+ let j = getString(this, i)
40+ if ($isInstanceOf(j, "String"))
3941 then {
40- let j = i
41- j
42+ let k = j
43+ k
4244 }
4345 else "NONE"
4446 }
4547
4648
47-func n (o) = {
48- let i = getInteger(this, ("addr_WHITELISTED_" + o))
49- if ($isInstanceOf(i, "Int"))
49+func o (p) = {
50+ let j = getInteger(this, ("addr_WHITELISTED_" + p))
51+ if ($isInstanceOf(j, "Int"))
5052 then {
51- let j = i
52- j
53+ let k = j
54+ k
5355 }
5456 else 0
5557 }
5658
5759
58-func p (q) = if (if (if ((size(q) == 35))
59- then (take(q, 2) == "3P")
60+func q (r) = if (if (if ((size(r) == 35))
61+ then (take(r, 2) == "3P")
6062 else false)
6163 then true
62- else (take(q, 2) == "3N"))
64+ else (take(r, 2) == "3N"))
6365 then true
64- else (take(q, 2) == "3M")
66+ else (take(r, 2) == "3M")
6567
6668
67-func r (s,q) = if ((size(q) > 0))
68- then (s + 1)
69- else (s + 0)
69+func s (t,r) = if ((size(r) > 0))
70+ then (t + 1)
71+ else (t + 0)
7072
7173
72-func t (u) = {
73- let i = getString(this, u)
74- if ($isInstanceOf(i, "String"))
74+func u (v) = {
75+ let j = getString(this, v)
76+ if ($isInstanceOf(j, "String"))
7577 then {
76- let j = i
77- if ((j == "PENDING"))
78+ let k = j
79+ if ((k == "PENDING"))
7880 then true
7981 else false
8082 }
8183 else false
8284 }
8385
8486
85-func v (w) = take(drop(w, 1), value(indexOf(drop(w, 1), "\"")))
87+func w (x) = take(drop(x, 1), value(indexOf(drop(x, 1), "\"")))
8688
8789
88-func x (w,u) = {
89- let y = value(indexOf(w, (("\"" + u) + "\":")))
90- let z = drop(w, ((y + size(u)) + 3))
91- let A = v(z)
90+func y (x,v) = {
91+ let z = value(indexOf(x, (("\"" + v) + "\":")))
92+ let A = drop(x, ((z + size(v)) + 3))
93+ let B = w(A)
94+ B
95+ }
96+
97+
98+func C (x,v) = {
99+ let z = value(indexOf(x, (("\"" + v) + "\":")))
100+ let A = take(x, ((z + size(v)) + 3))
92101 A
93102 }
94103
95104
96-func B (w,u) = {
97- let y = value(indexOf(w, (("\"" + u) + "\":")))
98- let z = take(w, ((y + size(u)) + 3))
99- z
105+func D (x,v) = {
106+ let z = value(indexOf(x, (("\"" + v) + "\":")))
107+ let A = takeRight(x, (size(x) - ((((z + size(v)) + 3) + 0) + 2)))
108+ A
100109 }
101110
102111
103-func C (w,u) = {
104- let y = value(indexOf(w, (("\"" + u) + "\":")))
105- let z = takeRight(w, (size(w) - ((((y + size(u)) + 3) + 0) + 2)))
106- z
107- }
108-
109-
110-func D (E) = {
111- let i = E
112- if ($isInstanceOf(i, "String"))
112+func E (F) = {
113+ let j = F
114+ if ($isInstanceOf(j, "String"))
113115 then {
114- let F = i
115- F
116+ let G = j
117+ G
116118 }
117119 else throw("Sponsored Public Key String expected")
118120 }
119121
120122
121-@Callable(G)
122-func fileCertification (H,I,h,J,K) = {
123- let L = value(G.transactionId)
124- let M = f(H, h)
125- let N = m(h)
126- let O = (this == G.caller)
127- let o = if (O)
128- then toString(addressFromPublicKey(fromBase58String(K)))
129- else toBase58String(G.caller.bytes)
130- let P = n(o)
131- if ((M != "NONE"))
123+@Callable(H)
124+func fileCertification (I,J,i,K,L) = {
125+ let M = value(H.transactionId)
126+ let N = g(I, i)
127+ let O = n(i)
128+ let P = (this == H.caller)
129+ let p = if (P)
130+ then toString(addressFromPublicKey(fromBase58String(L)))
131+ else toBase58String(H.caller.bytes)
132+ let Q = o(p)
133+ if ((N != "NONE"))
132134 then throw("This entry already exist")
133- else if ((N != "NONE"))
135+ else if ((O != "NONE"))
134136 then throw("This uuid already exist")
135- else if ((size(h) != 36))
137+ else if ((size(i) != 36))
136138 then throw("Uuid should be 36 characters.")
137- else if ((size(H) != 64))
139+ else if ((size(I) != 64))
138140 then throw("Hash should be 64 characters.")
139- else if ((size(I) > 100))
141+ else if ((size(J) > 100))
140142 then throw("Title is too long, 100 characters max.")
141- else if (if (if (contains(H, "\""))
142- then true
143- else contains(I, "\""))
143+ else if (if (if (contains(I, "\""))
144144 then true
145145 else contains(J, "\""))
146+ then true
147+ else contains(K, "\""))
146148 then throw("No \" allowed")
147149 else {
148- let z = (((((((("{\"hash\":\"" + H) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + I) + "\",\"ipfs\":\"") + J) + "\"}")
149- if ((P > 0))
150+ let A = (((((((("{\"hash\":\"" + I) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + J) + "\",\"ipfs\":\"") + K) + "\"}")
151+ if ((Q > 0))
150152 then {
151- let Q = if ((size(J) != 0))
152- then (1 + e)
153+ let R = if ((size(K) != 0))
154+ then (1 + f)
153155 else 1
154- if ((0 > (P - Q)))
156+ if ((0 > (Q - R)))
155157 then throw("Not enough credit")
156- else [StringEntry(h, toBase58String(L)), StringEntry((H + h), toBase58String(L)), StringEntry((I + h), toBase58String(L)), IntegerEntry(("addr_WHITELISTED_" + o), (P - Q)), StringEntry(((("data_fc_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(o), 0, c)]
158+ else [StringEntry(i, toBase58String(M)), StringEntry((I + i), toBase58String(M)), StringEntry((J + i), toBase58String(M)), IntegerEntry(("addr_WHITELISTED_" + p), (Q - R)), StringEntry(((("data_fc_" + toBase58String(M)) + "_") + p), A), ScriptTransfer(addressFromStringValue(p), 0, c)]
157159 }
158- else if (!(O))
160+ else if (!(P))
159161 then {
160- let R = value(G.payments[0])
161- let S = value(R.amount)
162- let T = if (isDefined(R.assetId))
163- then value(R.assetId)
162+ let S = value(H.payments[0])
163+ let T = value(S.amount)
164+ let U = if (isDefined(S.assetId))
165+ then value(S.assetId)
164166 else throw("Waves is not accepted as payment")
165- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
166- let V = if ((size(J) != 0))
167- then (U + (e * U))
168- else U
169- if ((c != T))
167+ let V = getIntegerValue(a, ("certification_fee_" + toBase58String(value(U))))
168+ let W = if ((size(K) != 0))
169+ then (V + (f * V))
170+ else V
171+ if ((c != U))
170172 then throw("This token is not accepted at the moment")
171- else if (if ((S != V))
172- then (0 >= P)
173+ else if (if ((T != W))
174+ then (0 >= Q)
173175 else false)
174176 then throw("The price is wrong")
175- else [StringEntry(h, toBase58String(L)), StringEntry((H + h), toBase58String(L)), StringEntry((I + h), toBase58String(L)), StringEntry(((("data_fc_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(b), V, R.assetId)]
177+ else [StringEntry(i, toBase58String(M)), StringEntry((I + i), toBase58String(M)), StringEntry((J + i), toBase58String(M)), StringEntry(((("data_fc_" + toBase58String(M)) + "_") + p), A), ScriptTransfer(addressFromStringValue(b), W, S.assetId)]
176178 }
177179 else throw("You are not allowed to do that")
178180 }
179181 }
180182
181183
182184
183-@Callable(G)
184-func revokeCertification (W,K) = {
185- let L = value(G.transactionId)
186- let O = (this == G.caller)
187- let o = if (O)
188- then toString(addressFromPublicKey(fromBase58String(K)))
189- else toBase58String(G.caller.bytes)
190- let M = {
191- let i = getString(this, ((("data_fc_" + W) + "_") + o))
192- if ($isInstanceOf(i, "String"))
185+@Callable(H)
186+func revokeCertification (X,L) = {
187+ let M = value(H.transactionId)
188+ let P = (this == H.caller)
189+ let p = if (P)
190+ then toString(addressFromPublicKey(fromBase58String(L)))
191+ else toBase58String(H.caller.bytes)
192+ let N = {
193+ let j = getString(this, ((("data_fc_" + X) + "_") + p))
194+ if ($isInstanceOf(j, "String"))
193195 then {
194- let j = i
195- j
196+ let k = j
197+ k
196198 }
197199 else "NONE"
198200 }
199- let X = {
200- let i = getString(this, ("STATUS_FC_" + W))
201- if ($isInstanceOf(i, "String"))
201+ let Y = {
202+ let j = getString(this, ("STATUS_FC_" + X))
203+ if ($isInstanceOf(j, "String"))
202204 then {
203- let j = i
204- j
205+ let k = j
206+ k
205207 }
206208 else "NONE"
207209 }
208- let P = n(o)
209- let Y = (((dropRight(M, 1) + ",\"status\":\"REVOKED_") + toBase58String(L)) + "\"}")
210- if ((X != "NONE"))
210+ let Q = o(p)
211+ let Z = (((dropRight(N, 1) + ",\"status\":\"REVOKED_") + toBase58String(M)) + "\"}")
212+ if ((Y != "NONE"))
211213 then throw("This certification have already been revoked.")
212- else if ((M == "NONE"))
214+ else if ((N == "NONE"))
213215 then throw("You cannot change the status of this certification.")
214- else if ((P > 0))
215- then [IntegerEntry(("addr_WHITELISTED_" + o), (P - 1)), StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(L))), StringEntry(((("data_fc_" + W) + "_") + o), Y), ScriptTransfer(addressFromStringValue(o), 0, c)]
216- else if (!(O))
216+ else if ((Q > 0))
217+ then [IntegerEntry(("addr_WHITELISTED_" + p), (Q - 1)), StringEntry(("STATUS_FC_" + X), ("REVOKED_" + toBase58String(M))), StringEntry(((("data_fc_" + X) + "_") + p), Z), ScriptTransfer(addressFromStringValue(p), 0, c)]
218+ else if (!(P))
217219 then {
218- let R = value(G.payments[0])
219- let S = value(R.amount)
220- let T = if (isDefined(R.assetId))
221- then value(R.assetId)
220+ let S = value(H.payments[0])
221+ let T = value(S.amount)
222+ let U = if (isDefined(S.assetId))
223+ then value(S.assetId)
222224 else throw("Waves is not accepted as payment")
223- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
224- if ((c != T))
225+ let V = getIntegerValue(a, ("certification_fee_" + toBase58String(value(U))))
226+ if ((c != U))
225227 then throw("This token is not accepted at the moment")
226- else if (if ((S != U))
227- then (0 >= P)
228+ else if (if ((T != V))
229+ then (0 >= Q)
228230 else false)
229231 then throw("The price is wrong")
230- else [StringEntry(("STATUS_FC_" + W), ("REVOKED_" + toBase58String(L))), StringEntry(((("data_fc_" + W) + "_") + o), Y), ScriptTransfer(addressFromStringValue(b), S, R.assetId)]
232+ else [StringEntry(("STATUS_FC_" + X), ("REVOKED_" + toBase58String(M))), StringEntry(((("data_fc_" + X) + "_") + p), Z), ScriptTransfer(addressFromStringValue(b), T, S.assetId)]
231233 }
232234 else throw("You are not allowed to do that")
233235 }
234236
235237
236238
237-@Callable(G)
238-func emailCertification (l,I,h,K) = {
239- let L = value(G.transactionId)
240- let M = k(l, h)
241- let N = m(h)
242- let O = (this == G.caller)
243- let o = if (O)
244- then toString(addressFromPublicKey(fromBase58String(K)))
245- else toBase58String(G.caller.bytes)
246- let P = n(o)
247- if ((M != "NONE"))
248- then throw("This entry already exist")
249- else if ((N != "NONE"))
250- then throw("This uuid already exist")
251- else if ((size(h) > 36))
252- then throw("Uuid is too long, 36 characters max.")
253- else if ((size(l) > 150))
254- then throw("Domain is too long, 150 characters max.")
255- else if ((size(I) > 100))
256- then throw("Title is too long, 100 characters max.")
257- else if (if (if (contains(h, "\""))
258- then true
259- else contains(I, "\""))
260- then true
261- else contains(l, "\""))
262- then throw("No \" allowed")
263- else {
264- let z = (((((((("{\"messageid\":\"" + h) + "@") + l) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"reference\":\"") + I) + "\"}")
265- if ((P > 0))
266- then [StringEntry(h, toBase58String(L)), StringEntry(((h + "@") + l), toBase58String(L)), StringEntry((I + h), toBase58String(L)), IntegerEntry(("addr_WHITELISTED_" + o), (P - 1)), StringEntry(((("data_ec_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(o), 0, c)]
267- else if (!(O))
268- then {
269- let R = value(G.payments[0])
270- let S = value(R.amount)
271- let T = if (isDefined(R.assetId))
272- then value(R.assetId)
273- else throw("Waves is not accepted as payment")
274- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
275- if ((c != T))
276- then throw("This token is not accepted at the moment")
277- else if (if ((S != U))
278- then (0 >= P)
279- else false)
280- then throw("The price is wrong")
281- else [StringEntry(h, toBase58String(L)), StringEntry(((h + "@") + l), toBase58String(L)), StringEntry((I + h), toBase58String(L)), StringEntry(((("data_ec_" + toBase58String(L)) + "_") + o), z), ScriptTransfer(addressFromStringValue(b), S, R.assetId)]
282- }
283- else throw("You are not allowed to do that")
284- }
239+@Callable(H)
240+func usdnSignCredits () = {
241+ let S = value(H.payments[0])
242+ let p = toBase58String(H.caller.bytes)
243+ let aa = value(S.assetId)
244+ let T = value(S.amount)
245+ let ab = ((T * 2) / 1000000)
246+ let Q = o(p)
247+ if ((toBase58String(aa) != d))
248+ then throw("Only USDN can be exchanged")
249+ else if (if (((T % 1000000) != 0))
250+ then ((T % 1000000) != 500000)
251+ else false)
252+ then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(T), 6)) + ".") + takeRight(toString(T), 6)))
253+ else [IntegerEntry(("addr_WHITELISTED_" + p), (Q + ab)), ScriptTransfer(addressFromStringValue(b), T, aa)]
285254 }
286255
287256
288-
289-@Callable(G)
290-func createAgreement (H,I,Z,aa,K,h) = {
291- let L = value(G.transactionId)
292- let M = f(H, h)
293- let N = m(h)
294- let O = (this == G.caller)
295- let o = if (O)
296- then toString(addressFromPublicKey(fromBase58String(K)))
297- else toBase58String(G.caller.bytes)
298- let P = n(o)
299- let ab = ((((B(Z, "creator") + "\"") + o) + "\"") + C(Z, "creator"))
300- let ac = split(aa, ",")
301- let ad = size(ac)
302- let ae = StringEntry((I + h), toBase58String(L))
303- let af = StringEntry((H + h), toBase58String(L))
304- let ag = StringEntry(((("data_MA_" + toBase58String(L)) + "_") + o), ab)
305- let ah = StringEntry(((o + "_MA_") + toBase58String(L)), ("SIGNED_" + toBase58String(L)))
306- let ai = IntegerEntry(("addr_WHITELISTED_" + o), (P - (ad + 1)))
307- if ((M != "NONE"))
308- then throw("This entry already exist")
309- else if ((N != "NONE"))
310- then throw("This uuid already exist")
311- else if ((size(h) > 36))
312- then throw("Uuid is too long, 36 characters max.")
313- else if ((size(H) > 64))
314- then throw("Message-id is too long, 64 characters max.")
315- else if ((size(I) > 100))
316- then throw("Title is too long, 100 characters max.")
317- else if ((P > 0))
318- then if (((ad + 1) > P))
319- then throw("You don't have enough certification credit")
320- else if ((ad == 6))
321- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[5] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c), ScriptTransfer(addressFromStringValue(ac[5]), 0, c)]
322- else if ((ad == 5))
323- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c)]
324- else if ((ad == 4))
325- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c)]
326- else if ((ad == 3))
327- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c)]
328- else if ((ad == 2))
329- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c)]
330- else if ((ad == 1))
331- then [ae, af, ag, ah, ai, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(o), 0, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c)]
332- else throw("Wrong number of participants")
333- else if (!(O))
334- then {
335- let R = value(G.payments[0])
336- let S = if (isDefined(R.amount))
337- then value(R.amount)
338- else 0
339- let T = if (isDefined(R.assetId))
340- then value(R.assetId)
341- else c
342- let U = getIntegerValue(a, ("certification_fee_" + toBase58String(value(T))))
343- if (((U * (ad + 1)) > S))
344- then throw(("The price is wrong, it should be " + toString((U * (ad + 1)))))
345- else if ((ad == 6))
346- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[5] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c), ScriptTransfer(addressFromStringValue(ac[5]), 0, c)]
347- else if ((ad == 5))
348- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[4] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c), ScriptTransfer(addressFromStringValue(ac[4]), 0, c)]
349- else if ((ad == 4))
350- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[3] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c), ScriptTransfer(addressFromStringValue(ac[3]), 0, c)]
351- else if ((ad == 3))
352- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[2] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c), ScriptTransfer(addressFromStringValue(ac[2]), 0, c)]
353- else if ((ad == 2))
354- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), StringEntry(((ac[1] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c), ScriptTransfer(addressFromStringValue(ac[1]), 0, c)]
355- else if ((ad == 1))
356- then [ae, af, ag, ah, StringEntry(((ac[0] + "_MA_") + toBase58String(L)), "PENDING"), ScriptTransfer(addressFromStringValue(b), S, c), ScriptTransfer(addressFromStringValue(ac[0]), 0, c)]
357- else throw(("Needs 1 to 6 recipient addresses, currently sent: " + toString(ad)))
358- }
359- else throw("You are not allowed to do that")
360- }
361-
362-
363-
364-@Callable(G)
365-func signAgreement (H,aj,K) = {
366- let R = value(G.payments[0])
367- let S = value(R.amount)
368- let L = value(G.transactionId)
369- let O = (this == G.caller)
370- let ak = if (O)
371- then toString(addressFromPublicKey(fromBase58String(K)))
372- else toBase58String(G.caller.bytes)
373- let al = t(((ak + "_MA_") + aj))
374- if (!(al))
375- then throw("Sorry there is no pending signature")
376- else [StringEntry(((ak + "_MA_") + aj), ("SIGNED_" + toBase58String(L))), ScriptTransfer(addressFromStringValue(ak), 0, c)]
377- }
378-
379-
380-
381-@Callable(G)
382-func usdnSignCredits () = {
383- let R = value(G.payments[0])
384- let o = toBase58String(G.caller.bytes)
385- let am = value(R.assetId)
386- let S = value(R.amount)
387- let an = ((S * 2) / 1000000)
388- let P = n(o)
389- if ((toBase58String(am) != d))
390- then throw("Only USDN can be exchanged")
391- else if (if (((S % 1000000) != 0))
392- then ((S % 1000000) != 500000)
393- else false)
394- then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(S), 6)) + ".") + takeRight(toString(S), 6)))
395- else [IntegerEntry(("addr_WHITELISTED_" + o), (P + an)), ScriptTransfer(addressFromStringValue(b), S, am)]
396- }
397-
398-
399-@Verifier(ao)
400-func ap () = {
401- let i = ao
402- if ($isInstanceOf(i, "InvokeScriptTransaction"))
257+@Verifier(ac)
258+func ad () = {
259+ let j = ac
260+ if ($isInstanceOf(j, "InvokeScriptTransaction"))
403261 then {
404- let aq = i
405- if (if ((aq.function == "fileCertification"))
406- then true
407- else (aq.function == "createAgreement"))
408- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[4])))
409- else if ((aq.function == "emailCertification"))
410- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[3])))
411- else if ((aq.function == "signAgreement"))
412- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[2])))
413- else if ((aq.function == "revokeCertification"))
414- then sigVerify(ao.bodyBytes, ao.proofs[0], fromBase58String(D(aq.args[1])))
415- else sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey)
262+ let ae = j
263+ if (if (if (if ((ae.function == "fileCertification"))
264+ then (ae.dApp == this)
265+ else false)
266+ then (ae.fee == 500000)
267+ else false)
268+ then (ae.feeAssetId == unit)
269+ else false)
270+ then sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(E(ae.args[4])))
271+ else if (if (if (if ((ae.function == "revokeCertification"))
272+ then (ae.dApp == this)
273+ else false)
274+ then (ae.fee == 500000)
275+ else false)
276+ then (ae.feeAssetId == unit)
277+ else false)
278+ then sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(E(ae.args[1])))
279+ else sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
416280 }
417- else sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey)
281+ else sigVerify(ac.bodyBytes, ac.proofs[0], ac.senderPublicKey)
418282 }
419283

github/deemru/w8io/026f985 
125.29 ms