tx · 2N7vhN6jBWpR38ucttgJjCUxjp2TsfVz17HD1iPN8nCr 3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz: -0.01400000 Waves 2022.05.05 17:02 [2038490] smart account 3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz > SELF 0.00000000 Waves
{ "type": 13, "id": "2N7vhN6jBWpR38ucttgJjCUxjp2TsfVz17HD1iPN8nCr", "fee": 1400000, "feeAssetId": null, "timestamp": 1651759403724, "version": 1, "sender": "3MqV2hxYA4F3eyVzMPfpPXkmvQMVjhWJ2Zz", "senderPublicKey": "E7cYpzqL1fF9VQjL3m4zr3xXfV289rCkrfE2fJyAHMqR", "proofs": [ "283SipgaEvSgFwmgdMNymsVC9xhtwxjqG8unE5nYtrWuerv7cufufbQzaq2euq1JgeFECzSGom4k86d6VDkDc4C7" ], "script": "base64:AAIFAAAAAAAAACUIAhIDCgEIEgQKAggBEgMKAQgSABIDCgEIEgMKAQgSAwoBCBIAAAAAFAAAAAADU0VQAgAAAAJfXwEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAAHa2V5VXNlcgAAAAEAAAAHYWRkcmVzcwkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAIFAAAAB2FkZHJlc3MFAAAAA25pbAUAAAADU0VQAQAAAAprZXlSZXZva2VkAAAAAQAAAAdhZGRyZXNzCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAHcmV2b2tlZAkABEwAAAACBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAA1NFUAEAAAATa2V5VXNlclZlc3RpbmdTdGFydAAAAAEAAAAHYWRkcmVzcwkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADHZlc3Rpbm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VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5fMVBmA==", "chainId": 84, "height": 2038490, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GFJuSYFo2r5W5gyztUWenFpxTcD4BxxQAtvAGoQ1CoW8 Next: 6iMHavscDYT1uv5PncfW99MvxNABQqhdJrK4XiQGg6T4 Diff:
Old | New | Differences | |
---|---|---|---|
86 | 86 | ||
87 | 87 | ||
88 | 88 | func availableToClaimNow (address) = { | |
89 | - | let | |
90 | - | if ( | |
91 | - | then | |
89 | + | let isRevokedUser = valueOrElse(getBoolean(keyRevoked(address)), false) | |
90 | + | if (isRevokedUser) | |
91 | + | then getUserRemainingAmount(address) | |
92 | 92 | else { | |
93 | - | let | |
94 | - | if (( | |
95 | - | then | |
93 | + | let lastHeight = getUserLastClaimedHeight(address) | |
94 | + | if ((lastHeight >= height)) | |
95 | + | then 0 | |
96 | 96 | else { | |
97 | - | let unclaimedPeriod = (height - lastHeight) | |
98 | - | (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod) | |
97 | + | let end = value(getInteger(keyUserVestingEnd(address))) | |
98 | + | if ((height > end)) | |
99 | + | then getUserRemainingAmount(address) | |
100 | + | else { | |
101 | + | let unclaimedPeriod = (height - lastHeight) | |
102 | + | (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod) | |
103 | + | } | |
99 | 104 | } | |
100 | 105 | } | |
101 | 106 | } | |
114 | 119 | @Callable(i) | |
115 | 120 | func createDepositFor (address,blocksDuration) = { | |
116 | 121 | let endHeight = (height + blocksDuration) | |
122 | + | let amount = i.payments[0].amount | |
123 | + | let vestingLen = (endHeight - height) | |
124 | + | let amountPerBlock = (amount / vestingLen) | |
117 | 125 | let checks = [mustManager(i), if ((endHeight > height)) | |
118 | 126 | then true | |
119 | 127 | else throwErr("endHeight must be more than height"), if ((getString(keyUser(address)) == unit)) | |
120 | 128 | then true | |
121 | 129 | else throwErr("deposit for user already exists"), if ((toBase58String(value(i.payments[0].assetId)) == value(getString(keyWxAssetId())))) | |
122 | 130 | then true | |
123 | - | else throwErr("attached payment is not WX")] | |
131 | + | else throwErr("attached payment is not WX"), if ((amountPerBlock != 0)) | |
132 | + | then true | |
133 | + | else throwErr("attached amount too small or blocksDuration too large — will claimed zero per block")] | |
124 | 134 | if ((checks == checks)) | |
125 | - | then { | |
126 | - | let amount = i.payments[0].amount | |
127 | - | let vestingLen = (endHeight - height) | |
128 | - | [StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), (amount / vestingLen))] | |
129 | - | } | |
135 | + | then [StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), amountPerBlock)] | |
130 | 136 | else throw("Strict value is not equal to itself.") | |
131 | 137 | } | |
132 | 138 |
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", "revoked", address], SEP) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func keyUserVestingStart (address) = makeString(["%s", "vestingStart", address], SEP) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func keyUserVestingEnd (address) = makeString(["%s", "vestingEnd", address], SEP) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyUserAmountPerBlock (address) = makeString(["%s", "amountPerBlock", address], SEP) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func throwErr (msg) = throw(makeString(["vesting.ride:", msg], " ")) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
34 | 34 | case s: String => | |
35 | 35 | fromBase58String(s) | |
36 | 36 | case _: Unit => | |
37 | 37 | unit | |
38 | 38 | case _ => | |
39 | 39 | throw("Match error") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
44 | 44 | case s: String => | |
45 | 45 | fromBase58String(s) | |
46 | 46 | case _: Unit => | |
47 | 47 | unit | |
48 | 48 | case _ => | |
49 | 49 | throw("Match error") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func mustManager (i) = { | |
54 | 54 | let pd = throwErr("permission denied") | |
55 | 55 | match managerPublicKeyOrUnit() { | |
56 | 56 | case pk: ByteVector => | |
57 | 57 | if ((i.callerPublicKey == pk)) | |
58 | 58 | then true | |
59 | 59 | else pd | |
60 | 60 | case _: Unit => | |
61 | 61 | if ((i.caller == this)) | |
62 | 62 | then true | |
63 | 63 | else pd | |
64 | 64 | case _ => | |
65 | 65 | throw("Match error") | |
66 | 66 | } | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func valueUserS (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = makeString(["%d%d%d%d%d", totalAmount, remainingAmount, "0", claimedWXAmount, lastClaimedHeight], SEP) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func valueUser (totalAmount,remainingAmount,claimedWXAmount,lastClaimedHeight) = valueUserS(toString(totalAmount), toString(remainingAmount), toString(claimedWXAmount), toString(lastClaimedHeight)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getUserTotalAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[1]) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getUserRemainingAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[2]) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getUserClaimedAmount (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[3]) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getUserLastClaimedHeight (address) = parseIntValue(split(value(getString(keyUser(address))), SEP)[5]) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func availableToClaimNow (address) = { | |
89 | - | let | |
90 | - | if ( | |
91 | - | then | |
89 | + | let isRevokedUser = valueOrElse(getBoolean(keyRevoked(address)), false) | |
90 | + | if (isRevokedUser) | |
91 | + | then getUserRemainingAmount(address) | |
92 | 92 | else { | |
93 | - | let | |
94 | - | if (( | |
95 | - | then | |
93 | + | let lastHeight = getUserLastClaimedHeight(address) | |
94 | + | if ((lastHeight >= height)) | |
95 | + | then 0 | |
96 | 96 | else { | |
97 | - | let unclaimedPeriod = (height - lastHeight) | |
98 | - | (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod) | |
97 | + | let end = value(getInteger(keyUserVestingEnd(address))) | |
98 | + | if ((height > end)) | |
99 | + | then getUserRemainingAmount(address) | |
100 | + | else { | |
101 | + | let unclaimedPeriod = (height - lastHeight) | |
102 | + | (value(getInteger(keyUserAmountPerBlock(address))) * unclaimedPeriod) | |
103 | + | } | |
99 | 104 | } | |
100 | 105 | } | |
101 | 106 | } | |
102 | 107 | ||
103 | 108 | ||
104 | 109 | @Callable(i) | |
105 | 110 | func constructor (wxAssetId) = { | |
106 | 111 | let check = mustManager(i) | |
107 | 112 | if ((check == check)) | |
108 | 113 | then [StringEntry(keyWxAssetId(), wxAssetId)] | |
109 | 114 | else throw("Strict value is not equal to itself.") | |
110 | 115 | } | |
111 | 116 | ||
112 | 117 | ||
113 | 118 | ||
114 | 119 | @Callable(i) | |
115 | 120 | func createDepositFor (address,blocksDuration) = { | |
116 | 121 | let endHeight = (height + blocksDuration) | |
122 | + | let amount = i.payments[0].amount | |
123 | + | let vestingLen = (endHeight - height) | |
124 | + | let amountPerBlock = (amount / vestingLen) | |
117 | 125 | let checks = [mustManager(i), if ((endHeight > height)) | |
118 | 126 | then true | |
119 | 127 | else throwErr("endHeight must be more than height"), if ((getString(keyUser(address)) == unit)) | |
120 | 128 | then true | |
121 | 129 | else throwErr("deposit for user already exists"), if ((toBase58String(value(i.payments[0].assetId)) == value(getString(keyWxAssetId())))) | |
122 | 130 | then true | |
123 | - | else throwErr("attached payment is not WX")] | |
131 | + | else throwErr("attached payment is not WX"), if ((amountPerBlock != 0)) | |
132 | + | then true | |
133 | + | else throwErr("attached amount too small or blocksDuration too large — will claimed zero per block")] | |
124 | 134 | if ((checks == checks)) | |
125 | - | then { | |
126 | - | let amount = i.payments[0].amount | |
127 | - | let vestingLen = (endHeight - height) | |
128 | - | [StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), (amount / vestingLen))] | |
129 | - | } | |
135 | + | then [StringEntry(keyUser(address), valueUser(amount, amount, 0, height)), IntegerEntry(keyUserVestingStart(address), height), IntegerEntry(keyUserVestingEnd(address), endHeight), IntegerEntry(keyUserAmountPerBlock(address), amountPerBlock)] | |
130 | 136 | else throw("Strict value is not equal to itself.") | |
131 | 137 | } | |
132 | 138 | ||
133 | 139 | ||
134 | 140 | ||
135 | 141 | @Callable(i) | |
136 | 142 | func revokeDepositFor (address) = { | |
137 | 143 | let checks = [mustManager(i), if ((getString(keyUser(address)) != unit)) | |
138 | 144 | then true | |
139 | 145 | else throwErr("deposit for user is not exists")] | |
140 | 146 | if ((checks == checks)) | |
141 | 147 | then { | |
142 | 148 | let totalAmount = getUserTotalAmount(address) | |
143 | 149 | let amount = availableToClaimNow(address) | |
144 | 150 | let claimedWXAmount = getUserClaimedAmount(address) | |
145 | 151 | let lastClaimedHeight = getUserLastClaimedHeight(address) | |
146 | 152 | [BooleanEntry(keyRevoked(address), true), StringEntry(keyUser(address), valueUser(totalAmount, amount, claimedWXAmount, lastClaimedHeight))] | |
147 | 153 | } | |
148 | 154 | else throw("Strict value is not equal to itself.") | |
149 | 155 | } | |
150 | 156 | ||
151 | 157 | ||
152 | 158 | ||
153 | 159 | @Callable(i) | |
154 | 160 | func claim () = { | |
155 | 161 | let addr = i.caller | |
156 | 162 | let addrStr = toString(addr) | |
157 | 163 | let wx = fromBase58String(value(getString(keyWxAssetId()))) | |
158 | 164 | let amount = availableToClaimNow(addrStr) | |
159 | 165 | let ensureAmount = if ((amount != 0)) | |
160 | 166 | then true | |
161 | 167 | else throwErr("nothing to claim") | |
162 | 168 | if ((ensureAmount == ensureAmount)) | |
163 | 169 | then { | |
164 | 170 | let totalAmount = getUserTotalAmount(addrStr) | |
165 | 171 | let remainingAmount = getUserRemainingAmount(addrStr) | |
166 | 172 | let claimedWXAmount = getUserClaimedAmount(addrStr) | |
167 | 173 | let isRevokedUser = valueOrElse(getBoolean(keyRevoked(addrStr)), false) | |
168 | 174 | if (isRevokedUser) | |
169 | 175 | then [ScriptTransfer(addr, remainingAmount, wx), StringEntry(keyUser(addrStr), valueUser(totalAmount, 0, (claimedWXAmount + remainingAmount), height))] | |
170 | 176 | else [ScriptTransfer(addr, amount, wx), StringEntry(keyUser(addrStr), valueUser(totalAmount, (remainingAmount - amount), (claimedWXAmount + amount), height))] | |
171 | 177 | } | |
172 | 178 | else throw("Strict value is not equal to itself.") | |
173 | 179 | } | |
174 | 180 | ||
175 | 181 | ||
176 | 182 | ||
177 | 183 | @Callable(i) | |
178 | 184 | func claimREADONLY (address) = { | |
179 | 185 | let amount = availableToClaimNow(address) | |
180 | 186 | $Tuple2(nil, amount) | |
181 | 187 | } | |
182 | 188 | ||
183 | 189 | ||
184 | 190 | ||
185 | 191 | @Callable(i) | |
186 | 192 | func stats (address) = $Tuple2(nil, [value(getInteger(keyUserVestingStart(address))), value(getInteger(keyUserVestingEnd(address))), getUserTotalAmount(address), getUserClaimedAmount(address), getUserRemainingAmount(address), availableToClaimNow(address)]) | |
187 | 193 | ||
188 | 194 | ||
189 | 195 | ||
190 | 196 | @Callable(i) | |
191 | 197 | func setManager (pendingManagerPublicKey) = { | |
192 | 198 | let checkCaller = mustManager(i) | |
193 | 199 | if ((checkCaller == checkCaller)) | |
194 | 200 | then { | |
195 | 201 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
196 | 202 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
197 | 203 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
198 | 204 | else throw("Strict value is not equal to itself.") | |
199 | 205 | } | |
200 | 206 | else throw("Strict value is not equal to itself.") | |
201 | 207 | } | |
202 | 208 | ||
203 | 209 | ||
204 | 210 | ||
205 | 211 | @Callable(i) | |
206 | 212 | func confirmManager () = { | |
207 | 213 | let pm = pendingManagerPublicKeyOrUnit() | |
208 | 214 | let hasPM = if (isDefined(pm)) | |
209 | 215 | then true | |
210 | 216 | else throwErr("no pending manager") | |
211 | 217 | if ((hasPM == hasPM)) | |
212 | 218 | then { | |
213 | 219 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
214 | 220 | then true | |
215 | 221 | else throwErr("you are not pending manager") | |
216 | 222 | if ((checkPM == checkPM)) | |
217 | 223 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
218 | 224 | else throw("Strict value is not equal to itself.") | |
219 | 225 | } | |
220 | 226 | else throw("Strict value is not equal to itself.") | |
221 | 227 | } | |
222 | 228 | ||
223 | 229 | ||
224 | 230 | @Verifier(tx) | |
225 | 231 | func verify () = { | |
226 | 232 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
227 | 233 | case pk: ByteVector => | |
228 | 234 | pk | |
229 | 235 | case _: Unit => | |
230 | 236 | tx.senderPublicKey | |
231 | 237 | case _ => | |
232 | 238 | throw("Match error") | |
233 | 239 | } | |
234 | 240 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
235 | 241 | } | |
236 | 242 |
github/deemru/w8io/169f3d6 41.92 ms ◑