tx · 8QSHrJEWjMmHpNXPswbMgftmoNmr5ToNSy2rHxPcwBk7

3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6:  -0.01400000 Waves

2021.05.11 14:20 [1520947] smart account 3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "8QSHrJEWjMmHpNXPswbMgftmoNmr5ToNSy2rHxPcwBk7", "fee": 1400000, "feeAssetId": null, "timestamp": 1620732021622, "version": 2, "chainId": 84, "sender": "3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6", "senderPublicKey": "75SuvmjmHX6J7smVGHvWY6acr5mqyRQCYpFxeFQh8Cy3", "proofs": [ "4ave2k9v58K29Z1DdLM8RJLzXTCNHKcwkivdELeejPqKgbkZFM3roHDPWLUVkFCJcjqoJkTkj36AyMtNVi8Hxgyi" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAAvAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAAA1udW1iZXJfdm90aW5nAAAAAA9rZXlIZWlnaHRPZlBvb2wCAAAAB19oZWlnaHQAAAAABWtleU5vAgAAAANfbm8AAAAABmtleVllcwIAAAAEX3llcwAAAAARa2V5U3RhdHVzT2ZWb3RpbmcCAAAAB19zdGF0dXMAAAAAEWtleUFtb3VudE9mVm90aW5nAgAAAA1hbW91bnRfdm90aW5nAAAAABRrZXlNYXhBbW91bnRPZlZvdGluZwIAAAARbWF4X2Ftb3VudF92b3RpbmcAAAAAEWtleU1heERheU9mVm90aW5nAgAAAA5tYXhfZGF5X3ZvdGluZwAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAAB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xhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkyCQAETAAAAAIFAAAADGFkbWluUHViS2V5MwkABEwAAAACBQAAABRhZG1pblB1YktleVN0YXJ0U3RvcAUAAAADbmlsCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAAhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQEAAAAHc3VzcGVuZAAAAAECAAAAD1BhdXNlZCBieSBhZG1pbgAAAAFpAQAAAAhhY3RpdmF0ZQAAAAADBQAAAAhpc0FjdGl2ZQkAAAIAAAABAgAAABZEQXBwIGlzIGFscmVhZHkgYWN0aXZlAwkBAAAAASEAAAABCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACBQAAAAxhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkyCQAETAAAAAIFAAAADGFkbWluUHViS2V5MwkABEwAAAACBQAAABRhZG1pblB1YktleVN0YXJ0U3RvcAUAAAADbmlsCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAAhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACBQAAAAlrZXlBY3RpdmUGCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAACGtleUNhdXNlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWYgatY=", "height": 1520947, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7E1HGsDvXhsLaRf8fScnhsiL2fXWGjUNB7kATuoBRXQx Next: BpxUDCJ1Sa1tFQnX9f3vX6HwyymsWLW7ouHrNSmcHC3X Diff:
OldNewDifferences
192192 then throw("You need to attach 10 SWOP tokens")
193193 else if (!(if (if ((poolAssetIdB == USDN))
194194 then true
195- else (poolAssetIdA == unit))
195+ else (poolAssetIdB == unit))
196196 then true
197- else (poolAssetIdA == SWOP)))
197+ else (poolAssetIdB == 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 }
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
7878 let fiveDays = (8 * 60)
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
134134 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) = {
159159 let $t049034978 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
160160 let pmtAmount = $t049034978._1
161161 let pmtAssetId = $t049034978._2
162162 let $t049835082 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
163163 let poolAssetIdA = $t049835082._1
164164 let poolAssetIdB = $t049835082._2
165165 let newNumberOfVoting = getActiveVotingPoolAmount(amountOfVoting)
166166 let isPoolExists = isLastFivePoolExists(amountOfVoting, assetA, assetB)
167167 let $t052335311 = getAssetInfo(poolAssetIdA)
168168 let pmtStrAssetIdA = $t052335311._1
169169 let pmtAssetNameA = $t052335311._2
170170 let pmtDecimalsA = $t052335311._3
171171 let $t053165394 = getAssetInfo(poolAssetIdB)
172172 let pmtStrAssetIdB = $t053165394._1
173173 let pmtAssetNameB = $t053165394._2
174174 let pmtDecimalsB = $t053165394._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 (((newNumberOfVoting + 1) >= maxAmountOfVoting))
180180 then throw(("Too many votes. Maximum quantity: " + toString(maxAmountOfVoting)))
181181 else if ((size(i.payments) != 1))
182182 then throw("One attached assets expected")
183183 else if (isPoolExists)
184184 then throw("This pool already exists")
185185 else if ((pmtAssetId != SWOP))
186186 then throw("You must use a SWOP token")
187187 else if (if ((assetA == ""))
188188 then true
189189 else (assetB == ""))
190190 then throw("Assets can't be empty")
191191 else if ((pmtAmount != comissionForInitalizationOfVoting))
192192 then throw("You need to attach 10 SWOP tokens")
193193 else if (!(if (if ((poolAssetIdB == USDN))
194194 then true
195- else (poolAssetIdA == unit))
195+ else (poolAssetIdB == unit))
196196 then true
197- else (poolAssetIdA == SWOP)))
197+ else (poolAssetIdB == 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 oldVoteUserYes = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYes)), 0)
210210 let oldVoteUserNo = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNo)), 0)
211211 if (!(isCallerInGovernance(i.caller)))
212212 then throw("This address has 0 SWOP in Governance dApp")
213213 else if ((currentHeight > poolInitHeight))
214214 then [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1))]
215215 else if ((0 > voteAmt))
216216 then throw("The number of votes must be positive")
217217 else if ((voteAmt > userSWOPinGovernance))
218218 then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in Governance dApp"))
219219 else if (yesOrNo)
220220 then if (((oldVoteUserNo + voteAmt) > userSWOPinGovernance))
221221 then throw("Total votes of address in the pool exceeds number of SWOP in Governance dApp")
222222 else {
223223 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUserYes) + voteAmt)
224224 [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYes), voteAmt)]
225225 }
226226 else if (((oldVoteUserYes + voteAmt) > userSWOPinGovernance))
227227 then throw("Total votes of address in the pool exceeds number of SWOP in Governance dApp")
228228 else {
229229 let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUserNo) + voteAmt)
230230 [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNo), voteAmt)]
231231 }
232232 }
233233
234234
235235
236236 @Callable(i)
237237 func cancellationVoting (voting,cause) = if (!(isActive))
238238 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
239239 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
240240 then throw("Only admin can call this function")
241241 else [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1)), BooleanEntry((toString(voting) + keyStatusOfVoting), false), StringEntry((toString(voting) + keyCancelCause), cause)]
242242
243243
244244
245245 @Callable(i)
246246 func shutdown () = if (!(isActive))
247247 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
248248 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
249249 then throw("Only admin can call this function")
250250 else suspend("Paused by admin")
251251
252252
253253
254254 @Callable(i)
255255 func activate () = if (isActive)
256256 then throw("DApp is already active")
257257 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
258258 then throw("Only admin can call this function")
259259 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
260260
261261
262262 @Verifier(tx)
263263 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
264264

github/deemru/w8io/026f985 
55.68 ms