tx · 8KMye9wc9aMKWnBdwCK6AW3g7y8ErZnZwMD9X4jWdv2o 3N3rx13qetPJFaJJwbbMeVimaETxZP6rNw3: -0.01200000 Waves 2023.04.24 19:23 [2548856] smart account 3N3rx13qetPJFaJJwbbMeVimaETxZP6rNw3 > SELF 0.00000000 Waves
{ "type": 13, "id": "8KMye9wc9aMKWnBdwCK6AW3g7y8ErZnZwMD9X4jWdv2o", "fee": 1200000, "feeAssetId": null, "timestamp": 1682353391196, "version": 2, "chainId": 84, "sender": "3N3rx13qetPJFaJJwbbMeVimaETxZP6rNw3", "senderPublicKey": "EvEJ1kVCPKNyzr5itfZvH4zMqP7vSCVggKZ37ipGhwWD", "proofs": [ "4wBv7wuURUFoN7DTcRXR4Kg4v7T9YHHfeJrbt7J29y82v6Rg6WYphP2FRX6u2ZFbZYKCSfkCDwHU2F2K9jeAKNTk" ], "script": "base64:BgIcCAISABIDCgEIEgASABIDCgEIEgMKAQgSAwoBCB4AA1NFUAICX18AEGNvbnRyYWN0RmlsZW5hbWUCEm1hbmFnZXJfdmF1bHQucmlkZQATTUFYX0FETUlOX0xJU1RfU0laRQAKABNNSU5fQURNSU5fTElTVF9TSVpFAAIAFEFERFJFU1NfQllURVNfTEVOR1RIABoAEVRYSURfQllURVNfTEVOR1RIACABCHRocm93RXJyAQFzCQACAQkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzARlrZXlBY3RpdmVNYW5hZ2VyUHVibGljS2V5AAkAuQkCCQDMCAICAiVzCQDMCAICEG1hbmFnZXJQdWJsaWNLZXkFA25pbAUDU0VQARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAJALkJAgkAzAgCAgIlcwkAzAgCAhdwZW5kaW5nTWFuYWdlclB1YmxpY0tleQUDbmlsBQNTRVABGmtleUN1cnJlbnRNYW5hZ2VyUHVibGljS2V5AAkAuQkCCQDMCAICAiVzCQDMCAICF2N1cnJlbnRNYW5hZ2VyUHVibGljS2V5BQNuaWwFA1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lzdAFpAQt2b3RlRm9yVHhJZAEEdHhJZAQTY2FsbGVyQWRkcmVzc1N0cmluZwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBAlrZXlQcmVmaXgJARhrZXlBbGxvd2VkVHhJZFZvdGVQcmVmaXgBBQR0eElkBAZxdW9ydW0AAgQGcmVzdWx0CQDMCAIJAQtTdHJpbmdFbnRyeQIJAQ5rZXlBbGxvd2VkVHhJZAAFBHR4SWQFA25pbAQDZXJyAwkBAiE9AgkAyAEBCQDZBAEFBHR4SWQFEVRYSURfQllURVNfTEVOR1RICQEIdGhyb3dFcnIBCQCsAgIFBHR4SWQCDyBub3QgdmFsaWQgdHhJZAUEdW5pdAMJAAACBQNlcnIFA2VycgkBDHZvdGVJTlRFUk5BTAQFE2NhbGxlckFkZHJlc3NTdHJpbmcFCWtleVByZWZpeAUGcXVvcnVtBQZyZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAthbGxvd2VkVHhJZAkA2QQBCQERQGV4dHJOYXRpdmUoMTA1OCkBCQEOa2V5QWxsb3dlZFR4SWQABBBjdXJyZW50QWRtaW5MaXN0CQENZ2V0QWRtaW5zTGlzdAADCQBnAgkAkAMBBRBjdXJyZW50QWRtaW5MaXN0BRNNSU5fQURNSU5fTElTVF9TSVpFCQAAAggFAnR4AmlkBQthbGxvd2VkVHhJZAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleZNVFpc=", "height": 2548856, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7uE16LdQTRYndCnEGPrJ6hcASX6eBS6DB8Dt2hZMeVxq Next: none Diff:
Old | New | Differences | |
---|---|---|---|
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | - | func getAdminsList () = split(valueOrElse(getString(this, keyAdminAddressList()), ""), SEP) | |
71 | + | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
72 | + | case s: String => | |
73 | + | split(s, SEP) | |
74 | + | case _ => | |
75 | + | nil | |
76 | + | } | |
72 | 77 | ||
73 | 78 | ||
74 | 79 | func isInAdminList (address) = containsElement(getAdminsList(), address) | |
75 | 80 | ||
76 | 81 | ||
77 | 82 | func genVotesKeysHelper (a,adminAddress) = { | |
78 | - | let $ | |
79 | - | let result = $ | |
80 | - | let prefix = $ | |
83 | + | let $t022422266 = a | |
84 | + | let result = $t022422266._1 | |
85 | + | let prefix = $t022422266._2 | |
81 | 86 | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
82 | 87 | } | |
83 | 88 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let contractFilename = "manager_vault.ride" | |
7 | 7 | ||
8 | 8 | let MAX_ADMIN_LIST_SIZE = 10 | |
9 | 9 | ||
10 | 10 | let MIN_ADMIN_LIST_SIZE = 2 | |
11 | 11 | ||
12 | 12 | let ADDRESS_BYTES_LENGTH = 26 | |
13 | 13 | ||
14 | 14 | let TXID_BYTES_LENGTH = 32 | |
15 | 15 | ||
16 | 16 | func throwErr (s) = throw(((contractFilename + ": ") + s)) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func keyActiveManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func keyCurrentManagerPublicKey () = makeString(["%s", "currentManagerPublicKey"], SEP) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func keySetNewManagerVotePrefix (managerPublicKey) = makeString(["%s%s%s", "setManager", managerPublicKey], SEP) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyDeactivateManagerVotePrefix () = makeString(["%s%s", "deactivateManager"], SEP) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyActivateManagerVotePrefix () = makeString(["%s%s", "activateManager"], SEP) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyAddNewAdminVotePrefix (adminCandidate) = makeString(["%s%s%s", "addAdmin", adminCandidate], SEP) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyRemoveAdminVotePrefix (removeCandidate) = makeString(["%s%s%s", "removeAdmin", removeCandidate], SEP) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyAllowedTxId () = makeString(["%s", "TXID"], SEP) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getAdminVote (prefix,admin) = { | |
56 | 56 | let voteKey = keyFullAdminVote(prefix, admin) | |
57 | 57 | valueOrElse(getInteger(voteKey), 0) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
62 | 62 | case s: String => | |
63 | 63 | fromBase58String(s) | |
64 | 64 | case _: Unit => | |
65 | 65 | unit | |
66 | 66 | case _ => | |
67 | 67 | throw("Match error") | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | - | func getAdminsList () = split(valueOrElse(getString(this, keyAdminAddressList()), ""), SEP) | |
71 | + | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
72 | + | case s: String => | |
73 | + | split(s, SEP) | |
74 | + | case _ => | |
75 | + | nil | |
76 | + | } | |
72 | 77 | ||
73 | 78 | ||
74 | 79 | func isInAdminList (address) = containsElement(getAdminsList(), address) | |
75 | 80 | ||
76 | 81 | ||
77 | 82 | func genVotesKeysHelper (a,adminAddress) = { | |
78 | - | let $ | |
79 | - | let result = $ | |
80 | - | let prefix = $ | |
83 | + | let $t022422266 = a | |
84 | + | let result = $t022422266._1 | |
85 | + | let prefix = $t022422266._2 | |
81 | 86 | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
82 | 87 | } | |
83 | 88 | ||
84 | 89 | ||
85 | 90 | func genVotesKeys (keyPrefix) = { | |
86 | 91 | let adminList = keyAdminAddressList() | |
87 | 92 | let $l = getAdminsList() | |
88 | 93 | let $s = size($l) | |
89 | 94 | let $acc0 = $Tuple2(nil, keyPrefix) | |
90 | 95 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
91 | 96 | then $a | |
92 | 97 | else genVotesKeysHelper($a, $l[$i]) | |
93 | 98 | ||
94 | 99 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
95 | 100 | then $a | |
96 | 101 | else throw("List size exceeds 20") | |
97 | 102 | ||
98 | 103 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
99 | 104 | } | |
100 | 105 | ||
101 | 106 | ||
102 | 107 | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
103 | 108 | ||
104 | 109 | ||
105 | 110 | func countVotes (prefix) = { | |
106 | 111 | let votes = genVotesKeys(prefix)._1 | |
107 | 112 | let $l = votes | |
108 | 113 | let $s = size($l) | |
109 | 114 | let $acc0 = 0 | |
110 | 115 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
111 | 116 | then $a | |
112 | 117 | else countVotesHelper($a, $l[$i]) | |
113 | 118 | ||
114 | 119 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
115 | 120 | then $a | |
116 | 121 | else throw("List size exceeds 20") | |
117 | 122 | ||
118 | 123 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
119 | 124 | } | |
120 | 125 | ||
121 | 126 | ||
122 | 127 | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
123 | 128 | ||
124 | 129 | ||
125 | 130 | func getClearVoteEntries (prefix) = { | |
126 | 131 | let votes = genVotesKeys(prefix)._1 | |
127 | 132 | let $l = votes | |
128 | 133 | let $s = size($l) | |
129 | 134 | let $acc0 = nil | |
130 | 135 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
131 | 136 | then $a | |
132 | 137 | else clearVotesHelper($a, $l[$i]) | |
133 | 138 | ||
134 | 139 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
135 | 140 | then $a | |
136 | 141 | else throw("List size exceeds 20") | |
137 | 142 | ||
138 | 143 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
139 | 144 | } | |
140 | 145 | ||
141 | 146 | ||
142 | 147 | func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = { | |
143 | 148 | let voteKey = keyFullAdminVote(keyPrefix, callerAddressString) | |
144 | 149 | let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString) | |
145 | 150 | let err = if (!(isInAdminList(callerAddressString))) | |
146 | 151 | then throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
147 | 152 | else if ((adminCurrentVote == 1)) | |
148 | 153 | then throwErr((voteKey + " you already voted")) | |
149 | 154 | else unit | |
150 | 155 | if ((err == err)) | |
151 | 156 | then { | |
152 | 157 | let votes = countVotes(keyPrefix) | |
153 | 158 | if (((votes + 1) >= minVotes)) | |
154 | 159 | then { | |
155 | 160 | let clearVoteEntries = getClearVoteEntries(keyPrefix) | |
156 | 161 | (clearVoteEntries ++ voteResult) | |
157 | 162 | } | |
158 | 163 | else [IntegerEntry(voteKey, 1)] | |
159 | 164 | } | |
160 | 165 | else throw("Strict value is not equal to itself.") | |
161 | 166 | } | |
162 | 167 | ||
163 | 168 | ||
164 | 169 | @Callable(i) | |
165 | 170 | func confirmManager () = { | |
166 | 171 | let pm = pendingManagerPublicKeyOrUnit() | |
167 | 172 | let hasPM = if (isDefined(pm)) | |
168 | 173 | then true | |
169 | 174 | else throwErr("no pending manager") | |
170 | 175 | if ((hasPM == hasPM)) | |
171 | 176 | then { | |
172 | 177 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
173 | 178 | then true | |
174 | 179 | else throwErr("you are not pending manager") | |
175 | 180 | if ((checkPM == checkPM)) | |
176 | 181 | then [StringEntry(keyCurrentManagerPublicKey(), toBase58String(value(pm))), StringEntry(keyActiveManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
177 | 182 | else throw("Strict value is not equal to itself.") | |
178 | 183 | } | |
179 | 184 | else throw("Strict value is not equal to itself.") | |
180 | 185 | } | |
181 | 186 | ||
182 | 187 | ||
183 | 188 | ||
184 | 189 | @Callable(i) | |
185 | 190 | func voteForNewManager (newManagerPublicKey) = { | |
186 | 191 | let callerAddressString = toBase58String(i.caller.bytes) | |
187 | 192 | let keyPrefix = keySetNewManagerVotePrefix(newManagerPublicKey) | |
188 | 193 | let quorum = 2 | |
189 | 194 | let result = [StringEntry(keyPendingManagerPublicKey(), newManagerPublicKey)] | |
190 | 195 | voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
191 | 196 | } | |
192 | 197 | ||
193 | 198 | ||
194 | 199 | ||
195 | 200 | @Callable(i) | |
196 | 201 | func deactivateManager () = { | |
197 | 202 | let callerAddressString = toBase58String(i.caller.bytes) | |
198 | 203 | let keyPrefix = keyDeactivateManagerVotePrefix() | |
199 | 204 | let quorum = 1 | |
200 | 205 | let result = [StringEntry(keyActiveManagerPublicKey(), "disabled")] | |
201 | 206 | voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
202 | 207 | } | |
203 | 208 | ||
204 | 209 | ||
205 | 210 | ||
206 | 211 | @Callable(i) | |
207 | 212 | func activateManager () = { | |
208 | 213 | let callerAddressString = toBase58String(i.caller.bytes) | |
209 | 214 | let keyPrefix = keyActivateManagerVotePrefix() | |
210 | 215 | let quorum = 2 | |
211 | 216 | let currentManagerString = getStringValue(keyCurrentManagerPublicKey()) | |
212 | 217 | let result = [StringEntry(keyActiveManagerPublicKey(), currentManagerString)] | |
213 | 218 | voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
214 | 219 | } | |
215 | 220 | ||
216 | 221 | ||
217 | 222 | ||
218 | 223 | @Callable(i) | |
219 | 224 | func addNewAdmin (newAdminAddress) = { | |
220 | 225 | let callerAddressString = toBase58String(i.caller.bytes) | |
221 | 226 | let keyPrefix = keyAddNewAdminVotePrefix(newAdminAddress) | |
222 | 227 | let quorum = 2 | |
223 | 228 | let currentAdminList = getAdminsList() | |
224 | 229 | let err = if ((size(currentAdminList) >= MAX_ADMIN_LIST_SIZE)) | |
225 | 230 | then throwErr((("MAX_ADMIN_LIST_SIZE (" + toString(MAX_ADMIN_LIST_SIZE)) + ") is exceeded")) | |
226 | 231 | else if ((size(fromBase58String(newAdminAddress)) != ADDRESS_BYTES_LENGTH)) | |
227 | 232 | then throwErr((newAdminAddress + " is not valid Address")) | |
228 | 233 | else unit | |
229 | 234 | if ((err == err)) | |
230 | 235 | then match indexOf(currentAdminList, newAdminAddress) { | |
231 | 236 | case a: Int => | |
232 | 237 | throwErr((newAdminAddress + " already in Admin List")) | |
233 | 238 | case _ => | |
234 | 239 | let newAdminList = (currentAdminList :+ newAdminAddress) | |
235 | 240 | let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))] | |
236 | 241 | voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
237 | 242 | } | |
238 | 243 | else throw("Strict value is not equal to itself.") | |
239 | 244 | } | |
240 | 245 | ||
241 | 246 | ||
242 | 247 | ||
243 | 248 | @Callable(i) | |
244 | 249 | func removeAdmin (removeCandidate) = { | |
245 | 250 | let callerAddressString = toBase58String(i.caller.bytes) | |
246 | 251 | let keyPrefix = keyRemoveAdminVotePrefix(removeCandidate) | |
247 | 252 | let quorum = 2 | |
248 | 253 | let currentAdminList = getAdminsList() | |
249 | 254 | match indexOf(currentAdminList, removeCandidate) { | |
250 | 255 | case index: Int => | |
251 | 256 | let newAdminList = removeByIndex(currentAdminList, index) | |
252 | 257 | let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))] | |
253 | 258 | voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
254 | 259 | case _ => | |
255 | 260 | throwErr((removeCandidate + " not found in Admin List")) | |
256 | 261 | } | |
257 | 262 | } | |
258 | 263 | ||
259 | 264 | ||
260 | 265 | ||
261 | 266 | @Callable(i) | |
262 | 267 | func voteForTxId (txId) = { | |
263 | 268 | let callerAddressString = toBase58String(i.caller.bytes) | |
264 | 269 | let keyPrefix = keyAllowedTxIdVotePrefix(txId) | |
265 | 270 | let quorum = 2 | |
266 | 271 | let result = [StringEntry(keyAllowedTxId(), txId)] | |
267 | 272 | let err = if ((size(fromBase58String(txId)) != TXID_BYTES_LENGTH)) | |
268 | 273 | then throwErr((txId + " not valid txId")) | |
269 | 274 | else unit | |
270 | 275 | if ((err == err)) | |
271 | 276 | then voteINTERNAL(callerAddressString, keyPrefix, quorum, result) | |
272 | 277 | else throw("Strict value is not equal to itself.") | |
273 | 278 | } | |
274 | 279 | ||
275 | 280 | ||
276 | 281 | @Verifier(tx) | |
277 | 282 | func verify () = { | |
278 | 283 | let allowedTxId = fromBase58String(getStringValue(keyAllowedTxId())) | |
279 | 284 | let currentAdminList = getAdminsList() | |
280 | 285 | if ((size(currentAdminList) >= MIN_ADMIN_LIST_SIZE)) | |
281 | 286 | then (tx.id == allowedTxId) | |
282 | 287 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
283 | 288 | } | |
284 | 289 |
github/deemru/w8io/fabc49c 35.40 ms ◑