tx · 34xU14oDousLk3KWjTpWm95Gya8ukqnkwP1BDTkifagw

3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6:  -0.01400000 Waves

2021.04.29 18:22 [1503917] smart account 3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "34xU14oDousLk3KWjTpWm95Gya8ukqnkwP1BDTkifagw", "fee": 1400000, "feeAssetId": null, "timestamp": 1619709746321, "version": 2, "chainId": 84, "sender": "3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6", "senderPublicKey": "75SuvmjmHX6J7smVGHvWY6acr5mqyRQCYpFxeFQh8Cy3", "proofs": [ "2RCP7j9mcnBUPJLcGMuAfT3M626VXiUCZSnD4kJQmWTvacnUs34Puhpebmq7j7ZnKefWQS9WZUDAJXLRDFjWLBW3" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAAvAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAAA1udW1iZXJfdm90aW5nAAAAAA9rZXlIZWlnaHRPZlBvb2wCAAAAB19oZWlnaHQAAAAABWtleU5vAgAAAANfbm8AAAAABmtleVllcwIAAAAEX3llcwAAAAARa2V5U3RhdHVzT2ZWb3RpbmcCAAAAB19zdGF0dXMAAAAAEWtleUFtb3VudE9mVm90aW5nAgAAAA1hbW91bnRfdm90aW5nAAAAABRrZXlNYXhBbW91bnRPZlZvdGluZwIAAAARbWF4X2Ftb3VudF92b3RpbmcAAAAAEWtleU1heERheU9mVm90aW5nAgAAAA5tYXhfZGF5X3ZvdGluZwAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAABpjb21taXNza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V5MgkABEwAAAACBQAAAAxhZG1pblB1YktleTMJAARMAAAAAgUAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3AFAAAAA25pbAgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkBAAAAB3N1c3BlbmQAAAABAgAAAA9QYXVzZWQgYnkgYWRtaW4AAAABaQEAAAAIYWN0aXZhdGUAAAAAAwUAAAAIaXNBY3RpdmUJAAACAAAAAQIAAAAWREFwcCBpcyBhbHJlYWR5IGFjdGl2ZQMJAQAAAAEhAAAAAQkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkxCQAETAAAAAIFAAAADGFkbWluUHViS2V5MgkABEwAAAACBQAAAAxhZG1pblB1YktleTMJAARMAAAAAgUAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3AFAAAAA25pbAgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAAJa2V5QWN0aXZlBgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAhrZXlDYXVzZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXl9kgpp", "height": 1503917, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BEFocRi1HB8jxviVaruYNekx9wE9gfaehrDFw43Jgurx Next: 6gf8ePkP8kxAfSL89Mio4pTB45USdGZeDW3mmtBeNePW Diff:
OldNewDifferences
7575
7676 let maxDayOfVoting = 5
7777
78-let fiveDays = 15
78+let fiveDays = (1440 * maxDayOfVoting)
7979
8080 func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES"))
8181 then unit
131131 }
132132
133133
134-func getActiveVotingPoolAmount (voting) = ((((getActivePool(voting) + getActivePool((voting - 1))) + getActivePool((voting - 2))) + getActivePool((voting - 3))) + getActivePool((voting - 4)))
134+func getActiveVotingPoolAmount (voting) = ((((getActivePool((voting - 1)) + getActivePool((voting - 2))) + getActivePool((voting - 3))) + getActivePool((voting - 4))) + getActivePool((voting - 5)))
135135
136136
137137 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
156156
157157 @Callable(i)
158158 func initVotingForNewPool (assetA,assetB) = {
159- let $t048794954 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
160- let pmtAmount = $t048794954._1
161- let pmtAssetId = $t048794954._2
162- let $t049595058 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
163- let poolAssetIdA = $t049595058._1
164- let poolAssetIdB = $t049595058._2
159+ let $t048844959 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
160+ let pmtAmount = $t048844959._1
161+ let pmtAssetId = $t048844959._2
162+ let $t049645063 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
163+ let poolAssetIdA = $t049645063._1
164+ let poolAssetIdB = $t049645063._2
165165 let newNumberOfVoting = getActiveVotingPoolAmount(amountOfVoting)
166166 let isPoolExists = isLastFivePoolExists(amountOfVoting, assetA, assetB)
167- let $t052095287 = getAssetInfo(poolAssetIdA)
168- let pmtStrAssetIdA = $t052095287._1
169- let pmtAssetNameA = $t052095287._2
170- let pmtDecimalsA = $t052095287._3
171- let $t052925370 = getAssetInfo(poolAssetIdB)
172- let pmtStrAssetIdB = $t052925370._1
173- let pmtAssetNameB = $t052925370._2
174- let pmtDecimalsB = $t052925370._3
167+ let $t052145292 = getAssetInfo(poolAssetIdA)
168+ let pmtStrAssetIdA = $t052145292._1
169+ let pmtAssetNameA = $t052145292._2
170+ let pmtDecimalsA = $t052145292._3
171+ let $t052975375 = getAssetInfo(poolAssetIdB)
172+ let pmtStrAssetIdB = $t052975375._1
173+ let pmtAssetNameB = $t052975375._2
174+ let pmtDecimalsB = $t052975375._3
175175 if (!(isActive))
176176 then throw("DApp is inactive at this moment")
177177 else if ((poolAssetIdA == poolAssetIdB))
188188 then throw("Assets can't be empty")
189189 else if ((pmtAmount != comissionForInitalizationOfVoting))
190190 then throw("You need to attach 10 SWOP tokens")
191- else if ((newNumberOfVoting >= maxAmountOfVoting))
191+ else if ((newNumberOfVoting > maxAmountOfVoting))
192192 then throw(("Too many votes. Maximum quantity -" + toString(maxAmountOfVoting)))
193193 else if (!(if (if ((poolAssetIdB == USDN))
194194 then true
211211 then throw("This address has 0 SWOP in Governance dApp")
212212 else if ((currentHeight > poolInitHeight))
213213 then [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1))]
214- else if ((1 > voteAmt))
214+ else if ((0 > voteAmt))
215215 then throw("The number of votes must be positive")
216216 else if ((totalVoteUser > userSWOPinGovernance))
217217 then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
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 adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
4343
4444 let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
4545
4646 let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
4747
4848 let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
4949
5050 let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
5151
5252 let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
5353
5454 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
5555
5656 let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
5757
5858 let isActive = getBooleanValue(this, keyActive)
5959
6060 let numberOfVoting = getIntegerValue(this, keyNumberOfVoting)
6161
6262 let amountOfVoting = getIntegerValue(this, keyAmountOfVoting)
6363
6464 let comissionForInitalizationOfVoting = 1000000000
6565
6666 let scaleValue3 = 1000
6767
6868 let scaleValue8 = 100000000
6969
7070 let slippageToleranceDelimiter = 1000
7171
7272 let scaleValue8Digits = 8
7373
7474 let maxAmountOfVoting = 5
7575
7676 let maxDayOfVoting = 5
7777
78-let fiveDays = 15
78+let fiveDays = (1440 * maxDayOfVoting)
7979
8080 func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES"))
8181 then unit
8282 else fromBase58String(assetStr)
8383
8484
8585 func getAssetInfo (assetId) = match assetId {
8686 case id: ByteVector =>
8787 if (isDefined(assetInfo(id)))
8888 then {
8989 let stringId = toBase58String(id)
9090 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
9191 $Tuple3(stringId, info.name, info.decimals)
9292 }
9393 else throw("Asset is not define")
9494 case waves: Unit =>
9595 $Tuple3("WAVES", "WAVES", 8)
9696 case _ =>
9797 throw("Match error")
9898 }
9999
100100
101101 func isActivePoolExists (pools) = isDefined(getInteger(this, pools))
102102
103103
104104 func isLastFivePoolExists (amountOfVoting,assetA,assetB) = if (if (if (if (isActivePoolExists((((((assetA + "_") + assetB) + "_") + toString((amountOfVoting - 1))) + votingId)))
105105 then true
106106 else isActivePoolExists((((((assetA + "_") + assetB) + "_") + toString((amountOfVoting - 2))) + votingId)))
107107 then true
108108 else isActivePoolExists((((((assetA + "_") + assetB) + "_") + toString((amountOfVoting - 3))) + votingId)))
109109 then true
110110 else isActivePoolExists((((((assetA + "_") + assetB) + "_") + toString((amountOfVoting - 4))) + votingId)))
111111 then true
112112 else isActivePoolExists((((((assetA + "_") + assetB) + "_") + toString((amountOfVoting - 5))) + votingId))
113113
114114
115115 func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + kUserTotalSWOP)), 0) > 0))
116116 then true
117117 else false
118118
119119
120120 func getActivePool (voting) = {
121121 let heightOfVoting = valueOrElse(getInteger(this, (toString(voting) + keyHeightOfPool)), 0)
122122 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
123123 let currentHeight = height
124124 if ((0 > voting))
125125 then 0
126126 else if (!(statusOfVoting))
127127 then 0
128128 else if ((heightOfVoting > currentHeight))
129129 then 1
130130 else 0
131131 }
132132
133133
134-func getActiveVotingPoolAmount (voting) = ((((getActivePool(voting) + getActivePool((voting - 1))) + getActivePool((voting - 2))) + getActivePool((voting - 3))) + getActivePool((voting - 4)))
134+func getActiveVotingPoolAmount (voting) = ((((getActivePool((voting - 1)) + getActivePool((voting - 2))) + getActivePool((voting - 3))) + getActivePool((voting - 4))) + getActivePool((voting - 5)))
135135
136136
137137 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
138138
139139
140140 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"))
141141
142142
143143 @Callable(i)
144144 func init () = if ((i.caller != this))
145145 then throw("Only the DApp itself can call this function")
146146 else if (isDefined(getBoolean(this, keyActive)))
147147 then throw("DApp is already active")
148148 else {
149149 let initNumberOfVoting = 0
150150 let initAmountOfVoting = 0
151151 let initKeyActive = true
152152 [StringEntry(keyVersion, version), BooleanEntry(keyActive, initKeyActive), IntegerEntry(keyNumberOfVoting, initNumberOfVoting), IntegerEntry(keyAmountOfVoting, initAmountOfVoting), IntegerEntry(keyMaxAmountOfVoting, maxAmountOfVoting), IntegerEntry(keyMaxDayOfVoting, maxDayOfVoting)]
153153 }
154154
155155
156156
157157 @Callable(i)
158158 func initVotingForNewPool (assetA,assetB) = {
159- let $t048794954 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
160- let pmtAmount = $t048794954._1
161- let pmtAssetId = $t048794954._2
162- let $t049595058 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
163- let poolAssetIdA = $t049595058._1
164- let poolAssetIdB = $t049595058._2
159+ let $t048844959 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
160+ let pmtAmount = $t048844959._1
161+ let pmtAssetId = $t048844959._2
162+ let $t049645063 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
163+ let poolAssetIdA = $t049645063._1
164+ let poolAssetIdB = $t049645063._2
165165 let newNumberOfVoting = getActiveVotingPoolAmount(amountOfVoting)
166166 let isPoolExists = isLastFivePoolExists(amountOfVoting, assetA, assetB)
167- let $t052095287 = getAssetInfo(poolAssetIdA)
168- let pmtStrAssetIdA = $t052095287._1
169- let pmtAssetNameA = $t052095287._2
170- let pmtDecimalsA = $t052095287._3
171- let $t052925370 = getAssetInfo(poolAssetIdB)
172- let pmtStrAssetIdB = $t052925370._1
173- let pmtAssetNameB = $t052925370._2
174- let pmtDecimalsB = $t052925370._3
167+ let $t052145292 = getAssetInfo(poolAssetIdA)
168+ let pmtStrAssetIdA = $t052145292._1
169+ let pmtAssetNameA = $t052145292._2
170+ let pmtDecimalsA = $t052145292._3
171+ let $t052975375 = getAssetInfo(poolAssetIdB)
172+ let pmtStrAssetIdB = $t052975375._1
173+ let pmtAssetNameB = $t052975375._2
174+ let pmtDecimalsB = $t052975375._3
175175 if (!(isActive))
176176 then throw("DApp is inactive at this moment")
177177 else if ((poolAssetIdA == poolAssetIdB))
178178 then throw("Assets must be different")
179179 else if ((size(i.payments) != 1))
180180 then throw("One attached assets expected")
181181 else if (isPoolExists)
182182 then throw("This pool already exists")
183183 else if ((pmtAssetId != SWOP))
184184 then throw("You must use a SWOP token")
185185 else if (if ((assetA == ""))
186186 then true
187187 else (assetB == ""))
188188 then throw("Assets can't be empty")
189189 else if ((pmtAmount != comissionForInitalizationOfVoting))
190190 then throw("You need to attach 10 SWOP tokens")
191- else if ((newNumberOfVoting >= maxAmountOfVoting))
191+ else if ((newNumberOfVoting > maxAmountOfVoting))
192192 then throw(("Too many votes. Maximum quantity -" + toString(maxAmountOfVoting)))
193193 else if (!(if (if ((poolAssetIdB == USDN))
194194 then true
195195 else (poolAssetIdA == unit))
196196 then true
197197 else (poolAssetIdA == SWOP)))
198198 then throw("One of the assets must be USDN, WAVES, SWOP")
199199 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), ScriptTransfer(walletAddress, pmtAmount, pmtAssetId)]
200200 }
201201
202202
203203
204204 @Callable(i)
205205 func voteForPool (voting,yesOrNo,voteAmt) = {
206206 let currentHeight = height
207207 let poolInitHeight = valueOrErrorMessage(getIntegerValue(this, (toString(voting) + keyHeightOfPool)), "Empty pool height")
208208 let userSWOPinGovernance = valueOrElse(getInteger(govAddr, (toString(i.caller) + kUserTotalSWOP)), 0)
209209 let totalVoteUser = ((valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYes)), 0) + valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNo)), 0)) + voteAmt)
210210 if (!(isCallerInGovernance(i.caller)))
211211 then throw("This address has 0 SWOP in Governance dApp")
212212 else if ((currentHeight > poolInitHeight))
213213 then [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1))]
214- else if ((1 > voteAmt))
214+ else if ((0 > voteAmt))
215215 then throw("The number of votes must be positive")
216216 else if ((totalVoteUser > userSWOPinGovernance))
217217 then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
218218 else if (yesOrNo)
219219 then {
220220 let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYes)), 0)
221221 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
222222 [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYes), voteAmt)]
223223 }
224224 else {
225225 let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNo)), 0)
226226 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
227227 [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNo), voteAmt)]
228228 }
229229 }
230230
231231
232232
233233 @Callable(i)
234234 func cancellationVoting (voting,cause) = if (!(isActive))
235235 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
236236 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
237237 then throw("Only admin can call this function")
238238 else [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1)), BooleanEntry((toString(voting) + keyStatusOfVoting), false), StringEntry((toString(voting) + keyCancelCause), cause)]
239239
240240
241241
242242 @Callable(i)
243243 func shutdown () = if (!(isActive))
244244 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
245245 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
246246 then throw("Only admin can call this function")
247247 else suspend("Paused by admin")
248248
249249
250250
251251 @Callable(i)
252252 func activate () = if (isActive)
253253 then throw("DApp is already active")
254254 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
255255 then throw("Only admin can call this function")
256256 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
257257
258258
259259 @Verifier(tx)
260260 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
261261

github/deemru/w8io/026f985 
50.89 ms