tx · 6HkGmmPw3FwSkeHnydmjHJJJK8nDxjMrReZEuRyctjMG

3MtsXxXqERvHEmkPiiuBESuixd9Y8qAU1PC:  -0.14000000 Waves

2022.10.18 17:27 [2277956] smart account 3MtsXxXqERvHEmkPiiuBESuixd9Y8qAU1PC > SELF 0.00000000 Waves

{ "type": 13, "id": "6HkGmmPw3FwSkeHnydmjHJJJK8nDxjMrReZEuRyctjMG", "fee": 14000000, "feeAssetId": null, "timestamp": 1666103211181, "version": 2, "chainId": 84, "sender": "3MtsXxXqERvHEmkPiiuBESuixd9Y8qAU1PC", "senderPublicKey": "EBCSQaTtuxQBJyc62F142LxJ3hpQtCwuZ2z9kkoe6Vvt", "proofs": [ "3dzxBAHoo8u2RBE6nZJJfwr2zvxTZ26B6wSzqeuVmcW59WYHKvdjQHXyk1SfPATokc1fpLCxZUQTTgk6VPixXHA1", "SKiK949pccRHH8SxggyitEFtkKP3bUNi1YsJvJRgjmkhkoFCGDc6sfYJi8JLaQdfeqAZwnAX2kRGHeyM891KTDT" ], "script": "base64:BgIbCAISABIECgIICBIFCgMBBAESBAoCAQgSABIAPwAGb3JhY2xlCQEHQWRkcmVzcwEBGgFUSBOXDMDTM8wlMoC2KfenZGiAq+PMe0uZAAd2ZXJzaW9uAgUxLjAuMAAIa1ZlcnNpb24CB3ZlcnNpb24AB2tBY3RpdmUCBmFjdGl2ZQALa0FjdGl2ZUdsb2ICFGFjdGl2ZV9hbGxfY29udHJhY3RzAA9rTnVtYmVyT2ZWb3RpbmcCFHZvdGluZ19hY3RpdmVfbnVtYmVyAA1rSGVpZ2h0T2ZQb29sAg5fZmluaXNoX2hlaWdodAADa05vAg9fdG90YWxfdm90ZXNfbm8ABGtZZXMCEF90b3RhbF92b3Rlc195ZXMAB2tOb1VzZXICCF92b3RlX25vAAhrWWVzVXNlcgIJX3ZvdGVfeWVzAA9rU3RhdHVzT2ZWb3RpbmcCB19zdGF0dXMAD2tBbW91bnRPZlZvdGluZwIOdm90aW5nX2lkX2x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bAEFAWkDBQZhY3RpdmUJAAIBAhZEQXBwIGlzIGFscmVhZHkgYWN0aXZlCQDMCAIJAQxCb29sZWFuRW50cnkCBQdrQWN0aXZlBgkAzAgCCQELRGVsZXRlRW50cnkBBQZrQ2F1c2UFA25pbAECdHgBBnZlcmlmeQAEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAub913Q=", "height": 2277956, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6NN1XcK3HGPbPXT9ZtW6qdWXB47267RkWpgVDcJvyNmd Next: 6sZEEaSg9e389m4azP6dugxRbKbPV1vYgw5e5vTySxUU Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "1.0.0"
4+let a = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
55
6-let b = "version"
6+let b = "1.0.0"
77
8-let c = "active"
8+let c = "version"
99
10-let d = "voting_active_number"
10+let d = "active"
1111
12-let e = "_finish_height"
12+let e = "active_all_contracts"
1313
14-let f = "_total_votes_no"
14+let f = "voting_active_number"
1515
16-let g = "_total_votes_yes"
16+let g = "_finish_height"
1717
18-let h = "_vote_no"
18+let h = "_total_votes_no"
1919
20-let i = "_vote_yes"
20+let i = "_total_votes_yes"
2121
22-let j = "_status"
22+let j = "_vote_no"
2323
24-let k = "voting_id_last"
24+let k = "_vote_yes"
2525
26-let l = "max_amount_voting"
26+let l = "_status"
2727
28-let m = "max_day_voting"
28+let m = "voting_id_last"
2929
30-let n = "commission"
30+let n = "max_amount_voting"
3131
32-let o = "commission_scale_delimiter"
32+let o = "max_day_voting"
3333
3434 let p = "shutdown_cause"
3535
3636 let q = "_cancel_cause"
3737
38-let r = "_SWOP_amount"
38+let r = "_GSwop_amount"
3939
4040 let s = "_asset_name"
4141
4242 let t = "_voting"
4343
44-let u = "period_voting"
44+let u = "voting_active_cell_1"
4545
46-let v = "voting_active_cell_1"
46+let v = "voting_active_cell_2"
4747
48-let w = "voting_active_cell_2"
48+let w = "voting_active_cell_3"
4949
50-let x = "voting_active_cell_3"
50+let x = "admin_pub_1"
5151
52-let y = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
52+let y = "admin_pub_2"
5353
54-let z = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
54+let z = "admin_pub_3"
5555
56-let A = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
56+let A = "money_box_address"
5757
58-let B = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
58+let B = "governance_address"
5959
60-let C = Address(base58'3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had')
60+let C = "farming_address"
6161
62-let D = Address(base58'3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs')
62+let D = "usdn_asset_id"
6363
64-let E = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
64+let E = "SWOP_id"
6565
66-let F = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
66+let F = getIntegerValue(this, f)
6767
68-let G = base58'74TNyqCP12fpTqL3LXDPgvUJaQtWnfJb9qM9v5dVKdqG'
68+let G = getIntegerValue(this, m)
6969
70-let H = getBooleanValue(this, c)
70+let H = valueOrElse(getString(this, u), "")
7171
72-let I = getIntegerValue(this, d)
72+let I = valueOrElse(getString(this, v), "")
7373
74-let J = getIntegerValue(this, k)
74+let J = valueOrElse(getString(this, w), "")
7575
76-let K = valueOrElse(getString(this, v), "")
76+let K = getBooleanValue(this, d)
7777
78-let L = valueOrElse(getString(this, w), "")
78+let L = valueOrElse(getBoolean(a, e), true)
7979
80-let M = valueOrElse(getString(this, x), "")
80+let M = 1000000000
8181
82-let N = 1000000000
82+let N = 3
8383
84-let O = 1000
84+let O = 7
8585
86-let P = 100000000
86+let P = (1443 * O)
8787
88-let Q = 1000
88+func Q (R) = {
89+ let S = getString(a, R)
90+ if ($isInstanceOf(S, "String"))
91+ then {
92+ let T = S
93+ fromBase58String(T)
94+ }
95+ else {
96+ let U = S
97+ throw((R + "is empty"))
98+ }
99+ }
89100
90-let R = 8
91101
92-let S = 3
102+let V = Q(x)
93103
94-let T = 7
104+let W = Q(y)
95105
96-let U = (1443 * T)
106+let X = Q(z)
97107
98-func V (W) = {
99- let X = W
100- if ($isInstanceOf(X, "ByteVector"))
108+let Y = Address(Q(B))
109+
110+let Z = Address(Q(C))
111+
112+let aa = Address(Q(A))
113+
114+let ab = Q(D)
115+
116+let ac = fromBase58String(getStringValue(Z, E))
117+
118+func ad () = if (if (K)
119+ then L
120+ else false)
121+ then unit
122+ else throw("DApp is inactive at this moment")
123+
124+
125+func ae (af) = if (containsElement([V, W, X], af.callerPublicKey))
126+ then unit
127+ else throw("Only admin can call this function")
128+
129+
130+func ag (ah) = {
131+ let S = ah
132+ if ($isInstanceOf(S, "ByteVector"))
101133 then {
102- let Y = X
103- if (isDefined(assetInfo(Y)))
134+ let ai = S
135+ if (isDefined(assetInfo(ai)))
104136 then {
105- let Z = toBase58String(Y)
106- let aa = valueOrErrorMessage(assetInfo(Y), (("Asset " + Z) + " doesn't exist"))
107- $Tuple3(Z, aa.name, aa.decimals)
137+ let aj = toBase58String(ai)
138+ let ak = valueOrErrorMessage(assetInfo(ai), (("Asset " + aj) + " doesn't exist"))
139+ $Tuple3(aj, ak.name, ak.decimals)
108140 }
109141 else throw("Asset is not defined")
110142 }
111- else if ($isInstanceOf(X, "Unit"))
143+ else if ($isInstanceOf(S, "Unit"))
112144 then {
113- let ab = X
145+ let al = S
114146 $Tuple3("WAVES", "WAVES", 8)
115147 }
116148 else throw("Match error")
117149 }
118150
119151
120-func ac (ad,ae,af) = {
121- let ag = split(ad, "_")
122- let ah = isDefined(getInteger(this, ad))
123- if (if (ah)
124- then (ad != "")
152+func am (an,ao,ap) = {
153+ let aq = split(an, "_")
154+ let ar = isDefined(getInteger(this, an))
155+ if (if (ar)
156+ then (an != "")
125157 else false)
126158 then {
127- let ai = ag[2]
128- let aj = (((((ae + "_") + af) + "_") + ai) + t)
129- let ak = isDefined(getInteger(this, aj))
130- let al = valueOrElse(getInteger(this, (ai + e)), 0)
131- let am = valueOrElse(getBoolean(this, (ai + j)), true)
132- if (ak)
133- then if ((al > height))
134- then if (am)
159+ let as = aq[2]
160+ let at = (((((ao + "_") + ap) + "_") + as) + t)
161+ let au = isDefined(getInteger(this, at))
162+ let av = valueOrElse(getInteger(this, (as + g)), 0)
163+ let aw = valueOrElse(getBoolean(this, (as + l)), true)
164+ if (au)
165+ then if ((av > height))
166+ then if (aw)
135167 then true
136168 else false
137169 else false
141173 }
142174
143175
144-func an (ao) = {
145- let ad = valueOrElse(getString(this, ao), "")
146- let ag = split(ad, "_")
147- let ah = isDefined(getInteger(this, ad))
148- if (if (ah)
149- then (ad != "")
176+func ax (ay) = {
177+ let an = valueOrElse(getString(this, ay), "")
178+ let aq = split(an, "_")
179+ let ar = isDefined(getInteger(this, an))
180+ if (if (ar)
181+ then (an != "")
150182 else false)
151183 then {
152- let ai = ag[2]
153- let al = valueOrElse(getInteger(this, (ai + e)), 0)
154- let am = valueOrElse(getBoolean(this, (ai + j)), true)
155- if ((al > height))
156- then if (am)
184+ let as = aq[2]
185+ let av = valueOrElse(getInteger(this, (as + g)), 0)
186+ let aw = valueOrElse(getBoolean(this, (as + l)), true)
187+ if ((av > height))
188+ then if (aw)
157189 then ""
158- else ao
159- else ao
190+ else ay
191+ else ay
160192 }
161- else ao
193+ else ay
162194 }
163195
164196
165-func ap (ae,af) = if (if (ac(K, ae, af))
197+func az (ao,ap) = if (if (am(H, ao, ap))
166198 then true
167- else ac(L, ae, af))
199+ else am(I, ao, ap))
168200 then true
169- else ac(M, ae, af)
201+ else am(J, ao, ap)
170202
171203
172-func aq (ai) = {
173- let al = valueOrElse(getInteger(this, (toString(ai) + e)), 0)
174- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
175- let ar = height
176- if ((0 > ai))
204+func aA (as) = {
205+ let av = valueOrElse(getInteger(this, (toString(as) + g)), 0)
206+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
207+ let aB = height
208+ if ((0 > as))
177209 then 0
178- else if (!(am))
210+ else if (!(aw))
179211 then 0
180- else if ((al > ar))
212+ else if ((av > aB))
181213 then 1
182214 else 0
183215 }
184216
185217
186-func as () = ((aq(valueOrElse(getInteger(this, K), -1)) + aq(valueOrElse(getInteger(this, L), -1))) + aq(valueOrElse(getInteger(this, M), -1)))
218+func aC () = ((aA(valueOrElse(getInteger(this, H), -1)) + aA(valueOrElse(getInteger(this, I), -1))) + aA(valueOrElse(getInteger(this, J), -1)))
187219
188220
189-func at () = if ((an(v) != ""))
190- then v
191- else if ((an(w) != ""))
192- then w
193- else if ((an(x) != ""))
194- then x
221+func aD () = if ((ax(u) != ""))
222+ then u
223+ else if ((ax(v) != ""))
224+ then v
225+ else if ((ax(w) != ""))
226+ then w
195227 else ""
196228
197229
198-func au (av) = if ((av == "WAVES"))
230+func aE (aF) = if ((aF == "WAVES"))
199231 then unit
200- else fromBase58String(av)
232+ else fromBase58String(aF)
201233
202234
203-func aw (ax) = if ((valueOrElse(getInteger(D, (toString(ax) + r)), 0) > 0))
235+func aG (aH) = if ((valueOrElse(getInteger(Y, (toString(aH) + r)), 0) > 0))
204236 then true
205237 else false
206238
207239
208-func ay (az) = [BooleanEntry(c, false), StringEntry(p, az)]
240+func aI (aJ) = [BooleanEntry(d, false), StringEntry(p, aJ)]
209241
210242
211-func aA (aB,aC) = throw(((((("Insufficient DApp balance to pay " + toString(aB)) + " ") + aC) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport"))
212-
213-
214-@Callable(aD)
215-func init () = if ((aD.caller != this))
243+@Callable(af)
244+func init () = if ((af.caller != this))
216245 then throw("Only the DApp itself can call this function")
217- else if (isDefined(getBoolean(this, c)))
246+ else if (isDefined(getBoolean(this, d)))
218247 then throw("DApp is already active")
219248 else {
220- let aE = 0
221- let aF = 0
222- let aG = true
223- let aH = ""
224-[StringEntry(b, a), BooleanEntry(c, aG), IntegerEntry(d, aE), IntegerEntry(k, aF), IntegerEntry(l, S), IntegerEntry(m, T), StringEntry(v, aH), StringEntry(w, aH), StringEntry(x, aH)]
249+ let aK = 0
250+ let aL = 0
251+ let aM = true
252+ let aN = ""
253+[StringEntry(c, b), BooleanEntry(d, aM), IntegerEntry(f, aK), IntegerEntry(m, aL), IntegerEntry(n, N), IntegerEntry(o, O), StringEntry(u, aN), StringEntry(v, aN), StringEntry(w, aN)]
225254 }
226255
227256
228257
229-@Callable(aD)
230-func initVotingForNewPool (ae,af) = {
231- let aI = $Tuple2(aD.payments[0].amount, aD.payments[0].assetId)
232- let aJ = aI._1
233- let aK = aI._2
234- let aL = $Tuple2(au(ae), au(af))
235- let aM = aL._1
236- let aN = aL._2
237- let aO = at()
238- let aP = as()
239- let aQ = ap(ae, af)
240- let aR = V(aM)
258+@Callable(af)
259+func initVotingForNewPool (ao,ap) = valueOrElse(ad(), {
260+ let aO = $Tuple2(af.payments[0].amount, af.payments[0].assetId)
261+ let aP = aO._1
262+ let aQ = aO._2
263+ let aR = $Tuple2(aE(ao), aE(ap))
241264 let aS = aR._1
242265 let aT = aR._2
243- let aU = aR._3
244- let aV = V(aN)
245- let aW = aV._1
246- let aX = aV._2
247- let aY = aV._3
248- if (!(H))
249- then throw("DApp is inactive at this moment")
250- else if ((aM == aN))
251- then throw("Assets must be different")
252- else if (aQ)
253- then throw("This pool already exists")
254- else if (if (((aP + 1) > S))
255- then true
256- else (aO == ""))
257- then throw(("Too many votings. Maximum quantity: " + toString(S)))
258- else if ((size(aD.payments) != 1))
259- then throw("One attached asset expected")
260- else if ((aK != F))
261- then throw("You must use a SWOP token")
262- else if (if ((ae == ""))
266+ let aU = aD()
267+ let aV = aC()
268+ let aW = az(ao, ap)
269+ let aX = ag(aS)
270+ let aY = aX._1
271+ let aZ = aX._2
272+ let ba = aX._3
273+ let bb = ag(aT)
274+ let bc = bb._1
275+ let bd = bb._2
276+ let be = bb._3
277+ if ((aS == aT))
278+ then throw("Assets must be different")
279+ else if (aW)
280+ then throw("This pool already exists")
281+ else if ((size(af.payments) != 1))
282+ then throw("One attached asset expected")
283+ else if ((aQ != ac))
284+ then throw("You must use a SWOP token")
285+ else if (if ((ao == ""))
286+ then true
287+ else (ap == ""))
288+ then throw("Assets can't be empty")
289+ else if ((aP != M))
290+ then throw("You need to attach 10 SWOP tokens")
291+ else if (!(if (if ((aT == ab))
263292 then true
264- else (af == ""))
265- then throw("Assets can't be empty")
266- else if ((aJ != N))
267- then throw("You need to attach 10 SWOP tokens")
268- else if (!(if (if (if ((aN == E))
269- then true
270- else (aN == unit))
271- then true
272- else (aN == F))
273- then true
274- else (aN == G)))
275- then throw("assetB must be USDN, WAVES or SWOP")
276- else [IntegerEntry((((((ae + "_") + af) + "_") + toString(J)) + t), J), IntegerEntry((toString(J) + e), (height + U)), BooleanEntry((toString(J) + j), true), IntegerEntry(k, (J + 1)), IntegerEntry(d, (aP + 1)), StringEntry((ae + s), aT), StringEntry((af + s), aX), StringEntry(aO, (((((ae + "_") + af) + "_") + toString(J)) + t)), ScriptTransfer(C, aJ, aK)]
277- }
293+ else (aT == unit))
294+ then true
295+ else (aT == ac)))
296+ then throw("assetB must be USDN, WAVES or SWOP")
297+ else if (if (((aV + 1) > N))
298+ then true
299+ else (aU == ""))
300+ then throw(("Too many votings. Maximum quantity: " + toString(N)))
301+ else [IntegerEntry((((((ao + "_") + ap) + "_") + toString(G)) + t), G), IntegerEntry((toString(G) + g), (height + P)), BooleanEntry((toString(G) + l), true), IntegerEntry(m, (G + 1)), IntegerEntry(f, (aV + 1)), StringEntry((ao + s), aZ), StringEntry((ap + s), bd), StringEntry(aU, (((((ao + "_") + ap) + "_") + toString(G)) + t)), ScriptTransfer(aa, aP, aQ)]
302+ })
278303
279304
280305
281-@Callable(aD)
282-func voteForPool (ai,aZ,ba) = {
283- let ar = height
284- let bb = valueOrErrorMessage(getIntegerValue(this, (toString(ai) + e)), "Empty pool height")
285- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
286- let bc = valueOrElse(getInteger(D, (toString(aD.caller) + r)), 0)
287- let bd = if (aZ)
288- then (valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + h)), 0) + ba)
289- else (valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + i)), 0) + ba)
290- if (!(aw(aD.caller)))
306+@Callable(af)
307+func voteForPool (as,bf,bg) = valueOrElse(ad(), {
308+ let aB = height
309+ let bh = valueOrErrorMessage(getIntegerValue(this, (toString(as) + g)), "Empty pool height")
310+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
311+ let bi = valueOrElse(getInteger(Y, (toString(af.caller) + r)), 0)
312+ let bj = if (bf)
313+ then (valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + j)), 0) + bg)
314+ else (valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + k)), 0) + bg)
315+ if (!(aG(af.caller)))
291316 then throw("This address has 0 SWOP in Governance dApp")
292- else if (!(am))
317+ else if (!(aw))
293318 then throw("This voting was canceled")
294- else if ((ar > bb))
319+ else if ((aB > bh))
295320 then throw("This voting was expired")
296- else if ((0 > ba))
321+ else if ((0 > bg))
297322 then throw("The number of votes must be positive")
298- else if ((bd > bc))
299- then throw((((toString(this) + " has ") + toString(bc)) + " SWOP in governance."))
300- else if (aZ)
323+ else if ((bj > bi))
324+ then throw((((toString(this) + " has ") + toString(bi)) + " SWOP in governance."))
325+ else if (bf)
301326 then {
302- let be = valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + i)), 0)
303- let bf = ((valueOrElse(getInteger(this, (toString(ai) + g)), 0) - be) + ba)
304-[IntegerEntry((toString(ai) + g), bf), IntegerEntry((((toString(aD.caller) + "_") + toString(ai)) + i), ba)]
327+ let bk = valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + k)), 0)
328+ let bl = ((valueOrElse(getInteger(this, (toString(as) + i)), 0) - bk) + bg)
329+[IntegerEntry((toString(as) + i), bl), IntegerEntry((((toString(af.caller) + "_") + toString(as)) + k), bg)]
305330 }
306331 else {
307- let be = valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + h)), 0)
308- let bf = ((valueOrElse(getInteger(this, (toString(ai) + f)), 0) - be) + ba)
309-[IntegerEntry((toString(ai) + f), bf), IntegerEntry((((toString(aD.caller) + "_") + toString(ai)) + h), ba)]
332+ let bk = valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + j)), 0)
333+ let bl = ((valueOrElse(getInteger(this, (toString(as) + h)), 0) - bk) + bg)
334+[IntegerEntry((toString(as) + h), bl), IntegerEntry((((toString(af.caller) + "_") + toString(as)) + j), bg)]
310335 }
311- }
336+ })
312337
313338
314339
315-@Callable(aD)
316-func cancelVoting (ai,az) = {
317- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
318- if (!(H))
319- then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified")))
320- else if (!(containsElement([y, z, A], aD.callerPublicKey)))
321- then throw("Only admin can call this function")
322- else if (!(am))
323- then throw((("Voting " + toString(ai)) + " has already been stopped"))
324- else [IntegerEntry(d, (I - 1)), BooleanEntry((toString(ai) + j), false), StringEntry((toString(ai) + q), az)]
325- }
340+@Callable(af)
341+func cancelVoting (as,aJ) = valueOrElse(ae(af), {
342+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
343+ if (!(aw))
344+ then throw((("Voting " + toString(as)) + " has already been stopped"))
345+ else [IntegerEntry(f, (F - 1)), BooleanEntry((toString(as) + l), false), StringEntry((toString(as) + q), aJ)]
346+ })
326347
327348
328349
329-@Callable(aD)
330-func shutdown () = if (!(H))
350+@Callable(af)
351+func shutdown () = valueOrElse(ae(af), if (!(K))
331352 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified")))
332- else if (!(containsElement([y, z, A, B], aD.callerPublicKey)))
333- then throw("Only admin can call this function")
334- else ay("Paused by admin")
353+ else aI("Paused by admin"))
335354
336355
337356
338-@Callable(aD)
339-func activate () = if (H)
357+@Callable(af)
358+func activate () = valueOrElse(ae(af), if (K)
340359 then throw("DApp is already active")
341- else if (!(containsElement([y, z, A, B], aD.callerPublicKey)))
342- then throw("Only admin can call this function")
343- else [BooleanEntry(c, true), DeleteEntry(p)]
360+ else [BooleanEntry(d, true), DeleteEntry(p)])
344361
345362
346-@Verifier(bg)
347-func bh () = {
348- let bi = if (sigVerify(bg.bodyBytes, bg.proofs[0], y))
363+@Verifier(bm)
364+func bn () = {
365+ let bo = if (sigVerify(bm.bodyBytes, bm.proofs[0], V))
349366 then 1
350367 else 0
351- let bj = if (sigVerify(bg.bodyBytes, bg.proofs[1], z))
368+ let bp = if (sigVerify(bm.bodyBytes, bm.proofs[1], W))
352369 then 1
353370 else 0
354- let bk = if (sigVerify(bg.bodyBytes, bg.proofs[2], A))
371+ let bq = if (sigVerify(bm.bodyBytes, bm.proofs[2], X))
355372 then 1
356373 else 0
357- (((bi + bj) + bk) >= 2)
374+ (((bo + bp) + bq) >= 2)
358375 }
359376
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "1.0.0"
4+let a = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
55
6-let b = "version"
6+let b = "1.0.0"
77
8-let c = "active"
8+let c = "version"
99
10-let d = "voting_active_number"
10+let d = "active"
1111
12-let e = "_finish_height"
12+let e = "active_all_contracts"
1313
14-let f = "_total_votes_no"
14+let f = "voting_active_number"
1515
16-let g = "_total_votes_yes"
16+let g = "_finish_height"
1717
18-let h = "_vote_no"
18+let h = "_total_votes_no"
1919
20-let i = "_vote_yes"
20+let i = "_total_votes_yes"
2121
22-let j = "_status"
22+let j = "_vote_no"
2323
24-let k = "voting_id_last"
24+let k = "_vote_yes"
2525
26-let l = "max_amount_voting"
26+let l = "_status"
2727
28-let m = "max_day_voting"
28+let m = "voting_id_last"
2929
30-let n = "commission"
30+let n = "max_amount_voting"
3131
32-let o = "commission_scale_delimiter"
32+let o = "max_day_voting"
3333
3434 let p = "shutdown_cause"
3535
3636 let q = "_cancel_cause"
3737
38-let r = "_SWOP_amount"
38+let r = "_GSwop_amount"
3939
4040 let s = "_asset_name"
4141
4242 let t = "_voting"
4343
44-let u = "period_voting"
44+let u = "voting_active_cell_1"
4545
46-let v = "voting_active_cell_1"
46+let v = "voting_active_cell_2"
4747
48-let w = "voting_active_cell_2"
48+let w = "voting_active_cell_3"
4949
50-let x = "voting_active_cell_3"
50+let x = "admin_pub_1"
5151
52-let y = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
52+let y = "admin_pub_2"
5353
54-let z = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
54+let z = "admin_pub_3"
5555
56-let A = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
56+let A = "money_box_address"
5757
58-let B = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
58+let B = "governance_address"
5959
60-let C = Address(base58'3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had')
60+let C = "farming_address"
6161
62-let D = Address(base58'3N8E9LU71MDkdP8FWtbP4TBXCNhoc15hWfs')
62+let D = "usdn_asset_id"
6363
64-let E = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
64+let E = "SWOP_id"
6565
66-let F = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
66+let F = getIntegerValue(this, f)
6767
68-let G = base58'74TNyqCP12fpTqL3LXDPgvUJaQtWnfJb9qM9v5dVKdqG'
68+let G = getIntegerValue(this, m)
6969
70-let H = getBooleanValue(this, c)
70+let H = valueOrElse(getString(this, u), "")
7171
72-let I = getIntegerValue(this, d)
72+let I = valueOrElse(getString(this, v), "")
7373
74-let J = getIntegerValue(this, k)
74+let J = valueOrElse(getString(this, w), "")
7575
76-let K = valueOrElse(getString(this, v), "")
76+let K = getBooleanValue(this, d)
7777
78-let L = valueOrElse(getString(this, w), "")
78+let L = valueOrElse(getBoolean(a, e), true)
7979
80-let M = valueOrElse(getString(this, x), "")
80+let M = 1000000000
8181
82-let N = 1000000000
82+let N = 3
8383
84-let O = 1000
84+let O = 7
8585
86-let P = 100000000
86+let P = (1443 * O)
8787
88-let Q = 1000
88+func Q (R) = {
89+ let S = getString(a, R)
90+ if ($isInstanceOf(S, "String"))
91+ then {
92+ let T = S
93+ fromBase58String(T)
94+ }
95+ else {
96+ let U = S
97+ throw((R + "is empty"))
98+ }
99+ }
89100
90-let R = 8
91101
92-let S = 3
102+let V = Q(x)
93103
94-let T = 7
104+let W = Q(y)
95105
96-let U = (1443 * T)
106+let X = Q(z)
97107
98-func V (W) = {
99- let X = W
100- if ($isInstanceOf(X, "ByteVector"))
108+let Y = Address(Q(B))
109+
110+let Z = Address(Q(C))
111+
112+let aa = Address(Q(A))
113+
114+let ab = Q(D)
115+
116+let ac = fromBase58String(getStringValue(Z, E))
117+
118+func ad () = if (if (K)
119+ then L
120+ else false)
121+ then unit
122+ else throw("DApp is inactive at this moment")
123+
124+
125+func ae (af) = if (containsElement([V, W, X], af.callerPublicKey))
126+ then unit
127+ else throw("Only admin can call this function")
128+
129+
130+func ag (ah) = {
131+ let S = ah
132+ if ($isInstanceOf(S, "ByteVector"))
101133 then {
102- let Y = X
103- if (isDefined(assetInfo(Y)))
134+ let ai = S
135+ if (isDefined(assetInfo(ai)))
104136 then {
105- let Z = toBase58String(Y)
106- let aa = valueOrErrorMessage(assetInfo(Y), (("Asset " + Z) + " doesn't exist"))
107- $Tuple3(Z, aa.name, aa.decimals)
137+ let aj = toBase58String(ai)
138+ let ak = valueOrErrorMessage(assetInfo(ai), (("Asset " + aj) + " doesn't exist"))
139+ $Tuple3(aj, ak.name, ak.decimals)
108140 }
109141 else throw("Asset is not defined")
110142 }
111- else if ($isInstanceOf(X, "Unit"))
143+ else if ($isInstanceOf(S, "Unit"))
112144 then {
113- let ab = X
145+ let al = S
114146 $Tuple3("WAVES", "WAVES", 8)
115147 }
116148 else throw("Match error")
117149 }
118150
119151
120-func ac (ad,ae,af) = {
121- let ag = split(ad, "_")
122- let ah = isDefined(getInteger(this, ad))
123- if (if (ah)
124- then (ad != "")
152+func am (an,ao,ap) = {
153+ let aq = split(an, "_")
154+ let ar = isDefined(getInteger(this, an))
155+ if (if (ar)
156+ then (an != "")
125157 else false)
126158 then {
127- let ai = ag[2]
128- let aj = (((((ae + "_") + af) + "_") + ai) + t)
129- let ak = isDefined(getInteger(this, aj))
130- let al = valueOrElse(getInteger(this, (ai + e)), 0)
131- let am = valueOrElse(getBoolean(this, (ai + j)), true)
132- if (ak)
133- then if ((al > height))
134- then if (am)
159+ let as = aq[2]
160+ let at = (((((ao + "_") + ap) + "_") + as) + t)
161+ let au = isDefined(getInteger(this, at))
162+ let av = valueOrElse(getInteger(this, (as + g)), 0)
163+ let aw = valueOrElse(getBoolean(this, (as + l)), true)
164+ if (au)
165+ then if ((av > height))
166+ then if (aw)
135167 then true
136168 else false
137169 else false
138170 else false
139171 }
140172 else false
141173 }
142174
143175
144-func an (ao) = {
145- let ad = valueOrElse(getString(this, ao), "")
146- let ag = split(ad, "_")
147- let ah = isDefined(getInteger(this, ad))
148- if (if (ah)
149- then (ad != "")
176+func ax (ay) = {
177+ let an = valueOrElse(getString(this, ay), "")
178+ let aq = split(an, "_")
179+ let ar = isDefined(getInteger(this, an))
180+ if (if (ar)
181+ then (an != "")
150182 else false)
151183 then {
152- let ai = ag[2]
153- let al = valueOrElse(getInteger(this, (ai + e)), 0)
154- let am = valueOrElse(getBoolean(this, (ai + j)), true)
155- if ((al > height))
156- then if (am)
184+ let as = aq[2]
185+ let av = valueOrElse(getInteger(this, (as + g)), 0)
186+ let aw = valueOrElse(getBoolean(this, (as + l)), true)
187+ if ((av > height))
188+ then if (aw)
157189 then ""
158- else ao
159- else ao
190+ else ay
191+ else ay
160192 }
161- else ao
193+ else ay
162194 }
163195
164196
165-func ap (ae,af) = if (if (ac(K, ae, af))
197+func az (ao,ap) = if (if (am(H, ao, ap))
166198 then true
167- else ac(L, ae, af))
199+ else am(I, ao, ap))
168200 then true
169- else ac(M, ae, af)
201+ else am(J, ao, ap)
170202
171203
172-func aq (ai) = {
173- let al = valueOrElse(getInteger(this, (toString(ai) + e)), 0)
174- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
175- let ar = height
176- if ((0 > ai))
204+func aA (as) = {
205+ let av = valueOrElse(getInteger(this, (toString(as) + g)), 0)
206+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
207+ let aB = height
208+ if ((0 > as))
177209 then 0
178- else if (!(am))
210+ else if (!(aw))
179211 then 0
180- else if ((al > ar))
212+ else if ((av > aB))
181213 then 1
182214 else 0
183215 }
184216
185217
186-func as () = ((aq(valueOrElse(getInteger(this, K), -1)) + aq(valueOrElse(getInteger(this, L), -1))) + aq(valueOrElse(getInteger(this, M), -1)))
218+func aC () = ((aA(valueOrElse(getInteger(this, H), -1)) + aA(valueOrElse(getInteger(this, I), -1))) + aA(valueOrElse(getInteger(this, J), -1)))
187219
188220
189-func at () = if ((an(v) != ""))
190- then v
191- else if ((an(w) != ""))
192- then w
193- else if ((an(x) != ""))
194- then x
221+func aD () = if ((ax(u) != ""))
222+ then u
223+ else if ((ax(v) != ""))
224+ then v
225+ else if ((ax(w) != ""))
226+ then w
195227 else ""
196228
197229
198-func au (av) = if ((av == "WAVES"))
230+func aE (aF) = if ((aF == "WAVES"))
199231 then unit
200- else fromBase58String(av)
232+ else fromBase58String(aF)
201233
202234
203-func aw (ax) = if ((valueOrElse(getInteger(D, (toString(ax) + r)), 0) > 0))
235+func aG (aH) = if ((valueOrElse(getInteger(Y, (toString(aH) + r)), 0) > 0))
204236 then true
205237 else false
206238
207239
208-func ay (az) = [BooleanEntry(c, false), StringEntry(p, az)]
240+func aI (aJ) = [BooleanEntry(d, false), StringEntry(p, aJ)]
209241
210242
211-func aA (aB,aC) = throw(((((("Insufficient DApp balance to pay " + toString(aB)) + " ") + aC) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport"))
212-
213-
214-@Callable(aD)
215-func init () = if ((aD.caller != this))
243+@Callable(af)
244+func init () = if ((af.caller != this))
216245 then throw("Only the DApp itself can call this function")
217- else if (isDefined(getBoolean(this, c)))
246+ else if (isDefined(getBoolean(this, d)))
218247 then throw("DApp is already active")
219248 else {
220- let aE = 0
221- let aF = 0
222- let aG = true
223- let aH = ""
224-[StringEntry(b, a), BooleanEntry(c, aG), IntegerEntry(d, aE), IntegerEntry(k, aF), IntegerEntry(l, S), IntegerEntry(m, T), StringEntry(v, aH), StringEntry(w, aH), StringEntry(x, aH)]
249+ let aK = 0
250+ let aL = 0
251+ let aM = true
252+ let aN = ""
253+[StringEntry(c, b), BooleanEntry(d, aM), IntegerEntry(f, aK), IntegerEntry(m, aL), IntegerEntry(n, N), IntegerEntry(o, O), StringEntry(u, aN), StringEntry(v, aN), StringEntry(w, aN)]
225254 }
226255
227256
228257
229-@Callable(aD)
230-func initVotingForNewPool (ae,af) = {
231- let aI = $Tuple2(aD.payments[0].amount, aD.payments[0].assetId)
232- let aJ = aI._1
233- let aK = aI._2
234- let aL = $Tuple2(au(ae), au(af))
235- let aM = aL._1
236- let aN = aL._2
237- let aO = at()
238- let aP = as()
239- let aQ = ap(ae, af)
240- let aR = V(aM)
258+@Callable(af)
259+func initVotingForNewPool (ao,ap) = valueOrElse(ad(), {
260+ let aO = $Tuple2(af.payments[0].amount, af.payments[0].assetId)
261+ let aP = aO._1
262+ let aQ = aO._2
263+ let aR = $Tuple2(aE(ao), aE(ap))
241264 let aS = aR._1
242265 let aT = aR._2
243- let aU = aR._3
244- let aV = V(aN)
245- let aW = aV._1
246- let aX = aV._2
247- let aY = aV._3
248- if (!(H))
249- then throw("DApp is inactive at this moment")
250- else if ((aM == aN))
251- then throw("Assets must be different")
252- else if (aQ)
253- then throw("This pool already exists")
254- else if (if (((aP + 1) > S))
255- then true
256- else (aO == ""))
257- then throw(("Too many votings. Maximum quantity: " + toString(S)))
258- else if ((size(aD.payments) != 1))
259- then throw("One attached asset expected")
260- else if ((aK != F))
261- then throw("You must use a SWOP token")
262- else if (if ((ae == ""))
266+ let aU = aD()
267+ let aV = aC()
268+ let aW = az(ao, ap)
269+ let aX = ag(aS)
270+ let aY = aX._1
271+ let aZ = aX._2
272+ let ba = aX._3
273+ let bb = ag(aT)
274+ let bc = bb._1
275+ let bd = bb._2
276+ let be = bb._3
277+ if ((aS == aT))
278+ then throw("Assets must be different")
279+ else if (aW)
280+ then throw("This pool already exists")
281+ else if ((size(af.payments) != 1))
282+ then throw("One attached asset expected")
283+ else if ((aQ != ac))
284+ then throw("You must use a SWOP token")
285+ else if (if ((ao == ""))
286+ then true
287+ else (ap == ""))
288+ then throw("Assets can't be empty")
289+ else if ((aP != M))
290+ then throw("You need to attach 10 SWOP tokens")
291+ else if (!(if (if ((aT == ab))
263292 then true
264- else (af == ""))
265- then throw("Assets can't be empty")
266- else if ((aJ != N))
267- then throw("You need to attach 10 SWOP tokens")
268- else if (!(if (if (if ((aN == E))
269- then true
270- else (aN == unit))
271- then true
272- else (aN == F))
273- then true
274- else (aN == G)))
275- then throw("assetB must be USDN, WAVES or SWOP")
276- else [IntegerEntry((((((ae + "_") + af) + "_") + toString(J)) + t), J), IntegerEntry((toString(J) + e), (height + U)), BooleanEntry((toString(J) + j), true), IntegerEntry(k, (J + 1)), IntegerEntry(d, (aP + 1)), StringEntry((ae + s), aT), StringEntry((af + s), aX), StringEntry(aO, (((((ae + "_") + af) + "_") + toString(J)) + t)), ScriptTransfer(C, aJ, aK)]
277- }
293+ else (aT == unit))
294+ then true
295+ else (aT == ac)))
296+ then throw("assetB must be USDN, WAVES or SWOP")
297+ else if (if (((aV + 1) > N))
298+ then true
299+ else (aU == ""))
300+ then throw(("Too many votings. Maximum quantity: " + toString(N)))
301+ else [IntegerEntry((((((ao + "_") + ap) + "_") + toString(G)) + t), G), IntegerEntry((toString(G) + g), (height + P)), BooleanEntry((toString(G) + l), true), IntegerEntry(m, (G + 1)), IntegerEntry(f, (aV + 1)), StringEntry((ao + s), aZ), StringEntry((ap + s), bd), StringEntry(aU, (((((ao + "_") + ap) + "_") + toString(G)) + t)), ScriptTransfer(aa, aP, aQ)]
302+ })
278303
279304
280305
281-@Callable(aD)
282-func voteForPool (ai,aZ,ba) = {
283- let ar = height
284- let bb = valueOrErrorMessage(getIntegerValue(this, (toString(ai) + e)), "Empty pool height")
285- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
286- let bc = valueOrElse(getInteger(D, (toString(aD.caller) + r)), 0)
287- let bd = if (aZ)
288- then (valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + h)), 0) + ba)
289- else (valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + i)), 0) + ba)
290- if (!(aw(aD.caller)))
306+@Callable(af)
307+func voteForPool (as,bf,bg) = valueOrElse(ad(), {
308+ let aB = height
309+ let bh = valueOrErrorMessage(getIntegerValue(this, (toString(as) + g)), "Empty pool height")
310+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
311+ let bi = valueOrElse(getInteger(Y, (toString(af.caller) + r)), 0)
312+ let bj = if (bf)
313+ then (valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + j)), 0) + bg)
314+ else (valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + k)), 0) + bg)
315+ if (!(aG(af.caller)))
291316 then throw("This address has 0 SWOP in Governance dApp")
292- else if (!(am))
317+ else if (!(aw))
293318 then throw("This voting was canceled")
294- else if ((ar > bb))
319+ else if ((aB > bh))
295320 then throw("This voting was expired")
296- else if ((0 > ba))
321+ else if ((0 > bg))
297322 then throw("The number of votes must be positive")
298- else if ((bd > bc))
299- then throw((((toString(this) + " has ") + toString(bc)) + " SWOP in governance."))
300- else if (aZ)
323+ else if ((bj > bi))
324+ then throw((((toString(this) + " has ") + toString(bi)) + " SWOP in governance."))
325+ else if (bf)
301326 then {
302- let be = valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + i)), 0)
303- let bf = ((valueOrElse(getInteger(this, (toString(ai) + g)), 0) - be) + ba)
304-[IntegerEntry((toString(ai) + g), bf), IntegerEntry((((toString(aD.caller) + "_") + toString(ai)) + i), ba)]
327+ let bk = valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + k)), 0)
328+ let bl = ((valueOrElse(getInteger(this, (toString(as) + i)), 0) - bk) + bg)
329+[IntegerEntry((toString(as) + i), bl), IntegerEntry((((toString(af.caller) + "_") + toString(as)) + k), bg)]
305330 }
306331 else {
307- let be = valueOrElse(getInteger(this, (((toString(aD.caller) + "_") + toString(ai)) + h)), 0)
308- let bf = ((valueOrElse(getInteger(this, (toString(ai) + f)), 0) - be) + ba)
309-[IntegerEntry((toString(ai) + f), bf), IntegerEntry((((toString(aD.caller) + "_") + toString(ai)) + h), ba)]
332+ let bk = valueOrElse(getInteger(this, (((toString(af.caller) + "_") + toString(as)) + j)), 0)
333+ let bl = ((valueOrElse(getInteger(this, (toString(as) + h)), 0) - bk) + bg)
334+[IntegerEntry((toString(as) + h), bl), IntegerEntry((((toString(af.caller) + "_") + toString(as)) + j), bg)]
310335 }
311- }
336+ })
312337
313338
314339
315-@Callable(aD)
316-func cancelVoting (ai,az) = {
317- let am = valueOrElse(getBoolean(this, (toString(ai) + j)), true)
318- if (!(H))
319- then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified")))
320- else if (!(containsElement([y, z, A], aD.callerPublicKey)))
321- then throw("Only admin can call this function")
322- else if (!(am))
323- then throw((("Voting " + toString(ai)) + " has already been stopped"))
324- else [IntegerEntry(d, (I - 1)), BooleanEntry((toString(ai) + j), false), StringEntry((toString(ai) + q), az)]
325- }
340+@Callable(af)
341+func cancelVoting (as,aJ) = valueOrElse(ae(af), {
342+ let aw = valueOrElse(getBoolean(this, (toString(as) + l)), true)
343+ if (!(aw))
344+ then throw((("Voting " + toString(as)) + " has already been stopped"))
345+ else [IntegerEntry(f, (F - 1)), BooleanEntry((toString(as) + l), false), StringEntry((toString(as) + q), aJ)]
346+ })
326347
327348
328349
329-@Callable(aD)
330-func shutdown () = if (!(H))
350+@Callable(af)
351+func shutdown () = valueOrElse(ae(af), if (!(K))
331352 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified")))
332- else if (!(containsElement([y, z, A, B], aD.callerPublicKey)))
333- then throw("Only admin can call this function")
334- else ay("Paused by admin")
353+ else aI("Paused by admin"))
335354
336355
337356
338-@Callable(aD)
339-func activate () = if (H)
357+@Callable(af)
358+func activate () = valueOrElse(ae(af), if (K)
340359 then throw("DApp is already active")
341- else if (!(containsElement([y, z, A, B], aD.callerPublicKey)))
342- then throw("Only admin can call this function")
343- else [BooleanEntry(c, true), DeleteEntry(p)]
360+ else [BooleanEntry(d, true), DeleteEntry(p)])
344361
345362
346-@Verifier(bg)
347-func bh () = {
348- let bi = if (sigVerify(bg.bodyBytes, bg.proofs[0], y))
363+@Verifier(bm)
364+func bn () = {
365+ let bo = if (sigVerify(bm.bodyBytes, bm.proofs[0], V))
349366 then 1
350367 else 0
351- let bj = if (sigVerify(bg.bodyBytes, bg.proofs[1], z))
368+ let bp = if (sigVerify(bm.bodyBytes, bm.proofs[1], W))
352369 then 1
353370 else 0
354- let bk = if (sigVerify(bg.bodyBytes, bg.proofs[2], A))
371+ let bq = if (sigVerify(bm.bodyBytes, bm.proofs[2], X))
355372 then 1
356373 else 0
357- (((bi + bj) + bk) >= 2)
374+ (((bo + bp) + bq) >= 2)
358375 }
359376

github/deemru/w8io/026f985 
109.82 ms