tx · A8Aivn7jzzU9iVjB5qUCaKRneen6iw6nJw42HmAsxv9q

3N2oBybmcHXrHF9RrT2fYg3Y6ncf8YaU1RW:  -0.01000000 Waves

2022.05.03 14:53 [2035478] smart account 3N2oBybmcHXrHF9RrT2fYg3Y6ncf8YaU1RW > SELF 0.00000000 Waves

{ "type": 13, "id": "A8Aivn7jzzU9iVjB5qUCaKRneen6iw6nJw42HmAsxv9q", "fee": 1000000, "feeAssetId": null, "timestamp": 1651578887641, "version": 2, "chainId": 84, "sender": "3N2oBybmcHXrHF9RrT2fYg3Y6ncf8YaU1RW", "senderPublicKey": "6kWuddP3Pz4t6CwZzDGxckh8yLE7yM236o5GciWzTjEE", "proofs": [ "3TyrtGdhDFbQAsfwsq3oicnB47K6tzvG7FBxFpGaaSRQuvX9R7r12d29BBV31LD7rzhp9pnMLDHtsgrugGMD3v8r" ], "script": "base64:AAIFAAAAAAAAACUIAhIDCgEIEgQKAggBEgMKAQgSABIDCgEIEgMKAQgSAwoBCBIAAAAAFAAAAAADU0VQAgAAAAJfXwEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAAHa2V5VXNlcgAAAAEAAAAHYWRkcmVzcwkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAIFAAAAB2FkZHJlc3MFAAAAA25pbAUAAAADU0VQAQAAAAprZXlSZXZva2VkAAAAAQAAAAdhZGRyZXNzCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAHcmV2b2tlZAkABEwAAAACBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAA1NFUAEAAAAYa2V5VW5jbGFpbWVkQmVmb3JlUmV2b2tlAAAAAQAAAAdhZGRyZXNzCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMA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VibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleVqHuwQ=", "height": 2035478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
6+func keyManagerPublicKey () = "%s__managerPublicKey"
7+
8+
9+func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
10+
11+
12+func keyUser (address) = makeString(["%s", address], SEP)
13+
14+
15+func keyRevoked (address) = makeString(["%s", "revoked", address], SEP)
16+
17+
18+func keyUnclaimedBeforeRevoke (address) = makeString(["%s", "unclaimedBeforeRevoke", address], SEP)
19+
20+
21+func keyUserVestingStart (address) = makeString(["%s", "vestingStart", address], SEP)
22+
23+
24+func keyUserVestingEnd (address) = makeString(["%s", "vestingEnd", address], SEP)
25+
26+
27+func keyUserAmountPerBlock (address) = makeString(["%s", "amountPerBlock", address], SEP)
28+
29+
30+func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP)
31+
32+
33+func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
34+ case s: String =>
35+ fromBase58String(s)
36+ case _: Unit =>
37+ unit
38+ case _ =>
39+ throw("Match error")
40+}
41+
42+
43+func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
44+ case s: String =>
45+ fromBase58String(s)
46+ case _: Unit =>
47+ unit
48+ case _ =>
49+ throw("Match error")
50+}
51+
52+
53+func mustManager (i) = {
54+ let pd = throw("Permission denied")
55+ match managerPublicKeyOrUnit() {
56+ case pk: ByteVector =>
57+ if ((i.callerPublicKey == pk))
58+ then true
59+ else pd
60+ case _: Unit =>
61+ if ((i.caller == this))
62+ then true
63+ else pd
64+ case _ =>
65+ throw("Match error")
66+ }
67+ }
68+
69+
70+func valueUserS (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, "0", claimedWXAmount, lastClaimedHeight], SEP)
71+
72+
73+func valueUser (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = valueUserS(toString(totalAmount), toString(remainingAmount), toString(claimedWXAmount), toString(lastClaimedHeight))
74+
75+
76+func getUserTotalAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[1])
77+
78+
79+func getUserRemainingAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[2])
80+
81+
82+func getUserClaimedAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[3])
83+
84+
85+func getUserLastClaimedHeight (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[5])
86+
87+
88+func availableToClaimNow (address) = {
89+ let lastHeight = getUserLastClaimedHeight(address)
90+ if ((lastHeight >= height))
91+ then 0
92+ else {
93+ let end = value(getInteger(keyUserVestingEnd(address)))
94+ let current = if ((height > end))
95+ then end
96+ else height
97+ let unclaimedPeriod = (current - lastHeight)
98+ (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod)
99+ }
100+ }
101+
102+
103+@Callable(i)
104+func constructor (wxAssetId) = {
105+ let check = mustManager(i)
106+ if ((check == check))
107+ then [StringEntry(keyWxAssetId(), wxAssetId)]
108+ else throw("Strict value is not equal to itself.")
109+ }
110+
111+
112+
113+@Callable(i)
114+func createDepositFor (address,len) = {
115+ let endHeight = (height + len)
116+ let checks = [mustManager(i), if ((endHeight > height))
117+ then true
118+ else throw("endHeight must be more than height"), if ((getString(keyUser(address)) == unit))
119+ then true
120+ else throw("deposit for user already exists"), if ((toBase58String(value(i.payments[0].assetId)) == value(getString(keyWxAssetId()))))
121+ then true
122+ else throw("attached payment is not WX")]
123+ if ((checks == checks))
124+ then {
125+ let amount = i.payments[0].amount
126+ let vestingLen = (endHeight - height)
127+[StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), (amount / vestingLen))]
128+ }
129+ else throw("Strict value is not equal to itself.")
130+ }
131+
132+
133+
134+@Callable(i)
135+func revokeDepositFor (address) = {
136+ let checks = [mustManager(i), if ((getString(keyUser(address)) != unit))
137+ then true
138+ else throw("deposit for user is not exists")]
139+ if ((checks == checks))
140+ then [BooleanEntry(keyRevoked(address), true), IntegerEntry(keyUnclaimedBeforeRevoke(address), availableToClaimNow(address))]
141+ else throw("Strict value is not equal to itself.")
142+ }
143+
144+
145+
146+@Callable(i)
147+func claim () = {
148+ let addr = i.caller
149+ let addrStr = toString(addr)
150+ let wx = fromBase58String(value(getString(keyWxAssetId())))
151+ let isRevokedUser = valueOrElse(getBoolean(keyRevoked(addrStr)), false)
152+ let unclaimedBeforeRevoke = valueOrElse(getInteger(keyUnclaimedBeforeRevoke(addrStr)), 0)
153+ if (if (isRevokedUser)
154+ then (unclaimedBeforeRevoke > 0)
155+ else false)
156+ then [ScriptTransfer(addr, unclaimedBeforeRevoke, wx), IntegerEntry(keyUnclaimedBeforeRevoke(addrStr), 0)]
157+ else {
158+ let totalAmount = getUserTotalAmount(addrStr)
159+ let remainingAmount = getUserRemainingAmount(addrStr)
160+ let claimedWXAmount = getUserClaimedAmount(addrStr)
161+ let lastClaimedHeight = getUserLastClaimedHeight(addrStr)
162+ let amount = availableToClaimNow(addrStr)
163+[ScriptTransfer(addr, amount, wx), StringEntry(keyUser(addrStr), valueUser(totalAmount, (remainingAmount - amount), (claimedWXAmount + amount), height))]
164+ }
165+ }
166+
167+
168+
169+@Callable(i)
170+func claimREADONLY (address) = {
171+ let amount = availableToClaimNow(address)
172+ $Tuple2(nil, amount)
173+ }
174+
175+
176+
177+@Callable(i)
178+func stats (address) = $Tuple2(nil, [value(getInteger(keyUserVestingStart(address))), value(getInteger(keyUserVestingEnd(address))), getUserTotalAmount(address), getUserClaimedAmount(address), getUserRemainingAmount(address), availableToClaimNow(address)])
179+
180+
181+
182+@Callable(i)
183+func setManager (pendingManagerPublicKey) = {
184+ let checkCaller = mustManager(i)
185+ if ((checkCaller == checkCaller))
186+ then {
187+ let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
188+ if ((checkManagerPublicKey == checkManagerPublicKey))
189+ then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
190+ else throw("Strict value is not equal to itself.")
191+ }
192+ else throw("Strict value is not equal to itself.")
193+ }
194+
195+
196+
197+@Callable(i)
198+func confirmManager () = {
199+ let pm = pendingManagerPublicKeyOrUnit()
200+ let hasPM = if (isDefined(pm))
201+ then true
202+ else throw("No pending manager")
203+ if ((hasPM == hasPM))
204+ then {
205+ let checkPM = if ((i.callerPublicKey == value(pm)))
206+ then true
207+ else throw("You are not pending manager")
208+ if ((checkPM == checkPM))
209+ then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
210+ else throw("Strict value is not equal to itself.")
211+ }
212+ else throw("Strict value is not equal to itself.")
213+ }
214+
215+
216+@Verifier(tx)
217+func verify () = {
218+ let targetPublicKey = match managerPublicKeyOrUnit() {
219+ case pk: ByteVector =>
220+ pk
221+ case _: Unit =>
222+ tx.senderPublicKey
223+ case _ =>
224+ throw("Match error")
225+ }
226+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
227+ }
228+

github/deemru/w8io/169f3d6 
27.14 ms