tx · AcP9fHThEBmPtsUuoQ7o4yrnxLXhSXkaAKGnc3jRNGvr

3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL:  -0.01800000 Waves

2022.06.01 16:32 [2077352] smart account 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL > SELF 0.00000000 Waves

{ "type": 13, "id": "AcP9fHThEBmPtsUuoQ7o4yrnxLXhSXkaAKGnc3jRNGvr", "fee": 1800000, "feeAssetId": null, "timestamp": 1654090398163, "version": 1, "sender": "3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL", "senderPublicKey": "DnPyGWCgpQChvoQrnXQRcC9FtN32mPGrcog2wcKHdkVn", "proofs": [ "3fb5ztyjVdVNuCWxa7NpoV5R1v3n4ioMJN8dXb86geD4ov7enWDQeL2k7inUGJByEFq3KdWoQwkYXdWsejY6VHF7" ], "script": "base64:AAIFAAAAAAAAADUIAhIDCgEIEgASBAoCCAESBQoDCAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgASAwoBCAAAABwAAAAACXNlcGFyYXRvcgIAAAACX18AAAAACG1heFNoYXJlAAAAAAAAAABkAAAAAA5rZXlFcG9jaExlbmd0aAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAC2Vwb2NoTGVuZ3RoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAPa2V5Q3VycmVudEVwb2NoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAMY3VycmVudEVwb2NoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5U3RhcnRIZWlnaHQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAtzdGFydEhlaWdodAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAB92b3RpbmdFbWlzc2lvbkN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EdW5pdAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAIZmluYWxpemUAAAAACQAFFAAAAAIFAAAAA25pbAUAAAAEdW5pdAAAAAFpAQAAABJvblZlcmlmaWNhdGlvbkxvc3MAAAABAAAAB2Fzc2V0SWQJAAUUAAAAAgUAAAADbmlsBQAAAAR1bml0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleb/czuM=", "chainId": 84, "height": 2077352, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ymi4VA8L6BBGzUEHZWwPCUYSdHywrG4wqYa36sz8Kn6 Next: 8BtWfTksDrcodFa3aCMbnt7DuXESFgbnX5Dk6jDrwevW Diff:
OldNewDifferences
7474 let poolsListName = "__pools"
7575
7676 func getVotesListName (pool) = {
77- let $t021112151 = pool
78- let amountAssetId = $t021112151._1
79- let priceAssetId = $t021112151._2
77+ let $t021122152 = pool
78+ let amountAssetId = $t021122152._1
79+ let priceAssetId = $t021122152._2
8080 makeString(["%s%s__votes", amountAssetId, priceAssetId], separator)
8181 }
8282
9494
9595
9696 func containsNode (listName,id) = {
97- let head = getString(this, keyListHead(listName))
97+ let head = valueOrElse(getString(this, keyListHead(listName)), "")
9898 let prev = getString(this, keyListPrev(listName, id))
9999 let next = getString(this, keyListNext(listName, id))
100100 if (if ((id == head))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let maxShare = 100
77
88 let keyEpochLength = makeString(["%s", "epochLength"], separator)
99
1010 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator)
1111
1212 let keyStartHeight = makeString(["%s", "startHeight"], separator)
1313
1414 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
1515
1616 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
1717
1818 func keyInList (pool) = {
1919 let $t0594634 = pool
2020 let amountAssetId = $t0594634._1
2121 let priceAssetId = $t0594634._2
2222 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
2323 }
2424
2525
2626 func keyShareUsed (address) = makeString(["%s%s", "shareUsed", toString(address)], separator)
2727
2828
2929 func keyVoteShare (address,pool) = {
3030 let $t0879919 = pool
3131 let amountAssetId = $t0879919._1
3232 let priceAssetId = $t0879919._2
3333 makeString(["%s%s%s%s", "voteShare", amountAssetId, priceAssetId, toString(address)], separator)
3434 }
3535
3636
3737 func keyVotingResult (pool) = {
3838 let $t013181358 = pool
3939 let amountAssetId = $t013181358._1
4040 let priceAssetId = $t013181358._2
4141 makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator)
4242 }
4343
4444
4545 func getValueOrFail (address,key,type) = {
4646 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
4747 valueOrErrorMessage( match type {
4848 case str: String =>
4949 getString(address, key)
5050 case int: Int =>
5151 getInteger(address, key)
5252 case _ =>
5353 throw("invalid entry type")
5454 }, error)
5555 }
5656
5757
5858 func getStrOrFail (address,key) = {
5959 let @ = getValueOrFail(address, key, "")
6060 if ($isInstanceOf(@, "String"))
6161 then @
6262 else throw("Couldn't cast Int|String to String")
6363 }
6464
6565
6666 func getIntOrFail (address,key) = {
6767 let @ = getValueOrFail(address, key, 0)
6868 if ($isInstanceOf(@, "Int"))
6969 then @
7070 else throw("Couldn't cast Int|String to Int")
7171 }
7272
7373
7474 let poolsListName = "__pools"
7575
7676 func getVotesListName (pool) = {
77- let $t021112151 = pool
78- let amountAssetId = $t021112151._1
79- let priceAssetId = $t021112151._2
77+ let $t021122152 = pool
78+ let amountAssetId = $t021122152._1
79+ let priceAssetId = $t021122152._2
8080 makeString(["%s%s__votes", amountAssetId, priceAssetId], separator)
8181 }
8282
8383
8484 func keyListHead (listName) = makeString([("%s%s" + listName), "head"], separator)
8585
8686
8787 func keyListSize (listName) = makeString([("%s%s" + listName), "size"], separator)
8888
8989
9090 func keyListPrev (listName,id) = makeString([("%s%s%s" + listName), id, "prev"], separator)
9191
9292
9393 func keyListNext (listName,id) = makeString([("%s%s%s" + listName), id, "next"], separator)
9494
9595
9696 func containsNode (listName,id) = {
97- let head = getString(this, keyListHead(listName))
97+ let head = valueOrElse(getString(this, keyListHead(listName)), "")
9898 let prev = getString(this, keyListPrev(listName, id))
9999 let next = getString(this, keyListNext(listName, id))
100100 if (if ((id == head))
101101 then true
102102 else (prev != unit))
103103 then true
104104 else (next != unit)
105105 }
106106
107107
108108 func insertNodeActions (listName,id) = {
109109 let head = getString(this, keyListHead(listName))
110110 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
111111 let checkNode = if (!(containsNode(listName, id)))
112112 then true
113113 else throw("Node exists")
114114 if ((checkNode == checkNode))
115115 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if (isDefined(head))
116116 then [StringEntry(keyListNext(listName, id), value(head)), StringEntry(keyListPrev(listName, value(head)), id)]
117117 else nil)) ++ [StringEntry(keyListHead(listName), id)])
118118 else throw("Strict value is not equal to itself.")
119119 }
120120
121121
122122 func deleteNodeActions (listName,id) = {
123123 let head = getString(this, keyListHead(listName))
124124 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
125125 let prev = getString(this, keyListPrev(listName, id))
126126 let next = getString(this, keyListNext(listName, id))
127127 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if (isDefined(prev))
128128 then isDefined(next)
129129 else false)
130130 then [StringEntry(keyListNext(listName, value(prev)), value(next)), StringEntry(keyListPrev(listName, value(next)), value(prev)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
131131 else if (isDefined(next))
132132 then [StringEntry(keyListHead(listName), value(next)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(next)))]
133133 else if (isDefined(prev))
134134 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prev)))]
135135 else if ((id == head))
136136 then [DeleteEntry(keyListHead(listName))]
137137 else throw("Invalid node")))
138138 }
139139
140140
141141 func keyManagerPublicKey () = "%s__managerPublicKey"
142142
143143
144144 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
145145
146146
147147 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
148148 case s: String =>
149149 fromBase58String(s)
150150 case _: Unit =>
151151 unit
152152 case _ =>
153153 throw("Match error")
154154 }
155155
156156
157157 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
158158 case s: String =>
159159 fromBase58String(s)
160160 case _: Unit =>
161161 unit
162162 case _ =>
163163 throw("Match error")
164164 }
165165
166166
167167 func mustManager (i) = {
168168 let pd = throw("Permission denied")
169169 match managerPublicKeyOrUnit() {
170170 case pk: ByteVector =>
171171 if ((i.callerPublicKey == pk))
172172 then true
173173 else pd
174174 case _: Unit =>
175175 if ((i.caller == this))
176176 then true
177177 else pd
178178 case _ =>
179179 throw("Match error")
180180 }
181181 }
182182
183183
184184 @Callable(i)
185185 func setManager (pendingManagerPublicKey) = {
186186 let checkCaller = mustManager(i)
187187 if ((checkCaller == checkCaller))
188188 then {
189189 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
190190 if ((checkManagerPublicKey == checkManagerPublicKey))
191191 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
192192 else throw("Strict value is not equal to itself.")
193193 }
194194 else throw("Strict value is not equal to itself.")
195195 }
196196
197197
198198
199199 @Callable(i)
200200 func confirmManager () = {
201201 let pm = pendingManagerPublicKeyOrUnit()
202202 let hasPM = if (isDefined(pm))
203203 then true
204204 else throw("No pending manager")
205205 if ((hasPM == hasPM))
206206 then {
207207 let checkPM = if ((i.callerPublicKey == value(pm)))
208208 then true
209209 else throw("You are not pending manager")
210210 if ((checkPM == checkPM))
211211 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
212212 else throw("Strict value is not equal to itself.")
213213 }
214214 else throw("Strict value is not equal to itself.")
215215 }
216216
217217
218218
219219 @Callable(i)
220220 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
221221 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
222222 $Tuple2(nil, {
223223 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
224224 if ($isInstanceOf(@, "Int"))
225225 then @
226226 else throw("Couldn't cast Any to Int")
227227 })
228228 }
229229
230230
231231
232232 @Callable(i)
233233 func constructor (votingEmissionCandidateContract,boostingContract,epochLength) = {
234234 let cheks = [mustManager(i), if ((addressFromString(votingEmissionCandidateContract) != unit))
235235 then true
236236 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
237237 then true
238238 else "invalid boosting contract address", if ((epochLength > 0))
239239 then true
240240 else throw("invalid epoch length")]
241241 if ((cheks == cheks))
242242 then $Tuple2([StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
243243 else throw("Strict value is not equal to itself.")
244244 }
245245
246246
247247
248248 @Callable(i)
249249 func create (amountAssetId,priceAssetId) = {
250250 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
251251 then true
252252 else mustManager(i)]
253253 if ((checks == checks))
254254 then {
255255 let pool = $Tuple2(amountAssetId, priceAssetId)
256256 let inListActions = [BooleanEntry(keyInList(pool), true)]
257257 let startHeightIsNotDefined = (getString(this, keyStartHeight) == unit)
258258 let startHeightActions = if (startHeightIsNotDefined)
259259 then [IntegerEntry(keyCurrentEpoch, 0), IntegerEntry(keyStartHeight, height)]
260260 else nil
261261 $Tuple2((inListActions ++ startHeightActions), unit)
262262 }
263263 else throw("Strict value is not equal to itself.")
264264 }
265265
266266
267267
268268 @Callable(i)
269269 func vote (amountAssetId,priceAssetId,share) = {
270270 let pool = $Tuple2(amountAssetId, priceAssetId)
271271 let startHeight = getIntOrFail(this, keyStartHeight)
272272 let epochLength = getIntOrFail(this, keyEpochLength)
273273 let endHeight = (startHeight + epochLength)
274274 let shareUsed = valueOrElse(getInteger(this, keyShareUsed(i.caller)), 0)
275275 let poolVoteShare = valueOrElse(getInteger(this, keyVoteShare(i.caller, pool)), 0)
276276 let userMaxShare = (maxShare - shareUsed)
277277 let newShare = (poolVoteShare + share)
278278 let gwxAmountAtEndTotal = {
279279 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
280280 if ($isInstanceOf(@, "Int"))
281281 then @
282282 else throw("Couldn't cast Any to Int")
283283 }
284284 let gwxAmountAtEnd = fraction(gwxAmountAtEndTotal, newShare, maxShare)
285285 let checks = [if ((getBoolean(keyInList(pool)) != unit))
286286 then true
287287 else throw("invalid assets"), if ((endHeight > height))
288288 then true
289289 else throw("invalid height"), if ((gwxAmountAtEnd > 0))
290290 then true
291291 else throw("you do not have gWX"), if (if ((share > 0))
292292 then (userMaxShare >= share)
293293 else false)
294294 then true
295295 else throw("invalid share")]
296296 if ((checks == checks))
297297 then $Tuple2([IntegerEntry(keyShareUsed(i.caller), (shareUsed + share)), IntegerEntry(keyVoteShare(i.caller, pool), newShare)], unit)
298298 else throw("Strict value is not equal to itself.")
299299 }
300300
301301
302302
303303 @Callable(i)
304304 func cancelVote (amountAssetId,priceAssetId) = {
305305 let pool = $Tuple2(amountAssetId, priceAssetId)
306306 let startHeight = getIntOrFail(this, keyStartHeight)
307307 let epochLength = getIntOrFail(this, keyEpochLength)
308308 let endHeight = (startHeight + epochLength)
309309 let poolVoteShare = valueOrElse(getInteger(this, keyVoteShare(i.caller, pool)), 0)
310310 let shareUsed = valueOrElse(getInteger(this, keyShareUsed(i.caller)), 0)
311311 let checks = [if ((getBoolean(keyInList(pool)) != unit))
312312 then true
313313 else throw("invalid assets"), if ((endHeight > height))
314314 then true
315315 else throw("invalid height"), if ((poolVoteShare > 0))
316316 then true
317317 else throw("no vote")]
318318 if ((checks == checks))
319319 then $Tuple2([IntegerEntry(keyShareUsed(i.caller), max([(shareUsed - poolVoteShare), 0])), DeleteEntry(keyVoteShare(i.caller, pool))], unit)
320320 else throw("Strict value is not equal to itself.")
321321 }
322322
323323
324324
325325 @Callable(i)
326326 func setEpochLength (newEpochLength) = {
327327 let cheks = [mustManager(i), if ((newEpochLength > 0))
328328 then true
329329 else throw("invalid epoch length")]
330330 if ((cheks == cheks))
331331 then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit)
332332 else throw("Strict value is not equal to itself.")
333333 }
334334
335335
336336
337337 @Callable(i)
338338 func finalize () = $Tuple2(nil, unit)
339339
340340
341341
342342 @Callable(i)
343343 func onVerificationLoss (assetId) = $Tuple2(nil, unit)
344344
345345
346346 @Verifier(tx)
347347 func verify () = {
348348 let targetPublicKey = match managerPublicKeyOrUnit() {
349349 case pk: ByteVector =>
350350 pk
351351 case _: Unit =>
352352 tx.senderPublicKey
353353 case _ =>
354354 throw("Match error")
355355 }
356356 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
357357 }
358358

github/deemru/w8io/169f3d6 
45.70 ms