tx · BaXN1ZTRY5MBRaXVTDQBEbpfZWmRTao2USpiSq5AjLd 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves 2021.11.09 10:13 [1783158] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{ "type": 13, "id": "BaXN1ZTRY5MBRaXVTDQBEbpfZWmRTao2USpiSq5AjLd", "fee": 14000000, "feeAssetId": null, "timestamp": 1636442044418, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "62wPJgv4nNGC34zxqaf41WtsoP8mMbeMe1L925EsmD3hXLi5mEXTKQd5s3U1YRNh3NhbPYdAKkU8dvETMsDiaNwf" ], "script": "base64:AAIFAAAAAAAAABgIAhIFCgMBBAQSABIDCgEBEgASABIAEgAAAAAjAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVFbmQCAAAAD3ZvdGVfZW5kX2hlaWdodAAAAAAKa2V5Vm90ZVllcwIAAAAKeWVzX2Ftb3VudAAAAAAJa2V5Vm90ZU5vAgAAAAlub19hbW91bnQAAAAA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UHViS2V5MQAAAAAAAAAAAQAAAAAAAAAAAAQAAAASYWRtaW5QdWJLZXkyU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAADGFkbWluUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAQAAAASYWRtaW5QdWJLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAoczHNA=", "height": 1783158, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 76yuJkUuBw7RZSq1Jyj8Bw474uU8dZspCBtabHiNmuUj Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let adminPubKey1 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
5 | + | ||
6 | + | let adminPubKey2 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
7 | + | ||
8 | + | let adminPubKey3 = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
9 | + | ||
10 | + | let adminPubKeyStartStop = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
11 | + | ||
12 | + | let keyActive = "active" | |
13 | + | ||
14 | + | let keyCause = "shutdown_cause" | |
15 | + | ||
16 | + | let keyVoteStart = "vote_start_height" | |
17 | + | ||
18 | + | let keyVoteEnd = "vote_end_height" | |
19 | + | ||
20 | + | let keyVoteYes = "yes_amount" | |
21 | + | ||
22 | + | let keyVoteNo = "no_amount" | |
23 | + | ||
24 | + | let keyUserENNOVoted = "_ENNO_vote" | |
25 | + | ||
26 | + | let keyUserENNOVotedHeight = "_ENNO_vote_height" | |
27 | + | ||
28 | + | let keyUserENNOVotedValue = "_ENNO_vote_value" | |
29 | + | ||
30 | + | let keyUserENNOVotedYESValue = "_ENNO_vote_yes_share" | |
31 | + | ||
32 | + | let keyUserENNOVotedNOValue = "_ENNO_vote_no_share" | |
33 | + | ||
34 | + | let keyTotalYesVoted = "total_ENNO_vote_yes" | |
35 | + | ||
36 | + | let keyTotalNoVoted = "total_ENNO_vote_no" | |
37 | + | ||
38 | + | let keyUserENNOLocked = "_ENNO_amount" | |
39 | + | ||
40 | + | let keyTotalENNOLocked = "total_ENNO_amount" | |
41 | + | ||
42 | + | let keyTotalVoted = "total_ENNO_vote" | |
43 | + | ||
44 | + | let keyTotalVoteShare = "total_ENNO_vote_share" | |
45 | + | ||
46 | + | let keyUserENNOClaimedAmount = "_ENNO_claimed_amount" | |
47 | + | ||
48 | + | let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount" | |
49 | + | ||
50 | + | let keyUserENNOLockedTag = "share_" | |
51 | + | ||
52 | + | let isActive = valueOrElse(getBoolean(this, keyActive), true) | |
53 | + | ||
54 | + | let shareData = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
55 | + | ||
56 | + | let ENNO = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' | |
57 | + | ||
58 | + | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
59 | + | ||
60 | + | ||
61 | + | func getUserENNOLocked (user) = valueOrElse(getInteger(this, (toString(user) + keyUserENNOLocked)), 0) | |
62 | + | ||
63 | + | ||
64 | + | func getTotalENNOLocked () = valueOrElse(getInteger(this, keyTotalENNOLocked), 0) | |
65 | + | ||
66 | + | ||
67 | + | func getUserVoteData (user,key) = valueOrElse(getInteger(this, (toString(user) + key)), 0) | |
68 | + | ||
69 | + | ||
70 | + | func getVal (key) = valueOrElse(getInteger(this, key), 0) | |
71 | + | ||
72 | + | ||
73 | + | func getCallerShare (caller) = { | |
74 | + | let callerShare = getInteger(addressFromPublicKey(shareData), (keyUserENNOLockedTag + toString(caller))) | |
75 | + | let callerShareAmount = match callerShare { | |
76 | + | case share: Int => | |
77 | + | share | |
78 | + | case share: Unit => | |
79 | + | throw("Only governance qualifiers can call this function.") | |
80 | + | case _ => | |
81 | + | throw("Match error") | |
82 | + | } | |
83 | + | callerShareAmount | |
84 | + | } | |
85 | + | ||
86 | + | ||
87 | + | func getClaimedAmount (caller) = { | |
88 | + | let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount)) | |
89 | + | let callerWithdrawnAmount = match callerWithdrawn { | |
90 | + | case share: Int => | |
91 | + | share | |
92 | + | case share: Unit => | |
93 | + | 0 | |
94 | + | case _ => | |
95 | + | throw("Match error") | |
96 | + | } | |
97 | + | callerWithdrawnAmount | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | func setShare (amount,add) = { | |
102 | + | let deltaHeight = (getVal(keyVoteEnd) - height) | |
103 | + | let share = (amount * deltaHeight) | |
104 | + | if (add) | |
105 | + | then share | |
106 | + | else (share * -1) | |
107 | + | } | |
108 | + | ||
109 | + | ||
110 | + | @Callable(i) | |
111 | + | func vote (voteAmount,vote,add) = if (!(isActive)) | |
112 | + | then throw("DApp is inactive at this moment") | |
113 | + | else if ((getVal(keyVoteStart) > height)) | |
114 | + | then throw("Voting has not started yet.") | |
115 | + | else if ((height > getVal(keyVoteEnd))) | |
116 | + | then throw("Voting has already ended.") | |
117 | + | else { | |
118 | + | let totalYes = getVal(keyTotalYesVoted) | |
119 | + | let totalNo = getVal(keyTotalNoVoted) | |
120 | + | let userVotedYes = getUserVoteData(i.caller, keyUserENNOVotedYESValue) | |
121 | + | let userVotedNo = getUserVoteData(i.caller, keyUserENNOVotedNOValue) | |
122 | + | let userENNOVoted = getUserVoteData(i.caller, keyUserENNOVoted) | |
123 | + | let userENNOLocked = getUserVoteData(i.caller, keyUserENNOLocked) | |
124 | + | let userENNOVotedNew = if (add) | |
125 | + | then (userENNOVoted + voteAmount) | |
126 | + | else (userENNOVoted - voteAmount) | |
127 | + | let availableVote = (userENNOLocked - userENNOVoted) | |
128 | + | let userVoteValue = setShare(voteAmount, add) | |
129 | + | if ((voteAmount > availableVote)) | |
130 | + | then throw("Vote amount is more than available.") | |
131 | + | else if (vote) | |
132 | + | then { | |
133 | + | let userENNOVotedNewShare = (userVotedYes + userVoteValue) | |
134 | + | let newTotalYesVoted = (totalYes + userENNOVotedNewShare) | |
135 | + | let totalENNOVoted = getVal(keyTotalVoted) | |
136 | + | let totalENNOVotedNew = (totalENNOVoted + userVoteValue) | |
137 | + | [IntegerEntry((toString(i.caller) + keyUserENNOVotedHeight), height), IntegerEntry((toString(i.caller) + keyUserENNOVotedYESValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalVoted, totalENNOVotedNew), IntegerEntry(keyTotalYesVoted, newTotalYesVoted)] | |
138 | + | } | |
139 | + | else { | |
140 | + | let userENNOVotedNewShare = (userVotedNo + userVoteValue) | |
141 | + | let newTotalNoVoted = (totalNo + userENNOVotedNewShare) | |
142 | + | let totalENNOVoted = getVal(keyTotalVoted) | |
143 | + | let totalENNOVotedNew = (totalENNOVoted + userVoteValue) | |
144 | + | [IntegerEntry((toString(i.caller) + keyUserENNOVotedHeight), height), IntegerEntry((toString(i.caller) + keyUserENNOVotedNOValue), userENNOVotedNewShare), IntegerEntry((toString(i.caller) + keyUserENNOVoted), userENNOVotedNew), IntegerEntry(keyTotalVoted, totalENNOVotedNew), IntegerEntry(keyTotalNoVoted, newTotalNoVoted)] | |
145 | + | } | |
146 | + | } | |
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | @Callable(i) | |
151 | + | func lockENNO () = if (!(isActive)) | |
152 | + | then throw("DApp is inactive at this moment") | |
153 | + | else { | |
154 | + | let $t056995774 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
155 | + | let pmtAmount = $t056995774._1 | |
156 | + | let pmtAssetId = $t056995774._2 | |
157 | + | if ((pmtAssetId != ENNO)) | |
158 | + | then throw("Incorrect payment assetId only Enno Cash is allowed.") | |
159 | + | else { | |
160 | + | let userENNOLocked = getUserENNOLocked(i.caller) | |
161 | + | let userENNOLockedNew = (userENNOLocked + pmtAmount) | |
162 | + | let totalENNOLocked = getTotalENNOLocked() | |
163 | + | let totalENNOLockedNew = (totalENNOLocked + pmtAmount) | |
164 | + | [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)] | |
165 | + | } | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(i) | |
171 | + | func withdrawENNO (withdrawAmount) = if (!(isActive)) | |
172 | + | then throw("DApp is inactive at this moment") | |
173 | + | else if ((0 >= withdrawAmount)) | |
174 | + | then throw("withdrawAmount <= 0") | |
175 | + | else { | |
176 | + | let totalENNOLocked = getTotalENNOLocked() | |
177 | + | let userENNOLocked = getUserENNOLocked(i.caller) | |
178 | + | if ((withdrawAmount > totalENNOLocked)) | |
179 | + | then throw("withdrawAmount is more than available to withdraw") | |
180 | + | else if ((withdrawAmount > userENNOLocked)) | |
181 | + | then throw("You are trying to unstake more than you have staked.") | |
182 | + | else { | |
183 | + | let totalENNOLockedNew = (totalENNOLocked - withdrawAmount) | |
184 | + | let userENNOamountNew = (userENNOLocked - withdrawAmount) | |
185 | + | [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)] | |
186 | + | } | |
187 | + | } | |
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | @Callable(i) | |
192 | + | func claimAndWithdrawENNO () = if (!(isActive)) | |
193 | + | then throw("DApp is inactive at this moment") | |
194 | + | else { | |
195 | + | let userShare = getCallerShare(i.originCaller) | |
196 | + | let userClaimedAmount = getClaimedAmount(i.originCaller) | |
197 | + | let claimAmount = (userShare - userClaimedAmount) | |
198 | + | let totalENNOLocked = getTotalENNOLocked() | |
199 | + | if ((claimAmount > totalENNOLocked)) | |
200 | + | then throw("claimAmount is more than available to withdraw") | |
201 | + | else if ((0 >= claimAmount)) | |
202 | + | then throw("Claim amount must be bigger than 0") | |
203 | + | else { | |
204 | + | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
205 | + | [IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), ScriptTransfer(i.originCaller, claimAmount, ENNO)] | |
206 | + | } | |
207 | + | } | |
208 | + | ||
209 | + | ||
210 | + | ||
211 | + | @Callable(i) | |
212 | + | func claimAndStakeENNO () = if (!(isActive)) | |
213 | + | then throw("DApp is inactive at this moment") | |
214 | + | else { | |
215 | + | let userShare = getCallerShare(i.originCaller) | |
216 | + | let userClaimedAmount = getClaimedAmount(i.originCaller) | |
217 | + | let claimAmount = (userShare - userClaimedAmount) | |
218 | + | if ((0 >= claimAmount)) | |
219 | + | then throw("Claim amount must be bigger than 0") | |
220 | + | else { | |
221 | + | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
222 | + | let userENNOLocked = getUserENNOLocked(i.originCaller) | |
223 | + | let userENNOLockedNew = (userENNOLocked + claimAmount) | |
224 | + | let totalENNOLocked = getTotalENNOLocked() | |
225 | + | let totalENNOLockedNew = (totalENNOLocked + claimAmount) | |
226 | + | [IntegerEntry((toString(i.originCaller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry((toString(i.originCaller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.originCaller) + keyUserENNOLastClaimedAmount), claimAmount), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)] | |
227 | + | } | |
228 | + | } | |
229 | + | ||
230 | + | ||
231 | + | ||
232 | + | @Callable(i) | |
233 | + | func shutdown () = if (!(isActive)) | |
234 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
235 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
236 | + | then throw("Only admin can call this function") | |
237 | + | else suspend("Paused by admin") | |
238 | + | ||
239 | + | ||
240 | + | ||
241 | + | @Callable(i) | |
242 | + | func activate () = if (isActive) | |
243 | + | then throw("DApp is already active") | |
244 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
245 | + | then throw("Only admin can call this function") | |
246 | + | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
247 | + | ||
248 | + | ||
249 | + | @Verifier(tx) | |
250 | + | func verify () = { | |
251 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
252 | + | then 1 | |
253 | + | else 0 | |
254 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
255 | + | then 1 | |
256 | + | else 0 | |
257 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
258 | + | then 1 | |
259 | + | else 0 | |
260 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
261 | + | } | |
262 | + |
github/deemru/w8io/026f985 20.47 ms ◑