tx · 6KBnvHFutWAX1cfgivVoitadsq5gxdny2xpyoTEQT1yZ 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves 2021.11.10 12:59 [1784774] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{ "type": 13, "id": "6KBnvHFutWAX1cfgivVoitadsq5gxdny2xpyoTEQT1yZ", "fee": 14000000, "feeAssetId": null, "timestamp": 1636538462439, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "pNRRjzC1D44rdeocwNHeWa6SWgCUDeYifwAVFsB1mXWQXpPXJFA7fH8nQAUeqKMcfvzULCMZ1UvvkKzHqtjA11R", "4AvRNJTg472z6CnVg3fhixi8fnF7aVHQxcqgmvtSPSxXy248NiokWtgv7HrbfcMPibZSMpYdc81rT5EqQNvyuKur" ], "script": "base64:AAIFAAAAAAAAADAIAhIAEgQKAggIEgYKBAEBCAESAwoBBBIDCgEBEgMKAQESABIDCgEBEgASABIAEgAAAAAiAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVFbm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AAAAABAAAABJhZG1pblB1YktleTFTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkxAAAAAAAAAAABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTJTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAMYWRtaW5QdWJLZXkyAAAAAAAAAAABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTNTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAACF8hKJg==", "height": 1784774, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FP325k4d1xrWeSb9M9ZgGVCFDSpEgbMrqbEUtnMMq7eS Next: 7U9ZVknF9BiAyjemiuacvU5JZ4Qt9DqjNUgsZSHgsU5W Diff:
Old | New | Differences | |
---|---|---|---|
142 | 142 | @Callable(i) | |
143 | 143 | func initVote (start,end,token,amount) = if (!(isActive)) | |
144 | 144 | then throw("DApp is inactive at this moment") | |
145 | - | else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0), BooleanEntry(claimAvailable, false)] | |
145 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
146 | + | then throw("Only admin can call this function") | |
147 | + | else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0), BooleanEntry(claimAvailable, false)] | |
146 | 148 | ||
147 | 149 | ||
148 | 150 | ||
149 | 151 | @Callable(i) | |
150 | 152 | func activateAirdropClaim (set) = if (!(isActive)) | |
151 | 153 | then throw("DApp is inactive at this moment") | |
152 | - | else [BooleanEntry(claimAvailable, set)] | |
154 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
155 | + | then throw("Only admin can call this function") | |
156 | + | else [BooleanEntry(claimAvailable, set)] | |
153 | 157 | ||
154 | 158 | ||
155 | 159 | ||
213 | 217 | func lockENNO () = if (!(isActive)) | |
214 | 218 | then throw("DApp is inactive at this moment") | |
215 | 219 | else { | |
216 | - | let $ | |
217 | - | let pmtAmount = $ | |
218 | - | let pmtAssetId = $ | |
220 | + | let $t083118386 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
221 | + | let pmtAmount = $t083118386._1 | |
222 | + | let pmtAssetId = $t083118386._2 | |
219 | 223 | if ((pmtAssetId != ENNO)) | |
220 | 224 | then throw("Incorrect payment assetId only Enno Cash is allowed.") | |
221 | 225 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
9 | 9 | ||
10 | 10 | let adminPubKeyStartStop = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
11 | 11 | ||
12 | 12 | let keyActive = "active" | |
13 | 13 | ||
14 | 14 | let keyCause = "shutdown_cause" | |
15 | 15 | ||
16 | 16 | let keyVoteStart = "vote_start_height" | |
17 | 17 | ||
18 | 18 | let keyVoteEnd = "vote_end_height" | |
19 | 19 | ||
20 | 20 | let keyVoteYes = "yes_amount" | |
21 | 21 | ||
22 | 22 | let keyUserENNOVoted = "_ENNO_vote" | |
23 | 23 | ||
24 | 24 | let keyUserENNOVotedHeight = "_ENNO_vote_height" | |
25 | 25 | ||
26 | 26 | let keyUserENNOVotedValue = "_ENNO_vote_value" | |
27 | 27 | ||
28 | 28 | let keyUserENNOVotedYESValue = "_ENNO_vote_yes_share" | |
29 | 29 | ||
30 | 30 | let keyTotalYesVoted = "total_ENNO_vote_yes" | |
31 | 31 | ||
32 | 32 | let keyUserENNOLocked = "_ENNO_amount" | |
33 | 33 | ||
34 | 34 | let keyTotalENNOLocked = "total_ENNO_amount" | |
35 | 35 | ||
36 | 36 | let activeAirdropToken = "active_airdrop_token" | |
37 | 37 | ||
38 | 38 | let activeAirdropAmount = "active_airdrop_amount" | |
39 | 39 | ||
40 | 40 | let claimAvailable = "active_airdrop_claim_status" | |
41 | 41 | ||
42 | 42 | let keyUserENNOClaimedAmount = "_ENNO_claimed_amount" | |
43 | 43 | ||
44 | 44 | let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount" | |
45 | 45 | ||
46 | 46 | let keyUserENNOLockedTag = "share_" | |
47 | 47 | ||
48 | 48 | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
49 | 49 | ||
50 | 50 | let isAirdropClaim = valueOrElse(getBoolean(this, claimAvailable), false) | |
51 | 51 | ||
52 | 52 | let shareData = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
53 | 53 | ||
54 | 54 | let ENNO = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' | |
55 | 55 | ||
56 | 56 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getUserENNOLocked (user) = valueOrElse(getInteger(this, (toString(user) + keyUserENNOLocked)), 0) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getTotalENNOLocked () = valueOrElse(getInteger(this, keyTotalENNOLocked), 0) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getUserVoteData (user,key) = valueOrElse(getInteger(this, (toString(user) + key)), 0) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getVal (key) = valueOrElse(getInteger(this, key), 0) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getCallerShare (caller) = { | |
72 | 72 | let callerShare = getInteger(addressFromPublicKey(shareData), (keyUserENNOLockedTag + toString(caller))) | |
73 | 73 | let callerShareAmount = match callerShare { | |
74 | 74 | case share: Int => | |
75 | 75 | share | |
76 | 76 | case share: Unit => | |
77 | 77 | throw("Only governance qualifiers can call this function.") | |
78 | 78 | case _ => | |
79 | 79 | throw("Match error") | |
80 | 80 | } | |
81 | 81 | callerShareAmount | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getClaimedAmount (caller) = { | |
86 | 86 | let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount)) | |
87 | 87 | let callerWithdrawnAmount = match callerWithdrawn { | |
88 | 88 | case share: Int => | |
89 | 89 | share | |
90 | 90 | case share: Unit => | |
91 | 91 | 0 | |
92 | 92 | case _ => | |
93 | 93 | throw("Match error") | |
94 | 94 | } | |
95 | 95 | callerWithdrawnAmount | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func setShare (amount) = { | |
100 | 100 | let deltaHeight = (getVal(keyVoteEnd) - height) | |
101 | 101 | let share = fraction(amount, deltaHeight, 100000000) | |
102 | 102 | share | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(i) | |
107 | 107 | func claimAirdrop () = if (!(isActive)) | |
108 | 108 | then throw("DApp is inactive at this moment") | |
109 | 109 | else if (!(isAirdropClaim)) | |
110 | 110 | then throw("Claim has not started yet.") | |
111 | 111 | else if ((getVal(keyVoteStart) > height)) | |
112 | 112 | then throw("Voting has not started yet.") | |
113 | 113 | else if ((getVal(keyVoteEnd) > height)) | |
114 | 114 | then throw("Voting has not ended yet.") | |
115 | 115 | else { | |
116 | 116 | let token = getStringValue(this, activeAirdropToken) | |
117 | 117 | let airdropAmount = getVal(activeAirdropAmount) | |
118 | 118 | let shareAssetId = fromBase58String(token) | |
119 | 119 | let airdropToken = ("_" + token) | |
120 | 120 | let share = getVal(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)) | |
121 | 121 | if ((0 >= share)) | |
122 | 122 | then throw("You already claimed or you have not participated.") | |
123 | 123 | else { | |
124 | 124 | let total = getVal(keyTotalYesVoted) | |
125 | 125 | let result = fraction(share, airdropAmount, total) | |
126 | 126 | [DeleteEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((toString(i.caller) + keyUserENNOVoted)), ScriptTransfer(i.caller, result, shareAssetId)] | |
127 | 127 | } | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func deleteEntry (address1,address2) = if (!(isActive)) | |
134 | 134 | then throw("DApp is inactive at this moment") | |
135 | 135 | else { | |
136 | 136 | let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A")) | |
137 | 137 | [DeleteEntry(((address1 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address1 + keyUserENNOVoted)), DeleteEntry(((address2 + airdropToken) + keyUserENNOVotedYESValue)), DeleteEntry((address2 + keyUserENNOVoted))] | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(i) | |
143 | 143 | func initVote (start,end,token,amount) = if (!(isActive)) | |
144 | 144 | then throw("DApp is inactive at this moment") | |
145 | - | else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0), BooleanEntry(claimAvailable, false)] | |
145 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
146 | + | then throw("Only admin can call this function") | |
147 | + | else [StringEntry(activeAirdropToken, token), IntegerEntry(activeAirdropAmount, amount), IntegerEntry(keyVoteStart, start), IntegerEntry(keyVoteEnd, end), IntegerEntry(keyTotalYesVoted, 0), BooleanEntry(claimAvailable, false)] | |
146 | 148 | ||
147 | 149 | ||
148 | 150 | ||
149 | 151 | @Callable(i) | |
150 | 152 | func activateAirdropClaim (set) = if (!(isActive)) | |
151 | 153 | then throw("DApp is inactive at this moment") | |
152 | - | else [BooleanEntry(claimAvailable, set)] | |
154 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
155 | + | then throw("Only admin can call this function") | |
156 | + | else [BooleanEntry(claimAvailable, set)] | |
153 | 157 | ||
154 | 158 | ||
155 | 159 | ||
156 | 160 | @Callable(i) | |
157 | 161 | func unvote (voteAmount) = if (!(isActive)) | |
158 | 162 | then throw("DApp is inactive at this moment") | |
159 | 163 | else if ((getVal(keyVoteStart) > height)) | |
160 | 164 | then throw("Voting has not started yet.") | |
161 | 165 | else if ((height > getVal(keyVoteEnd))) | |
162 | 166 | then throw("Voting has already ended.") | |
163 | 167 | else { | |
164 | 168 | let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A")) | |
165 | 169 | let totalYes = getVal(keyTotalYesVoted) | |
166 | 170 | let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue)) | |
167 | 171 | let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted) | |
168 | 172 | let userENNOVotedNew = (userENNOVoted - voteAmount) | |
169 | 173 | if ((0 > userENNOVotedNew)) | |
170 | 174 | then throw("Vote amount is less than available.") | |
171 | 175 | else { | |
172 | 176 | let userVoteValue = setShare(voteAmount) | |
173 | 177 | let userENNOVotedNewShare = (userVotedYes - userVoteValue) | |
174 | 178 | let newTotalYesVoted = (totalYes - userVoteValue) | |
175 | 179 | [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)] | |
176 | 180 | } | |
177 | 181 | } | |
178 | 182 | ||
179 | 183 | ||
180 | 184 | ||
181 | 185 | @Callable(i) | |
182 | 186 | func vote (voteAmount) = if (!(isActive)) | |
183 | 187 | then throw("DApp is inactive at this moment") | |
184 | 188 | else if ((getVal(keyVoteStart) > height)) | |
185 | 189 | then throw("Voting has not started yet.") | |
186 | 190 | else if ((height > getVal(keyVoteEnd))) | |
187 | 191 | then throw("Voting has already ended.") | |
188 | 192 | else { | |
189 | 193 | let totalYes = getVal(keyTotalYesVoted) | |
190 | 194 | let airdropToken = ("_" + valueOrElse(getString(this, activeAirdropToken), "N/A")) | |
191 | 195 | let userVotedYes = getUserVoteData(i.caller, (airdropToken + keyUserENNOVotedYESValue)) | |
192 | 196 | let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted) | |
193 | 197 | let userENNOLocked = getUserVoteData(i.caller, keyUserENNOLocked) | |
194 | 198 | let userENNOVotedNew = (userENNOVoted + voteAmount) | |
195 | 199 | if ((0 > userENNOVotedNew)) | |
196 | 200 | then throw("Vote amount is more than available.") | |
197 | 201 | else { | |
198 | 202 | let availableVote = (userENNOLocked - userENNOVoted) | |
199 | 203 | let userVoteValue = setShare(voteAmount) | |
200 | 204 | if ((voteAmount > availableVote)) | |
201 | 205 | then throw("Vote amount is more than available.") | |
202 | 206 | else { | |
203 | 207 | let userENNOVotedNewShare = (userVotedYes + userVoteValue) | |
204 | 208 | let newTotalYesVoted = (totalYes + userVoteValue) | |
205 | 209 | [IntegerEntry(((toString(i.caller) + airdropToken) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)] | |
206 | 210 | } | |
207 | 211 | } | |
208 | 212 | } | |
209 | 213 | ||
210 | 214 | ||
211 | 215 | ||
212 | 216 | @Callable(i) | |
213 | 217 | func lockENNO () = if (!(isActive)) | |
214 | 218 | then throw("DApp is inactive at this moment") | |
215 | 219 | else { | |
216 | - | let $ | |
217 | - | let pmtAmount = $ | |
218 | - | let pmtAssetId = $ | |
220 | + | let $t083118386 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
221 | + | let pmtAmount = $t083118386._1 | |
222 | + | let pmtAssetId = $t083118386._2 | |
219 | 223 | if ((pmtAssetId != ENNO)) | |
220 | 224 | then throw("Incorrect payment assetId only Enno Cash is allowed.") | |
221 | 225 | else { | |
222 | 226 | let userENNOLocked = getUserENNOLocked(i.caller) | |
223 | 227 | let userENNOLockedNew = (userENNOLocked + pmtAmount) | |
224 | 228 | let totalENNOLocked = getTotalENNOLocked() | |
225 | 229 | let totalENNOLockedNew = (totalENNOLocked + pmtAmount) | |
226 | 230 | [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)] | |
227 | 231 | } | |
228 | 232 | } | |
229 | 233 | ||
230 | 234 | ||
231 | 235 | ||
232 | 236 | @Callable(i) | |
233 | 237 | func withdrawENNO (withdrawAmount) = if (!(isActive)) | |
234 | 238 | then throw("DApp is inactive at this moment") | |
235 | 239 | else { | |
236 | 240 | let userENNOLocked = getUserENNOLocked(i.caller) | |
237 | 241 | let availableToWithdraw = (userENNOLocked - getVal((toString(i.caller) + keyUserENNOVoted))) | |
238 | 242 | if ((withdrawAmount > availableToWithdraw)) | |
239 | 243 | then throw("Your Enno is locked") | |
240 | 244 | else if ((0 >= withdrawAmount)) | |
241 | 245 | then throw("withdrawAmount <= 0") | |
242 | 246 | else { | |
243 | 247 | let totalENNOLocked = getTotalENNOLocked() | |
244 | 248 | if ((withdrawAmount > totalENNOLocked)) | |
245 | 249 | then throw("withdrawAmount is more than available to withdraw") | |
246 | 250 | else if ((withdrawAmount > userENNOLocked)) | |
247 | 251 | then throw("You are trying to unstake more than you have staked.") | |
248 | 252 | else { | |
249 | 253 | let totalENNOLockedNew = (totalENNOLocked - withdrawAmount) | |
250 | 254 | let userENNOamountNew = (userENNOLocked - withdrawAmount) | |
251 | 255 | [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)] | |
252 | 256 | } | |
253 | 257 | } | |
254 | 258 | } | |
255 | 259 | ||
256 | 260 | ||
257 | 261 | ||
258 | 262 | @Callable(i) | |
259 | 263 | func claimAndWithdrawENNO () = if (!(isActive)) | |
260 | 264 | then throw("DApp is inactive at this moment") | |
261 | 265 | else { | |
262 | 266 | let userShare = getCallerShare(i.originCaller) | |
263 | 267 | let userClaimedAmount = getClaimedAmount(i.originCaller) | |
264 | 268 | let claimAmount = (userShare - userClaimedAmount) | |
265 | 269 | let totalENNOLocked = getTotalENNOLocked() | |
266 | 270 | if ((claimAmount > totalENNOLocked)) | |
267 | 271 | then throw("claimAmount is more than available to withdraw") | |
268 | 272 | else if ((0 >= claimAmount)) | |
269 | 273 | then throw("Claim amount must be bigger than 0") | |
270 | 274 | else { | |
271 | 275 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
272 | 276 | [IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), ScriptTransfer(i.originCaller, claimAmount, ENNO)] | |
273 | 277 | } | |
274 | 278 | } | |
275 | 279 | ||
276 | 280 | ||
277 | 281 | ||
278 | 282 | @Callable(i) | |
279 | 283 | func claimAndStakeENNO () = if (!(isActive)) | |
280 | 284 | then throw("DApp is inactive at this moment") | |
281 | 285 | else { | |
282 | 286 | let userShare = getCallerShare(i.originCaller) | |
283 | 287 | let userClaimedAmount = getClaimedAmount(i.originCaller) | |
284 | 288 | let claimAmount = (userShare - userClaimedAmount) | |
285 | 289 | if ((0 >= claimAmount)) | |
286 | 290 | then throw("Claim amount must be bigger than 0") | |
287 | 291 | else { | |
288 | 292 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
289 | 293 | let userENNOLocked = getUserENNOLocked(i.originCaller) | |
290 | 294 | let userENNOLockedNew = (userENNOLocked + claimAmount) | |
291 | 295 | let totalENNOLocked = getTotalENNOLocked() | |
292 | 296 | let totalENNOLockedNew = (totalENNOLocked + claimAmount) | |
293 | 297 | [IntegerEntry((toString(i.originCaller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)] | |
294 | 298 | } | |
295 | 299 | } | |
296 | 300 | ||
297 | 301 | ||
298 | 302 | ||
299 | 303 | @Callable(i) | |
300 | 304 | func shutdown () = if (!(isActive)) | |
301 | 305 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
302 | 306 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
303 | 307 | then throw("Only admin can call this function") | |
304 | 308 | else suspend("Paused by admin") | |
305 | 309 | ||
306 | 310 | ||
307 | 311 | ||
308 | 312 | @Callable(i) | |
309 | 313 | func activate () = if (isActive) | |
310 | 314 | then throw("DApp is already active") | |
311 | 315 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
312 | 316 | then throw("Only admin can call this function") | |
313 | 317 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
314 | 318 | ||
315 | 319 | ||
316 | 320 | @Verifier(tx) | |
317 | 321 | func verify () = { | |
318 | 322 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
319 | 323 | then 1 | |
320 | 324 | else 0 | |
321 | 325 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
322 | 326 | then 1 | |
323 | 327 | else 0 | |
324 | 328 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
325 | 329 | then 1 | |
326 | 330 | else 0 | |
327 | 331 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
328 | 332 | } | |
329 | 333 |
github/deemru/w8io/169f3d6 77.45 ms ◑