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