tx · 63xFiLHjZujppAcyCaREnPX97ADZco2DRjK76k54d3jn

3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy:  -0.14000000 Waves

2021.11.10 10:15 [1784604] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves

{ "type": 13, "id": "63xFiLHjZujppAcyCaREnPX97ADZco2DRjK76k54d3jn", "fee": 14000000, "feeAssetId": null, "timestamp": 1636528519473, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "4h7NkL1yBLTb3jVCJKhhcDw1ZcUSQcYg6Yq7kRti74JRBdNFSD5bZtPNzRTp5DCFd9qojLp6SVFhSq3YvdVTX1jo", "353hbNrdJuS26hWFnNCbs8ip9sroBCFV2pVE9oKgx9uZ4xdyrAGiMY6viXnsC1mZSfNLZ4S48o49ihLZuNLQ5LYd" ], "script": "base64:AAIFAAAAAAAAACoIAhIAEgQKAggIEgUKAwEBCBIDCgEBEgMKAQESABIDCgEBEgASABIAEgAAAAAfAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVFbmQCAAA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WJLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAraMgYM=", "height": 1784604, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 87Xj71DRcRH8hXgAu8JPc3dyKK4ju5SkWwehcv947tNt Next: AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP Diff:
OldNewDifferences
101101 func claimAirdrop () = if (!(isActive))
102102 then throw("DApp is inactive at this moment")
103103 else {
104- let share = getVal((toString(i.caller) + keyUserENNOVotedYESValue))
104+ let token = valueOrElse(getString(this, activeAirdropToken), "N/A")
105+ let assetId = toBytes(token)
106+ let airdropToken = ("_" + token)
107+ let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
105108 if ((0 >= share))
106109 then throw("You already claimed or you have not participated.")
107110 else {
108111 let total = getVal(keyTotalYesVoted)
109112 let result = fraction(share, 100000000, total)
110-[IntegerEntry((toString(i.caller) + "_airdrop"), result), DeleteEntry((toString(i.caller) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted))]
113+[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, assetId)]
111114 }
112115 }
113116
190193 func lockENNO () = if (!(isActive))
191194 then throw("DApp is inactive at this moment")
192195 else {
193- let $t070537128 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
194- let pmtAmount = $t070537128._1
195- let pmtAssetId = $t070537128._2
196+ let $t072027277 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197+ let pmtAmount = $t072027277._1
198+ let pmtAssetId = $t072027277._2
196199 if ((pmtAssetId != ENNO))
197200 then throw("Incorrect payment assetId only Enno Cash is allowed.")
198201 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
55
66 let adminPubKey2 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
77
88 let adminPubKey3 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
99
1010 let adminPubKeyStartStop = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
1111
1212 let keyActive = "active"
1313
1414 let keyCause = "shutdown_cause"
1515
1616 let keyVoteStart = "vote_start_height"
1717
1818 let keyVoteEnd = "vote_end_height"
1919
2020 let keyVoteYes = "yes_amount"
2121
2222 let keyUserENNOVoted = "_ENNO_vote"
2323
2424 let keyUserENNOVotedHeight = "_ENNO_vote_height"
2525
2626 let keyUserENNOVotedValue = "_ENNO_vote_value"
2727
2828 let keyUserENNOVotedYESValue = "_ENNO_vote_yes_share"
2929
3030 let keyTotalYesVoted = "total_ENNO_vote_yes"
3131
3232 let keyUserENNOLocked = "_ENNO_amount"
3333
3434 let keyTotalENNOLocked = "total_ENNO_amount"
3535
3636 let activeAirdropToken = "active_airdrop_token"
3737
3838 let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
3939
4040 let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
4141
4242 let keyUserENNOLockedTag = "share_"
4343
4444 let isActive = valueOrElse(getBoolean(this, keyActive), true)
4545
4646 let shareData = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
4747
4848 let ENNO = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso'
4949
5050 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
5151
5252
5353 func getUserENNOLocked (user) = valueOrElse(getInteger(this, (toString(user) + keyUserENNOLocked)), 0)
5454
5555
5656 func getTotalENNOLocked () = valueOrElse(getInteger(this, keyTotalENNOLocked), 0)
5757
5858
5959 func getUserVoteData (user,key) = valueOrElse(getInteger(this, (toString(user) + key)), 0)
6060
6161
6262 func getVal (key) = valueOrElse(getInteger(this, key), 0)
6363
6464
6565 func getCallerShare (caller) = {
6666 let callerShare = getInteger(addressFromPublicKey(shareData), (keyUserENNOLockedTag + toString(caller)))
6767 let callerShareAmount = match callerShare {
6868 case share: Int =>
6969 share
7070 case share: Unit =>
7171 throw("Only governance qualifiers can call this function.")
7272 case _ =>
7373 throw("Match error")
7474 }
7575 callerShareAmount
7676 }
7777
7878
7979 func getClaimedAmount (caller) = {
8080 let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
8181 let callerWithdrawnAmount = match callerWithdrawn {
8282 case share: Int =>
8383 share
8484 case share: Unit =>
8585 0
8686 case _ =>
8787 throw("Match error")
8888 }
8989 callerWithdrawnAmount
9090 }
9191
9292
9393 func setShare (amount) = {
9494 let deltaHeight = (getVal(keyVoteEnd) - height)
9595 let share = fraction(amount, deltaHeight, 100000000)
9696 share
9797 }
9898
9999
100100 @Callable(i)
101101 func claimAirdrop () = if (!(isActive))
102102 then throw("DApp is inactive at this moment")
103103 else {
104- let share = getVal((toString(i.caller) + keyUserENNOVotedYESValue))
104+ let token = valueOrElse(getString(this, activeAirdropToken), "N/A")
105+ let assetId = toBytes(token)
106+ let airdropToken = ("_" + token)
107+ let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
105108 if ((0 >= share))
106109 then throw("You already claimed or you have not participated.")
107110 else {
108111 let total = getVal(keyTotalYesVoted)
109112 let result = fraction(share, 100000000, total)
110-[IntegerEntry((toString(i.caller) + "_airdrop"), result), DeleteEntry((toString(i.caller) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted))]
113+[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, assetId)]
111114 }
112115 }
113116
114117
115118
116119 @Callable(i)
117120 func deleteEntry (address1,address2) = if (!(isActive))
118121 then throw("DApp is inactive at this moment")
119122 else {
120123 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
121124 [DeleteEntry((address1 + "_airdrop")), DeleteEntry(((address1 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address1 + keyUserENNOVoted)), DeleteEntry((address2 + "_airdrop")), DeleteEntry(((address2 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address2 + keyUserENNOVoted))]
122125 }
123126
124127
125128
126129 @Callable(i)
127130 func initVote (start,end,token) = if (!(isActive))
128131 then throw("DApp is inactive at this moment")
129132 else [StringEntry(activeAirdropToken, token), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
130133
131134
132135
133136 @Callable(i)
134137 func unvote (voteAmount) = if (!(isActive))
135138 then throw("DApp is inactive at this moment")
136139 else if ((getVal(keyVoteStart) > height))
137140 then throw("Voting has not started yet.")
138141 else if ((height > getVal(keyVoteEnd)))
139142 then throw("Voting has already ended.")
140143 else {
141144 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
142145 let totalYes = getVal(keyTotalYesVoted)
143146 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
144147 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
145148 let userENNOVotedNew = (userENNOVoted - voteAmount)
146149 if ((0 > userENNOVotedNew))
147150 then throw("Vote amount is less than available.")
148151 else {
149152 let userVoteValue = setShare(voteAmount)
150153 let userENNOVotedNewShare = (userVotedYes - userVoteValue)
151154 let newTotalYesVoted = (totalYes - userVoteValue)
152155 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
153156 }
154157 }
155158
156159
157160
158161 @Callable(i)
159162 func vote (voteAmount) = if (!(isActive))
160163 then throw("DApp is inactive at this moment")
161164 else if ((getVal(keyVoteStart) > height))
162165 then throw("Voting has not started yet.")
163166 else if ((height > getVal(keyVoteEnd)))
164167 then throw("Voting has already ended.")
165168 else {
166169 let totalYes = getVal(keyTotalYesVoted)
167170 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
168171 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
169172 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
170173 let userENNOLocked = getUserVoteData(i.caller, keyUserENNOLocked)
171174 let userENNOVotedNew = (userENNOVoted + voteAmount)
172175 if ((0 > userENNOVotedNew))
173176 then throw("Vote amount is more than available.")
174177 else {
175178 let availableVote = (userENNOLocked - userENNOVoted)
176179 let userVoteValue = setShare(voteAmount)
177180 if ((voteAmount > availableVote))
178181 then throw("Vote amount is more than available.")
179182 else {
180183 let userENNOVotedNewShare = (userVotedYes + userVoteValue)
181184 let newTotalYesVoted = (totalYes + userVoteValue)
182185 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
183186 }
184187 }
185188 }
186189
187190
188191
189192 @Callable(i)
190193 func lockENNO () = if (!(isActive))
191194 then throw("DApp is inactive at this moment")
192195 else {
193- let $t070537128 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
194- let pmtAmount = $t070537128._1
195- let pmtAssetId = $t070537128._2
196+ let $t072027277 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197+ let pmtAmount = $t072027277._1
198+ let pmtAssetId = $t072027277._2
196199 if ((pmtAssetId != ENNO))
197200 then throw("Incorrect payment assetId only Enno Cash is allowed.")
198201 else {
199202 let userENNOLocked = getUserENNOLocked(i.caller)
200203 let userENNOLockedNew = (userENNOLocked + pmtAmount)
201204 let totalENNOLocked = getTotalENNOLocked()
202205 let totalENNOLockedNew = (totalENNOLocked + pmtAmount)
203206 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
204207 }
205208 }
206209
207210
208211
209212 @Callable(i)
210213 func withdrawENNO (withdrawAmount) = if (!(isActive))
211214 then throw("DApp is inactive at this moment")
212215 else {
213216 let userENNOLocked = getUserENNOLocked(i.caller)
214217 let availableToWithdraw = (userENNOLocked - getVal((toString(i.caller) + keyUserENNOVoted)))
215218 if ((withdrawAmount > availableToWithdraw))
216219 then throw("Your Enno is locked")
217220 else if ((0 >= withdrawAmount))
218221 then throw("withdrawAmount <= 0")
219222 else {
220223 let totalENNOLocked = getTotalENNOLocked()
221224 if ((withdrawAmount > totalENNOLocked))
222225 then throw("withdrawAmount is more than available to withdraw")
223226 else if ((withdrawAmount > userENNOLocked))
224227 then throw("You are trying to unstake more than you have staked.")
225228 else {
226229 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
227230 let userENNOamountNew = (userENNOLocked - withdrawAmount)
228231 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)]
229232 }
230233 }
231234 }
232235
233236
234237
235238 @Callable(i)
236239 func claimAndWithdrawENNO () = if (!(isActive))
237240 then throw("DApp is inactive at this moment")
238241 else {
239242 let userShare = getCallerShare(i.originCaller)
240243 let userClaimedAmount = getClaimedAmount(i.originCaller)
241244 let claimAmount = (userShare - userClaimedAmount)
242245 let totalENNOLocked = getTotalENNOLocked()
243246 if ((claimAmount > totalENNOLocked))
244247 then throw("claimAmount is more than available to withdraw")
245248 else if ((0 >= claimAmount))
246249 then throw("Claim amount must be bigger than 0")
247250 else {
248251 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
249252 [IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), ScriptTransfer(i.originCaller, claimAmount, ENNO)]
250253 }
251254 }
252255
253256
254257
255258 @Callable(i)
256259 func claimAndStakeENNO () = if (!(isActive))
257260 then throw("DApp is inactive at this moment")
258261 else {
259262 let userShare = getCallerShare(i.originCaller)
260263 let userClaimedAmount = getClaimedAmount(i.originCaller)
261264 let claimAmount = (userShare - userClaimedAmount)
262265 if ((0 >= claimAmount))
263266 then throw("Claim amount must be bigger than 0")
264267 else {
265268 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
266269 let userENNOLocked = getUserENNOLocked(i.originCaller)
267270 let userENNOLockedNew = (userENNOLocked + claimAmount)
268271 let totalENNOLocked = getTotalENNOLocked()
269272 let totalENNOLockedNew = (totalENNOLocked + claimAmount)
270273 [IntegerEntry((toString(i.originCaller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
271274 }
272275 }
273276
274277
275278
276279 @Callable(i)
277280 func shutdown () = if (!(isActive))
278281 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
279282 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
280283 then throw("Only admin can call this function")
281284 else suspend("Paused by admin")
282285
283286
284287
285288 @Callable(i)
286289 func activate () = if (isActive)
287290 then throw("DApp is already active")
288291 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
289292 then throw("Only admin can call this function")
290293 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
291294
292295
293296 @Verifier(tx)
294297 func verify () = {
295298 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
296299 then 1
297300 else 0
298301 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
299302 then 1
300303 else 0
301304 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
302305 then 1
303306 else 0
304307 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
305308 }
306309

github/deemru/w8io/026f985 
40.15 ms