tx · 6HpQ5VSxDgKF4Jd3PzNpGoZyuYbFUfxhYt7VLjoJJENz 3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz: -0.01400000 Waves 2022.10.20 11:14 [2280469] smart account 3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz > SELF 0.00000000 Waves
{ "type": 13, "id": "6HpQ5VSxDgKF4Jd3PzNpGoZyuYbFUfxhYt7VLjoJJENz", "fee": 1400000, "feeAssetId": null, "timestamp": 1666253780156, "version": 1, "sender": "3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz", "senderPublicKey": "E7cYpzqL1fF9VQjL3m4zr3xXfV289rCkrfE2fJyAHMqR", "proofs": [ "FtoVBKQrKYkuUbZGTczCx74YEnX7jD49GWxVY4Ytvx9KjCDYzRLAc1Rxi1W5QAuJN6NogLAq7hnXhxEHqUSSQBp" ], "script": "base64:AAIFAAAAAAAAA/UIAhIDCgEIEgASBAoCCAESAwoBCBIDCgEIEgASAwoBCBIDCgEIEgMKAQgSACIDU0VQIhNrZXlNYW5hZ2VyUHVibGljS2V5IhprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleSIHa2V5VXNlciIHYWRkcmVzcyIKa2V5UmV2b2tlZCIPa2V5UmV2b2tlZFRvdGFsIhNrZXlVc2VyVmVzdGluZ1N0YXJ0IhFrZXlVc2VyVmVzdGluZ0VuZCIVa2V5VXNlckFtb3VudFBlckJsb2NrIgxrZXlXeEFzc2V0SWQiCHRocm93RXJyIgNtc2ciFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQiByRtYXRjaDAiAXMiHXBlbmRpbmdNYW5hZ2VyUHVibGljS2V5T3JVbml0IgttdXN0TWFuYWdlciIBaSICcGQiAnBrIgp2YWx1ZVVzZXJTIgt0b3RhbEFtb3VudCIPcmVtYWluaW5nQW1vdW50Ig9jbGFpbWVkV1hBbW91bnQiEWxhc3RDbGFpbWVkSGVpZ2h0Igl2YWx1ZVVzZXIiEmdldFV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cwAAAA9jYWxsZXJQdWJsaWNLZXkJAQAAAAV2YWx1ZQAAAAEFAAAAAmFrBgkBAAAAAWwAAAABAgAAABt5b3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAAAAAAIFAAAAAmFtBQAAAAJhbQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAABYgAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACYWsJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAWMAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACYW4BAAAAAmFvAAAAAAQAAAACYXAEAAAAAW8JAQAAAAFuAAAAAAMJAAABAAAAAgUAAAABbwIAAAAKQnl0ZVZlY3RvcgQAAAABdQUAAAABbwUAAAABdQMJAAABAAAAAgUAAAABbwIAAAAEVW5pdAgFAAAAAmFuAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYW4AAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhbgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFwDTcFHA==", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2kzrXNWzegKLHKwoncomvnTN24jjNMap3gMtsR3uPXtP Next: 8uVBGk44tCj1RQ96mmP4ebFpuK2jxCWV7AvjyRYT34BM Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func keyUser (address) = makeString(["%s", address], SEP) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyRevoked (address) = makeString(["%s%s", "revoked", address], SEP) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func keyRevokedTotal () = makeString(["%s", "revokedTotal"], SEP) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func keyUserVestingStart (address) = makeString(["%s%s", "vestingStart", address], SEP) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyUserVestingEnd (address) = makeString(["%s%s", "vestingEnd", address], SEP) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyUserAmountPerBlock (address) = makeString(["%s%s", "amountPerBlock", address], SEP) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func throwErr (msg) = throw(makeString(["vesting.ride:", msg], " ")) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
37 | 37 | case s: String => | |
38 | 38 | fromBase58String(s) | |
39 | 39 | case _: Unit => | |
40 | 40 | unit | |
41 | 41 | case _ => | |
42 | 42 | throw("Match error") | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
47 | 47 | case s: String => | |
48 | 48 | fromBase58String(s) | |
49 | 49 | case _: Unit => | |
50 | 50 | unit | |
51 | 51 | case _ => | |
52 | 52 | throw("Match error") | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func mustManager (i) = { | |
57 | 57 | let pd = throwErr("permission denied") | |
58 | 58 | match managerPublicKeyOrUnit() { | |
59 | 59 | case pk: ByteVector => | |
60 | 60 | if ((i.callerPublicKey == pk)) | |
61 | 61 | then true | |
62 | 62 | else pd | |
63 | 63 | case _: Unit => | |
64 | 64 | if ((i.caller == this)) | |
65 | 65 | then true | |
66 | 66 | else pd | |
67 | 67 | case _ => | |
68 | 68 | throw("Match error") | |
69 | 69 | } | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func valueUserS (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, "0", claimedWXAmount, lastClaimedHeight], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func valueUser (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = valueUserS(toString(totalAmount), toString(remainingAmount), toString(claimedWXAmount), toString(lastClaimedHeight)) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getUserTotalAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[1]) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getUserRemainingAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[2]) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getUserClaimedAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[3]) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getUserLastClaimedHeight (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[5]) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func availableToClaimNow (address) = { | |
92 | 92 | let isRevokedUser = valueOrElse(getBoolean(keyRevoked(address)), false) | |
93 | 93 | if (isRevokedUser) | |
94 | 94 | then getUserRemainingAmount(address) | |
95 | 95 | else { | |
96 | 96 | let lastHeight = getUserLastClaimedHeight(address) | |
97 | 97 | if ((lastHeight >= height)) | |
98 | 98 | then 0 | |
99 | 99 | else { | |
100 | 100 | let end = value(getInteger(keyUserVestingEnd(address))) | |
101 | 101 | if ((height > end)) | |
102 | 102 | then getUserRemainingAmount(address) | |
103 | 103 | else { | |
104 | 104 | let unclaimedPeriod = (height - lastHeight) | |
105 | 105 | (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod) | |
106 | 106 | } | |
107 | 107 | } | |
108 | 108 | } | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func claimInternal (address) = { | |
113 | 113 | let addr = addressFromStringValue(address) | |
114 | 114 | let wx = fromBase58String(value(getString(keyWxAssetId()))) | |
115 | 115 | let amount = availableToClaimNow(address) | |
116 | 116 | let ensureAmount = if ((amount != 0)) | |
117 | 117 | then true | |
118 | 118 | else throwErr("nothing to claim") | |
119 | 119 | if ((ensureAmount == ensureAmount)) | |
120 | 120 | then { | |
121 | 121 | let totalAmount = getUserTotalAmount(address) | |
122 | 122 | let remainingAmount = getUserRemainingAmount(address) | |
123 | 123 | let claimedWXAmount = getUserClaimedAmount(address) | |
124 | 124 | let isRevokedUser = valueOrElse(getBoolean(keyRevoked(address)), false) | |
125 | 125 | if (isRevokedUser) | |
126 | 126 | then [ScriptTransfer(addr, remainingAmount, wx), StringEntry(keyUser(address), valueUser(totalAmount, 0, (claimedWXAmount + remainingAmount), height))] | |
127 | 127 | else [ScriptTransfer(addr, amount, wx), StringEntry(keyUser(address), valueUser(totalAmount, (remainingAmount - amount), (claimedWXAmount + amount), height))] | |
128 | 128 | } | |
129 | 129 | else throw("Strict value is not equal to itself.") | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | @Callable(i) | |
134 | 134 | func constructor (wxAssetId) = { | |
135 | 135 | let check = mustManager(i) | |
136 | 136 | if ((check == check)) | |
137 | 137 | then [StringEntry(keyWxAssetId(), wxAssetId)] | |
138 | 138 | else throw("Strict value is not equal to itself.") | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func withdrawRevoked () = { | |
145 | 145 | let amount = valueOrElse(getInteger(keyRevokedTotal()), 0) | |
146 | 146 | let wx = fromBase58String(value(getString(keyWxAssetId()))) | |
147 | 147 | let checks = [mustManager(i), if ((amount > 0)) | |
148 | 148 | then true | |
149 | 149 | else throwErr("revoked amount is zero, nothing to withdraw")] | |
150 | 150 | if ((checks == checks)) | |
151 | 151 | then [ScriptTransfer(i.caller, amount, wx), IntegerEntry(keyRevokedTotal(), 0)] | |
152 | 152 | else throw("Strict value is not equal to itself.") | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func createDepositFor (address,blocksDuration) = { | |
159 | 159 | let amount = i.payments[0].amount | |
160 | 160 | let endHeight = (height + blocksDuration) | |
161 | 161 | let vestingLen = (endHeight - height) | |
162 | 162 | let amountPerBlock = (amount / vestingLen) | |
163 | 163 | let checks = [if ((endHeight > height)) | |
164 | 164 | then true | |
165 | 165 | else throwErr("endHeight must be more than height"), if ((getString(keyUser(address)) == unit)) | |
166 | 166 | then true | |
167 | 167 | else throwErr("deposit for user already exists"), if ((toBase58String(value(i.payments[0].assetId)) == value(getString(keyWxAssetId())))) | |
168 | 168 | then true | |
169 | 169 | else throwErr("attached payment is not WX"), if ((amountPerBlock != 0)) | |
170 | 170 | then true | |
171 | 171 | else throwErr("attached amount too small or blocksDuration too large — will claimed zero per block")] | |
172 | 172 | if ((checks == checks)) | |
173 | 173 | then [StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), amountPerBlock)] | |
174 | 174 | else throw("Strict value is not equal to itself.") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | 179 | @Callable(i) | |
180 | 180 | func increaseDepositFor (address) = { | |
181 | 181 | let availableToClaim = availableToClaimNow(address) | |
182 | 182 | let forceClaim = if ((availableToClaim > 0)) | |
183 | 183 | then claimInternal(address) | |
184 | 184 | else unit | |
185 | 185 | if ((forceClaim == forceClaim)) | |
186 | 186 | then { | |
187 | 187 | let amount = i.payments[0].amount | |
188 | 188 | let endHeight = value(getInteger(keyUserVestingEnd(address))) | |
189 | 189 | let vestingLen = (endHeight - height) | |
190 | 190 | let amountPerBlock = value(getInteger(keyUserAmountPerBlock(address))) | |
191 | 191 | let incAmountPerBlock = (amount / vestingLen) | |
192 | 192 | let userTotalAmount = getUserTotalAmount(address) | |
193 | 193 | let userRemainingAmount = getUserRemainingAmount(address) | |
194 | 194 | let userClaimedAmount = getUserClaimedAmount(address) | |
195 | 195 | let userLastClaimedHeight = getUserLastClaimedHeight(address) | |
196 | 196 | let checks = [if ((valueOrElse(getBoolean(keyRevoked(address)), false) == false)) | |
197 | 197 | then true | |
198 | 198 | else throwErr("deposit for user is revoked"), if ((getString(keyUser(address)) != unit)) | |
199 | 199 | then true | |
200 | 200 | else throwErr("deposit for user doesn't exists"), if ((toBase58String(value(i.payments[0].assetId)) == value(getString(keyWxAssetId())))) | |
201 | 201 | then true | |
202 | 202 | else throwErr("attached payment is not WX"), if ((incAmountPerBlock != 0)) | |
203 | 203 | then true | |
204 | 204 | else throwErr("attached amount too small — increase is zero per block")] | |
205 | 205 | if ((checks == checks)) | |
206 | 206 | then [StringEntry(keyUser(address), valueUser((userTotalAmount + amount), (userRemainingAmount + amount), userClaimedAmount, userLastClaimedHeight)), IntegerEntry(keyUserAmountPerBlock(address), (amountPerBlock + incAmountPerBlock))] | |
207 | 207 | else throw("Strict value is not equal to itself.") | |
208 | 208 | } | |
209 | 209 | else throw("Strict value is not equal to itself.") | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | ||
214 | 214 | @Callable(i) | |
215 | 215 | func revokeDepositFor (address) = { | |
216 | 216 | let totalAmount = getUserTotalAmount(address) | |
217 | 217 | let remainingAmount = getUserRemainingAmount(address) | |
218 | 218 | let claimedWXAmount = getUserClaimedAmount(address) | |
219 | 219 | let lastClaimedHeight = getUserLastClaimedHeight(address) | |
220 | 220 | let unclaimedAmountNow = availableToClaimNow(address) | |
221 | 221 | let revokedTotal = valueOrElse(getInteger(keyRevokedTotal()), 0) | |
222 | 222 | let amountToRevoke = (remainingAmount - unclaimedAmountNow) | |
223 | 223 | let newRevokedTotal = (revokedTotal + amountToRevoke) | |
224 | 224 | let checks = [mustManager(i), if ((getString(keyUser(address)) != unit)) | |
225 | 225 | then true | |
226 | 226 | else throwErr("deposit for user is not exists"), if ((newRevokedTotal > revokedTotal)) | |
227 | 227 | then true | |
228 | 228 | else throwErr("newRevokedTotal can't be less or equal than revokedTotal")] | |
229 | 229 | if ((checks == checks)) | |
230 | 230 | then [BooleanEntry(keyRevoked(address), true), IntegerEntry(keyRevokedTotal(), newRevokedTotal), StringEntry(keyUser(address), valueUser(totalAmount, unclaimedAmountNow, claimedWXAmount, lastClaimedHeight))] | |
231 | 231 | else throw("Strict value is not equal to itself.") | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Callable(i) | |
237 | 237 | func claim () = claimInternal(toBase58String(i.caller.bytes)) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | ||
241 | 241 | @Callable(i) | |
242 | 242 | func claimREADONLY (address) = { | |
243 | 243 | let amount = availableToClaimNow(address) | |
244 | 244 | $Tuple2(nil, amount) | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | ||
249 | 249 | @Callable(i) | |
250 | 250 | func stats (address) = $Tuple2(nil, [value(getInteger(keyUserVestingStart(address))), value(getInteger(keyUserVestingEnd(address))), getUserTotalAmount(address), getUserClaimedAmount(address), getUserRemainingAmount(address), availableToClaimNow(address)]) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | ||
254 | 254 | @Callable(i) | |
255 | 255 | func setManager (pendingManagerPublicKey) = { | |
256 | 256 | let checkCaller = mustManager(i) | |
257 | 257 | if ((checkCaller == checkCaller)) | |
258 | 258 | then { | |
259 | 259 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
260 | 260 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
261 | 261 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
262 | 262 | else throw("Strict value is not equal to itself.") | |
263 | 263 | } | |
264 | 264 | else throw("Strict value is not equal to itself.") | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(i) | |
270 | 270 | func confirmManager () = { | |
271 | 271 | let pm = pendingManagerPublicKeyOrUnit() | |
272 | 272 | let hasPM = if (isDefined(pm)) | |
273 | 273 | then true | |
274 | 274 | else throwErr("no pending manager") | |
275 | 275 | if ((hasPM == hasPM)) | |
276 | 276 | then { | |
277 | 277 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
278 | 278 | then true | |
279 | 279 | else throwErr("you are not pending manager") | |
280 | 280 | if ((checkPM == checkPM)) | |
281 | 281 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
282 | 282 | else throw("Strict value is not equal to itself.") | |
283 | 283 | } | |
284 | 284 | else throw("Strict value is not equal to itself.") | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | @Verifier(tx) | |
289 | 289 | func verify () = { | |
290 | 290 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
291 | 291 | case pk: ByteVector => | |
292 | 292 | pk | |
293 | 293 | case _: Unit => | |
294 | 294 | tx.senderPublicKey | |
295 | 295 | case _ => | |
296 | 296 | throw("Match error") | |
297 | 297 | } | |
298 | 298 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
299 | 299 | } | |
300 | 300 |
github/deemru/w8io/169f3d6 39.82 ms ◑