tx · AJtWTxnkRa8mCtG9VQEUoKgBi3oKpAeiX3hBpnmxf3y3

3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA:  -0.02300000 Waves

2023.04.17 15:17 [2538557] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves

{ "type": 13, "id": "AJtWTxnkRa8mCtG9VQEUoKgBi3oKpAeiX3hBpnmxf3y3", "fee": 2300000, "feeAssetId": null, "timestamp": 1681733814854, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "hBQQ2JgVAuB5ZW9GwFJRuTGAtCEqJFhsbXoUgiVtNDLavu6D3xD8U72gGRFEoxDC9R3dC12myftzWSu3EcwkyJT" ], "script": "base64:BgLwFggCEgMKAQgSABIECgIIARIHCgUICAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgQKAggEEgASAwoBARIAEgQKAggIEgQKAggIEgQKAggIIglzZXBhcmF0b3IiDnBvb2xXZWlnaHRNdWx0Ig9tYXhEZXB0aERlZmF1bHQiFmZpbmFsaXphdGlvblN0YWdlVG90YWwiF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzIg5rZXlFcG9jaExlbmd0aCIRa2V5RXBvY2hMZW5ndGhOZXciFWtleUVwb2NoTGVuZ3RoQnlFcG9jaCIFZXBvY2giD2tleUN1cnJlbnRFcG9jaCILa2V5TWF4RGVwdGgiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCITa2V5Qm9vc3RpbmdDb250cmFjdCISa2V5U3Rha2luZ0NvbnRyYWN0IhRrZXlGaW5hbGl6YXRpb25TdGFnZSILa2V5TmV4dFBvb2wiC2tleU5leHRVc2VyIg5rZXlTdGFydEhlaWdodCIRa2V5Q3V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IHRvIGl0c2VsZi4CYmIBCGZpbmFsaXplAAQCY0IJAPwHBAUEdGhpcwIPZmluYWxpemVXcmFwcGVyCQDMCAIAAAUDbmlsBQNuaWwDCQAAAgUCY0IFAmNCCQCUCgIFA25pbAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJiYgEUY29udGFpbnNOb2RlUkVBRE9OTFkCAmFHAmFLCQCUCgIFA25pbAkBAmFNAgUCYUcFAmFLAmJiAQppbnNlcnROb2RlAgJhRwJhSwQCYmYJAQJiYwEFAmJiAwkAAAIFAmJmBQJiZgkAlAoCCQECYVECBQJhRwUCYUsFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYmIBCmRlbGV0ZU5vZGUCAmFHAmFLBAJiZgkBAmJjAQUCYmIDCQAAAgUCYmYFAmJmCQCUCgIJAQJhVAIFAmFHBQJhSwUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECY0MBAmNEAAQCY0UEAVgJAQJhVwADCQABAgUBWAIKQnl0ZVZlY3RvcgQCYmQFAVgFAmJkAwkAAQIFAVgCBFVuaXQIBQJjQw9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCY0MJYm9keUJ5dGVzCQCRAwIIBQJjQwZwcm9vZnMAAAUCY0WbLPTj", "height": 2538557, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5sxn6MPQ4bXP2paRo5nsofkeoVNTebTgeWMgDgeKC6XH Next: 9wpdk4byjjczyCk8ae3Qjn5T6SnhRiwLnaUGxYbeng3a Diff:
OldNewDifferences
140140 }
141141
142142
143+let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
144+
145+let IdxFactoryCfgGwxRewardDapp = 10
146+
147+func keyFactoryCfg () = "%s__factoryConfig"
148+
149+
150+func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
151+
152+
153+func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
154+
155+
143156 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
144157 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145158
147160
148161 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
149162
150- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
151163 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
152164 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
153165 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
157169
158170
159171 func checkWxEmissionPoolLabel (pool) = {
160- let $t051685208 = pool
161- let amountAssetId = $t051685208._1
162- let priceAssetId = $t051685208._2
163- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
172+ let $t054705510 = pool
173+ let amountAssetId = $t054705510._1
174+ let priceAssetId = $t054705510._2
164175 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
165176 if ($isInstanceOf(@, "Boolean"))
166177 then @
168179 }
169180
170181
182+func gwxRewardDeposit () = {
183+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
184+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
185+ invoke(gwxRewardsContract, "deposit", nil, nil)
186+ }
187+
188+
171189 let poolsListName = "pools"
172190
173191 func getVotesListName (pool) = {
174- let $t055095549 = pool
175- let amountAssetId = $t055095549._1
176- let priceAssetId = $t055095549._2
192+ let $t059275967 = pool
193+ let amountAssetId = $t059275967._1
194+ let priceAssetId = $t059275967._2
177195 makeString(["votes", amountAssetId, priceAssetId], separator)
178196 }
179197
517535 if ((checkTargetEpoch == checkTargetEpoch))
518536 then {
519537 let pool = stringToPool(poolStr)
520- let $t01808118121 = pool
521- let amountAssetId = $t01808118121._1
522- let priceAssetId = $t01808118121._2
538+ let $t01849918539 = pool
539+ let amountAssetId = $t01849918539._1
540+ let priceAssetId = $t01849918539._2
523541 let wxEmission = checkWxEmissionPoolLabel(pool)
524542 let gwxAmountAtEndTotal = {
525543 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
578596 if ((checkTargetEpoch == checkTargetEpoch))
579597 then {
580598 let pool = stringToPool(poolStr)
581- let $t02047820518 = pool
582- let amountAssetId = $t02047820518._1
583- let priceAssetId = $t02047820518._2
599+ let $t02089620936 = pool
600+ let amountAssetId = $t02089620936._1
601+ let priceAssetId = $t02089620936._2
584602 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
585- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
586603 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
587604 let r = {
588605 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
718735 let actions = if (force)
719736 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
720737 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
721- $Tuple2(actions, true)
738+ let gwxRewardDepositInv = gwxRewardDeposit()
739+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
740+ then $Tuple2(actions, true)
741+ else throw("Strict value is not equal to itself.")
722742 case nextPoolStr: String =>
723743 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
724744 case _ =>
742762 let actions = if (force)
743763 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
744764 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
745- $Tuple2(actions, true)
765+ let gwxRewardDepositInv = gwxRewardDeposit()
766+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
767+ then $Tuple2(actions, true)
768+ else throw("Strict value is not equal to itself.")
746769 case nextPoolStr: String =>
747770 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
748771 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let poolWeightMult = 100000000
77
88 let maxDepthDefault = 10
99
1010 let finalizationStageTotal = 0
1111
1212 let finalizationStageShares = 1
1313
1414 let keyEpochLength = makeString(["%s", "epochLength"], separator)
1515
1616 let keyEpochLengthNew = makeString(["%s%s", "epochLength__new"], separator)
1717
1818 func keyEpochLengthByEpoch (epoch) = makeString(["%s%d", "epochLength", toString(epoch)], separator)
1919
2020
2121 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator)
2222
2323 let keyMaxDepth = makeString(["%s", "maxDepth"], separator)
2424
2525 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
2626
2727 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2828
2929 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
3030
3131 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
3232
3333 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
3434
3535 let keyNextPool = makeString(["%s", "nextPool"], separator)
3636
3737 let keyNextUser = makeString(["%s", "nextUser"], separator)
3838
3939 let keyStartHeight = makeString(["%s", "startHeight"], separator)
4040
4141 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
4242
4343 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
4444
4545 let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
4646
4747 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4848
4949
5050 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
5151
5252
5353 func keyInList (pool) = {
5454 let $t016931733 = pool
5555 let amountAssetId = $t016931733._1
5656 let priceAssetId = $t016931733._2
5757 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5858 }
5959
6060
6161 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
6262
6363
6464 func keyVote (pool,address,epoch) = {
6565 let $t020072047 = pool
6666 let amountAssetId = $t020072047._1
6767 let priceAssetId = $t020072047._2
6868 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6969 }
7070
7171
7272 func keyVotingResult (pool,epoch) = {
7373 let $t022292269 = pool
7474 let amountAssetId = $t022292269._1
7575 let priceAssetId = $t022292269._2
7676 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7777 }
7878
7979
8080 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
8181
8282
8383 func keyPoolShare (pool,epoch) = {
8484 let $t025902630 = pool
8585 let amountAssetId = $t025902630._1
8686 let priceAssetId = $t025902630._2
8787 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8888 }
8989
9090
9191 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
9292
9393
9494 func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
9595
9696
9797 func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
9898
9999
100100 func throwErr (msg) = throw(wrapErr(msg))
101101
102102
103103 func getValueOrFail (address,key,type) = {
104104 let error = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
105105 valueOrErrorMessage( match type {
106106 case str: String =>
107107 getString(address, key)
108108 case int: Int =>
109109 getInteger(address, key)
110110 case _ =>
111111 throwErr("invalid entry type")
112112 }, error)
113113 }
114114
115115
116116 func getStrOrFail (address,key) = {
117117 let @ = getValueOrFail(address, key, "")
118118 if ($isInstanceOf(@, "String"))
119119 then @
120120 else throw(($getType(@) + " couldn't be cast to String"))
121121 }
122122
123123
124124 func getIntOrFail (address,key) = {
125125 let @ = getValueOrFail(address, key, 0)
126126 if ($isInstanceOf(@, "Int"))
127127 then @
128128 else throw(($getType(@) + " couldn't be cast to Int"))
129129 }
130130
131131
132132 func poolToString (pool) = ((pool._1 + separator) + pool._2)
133133
134134
135135 func stringToPool (str) = {
136136 let parts = split(str, separator)
137137 if ((size(parts) == 2))
138138 then $Tuple2(parts[0], parts[1])
139139 else throwErr("invalid pool string")
140140 }
141141
142142
143+let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
144+
145+let IdxFactoryCfgGwxRewardDapp = 10
146+
147+func keyFactoryCfg () = "%s__factoryConfig"
148+
149+
150+func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
151+
152+
153+func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
154+
155+
143156 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
144157 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145158
146159 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
147160
148161 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
149162
150- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
151163 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
152164 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
153165 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
154166 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
155167 lpAssetId
156168 }
157169
158170
159171 func checkWxEmissionPoolLabel (pool) = {
160- let $t051685208 = pool
161- let amountAssetId = $t051685208._1
162- let priceAssetId = $t051685208._2
163- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
172+ let $t054705510 = pool
173+ let amountAssetId = $t054705510._1
174+ let priceAssetId = $t054705510._2
164175 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
165176 if ($isInstanceOf(@, "Boolean"))
166177 then @
167178 else throw(($getType(@) + " couldn't be cast to Boolean"))
168179 }
169180
170181
182+func gwxRewardDeposit () = {
183+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
184+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
185+ invoke(gwxRewardsContract, "deposit", nil, nil)
186+ }
187+
188+
171189 let poolsListName = "pools"
172190
173191 func getVotesListName (pool) = {
174- let $t055095549 = pool
175- let amountAssetId = $t055095549._1
176- let priceAssetId = $t055095549._2
192+ let $t059275967 = pool
193+ let amountAssetId = $t059275967._1
194+ let priceAssetId = $t059275967._2
177195 makeString(["votes", amountAssetId, priceAssetId], separator)
178196 }
179197
180198
181199 func keyListHead (listName) = {
182200 let meta = if ((listName == poolsListName))
183201 then "%s%s"
184202 else "%s%s%s%s"
185203 makeString([meta, listName, "head"], separator)
186204 }
187205
188206
189207 func keyListSize (listName) = {
190208 let meta = if ((listName == poolsListName))
191209 then "%s%s"
192210 else "%s%s%s%s"
193211 makeString([meta, listName, "size"], separator)
194212 }
195213
196214
197215 func keyListPrev (listName,id) = {
198216 let meta = if ((listName == poolsListName))
199217 then "%s%s%s%s"
200218 else "%s%s%s%s%s"
201219 makeString([meta, listName, id, "prev"], separator)
202220 }
203221
204222
205223 func keyListNext (listName,id) = {
206224 let meta = if ((listName == poolsListName))
207225 then "%s%s%s%s"
208226 else "%s%s%s%s%s"
209227 makeString([meta, listName, id, "next"], separator)
210228 }
211229
212230
213231 func containsNode (listName,id) = {
214232 let headOrUnit = getString(this, keyListHead(listName))
215233 let prevOrUnit = getString(this, keyListPrev(listName, id))
216234 let nextOrUnit = getString(this, keyListNext(listName, id))
217235 if (if ((id == valueOrElse(headOrUnit, "")))
218236 then true
219237 else (prevOrUnit != unit))
220238 then true
221239 else (nextOrUnit != unit)
222240 }
223241
224242
225243 func insertNodeActions (listName,id) = {
226244 let headOrUnit = getString(this, keyListHead(listName))
227245 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
228246 let checkNode = if (!(containsNode(listName, id)))
229247 then true
230248 else throwErr("Node exists")
231249 if ((checkNode == checkNode))
232250 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
233251 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
234252 else nil)) ++ [StringEntry(keyListHead(listName), id)])
235253 else throw("Strict value is not equal to itself.")
236254 }
237255
238256
239257 func deleteNodeActions (listName,id) = {
240258 let headOrUnit = getString(this, keyListHead(listName))
241259 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
242260 let prevOrUnit = getString(this, keyListPrev(listName, id))
243261 let nextOrUnit = getString(this, keyListNext(listName, id))
244262 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
245263 then (nextOrUnit != unit)
246264 else false)
247265 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
248266 else if ((nextOrUnit != unit))
249267 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
250268 else if ((prevOrUnit != unit))
251269 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
252270 else if ((id == valueOrElse(headOrUnit, "")))
253271 then [DeleteEntry(keyListHead(listName))]
254272 else throwErr(((("invalid node: " + listName) + ".") + id))))
255273 }
256274
257275
258276 func keyManagerPublicKey () = "%s__managerPublicKey"
259277
260278
261279 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
262280
263281
264282 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
265283 case s: String =>
266284 fromBase58String(s)
267285 case _: Unit =>
268286 unit
269287 case _ =>
270288 throw("Match error")
271289 }
272290
273291
274292 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
275293 case s: String =>
276294 fromBase58String(s)
277295 case _: Unit =>
278296 unit
279297 case _ =>
280298 throw("Match error")
281299 }
282300
283301
284302 let permissionDeniedError = throwErr("Permission denied")
285303
286304 func mustThis (i) = if ((i.caller == this))
287305 then true
288306 else permissionDeniedError
289307
290308
291309 func mustManager (i) = match managerPublicKeyOrUnit() {
292310 case pk: ByteVector =>
293311 if ((i.callerPublicKey == pk))
294312 then true
295313 else permissionDeniedError
296314 case _: Unit =>
297315 mustThis(i)
298316 case _ =>
299317 throw("Match error")
300318 }
301319
302320
303321 @Callable(i)
304322 func setManager (pendingManagerPublicKey) = {
305323 let checkCaller = mustManager(i)
306324 if ((checkCaller == checkCaller))
307325 then {
308326 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
309327 if ((checkManagerPublicKey == checkManagerPublicKey))
310328 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
311329 else throw("Strict value is not equal to itself.")
312330 }
313331 else throw("Strict value is not equal to itself.")
314332 }
315333
316334
317335
318336 @Callable(i)
319337 func confirmManager () = {
320338 let pm = pendingManagerPublicKeyOrUnit()
321339 let hasPM = if (isDefined(pm))
322340 then true
323341 else throwErr("No pending manager")
324342 if ((hasPM == hasPM))
325343 then {
326344 let checkPM = if ((i.callerPublicKey == value(pm)))
327345 then true
328346 else throwErr("You are not pending manager")
329347 if ((checkPM == checkPM))
330348 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
331349 else throw("Strict value is not equal to itself.")
332350 }
333351 else throw("Strict value is not equal to itself.")
334352 }
335353
336354
337355
338356 @Callable(i)
339357 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
340358 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), wrapErr("invalid boosting contract address"))
341359 $Tuple2(nil, {
342360 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
343361 if ($isInstanceOf(@, "Int"))
344362 then @
345363 else throw(($getType(@) + " couldn't be cast to Int"))
346364 })
347365 }
348366
349367
350368
351369 @Callable(i)
352370 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
353371 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
354372 then true
355373 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
356374 then true
357375 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
358376 then true
359377 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
360378 then true
361379 else "invalid staking contract address", if ((epochLength > 0))
362380 then true
363381 else throwErr("invalid epoch length")]
364382 if ((checks == checks))
365383 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
366384 else throw("Strict value is not equal to itself.")
367385 }
368386
369387
370388
371389 @Callable(i)
372390 func create (amountAssetId,priceAssetId) = {
373391 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
374392 then true
375393 else mustManager(i)]
376394 if ((checks == checks))
377395 then {
378396 let pool = $Tuple2(amountAssetId, priceAssetId)
379397 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
380398 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
381399 let startHeightActions = if (currentEpochIsNotDefined)
382400 then {
383401 let epoch = 0
384402 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
385403 }
386404 else nil
387405 $Tuple2((inListActions ++ startHeightActions), unit)
388406 }
389407 else throw("Strict value is not equal to itself.")
390408 }
391409
392410
393411
394412 @Callable(i)
395413 func vote (amountAssetId,priceAssetId,amount) = {
396414 let pool = $Tuple2(amountAssetId, priceAssetId)
397415 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
398416 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
399417 let epochLength = getIntOrFail(this, keyEpochLength)
400418 let endHeight = (startHeight + epochLength)
401419 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
402420 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
403421 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
404422 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
405423 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
406424 let gwxAmountAtEndTotal = {
407425 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
408426 if ($isInstanceOf(@, "Int"))
409427 then @
410428 else throw(($getType(@) + " couldn't be cast to Int"))
411429 }
412430 let available = (gwxAmountAtEndTotal - used)
413431 let newVote = (vote + amount)
414432 let wxEmission = checkWxEmissionPoolLabel(pool)
415433 let checks = [if ((getBoolean(keyInList(pool)) != unit))
416434 then true
417435 else throwErr("invalid assets"), if ((endHeight > height))
418436 then true
419437 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
420438 then true
421439 else throwErr("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
422440 then true
423441 else throwErr("you do not have gWX"), if (if ((amount > 0))
424442 then (available >= amount)
425443 else false)
426444 then true
427445 else throwErr("invalid amount"), if (wxEmission)
428446 then true
429447 else throwErr("pool hasn't WX_EMISSION label")]
430448 if ((checks == checks))
431449 then {
432450 let votesListName = getVotesListName(pool)
433451 let userAddressStr = toString(i.caller)
434452 let votesListActions = if (containsNode(votesListName, userAddressStr))
435453 then nil
436454 else insertNodeActions(votesListName, userAddressStr)
437455 $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), (used + amount)), IntegerEntry(keyVote(pool, i.caller, epoch), newVote), IntegerEntry(keyVotingResult(pool, epoch), (poolResult + amount)), IntegerEntry(keyTotalVotes(epoch), (totalVotes + amount))] ++ votesListActions), unit)
438456 }
439457 else throw("Strict value is not equal to itself.")
440458 }
441459
442460
443461
444462 @Callable(i)
445463 func cancelVote (amountAssetId,priceAssetId) = {
446464 let pool = $Tuple2(amountAssetId, priceAssetId)
447465 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
448466 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
449467 let epochLength = getIntOrFail(this, keyEpochLength)
450468 let endHeight = (startHeight + epochLength)
451469 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
452470 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
453471 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
454472 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
455473 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
456474 let checks = [if ((getBoolean(keyInList(pool)) != unit))
457475 then true
458476 else throwErr("invalid assets"), if ((endHeight > height))
459477 then true
460478 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
461479 then true
462480 else throwErr("finalization in progress"), if ((vote > 0))
463481 then true
464482 else throwErr("no vote")]
465483 if ((checks == checks))
466484 then {
467485 let votesListName = getVotesListName(pool)
468486 let userAddressStr = toString(i.caller)
469487 $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), max([(used - vote), 0])), DeleteEntry(keyVote(pool, i.caller, epoch)), IntegerEntry(keyVotingResult(pool, epoch), (poolResult - vote)), IntegerEntry(keyTotalVotes(epoch), (totalVotes - vote))] ++ deleteNodeActions(votesListName, userAddressStr)), unit)
470488 }
471489 else throw("Strict value is not equal to itself.")
472490 }
473491
474492
475493
476494 @Callable(i)
477495 func setEpochLength (newEpochLength) = {
478496 let checks = [mustManager(i), if ((newEpochLength > 0))
479497 then true
480498 else throwErr("invalid epoch length")]
481499 if ((checks == checks))
482500 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
483501 else throw("Strict value is not equal to itself.")
484502 }
485503
486504
487505
488506 @Callable(i)
489507 func setMaxDepth (newMaxDepth) = {
490508 let checks = [mustManager(i), if ((newMaxDepth > 0))
491509 then true
492510 else throwErr("invalid max depth")]
493511 if ((checks == checks))
494512 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
495513 else throw("Strict value is not equal to itself.")
496514 }
497515
498516
499517
500518 @Callable(i)
501519 func processVoteINTERNAL (poolStr,userAddressStr) = {
502520 let checkCaller = mustThis(i)
503521 if ((checkCaller == checkCaller))
504522 then {
505523 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr(("processVoteINTERNAL: invalid user address " + userAddressStr)))
506524 let epoch = getIntOrFail(this, keyCurrentEpoch)
507525 let epochPrevious = (epoch - 1)
508526 let epochLength = getIntOrFail(this, keyEpochLength)
509527 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
510528 let endHeight = (startHeight + epochLength)
511529 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
512530 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
513531 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
514532 let checkTargetEpoch = if ((epochPrevious >= 0))
515533 then true
516534 else throwErr("processVoteINTERNAL: invalid previous epoch")
517535 if ((checkTargetEpoch == checkTargetEpoch))
518536 then {
519537 let pool = stringToPool(poolStr)
520- let $t01808118121 = pool
521- let amountAssetId = $t01808118121._1
522- let priceAssetId = $t01808118121._2
538+ let $t01849918539 = pool
539+ let amountAssetId = $t01849918539._1
540+ let priceAssetId = $t01849918539._2
523541 let wxEmission = checkWxEmissionPoolLabel(pool)
524542 let gwxAmountAtEndTotal = {
525543 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
526544 if ($isInstanceOf(@, "Int"))
527545 then @
528546 else throw(($getType(@) + " couldn't be cast to Int"))
529547 }
530548 let gwxAmountAtEndTotalPrevious = {
531549 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
532550 if ($isInstanceOf(@, "Int"))
533551 then @
534552 else throw(($getType(@) + " couldn't be cast to Int"))
535553 }
536554 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
537555 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
538556 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), wrapErr((((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")))
539557 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
540558 let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
541559 let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
542560 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
543561 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
544562 let votingResultStakedActions = if ((stakedByUser == 0))
545563 then nil
546564 else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
547565 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
548566 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
549567 else 0
550568 let actions = if (if ((newVote > 0))
551569 then wxEmission
552570 else false)
553571 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
554572 else deleteNodeActions(getVotesListName(pool), userAddressStr)
555573 $Tuple2((actions ++ votingResultStakedActions), unit)
556574 }
557575 else throw("Strict value is not equal to itself.")
558576 }
559577 else throw("Strict value is not equal to itself.")
560578 }
561579
562580
563581
564582 @Callable(i)
565583 func processPoolINTERNAL (poolStr,force) = {
566584 let checkCaller = mustThis(i)
567585 if ((checkCaller == checkCaller))
568586 then {
569587 let targetEpoch = {
570588 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
571589 if (force)
572590 then currentEpoch
573591 else (currentEpoch - 1)
574592 }
575593 let checkTargetEpoch = if ((targetEpoch >= 0))
576594 then true
577595 else throwErr("processPoolINTERNAL: invalid target epoch")
578596 if ((checkTargetEpoch == checkTargetEpoch))
579597 then {
580598 let pool = stringToPool(poolStr)
581- let $t02047820518 = pool
582- let amountAssetId = $t02047820518._1
583- let priceAssetId = $t02047820518._2
599+ let $t02089620936 = pool
600+ let amountAssetId = $t02089620936._1
601+ let priceAssetId = $t02089620936._2
584602 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
585- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
586603 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
587604 let r = {
588605 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
589606 if ($isInstanceOf(@, "Boolean"))
590607 then @
591608 else throw(($getType(@) + " couldn't be cast to Boolean"))
592609 }
593610 if ((r == r))
594611 then if (r)
595612 then $Tuple2(nil, true)
596613 else {
597614 let wxEmission = checkWxEmissionPoolLabel(pool)
598615 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
599616 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
600617 let share = if (if ((totalVotes == 0))
601618 then true
602619 else !(wxEmission))
603620 then 0
604621 else fraction(votingResult, poolWeightMult, totalVotes)
605622 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
606623 if ((modifyWeightInv == modifyWeightInv))
607624 then {
608625 let poolsListActions = if (if (wxEmission)
609626 then true
610627 else force)
611628 then nil
612629 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
613630 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
614631 }
615632 else throw("Strict value is not equal to itself.")
616633 }
617634 else throw("Strict value is not equal to itself.")
618635 }
619636 else throw("Strict value is not equal to itself.")
620637 }
621638 else throw("Strict value is not equal to itself.")
622639 }
623640
624641
625642
626643 @Callable(i)
627644 func finalizeHelper () = {
628645 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
629646 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
630647 let previousEpoch = (epoch - 1)
631648 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
632649 let epochLength = getIntOrFail(this, keyEpochLength)
633650 let endHeight = (startHeight + epochLength)
634651 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
635652 if (if (if ((height >= endHeight))
636653 then (finalizationStageOrUnit == unit)
637654 else false)
638655 then !(force)
639656 else false)
640657 then {
641658 let newEpoch = (epoch + 1)
642659 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
643660 let newEpochLengthActions = match newEpochLengthOption {
644661 case newEpochLength: Int =>
645662 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
646663 case _: Unit =>
647664 nil
648665 case _ =>
649666 throw("Match error")
650667 }
651668 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
652669 }
653670 else if (if (force)
654671 then (finalizationStageOrUnit == unit)
655672 else false)
656673 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
657674 else if ((finalizationStageOrUnit == unit))
658675 then $Tuple2(nil, false)
659676 else if ((finalizationStageOrUnit == finalizationStageTotal))
660677 then {
661678 let poolOrUnit = getString(keyNextPool)
662679 let userOrUnit = getString(keyNextUser)
663680 match poolOrUnit {
664681 case _: Unit =>
665682 match getString(keyListHead(poolsListName)) {
666683 case _: Unit =>
667684 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
668685 case poolsHeadStr: String =>
669686 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
670687 case _ =>
671688 throw("Match error")
672689 }
673690 case poolStr: String =>
674691 let pool = stringToPool(poolStr)
675692 let nextUserOrUnit = match userOrUnit {
676693 case _: Unit =>
677694 getString(keyListHead(getVotesListName(pool)))
678695 case user: String =>
679696 let next = getString(keyListNext(getVotesListName(pool), user))
680697 if ((next == next))
681698 then {
682699 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
683700 if ((processVoteInv == processVoteInv))
684701 then next
685702 else throw("Strict value is not equal to itself.")
686703 }
687704 else throw("Strict value is not equal to itself.")
688705 case _ =>
689706 throw("Match error")
690707 }
691708 match nextUserOrUnit {
692709 case _: Unit =>
693710 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
694711 match nextPoolOrUnit {
695712 case _: Unit =>
696713 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
697714 case s: String =>
698715 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
699716 case _ =>
700717 throw("Match error")
701718 }
702719 case nextUser: String =>
703720 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
704721 case _ =>
705722 throw("Match error")
706723 }
707724 case _ =>
708725 throw("Match error")
709726 }
710727 }
711728 else if ((finalizationStageOrUnit == finalizationStageShares))
712729 then {
713730 let poolOrUnit = getString(keyNextPool)
714731 match poolOrUnit {
715732 case _: Unit =>
716733 match getString(keyListHead(poolsListName)) {
717734 case _: Unit =>
718735 let actions = if (force)
719736 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
720737 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
721- $Tuple2(actions, true)
738+ let gwxRewardDepositInv = gwxRewardDeposit()
739+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
740+ then $Tuple2(actions, true)
741+ else throw("Strict value is not equal to itself.")
722742 case nextPoolStr: String =>
723743 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
724744 case _ =>
725745 throw("Match error")
726746 }
727747 case poolStr: String =>
728748 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
729749 if ((nextPoolOrUnit == nextPoolOrUnit))
730750 then {
731751 let r = {
732752 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
733753 if ($isInstanceOf(@, "Boolean"))
734754 then @
735755 else throw(($getType(@) + " couldn't be cast to Boolean"))
736756 }
737757 if ((r == r))
738758 then if (r)
739759 then $Tuple2(nil, true)
740760 else match nextPoolOrUnit {
741761 case _: Unit =>
742762 let actions = if (force)
743763 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
744764 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
745- $Tuple2(actions, true)
765+ let gwxRewardDepositInv = gwxRewardDeposit()
766+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
767+ then $Tuple2(actions, true)
768+ else throw("Strict value is not equal to itself.")
746769 case nextPoolStr: String =>
747770 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
748771 case _ =>
749772 throw("Match error")
750773 }
751774 else throw("Strict value is not equal to itself.")
752775 }
753776 else throw("Strict value is not equal to itself.")
754777 case _ =>
755778 throw("Match error")
756779 }
757780 }
758781 else throwErr("finalization is broken")
759782 }
760783
761784
762785
763786 @Callable(i)
764787 func finalizeWrapper (counter) = {
765788 let result = {
766789 let @ = invoke(this, "finalizeHelper", nil, nil)
767790 if ($isInstanceOf(@, "Boolean"))
768791 then @
769792 else throw(($getType(@) + " couldn't be cast to Boolean"))
770793 }
771794 if ((result == result))
772795 then if (!(result))
773796 then if ((counter == 0))
774797 then throwErr("Current voting is not over yet")
775798 else $Tuple2(nil, unit)
776799 else {
777800 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
778801 if ((maxDepth > counter))
779802 then {
780803 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
781804 if ((inv == inv))
782805 then $Tuple2(nil, unit)
783806 else throw("Strict value is not equal to itself.")
784807 }
785808 else $Tuple2(nil, unit)
786809 }
787810 else throw("Strict value is not equal to itself.")
788811 }
789812
790813
791814
792815 @Callable(i)
793816 func finalize () = {
794817 let inv = invoke(this, "finalizeWrapper", [0], nil)
795818 if ((inv == inv))
796819 then $Tuple2(nil, unit)
797820 else throw("Strict value is not equal to itself.")
798821 }
799822
800823
801824
802825 @Callable(i)
803826 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
804827
805828
806829
807830 @Callable(i)
808831 func insertNode (listName,id) = {
809832 let checkCaller = mustManager(i)
810833 if ((checkCaller == checkCaller))
811834 then $Tuple2(insertNodeActions(listName, id), unit)
812835 else throw("Strict value is not equal to itself.")
813836 }
814837
815838
816839
817840 @Callable(i)
818841 func deleteNode (listName,id) = {
819842 let checkCaller = mustManager(i)
820843 if ((checkCaller == checkCaller))
821844 then $Tuple2(deleteNodeActions(listName, id), unit)
822845 else throw("Strict value is not equal to itself.")
823846 }
824847
825848
826849 @Verifier(tx)
827850 func verify () = {
828851 let targetPublicKey = match managerPublicKeyOrUnit() {
829852 case pk: ByteVector =>
830853 pk
831854 case _: Unit =>
832855 tx.senderPublicKey
833856 case _ =>
834857 throw("Match error")
835858 }
836859 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
837860 }
838861

github/deemru/w8io/169f3d6 
141.64 ms