tx · ByNGaMUqkErvMddgj5c9BX2Yf5iToVH6CA8ppUs1G9WZ 3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU: -0.01300000 Waves 2024.03.22 14:49 [3029204] smart account 3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU > SELF 0.00000000 Waves
{ "type": 13, "id": "ByNGaMUqkErvMddgj5c9BX2Yf5iToVH6CA8ppUs1G9WZ", "fee": 1300000, "feeAssetId": null, "timestamp": 1711108201395, "version": 2, "chainId": 84, "sender": "3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU", "senderPublicKey": "7dYS4cBUtMS3qg16og5S9C9U6ygyVxgTqhJGoYcsuYzr", "proofs": [ "3LBTQBQEbPVYnx8jZvoZKc4Zov4yiEayVhWuXtEvuRi1mQrdbzCgpEjMjZAB7mU6tMca8qhvsbC6Lcn262xNnB69" ], "script": "base64:BwJPCAISBgoECAgICBIICgYICAgICAgSCQoHCAgBCAgBCBIICgYICAEICAgSCAoGCAgBCAgIEgUKAwEICBIFCgMBCAgSABIAEgMKAQgSAwoBCDwACVNFUEFSQVRPUgICX18ADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAIS0VZX0lOSVQCBElOSVQACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAAxLRVlfRVhFQ1VUT1ICCEVYRUNVVE9SABNLRVlfQ0FMTEVSX0NPTlRSQUNUAg9DQUxMRVJfQ09OVFJBQ1QAD0tFWV9XQVZFU19WQVVMVAILV0FWRVNfVkFVTFQAE0tFWV9BQ0NPVU5UX1NUT1JBR0UCD0FDQ09VTlRfU1RPUkFHRQAJS0VZX0NIQUlOAgVDSEFJTgAQS0VZX0FTU0VUX1RJQ0tFUgIMQVNTRVRfVElDS0VSABJLRVlfQVNTRVRfUkVTRVJWRVMCDkFTU0VUX1JFU0VSVkVTABNLRVlfVElDS0VSX1JFU0VSVkVTAg9USUNLRVJfUkVTRV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RFxpCDa1h1QrAJPCPCMGJaSTo Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 7 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEPARATOR = "__" | |
5 | + | ||
6 | + | let KEY_MULTISIG = "MULTISIG" | |
7 | + | ||
8 | + | let KEY_STATUS = "STATUS" | |
9 | + | ||
10 | + | let KEY_INIT = "INIT" | |
11 | + | ||
12 | + | let KEY_PAUSED = "PAUSED" | |
13 | + | ||
14 | + | let KEY_PAUSER = "PAUSER" | |
15 | + | ||
16 | + | let KEY_EXECUTOR = "EXECUTOR" | |
17 | + | ||
18 | + | let KEY_CALLER_CONTRACT = "CALLER_CONTRACT" | |
19 | + | ||
20 | + | let KEY_WAVES_VAULT = "WAVES_VAULT" | |
21 | + | ||
22 | + | let KEY_ACCOUNT_STORAGE = "ACCOUNT_STORAGE" | |
23 | + | ||
24 | + | let KEY_CHAIN = "CHAIN" | |
25 | + | ||
26 | + | let KEY_ASSET_TICKER = "ASSET_TICKER" | |
27 | + | ||
28 | + | let KEY_ASSET_RESERVES = "ASSET_RESERVES" | |
29 | + | ||
30 | + | let KEY_TICKER_RESERVES = "TICKER_RESERVES" | |
31 | + | ||
32 | + | let FUNC_DEPOSIT = "deposit" | |
33 | + | ||
34 | + | let WAVES = "WAVES" | |
35 | + | ||
36 | + | let SPOT_WALLET = "SPOT" | |
37 | + | ||
38 | + | let MAX_INT = 9223372036854775807 | |
39 | + | ||
40 | + | let ZERO_BIGINT = toBigInt(0) | |
41 | + | ||
42 | + | let ONE_BIGINT = toBigInt(1) | |
43 | + | ||
44 | + | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
45 | + | case a: Address => | |
46 | + | true | |
47 | + | case _ => | |
48 | + | throw(err_) | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
53 | + | then true | |
54 | + | else (val_ > upperBoundary_)) | |
55 | + | then throw(err_) | |
56 | + | else true | |
57 | + | ||
58 | + | ||
59 | + | func _validateBigInt (val_,lowerBoundary_,err_) = if ((lowerBoundary_ > val_)) | |
60 | + | then throw(err_) | |
61 | + | else true | |
62 | + | ||
63 | + | ||
64 | + | func _validateString (val_,err_) = if (if ((0 >= size(val_))) | |
65 | + | then true | |
66 | + | else contains(val_, SEPARATOR)) | |
67 | + | then throw(err_) | |
68 | + | else true | |
69 | + | ||
70 | + | ||
71 | + | func _loadInit () = match getBoolean(KEY_INIT) { | |
72 | + | case a: Boolean => | |
73 | + | a | |
74 | + | case _ => | |
75 | + | false | |
76 | + | } | |
77 | + | ||
78 | + | ||
79 | + | func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)] | |
80 | + | ||
81 | + | ||
82 | + | func _loadPause () = match getBoolean(KEY_PAUSED) { | |
83 | + | case a: Boolean => | |
84 | + | a | |
85 | + | case _ => | |
86 | + | false | |
87 | + | } | |
88 | + | ||
89 | + | ||
90 | + | func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)] | |
91 | + | ||
92 | + | ||
93 | + | func _loadPauser () = match getString(KEY_PAUSER) { | |
94 | + | case a: String => | |
95 | + | addressFromStringValue(a) | |
96 | + | case _ => | |
97 | + | Address(base58'') | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))] | |
102 | + | ||
103 | + | ||
104 | + | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
105 | + | case a: String => | |
106 | + | addressFromStringValue(a) | |
107 | + | case _ => | |
108 | + | Address(base58'') | |
109 | + | } | |
110 | + | ||
111 | + | ||
112 | + | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
113 | + | ||
114 | + | ||
115 | + | func _loadCallerContract (chainId_) = match getString(makeString([KEY_CALLER_CONTRACT, toString(chainId_)], SEPARATOR)) { | |
116 | + | case a: String => | |
117 | + | a | |
118 | + | case _ => | |
119 | + | "" | |
120 | + | } | |
121 | + | ||
122 | + | ||
123 | + | func _saveCallerContract (chainId_,callerContract_) = [StringEntry(makeString([KEY_CALLER_CONTRACT, toString(chainId_)], SEPARATOR), callerContract_)] | |
124 | + | ||
125 | + | ||
126 | + | func _loadExecutor () = match getString(KEY_EXECUTOR) { | |
127 | + | case a: String => | |
128 | + | addressFromStringValue(a) | |
129 | + | case _ => | |
130 | + | Address(base58'') | |
131 | + | } | |
132 | + | ||
133 | + | ||
134 | + | func _saveExecutor (executor_) = [StringEntry(KEY_EXECUTOR, toString(executor_))] | |
135 | + | ||
136 | + | ||
137 | + | func _loadAccountStorage () = match getString(KEY_ACCOUNT_STORAGE) { | |
138 | + | case a: String => | |
139 | + | addressFromStringValue(a) | |
140 | + | case _ => | |
141 | + | Address(base58'') | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | func _saveAccountStorage (accountStorage_) = [StringEntry(KEY_ACCOUNT_STORAGE, toString(accountStorage_))] | |
146 | + | ||
147 | + | ||
148 | + | func _loadWavesVault () = match getString(KEY_WAVES_VAULT) { | |
149 | + | case a: String => | |
150 | + | addressFromStringValue(a) | |
151 | + | case _ => | |
152 | + | Address(base58'') | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | func _saveWavesVault (wavesVault_) = [StringEntry(KEY_WAVES_VAULT, toString(wavesVault_))] | |
157 | + | ||
158 | + | ||
159 | + | func _loadChain (chainId_) = match getString(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR)) { | |
160 | + | case a: String => | |
161 | + | a | |
162 | + | case _ => | |
163 | + | "" | |
164 | + | } | |
165 | + | ||
166 | + | ||
167 | + | func _saveChain (chainId_,name_) = [StringEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), name_)] | |
168 | + | ||
169 | + | ||
170 | + | func _loadAssetTicker (chainId_,asset_) = match getString(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR)) { | |
171 | + | case a: String => | |
172 | + | a | |
173 | + | case _ => | |
174 | + | "" | |
175 | + | } | |
176 | + | ||
177 | + | ||
178 | + | func _saveAssetTicker (chainId_,asset_,ticker_) = [StringEntry(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR), ticker_)] | |
179 | + | ||
180 | + | ||
181 | + | func _loadAssetReserves (chainId_,asset_) = match getString(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR)) { | |
182 | + | case a: String => | |
183 | + | parseBigIntValue(a) | |
184 | + | case _ => | |
185 | + | ZERO_BIGINT | |
186 | + | } | |
187 | + | ||
188 | + | ||
189 | + | func _saveAssetReserves (chainId_,asset_,reserves_) = [StringEntry(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR), toString(reserves_))] | |
190 | + | ||
191 | + | ||
192 | + | func _loadTickerReserves (ticker_) = match getString(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR)) { | |
193 | + | case a: String => | |
194 | + | parseBigIntValue(a) | |
195 | + | case _ => | |
196 | + | ZERO_BIGINT | |
197 | + | } | |
198 | + | ||
199 | + | ||
200 | + | func _saveTickerReserves (ticker_,reserves_) = [StringEntry(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR), toString(reserves_))] | |
201 | + | ||
202 | + | ||
203 | + | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
204 | + | then throw("_onlyThisContract: revert") | |
205 | + | else true | |
206 | + | ||
207 | + | ||
208 | + | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
209 | + | then throw("_whenMultisigSet: revert") | |
210 | + | else true | |
211 | + | ||
212 | + | ||
213 | + | func _whenNotInitialized () = if (_loadInit()) | |
214 | + | then throw("_whenNotInitialized: revert") | |
215 | + | else true | |
216 | + | ||
217 | + | ||
218 | + | func _whenInitialized () = if (!(_loadInit())) | |
219 | + | then throw("_whenInitialized: revert") | |
220 | + | else true | |
221 | + | ||
222 | + | ||
223 | + | func _whenNotPaused () = if (_loadPause()) | |
224 | + | then throw("_whenNotPaused: revert") | |
225 | + | else true | |
226 | + | ||
227 | + | ||
228 | + | func _whenPaused () = if (!(_loadPause())) | |
229 | + | then throw("_whenPaused: revert") | |
230 | + | else true | |
231 | + | ||
232 | + | ||
233 | + | func _onlyPauser (caller_) = if ((caller_ != _loadPauser())) | |
234 | + | then throw("_onlyPauser: revert") | |
235 | + | else true | |
236 | + | ||
237 | + | ||
238 | + | func _validateExecutor (val_,err_) = if ((val_ != _loadExecutor())) | |
239 | + | then throw(err_) | |
240 | + | else true | |
241 | + | ||
242 | + | ||
243 | + | func _validateCallerContract (chainId_,callerContract_,err_) = if ((_loadCallerContract(chainId_) != callerContract_)) | |
244 | + | then throw(err_) | |
245 | + | else true | |
246 | + | ||
247 | + | ||
248 | + | func _chainExists (chainId_,err_) = if ((0 >= size(_loadChain(chainId_)))) | |
249 | + | then throw(err_) | |
250 | + | else true | |
251 | + | ||
252 | + | ||
253 | + | func _assetTickerExists (chainId_,asset_,err_) = if ((0 >= size(_loadAssetTicker(chainId_, asset_)))) | |
254 | + | then throw(err_) | |
255 | + | else true | |
256 | + | ||
257 | + | ||
258 | + | func _validateWavesVault (caller,err_) = if ((_loadWavesVault() != caller)) | |
259 | + | then throw(err_) | |
260 | + | else true | |
261 | + | ||
262 | + | ||
263 | + | @Callable(i) | |
264 | + | func init (executor_,pauser_,accountStorage_,wavesVault_) = { | |
265 | + | let err = if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
266 | + | then _whenNotInitialized() | |
267 | + | else false) | |
268 | + | then _whenMultisigSet() | |
269 | + | else false) | |
270 | + | then _validateAddress(executor_, "init: invalid executor") | |
271 | + | else false) | |
272 | + | then _validateAddress(pauser_, "init: invalid pauser") | |
273 | + | else false) | |
274 | + | then _validateAddress(accountStorage_, "init: invalid accountStorage") | |
275 | + | else false) | |
276 | + | then _validateAddress(wavesVault_, "init: invalid wavesVault") | |
277 | + | else false | |
278 | + | if ((err == err)) | |
279 | + | then $Tuple2(((((_saveInit(true) ++ _saveExecutor(addressFromStringValue(executor_))) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveAccountStorage(addressFromStringValue(accountStorage_))) ++ _saveWavesVault(addressFromStringValue(wavesVault_))), unit) | |
280 | + | else throw("Strict value is not equal to itself.") | |
281 | + | } | |
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | @Callable(i) | |
286 | + | func deposit (callerContract_,from_,to_,chainId_,asset_,amount_) = { | |
287 | + | let chainId = valueOrErrorMessage(parseInt(chainId_), "deposit: chainId not int") | |
288 | + | let amount = valueOrErrorMessage(parseBigInt(amount_), "deposit: amount not int") | |
289 | + | let err = if (if (if (if (if (if (_whenInitialized()) | |
290 | + | then _whenNotPaused() | |
291 | + | else false) | |
292 | + | then _chainExists(chainId, "deposit: invalid chainId") | |
293 | + | else false) | |
294 | + | then _validateString(from_, "deposit: invalid from") | |
295 | + | else false) | |
296 | + | then _validateString(to_, "deposit: invalid to") | |
297 | + | else false) | |
298 | + | then _assetTickerExists(chainId, asset_, "deposit: invalid asset") | |
299 | + | else false) | |
300 | + | then _validateBigInt(amount, ZERO_BIGINT, "deposit: invalid amount") | |
301 | + | else false | |
302 | + | if ((err == err)) | |
303 | + | then { | |
304 | + | let err1 = if ((_loadChain(chainId) == WAVES)) | |
305 | + | then _validateWavesVault(i.caller, "deposit: invalid waves vault") | |
306 | + | else if (_validateExecutor(i.caller, "deposit: invalid executor")) | |
307 | + | then _validateCallerContract(chainId, callerContract_, "deposit: invalid caller contract") | |
308 | + | else false | |
309 | + | if ((err1 == err1)) | |
310 | + | then { | |
311 | + | let newAssetReserves = (_loadAssetReserves(chainId, asset_) + amount) | |
312 | + | let ticker = _loadAssetTicker(chainId, asset_) | |
313 | + | let newTickerReserves = (_loadTickerReserves(ticker) + amount) | |
314 | + | let invocation = invoke(_loadAccountStorage(), FUNC_DEPOSIT, [to_, SPOT_WALLET, ticker, amount_], nil) | |
315 | + | if ((invocation == invocation)) | |
316 | + | then $Tuple2((_saveAssetReserves(chainId, asset_, newAssetReserves) ++ _saveTickerReserves(ticker, newTickerReserves)), unit) | |
317 | + | else throw("Strict value is not equal to itself.") | |
318 | + | } | |
319 | + | else throw("Strict value is not equal to itself.") | |
320 | + | } | |
321 | + | else throw("Strict value is not equal to itself.") | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | @Callable(i) | |
327 | + | func withdraw (from_,to_,chainId_,asset_,amount_,timestamp_,signature_) = $Tuple2(nil, unit) | |
328 | + | ||
329 | + | ||
330 | + | ||
331 | + | @Callable(i) | |
332 | + | func requestWithdrawal (from_,to_,chainId_,asset_,amount_,signature_) = $Tuple2(nil, unit) | |
333 | + | ||
334 | + | ||
335 | + | ||
336 | + | @Callable(i) | |
337 | + | func executeWithdrawal (from_,to_,chainId_,asset_,amount_,signature_) = $Tuple2(nil, unit) | |
338 | + | ||
339 | + | ||
340 | + | ||
341 | + | @Callable(i) | |
342 | + | func addChain (chainId_,name_,callerContract_) = { | |
343 | + | let err = if (if (if (if (if (_onlyThisContract(i.caller)) | |
344 | + | then _whenInitialized() | |
345 | + | else false) | |
346 | + | then _validateInt(chainId_, 0, MAX_INT, "addChain: invalid chainId") | |
347 | + | else false) | |
348 | + | then _validateString(name_, "addChain: invalid name") | |
349 | + | else false) | |
350 | + | then _validateString(callerContract_, "addChain: invalid callerContract") | |
351 | + | else false) | |
352 | + | then !(_chainExists(chainId_, "addChain: already exists")) | |
353 | + | else false | |
354 | + | if ((err == err)) | |
355 | + | then $Tuple2((_saveChain(chainId_, name_) ++ _saveCallerContract(chainId_, callerContract_)), unit) | |
356 | + | else throw("Strict value is not equal to itself.") | |
357 | + | } | |
358 | + | ||
359 | + | ||
360 | + | ||
361 | + | @Callable(i) | |
362 | + | func addAsset (chainId_,asset_,ticker_) = { | |
363 | + | let err = if (if (if (if (if (_onlyThisContract(i.caller)) | |
364 | + | then _whenInitialized() | |
365 | + | else false) | |
366 | + | then _chainExists(chainId_, "addAsset: invalid chainId") | |
367 | + | else false) | |
368 | + | then _validateString(asset_, "addAsset: invalid asset") | |
369 | + | else false) | |
370 | + | then _validateString(ticker_, "addAsset: invalid ticker") | |
371 | + | else false) | |
372 | + | then !(_assetTickerExists(chainId_, asset_, "addAsset: already exists")) | |
373 | + | else false | |
374 | + | if ((err == err)) | |
375 | + | then $Tuple2(_saveAssetTicker(chainId_, asset_, ticker_), unit) | |
376 | + | else throw("Strict value is not equal to itself.") | |
377 | + | } | |
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | @Callable(i) | |
382 | + | func pause () = { | |
383 | + | let err = if (if (_onlyPauser(i.caller)) | |
384 | + | then _whenInitialized() | |
385 | + | else false) | |
386 | + | then _whenNotPaused() | |
387 | + | else false | |
388 | + | if ((err == err)) | |
389 | + | then $Tuple2(_savePause(true), unit) | |
390 | + | else throw("Strict value is not equal to itself.") | |
391 | + | } | |
392 | + | ||
393 | + | ||
394 | + | ||
395 | + | @Callable(i) | |
396 | + | func unpause () = { | |
397 | + | let err = if (if (_onlyPauser(i.caller)) | |
398 | + | then _whenInitialized() | |
399 | + | else false) | |
400 | + | then _whenPaused() | |
401 | + | else false | |
402 | + | if ((err == err)) | |
403 | + | then $Tuple2(_savePause(false), unit) | |
404 | + | else throw("Strict value is not equal to itself.") | |
405 | + | } | |
406 | + | ||
407 | + | ||
408 | + | ||
409 | + | @Callable(i) | |
410 | + | func updatePauser (pauser_) = { | |
411 | + | let err = if (if (_onlyThisContract(i.caller)) | |
412 | + | then _whenInitialized() | |
413 | + | else false) | |
414 | + | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
415 | + | else false | |
416 | + | if ((err == err)) | |
417 | + | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) | |
418 | + | else throw("Strict value is not equal to itself.") | |
419 | + | } | |
420 | + | ||
421 | + | ||
422 | + | ||
423 | + | @Callable(i) | |
424 | + | func setMultisig (multisig_) = { | |
425 | + | let err = if (_onlyThisContract(i.caller)) | |
426 | + | then _validateAddress(multisig_, "setMultisig: invalid multisig") | |
427 | + | else false | |
428 | + | if ((err == err)) | |
429 | + | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
430 | + | else throw("Strict value is not equal to itself.") | |
431 | + | } | |
432 | + | ||
433 | + | ||
434 | + | @Verifier(tx) | |
435 | + | func verify () = match getString(KEY_MULTISIG) { | |
436 | + | case multisig: String => | |
437 | + | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false) | |
438 | + | case _ => | |
439 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
440 | + | } | |
441 | + |
github/deemru/w8io/026f985 24.05 ms ◑