tx · Eq56WCGh3F9nBWG3GPZyzW4ZMkWDGdEu68J349QgDa5c

3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h:  -0.01600000 Waves

2024.02.28 10:34 [2995786] smart account 3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h > SELF 0.00000000 Waves

{ "type": 13, "id": "Eq56WCGh3F9nBWG3GPZyzW4ZMkWDGdEu68J349QgDa5c", "fee": 1600000, "feeAssetId": null, "timestamp": 1709105693689, "version": 2, "chainId": 84, "sender": "3NCWFHDzdPHZC6636ZkMLNDup9mjpbTLs7h", "senderPublicKey": "3z8Q6Zu3KppVmn6fJJvrLc1Wo3krVHSvfaNcerm82md2", "proofs": [ "42czbPAM5P5vZ7EHxdkMSJgT7WaF9PC8YpZp1qHb7EVRGX4VazgTWKDVJdBKJv2i99moNDvenyTYjRHnE8Up2CD6" ], "script": "base64:BgI/CAISAwoBARIDCgEEEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgQKAggBEgQKAggBEgMKAQESABIDCgEINgAMY29udHJhY3RGaWxlAhFsMm1wX2xlYXNpbmcucmlkZQADU0VQAgJfXwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAAMa2V5Rm9yY2VTdG9wCQC5CQIJAMwIAgICJXMJAMwIAgIJZm9yY2VTdG9wBQNuaWwFA1NFUAARa2V5UGVyaW9kT2Zmc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAghvZmZzZXRJZAUDbmlsBQNTRVAAFWtleVBlcmlvZE9mZnNldEhlaWdodAkAuQkCCQDMCAICAiVzCQDMCAICDG9mZnNldEhlaWdodAUDbmlsBQNTRVAAD2tleVBlcmlvZExlbmd0aAkAuQkCCQDMCAICAiVzCQDMCAICDHBlcmlvZExlbmd0aAUDbmlsBQNTRVAADnBlcmlvZ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CsAgIFBHR4SWQCEyBpcyBhbHJlYWR5IGFsbG93ZWQFA25pbAMJAAACBQNlcnIFA2VycgkBDHZvdGVJTlRFUk5BTAQFE2NhbGxlckFkZHJlc3NTdHJpbmcFCWtleVByZWZpeAUGUVVPUlVNBQZyZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAhieUFkbWlucwkAAAIIBQJ0eAJpZAkA2QQBCQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lctKcOwY=", "height": 2995786, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EfNQCoTHm9YAP7VzEjHtoExBcREZSCS4yEznwcr9z6pu Next: EC5cKbZcMw8SvPwc9G5Yaya3kyyGaF88bt4oEMT6zFiX Diff:
OldNewDifferences
1010
1111 let keyAssetId = makeString(["%s", "assetId"], SEP)
1212
13-let keyAdminList = makeString(["%s", "adminList"], SEP)
14-
1513 let keyForceStop = makeString(["%s", "forceStop"], SEP)
1614
1715 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
1917 let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP)
2018
2119 let keyPeriodLength = makeString(["%s", "periodLength"], SEP)
22-
23-let keyMigrationPeriod = makeString(["%s", "migrationPeriod"], SEP)
2420
2521 let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0)
2622
3430 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
3531 else max([0, (periodOffsetId - 1)])
3632
37-let currentPeriodHeight = (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
33+let currentPeriodHeight = if ((periodOffsetHeight == -1))
34+ then 0
35+ else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
3836
39-let nextPeriodHeight = (currentPeriodHeight + periodLength)
40-
41-let migrationPeriodHeight = valueOrElse(getInteger(this, keyMigrationPeriod), (height + 1))
37+let nextPeriodHeight = if ((periodOffsetHeight == -1))
38+ then 0
39+ else (currentPeriodHeight + periodLength)
4240
4341 func keyLeasingNodeData (nodeAddress) = makeString(["%s", nodeAddress], SEP)
4442
5250 func keyUserTotalLocked (userAddress) = makeString(["%s%s", "userTotalLocked", userAddress], SEP)
5351
5452
55-func keyNodeLeasingByHeight (nodeAddress) = makeString(["%s%d", nodeAddress, toString(height)], SEP)
53+func keyNodeLeasingByHeight (nodeAddress) = {
54+ let h = if ((periodOffsetHeight == -1))
55+ then 0
56+ else height
57+ makeString(["%s%d", nodeAddress, toString(h)], SEP)
58+ }
5659
5760
58-func keyUserLeasingByHeight (nodeAddress,userAddress) = makeString(["%s%s%d", nodeAddress, userAddress, toString(height)], SEP)
61+func keyUserLeasingByHeight (nodeAddress,userAddress) = {
62+ let h = if ((periodOffsetHeight == -1))
63+ then 0
64+ else height
65+ makeString(["%s%s%d", nodeAddress, userAddress, toString(h)], SEP)
66+ }
5967
6068
6169 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
6472 then unit
6573 else fromBase58String(assetIdString)
6674
67-let adminListRaw = split(valueOrElse(getString(this, keyAdminList), ""), SEP)
68-
6975 let isForceStop = valueOrElse(getBoolean(this, keyForceStop), false)
70-
71-func isAdmin (address) = containsElement(adminListRaw, address)
72-
7376
7477 func isValidAddress (address) = match addressFromString(address) {
7578 case a: Address =>
7780 case _ =>
7881 false
7982 }
83+
84+
85+let ADMIN_LIST_SIZE = 5
86+
87+let QUORUM = 3
88+
89+let TXID_BYTES_LENGTH = 32
90+
91+func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
92+
93+
94+func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
95+
96+
97+func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
98+
99+
100+func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
101+
102+
103+func getAdminVote (prefix,admin) = {
104+ let voteKey = keyFullAdminVote(prefix, admin)
105+ valueOrElse(getInteger(voteKey), 0)
106+ }
107+
108+
109+func getAdminsList () = match getString(this, keyAdminAddressList()) {
110+ case s: String =>
111+ split(s, SEP)
112+ case _ =>
113+ nil
114+}
115+
116+
117+func isInAdminList (address) = containsElement(getAdminsList(), address)
118+
119+
120+func genVotesKeysHelper (a,adminAddress) = {
121+ let $t034483472 = a
122+ let result = $t034483472._1
123+ let prefix = $t034483472._2
124+ $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
125+ }
126+
127+
128+func genVotesKeys (keyPrefix) = {
129+ let adminList = keyAdminAddressList()
130+ let $t036193703 = {
131+ let $l = getAdminsList()
132+ let $s = size($l)
133+ let $acc0 = $Tuple2(nil, keyPrefix)
134+ func $f0_1 ($a,$i) = if (($i >= $s))
135+ then $a
136+ else genVotesKeysHelper($a, $l[$i])
137+
138+ func $f0_2 ($a,$i) = if (($i >= $s))
139+ then $a
140+ else throw("List size exceeds 5")
141+
142+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
143+ }
144+ let result = $t036193703._1
145+ let prefix = $t036193703._2
146+ result
147+ }
148+
149+
150+func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
151+
152+
153+func countVotes (prefix) = {
154+ let votes = genVotesKeys(prefix)
155+ let $l = votes
156+ let $s = size($l)
157+ let $acc0 = 0
158+ func $f0_1 ($a,$i) = if (($i >= $s))
159+ then $a
160+ else countVotesHelper($a, $l[$i])
161+
162+ func $f0_2 ($a,$i) = if (($i >= $s))
163+ then $a
164+ else throw("List size exceeds 5")
165+
166+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
167+ }
168+
169+
170+func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
171+
172+
173+func getClearVoteEntries (prefix) = {
174+ let votes = genVotesKeys(prefix)
175+ let $l = votes
176+ let $s = size($l)
177+ let $acc0 = nil
178+ func $f0_1 ($a,$i) = if (($i >= $s))
179+ then $a
180+ else clearVotesHelper($a, $l[$i])
181+
182+ func $f0_2 ($a,$i) = if (($i >= $s))
183+ then $a
184+ else throw("List size exceeds 5")
185+
186+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
187+ }
188+
189+
190+func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
191+ let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
192+ let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
193+ let err = if (!(isInAdminList(callerAddressString)))
194+ then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
195+ else if ((adminCurrentVote == 1))
196+ then throwErr((voteKey + " you already voted"))
197+ else unit
198+ if ((err == err))
199+ then {
200+ let votes = countVotes(keyPrefix)
201+ if (((votes + 1) >= minVotes))
202+ then {
203+ let clearVoteEntries = getClearVoteEntries(keyPrefix)
204+ (clearVoteEntries ++ voteResult)
205+ }
206+ else [IntegerEntry(voteKey, 1)]
207+ }
208+ else throw("Strict value is not equal to itself.")
209+ }
80210
81211
82212 func getLeasingNodeEntry (nodeAddress,currentLeased,nextLeased) = {
96226 let nodeNextLeased = parseIntValue(dataList[4])
97227 if (if ((nodeNextPeriod > height))
98228 then true
99- else if ((nodeNextPeriod == -1))
100- then (migrationPeriodHeight > height)
101- else false)
229+ else (periodOffsetHeight == -1))
102230 then $Tuple2(nodeCurrentLeased, nodeNextLeased)
103231 else $Tuple2(nodeNextLeased, nodeNextLeased)
104232 case _ =>
124252 let userNextLeased = parseIntValue(dataList[4])
125253 if (if ((userNextPeriod > height))
126254 then true
127- else if ((userNextPeriod == -1))
128- then (migrationPeriodHeight > height)
129- else false)
255+ else (periodOffsetHeight == -1))
130256 then $Tuple2(userCurrentLeased, userNextLeased)
131257 else $Tuple2(userNextLeased, userNextLeased)
132258 case _ =>
150276 let toClaim = parseIntValue(dataList[2])
151277 let nextPeriod = parseIntValue(dataList[3])
152278 let toUnlock = parseIntValue(dataList[4])
153- if ((nextPeriod > height))
279+ if (if ((nextPeriod > height))
280+ then true
281+ else (periodOffsetHeight == -1))
154282 then $Tuple2(toClaim, toUnlock)
155283 else $Tuple2((toClaim + toUnlock), 0)
156284 case _ =>
166294
167295
168296 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
169- let $t063006373 = getLeasingNodeData(nodeAddress)
170- let nodeCurrentLeased = $t063006373._1
171- let nodeNextLeased = $t063006373._2
172- let $t063786464 = getUserLeasingData(nodeAddress, userAddress)
173- let userCurrentLeased = $t063786464._1
174- let userNextLeased = $t063786464._2
297+ let $t087478820 = getLeasingNodeData(nodeAddress)
298+ let nodeCurrentLeased = $t087478820._1
299+ let nodeNextLeased = $t087478820._2
300+ let $t088258911 = getUserLeasingData(nodeAddress, userAddress)
301+ let userCurrentLeased = $t088258911._1
302+ let userNextLeased = $t088258911._2
175303 let checks = [if (!(isForceStop))
176304 then true
177305 else throwErr("contract is temporary stopped"), if ((unstakeAmount > 0))
189317 then {
190318 let newNodeNextLease = (nodeNextLeased - unstakeAmount)
191319 let newUserNextLeased = (userNextLeased - unstakeAmount)
192- let $t072777337 = getUserToClaimBalance(userAddress)
193- let toClaim = $t072777337._1
194- let toUnlock = $t072777337._2
320+ let $t097249784 = getUserToClaimBalance(userAddress)
321+ let toClaim = $t097249784._1
322+ let toUnlock = $t097249784._2
195323 let newToUnlock = (toUnlock + unstakeAmount)
196324 let userTotalLocked = getUserTotalLocked(userAddress)
197325 let newUserTotalLocked = (userTotalLocked - unstakeAmount)
202330
203331
204332 func getClaimUnlockedActions (userAddress,claimAmount) = {
205- let $t080668126 = getUserToClaimBalance(userAddress)
206- let toClaim = $t080668126._1
207- let toUnlock = $t080668126._2
333+ let $t01051310573 = getUserToClaimBalance(userAddress)
334+ let toClaim = $t01051310573._1
335+ let toUnlock = $t01051310573._2
208336 let checks = [if (!(isForceStop))
209337 then true
210338 else throwErr("contract is temporary stopped"), if ((claimAmount > 0))
224352
225353
226354 func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = {
227- let $t088878947 = getUserToClaimBalance(userAddress)
228- let toClaim = $t088878947._1
229- let toUnlock = $t088878947._2
355+ let $t01133411394 = getUserToClaimBalance(userAddress)
356+ let toClaim = $t01133411394._1
357+ let toUnlock = $t01133411394._2
230358 let paymentAmount = if ((size(i.payments) == 0))
231359 then 0
232360 else i.payments[0].amount
252380 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
253381 if ((checks == checks))
254382 then {
255- let $t0999310066 = getLeasingNodeData(nodeAddress)
256- let nodeCurrentLeased = $t0999310066._1
257- let nodeNextLeased = $t0999310066._2
383+ let $t01246512538 = getLeasingNodeData(nodeAddress)
384+ let nodeCurrentLeased = $t01246512538._1
385+ let nodeNextLeased = $t01246512538._2
258386 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
259- let $t01013410220 = getUserLeasingData(nodeAddress, userAddress)
260- let userCurrentLeased = $t01013410220._1
261- let userNextLeased = $t01013410220._2
387+ let $t01260612692 = getUserLeasingData(nodeAddress, userAddress)
388+ let userCurrentLeased = $t01260612692._1
389+ let userNextLeased = $t01260612692._2
262390 let newUserNextLeased = (userNextLeased + userLeasingAmount)
263391 let fromUnlockedAmount = (userLeasingAmount - paymentAmount)
264392 let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)])
295423
296424 @Callable(i)
297425 func setNewPeriodLength (newPeriodLength) = {
298- let checks = [if (isAdmin(toString(i.caller)))
426+ let checks = [if (isInAdminList(toString(i.caller)))
299427 then true
300428 else throwErr("caller is not in adminList")]
301429 if ((checks == checks))
307435
308436 @Callable(i)
309437 func setForceStopFlag (stop) = {
310- let check = [if (isAdmin(toString(i.caller)))
438+ let check = [if (isInAdminList(toString(i.caller)))
311439 then true
312- else throwErr("caller is not an admin")]
440+ else throwErr("caller is not in adminList")]
313441 if ((check == check))
314442 then [BooleanEntry(keyForceStop, stop)]
315443 else throw("Strict value is not equal to itself.")
319447
320448 @Callable(i)
321449 func getNodeDataREADONLY (nodeAddress) = {
322- let $t01264812712 = getLeasingNodeData(nodeAddress)
323- let currentLease = $t01264812712._1
324- let nextLeased = $t01264812712._2
450+ let $t01513515199 = getLeasingNodeData(nodeAddress)
451+ let currentLease = $t01513515199._1
452+ let nextLeased = $t01513515199._2
325453 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
326454 }
327455
329457
330458 @Callable(i)
331459 func getUserLeasingDataREADONLY (nodeAddress,userAddress) = {
332- let $t01308213159 = getUserLeasingData(nodeAddress, userAddress)
333- let currentLease = $t01308213159._1
334- let nextLeased = $t01308213159._2
460+ let $t01556915646 = getUserLeasingData(nodeAddress, userAddress)
461+ let currentLease = $t01556915646._1
462+ let nextLeased = $t01556915646._2
335463 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
336464 }
337465
339467
340468 @Callable(i)
341469 func getUserDataREADONLY (userAddress) = {
342- let $t01352213582 = getUserToClaimBalance(userAddress)
343- let toClaim = $t01352213582._1
344- let toUnlock = $t01352213582._2
470+ let $t01600916069 = getUserToClaimBalance(userAddress)
471+ let toClaim = $t01600916069._1
472+ let toUnlock = $t01600916069._2
345473 let userTotalLocked = getUserTotalLocked(userAddress)
346474 $Tuple2(nil, $Tuple6(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height))
347475 }
388516 @Callable(i)
389517 func claimAll () = {
390518 let userAddress = toString(i.caller)
391- let $t01459614656 = getUserToClaimBalance(userAddress)
392- let toClaim = $t01459614656._1
393- let toUnlock = $t01459614656._2
519+ let $t01708317143 = getUserToClaimBalance(userAddress)
520+ let toClaim = $t01708317143._1
521+ let toUnlock = $t01708317143._2
394522 let checks = [if ((toClaim > 0))
395523 then true
396524 else throwErr("nothing to claim")]
400528 }
401529
402530
531+
532+@Callable(i)
533+func voteForTxId (txId) = {
534+ let callerAddressString = toBase58String(i.caller.bytes)
535+ let keyPrefix = keyAllowedTxIdVotePrefix(txId)
536+ let result = [StringEntry(keyAllowedTxId(), txId)]
537+ let allowedTxIdOption = getString(this, keyAllowedTxId())
538+ let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
539+ then true
540+ else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
541+ then true
542+ else (value(allowedTxIdOption) != txId))
543+ then true
544+ else throwErr((txId + " is already allowed"))]
545+ if ((err == err))
546+ then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
547+ else throw("Strict value is not equal to itself.")
548+ }
549+
550+
551+@Verifier(tx)
552+func verify () = {
553+ let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
554+ let byOwner = if ((size(getAdminsList()) >= QUORUM))
555+ then false
556+ else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
557+ if (byAdmins)
558+ then true
559+ else byOwner
560+ }
561+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "l2mp_leasing.ride"
55
66 let SEP = "__"
77
88 func throwErr (msg) = throw(((contractFile + ": ") + msg))
99
1010
1111 let keyAssetId = makeString(["%s", "assetId"], SEP)
1212
13-let keyAdminList = makeString(["%s", "adminList"], SEP)
14-
1513 let keyForceStop = makeString(["%s", "forceStop"], SEP)
1614
1715 let keyPeriodOffsetId = makeString(["%s", "offsetId"], SEP)
1816
1917 let keyPeriodOffsetHeight = makeString(["%s", "offsetHeight"], SEP)
2018
2119 let keyPeriodLength = makeString(["%s", "periodLength"], SEP)
22-
23-let keyMigrationPeriod = makeString(["%s", "migrationPeriod"], SEP)
2420
2521 let periodOffsetId = valueOrElse(getInteger(this, keyPeriodOffsetId), 0)
2622
2723 let periodLength = valueOrElse(getInteger(this, keyPeriodLength), 10000)
2824
2925 let periodOffsetHeight = valueOrElse(getInteger(this, keyPeriodOffsetHeight), -1)
3026
3127 let currentPeriodId = if (if ((height > periodOffsetHeight))
3228 then (periodOffsetHeight != -1)
3329 else false)
3430 then (((height - periodOffsetHeight) / periodLength) + periodOffsetId)
3531 else max([0, (periodOffsetId - 1)])
3632
37-let currentPeriodHeight = (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
33+let currentPeriodHeight = if ((periodOffsetHeight == -1))
34+ then 0
35+ else (periodOffsetHeight + ((currentPeriodId - periodOffsetId) * periodLength))
3836
39-let nextPeriodHeight = (currentPeriodHeight + periodLength)
40-
41-let migrationPeriodHeight = valueOrElse(getInteger(this, keyMigrationPeriod), (height + 1))
37+let nextPeriodHeight = if ((periodOffsetHeight == -1))
38+ then 0
39+ else (currentPeriodHeight + periodLength)
4240
4341 func keyLeasingNodeData (nodeAddress) = makeString(["%s", nodeAddress], SEP)
4442
4543
4644 func keyUserLeasingNodeData (userAddress,nodeAddress) = makeString(["%s%s", nodeAddress, userAddress], SEP)
4745
4846
4947 func keyUserToClaim (userAddress) = makeString(["%s%s", "toClaim", userAddress], SEP)
5048
5149
5250 func keyUserTotalLocked (userAddress) = makeString(["%s%s", "userTotalLocked", userAddress], SEP)
5351
5452
55-func keyNodeLeasingByHeight (nodeAddress) = makeString(["%s%d", nodeAddress, toString(height)], SEP)
53+func keyNodeLeasingByHeight (nodeAddress) = {
54+ let h = if ((periodOffsetHeight == -1))
55+ then 0
56+ else height
57+ makeString(["%s%d", nodeAddress, toString(h)], SEP)
58+ }
5659
5760
58-func keyUserLeasingByHeight (nodeAddress,userAddress) = makeString(["%s%s%d", nodeAddress, userAddress, toString(height)], SEP)
61+func keyUserLeasingByHeight (nodeAddress,userAddress) = {
62+ let h = if ((periodOffsetHeight == -1))
63+ then 0
64+ else height
65+ makeString(["%s%s%d", nodeAddress, userAddress, toString(h)], SEP)
66+ }
5967
6068
6169 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
6270
6371 let assetIdBytes = if ((assetIdString == "WAVES"))
6472 then unit
6573 else fromBase58String(assetIdString)
6674
67-let adminListRaw = split(valueOrElse(getString(this, keyAdminList), ""), SEP)
68-
6975 let isForceStop = valueOrElse(getBoolean(this, keyForceStop), false)
70-
71-func isAdmin (address) = containsElement(adminListRaw, address)
72-
7376
7477 func isValidAddress (address) = match addressFromString(address) {
7578 case a: Address =>
7679 true
7780 case _ =>
7881 false
7982 }
83+
84+
85+let ADMIN_LIST_SIZE = 5
86+
87+let QUORUM = 3
88+
89+let TXID_BYTES_LENGTH = 32
90+
91+func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
92+
93+
94+func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
95+
96+
97+func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
98+
99+
100+func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
101+
102+
103+func getAdminVote (prefix,admin) = {
104+ let voteKey = keyFullAdminVote(prefix, admin)
105+ valueOrElse(getInteger(voteKey), 0)
106+ }
107+
108+
109+func getAdminsList () = match getString(this, keyAdminAddressList()) {
110+ case s: String =>
111+ split(s, SEP)
112+ case _ =>
113+ nil
114+}
115+
116+
117+func isInAdminList (address) = containsElement(getAdminsList(), address)
118+
119+
120+func genVotesKeysHelper (a,adminAddress) = {
121+ let $t034483472 = a
122+ let result = $t034483472._1
123+ let prefix = $t034483472._2
124+ $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
125+ }
126+
127+
128+func genVotesKeys (keyPrefix) = {
129+ let adminList = keyAdminAddressList()
130+ let $t036193703 = {
131+ let $l = getAdminsList()
132+ let $s = size($l)
133+ let $acc0 = $Tuple2(nil, keyPrefix)
134+ func $f0_1 ($a,$i) = if (($i >= $s))
135+ then $a
136+ else genVotesKeysHelper($a, $l[$i])
137+
138+ func $f0_2 ($a,$i) = if (($i >= $s))
139+ then $a
140+ else throw("List size exceeds 5")
141+
142+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
143+ }
144+ let result = $t036193703._1
145+ let prefix = $t036193703._2
146+ result
147+ }
148+
149+
150+func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
151+
152+
153+func countVotes (prefix) = {
154+ let votes = genVotesKeys(prefix)
155+ let $l = votes
156+ let $s = size($l)
157+ let $acc0 = 0
158+ func $f0_1 ($a,$i) = if (($i >= $s))
159+ then $a
160+ else countVotesHelper($a, $l[$i])
161+
162+ func $f0_2 ($a,$i) = if (($i >= $s))
163+ then $a
164+ else throw("List size exceeds 5")
165+
166+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
167+ }
168+
169+
170+func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
171+
172+
173+func getClearVoteEntries (prefix) = {
174+ let votes = genVotesKeys(prefix)
175+ let $l = votes
176+ let $s = size($l)
177+ let $acc0 = nil
178+ func $f0_1 ($a,$i) = if (($i >= $s))
179+ then $a
180+ else clearVotesHelper($a, $l[$i])
181+
182+ func $f0_2 ($a,$i) = if (($i >= $s))
183+ then $a
184+ else throw("List size exceeds 5")
185+
186+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
187+ }
188+
189+
190+func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
191+ let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
192+ let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
193+ let err = if (!(isInAdminList(callerAddressString)))
194+ then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
195+ else if ((adminCurrentVote == 1))
196+ then throwErr((voteKey + " you already voted"))
197+ else unit
198+ if ((err == err))
199+ then {
200+ let votes = countVotes(keyPrefix)
201+ if (((votes + 1) >= minVotes))
202+ then {
203+ let clearVoteEntries = getClearVoteEntries(keyPrefix)
204+ (clearVoteEntries ++ voteResult)
205+ }
206+ else [IntegerEntry(voteKey, 1)]
207+ }
208+ else throw("Strict value is not equal to itself.")
209+ }
80210
81211
82212 func getLeasingNodeEntry (nodeAddress,currentLeased,nextLeased) = {
83213 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(currentLeased), toString(nextPeriodHeight), toString(nextLeased)], SEP)
84214 StringEntry(keyLeasingNodeData(nodeAddress), valueString)
85215 }
86216
87217
88218 func getLeasingNodeData (nodeAddress) = {
89219 let leasingNodeDataStringRaw = getString(this, keyLeasingNodeData(nodeAddress))
90220 match leasingNodeDataStringRaw {
91221 case ds: String =>
92222 let dataList = split(ds, SEP)
93223 let nodeCurrentPeriod = parseIntValue(dataList[1])
94224 let nodeCurrentLeased = parseIntValue(dataList[2])
95225 let nodeNextPeriod = parseIntValue(dataList[3])
96226 let nodeNextLeased = parseIntValue(dataList[4])
97227 if (if ((nodeNextPeriod > height))
98228 then true
99- else if ((nodeNextPeriod == -1))
100- then (migrationPeriodHeight > height)
101- else false)
229+ else (periodOffsetHeight == -1))
102230 then $Tuple2(nodeCurrentLeased, nodeNextLeased)
103231 else $Tuple2(nodeNextLeased, nodeNextLeased)
104232 case _ =>
105233 $Tuple2(0, 0)
106234 }
107235 }
108236
109237
110238 func getUserLeasingEntry (nodeAddress,userAddress,userCurrentLeased,userNextLeased) = {
111239 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(userCurrentLeased), toString(nextPeriodHeight), toString(userNextLeased)], SEP)
112240 StringEntry(keyUserLeasingNodeData(userAddress, nodeAddress), valueString)
113241 }
114242
115243
116244 func getUserLeasingData (nodeAddress,userAddress) = {
117245 let leasingUserDataStringRaw = getString(this, keyUserLeasingNodeData(userAddress, nodeAddress))
118246 match leasingUserDataStringRaw {
119247 case ds: String =>
120248 let dataList = split(ds, SEP)
121249 let userCurrentPeriod = parseIntValue(dataList[1])
122250 let userCurrentLeased = parseIntValue(dataList[2])
123251 let userNextPeriod = parseIntValue(dataList[3])
124252 let userNextLeased = parseIntValue(dataList[4])
125253 if (if ((userNextPeriod > height))
126254 then true
127- else if ((userNextPeriod == -1))
128- then (migrationPeriodHeight > height)
129- else false)
255+ else (periodOffsetHeight == -1))
130256 then $Tuple2(userCurrentLeased, userNextLeased)
131257 else $Tuple2(userNextLeased, userNextLeased)
132258 case _ =>
133259 $Tuple2(0, 0)
134260 }
135261 }
136262
137263
138264 func getUserToClaimEntry (userAddress,toClaim,toUnlock) = {
139265 let valueString = makeString(["%d%d%d%d", toString(currentPeriodHeight), toString(toClaim), toString(nextPeriodHeight), toString(toUnlock)], SEP)
140266 StringEntry(keyUserToClaim(userAddress), valueString)
141267 }
142268
143269
144270 func getUserToClaimBalance (userAddress) = {
145271 let userToClaimDataStringRaw = getString(this, keyUserToClaim(userAddress))
146272 match userToClaimDataStringRaw {
147273 case ds: String =>
148274 let dataList = split(ds, SEP)
149275 let currentPeriod = parseIntValue(dataList[1])
150276 let toClaim = parseIntValue(dataList[2])
151277 let nextPeriod = parseIntValue(dataList[3])
152278 let toUnlock = parseIntValue(dataList[4])
153- if ((nextPeriod > height))
279+ if (if ((nextPeriod > height))
280+ then true
281+ else (periodOffsetHeight == -1))
154282 then $Tuple2(toClaim, toUnlock)
155283 else $Tuple2((toClaim + toUnlock), 0)
156284 case _ =>
157285 $Tuple2(0, 0)
158286 }
159287 }
160288
161289
162290 func getUserTotalLockedEntry (userAddress,userTotalLocked) = IntegerEntry(keyUserTotalLocked(userAddress), userTotalLocked)
163291
164292
165293 func getUserTotalLocked (userAddress) = valueOrElse(getInteger(this, keyUserTotalLocked(userAddress)), 0)
166294
167295
168296 func getUnstakeActions (nodeAddress,userAddress,unstakeAmount) = {
169- let $t063006373 = getLeasingNodeData(nodeAddress)
170- let nodeCurrentLeased = $t063006373._1
171- let nodeNextLeased = $t063006373._2
172- let $t063786464 = getUserLeasingData(nodeAddress, userAddress)
173- let userCurrentLeased = $t063786464._1
174- let userNextLeased = $t063786464._2
297+ let $t087478820 = getLeasingNodeData(nodeAddress)
298+ let nodeCurrentLeased = $t087478820._1
299+ let nodeNextLeased = $t087478820._2
300+ let $t088258911 = getUserLeasingData(nodeAddress, userAddress)
301+ let userCurrentLeased = $t088258911._1
302+ let userNextLeased = $t088258911._2
175303 let checks = [if (!(isForceStop))
176304 then true
177305 else throwErr("contract is temporary stopped"), if ((unstakeAmount > 0))
178306 then true
179307 else throwErr("unstake amount should be greater than 0"), if ((userNextLeased >= unstakeAmount))
180308 then true
181309 else throwErr("unstake amount should be less or equal user staked amount"), if ((nodeNextLeased >= unstakeAmount))
182310 then true
183311 else throwErr("unstake amount should be less or equal node staked amount"), if (isValidAddress(nodeAddress))
184312 then true
185313 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
186314 then true
187315 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
188316 if ((checks == checks))
189317 then {
190318 let newNodeNextLease = (nodeNextLeased - unstakeAmount)
191319 let newUserNextLeased = (userNextLeased - unstakeAmount)
192- let $t072777337 = getUserToClaimBalance(userAddress)
193- let toClaim = $t072777337._1
194- let toUnlock = $t072777337._2
320+ let $t097249784 = getUserToClaimBalance(userAddress)
321+ let toClaim = $t097249784._1
322+ let toUnlock = $t097249784._2
195323 let newToUnlock = (toUnlock + unstakeAmount)
196324 let userTotalLocked = getUserTotalLocked(userAddress)
197325 let newUserTotalLocked = (userTotalLocked - unstakeAmount)
198326 [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, toClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)]
199327 }
200328 else throw("Strict value is not equal to itself.")
201329 }
202330
203331
204332 func getClaimUnlockedActions (userAddress,claimAmount) = {
205- let $t080668126 = getUserToClaimBalance(userAddress)
206- let toClaim = $t080668126._1
207- let toUnlock = $t080668126._2
333+ let $t01051310573 = getUserToClaimBalance(userAddress)
334+ let toClaim = $t01051310573._1
335+ let toUnlock = $t01051310573._2
208336 let checks = [if (!(isForceStop))
209337 then true
210338 else throwErr("contract is temporary stopped"), if ((claimAmount > 0))
211339 then true
212340 else throwErr("claim amount should be greater than 0"), if ((toClaim >= claimAmount))
213341 then true
214342 else throwErr("claim amount should be less or equal unlocked amount"), if (isValidAddress(userAddress))
215343 then true
216344 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
217345 if ((checks == checks))
218346 then {
219347 let newToClaim = (toClaim - claimAmount)
220348 [getUserToClaimEntry(userAddress, newToClaim, toUnlock), ScriptTransfer(addressFromStringValue(userAddress), claimAmount, assetIdBytes)]
221349 }
222350 else throw("Strict value is not equal to itself.")
223351 }
224352
225353
226354 func getStakeActions (nodeAddress,userAddress,userLeasingAmount,i) = {
227- let $t088878947 = getUserToClaimBalance(userAddress)
228- let toClaim = $t088878947._1
229- let toUnlock = $t088878947._2
355+ let $t01133411394 = getUserToClaimBalance(userAddress)
356+ let toClaim = $t01133411394._1
357+ let toUnlock = $t01133411394._2
230358 let paymentAmount = if ((size(i.payments) == 0))
231359 then 0
232360 else i.payments[0].amount
233361 let available = ((toUnlock + toClaim) + paymentAmount)
234362 let checks = [if (!(isForceStop))
235363 then true
236364 else throwErr("contract is temporary stopped"), if ((1 >= size(i.payments)))
237365 then true
238366 else throwErr("maximum 1 payment"), if (if ((size(i.payments) == 0))
239367 then true
240368 else (i.payments[0].assetId == assetIdBytes))
241369 then true
242370 else throwErr(makeString(["payment assetId should be:", assetIdString], " ")), if ((userLeasingAmount > 0))
243371 then true
244372 else throwErr("amount should be greater than 0"), if ((available >= userLeasingAmount))
245373 then true
246374 else throwErr("amount should be less or equal (payment + available) amount"), if ((userLeasingAmount >= paymentAmount))
247375 then true
248376 else throw("amount should be greater or equal payment amount"), if (isValidAddress(nodeAddress))
249377 then true
250378 else throwErr(makeString(["node address is not valid:", nodeAddress], " ")), if (isValidAddress(userAddress))
251379 then true
252380 else throwErr(makeString(["user address is not valid:", userAddress], " "))]
253381 if ((checks == checks))
254382 then {
255- let $t0999310066 = getLeasingNodeData(nodeAddress)
256- let nodeCurrentLeased = $t0999310066._1
257- let nodeNextLeased = $t0999310066._2
383+ let $t01246512538 = getLeasingNodeData(nodeAddress)
384+ let nodeCurrentLeased = $t01246512538._1
385+ let nodeNextLeased = $t01246512538._2
258386 let newNodeNextLease = (nodeNextLeased + userLeasingAmount)
259- let $t01013410220 = getUserLeasingData(nodeAddress, userAddress)
260- let userCurrentLeased = $t01013410220._1
261- let userNextLeased = $t01013410220._2
387+ let $t01260612692 = getUserLeasingData(nodeAddress, userAddress)
388+ let userCurrentLeased = $t01260612692._1
389+ let userNextLeased = $t01260612692._2
262390 let newUserNextLeased = (userNextLeased + userLeasingAmount)
263391 let fromUnlockedAmount = (userLeasingAmount - paymentAmount)
264392 let newToUnlock = max([0, (toUnlock - fromUnlockedAmount)])
265393 let newToClaim = min([toClaim, (toClaim + (toUnlock - fromUnlockedAmount))])
266394 let userTotalLocked = getUserTotalLocked(userAddress)
267395 let newUserTotalLocked = (userTotalLocked + userLeasingAmount)
268396 [getLeasingNodeEntry(nodeAddress, nodeCurrentLeased, newNodeNextLease), getUserLeasingEntry(nodeAddress, userAddress, userCurrentLeased, newUserNextLeased), getUserToClaimEntry(userAddress, newToClaim, newToUnlock), getUserTotalLockedEntry(userAddress, newUserTotalLocked), IntegerEntry(keyNodeLeasingByHeight(nodeAddress), newNodeNextLease), IntegerEntry(keyUserLeasingByHeight(nodeAddress, userAddress), newUserNextLeased)]
269397 }
270398 else throw("Strict value is not equal to itself.")
271399 }
272400
273401
274402 func getStakeFromPaymentActions (nodeAddress,userAddress,i) = {
275403 let checks = [if ((size(i.payments) == 1))
276404 then true
277405 else throwErr("payment size should be exactly 1")]
278406 if ((checks == checks))
279407 then getStakeActions(nodeAddress, userAddress, i.payments[0].amount, i)
280408 else throw("Strict value is not equal to itself.")
281409 }
282410
283411
284412 func getSetNewPeriodLengthActions (newPeriodLength) = {
285413 let check = [if ((newPeriodLength > 0))
286414 then true
287415 else throwErr("period length should be greater than 0")]
288416 if ((check == check))
289417 then if ((periodOffsetHeight == -1))
290418 then [IntegerEntry(keyPeriodLength, newPeriodLength), IntegerEntry(keyPeriodOffsetHeight, height)]
291419 else [IntegerEntry(keyPeriodOffsetId, (currentPeriodId + 1)), IntegerEntry(keyPeriodOffsetHeight, nextPeriodHeight), IntegerEntry(keyPeriodLength, newPeriodLength)]
292420 else throw("Strict value is not equal to itself.")
293421 }
294422
295423
296424 @Callable(i)
297425 func setNewPeriodLength (newPeriodLength) = {
298- let checks = [if (isAdmin(toString(i.caller)))
426+ let checks = [if (isInAdminList(toString(i.caller)))
299427 then true
300428 else throwErr("caller is not in adminList")]
301429 if ((checks == checks))
302430 then getSetNewPeriodLengthActions(newPeriodLength)
303431 else throw("Strict value is not equal to itself.")
304432 }
305433
306434
307435
308436 @Callable(i)
309437 func setForceStopFlag (stop) = {
310- let check = [if (isAdmin(toString(i.caller)))
438+ let check = [if (isInAdminList(toString(i.caller)))
311439 then true
312- else throwErr("caller is not an admin")]
440+ else throwErr("caller is not in adminList")]
313441 if ((check == check))
314442 then [BooleanEntry(keyForceStop, stop)]
315443 else throw("Strict value is not equal to itself.")
316444 }
317445
318446
319447
320448 @Callable(i)
321449 func getNodeDataREADONLY (nodeAddress) = {
322- let $t01264812712 = getLeasingNodeData(nodeAddress)
323- let currentLease = $t01264812712._1
324- let nextLeased = $t01264812712._2
450+ let $t01513515199 = getLeasingNodeData(nodeAddress)
451+ let currentLease = $t01513515199._1
452+ let nextLeased = $t01513515199._2
325453 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
326454 }
327455
328456
329457
330458 @Callable(i)
331459 func getUserLeasingDataREADONLY (nodeAddress,userAddress) = {
332- let $t01308213159 = getUserLeasingData(nodeAddress, userAddress)
333- let currentLease = $t01308213159._1
334- let nextLeased = $t01308213159._2
460+ let $t01556915646 = getUserLeasingData(nodeAddress, userAddress)
461+ let currentLease = $t01556915646._1
462+ let nextLeased = $t01556915646._2
335463 $Tuple2(nil, $Tuple5(currentPeriodHeight, currentLease, nextPeriodHeight, nextLeased, height))
336464 }
337465
338466
339467
340468 @Callable(i)
341469 func getUserDataREADONLY (userAddress) = {
342- let $t01352213582 = getUserToClaimBalance(userAddress)
343- let toClaim = $t01352213582._1
344- let toUnlock = $t01352213582._2
470+ let $t01600916069 = getUserToClaimBalance(userAddress)
471+ let toClaim = $t01600916069._1
472+ let toUnlock = $t01600916069._2
345473 let userTotalLocked = getUserTotalLocked(userAddress)
346474 $Tuple2(nil, $Tuple6(currentPeriodHeight, toClaim, nextPeriodHeight, toUnlock, userTotalLocked, height))
347475 }
348476
349477
350478
351479 @Callable(i)
352480 func leaseByAddress (nodeAddress,userAddress) = getStakeFromPaymentActions(nodeAddress, userAddress, i)
353481
354482
355483
356484 @Callable(i)
357485 func lease (nodeAddress) = {
358486 let userAddress = toString(i.caller)
359487 getStakeFromPaymentActions(nodeAddress, userAddress, i)
360488 }
361489
362490
363491
364492 @Callable(i)
365493 func leaseFromLocked (nodeAddress,amount) = {
366494 let userAddress = toString(i.caller)
367495 getStakeActions(nodeAddress, userAddress, amount, i)
368496 }
369497
370498
371499
372500 @Callable(i)
373501 func cancelLease (nodeAddress,amount) = {
374502 let userAddress = toString(i.caller)
375503 getUnstakeActions(nodeAddress, userAddress, amount)
376504 }
377505
378506
379507
380508 @Callable(i)
381509 func claim (amount) = {
382510 let userAddress = toString(i.caller)
383511 getClaimUnlockedActions(userAddress, amount)
384512 }
385513
386514
387515
388516 @Callable(i)
389517 func claimAll () = {
390518 let userAddress = toString(i.caller)
391- let $t01459614656 = getUserToClaimBalance(userAddress)
392- let toClaim = $t01459614656._1
393- let toUnlock = $t01459614656._2
519+ let $t01708317143 = getUserToClaimBalance(userAddress)
520+ let toClaim = $t01708317143._1
521+ let toUnlock = $t01708317143._2
394522 let checks = [if ((toClaim > 0))
395523 then true
396524 else throwErr("nothing to claim")]
397525 if ((checks == checks))
398526 then getClaimUnlockedActions(userAddress, toClaim)
399527 else throw("Strict value is not equal to itself.")
400528 }
401529
402530
531+
532+@Callable(i)
533+func voteForTxId (txId) = {
534+ let callerAddressString = toBase58String(i.caller.bytes)
535+ let keyPrefix = keyAllowedTxIdVotePrefix(txId)
536+ let result = [StringEntry(keyAllowedTxId(), txId)]
537+ let allowedTxIdOption = getString(this, keyAllowedTxId())
538+ let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
539+ then true
540+ else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
541+ then true
542+ else (value(allowedTxIdOption) != txId))
543+ then true
544+ else throwErr((txId + " is already allowed"))]
545+ if ((err == err))
546+ then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
547+ else throw("Strict value is not equal to itself.")
548+ }
549+
550+
551+@Verifier(tx)
552+func verify () = {
553+ let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
554+ let byOwner = if ((size(getAdminsList()) >= QUORUM))
555+ then false
556+ else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
557+ if (byAdmins)
558+ then true
559+ else byOwner
560+ }
561+

github/deemru/w8io/026f985 
100.47 ms