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:BgIcCAISABIDCgEIEgASABIDCgEIEgMKAQgSAwoBCB4AA1NFUAICX18AEGNvbnRyYWN0RmlsZW5hbWUCEm1hbmFnZXJfdmF1bHQucmlkZQATTUFYX0FETUlOX0xJU1RfU0laRQAKABNNSU5fQURNSU5fTElTVF9TSVpFAAIAFEFERFJFU1NfQllURVNfTEVOR1RIABoAEVRYSURfQllURVNfTEVOR1RIACABCHRocm93RXJyAQFzCQACAQkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzARlrZXlBY3RpdmVNYW5hZ2VyUHVibGljS2V5AAkAuQkCCQDMCAICAiVzCQDMCAICEG1hbmFnZXJQdWJsaWNLZXkFA25pbAUDU0VQARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAJALkJAgkAzAgCAgIlcwkAzAgCAhdwZW5kaW5nTWFuYWdlclB1YmxpY0tleQUDbmlsBQNTRVABGmtleUN1cnJlbnRNYW5hZ2VyUHVibGljS2V5AAkAuQkCCQDMCAICAiVzCQDMCAICF2N1cnJlbnRNYW5hZ2VyUHVibGljS2V5BQNuaWwFA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GlzdAFpAQt2b3RlRm9yVHhJZAEEdHhJZAQTY2FsbGVyQWRkcmVzc1N0cmluZwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBAlrZXlQcmVmaXgJARhrZXlBbGxvd2VkVHhJZFZvdGVQcmVmaXgBBQR0eElkBAZxdW9ydW0AAgQGcmVzdWx0CQDMCAIJAQtTdHJpbmdFbnRyeQIJAQ5rZXlBbGxvd2VkVHhJZAAFBHR4SWQFA25pbAQDZXJyAwkBAiE9AgkAyAEBCQDZBAEFBHR4SWQFEVRYSURfQllURVNfTEVOR1RICQEIdGhyb3dFcnIBCQCsAgIFBHR4SWQCDyBub3QgdmFsaWQgdHhJZAUEdW5pdAMJAAACBQNlcnIFA2VycgkBDHZvdGVJTlRFUk5BTAQFE2NhbGxlckFkZHJlc3NTdHJpbmcFCWtleVByZWZpeAUGcXVvcnVtBQZyZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAthbGxvd2VkVHhJZAkA2QQBCQERQGV4dHJOYXRpdmUoMTA1OCkBCQEOa2V5QWxsb3dlZFR4SWQABBBjdXJyZW50QWRtaW5MaXN0CQENZ2V0QWRtaW5zTGlzdAADCQBnAgkAkAMBBRBjdXJyZW50QWRtaW5MaXN0BRNNSU5fQURNSU5fTElTVF9TSVpFCQAAAggFAnR4AmlkBQthbGxvd2VkVHhJZAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleZNVFpc=", "height": 2548856, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7uE16LdQTRYndCnEGPrJ6hcASX6eBS6DB8Dt2hZMeVxq Next: none Diff:
OldNewDifferences
6868 }
6969
7070
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+}
7277
7378
7479 func isInAdminList (address) = containsElement(getAdminsList(), address)
7580
7681
7782 func genVotesKeysHelper (a,adminAddress) = {
78- let $t021982222 = a
79- let result = $t021982222._1
80- let prefix = $t021982222._2
83+ let $t022422266 = a
84+ let result = $t022422266._1
85+ let prefix = $t022422266._2
8186 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
8287 }
8388
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let contractFilename = "manager_vault.ride"
77
88 let MAX_ADMIN_LIST_SIZE = 10
99
1010 let MIN_ADMIN_LIST_SIZE = 2
1111
1212 let ADDRESS_BYTES_LENGTH = 26
1313
1414 let TXID_BYTES_LENGTH = 32
1515
1616 func throwErr (s) = throw(((contractFilename + ": ") + s))
1717
1818
1919 func keyActiveManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
2020
2121
2222 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
2323
2424
2525 func keyCurrentManagerPublicKey () = makeString(["%s", "currentManagerPublicKey"], SEP)
2626
2727
2828 func keySetNewManagerVotePrefix (managerPublicKey) = makeString(["%s%s%s", "setManager", managerPublicKey], SEP)
2929
3030
3131 func keyDeactivateManagerVotePrefix () = makeString(["%s%s", "deactivateManager"], SEP)
3232
3333
3434 func keyActivateManagerVotePrefix () = makeString(["%s%s", "activateManager"], SEP)
3535
3636
3737 func keyAddNewAdminVotePrefix (adminCandidate) = makeString(["%s%s%s", "addAdmin", adminCandidate], SEP)
3838
3939
4040 func keyRemoveAdminVotePrefix (removeCandidate) = makeString(["%s%s%s", "removeAdmin", removeCandidate], SEP)
4141
4242
4343 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
4444
4545
4646 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
4747
4848
4949 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
5050
5151
5252 func keyAllowedTxId () = makeString(["%s", "TXID"], SEP)
5353
5454
5555 func getAdminVote (prefix,admin) = {
5656 let voteKey = keyFullAdminVote(prefix, admin)
5757 valueOrElse(getInteger(voteKey), 0)
5858 }
5959
6060
6161 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
6262 case s: String =>
6363 fromBase58String(s)
6464 case _: Unit =>
6565 unit
6666 case _ =>
6767 throw("Match error")
6868 }
6969
7070
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+}
7277
7378
7479 func isInAdminList (address) = containsElement(getAdminsList(), address)
7580
7681
7782 func genVotesKeysHelper (a,adminAddress) = {
78- let $t021982222 = a
79- let result = $t021982222._1
80- let prefix = $t021982222._2
83+ let $t022422266 = a
84+ let result = $t022422266._1
85+ let prefix = $t022422266._2
8186 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
8287 }
8388
8489
8590 func genVotesKeys (keyPrefix) = {
8691 let adminList = keyAdminAddressList()
8792 let $l = getAdminsList()
8893 let $s = size($l)
8994 let $acc0 = $Tuple2(nil, keyPrefix)
9095 func $f0_1 ($a,$i) = if (($i >= $s))
9196 then $a
9297 else genVotesKeysHelper($a, $l[$i])
9398
9499 func $f0_2 ($a,$i) = if (($i >= $s))
95100 then $a
96101 else throw("List size exceeds 20")
97102
98103 $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)
99104 }
100105
101106
102107 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
103108
104109
105110 func countVotes (prefix) = {
106111 let votes = genVotesKeys(prefix)._1
107112 let $l = votes
108113 let $s = size($l)
109114 let $acc0 = 0
110115 func $f0_1 ($a,$i) = if (($i >= $s))
111116 then $a
112117 else countVotesHelper($a, $l[$i])
113118
114119 func $f0_2 ($a,$i) = if (($i >= $s))
115120 then $a
116121 else throw("List size exceeds 20")
117122
118123 $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)
119124 }
120125
121126
122127 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
123128
124129
125130 func getClearVoteEntries (prefix) = {
126131 let votes = genVotesKeys(prefix)._1
127132 let $l = votes
128133 let $s = size($l)
129134 let $acc0 = nil
130135 func $f0_1 ($a,$i) = if (($i >= $s))
131136 then $a
132137 else clearVotesHelper($a, $l[$i])
133138
134139 func $f0_2 ($a,$i) = if (($i >= $s))
135140 then $a
136141 else throw("List size exceeds 20")
137142
138143 $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)
139144 }
140145
141146
142147 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
143148 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
144149 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
145150 let err = if (!(isInAdminList(callerAddressString)))
146151 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
147152 else if ((adminCurrentVote == 1))
148153 then throwErr((voteKey + " you already voted"))
149154 else unit
150155 if ((err == err))
151156 then {
152157 let votes = countVotes(keyPrefix)
153158 if (((votes + 1) >= minVotes))
154159 then {
155160 let clearVoteEntries = getClearVoteEntries(keyPrefix)
156161 (clearVoteEntries ++ voteResult)
157162 }
158163 else [IntegerEntry(voteKey, 1)]
159164 }
160165 else throw("Strict value is not equal to itself.")
161166 }
162167
163168
164169 @Callable(i)
165170 func confirmManager () = {
166171 let pm = pendingManagerPublicKeyOrUnit()
167172 let hasPM = if (isDefined(pm))
168173 then true
169174 else throwErr("no pending manager")
170175 if ((hasPM == hasPM))
171176 then {
172177 let checkPM = if ((i.callerPublicKey == value(pm)))
173178 then true
174179 else throwErr("you are not pending manager")
175180 if ((checkPM == checkPM))
176181 then [StringEntry(keyCurrentManagerPublicKey(), toBase58String(value(pm))), StringEntry(keyActiveManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
177182 else throw("Strict value is not equal to itself.")
178183 }
179184 else throw("Strict value is not equal to itself.")
180185 }
181186
182187
183188
184189 @Callable(i)
185190 func voteForNewManager (newManagerPublicKey) = {
186191 let callerAddressString = toBase58String(i.caller.bytes)
187192 let keyPrefix = keySetNewManagerVotePrefix(newManagerPublicKey)
188193 let quorum = 2
189194 let result = [StringEntry(keyPendingManagerPublicKey(), newManagerPublicKey)]
190195 voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
191196 }
192197
193198
194199
195200 @Callable(i)
196201 func deactivateManager () = {
197202 let callerAddressString = toBase58String(i.caller.bytes)
198203 let keyPrefix = keyDeactivateManagerVotePrefix()
199204 let quorum = 1
200205 let result = [StringEntry(keyActiveManagerPublicKey(), "disabled")]
201206 voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
202207 }
203208
204209
205210
206211 @Callable(i)
207212 func activateManager () = {
208213 let callerAddressString = toBase58String(i.caller.bytes)
209214 let keyPrefix = keyActivateManagerVotePrefix()
210215 let quorum = 2
211216 let currentManagerString = getStringValue(keyCurrentManagerPublicKey())
212217 let result = [StringEntry(keyActiveManagerPublicKey(), currentManagerString)]
213218 voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
214219 }
215220
216221
217222
218223 @Callable(i)
219224 func addNewAdmin (newAdminAddress) = {
220225 let callerAddressString = toBase58String(i.caller.bytes)
221226 let keyPrefix = keyAddNewAdminVotePrefix(newAdminAddress)
222227 let quorum = 2
223228 let currentAdminList = getAdminsList()
224229 let err = if ((size(currentAdminList) >= MAX_ADMIN_LIST_SIZE))
225230 then throwErr((("MAX_ADMIN_LIST_SIZE (" + toString(MAX_ADMIN_LIST_SIZE)) + ") is exceeded"))
226231 else if ((size(fromBase58String(newAdminAddress)) != ADDRESS_BYTES_LENGTH))
227232 then throwErr((newAdminAddress + " is not valid Address"))
228233 else unit
229234 if ((err == err))
230235 then match indexOf(currentAdminList, newAdminAddress) {
231236 case a: Int =>
232237 throwErr((newAdminAddress + " already in Admin List"))
233238 case _ =>
234239 let newAdminList = (currentAdminList :+ newAdminAddress)
235240 let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))]
236241 voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
237242 }
238243 else throw("Strict value is not equal to itself.")
239244 }
240245
241246
242247
243248 @Callable(i)
244249 func removeAdmin (removeCandidate) = {
245250 let callerAddressString = toBase58String(i.caller.bytes)
246251 let keyPrefix = keyRemoveAdminVotePrefix(removeCandidate)
247252 let quorum = 2
248253 let currentAdminList = getAdminsList()
249254 match indexOf(currentAdminList, removeCandidate) {
250255 case index: Int =>
251256 let newAdminList = removeByIndex(currentAdminList, index)
252257 let result = [StringEntry(keyAdminAddressList(), makeString(newAdminList, SEP))]
253258 voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
254259 case _ =>
255260 throwErr((removeCandidate + " not found in Admin List"))
256261 }
257262 }
258263
259264
260265
261266 @Callable(i)
262267 func voteForTxId (txId) = {
263268 let callerAddressString = toBase58String(i.caller.bytes)
264269 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
265270 let quorum = 2
266271 let result = [StringEntry(keyAllowedTxId(), txId)]
267272 let err = if ((size(fromBase58String(txId)) != TXID_BYTES_LENGTH))
268273 then throwErr((txId + " not valid txId"))
269274 else unit
270275 if ((err == err))
271276 then voteINTERNAL(callerAddressString, keyPrefix, quorum, result)
272277 else throw("Strict value is not equal to itself.")
273278 }
274279
275280
276281 @Verifier(tx)
277282 func verify () = {
278283 let allowedTxId = fromBase58String(getStringValue(keyAllowedTxId()))
279284 let currentAdminList = getAdminsList()
280285 if ((size(currentAdminList) >= MIN_ADMIN_LIST_SIZE))
281286 then (tx.id == allowedTxId)
282287 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
283288 }
284289

github/deemru/w8io/fabc49c 
35.40 ms