tx · 8YruXzvMJUMaACb9ENtr36pAMdhGxPZC4uerGVt8rNDx

3NDCQyiA2gDuhSyA4J1ik69zNhLGfG6xr5g:  -0.01400000 Waves

2021.05.12 14:33 [1522402] smart account 3NDCQyiA2gDuhSyA4J1ik69zNhLGfG6xr5g > SELF 0.00000000 Waves

{ "type": 13, "id": "8YruXzvMJUMaACb9ENtr36pAMdhGxPZC4uerGVt8rNDx", "fee": 1400000, "feeAssetId": null, "timestamp": 1620819201266, "version": 2, "chainId": 84, "sender": "3NDCQyiA2gDuhSyA4J1ik69zNhLGfG6xr5g", "senderPublicKey": "9voGZWtFHWiv3fytePgppGYLLiB3i6aFERAuU7kfps8c", "proofs": [ "VdkwkM4w3j3y3f8R4N5ibpEZhd94xzgB3kwzPvPh9hjPuURMpK64jT16cBLUChwDiyaf1T9iHUSBamWLUjeSrQo" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAA7AAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAAA1udW1iZXJfdm90aW5nAAAAAA9rZXlIZWlnaHRPZlBvb2wCAAAAB19oZWlnaHQAAAAABWtleU5vAgAAAANfbm8AAAAABmtleVllcwIAAAAEX3llcwAAAAARa2V5U3RhdHVzT2ZWb3RpbmcCAAAAB19zdGF0dXMAAAAAEWtleUFtb3VudE9mVm90aW5nAgAAAA1hbW91bnRfdm90aW5nAAAAABRrZXlNYXhBbW91bnRPZlZvdGluZwIAAAARbWF4X2Ftb3VudF92b3RpbmcAAAAAEWtleU1heERheU9mVm90aW5nAgAAAA5tYXhfZGF5X3ZvdGluZwAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAABpjb21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ABp0aGUgY2F1c2Ugd2Fzbid0IHNwZWNpZmllZAMJAQAAAAEhAAAAAQkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkxCQAETAAAAAIFAAAADGFkbWluUHViS2V5MgkABEwAAAACBQAAAAxhZG1pblB1YktleTMJAARMAAAAAgUAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3AFAAAAA25pbAgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkBAAAAB3N1c3BlbmQAAAABAgAAAA9QYXVzZWQgYnkgYWRtaW4AAAABaQEAAAAIYWN0aXZhdGUAAAAAAwUAAAAIaXNBY3RpdmUJAAACAAAAAQIAAAAWREFwcCBpcyBhbHJlYWR5IGFjdGl2ZQMJAQAAAAEhAAAAAQkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkxCQAETAAAAAIFAAAADGFkbWluUHViS2V5MgkABEwAAAACBQAAAAxhZG1pblB1YktleTMJAARMAAAAAgUAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3AFAAAAA25pbAgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAAJa2V5QWN0aXZlBgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAhrZXlDYXVzZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAYhelc2", "height": 1522402, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8YqVarAnxhhKzKQFHv9GYTouZdYASSwMUPKsLyBJ3zSU Next: 5BkQrxf5GK59pHfoQuDfYdrrVc86wB6ozCBYdTQWMV5M Diff:
OldNewDifferences
215215
216216
217217 @Callable(i)
218-func init () = if ((i.caller != this))
219- then throw("Only the DApp itself can call this function")
220- else if (isDefined(getBoolean(this, keyActive)))
221- then throw("DApp is already active")
222- else {
223- let initNumberOfVoting = 0
224- let initAmountOfVoting = 0
225- let initKeyActive = true
226- let activeInit = ""
218+func init () = if (isDefined(getBoolean(this, keyActive)))
219+ then throw("DApp is already active")
220+ else {
221+ let initNumberOfVoting = 0
222+ let initAmountOfVoting = 0
223+ let initKeyActive = true
224+ let activeInit = ""
227225 [StringEntry(keyVersion, version), BooleanEntry(keyActive, initKeyActive), IntegerEntry(keyNumberOfVoting, initNumberOfVoting), IntegerEntry(keyAmountOfVoting, initAmountOfVoting), IntegerEntry(keyMaxAmountOfVoting, maxAmountOfVoting), IntegerEntry(keyMaxDayOfVoting, maxDayOfVoting), StringEntry(activeVoteFirst, activeInit), StringEntry(activeVoteSecond, activeInit), StringEntry(activeVoteThird, activeInit), StringEntry(activeVoteFourth, activeInit), StringEntry(activeVoteFifth, activeInit)]
228- }
226+ }
229227
230228
231229
232230 @Callable(i)
233231 func initVotingForNewPool (assetA,assetB) = {
234- let $t077287827 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
235- let poolAssetIdA = $t077287827._1
236- let poolAssetIdB = $t077287827._2
232+ let $t077397838 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
233+ let poolAssetIdA = $t077397838._1
234+ let poolAssetIdB = $t077397838._2
237235 let unactiveVote = getUnactiveVotingPool()
238236 let newNumberOfVoting = getActiveVotingPoolAmount()
239237 let isPoolExists = isLastFiveActivePoolExists(assetA, assetB)
240- let $t080018079 = getAssetInfo(poolAssetIdA)
241- let pmtStrAssetIdA = $t080018079._1
242- let pmtAssetNameA = $t080018079._2
243- let pmtDecimalsA = $t080018079._3
244- let $t080848162 = getAssetInfo(poolAssetIdB)
245- let pmtStrAssetIdB = $t080848162._1
246- let pmtAssetNameB = $t080848162._2
247- let pmtDecimalsB = $t080848162._3
238+ let $t080128090 = getAssetInfo(poolAssetIdA)
239+ let pmtStrAssetIdA = $t080128090._1
240+ let pmtAssetNameA = $t080128090._2
241+ let pmtDecimalsA = $t080128090._3
242+ let $t080958173 = getAssetInfo(poolAssetIdB)
243+ let pmtStrAssetIdB = $t080958173._1
244+ let pmtAssetNameB = $t080958173._2
245+ let pmtDecimalsB = $t080958173._3
248246 if (!(isActive))
249247 then throw("DApp is inactive at this moment")
250248 else if ((poolAssetIdA == poolAssetIdB))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "1.0.0"
55
66 let keyVersion = "version"
77
88 let keyActive = "active"
99
1010 let keyNumberOfVoting = "number_voting"
1111
1212 let keyHeightOfPool = "_height"
1313
1414 let keyNo = "_no"
1515
1616 let keyYes = "_yes"
1717
1818 let keyStatusOfVoting = "_status"
1919
2020 let keyAmountOfVoting = "amount_voting"
2121
2222 let keyMaxAmountOfVoting = "max_amount_voting"
2323
2424 let keyMaxDayOfVoting = "max_day_voting"
2525
2626 let keyCommission = "commission"
2727
2828 let keyCommissionScaleDelimiter = "commission_scale_delimiter"
2929
3030 let keyCause = "shutdown_cause"
3131
3232 let keyCancelCause = "_cancel_cause"
3333
3434 let kUserTotalSWOP = "_SWOP_amount"
3535
3636 let kName = "_name"
3737
3838 let votingId = "_votingId"
3939
4040 let periodOfVoting = "period_voting"
4141
4242 let activeVoteFirst = "active_vote_first"
4343
4444 let activeVoteSecond = "active_vote_second"
4545
4646 let activeVoteThird = "active_vote_third"
4747
4848 let activeVoteFourth = "active_vote_fourth"
4949
5050 let activeVoteFifth = "active_vote_fifth"
5151
5252 let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
5353
5454 let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
5555
5656 let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
5757
5858 let adminPubKeyStartStop = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
5959
6060 let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6161
6262 let govAddr = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS')
6363
6464 let USDN = base58'3DBbie1kWkspPEX1KTD6XDVGjofdKVBUURNfoS7hUpY9'
6565
6666 let SWOP = base58'3DBbie1kWkspPEX1KTD6XDVGjofdKVBUURNfoS7hUpY9'
6767
6868 let isActive = getBooleanValue(this, keyActive)
6969
7070 let numberOfVoting = getIntegerValue(this, keyNumberOfVoting)
7171
7272 let amountOfVoting = getIntegerValue(this, keyAmountOfVoting)
7373
7474 let firstActiveVote = valueOrElse(getString(this, activeVoteFirst), "")
7575
7676 let secondActiveVote = valueOrElse(getString(this, activeVoteSecond), "")
7777
7878 let thirdActiveVote = valueOrElse(getString(this, activeVoteThird), "")
7979
8080 let fourthActiveVote = valueOrElse(getString(this, activeVoteFourth), "")
8181
8282 let fifthActiveVote = valueOrElse(getString(this, activeVoteFifth), "")
8383
8484 let comissionForInitalizationOfVoting = 1000000000
8585
8686 let scaleValue3 = 1000
8787
8888 let scaleValue8 = 100000000
8989
9090 let slippageToleranceDelimiter = 1000
9191
9292 let scaleValue8Digits = 8
9393
9494 let maxAmountOfVoting = 5
9595
9696 let maxDayOfVoting = 5
9797
9898 let fiveDays = (1440 * maxDayOfVoting)
9999
100100 func getAssetInfo (assetId) = match assetId {
101101 case id: ByteVector =>
102102 if (isDefined(assetInfo(id)))
103103 then {
104104 let stringId = toBase58String(id)
105105 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
106106 $Tuple3(stringId, info.name, info.decimals)
107107 }
108108 else throw("Asset is not define")
109109 case waves: Unit =>
110110 $Tuple3("WAVES", "WAVES", 8)
111111 case _ =>
112112 throw("Match error")
113113 }
114114
115115
116116 func isActivePoolExists (pools,assetA,assetB) = {
117117 let poolsData = split(pools, "_")
118118 let isPoolDefine = isDefined(getInteger(this, pools))
119119 if (if (isPoolDefine)
120120 then (pools != "")
121121 else false)
122122 then {
123123 let voting = poolsData[2]
124124 let newPools = (((((assetA + "_") + assetB) + "_") + voting) + votingId)
125125 let isNewPoolDefine = isDefined(getInteger(this, newPools))
126126 let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0)
127127 let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true)
128128 if (isNewPoolDefine)
129129 then if ((height > heightOfVoting))
130130 then if (statusOfVoting)
131131 then true
132132 else false
133133 else false
134134 else false
135135 }
136136 else false
137137 }
138138
139139
140140 func isUnactivePoolExists (pools) = {
141141 let poolsData = split(pools, "_")
142142 let isPoolDefine = isDefined(getInteger(this, pools))
143143 if (if (isPoolDefine)
144144 then (pools != "")
145145 else false)
146146 then {
147147 let voting = poolsData[2]
148148 let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0)
149149 let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true)
150150 if ((height > heightOfVoting))
151151 then if (statusOfVoting)
152152 then ""
153153 else pools
154154 else pools
155155 }
156156 else ""
157157 }
158158
159159
160160 func isLastFiveActivePoolExists (assetA,assetB) = if (if (if (if (isActivePoolExists(firstActiveVote, assetA, assetB))
161161 then true
162162 else isActivePoolExists(secondActiveVote, assetA, assetB))
163163 then true
164164 else isActivePoolExists(thirdActiveVote, assetA, assetB))
165165 then true
166166 else isActivePoolExists(fourthActiveVote, assetA, assetB))
167167 then true
168168 else isActivePoolExists(fifthActiveVote, assetA, assetB)
169169
170170
171171 func getActivePool (voting) = {
172172 let heightOfVoting = valueOrElse(getInteger(this, (toString(voting) + keyHeightOfPool)), 0)
173173 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
174174 let currentHeight = height
175175 if ((0 > voting))
176176 then 0
177177 else if (!(statusOfVoting))
178178 then 0
179179 else if ((heightOfVoting > currentHeight))
180180 then 1
181181 else 0
182182 }
183183
184184
185185 func getActiveVotingPoolAmount () = ((((getActivePool(valueOrElse(getInteger(this, firstActiveVote), -1)) + getActivePool(valueOrElse(getInteger(this, secondActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, thirdActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, fourthActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, fifthActiveVote), -1)))
186186
187187
188188 func getUnactiveVotingPool () = if ((isUnactivePoolExists(firstActiveVote) != ""))
189189 then isUnactivePoolExists(firstActiveVote)
190190 else if ((isUnactivePoolExists(secondActiveVote) != ""))
191191 then isUnactivePoolExists(secondActiveVote)
192192 else if ((isUnactivePoolExists(thirdActiveVote) != ""))
193193 then isUnactivePoolExists(thirdActiveVote)
194194 else if ((isUnactivePoolExists(fourthActiveVote) != ""))
195195 then isUnactivePoolExists(fourthActiveVote)
196196 else if ((isUnactivePoolExists(fifthActiveVote) != ""))
197197 then isUnactivePoolExists(fifthActiveVote)
198198 else ""
199199
200200
201201 func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES"))
202202 then unit
203203 else fromBase58String(assetStr)
204204
205205
206206 func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + kUserTotalSWOP)), 0) > 0))
207207 then true
208208 else false
209209
210210
211211 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
212212
213213
214214 func throwInsufficientAvailableBalance (amount,assetName) = throw(((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport"))
215215
216216
217217 @Callable(i)
218-func init () = if ((i.caller != this))
219- then throw("Only the DApp itself can call this function")
220- else if (isDefined(getBoolean(this, keyActive)))
221- then throw("DApp is already active")
222- else {
223- let initNumberOfVoting = 0
224- let initAmountOfVoting = 0
225- let initKeyActive = true
226- let activeInit = ""
218+func init () = if (isDefined(getBoolean(this, keyActive)))
219+ then throw("DApp is already active")
220+ else {
221+ let initNumberOfVoting = 0
222+ let initAmountOfVoting = 0
223+ let initKeyActive = true
224+ let activeInit = ""
227225 [StringEntry(keyVersion, version), BooleanEntry(keyActive, initKeyActive), IntegerEntry(keyNumberOfVoting, initNumberOfVoting), IntegerEntry(keyAmountOfVoting, initAmountOfVoting), IntegerEntry(keyMaxAmountOfVoting, maxAmountOfVoting), IntegerEntry(keyMaxDayOfVoting, maxDayOfVoting), StringEntry(activeVoteFirst, activeInit), StringEntry(activeVoteSecond, activeInit), StringEntry(activeVoteThird, activeInit), StringEntry(activeVoteFourth, activeInit), StringEntry(activeVoteFifth, activeInit)]
228- }
226+ }
229227
230228
231229
232230 @Callable(i)
233231 func initVotingForNewPool (assetA,assetB) = {
234- let $t077287827 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
235- let poolAssetIdA = $t077287827._1
236- let poolAssetIdB = $t077287827._2
232+ let $t077397838 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
233+ let poolAssetIdA = $t077397838._1
234+ let poolAssetIdB = $t077397838._2
237235 let unactiveVote = getUnactiveVotingPool()
238236 let newNumberOfVoting = getActiveVotingPoolAmount()
239237 let isPoolExists = isLastFiveActivePoolExists(assetA, assetB)
240- let $t080018079 = getAssetInfo(poolAssetIdA)
241- let pmtStrAssetIdA = $t080018079._1
242- let pmtAssetNameA = $t080018079._2
243- let pmtDecimalsA = $t080018079._3
244- let $t080848162 = getAssetInfo(poolAssetIdB)
245- let pmtStrAssetIdB = $t080848162._1
246- let pmtAssetNameB = $t080848162._2
247- let pmtDecimalsB = $t080848162._3
238+ let $t080128090 = getAssetInfo(poolAssetIdA)
239+ let pmtStrAssetIdA = $t080128090._1
240+ let pmtAssetNameA = $t080128090._2
241+ let pmtDecimalsA = $t080128090._3
242+ let $t080958173 = getAssetInfo(poolAssetIdB)
243+ let pmtStrAssetIdB = $t080958173._1
244+ let pmtAssetNameB = $t080958173._2
245+ let pmtDecimalsB = $t080958173._3
248246 if (!(isActive))
249247 then throw("DApp is inactive at this moment")
250248 else if ((poolAssetIdA == poolAssetIdB))
251249 then throw("Assets must be different")
252250 else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting))
253251 then true
254252 else (unactiveVote == ""))
255253 then throw(("Too many votes. Maximum quantity -" + toString(maxAmountOfVoting)))
256254 else if ((size(i.payments) != 1))
257255 then throw("One attached assets expected")
258256 else if (isPoolExists)
259257 then throw("This pool already exists")
260258 else if (if ((assetA == ""))
261259 then true
262260 else (assetB == ""))
263261 then throw("Assets can't be empty")
264262 else if (!(if (if ((poolAssetIdB == USDN))
265263 then true
266264 else (poolAssetIdA == unit))
267265 then true
268266 else (poolAssetIdA == SWOP)))
269267 then throw("One of the assets must be USDN, WAVES, SWOP")
270268 else [IntegerEntry((((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + fiveDays)), BooleanEntry((toString(amountOfVoting) + keyStatusOfVoting), true), IntegerEntry(keyAmountOfVoting, (amountOfVoting + 1)), IntegerEntry(keyNumberOfVoting, (newNumberOfVoting + 1)), StringEntry((assetA + kName), pmtAssetNameA), StringEntry((assetB + kName), pmtAssetNameB), StringEntry(unactiveVote, (((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId))]
271269 }
272270
273271
274272
275273 @Callable(i)
276274 func voteForPool (voting,yesOrNo,voteAmt) = {
277275 let currentHeight = height
278276 let poolInitHeight = valueOrErrorMessage(getIntegerValue(this, (toString(voting) + keyHeightOfPool)), "Empty pool height")
279277 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
280278 let userSWOPinGovernance = valueOrElse(getInteger(govAddr, (toString(i.caller) + kUserTotalSWOP)), 0)
281279 let totalVoteUser = ((valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYes)), 0) + valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNo)), 0)) + voteAmt)
282280 if (!(isCallerInGovernance(i.caller)))
283281 then throw("This address has 0 SWOP in Governance dApp")
284282 else if (!(statusOfVoting))
285283 then throw("This voting was canceled")
286284 else if ((currentHeight > poolInitHeight))
287285 then throw("This voting was expired")
288286 else if ((0 > voteAmt))
289287 then throw("The number of votes must be positive")
290288 else if ((totalVoteUser > userSWOPinGovernance))
291289 then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
292290 else if (yesOrNo)
293291 then {
294292 let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYes)), 0)
295293 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
296294 [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYes), voteAmt)]
297295 }
298296 else {
299297 let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNo)), 0)
300298 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
301299 [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNo), voteAmt)]
302300 }
303301 }
304302
305303
306304
307305 @Callable(i)
308306 func cancellationVoting (voting,cause) = {
309307 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
310308 if (!(isActive))
311309 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
312310 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
313311 then throw("Only admin can call this function")
314312 else if (!(statusOfVoting))
315313 then throw((("Voting " + toString(voting)) + " has already been stopped"))
316314 else [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1)), BooleanEntry((toString(voting) + keyStatusOfVoting), false), StringEntry((toString(voting) + keyCancelCause), cause)]
317315 }
318316
319317
320318
321319 @Callable(i)
322320 func shutdown () = if (!(isActive))
323321 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
324322 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
325323 then throw("Only admin can call this function")
326324 else suspend("Paused by admin")
327325
328326
329327
330328 @Callable(i)
331329 func activate () = if (isActive)
332330 then throw("DApp is already active")
333331 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
334332 then throw("Only admin can call this function")
335333 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
336334
337335
338336 @Verifier(tx)
339337 func verify () = true
340338

github/deemru/w8io/169f3d6 
44.28 ms