tx · 7rodGGGNeBx6DZ5H97unpj5vRfr3HFt9mb4C1Mnkn7Eg 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL: -0.03300000 Waves 2022.06.21 16:49 [2106239] smart account 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL > SELF 0.00000000 Waves
{ "type": 13, "id": "7rodGGGNeBx6DZ5H97unpj5vRfr3HFt9mb4C1Mnkn7Eg", "fee": 3300000, "feeAssetId": null, "timestamp": 1655819415146, "version": 1, "sender": "3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL", "senderPublicKey": "DnPyGWCgpQChvoQrnXQRcC9FtN32mPGrcog2wcKHdkVn", "proofs": [ "5dGDSdrBFq2EjyDUKkbwUjen1ccKdzQyEvr2cZwaU5Q67QYH1LtFWVyAuMvSjkdatfr5cYoStMGUUapoxsFnSB3n" ], "script": "base64:AAIFAAAAAAAAAF8IAhIDCgEIEgASBAoCCAESBgoECAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgMKAQgSABIDCgEBEgASAwoBCBIECgIICBIECgIICBIECgIICAAAAC4AAAAACXNlcGFyYXRvcgIAAAACX18AAAAADnBvb2xXZWlnaHRNdWx0AAAAAAAF9eEAAAAAAA9tYXhEZXB0aERlZmF1bHQAAAAAAAAAAAoAAAAAFmZpbmFsaXphdGlvblN0YWdlVG90YWwAAAAAAAAAAAAAAAAAF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzAAAAAAAAAAABAAAAAA5rZXlFcG9jaExlbmd0aAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAC2Vwb2NoTGVuZ3RoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAPa2V5Q3VycmVudEVwb2NoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAMY3VycmVudEVwb2NoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAALa2V5TWF4RGVwdGgJAAS5AAAAAgkABE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l0ZVZlY3RvcgQAAAACcGsFAAAAByRtYXRjaDAFAAAAAnBrAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V53kFzmg==", "chainId": 84, "height": 2106239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F1CtiBMh5o2FxEiNM1pSobsrtP98N9R1JW5sxkJFuTx5 Next: ELK4b5o9ABp9H6iJxgTtC9s365ch86usH4mwKL82yXw2 Diff:
Old | New | Differences | |
---|---|---|---|
18 | 18 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
19 | 19 | ||
20 | 20 | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
21 | + | ||
22 | + | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
21 | 23 | ||
22 | 24 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
23 | 25 | ||
40 | 42 | ||
41 | 43 | ||
42 | 44 | func keyInList (pool) = { | |
43 | - | let $ | |
44 | - | let amountAssetId = $ | |
45 | - | let priceAssetId = $ | |
45 | + | let $t013631403 = pool | |
46 | + | let amountAssetId = $t013631403._1 | |
47 | + | let priceAssetId = $t013631403._2 | |
46 | 48 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
47 | 49 | } | |
48 | 50 | ||
51 | 53 | ||
52 | 54 | ||
53 | 55 | func keyVote (pool,address,epoch) = { | |
54 | - | let $ | |
55 | - | let amountAssetId = $ | |
56 | - | let priceAssetId = $ | |
56 | + | let $t016771717 = pool | |
57 | + | let amountAssetId = $t016771717._1 | |
58 | + | let priceAssetId = $t016771717._2 | |
57 | 59 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
58 | 60 | } | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func keyVotingResult (pool,epoch) = { | |
62 | - | let $ | |
63 | - | let amountAssetId = $ | |
64 | - | let priceAssetId = $ | |
64 | + | let $t018991939 = pool | |
65 | + | let amountAssetId = $t018991939._1 | |
66 | + | let priceAssetId = $t018991939._2 | |
65 | 67 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
66 | 68 | } | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func keyPoolShare (pool,epoch) = { | |
70 | - | let $ | |
71 | - | let amountAssetId = $ | |
72 | - | let priceAssetId = $ | |
72 | + | let $t021042144 = pool | |
73 | + | let amountAssetId = $t021042144._1 | |
74 | + | let priceAssetId = $t021042144._2 | |
73 | 75 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
74 | 76 | } | |
75 | 77 | ||
120 | 122 | let poolsListName = "pools" | |
121 | 123 | ||
122 | 124 | func getVotesListName (pool) = { | |
123 | - | let $ | |
124 | - | let amountAssetId = $ | |
125 | - | let priceAssetId = $ | |
125 | + | let $t032503290 = pool | |
126 | + | let amountAssetId = $t032503290._1 | |
127 | + | let priceAssetId = $t032503290._2 | |
126 | 128 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
127 | 129 | } | |
128 | 130 | ||
298 | 300 | ||
299 | 301 | ||
300 | 302 | @Callable(i) | |
301 | - | func constructor (votingEmissionCandidateContract,boostingContract,epochLength) = { | |
302 | - | let cheks = [mustManager(i), if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
303 | + | func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,epochLength) = { | |
304 | + | let cheks = [mustManager(i), if ((addressFromString(factoryContract) != unit)) | |
305 | + | then true | |
306 | + | else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
303 | 307 | then true | |
304 | 308 | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
305 | 309 | then true | |
307 | 311 | then true | |
308 | 312 | else throw("invalid epoch length")] | |
309 | 313 | if ((cheks == cheks)) | |
310 | - | then $Tuple2([StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
314 | + | then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
311 | 315 | else throw("Strict value is not equal to itself.") | |
312 | 316 | } | |
313 | 317 | ||
499 | 503 | if ((checkTargetEpoch == checkTargetEpoch)) | |
500 | 504 | then { | |
501 | 505 | let pool = stringToPool(poolStr) | |
506 | + | let $t01678716827 = pool | |
507 | + | let amountAssetId = $t01678716827._1 | |
508 | + | let priceAssetId = $t01678716827._2 | |
502 | 509 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0) | |
503 | 510 | let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0) | |
504 | 511 | let share = if ((totalVotes == 0)) | |
505 | 512 | then 0 | |
506 | 513 | else fraction(votingResult, poolWeightMult, totalVotes) | |
507 | - | $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], unit) | |
514 | + | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
515 | + | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [amountAssetId, priceAssetId, share], nil) | |
516 | + | if ((modifyWeightInv == modifyWeightInv)) | |
517 | + | then $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], unit) | |
518 | + | else throw("Strict value is not equal to itself.") | |
508 | 519 | } | |
509 | 520 | else throw("Strict value is not equal to itself.") | |
510 | 521 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let poolWeightMult = 100000000 | |
7 | 7 | ||
8 | 8 | let maxDepthDefault = 10 | |
9 | 9 | ||
10 | 10 | let finalizationStageTotal = 0 | |
11 | 11 | ||
12 | 12 | let finalizationStageShares = 1 | |
13 | 13 | ||
14 | 14 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
15 | 15 | ||
16 | 16 | let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator) | |
17 | 17 | ||
18 | 18 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
19 | 19 | ||
20 | 20 | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
21 | + | ||
22 | + | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
21 | 23 | ||
22 | 24 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
23 | 25 | ||
24 | 26 | let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator) | |
25 | 27 | ||
26 | 28 | let keyNextPool = makeString(["%s", "nextPool"], separator) | |
27 | 29 | ||
28 | 30 | let keyNextUser = makeString(["%s", "nextUser"], separator) | |
29 | 31 | ||
30 | 32 | let keyStartHeight = makeString(["%s", "startHeight"], separator) | |
31 | 33 | ||
32 | 34 | let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator) | |
33 | 35 | ||
34 | 36 | let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator) | |
35 | 37 | ||
36 | 38 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
37 | 39 | ||
38 | 40 | ||
39 | 41 | func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator) | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func keyInList (pool) = { | |
43 | - | let $ | |
44 | - | let amountAssetId = $ | |
45 | - | let priceAssetId = $ | |
45 | + | let $t013631403 = pool | |
46 | + | let amountAssetId = $t013631403._1 | |
47 | + | let priceAssetId = $t013631403._2 | |
46 | 48 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
47 | 49 | } | |
48 | 50 | ||
49 | 51 | ||
50 | 52 | func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator) | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | func keyVote (pool,address,epoch) = { | |
54 | - | let $ | |
55 | - | let amountAssetId = $ | |
56 | - | let priceAssetId = $ | |
56 | + | let $t016771717 = pool | |
57 | + | let amountAssetId = $t016771717._1 | |
58 | + | let priceAssetId = $t016771717._2 | |
57 | 59 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
58 | 60 | } | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func keyVotingResult (pool,epoch) = { | |
62 | - | let $ | |
63 | - | let amountAssetId = $ | |
64 | - | let priceAssetId = $ | |
64 | + | let $t018991939 = pool | |
65 | + | let amountAssetId = $t018991939._1 | |
66 | + | let priceAssetId = $t018991939._2 | |
65 | 67 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
66 | 68 | } | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func keyPoolShare (pool,epoch) = { | |
70 | - | let $ | |
71 | - | let amountAssetId = $ | |
72 | - | let priceAssetId = $ | |
72 | + | let $t021042144 = pool | |
73 | + | let amountAssetId = $t021042144._1 | |
74 | + | let priceAssetId = $t021042144._2 | |
73 | 75 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
74 | 76 | } | |
75 | 77 | ||
76 | 78 | ||
77 | 79 | func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator) | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func getValueOrFail (address,key,type) = { | |
81 | 83 | let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "") | |
82 | 84 | valueOrErrorMessage( match type { | |
83 | 85 | case str: String => | |
84 | 86 | getString(address, key) | |
85 | 87 | case int: Int => | |
86 | 88 | getInteger(address, key) | |
87 | 89 | case _ => | |
88 | 90 | throw("invalid entry type") | |
89 | 91 | }, error) | |
90 | 92 | } | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | func getStrOrFail (address,key) = { | |
94 | 96 | let @ = getValueOrFail(address, key, "") | |
95 | 97 | if ($isInstanceOf(@, "String")) | |
96 | 98 | then @ | |
97 | 99 | else throw("Couldn't cast Int|String to String") | |
98 | 100 | } | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | func getIntOrFail (address,key) = { | |
102 | 104 | let @ = getValueOrFail(address, key, 0) | |
103 | 105 | if ($isInstanceOf(@, "Int")) | |
104 | 106 | then @ | |
105 | 107 | else throw("Couldn't cast Int|String to Int") | |
106 | 108 | } | |
107 | 109 | ||
108 | 110 | ||
109 | 111 | func poolToString (pool) = ((pool._1 + separator) + pool._2) | |
110 | 112 | ||
111 | 113 | ||
112 | 114 | func stringToPool (str) = { | |
113 | 115 | let parts = split(str, separator) | |
114 | 116 | if ((size(parts) == 2)) | |
115 | 117 | then $Tuple2(parts[0], parts[1]) | |
116 | 118 | else throw("invalid pool string") | |
117 | 119 | } | |
118 | 120 | ||
119 | 121 | ||
120 | 122 | let poolsListName = "pools" | |
121 | 123 | ||
122 | 124 | func getVotesListName (pool) = { | |
123 | - | let $ | |
124 | - | let amountAssetId = $ | |
125 | - | let priceAssetId = $ | |
125 | + | let $t032503290 = pool | |
126 | + | let amountAssetId = $t032503290._1 | |
127 | + | let priceAssetId = $t032503290._2 | |
126 | 128 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
127 | 129 | } | |
128 | 130 | ||
129 | 131 | ||
130 | 132 | func keyListHead (listName) = { | |
131 | 133 | let meta = if ((listName == poolsListName)) | |
132 | 134 | then "%s%s" | |
133 | 135 | else "%s%s%s%s" | |
134 | 136 | makeString([meta, listName, "head"], separator) | |
135 | 137 | } | |
136 | 138 | ||
137 | 139 | ||
138 | 140 | func keyListSize (listName) = { | |
139 | 141 | let meta = if ((listName == poolsListName)) | |
140 | 142 | then "%s%s" | |
141 | 143 | else "%s%s%s%s" | |
142 | 144 | makeString([meta, listName, "size"], separator) | |
143 | 145 | } | |
144 | 146 | ||
145 | 147 | ||
146 | 148 | func keyListPrev (listName,id) = { | |
147 | 149 | let meta = if ((listName == poolsListName)) | |
148 | 150 | then "%s%s%s%s" | |
149 | 151 | else "%s%s%s%s%s" | |
150 | 152 | makeString([meta, listName, id, "prev"], separator) | |
151 | 153 | } | |
152 | 154 | ||
153 | 155 | ||
154 | 156 | func keyListNext (listName,id) = { | |
155 | 157 | let meta = if ((listName == poolsListName)) | |
156 | 158 | then "%s%s%s%s" | |
157 | 159 | else "%s%s%s%s%s" | |
158 | 160 | makeString([meta, listName, id, "next"], separator) | |
159 | 161 | } | |
160 | 162 | ||
161 | 163 | ||
162 | 164 | func containsNode (listName,id) = { | |
163 | 165 | let headOrUnit = getString(this, keyListHead(listName)) | |
164 | 166 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
165 | 167 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
166 | 168 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
167 | 169 | then true | |
168 | 170 | else (prevOrUnit != unit)) | |
169 | 171 | then true | |
170 | 172 | else (nextOrUnit != unit) | |
171 | 173 | } | |
172 | 174 | ||
173 | 175 | ||
174 | 176 | func insertNodeActions (listName,id) = { | |
175 | 177 | let headOrUnit = getString(this, keyListHead(listName)) | |
176 | 178 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
177 | 179 | let checkNode = if (!(containsNode(listName, id))) | |
178 | 180 | then true | |
179 | 181 | else throw("Node exists") | |
180 | 182 | if ((checkNode == checkNode)) | |
181 | 183 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
182 | 184 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
183 | 185 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
184 | 186 | else throw("Strict value is not equal to itself.") | |
185 | 187 | } | |
186 | 188 | ||
187 | 189 | ||
188 | 190 | func deleteNodeActions (listName,id) = { | |
189 | 191 | let headOrUnit = getString(this, keyListHead(listName)) | |
190 | 192 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
191 | 193 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
192 | 194 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
193 | 195 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
194 | 196 | then (nextOrUnit != unit) | |
195 | 197 | else false) | |
196 | 198 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
197 | 199 | else if ((nextOrUnit != unit)) | |
198 | 200 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
199 | 201 | else if ((prevOrUnit != unit)) | |
200 | 202 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
201 | 203 | else if ((id == valueOrElse(headOrUnit, ""))) | |
202 | 204 | then [DeleteEntry(keyListHead(listName))] | |
203 | 205 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
204 | 206 | } | |
205 | 207 | ||
206 | 208 | ||
207 | 209 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
208 | 210 | ||
209 | 211 | ||
210 | 212 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
211 | 213 | ||
212 | 214 | ||
213 | 215 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
214 | 216 | case s: String => | |
215 | 217 | fromBase58String(s) | |
216 | 218 | case _: Unit => | |
217 | 219 | unit | |
218 | 220 | case _ => | |
219 | 221 | throw("Match error") | |
220 | 222 | } | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
224 | 226 | case s: String => | |
225 | 227 | fromBase58String(s) | |
226 | 228 | case _: Unit => | |
227 | 229 | unit | |
228 | 230 | case _ => | |
229 | 231 | throw("Match error") | |
230 | 232 | } | |
231 | 233 | ||
232 | 234 | ||
233 | 235 | let permissionDeniedError = throw("Permission denied") | |
234 | 236 | ||
235 | 237 | func mustThis (i) = if ((i.caller == this)) | |
236 | 238 | then true | |
237 | 239 | else permissionDeniedError | |
238 | 240 | ||
239 | 241 | ||
240 | 242 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
241 | 243 | case pk: ByteVector => | |
242 | 244 | if ((i.callerPublicKey == pk)) | |
243 | 245 | then true | |
244 | 246 | else permissionDeniedError | |
245 | 247 | case _: Unit => | |
246 | 248 | mustThis(i) | |
247 | 249 | case _ => | |
248 | 250 | throw("Match error") | |
249 | 251 | } | |
250 | 252 | ||
251 | 253 | ||
252 | 254 | @Callable(i) | |
253 | 255 | func setManager (pendingManagerPublicKey) = { | |
254 | 256 | let checkCaller = mustManager(i) | |
255 | 257 | if ((checkCaller == checkCaller)) | |
256 | 258 | then { | |
257 | 259 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
258 | 260 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
259 | 261 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
260 | 262 | else throw("Strict value is not equal to itself.") | |
261 | 263 | } | |
262 | 264 | else throw("Strict value is not equal to itself.") | |
263 | 265 | } | |
264 | 266 | ||
265 | 267 | ||
266 | 268 | ||
267 | 269 | @Callable(i) | |
268 | 270 | func confirmManager () = { | |
269 | 271 | let pm = pendingManagerPublicKeyOrUnit() | |
270 | 272 | let hasPM = if (isDefined(pm)) | |
271 | 273 | then true | |
272 | 274 | else throw("No pending manager") | |
273 | 275 | if ((hasPM == hasPM)) | |
274 | 276 | then { | |
275 | 277 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
276 | 278 | then true | |
277 | 279 | else throw("You are not pending manager") | |
278 | 280 | if ((checkPM == checkPM)) | |
279 | 281 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
280 | 282 | else throw("Strict value is not equal to itself.") | |
281 | 283 | } | |
282 | 284 | else throw("Strict value is not equal to itself.") | |
283 | 285 | } | |
284 | 286 | ||
285 | 287 | ||
286 | 288 | ||
287 | 289 | @Callable(i) | |
288 | 290 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
289 | 291 | let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address") | |
290 | 292 | $Tuple2(nil, { | |
291 | 293 | let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
292 | 294 | if ($isInstanceOf(@, "Int")) | |
293 | 295 | then @ | |
294 | 296 | else throw("Couldn't cast Any to Int") | |
295 | 297 | }) | |
296 | 298 | } | |
297 | 299 | ||
298 | 300 | ||
299 | 301 | ||
300 | 302 | @Callable(i) | |
301 | - | func constructor (votingEmissionCandidateContract,boostingContract,epochLength) = { | |
302 | - | let cheks = [mustManager(i), if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
303 | + | func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,epochLength) = { | |
304 | + | let cheks = [mustManager(i), if ((addressFromString(factoryContract) != unit)) | |
305 | + | then true | |
306 | + | else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
303 | 307 | then true | |
304 | 308 | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
305 | 309 | then true | |
306 | 310 | else "invalid boosting contract address", if ((epochLength > 0)) | |
307 | 311 | then true | |
308 | 312 | else throw("invalid epoch length")] | |
309 | 313 | if ((cheks == cheks)) | |
310 | - | then $Tuple2([StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
314 | + | then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
311 | 315 | else throw("Strict value is not equal to itself.") | |
312 | 316 | } | |
313 | 317 | ||
314 | 318 | ||
315 | 319 | ||
316 | 320 | @Callable(i) | |
317 | 321 | func create (amountAssetId,priceAssetId) = { | |
318 | 322 | let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), ""))) | |
319 | 323 | then true | |
320 | 324 | else mustManager(i)] | |
321 | 325 | if ((checks == checks)) | |
322 | 326 | then { | |
323 | 327 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
324 | 328 | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
325 | 329 | let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit) | |
326 | 330 | let startHeightActions = if (currentEpochIsNotDefined) | |
327 | 331 | then { | |
328 | 332 | let epoch = 0 | |
329 | 333 | [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)] | |
330 | 334 | } | |
331 | 335 | else nil | |
332 | 336 | $Tuple2((inListActions ++ startHeightActions), unit) | |
333 | 337 | } | |
334 | 338 | else throw("Strict value is not equal to itself.") | |
335 | 339 | } | |
336 | 340 | ||
337 | 341 | ||
338 | 342 | ||
339 | 343 | @Callable(i) | |
340 | 344 | func vote (amountAssetId,priceAssetId,amount) = { | |
341 | 345 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
342 | 346 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
343 | 347 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
344 | 348 | let epochLength = getIntOrFail(this, keyEpochLength) | |
345 | 349 | let endHeight = (startHeight + epochLength) | |
346 | 350 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
347 | 351 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
348 | 352 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
349 | 353 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
350 | 354 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
351 | 355 | let gwxAmountAtEndTotal = { | |
352 | 356 | let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil) | |
353 | 357 | if ($isInstanceOf(@, "Int")) | |
354 | 358 | then @ | |
355 | 359 | else throw("Couldn't cast Any to Int") | |
356 | 360 | } | |
357 | 361 | let available = (gwxAmountAtEndTotal - used) | |
358 | 362 | let newVote = (vote + amount) | |
359 | 363 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
360 | 364 | then true | |
361 | 365 | else throw("invalid assets"), if ((endHeight > height)) | |
362 | 366 | then true | |
363 | 367 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
364 | 368 | then true | |
365 | 369 | else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0)) | |
366 | 370 | then true | |
367 | 371 | else throw("you do not have gWX"), if (if ((amount > 0)) | |
368 | 372 | then (available >= amount) | |
369 | 373 | else false) | |
370 | 374 | then true | |
371 | 375 | else throw("invalid amount")] | |
372 | 376 | if ((checks == checks)) | |
373 | 377 | then { | |
374 | 378 | let votesListName = getVotesListName(pool) | |
375 | 379 | let userAddressStr = toString(i.caller) | |
376 | 380 | let votesListActions = if (containsNode(votesListName, userAddressStr)) | |
377 | 381 | then nil | |
378 | 382 | else insertNodeActions(votesListName, userAddressStr) | |
379 | 383 | $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) | |
380 | 384 | } | |
381 | 385 | else throw("Strict value is not equal to itself.") | |
382 | 386 | } | |
383 | 387 | ||
384 | 388 | ||
385 | 389 | ||
386 | 390 | @Callable(i) | |
387 | 391 | func cancelVote (amountAssetId,priceAssetId) = { | |
388 | 392 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
389 | 393 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
390 | 394 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
391 | 395 | let epochLength = getIntOrFail(this, keyEpochLength) | |
392 | 396 | let endHeight = (startHeight + epochLength) | |
393 | 397 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
394 | 398 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
395 | 399 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
396 | 400 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
397 | 401 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
398 | 402 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
399 | 403 | then true | |
400 | 404 | else throw("invalid assets"), if ((endHeight > height)) | |
401 | 405 | then true | |
402 | 406 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
403 | 407 | then true | |
404 | 408 | else throw("finalization in progress"), if ((vote > 0)) | |
405 | 409 | then true | |
406 | 410 | else throw("no vote")] | |
407 | 411 | if ((checks == checks)) | |
408 | 412 | then { | |
409 | 413 | let votesListName = getVotesListName(pool) | |
410 | 414 | let userAddressStr = toString(i.caller) | |
411 | 415 | $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) | |
412 | 416 | } | |
413 | 417 | else throw("Strict value is not equal to itself.") | |
414 | 418 | } | |
415 | 419 | ||
416 | 420 | ||
417 | 421 | ||
418 | 422 | @Callable(i) | |
419 | 423 | func setEpochLength (newEpochLength) = { | |
420 | 424 | let cheks = [mustManager(i), if ((newEpochLength > 0)) | |
421 | 425 | then true | |
422 | 426 | else throw("invalid epoch length")] | |
423 | 427 | if ((cheks == cheks)) | |
424 | 428 | then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit) | |
425 | 429 | else throw("Strict value is not equal to itself.") | |
426 | 430 | } | |
427 | 431 | ||
428 | 432 | ||
429 | 433 | ||
430 | 434 | @Callable(i) | |
431 | 435 | func setMaxDepth (newMaxDepth) = { | |
432 | 436 | let cheks = [mustManager(i), if ((newMaxDepth > 0)) | |
433 | 437 | then true | |
434 | 438 | else throw("invalid max depth")] | |
435 | 439 | if ((cheks == cheks)) | |
436 | 440 | then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit) | |
437 | 441 | else throw("Strict value is not equal to itself.") | |
438 | 442 | } | |
439 | 443 | ||
440 | 444 | ||
441 | 445 | ||
442 | 446 | @Callable(i) | |
443 | 447 | func processVoteINTERNAL (poolStr,userAddressStr) = { | |
444 | 448 | let checkCaller = mustThis(i) | |
445 | 449 | if ((checkCaller == checkCaller)) | |
446 | 450 | then { | |
447 | 451 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr)) | |
448 | 452 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
449 | 453 | let epochPrevious = (epoch - 1) | |
450 | 454 | let epochLength = getIntOrFail(this, keyEpochLength) | |
451 | 455 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
452 | 456 | let endHeight = (startHeight + epochLength) | |
453 | 457 | let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious)) | |
454 | 458 | let endHeightPrevious = (startHeightPrevious + epochLength) | |
455 | 459 | let checkTargetEpoch = if ((epochPrevious >= 0)) | |
456 | 460 | then true | |
457 | 461 | else throw("processVoteINTERNAL: invalid previous epoch") | |
458 | 462 | if ((checkTargetEpoch == checkTargetEpoch)) | |
459 | 463 | then { | |
460 | 464 | let pool = stringToPool(poolStr) | |
461 | 465 | let gwxAmountAtEndTotal = { | |
462 | 466 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
463 | 467 | if ($isInstanceOf(@, "Int")) | |
464 | 468 | then @ | |
465 | 469 | else throw("Couldn't cast Any to Int") | |
466 | 470 | } | |
467 | 471 | let gwxAmountAtEndTotalPrevious = { | |
468 | 472 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil) | |
469 | 473 | if ($isInstanceOf(@, "Int")) | |
470 | 474 | then @ | |
471 | 475 | else throw("Couldn't cast Any to Int") | |
472 | 476 | } | |
473 | 477 | let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0) | |
474 | 478 | let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0) | |
475 | 479 | let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")) | |
476 | 480 | let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0) | |
477 | 481 | let newVote = fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious) | |
478 | 482 | let actions = if ((newVote > 0)) | |
479 | 483 | then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))] | |
480 | 484 | else deleteNodeActions(getVotesListName(pool), userAddressStr) | |
481 | 485 | $Tuple2(actions, unit) | |
482 | 486 | } | |
483 | 487 | else throw("Strict value is not equal to itself.") | |
484 | 488 | } | |
485 | 489 | else throw("Strict value is not equal to itself.") | |
486 | 490 | } | |
487 | 491 | ||
488 | 492 | ||
489 | 493 | ||
490 | 494 | @Callable(i) | |
491 | 495 | func processPoolINTERNAL (poolStr) = { | |
492 | 496 | let checkCaller = mustThis(i) | |
493 | 497 | if ((checkCaller == checkCaller)) | |
494 | 498 | then { | |
495 | 499 | let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1) | |
496 | 500 | let checkTargetEpoch = if ((targetEpoch >= 0)) | |
497 | 501 | then true | |
498 | 502 | else throw("processPoolINTERNAL: invalid target epoch") | |
499 | 503 | if ((checkTargetEpoch == checkTargetEpoch)) | |
500 | 504 | then { | |
501 | 505 | let pool = stringToPool(poolStr) | |
506 | + | let $t01678716827 = pool | |
507 | + | let amountAssetId = $t01678716827._1 | |
508 | + | let priceAssetId = $t01678716827._2 | |
502 | 509 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0) | |
503 | 510 | let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0) | |
504 | 511 | let share = if ((totalVotes == 0)) | |
505 | 512 | then 0 | |
506 | 513 | else fraction(votingResult, poolWeightMult, totalVotes) | |
507 | - | $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], unit) | |
514 | + | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
515 | + | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [amountAssetId, priceAssetId, share], nil) | |
516 | + | if ((modifyWeightInv == modifyWeightInv)) | |
517 | + | then $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], unit) | |
518 | + | else throw("Strict value is not equal to itself.") | |
508 | 519 | } | |
509 | 520 | else throw("Strict value is not equal to itself.") | |
510 | 521 | } | |
511 | 522 | else throw("Strict value is not equal to itself.") | |
512 | 523 | } | |
513 | 524 | ||
514 | 525 | ||
515 | 526 | ||
516 | 527 | @Callable(i) | |
517 | 528 | func finalizeHelper () = { | |
518 | 529 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
519 | 530 | let previousEpoch = (epoch - 1) | |
520 | 531 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
521 | 532 | let epochLength = getIntOrFail(this, keyEpochLength) | |
522 | 533 | let endHeight = (startHeight + epochLength) | |
523 | 534 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
524 | 535 | if ((height >= endHeight)) | |
525 | 536 | then { | |
526 | 537 | let newEpoch = (epoch + 1) | |
527 | 538 | $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true) | |
528 | 539 | } | |
529 | 540 | else if ((finalizationStageOrUnit == unit)) | |
530 | 541 | then $Tuple2(nil, false) | |
531 | 542 | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
532 | 543 | then { | |
533 | 544 | let poolOrUnit = getString(keyNextPool) | |
534 | 545 | let userOrUnit = getString(keyNextUser) | |
535 | 546 | match poolOrUnit { | |
536 | 547 | case _: Unit => | |
537 | 548 | match getString(keyListHead(poolsListName)) { | |
538 | 549 | case _: Unit => | |
539 | 550 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
540 | 551 | case poolsHeadStr: String => | |
541 | 552 | $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true) | |
542 | 553 | case _ => | |
543 | 554 | throw("Match error") | |
544 | 555 | } | |
545 | 556 | case poolStr: String => | |
546 | 557 | let pool = stringToPool(poolStr) | |
547 | 558 | let nextUserOrUnit = match userOrUnit { | |
548 | 559 | case _: Unit => | |
549 | 560 | getString(keyListHead(getVotesListName(pool))) | |
550 | 561 | case user: String => | |
551 | 562 | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
552 | 563 | if ((processVoteInv == processVoteInv)) | |
553 | 564 | then getString(keyListNext(getVotesListName(pool), user)) | |
554 | 565 | else throw("Strict value is not equal to itself.") | |
555 | 566 | case _ => | |
556 | 567 | throw("Match error") | |
557 | 568 | } | |
558 | 569 | match nextUserOrUnit { | |
559 | 570 | case _: Unit => | |
560 | 571 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
561 | 572 | match nextPoolOrUnit { | |
562 | 573 | case _: Unit => | |
563 | 574 | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
564 | 575 | case s: String => | |
565 | 576 | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
566 | 577 | case _ => | |
567 | 578 | throw("Match error") | |
568 | 579 | } | |
569 | 580 | case nextUser: String => | |
570 | 581 | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
571 | 582 | case _ => | |
572 | 583 | throw("Match error") | |
573 | 584 | } | |
574 | 585 | case _ => | |
575 | 586 | throw("Match error") | |
576 | 587 | } | |
577 | 588 | } | |
578 | 589 | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
579 | 590 | then { | |
580 | 591 | let poolOrUnit = getString(keyNextPool) | |
581 | 592 | match poolOrUnit { | |
582 | 593 | case _: Unit => | |
583 | 594 | match getString(keyListHead(poolsListName)) { | |
584 | 595 | case _: Unit => | |
585 | 596 | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true) | |
586 | 597 | case nextPoolStr: String => | |
587 | 598 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
588 | 599 | case _ => | |
589 | 600 | throw("Match error") | |
590 | 601 | } | |
591 | 602 | case poolStr: String => | |
592 | 603 | let processPoolInv = invoke(this, "processPoolINTERNAL", [poolStr], nil) | |
593 | 604 | if ((processPoolInv == processPoolInv)) | |
594 | 605 | then { | |
595 | 606 | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
596 | 607 | match nextPoolOrUnit { | |
597 | 608 | case _: Unit => | |
598 | 609 | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true) | |
599 | 610 | case nextPoolStr: String => | |
600 | 611 | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
601 | 612 | case _ => | |
602 | 613 | throw("Match error") | |
603 | 614 | } | |
604 | 615 | } | |
605 | 616 | else throw("Strict value is not equal to itself.") | |
606 | 617 | case _ => | |
607 | 618 | throw("Match error") | |
608 | 619 | } | |
609 | 620 | } | |
610 | 621 | else throw("finalization is broken") | |
611 | 622 | } | |
612 | 623 | ||
613 | 624 | ||
614 | 625 | ||
615 | 626 | @Callable(i) | |
616 | 627 | func finalizeWrapper (counter) = { | |
617 | 628 | let result = { | |
618 | 629 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
619 | 630 | if ($isInstanceOf(@, "Boolean")) | |
620 | 631 | then @ | |
621 | 632 | else throw("Couldn't cast Any to Boolean") | |
622 | 633 | } | |
623 | 634 | if ((result == result)) | |
624 | 635 | then if (!(result)) | |
625 | 636 | then if ((counter == 0)) | |
626 | 637 | then throw("Current voting is not over yet") | |
627 | 638 | else $Tuple2(nil, unit) | |
628 | 639 | else { | |
629 | 640 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
630 | 641 | if ((maxDepth > counter)) | |
631 | 642 | then { | |
632 | 643 | let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil) | |
633 | 644 | if ((inv == inv)) | |
634 | 645 | then $Tuple2(nil, unit) | |
635 | 646 | else throw("Strict value is not equal to itself.") | |
636 | 647 | } | |
637 | 648 | else $Tuple2(nil, unit) | |
638 | 649 | } | |
639 | 650 | else throw("Strict value is not equal to itself.") | |
640 | 651 | } | |
641 | 652 | ||
642 | 653 | ||
643 | 654 | ||
644 | 655 | @Callable(i) | |
645 | 656 | func finalize () = { | |
646 | 657 | let inv = invoke(this, "finalizeWrapper", [0], nil) | |
647 | 658 | if ((inv == inv)) | |
648 | 659 | then $Tuple2(nil, unit) | |
649 | 660 | else throw("Strict value is not equal to itself.") | |
650 | 661 | } | |
651 | 662 | ||
652 | 663 | ||
653 | 664 | ||
654 | 665 | @Callable(i) | |
655 | 666 | func onVerificationLoss (assetId) = $Tuple2(nil, unit) | |
656 | 667 | ||
657 | 668 | ||
658 | 669 | ||
659 | 670 | @Callable(i) | |
660 | 671 | func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id)) | |
661 | 672 | ||
662 | 673 | ||
663 | 674 | ||
664 | 675 | @Callable(i) | |
665 | 676 | func insertNode (listName,id) = { | |
666 | 677 | let checkCaller = mustManager(i) | |
667 | 678 | if ((checkCaller == checkCaller)) | |
668 | 679 | then $Tuple2(insertNodeActions(listName, id), unit) | |
669 | 680 | else throw("Strict value is not equal to itself.") | |
670 | 681 | } | |
671 | 682 | ||
672 | 683 | ||
673 | 684 | ||
674 | 685 | @Callable(i) | |
675 | 686 | func deleteNode (listName,id) = { | |
676 | 687 | let checkCaller = mustManager(i) | |
677 | 688 | if ((checkCaller == checkCaller)) | |
678 | 689 | then $Tuple2(deleteNodeActions(listName, id), unit) | |
679 | 690 | else throw("Strict value is not equal to itself.") | |
680 | 691 | } | |
681 | 692 | ||
682 | 693 | ||
683 | 694 | @Verifier(tx) | |
684 | 695 | func verify () = { | |
685 | 696 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
686 | 697 | case pk: ByteVector => | |
687 | 698 | pk | |
688 | 699 | case _: Unit => | |
689 | 700 | tx.senderPublicKey | |
690 | 701 | case _ => | |
691 | 702 | throw("Match error") | |
692 | 703 | } | |
693 | 704 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
694 | 705 | } | |
695 | 706 |
github/deemru/w8io/169f3d6 92.56 ms ◑