tx · AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP

3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy:  -0.14000000 Waves

2021.11.10 10:18 [1784607] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves

{ "type": 13, "id": "AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP", "fee": 14000000, "feeAssetId": null, "timestamp": 1636528740224, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "4ucq1vkXjBiV5cwwCWYVDqntqYsAWMhoMH4xnpo12zBBG4UpLBNFzoE33ikNARyAz6UyGzExXvmTtPiVKJJJ9hKh", "VWgXuKYr3GnsfmN6v8gavSJmjPdv7dHZKDooDmM58vNiCqiebfKtkStZqXA2C16q7DeDbUgDHKQfDFaRZWXXLxv" ], "script": "base64:AAIFAAAAAAAAACoIAhIAEgQKAggIEgUKAwEBCBIDCgEBEgMKAQESABIDCgEBEgASABIAEgAAAAAfAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVF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WJLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAvuFGXU=", "height": 1784607, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 63xFiLHjZujppAcyCaREnPX97ADZco2DRjK76k54d3jn Next: 85fSibY9c192EGPZ46QxwvaWkiyFhRXRHMP3LaVYe8fP Diff:
OldNewDifferences
101101 func claimAirdrop () = if (!(isActive))
102102 then throw("DApp is inactive at this moment")
103103 else {
104- let token = valueOrElse(getString(this, activeAirdropToken), "N/A")
105- let assetId = toBytes(token)
104+ let token = getStringValue(this, activeAirdropToken)
105+ let shareAssetId = fromBase58String(token)
106106 let airdropToken = ("_" + token)
107107 let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
108108 if ((0 >= share))
110110 else {
111111 let total = getVal(keyTotalYesVoted)
112112 let result = fraction(share, 100000000, total)
113-[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, assetId)]
113+[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, shareAssetId)]
114114 }
115115 }
116116
193193 func lockENNO () = if (!(isActive))
194194 then throw("DApp is inactive at this moment")
195195 else {
196- let $t072027277 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197- let pmtAmount = $t072027277._1
198- let pmtAssetId = $t072027277._2
196+ let $t072087283 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197+ let pmtAmount = $t072087283._1
198+ let pmtAssetId = $t072087283._2
199199 if ((pmtAssetId != ENNO))
200200 then throw("Incorrect payment assetId only Enno Cash is allowed.")
201201 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 token = valueOrElse(getString(this, activeAirdropToken), "N/A")
105- let assetId = toBytes(token)
104+ let token = getStringValue(this, activeAirdropToken)
105+ let shareAssetId = fromBase58String(token)
106106 let airdropToken = ("_" + token)
107107 let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
108108 if ((0 >= share))
109109 then throw("You already claimed or you have not participated.")
110110 else {
111111 let total = getVal(keyTotalYesVoted)
112112 let result = fraction(share, 100000000, total)
113-[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, assetId)]
113+[DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, shareAssetId)]
114114 }
115115 }
116116
117117
118118
119119 @Callable(i)
120120 func deleteEntry (address1,address2) = if (!(isActive))
121121 then throw("DApp is inactive at this moment")
122122 else {
123123 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
124124 [DeleteEntry((address1 + "_airdrop")), DeleteEntry(((address1 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address1 + keyUserENNOVoted)), DeleteEntry((address2 + "_airdrop")), DeleteEntry(((address2 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address2 + keyUserENNOVoted))]
125125 }
126126
127127
128128
129129 @Callable(i)
130130 func initVote (start,end,token) = if (!(isActive))
131131 then throw("DApp is inactive at this moment")
132132 else [StringEntry(activeAirdropToken, token), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
133133
134134
135135
136136 @Callable(i)
137137 func unvote (voteAmount) = if (!(isActive))
138138 then throw("DApp is inactive at this moment")
139139 else if ((getVal(keyVoteStart) > height))
140140 then throw("Voting has not started yet.")
141141 else if ((height > getVal(keyVoteEnd)))
142142 then throw("Voting has already ended.")
143143 else {
144144 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
145145 let totalYes = getVal(keyTotalYesVoted)
146146 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
147147 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
148148 let userENNOVotedNew = (userENNOVoted - voteAmount)
149149 if ((0 > userENNOVotedNew))
150150 then throw("Vote amount is less than available.")
151151 else {
152152 let userVoteValue = setShare(voteAmount)
153153 let userENNOVotedNewShare = (userVotedYes - userVoteValue)
154154 let newTotalYesVoted = (totalYes - userVoteValue)
155155 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
156156 }
157157 }
158158
159159
160160
161161 @Callable(i)
162162 func vote (voteAmount) = if (!(isActive))
163163 then throw("DApp is inactive at this moment")
164164 else if ((getVal(keyVoteStart) > height))
165165 then throw("Voting has not started yet.")
166166 else if ((height > getVal(keyVoteEnd)))
167167 then throw("Voting has already ended.")
168168 else {
169169 let totalYes = getVal(keyTotalYesVoted)
170170 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
171171 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
172172 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
173173 let userENNOLocked = getUserVoteData(i.caller, keyUserENNOLocked)
174174 let userENNOVotedNew = (userENNOVoted + voteAmount)
175175 if ((0 > userENNOVotedNew))
176176 then throw("Vote amount is more than available.")
177177 else {
178178 let availableVote = (userENNOLocked - userENNOVoted)
179179 let userVoteValue = setShare(voteAmount)
180180 if ((voteAmount > availableVote))
181181 then throw("Vote amount is more than available.")
182182 else {
183183 let userENNOVotedNewShare = (userVotedYes + userVoteValue)
184184 let newTotalYesVoted = (totalYes + userVoteValue)
185185 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
186186 }
187187 }
188188 }
189189
190190
191191
192192 @Callable(i)
193193 func lockENNO () = if (!(isActive))
194194 then throw("DApp is inactive at this moment")
195195 else {
196- let $t072027277 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197- let pmtAmount = $t072027277._1
198- let pmtAssetId = $t072027277._2
196+ let $t072087283 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197+ let pmtAmount = $t072087283._1
198+ let pmtAssetId = $t072087283._2
199199 if ((pmtAssetId != ENNO))
200200 then throw("Incorrect payment assetId only Enno Cash is allowed.")
201201 else {
202202 let userENNOLocked = getUserENNOLocked(i.caller)
203203 let userENNOLockedNew = (userENNOLocked + pmtAmount)
204204 let totalENNOLocked = getTotalENNOLocked()
205205 let totalENNOLockedNew = (totalENNOLocked + pmtAmount)
206206 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
207207 }
208208 }
209209
210210
211211
212212 @Callable(i)
213213 func withdrawENNO (withdrawAmount) = if (!(isActive))
214214 then throw("DApp is inactive at this moment")
215215 else {
216216 let userENNOLocked = getUserENNOLocked(i.caller)
217217 let availableToWithdraw = (userENNOLocked - getVal((toString(i.caller) + keyUserENNOVoted)))
218218 if ((withdrawAmount > availableToWithdraw))
219219 then throw("Your Enno is locked")
220220 else if ((0 >= withdrawAmount))
221221 then throw("withdrawAmount <= 0")
222222 else {
223223 let totalENNOLocked = getTotalENNOLocked()
224224 if ((withdrawAmount > totalENNOLocked))
225225 then throw("withdrawAmount is more than available to withdraw")
226226 else if ((withdrawAmount > userENNOLocked))
227227 then throw("You are trying to unstake more than you have staked.")
228228 else {
229229 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
230230 let userENNOamountNew = (userENNOLocked - withdrawAmount)
231231 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)]
232232 }
233233 }
234234 }
235235
236236
237237
238238 @Callable(i)
239239 func claimAndWithdrawENNO () = if (!(isActive))
240240 then throw("DApp is inactive at this moment")
241241 else {
242242 let userShare = getCallerShare(i.originCaller)
243243 let userClaimedAmount = getClaimedAmount(i.originCaller)
244244 let claimAmount = (userShare - userClaimedAmount)
245245 let totalENNOLocked = getTotalENNOLocked()
246246 if ((claimAmount > totalENNOLocked))
247247 then throw("claimAmount is more than available to withdraw")
248248 else if ((0 >= claimAmount))
249249 then throw("Claim amount must be bigger than 0")
250250 else {
251251 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
252252 [IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), ScriptTransfer(i.originCaller, claimAmount, ENNO)]
253253 }
254254 }
255255
256256
257257
258258 @Callable(i)
259259 func claimAndStakeENNO () = if (!(isActive))
260260 then throw("DApp is inactive at this moment")
261261 else {
262262 let userShare = getCallerShare(i.originCaller)
263263 let userClaimedAmount = getClaimedAmount(i.originCaller)
264264 let claimAmount = (userShare - userClaimedAmount)
265265 if ((0 >= claimAmount))
266266 then throw("Claim amount must be bigger than 0")
267267 else {
268268 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
269269 let userENNOLocked = getUserENNOLocked(i.originCaller)
270270 let userENNOLockedNew = (userENNOLocked + claimAmount)
271271 let totalENNOLocked = getTotalENNOLocked()
272272 let totalENNOLockedNew = (totalENNOLocked + claimAmount)
273273 [IntegerEntry((toString(i.originCaller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
274274 }
275275 }
276276
277277
278278
279279 @Callable(i)
280280 func shutdown () = if (!(isActive))
281281 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
282282 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
283283 then throw("Only admin can call this function")
284284 else suspend("Paused by admin")
285285
286286
287287
288288 @Callable(i)
289289 func activate () = if (isActive)
290290 then throw("DApp is already active")
291291 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
292292 then throw("Only admin can call this function")
293293 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
294294
295295
296296 @Verifier(tx)
297297 func verify () = {
298298 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
299299 then 1
300300 else 0
301301 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
302302 then 1
303303 else 0
304304 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
305305 then 1
306306 else 0
307307 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
308308 }
309309

github/deemru/w8io/026f985 
51.82 ms