tx · 6gee9Wyas6LnQ3geZHBsiPxAP8auvDfivvZUZakMeV4i 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL: -0.01500000 Waves 2022.06.01 11:13 [2077029] smart account 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL > SELF 0.00000000 Waves
{ "type": 13, "id": "6gee9Wyas6LnQ3geZHBsiPxAP8auvDfivvZUZakMeV4i", "fee": 1500000, "feeAssetId": null, "timestamp": 1654071216537, "version": 1, "sender": "3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL", "senderPublicKey": "DnPyGWCgpQChvoQrnXQRcC9FtN32mPGrcog2wcKHdkVn", "proofs": [ "2XR4E9HsAwGANZ4vRMp8H9jHcZtBs8urr3kQ1LZE6ChGmnz2DQWxSUUcPvu4zoy7jDkPYF8khUxTQ1UFiDgFzRLu" ], "script": "base64:AAIFAAAAAAAAADUIAhIDCgEIEgASBAoCCAESBQoDCAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgASAwoBCAAAABUAAAAACXNlcGFyYXRvcgIAAAACX18AAAAACG1heFNoYXJlAAAAAAAAAABkAAAAAA5rZXlFcG9jaExlbmd0aAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAC2Vwb2NoTGVuZ3RoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5U3RhcnRIZWlnaHQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAtzdGFydEhlaWdodAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAB92b3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0BQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAATa2V5Qm9vc3RpbmdDb250cmFjdAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAA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QIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXlYXpEE", "chainId": 84, "height": 2077029, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7ymi4VA8L6BBGzUEHZWwPCUYSdHywrG4wqYa36sz8Kn6 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let separator = "__" | |
5 | + | ||
6 | + | let maxShare = 100 | |
7 | + | ||
8 | + | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
9 | + | ||
10 | + | let keyStartHeight = makeString(["%s", "startHeight"], separator) | |
11 | + | ||
12 | + | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
13 | + | ||
14 | + | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
15 | + | ||
16 | + | func keyInList (pool) = { | |
17 | + | let $t0527567 = pool | |
18 | + | let amountAssetId = $t0527567._1 | |
19 | + | let priceAssetId = $t0527567._2 | |
20 | + | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
21 | + | } | |
22 | + | ||
23 | + | ||
24 | + | func keyShareUsed (address) = makeString(["%s%s", "shareUsed", toString(address)], separator) | |
25 | + | ||
26 | + | ||
27 | + | func keyVoteShare (address,pool) = { | |
28 | + | let $t0812852 = pool | |
29 | + | let amountAssetId = $t0812852._1 | |
30 | + | let priceAssetId = $t0812852._2 | |
31 | + | makeString(["%s%s%s%s", "voteShare", amountAssetId, priceAssetId, toString(address)], separator) | |
32 | + | } | |
33 | + | ||
34 | + | ||
35 | + | func keyVoteGwx (address,pool) = { | |
36 | + | let $t010421082 = pool | |
37 | + | let amountAssetId = $t010421082._1 | |
38 | + | let priceAssetId = $t010421082._2 | |
39 | + | makeString(["%s%s%s%s", "voteGwx", amountAssetId, priceAssetId, toString(address)], separator) | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | func keyVotingResult (pool) = { | |
44 | + | let $t012341274 = pool | |
45 | + | let amountAssetId = $t012341274._1 | |
46 | + | let priceAssetId = $t012341274._2 | |
47 | + | makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator) | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | func getValueOrFail (address,key,type) = { | |
52 | + | let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "") | |
53 | + | valueOrErrorMessage( match type { | |
54 | + | case str: String => | |
55 | + | getString(address, key) | |
56 | + | case int: Int => | |
57 | + | getInteger(address, key) | |
58 | + | case _ => | |
59 | + | throw("invalid entry type") | |
60 | + | }, error) | |
61 | + | } | |
62 | + | ||
63 | + | ||
64 | + | func getStrOrFail (address,key) = { | |
65 | + | let @ = getValueOrFail(address, key, 0) | |
66 | + | if ($isInstanceOf(@, "String")) | |
67 | + | then @ | |
68 | + | else throw("Couldn't cast Int|String to String") | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | func getStrOrUnit (address,key) = { | |
73 | + | let @ = getValueOrFail(address, key, 0) | |
74 | + | if ($isInstanceOf(@, "String")) | |
75 | + | then @ | |
76 | + | else unit | |
77 | + | } | |
78 | + | ||
79 | + | ||
80 | + | func getIntOrFail (address,key) = { | |
81 | + | let @ = getValueOrFail(address, key, 0) | |
82 | + | if ($isInstanceOf(@, "Int")) | |
83 | + | then @ | |
84 | + | else throw("Couldn't cast Int|String to Int") | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | func getIntOrUnit (address,key) = { | |
89 | + | let @ = getValueOrFail(address, key, 0) | |
90 | + | if ($isInstanceOf(@, "Int")) | |
91 | + | then @ | |
92 | + | else unit | |
93 | + | } | |
94 | + | ||
95 | + | ||
96 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
97 | + | ||
98 | + | ||
99 | + | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
100 | + | ||
101 | + | ||
102 | + | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
103 | + | case s: String => | |
104 | + | fromBase58String(s) | |
105 | + | case _: Unit => | |
106 | + | unit | |
107 | + | case _ => | |
108 | + | throw("Match error") | |
109 | + | } | |
110 | + | ||
111 | + | ||
112 | + | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
113 | + | case s: String => | |
114 | + | fromBase58String(s) | |
115 | + | case _: Unit => | |
116 | + | unit | |
117 | + | case _ => | |
118 | + | throw("Match error") | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func mustManager (i) = { | |
123 | + | let pd = throw("Permission denied") | |
124 | + | match managerPublicKeyOrUnit() { | |
125 | + | case pk: ByteVector => | |
126 | + | if ((i.callerPublicKey == pk)) | |
127 | + | then true | |
128 | + | else pd | |
129 | + | case _: Unit => | |
130 | + | if ((i.caller == this)) | |
131 | + | then true | |
132 | + | else pd | |
133 | + | case _ => | |
134 | + | throw("Match error") | |
135 | + | } | |
136 | + | } | |
137 | + | ||
138 | + | ||
139 | + | @Callable(i) | |
140 | + | func setManager (pendingManagerPublicKey) = { | |
141 | + | let checkCaller = mustManager(i) | |
142 | + | if ((checkCaller == checkCaller)) | |
143 | + | then { | |
144 | + | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
145 | + | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
146 | + | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
147 | + | else throw("Strict value is not equal to itself.") | |
148 | + | } | |
149 | + | else throw("Strict value is not equal to itself.") | |
150 | + | } | |
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | @Callable(i) | |
155 | + | func confirmManager () = { | |
156 | + | let pm = pendingManagerPublicKeyOrUnit() | |
157 | + | let hasPM = if (isDefined(pm)) | |
158 | + | then true | |
159 | + | else throw("No pending manager") | |
160 | + | if ((hasPM == hasPM)) | |
161 | + | then { | |
162 | + | let checkPM = if ((i.callerPublicKey == value(pm))) | |
163 | + | then true | |
164 | + | else throw("You are not pending manager") | |
165 | + | if ((checkPM == checkPM)) | |
166 | + | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
167 | + | else throw("Strict value is not equal to itself.") | |
168 | + | } | |
169 | + | else throw("Strict value is not equal to itself.") | |
170 | + | } | |
171 | + | ||
172 | + | ||
173 | + | ||
174 | + | @Callable(i) | |
175 | + | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
176 | + | let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address") | |
177 | + | $Tuple2(nil, { | |
178 | + | let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
179 | + | if ($isInstanceOf(@, "Int")) | |
180 | + | then @ | |
181 | + | else throw("Couldn't cast Any to Int") | |
182 | + | }) | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | @Callable(i) | |
188 | + | func constructor (votingEmissionCandidateContract,boostingContract,epochLength) = { | |
189 | + | let cheks = [mustManager(i), if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
190 | + | then true | |
191 | + | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
192 | + | then true | |
193 | + | else "invalid boosting contract address", if ((epochLength > 0)) | |
194 | + | then true | |
195 | + | else throw("invalid epoch length")] | |
196 | + | if ((cheks == cheks)) | |
197 | + | then $Tuple2([StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
198 | + | else throw("Strict value is not equal to itself.") | |
199 | + | } | |
200 | + | ||
201 | + | ||
202 | + | ||
203 | + | @Callable(i) | |
204 | + | func create (amountAssetId,priceAssetId) = { | |
205 | + | let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), ""))) | |
206 | + | then true | |
207 | + | else mustManager(i)] | |
208 | + | if ((checks == checks)) | |
209 | + | then { | |
210 | + | let pool = $Tuple2(amountAssetId, priceAssetId) | |
211 | + | let inListActions = [BooleanEntry(keyInList(pool), true)] | |
212 | + | let startHeightIsNotDefined = (getString(this, keyStartHeight) == unit) | |
213 | + | let startHeightActions = if (startHeightIsNotDefined) | |
214 | + | then [IntegerEntry(keyStartHeight, height)] | |
215 | + | else nil | |
216 | + | $Tuple2((inListActions ++ startHeightActions), unit) | |
217 | + | } | |
218 | + | else throw("Strict value is not equal to itself.") | |
219 | + | } | |
220 | + | ||
221 | + | ||
222 | + | ||
223 | + | @Callable(i) | |
224 | + | func vote (amountAssetId,priceAssetId,share) = { | |
225 | + | let pool = $Tuple2(amountAssetId, priceAssetId) | |
226 | + | let startHeight = getIntOrFail(this, keyStartHeight) | |
227 | + | let epochLength = getIntOrFail(this, keyEpochLength) | |
228 | + | let endHeight = (startHeight + epochLength) | |
229 | + | let shareUsed = valueOrElse(getIntOrUnit(this, keyShareUsed(i.caller)), 0) | |
230 | + | let poolVoteShare = valueOrElse(getIntOrUnit(this, keyVoteShare(i.caller, pool)), 0) | |
231 | + | let userMaxShare = (maxShare - shareUsed) | |
232 | + | let newShare = (poolVoteShare + share) | |
233 | + | let gwxAmountAtEndTotal = { | |
234 | + | let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil) | |
235 | + | if ($isInstanceOf(@, "Int")) | |
236 | + | then @ | |
237 | + | else throw("Couldn't cast Any to Int") | |
238 | + | } | |
239 | + | let gwxAmountAtEnd = fraction(gwxAmountAtEndTotal, newShare, maxShare) | |
240 | + | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
241 | + | then true | |
242 | + | else throw("invalid assets"), if ((endHeight > height)) | |
243 | + | then true | |
244 | + | else throw("invalid height"), if ((gwxAmountAtEnd > 0)) | |
245 | + | then true | |
246 | + | else throw("you do not have gWX"), if (if ((share > 0)) | |
247 | + | then (userMaxShare >= share) | |
248 | + | else false) | |
249 | + | then true | |
250 | + | else throw("invalid share")] | |
251 | + | if ((checks == checks)) | |
252 | + | then $Tuple2([IntegerEntry(keyShareUsed(i.caller), (shareUsed + share)), IntegerEntry(keyVoteShare(i.caller, pool), newShare), IntegerEntry(keyVoteGwx(i.caller, pool), gwxAmountAtEnd)], unit) | |
253 | + | else throw("Strict value is not equal to itself.") | |
254 | + | } | |
255 | + | ||
256 | + | ||
257 | + | ||
258 | + | @Callable(i) | |
259 | + | func cancelVote (amountAssetId,priceAssetId) = { | |
260 | + | let pool = $Tuple2(amountAssetId, priceAssetId) | |
261 | + | let startHeight = getIntOrFail(this, keyStartHeight) | |
262 | + | let epochLength = getIntOrFail(this, keyEpochLength) | |
263 | + | let endHeight = (startHeight + epochLength) | |
264 | + | let poolVoteShare = valueOrElse(getIntOrUnit(this, keyVoteShare(i.caller, pool)), 0) | |
265 | + | let shareUsed = valueOrElse(getIntOrUnit(this, keyShareUsed(i.caller)), 0) | |
266 | + | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
267 | + | then true | |
268 | + | else throw("invalid assets"), if ((endHeight > height)) | |
269 | + | then true | |
270 | + | else throw("invalid height"), if ((poolVoteShare > 0)) | |
271 | + | then true | |
272 | + | else throw("no vote")] | |
273 | + | if ((checks == checks)) | |
274 | + | then $Tuple2([IntegerEntry(keyShareUsed(i.caller), max([(shareUsed - poolVoteShare), 0])), DeleteEntry(keyVoteShare(i.caller, pool)), DeleteEntry(keyVoteGwx(i.caller, pool))], unit) | |
275 | + | else throw("Strict value is not equal to itself.") | |
276 | + | } | |
277 | + | ||
278 | + | ||
279 | + | ||
280 | + | @Callable(i) | |
281 | + | func setEpochLength (newEpochLength) = { | |
282 | + | let cheks = [mustManager(i), if ((newEpochLength > 0)) | |
283 | + | then true | |
284 | + | else throw("invalid epoch length")] | |
285 | + | if ((cheks == cheks)) | |
286 | + | then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit) | |
287 | + | else throw("Strict value is not equal to itself.") | |
288 | + | } | |
289 | + | ||
290 | + | ||
291 | + | ||
292 | + | @Callable(i) | |
293 | + | func finalize () = $Tuple2(nil, unit) | |
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | @Callable(i) | |
298 | + | func onVerificationLoss (assetId) = $Tuple2(nil, unit) | |
299 | + | ||
300 | + | ||
301 | + | @Verifier(tx) | |
302 | + | func verify () = { | |
303 | + | let targetPublicKey = match managerPublicKeyOrUnit() { | |
304 | + | case pk: ByteVector => | |
305 | + | pk | |
306 | + | case _: Unit => | |
307 | + | tx.senderPublicKey | |
308 | + | case _ => | |
309 | + | throw("Match error") | |
310 | + | } | |
311 | + | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
312 | + | } | |
313 | + |
github/deemru/w8io/026f985 22.22 ms ◑