tx · ENSaAqFBmZqcNXXLwV2rq6MohGAmVMqK6AkD7gtm8RFo

3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx:  -0.01000000 Waves

2023.03.06 18:32 [2478413] smart account 3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx > SELF 0.00000000 Waves

{ "type": 13, "id": "ENSaAqFBmZqcNXXLwV2rq6MohGAmVMqK6AkD7gtm8RFo", "fee": 1000000, "feeAssetId": null, "timestamp": 1678116766868, "version": 2, "chainId": 84, "sender": "3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx", "senderPublicKey": "D35PGQCSSdrp9pvujggj7b2DaCK1BhcU3kho7tikKJYs", "proofs": [ "66FosodkNYrKv69MvhBBEgaHfwUbVr3VNN8tYEHZNKXVZX2CdfSJqZXRmk5DLShkaKuFi7xr5DP1kTYijQGrPpZ5" ], "script": "base64:BgIgCAISBAoCAQESABIDCgEBEgQKAhgREgQKAggIEgMKAQgCAAxvcHRpb25zX2FkZHIJAQdBZGRyZXNzAQEaAVRBW/gr9hfqKqHLxIrx+8e7siBhMf6HIMEABHRVU0QBIKskSmq2Qkbr0vzjebBhusOuaVdNUnrKRRynQB0RsCkOBgFpAQlpc3N1ZUJpbGwCCXByb3ZpZGluZwRzaXplBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEDWN1cnJlbnRBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwUKY3VycmVudEtleQMJAAECBQckbWF0Y2gwAgNJbnQEAWEFByRtYXRjaDAFAWEAAAQRbWluQmlsbERlcG9zaXRTdHIEByRtYXRjaDAJAJ0IAgUMb3B0aW9uc19hZGRyAhBtaW5fYmlsbF9kZXBvc2l0AwkAAQIFByRtYXRjaDACBFVuaXQCATADCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF4BQckbWF0Y2gwBQF4CQACAQILTWF0Y2ggZXJyb3IED2V4Y2hhbmdlUmF0ZVN0cgQHJG1hdGN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xsZXJBZGRyZXNzU3RyOiAFEGNhbGxlckFkZHJlc3NTdHICAiwgCQACAQIQVW5zZXQgYWRtaW4gbGlzdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkToGjo", "height": 2478413, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GF7ZjKbMbMU39ckahaE9wLTz4tGNaFMAoUnMnbS7LuLB Next: 49XtyS85XjTeLT4bqe1jDDMS9QMcVHwvRUetZ7HHCmRr Diff:
OldNewDifferences
6161 }
6262 else throw("Match error")
6363 }
64- let p = (g - d)
64+ let p = (g * o)
65+ let q = (g - d)
6566 if (((m * 100) > d))
6667 then throw((((("The security deposit must be more than " + j) + ". You set the size: ") + toString((d / 100))) + ".00"))
67- else if ((0 > p))
68+ else if ((0 > q))
6869 then throw("Not enough balance")
69- else if ((e > (g * o)))
70- then throw((("The nominal value of the promissory bill exceeds the collateral minimum (" + j) + ")"))
70+ else if ((e > p))
71+ then throw((((("The nominal value of the promissory bill exceeds the collateral minimum" + toString(p)) + "₽ (") + j) + "tUSD)"))
7172 else {
72- let q = Issue(("bill for:" + toString((d / 100))), ((f + ":") + toString(e)), 1, 0, false)
73- let r = calculateAssetId(q)
74- $Tuple2([IntegerEntry(f, p), q, ScriptTransfer(c.caller, 1, r), IntegerEntry(("l_u_" + toBase58String(r)), d)], unit)
73+ let r = Issue(("bill for:" + toString((d / 100))), ((f + ":") + toString(e)), 1, 0, false)
74+ let s = calculateAssetId(r)
75+ $Tuple2([IntegerEntry(f, q), r, ScriptTransfer(c.caller, 1, s), IntegerEntry(("l_u_" + toBase58String(s)), d)], unit)
7576 }
7677 }
7778
8182 func deposit () = if ((size(c.payments) == 0))
8283 then throw("Payment not attached")
8384 else {
84- let s = value(c.payments)[0]
85- let t = {
85+ let t = value(c.payments)[0]
86+ let u = {
8687 let h = getString(a, "min_deposit")
8788 if ($isInstanceOf(h, "Unit"))
8889 then "0"
9394 }
9495 else throw("Match error")
9596 }
96- let u = {
97- let h = parseInt(split(t, ".")[0])
97+ let v = {
98+ let h = parseInt(split(u, ".")[0])
9899 if ($isInstanceOf(h, "Unit"))
99100 then 0
100101 else if ($isInstanceOf(h, "Int"))
104105 }
105106 else throw("Match error")
106107 }
107- if ((s.assetId != b))
108+ if ((t.assetId != b))
108109 then throw("holded payment not tUSD")
109- else if (((u * 100) > s.amount))
110- then throw((((("You have set the deposit amount to " + toString((s.amount / 100))) + ".00, which is less than the minimum (") + t) + ")"))
110+ else if (((v * 100) > t.amount))
111+ then throw((((("You have set the deposit amount to " + toString((t.amount / 100))) + ".00, which is less than the minimum (") + u) + ")"))
111112 else {
112113 let f = toBase58String(c.caller.bytes)
113114 let g = {
119120 }
120121 else 0
121122 }
122- let p = (g + s.amount)
123-[IntegerEntry(f, p)]
123+ let q = (g + t.amount)
124+[IntegerEntry(f, q)]
124125 }
125126 }
126127
127128
128129
129130 @Callable(c)
130-func withdraw (v) = {
131+func withdraw (w) = {
131132 let f = toBase58String(c.caller.bytes)
132133 let g = {
133134 let h = getInteger(this, f)
138139 }
139140 else 0
140141 }
141- let p = (g - v)
142- if ((0 > v))
142+ let q = (g - w)
143+ if ((0 > w))
143144 then throw("Can't withdraw negative amount")
144- else if ((0 > p))
145+ else if ((0 > q))
145146 then throw("Not enough balance")
146- else $Tuple2([IntegerEntry(f, p), ScriptTransfer(c.caller, v, b)], unit)
147+ else $Tuple2([IntegerEntry(f, q), ScriptTransfer(c.caller, w, b)], unit)
147148 }
148149
149150
150151
151152 @Callable(c)
152-func setOptions (w,x) = {
153- let y = size(w)
154- if ((100 >= y))
153+func setOptions (x,y) = {
154+ let z = size(x)
155+ if ((100 >= z))
155156 then {
156- let z = {
157+ let A = {
157158 let h = getString(a, "admin_list")
158159 if ($isInstanceOf(h, "Unit"))
159160 then "unset"
164165 }
165166 else throw("Match error")
166167 }
167- func A (B,C) = {
168- let D = B
169- let E = D._1
170- let F = D._2
171- $Tuple2((E :+ IntegerEntry(w[F], C)), (F + 1))
168+ func B (C,D) = {
169+ let E = C
170+ let F = E._1
171+ let G = E._2
172+ $Tuple2((F :+ IntegerEntry(x[G], D)), (G + 1))
172173 }
173174
174- let G = {
175- let H = x
176- let I = size(H)
177- let J = $Tuple2(nil, 0)
178- func K (L,M) = if ((M >= I))
179- then L
180- else A(L, H[M])
175+ let H = {
176+ let I = y
177+ let J = size(I)
178+ let K = $Tuple2(nil, 0)
179+ func L (M,N) = if ((N >= J))
180+ then M
181+ else B(M, I[N])
181182
182- func N (L,M) = if ((M >= I))
183- then L
183+ func O (M,N) = if ((N >= J))
184+ then M
184185 else throw("List size exceeds 100")
185186
186- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
187+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
187188 }
188- let O = toString(c.caller)
189- if ((z != "unset"))
189+ let P = toString(c.caller)
190+ if ((A != "unset"))
190191 then {
191- let P = getString(addressFromStringValue(z), O)
192- let Q = {
193- let h = P
192+ let Q = getString(addressFromStringValue(A), P)
193+ let R = {
194+ let h = Q
194195 if ($isInstanceOf(h, "String"))
195196 then {
196197 let k = h
200201 then "no admin"
201202 else throw("Match error")
202203 }
203- func R (S) = {
204- let T = split(S, "|")
205- StringEntry(T[0], T[1])
204+ func S (T) = {
205+ let U = split(T, "|")
206+ StringEntry(U[0], U[1])
206207 }
207208
208- if ((Q != "no admin"))
209- then G
210- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
209+ if ((R != "no admin"))
210+ then H
211+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
211212 }
212213 else throw("Unset admin list")
213214 }
217218
218219
219220 @Callable(c)
220-func setOption (U,V) = {
221- let z = {
221+func setOption (V,W) = {
222+ let A = {
222223 let h = getString(a, "admin_list")
223224 if ($isInstanceOf(h, "Unit"))
224225 then "unset"
229230 }
230231 else throw("Match error")
231232 }
232- let O = toString(c.caller)
233- if ((z != "unset"))
233+ let P = toString(c.caller)
234+ if ((A != "unset"))
234235 then {
235- let P = getString(addressFromStringValue(z), O)
236- let Q = {
237- let h = P
236+ let Q = getString(addressFromStringValue(A), P)
237+ let R = {
238+ let h = Q
238239 if ($isInstanceOf(h, "String"))
239240 then {
240241 let k = h
244245 then "no admin"
245246 else throw("Match error")
246247 }
247- if ((Q != "no admin"))
248- then $Tuple2([StringEntry(U, V)], unit)
249- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
248+ if ((R != "no admin"))
249+ then $Tuple2([StringEntry(V, W)], unit)
250+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
250251 }
251252 else throw("Unset admin list")
252253 }
254255
255256
256257 @Callable(c)
257-func delOption (U) = {
258- let z = {
258+func delOption (V) = {
259+ let A = {
259260 let h = getString(a, "admin_list")
260261 if ($isInstanceOf(h, "Unit"))
261262 then "unset"
266267 }
267268 else throw("Match error")
268269 }
269- let O = toString(c.caller)
270- if ((z != "unset"))
270+ let P = toString(c.caller)
271+ if ((A != "unset"))
271272 then {
272- let P = getString(addressFromStringValue(z), O)
273- let Q = {
274- let h = P
273+ let Q = getString(addressFromStringValue(A), P)
274+ let R = {
275+ let h = Q
275276 if ($isInstanceOf(h, "String"))
276277 then {
277278 let k = h
281282 then "no admin"
282283 else throw("Match error")
283284 }
284- if ((Q != "no admin"))
285- then $Tuple2([DeleteEntry(U)], unit)
286- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
285+ if ((R != "no admin"))
286+ then $Tuple2([DeleteEntry(V)], unit)
287+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
287288 }
288289 else throw("Unset admin list")
289290 }
290291
291292
292-@Verifier(W)
293-func X () = sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey)
293+@Verifier(X)
294+func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey)
294295
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
55
66 let b = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
77
88 @Callable(c)
99 func issueBill (d,e) = {
1010 let f = toBase58String(c.caller.bytes)
1111 let g = {
1212 let h = getInteger(this, f)
1313 if ($isInstanceOf(h, "Int"))
1414 then {
1515 let i = h
1616 i
1717 }
1818 else 0
1919 }
2020 let j = {
2121 let h = getString(a, "min_bill_deposit")
2222 if ($isInstanceOf(h, "Unit"))
2323 then "0"
2424 else if ($isInstanceOf(h, "String"))
2525 then {
2626 let k = h
2727 k
2828 }
2929 else throw("Match error")
3030 }
3131 let l = {
3232 let h = getString(a, "exchange_rate")
3333 if ($isInstanceOf(h, "Unit"))
3434 then "0"
3535 else if ($isInstanceOf(h, "String"))
3636 then {
3737 let k = h
3838 k
3939 }
4040 else throw("Match error")
4141 }
4242 let m = {
4343 let h = parseInt(split(j, ".")[0])
4444 if ($isInstanceOf(h, "Unit"))
4545 then 0
4646 else if ($isInstanceOf(h, "Int"))
4747 then {
4848 let n = h
4949 n
5050 }
5151 else throw("Match error")
5252 }
5353 let o = {
5454 let h = parseInt(split(l, ".")[0])
5555 if ($isInstanceOf(h, "Unit"))
5656 then 0
5757 else if ($isInstanceOf(h, "Int"))
5858 then {
5959 let n = h
6060 n
6161 }
6262 else throw("Match error")
6363 }
64- let p = (g - d)
64+ let p = (g * o)
65+ let q = (g - d)
6566 if (((m * 100) > d))
6667 then throw((((("The security deposit must be more than " + j) + ". You set the size: ") + toString((d / 100))) + ".00"))
67- else if ((0 > p))
68+ else if ((0 > q))
6869 then throw("Not enough balance")
69- else if ((e > (g * o)))
70- then throw((("The nominal value of the promissory bill exceeds the collateral minimum (" + j) + ")"))
70+ else if ((e > p))
71+ then throw((((("The nominal value of the promissory bill exceeds the collateral minimum" + toString(p)) + "₽ (") + j) + "tUSD)"))
7172 else {
72- let q = Issue(("bill for:" + toString((d / 100))), ((f + ":") + toString(e)), 1, 0, false)
73- let r = calculateAssetId(q)
74- $Tuple2([IntegerEntry(f, p), q, ScriptTransfer(c.caller, 1, r), IntegerEntry(("l_u_" + toBase58String(r)), d)], unit)
73+ let r = Issue(("bill for:" + toString((d / 100))), ((f + ":") + toString(e)), 1, 0, false)
74+ let s = calculateAssetId(r)
75+ $Tuple2([IntegerEntry(f, q), r, ScriptTransfer(c.caller, 1, s), IntegerEntry(("l_u_" + toBase58String(s)), d)], unit)
7576 }
7677 }
7778
7879
7980
8081 @Callable(c)
8182 func deposit () = if ((size(c.payments) == 0))
8283 then throw("Payment not attached")
8384 else {
84- let s = value(c.payments)[0]
85- let t = {
85+ let t = value(c.payments)[0]
86+ let u = {
8687 let h = getString(a, "min_deposit")
8788 if ($isInstanceOf(h, "Unit"))
8889 then "0"
8990 else if ($isInstanceOf(h, "String"))
9091 then {
9192 let k = h
9293 k
9394 }
9495 else throw("Match error")
9596 }
96- let u = {
97- let h = parseInt(split(t, ".")[0])
97+ let v = {
98+ let h = parseInt(split(u, ".")[0])
9899 if ($isInstanceOf(h, "Unit"))
99100 then 0
100101 else if ($isInstanceOf(h, "Int"))
101102 then {
102103 let n = h
103104 n
104105 }
105106 else throw("Match error")
106107 }
107- if ((s.assetId != b))
108+ if ((t.assetId != b))
108109 then throw("holded payment not tUSD")
109- else if (((u * 100) > s.amount))
110- then throw((((("You have set the deposit amount to " + toString((s.amount / 100))) + ".00, which is less than the minimum (") + t) + ")"))
110+ else if (((v * 100) > t.amount))
111+ then throw((((("You have set the deposit amount to " + toString((t.amount / 100))) + ".00, which is less than the minimum (") + u) + ")"))
111112 else {
112113 let f = toBase58String(c.caller.bytes)
113114 let g = {
114115 let h = getInteger(this, f)
115116 if ($isInstanceOf(h, "Int"))
116117 then {
117118 let i = h
118119 i
119120 }
120121 else 0
121122 }
122- let p = (g + s.amount)
123-[IntegerEntry(f, p)]
123+ let q = (g + t.amount)
124+[IntegerEntry(f, q)]
124125 }
125126 }
126127
127128
128129
129130 @Callable(c)
130-func withdraw (v) = {
131+func withdraw (w) = {
131132 let f = toBase58String(c.caller.bytes)
132133 let g = {
133134 let h = getInteger(this, f)
134135 if ($isInstanceOf(h, "Int"))
135136 then {
136137 let i = h
137138 i
138139 }
139140 else 0
140141 }
141- let p = (g - v)
142- if ((0 > v))
142+ let q = (g - w)
143+ if ((0 > w))
143144 then throw("Can't withdraw negative amount")
144- else if ((0 > p))
145+ else if ((0 > q))
145146 then throw("Not enough balance")
146- else $Tuple2([IntegerEntry(f, p), ScriptTransfer(c.caller, v, b)], unit)
147+ else $Tuple2([IntegerEntry(f, q), ScriptTransfer(c.caller, w, b)], unit)
147148 }
148149
149150
150151
151152 @Callable(c)
152-func setOptions (w,x) = {
153- let y = size(w)
154- if ((100 >= y))
153+func setOptions (x,y) = {
154+ let z = size(x)
155+ if ((100 >= z))
155156 then {
156- let z = {
157+ let A = {
157158 let h = getString(a, "admin_list")
158159 if ($isInstanceOf(h, "Unit"))
159160 then "unset"
160161 else if ($isInstanceOf(h, "String"))
161162 then {
162163 let k = h
163164 k
164165 }
165166 else throw("Match error")
166167 }
167- func A (B,C) = {
168- let D = B
169- let E = D._1
170- let F = D._2
171- $Tuple2((E :+ IntegerEntry(w[F], C)), (F + 1))
168+ func B (C,D) = {
169+ let E = C
170+ let F = E._1
171+ let G = E._2
172+ $Tuple2((F :+ IntegerEntry(x[G], D)), (G + 1))
172173 }
173174
174- let G = {
175- let H = x
176- let I = size(H)
177- let J = $Tuple2(nil, 0)
178- func K (L,M) = if ((M >= I))
179- then L
180- else A(L, H[M])
175+ let H = {
176+ let I = y
177+ let J = size(I)
178+ let K = $Tuple2(nil, 0)
179+ func L (M,N) = if ((N >= J))
180+ then M
181+ else B(M, I[N])
181182
182- func N (L,M) = if ((M >= I))
183- then L
183+ func O (M,N) = if ((N >= J))
184+ then M
184185 else throw("List size exceeds 100")
185186
186- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
187+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
187188 }
188- let O = toString(c.caller)
189- if ((z != "unset"))
189+ let P = toString(c.caller)
190+ if ((A != "unset"))
190191 then {
191- let P = getString(addressFromStringValue(z), O)
192- let Q = {
193- let h = P
192+ let Q = getString(addressFromStringValue(A), P)
193+ let R = {
194+ let h = Q
194195 if ($isInstanceOf(h, "String"))
195196 then {
196197 let k = h
197198 k
198199 }
199200 else if ($isInstanceOf(h, "Unit"))
200201 then "no admin"
201202 else throw("Match error")
202203 }
203- func R (S) = {
204- let T = split(S, "|")
205- StringEntry(T[0], T[1])
204+ func S (T) = {
205+ let U = split(T, "|")
206+ StringEntry(U[0], U[1])
206207 }
207208
208- if ((Q != "no admin"))
209- then G
210- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
209+ if ((R != "no admin"))
210+ then H
211+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
211212 }
212213 else throw("Unset admin list")
213214 }
214215 else throw("The number of list elements must not exceed 100")
215216 }
216217
217218
218219
219220 @Callable(c)
220-func setOption (U,V) = {
221- let z = {
221+func setOption (V,W) = {
222+ let A = {
222223 let h = getString(a, "admin_list")
223224 if ($isInstanceOf(h, "Unit"))
224225 then "unset"
225226 else if ($isInstanceOf(h, "String"))
226227 then {
227228 let k = h
228229 k
229230 }
230231 else throw("Match error")
231232 }
232- let O = toString(c.caller)
233- if ((z != "unset"))
233+ let P = toString(c.caller)
234+ if ((A != "unset"))
234235 then {
235- let P = getString(addressFromStringValue(z), O)
236- let Q = {
237- let h = P
236+ let Q = getString(addressFromStringValue(A), P)
237+ let R = {
238+ let h = Q
238239 if ($isInstanceOf(h, "String"))
239240 then {
240241 let k = h
241242 k
242243 }
243244 else if ($isInstanceOf(h, "Unit"))
244245 then "no admin"
245246 else throw("Match error")
246247 }
247- if ((Q != "no admin"))
248- then $Tuple2([StringEntry(U, V)], unit)
249- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
248+ if ((R != "no admin"))
249+ then $Tuple2([StringEntry(V, W)], unit)
250+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
250251 }
251252 else throw("Unset admin list")
252253 }
253254
254255
255256
256257 @Callable(c)
257-func delOption (U) = {
258- let z = {
258+func delOption (V) = {
259+ let A = {
259260 let h = getString(a, "admin_list")
260261 if ($isInstanceOf(h, "Unit"))
261262 then "unset"
262263 else if ($isInstanceOf(h, "String"))
263264 then {
264265 let k = h
265266 k
266267 }
267268 else throw("Match error")
268269 }
269- let O = toString(c.caller)
270- if ((z != "unset"))
270+ let P = toString(c.caller)
271+ if ((A != "unset"))
271272 then {
272- let P = getString(addressFromStringValue(z), O)
273- let Q = {
274- let h = P
273+ let Q = getString(addressFromStringValue(A), P)
274+ let R = {
275+ let h = Q
275276 if ($isInstanceOf(h, "String"))
276277 then {
277278 let k = h
278279 k
279280 }
280281 else if ($isInstanceOf(h, "Unit"))
281282 then "no admin"
282283 else throw("Match error")
283284 }
284- if ((Q != "no admin"))
285- then $Tuple2([DeleteEntry(U)], unit)
286- else throw((((((("You not admin: " + z) + ", isAdmin: ") + Q) + ", callerAddressStr: ") + O) + ", "))
285+ if ((R != "no admin"))
286+ then $Tuple2([DeleteEntry(V)], unit)
287+ else throw((((((("You not admin: " + A) + ", isAdmin: ") + R) + ", callerAddressStr: ") + P) + ", "))
287288 }
288289 else throw("Unset admin list")
289290 }
290291
291292
292-@Verifier(W)
293-func X () = sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey)
293+@Verifier(X)
294+func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey)
294295

github/deemru/w8io/169f3d6 
95.42 ms