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