tx · 85fSibY9c192EGPZ46QxwvaWkiyFhRXRHMP3LaVYe8fP

3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy:  -0.14000000 Waves

2021.11.10 10:44 [1784634] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves

{ "type": 13, "id": "85fSibY9c192EGPZ46QxwvaWkiyFhRXRHMP3LaVYe8fP", "fee": 14000000, "feeAssetId": null, "timestamp": 1636530249418, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "5euyzHRerJyeyQnNRjiDxZ299nFuFATWETcABy3hNSh5kFKXHBd1svuuAK8sho6KhDM2bVggwMa9eYXT7uE8jRee", "5fLkSaoVXpdXB3aJknoUT1Zb6gkVsFDgU3mRFTdqXk8PT4HJ9ghBRvekkxentoMmBD868ufN4KhokovaqYeF2oxr" ], "script": "base64:AAIFAAAAAAAAACsIAhIAEgQKAggIEgYKBAEBCAESAwoBARIDCgEBEgASAwoBARIAEgASABIAAAAAIAAAAAAMYWRtaW5QdWJLZXkxAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAMYWRtaW5QdWJLZXkyAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAMYWRtaW5QdWJLZXkzAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAAIa2V5Q2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAAAxrZXlWb3RlU3RhcnQCAAAAEXZvdGVfc3RhcnRfaGVpZ2h0AAAAAAprZXlWb3RlRW5kAgAAA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AAAAAAAAAAABQAAAAxhZG1pblB1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAAEmFkbWluUHViS2V5MlNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAAxhZG1pblB1YktleTIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAEmFkbWluUHViS2V5M1NpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAK/PaPw", "height": 1784634, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP Next: Go5onw6UaJYqLcQJg7VRYcf6WQmxg6hDy18cyXCakNGg Diff:
OldNewDifferences
3434 let keyTotalENNOLocked = "total_ENNO_amount"
3535
3636 let activeAirdropToken = "active_airdrop_token"
37+
38+let activeAirdropAmount = "active_airdrop_amount"
3739
3840 let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
3941
102104 then throw("DApp is inactive at this moment")
103105 else {
104106 let token = getStringValue(this, activeAirdropToken)
107+ let airdropAmount = getVal(activeAirdropAmount)
105108 let shareAssetId = fromBase58String(token)
106109 let airdropToken = ("_" + token)
107110 let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
109112 then throw("You already claimed or you have not participated.")
110113 else {
111114 let total = getVal(keyTotalYesVoted)
112- let result = fraction(share, 100000000, total)
115+ let result = fraction(share, airdropAmount, total)
113116 [DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, shareAssetId)]
114117 }
115118 }
127130
128131
129132 @Callable(i)
130-func initVote (start,end,token) = if (!(isActive))
133+func initVote (start,end,token,amount) = if (!(isActive))
131134 then throw("DApp is inactive at this moment")
132- else [StringEntry(activeAirdropToken, token), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
135+ else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
133136
134137
135138
193196 func lockENNO () = if (!(isActive))
194197 then throw("DApp is inactive at this moment")
195198 else {
196- let $t072087283 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197- let pmtAmount = $t072087283._1
198- let pmtAssetId = $t072087283._2
199+ let $t073767451 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
200+ let pmtAmount = $t073767451._1
201+ let pmtAssetId = $t073767451._2
199202 if ((pmtAssetId != ENNO))
200203 then throw("Incorrect payment assetId only Enno Cash is allowed.")
201204 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"
37+
38+let activeAirdropAmount = "active_airdrop_amount"
3739
3840 let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
3941
4042 let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
4143
4244 let keyUserENNOLockedTag = "share_"
4345
4446 let isActive = valueOrElse(getBoolean(this, keyActive), true)
4547
4648 let shareData = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq'
4749
4850 let ENNO = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso'
4951
5052 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
5153
5254
5355 func getUserENNOLocked (user) = valueOrElse(getInteger(this, (toString(user) + keyUserENNOLocked)), 0)
5456
5557
5658 func getTotalENNOLocked () = valueOrElse(getInteger(this, keyTotalENNOLocked), 0)
5759
5860
5961 func getUserVoteData (user,key) = valueOrElse(getInteger(this, (toString(user) + key)), 0)
6062
6163
6264 func getVal (key) = valueOrElse(getInteger(this, key), 0)
6365
6466
6567 func getCallerShare (caller) = {
6668 let callerShare = getInteger(addressFromPublicKey(shareData), (keyUserENNOLockedTag + toString(caller)))
6769 let callerShareAmount = match callerShare {
6870 case share: Int =>
6971 share
7072 case share: Unit =>
7173 throw("Only governance qualifiers can call this function.")
7274 case _ =>
7375 throw("Match error")
7476 }
7577 callerShareAmount
7678 }
7779
7880
7981 func getClaimedAmount (caller) = {
8082 let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
8183 let callerWithdrawnAmount = match callerWithdrawn {
8284 case share: Int =>
8385 share
8486 case share: Unit =>
8587 0
8688 case _ =>
8789 throw("Match error")
8890 }
8991 callerWithdrawnAmount
9092 }
9193
9294
9395 func setShare (amount) = {
9496 let deltaHeight = (getVal(keyVoteEnd) - height)
9597 let share = fraction(amount, deltaHeight, 100000000)
9698 share
9799 }
98100
99101
100102 @Callable(i)
101103 func claimAirdrop () = if (!(isActive))
102104 then throw("DApp is inactive at this moment")
103105 else {
104106 let token = getStringValue(this, activeAirdropToken)
107+ let airdropAmount = getVal(activeAirdropAmount)
105108 let shareAssetId = fromBase58String(token)
106109 let airdropToken = ("_" + token)
107110 let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue))
108111 if ((0 >= share))
109112 then throw("You already claimed or you have not participated.")
110113 else {
111114 let total = getVal(keyTotalYesVoted)
112- let result = fraction(share, 100000000, total)
115+ let result = fraction(share, airdropAmount, total)
113116 [DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, shareAssetId)]
114117 }
115118 }
116119
117120
118121
119122 @Callable(i)
120123 func deleteEntry (address1,address2) = if (!(isActive))
121124 then throw("DApp is inactive at this moment")
122125 else {
123126 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
124127 [DeleteEntry((address1 + "_airdrop")), DeleteEntry(((address1 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address1 + keyUserENNOVoted)), DeleteEntry((address2 + "_airdrop")), DeleteEntry(((address2 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address2 + keyUserENNOVoted))]
125128 }
126129
127130
128131
129132 @Callable(i)
130-func initVote (start,end,token) = if (!(isActive))
133+func initVote (start,end,token,amount) = if (!(isActive))
131134 then throw("DApp is inactive at this moment")
132- else [StringEntry(activeAirdropToken, token), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
135+ else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0)]
133136
134137
135138
136139 @Callable(i)
137140 func unvote (voteAmount) = if (!(isActive))
138141 then throw("DApp is inactive at this moment")
139142 else if ((getVal(keyVoteStart) > height))
140143 then throw("Voting has not started yet.")
141144 else if ((height > getVal(keyVoteEnd)))
142145 then throw("Voting has already ended.")
143146 else {
144147 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
145148 let totalYes = getVal(keyTotalYesVoted)
146149 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
147150 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
148151 let userENNOVotedNew = (userENNOVoted - voteAmount)
149152 if ((0 > userENNOVotedNew))
150153 then throw("Vote amount is less than available.")
151154 else {
152155 let userVoteValue = setShare(voteAmount)
153156 let userENNOVotedNewShare = (userVotedYes - userVoteValue)
154157 let newTotalYesVoted = (totalYes - userVoteValue)
155158 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
156159 }
157160 }
158161
159162
160163
161164 @Callable(i)
162165 func vote (voteAmount) = if (!(isActive))
163166 then throw("DApp is inactive at this moment")
164167 else if ((getVal(keyVoteStart) > height))
165168 then throw("Voting has not started yet.")
166169 else if ((height > getVal(keyVoteEnd)))
167170 then throw("Voting has already ended.")
168171 else {
169172 let totalYes = getVal(keyTotalYesVoted)
170173 let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A"))
171174 let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue))
172175 let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted)
173176 let userENNOLocked = getUserVoteData(i.caller, keyUserENNOLocked)
174177 let userENNOVotedNew = (userENNOVoted + voteAmount)
175178 if ((0 > userENNOVotedNew))
176179 then throw("Vote amount is more than available.")
177180 else {
178181 let availableVote = (userENNOLocked - userENNOVoted)
179182 let userVoteValue = setShare(voteAmount)
180183 if ((voteAmount > availableVote))
181184 then throw("Vote amount is more than available.")
182185 else {
183186 let userENNOVotedNewShare = (userVotedYes + userVoteValue)
184187 let newTotalYesVoted = (totalYes + userVoteValue)
185188 [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)]
186189 }
187190 }
188191 }
189192
190193
191194
192195 @Callable(i)
193196 func lockENNO () = if (!(isActive))
194197 then throw("DApp is inactive at this moment")
195198 else {
196- let $t072087283 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
197- let pmtAmount = $t072087283._1
198- let pmtAssetId = $t072087283._2
199+ let $t073767451 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
200+ let pmtAmount = $t073767451._1
201+ let pmtAssetId = $t073767451._2
199202 if ((pmtAssetId != ENNO))
200203 then throw("Incorrect payment assetId only Enno Cash is allowed.")
201204 else {
202205 let userENNOLocked = getUserENNOLocked(i.caller)
203206 let userENNOLockedNew = (userENNOLocked + pmtAmount)
204207 let totalENNOLocked = getTotalENNOLocked()
205208 let totalENNOLockedNew = (totalENNOLocked + pmtAmount)
206209 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
207210 }
208211 }
209212
210213
211214
212215 @Callable(i)
213216 func withdrawENNO (withdrawAmount) = if (!(isActive))
214217 then throw("DApp is inactive at this moment")
215218 else {
216219 let userENNOLocked = getUserENNOLocked(i.caller)
217220 let availableToWithdraw = (userENNOLocked - getVal((toString(i.caller) + keyUserENNOVoted)))
218221 if ((withdrawAmount > availableToWithdraw))
219222 then throw("Your Enno is locked")
220223 else if ((0 >= withdrawAmount))
221224 then throw("withdrawAmount <= 0")
222225 else {
223226 let totalENNOLocked = getTotalENNOLocked()
224227 if ((withdrawAmount > totalENNOLocked))
225228 then throw("withdrawAmount is more than available to withdraw")
226229 else if ((withdrawAmount > userENNOLocked))
227230 then throw("You are trying to unstake more than you have staked.")
228231 else {
229232 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
230233 let userENNOamountNew = (userENNOLocked - withdrawAmount)
231234 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)]
232235 }
233236 }
234237 }
235238
236239
237240
238241 @Callable(i)
239242 func claimAndWithdrawENNO () = if (!(isActive))
240243 then throw("DApp is inactive at this moment")
241244 else {
242245 let userShare = getCallerShare(i.originCaller)
243246 let userClaimedAmount = getClaimedAmount(i.originCaller)
244247 let claimAmount = (userShare - userClaimedAmount)
245248 let totalENNOLocked = getTotalENNOLocked()
246249 if ((claimAmount > totalENNOLocked))
247250 then throw("claimAmount is more than available to withdraw")
248251 else if ((0 >= claimAmount))
249252 then throw("Claim amount must be bigger than 0")
250253 else {
251254 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
252255 [IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), ScriptTransfer(i.originCaller, claimAmount, ENNO)]
253256 }
254257 }
255258
256259
257260
258261 @Callable(i)
259262 func claimAndStakeENNO () = if (!(isActive))
260263 then throw("DApp is inactive at this moment")
261264 else {
262265 let userShare = getCallerShare(i.originCaller)
263266 let userClaimedAmount = getClaimedAmount(i.originCaller)
264267 let claimAmount = (userShare - userClaimedAmount)
265268 if ((0 >= claimAmount))
266269 then throw("Claim amount must be bigger than 0")
267270 else {
268271 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
269272 let userENNOLocked = getUserENNOLocked(i.originCaller)
270273 let userENNOLockedNew = (userENNOLocked + claimAmount)
271274 let totalENNOLocked = getTotalENNOLocked()
272275 let totalENNOLockedNew = (totalENNOLocked + claimAmount)
273276 [IntegerEntry((toString(i.originCaller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
274277 }
275278 }
276279
277280
278281
279282 @Callable(i)
280283 func shutdown () = if (!(isActive))
281284 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
282285 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
283286 then throw("Only admin can call this function")
284287 else suspend("Paused by admin")
285288
286289
287290
288291 @Callable(i)
289292 func activate () = if (isActive)
290293 then throw("DApp is already active")
291294 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
292295 then throw("Only admin can call this function")
293296 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
294297
295298
296299 @Verifier(tx)
297300 func verify () = {
298301 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
299302 then 1
300303 else 0
301304 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
302305 then 1
303306 else 0
304307 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
305308 then 1
306309 else 0
307310 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
308311 }
309312

github/deemru/w8io/026f985 
44.36 ms