tx · CGFztBDyWMPF6huiE4JpS2WeLofSYCFkc97TVjboWiQs 3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8: -0.01200000 Waves 2024.03.22 14:48 [3029202] smart account 3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8 > SELF 0.00000000 Waves
{ "type": 13, "id": "CGFztBDyWMPF6huiE4JpS2WeLofSYCFkc97TVjboWiQs", "fee": 1200000, "feeAssetId": null, "timestamp": 1711108100773, "version": 2, "chainId": 84, "sender": "3N3LYhWVMMwUSDzVmNKQK3dDKFvG1sT6PX8", "senderPublicKey": "EFS9Kr4PQgyRsCT4tt2skry6S4ofTwzRJKormQc5F5aC", "proofs": [ "5ruocpt8MWZBWUuy4rUetfHRjfR2SPqm4xtDHewU4a5o5mYbJJn3A8nw6GV8J4hcJBBkASoupikijagm8snHsLby" ], "script": "base64:BwIlCAISBgoEAQgICBIAEgMKAQgSABIAEgASABIAEgMKAQgSAwoBCCwACVNFUEFSQVRPUgICX18ADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAIS0VZX0lOSVQCBElOSVQACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAAlLRVlfQ0hBSU4CBUNIQUlOABRLRVlfR0FURVdBWV9DT05UUkFDVAIQR0FURVdBWV9DT05UUkFDVAATS0VZX1NXQVZFU19DT05UUkFDVAIPU1dBVkVTX0NPTlRSQUNUAAxLRVlfUkVTRVJWRVMCCFJFU0VSVkVTAAxGVU5DX0RFUE9TSVQCB2RlcG9zaXQABVdBVkVTAgVXQVZFUwAOV0FWRVNfREVDSU1BTFMACAAMREVYX0RFQ0lNQUxTAAgAB01BWF9JTlQA//////////9/ARBfdmFsaWRhdGVBZGRyZXNzAghhZGRyZXNzXwRlcnJfBAckbWF0Y2gwCQCmCAEFCGFkZHJlc3NfAwkAAQIFByRtYXRjaDACB0FkZHJlc3MEAWEFByRtYXRjaDAGC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emVkAAcJARBfdmFsaWRhdGVBZGRyZXNzAgUHcGF1c2VyXwIcdXBkYXRlUGF1c2VyOiBpbnZhbGlkIHBhdXNlcgcDCQAAAgUDZXJyBQNlcnIJAJQKAgkBC19zYXZlUGF1c2VyAQkBEUBleHRyTmF0aXZlKDEwNjIpAQUHcGF1c2VyXwUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQtzZXRNdWx0aXNpZwEJbXVsdGlzaWdfBANlcnIDCQERX29ubHlUaGlzQ29udHJhY3QBCAUBaQZjYWxsZXIJARBfdmFsaWRhdGVBZGRyZXNzAgUJbXVsdGlzaWdfAh1zZXRNdWx0aXNpZzogaW52YWxpZCBtdWx0aXNpZwcDCQAAAgUDZXJyBQNlcnIJAJQKAgkBDV9zYXZlTXVsdGlzaWcBCQERQGV4dHJOYXRpdmUoMTA2MikBBQltdWx0aXNpZ18FBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAckbWF0Y2gwCQCiCAEFDEtFWV9NVUxUSVNJRwMJAAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUJU0VQQVJBVE9SBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleU31IvY=", "height": 3029202, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: JjJ2gsEq3TGnMDy5G9vSpyKrHc43JPzes8CCUEq3y9D 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_CHAIN = "CHAIN" | |
17 | + | ||
18 | + | let KEY_GATEWAY_CONTRACT = "GATEWAY_CONTRACT" | |
19 | + | ||
20 | + | let KEY_SWAVES_CONTRACT = "SWAVES_CONTRACT" | |
21 | + | ||
22 | + | let KEY_RESERVES = "RESERVES" | |
23 | + | ||
24 | + | let FUNC_DEPOSIT = "deposit" | |
25 | + | ||
26 | + | let WAVES = "WAVES" | |
27 | + | ||
28 | + | let WAVES_DECIMALS = 8 | |
29 | + | ||
30 | + | let DEX_DECIMALS = 8 | |
31 | + | ||
32 | + | let MAX_INT = 9223372036854775807 | |
33 | + | ||
34 | + | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
35 | + | case a: Address => | |
36 | + | true | |
37 | + | case _ => | |
38 | + | throw(err_) | |
39 | + | } | |
40 | + | ||
41 | + | ||
42 | + | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
43 | + | then true | |
44 | + | else (val_ > upperBoundary_)) | |
45 | + | then throw(err_) | |
46 | + | else true | |
47 | + | ||
48 | + | ||
49 | + | func _validateString (val_,err_) = if (if ((0 >= size(val_))) | |
50 | + | then true | |
51 | + | else contains(val_, SEPARATOR)) | |
52 | + | then throw(err_) | |
53 | + | else true | |
54 | + | ||
55 | + | ||
56 | + | func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_)) | |
57 | + | then throw(err_) | |
58 | + | else true | |
59 | + | ||
60 | + | ||
61 | + | func _getDecimals (assetId_) = if ((assetId_ == WAVES)) | |
62 | + | then WAVES_DECIMALS | |
63 | + | else match assetInfo(fromBase58String(assetId_)) { | |
64 | + | case a: Asset => | |
65 | + | a.decimals | |
66 | + | case _ => | |
67 | + | throw(("_getDecimals: no asset=" + assetId_)) | |
68 | + | } | |
69 | + | ||
70 | + | ||
71 | + | func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_) = if ((sourceDecimals_ >= targetDecimals_)) | |
72 | + | then (amount_ / pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN)) | |
73 | + | else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN)) | |
74 | + | ||
75 | + | ||
76 | + | func _loadInit () = match getBoolean(KEY_INIT) { | |
77 | + | case a: Boolean => | |
78 | + | a | |
79 | + | case _ => | |
80 | + | false | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)] | |
85 | + | ||
86 | + | ||
87 | + | func _loadPause () = match getBoolean(KEY_PAUSED) { | |
88 | + | case a: Boolean => | |
89 | + | a | |
90 | + | case _ => | |
91 | + | false | |
92 | + | } | |
93 | + | ||
94 | + | ||
95 | + | func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)] | |
96 | + | ||
97 | + | ||
98 | + | func _loadPauser () = match getString(KEY_PAUSER) { | |
99 | + | case a: String => | |
100 | + | addressFromStringValue(a) | |
101 | + | case _ => | |
102 | + | Address(base58'') | |
103 | + | } | |
104 | + | ||
105 | + | ||
106 | + | func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))] | |
107 | + | ||
108 | + | ||
109 | + | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
110 | + | case a: String => | |
111 | + | addressFromStringValue(a) | |
112 | + | case _ => | |
113 | + | Address(base58'') | |
114 | + | } | |
115 | + | ||
116 | + | ||
117 | + | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
118 | + | ||
119 | + | ||
120 | + | func _loadChainId () = match getInteger(KEY_CHAIN) { | |
121 | + | case a: Int => | |
122 | + | a | |
123 | + | case _ => | |
124 | + | 0 | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func _saveChainId (chainId_) = [IntegerEntry(KEY_CHAIN, chainId_)] | |
129 | + | ||
130 | + | ||
131 | + | func _loadGatewayContract () = match getString(KEY_GATEWAY_CONTRACT) { | |
132 | + | case a: String => | |
133 | + | addressFromStringValue(a) | |
134 | + | case _ => | |
135 | + | Address(base58'') | |
136 | + | } | |
137 | + | ||
138 | + | ||
139 | + | func _saveGatewayContract (gatewayContract_) = [StringEntry(KEY_GATEWAY_CONTRACT, toString(gatewayContract_))] | |
140 | + | ||
141 | + | ||
142 | + | func _loadSWavesContract () = match getString(KEY_SWAVES_CONTRACT) { | |
143 | + | case a: String => | |
144 | + | addressFromStringValue(a) | |
145 | + | case _ => | |
146 | + | Address(base58'') | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | func _saveSWavesContract (sWavesContract_) = [StringEntry(KEY_SWAVES_CONTRACT, toString(sWavesContract_))] | |
151 | + | ||
152 | + | ||
153 | + | func _loadReserves (asset_) = match getInteger(makeString([KEY_RESERVES, asset_], SEPARATOR)) { | |
154 | + | case a: Int => | |
155 | + | a | |
156 | + | case _ => | |
157 | + | 0 | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | func _saveReserves (asset_,reserves_) = [IntegerEntry(makeString([KEY_RESERVES, asset_], SEPARATOR), reserves_)] | |
162 | + | ||
163 | + | ||
164 | + | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
165 | + | then throw("_onlyThisContract: revert") | |
166 | + | else true | |
167 | + | ||
168 | + | ||
169 | + | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
170 | + | then throw("_whenMultisigSet: revert") | |
171 | + | else true | |
172 | + | ||
173 | + | ||
174 | + | func _whenNotInitialized () = if (_loadInit()) | |
175 | + | then throw("_whenNotInitialized: revert") | |
176 | + | else true | |
177 | + | ||
178 | + | ||
179 | + | func _whenInitialized () = if (!(_loadInit())) | |
180 | + | then throw("_whenInitialized: revert") | |
181 | + | else true | |
182 | + | ||
183 | + | ||
184 | + | func _whenNotPaused () = if (_loadPause()) | |
185 | + | then throw("_whenNotPaused: revert") | |
186 | + | else true | |
187 | + | ||
188 | + | ||
189 | + | func _whenPaused () = if (!(_loadPause())) | |
190 | + | then throw("_whenPaused: revert") | |
191 | + | else true | |
192 | + | ||
193 | + | ||
194 | + | func _onlyPauser (caller_) = if ((caller_ != _loadPauser())) | |
195 | + | then throw("_onlyPauser: revert") | |
196 | + | else true | |
197 | + | ||
198 | + | ||
199 | + | @Callable(i) | |
200 | + | func init (chainId_,pauser_,gatewayContract_,sWavesContract_) = { | |
201 | + | let err = if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
202 | + | then _whenNotInitialized() | |
203 | + | else false) | |
204 | + | then _whenMultisigSet() | |
205 | + | else false) | |
206 | + | then _validateInt(chainId_, 0, MAX_INT, "init: invalid chainId") | |
207 | + | else false) | |
208 | + | then _validateAddress(pauser_, "init: invalid pauser") | |
209 | + | else false) | |
210 | + | then _validateAddress(gatewayContract_, "init: invalid gatewayContract") | |
211 | + | else false) | |
212 | + | then _validateAddress(sWavesContract_, "init: invalid sWavesContract") | |
213 | + | else false | |
214 | + | if ((err == err)) | |
215 | + | then $Tuple2(((((_saveInit(true) ++ _saveChainId(chainId_)) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveGatewayContract(addressFromStringValue(gatewayContract_))) ++ _saveSWavesContract(addressFromStringValue(sWavesContract_))), unit) | |
216 | + | else throw("Strict value is not equal to itself.") | |
217 | + | } | |
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | @Callable(i) | |
222 | + | func deposit () = { | |
223 | + | let err = if (if (if (_whenInitialized()) | |
224 | + | then _whenNotPaused() | |
225 | + | else false) | |
226 | + | then _validatePaymentsSize(i.payments, 1, "deposit: no payment") | |
227 | + | else false) | |
228 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "deposit: negative payment") | |
229 | + | else false | |
230 | + | if ((err == err)) | |
231 | + | then { | |
232 | + | let caller = toString(i.caller) | |
233 | + | let asset = match i.payments[0].assetId { | |
234 | + | case a: ByteVector => | |
235 | + | toBase58String(a) | |
236 | + | case _: Unit => | |
237 | + | WAVES | |
238 | + | case _ => | |
239 | + | throw("Match error") | |
240 | + | } | |
241 | + | let assetDecimals = _getDecimals(asset) | |
242 | + | let amount = _normalizeDecimals(i.payments[0].amount, assetDecimals, DEX_DECIMALS) | |
243 | + | let err1 = _validateInt(amount, 1, MAX_INT, "deposit: invalid payment amount") | |
244 | + | if ((err1 == err1)) | |
245 | + | then { | |
246 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, caller, _loadChainId(), asset, amount], nil) | |
247 | + | if ((invocation == invocation)) | |
248 | + | then { | |
249 | + | let staking = if ((asset == WAVES)) | |
250 | + | then invoke(_loadSWavesContract(), FUNC_DEPOSIT, nil, [AttachedPayment(unit, i.payments[0].amount)]) | |
251 | + | else unit | |
252 | + | if ((staking == staking)) | |
253 | + | then $Tuple2(_saveReserves(asset, (_loadReserves(asset) + amount)), unit) | |
254 | + | else throw("Strict value is not equal to itself.") | |
255 | + | } | |
256 | + | else throw("Strict value is not equal to itself.") | |
257 | + | } | |
258 | + | else throw("Strict value is not equal to itself.") | |
259 | + | } | |
260 | + | else throw("Strict value is not equal to itself.") | |
261 | + | } | |
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | @Callable(i) | |
266 | + | func depositTo (to_) = { | |
267 | + | let err = if (if (if (if (_whenInitialized()) | |
268 | + | then _whenNotPaused() | |
269 | + | else false) | |
270 | + | then _validatePaymentsSize(i.payments, 1, "depositTo: no payment") | |
271 | + | else false) | |
272 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "depositTo: negative payment") | |
273 | + | else false) | |
274 | + | then _validateString(to_, "depositTo: invalid to") | |
275 | + | else false | |
276 | + | if ((err == err)) | |
277 | + | then { | |
278 | + | let caller = toString(i.caller) | |
279 | + | let asset = match i.payments[0].assetId { | |
280 | + | case a: ByteVector => | |
281 | + | toBase58String(a) | |
282 | + | case _: Unit => | |
283 | + | WAVES | |
284 | + | case _ => | |
285 | + | throw("Match error") | |
286 | + | } | |
287 | + | let assetDecimals = _getDecimals(asset) | |
288 | + | let amount = _normalizeDecimals(i.payments[0].amount, assetDecimals, DEX_DECIMALS) | |
289 | + | let err1 = _validateInt(amount, 1, MAX_INT, "depositTo: invalid payment amount") | |
290 | + | if ((err1 == err1)) | |
291 | + | then { | |
292 | + | let invocation = invoke(_loadGatewayContract(), FUNC_DEPOSIT, [toString(this), caller, to_, _loadChainId(), asset, amount], nil) | |
293 | + | if ((invocation == invocation)) | |
294 | + | then { | |
295 | + | let staking = if ((asset == WAVES)) | |
296 | + | then invoke(_loadSWavesContract(), FUNC_DEPOSIT, nil, [AttachedPayment(unit, i.payments[0].amount)]) | |
297 | + | else unit | |
298 | + | if ((staking == staking)) | |
299 | + | then $Tuple2(_saveReserves(asset, (_loadReserves(asset) + amount)), unit) | |
300 | + | else throw("Strict value is not equal to itself.") | |
301 | + | } | |
302 | + | else throw("Strict value is not equal to itself.") | |
303 | + | } | |
304 | + | else throw("Strict value is not equal to itself.") | |
305 | + | } | |
306 | + | else throw("Strict value is not equal to itself.") | |
307 | + | } | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(i) | |
312 | + | func withdraw () = $Tuple2(nil, unit) | |
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | @Callable(i) | |
317 | + | func requestWithdrawal () = $Tuple2(nil, unit) | |
318 | + | ||
319 | + | ||
320 | + | ||
321 | + | @Callable(i) | |
322 | + | func executeWithdrawal () = $Tuple2(nil, unit) | |
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | @Callable(i) | |
327 | + | func pause () = { | |
328 | + | let err = if (if (_onlyPauser(i.caller)) | |
329 | + | then _whenInitialized() | |
330 | + | else false) | |
331 | + | then _whenNotPaused() | |
332 | + | else false | |
333 | + | if ((err == err)) | |
334 | + | then $Tuple2(_savePause(true), unit) | |
335 | + | else throw("Strict value is not equal to itself.") | |
336 | + | } | |
337 | + | ||
338 | + | ||
339 | + | ||
340 | + | @Callable(i) | |
341 | + | func unpause () = { | |
342 | + | let err = if (if (_onlyPauser(i.caller)) | |
343 | + | then _whenInitialized() | |
344 | + | else false) | |
345 | + | then _whenPaused() | |
346 | + | else false | |
347 | + | if ((err == err)) | |
348 | + | then $Tuple2(_savePause(false), unit) | |
349 | + | else throw("Strict value is not equal to itself.") | |
350 | + | } | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func updatePauser (pauser_) = { | |
356 | + | let err = if (if (_onlyThisContract(i.caller)) | |
357 | + | then _whenInitialized() | |
358 | + | else false) | |
359 | + | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
360 | + | else false | |
361 | + | if ((err == err)) | |
362 | + | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) | |
363 | + | else throw("Strict value is not equal to itself.") | |
364 | + | } | |
365 | + | ||
366 | + | ||
367 | + | ||
368 | + | @Callable(i) | |
369 | + | func setMultisig (multisig_) = { | |
370 | + | let err = if (_onlyThisContract(i.caller)) | |
371 | + | then _validateAddress(multisig_, "setMultisig: invalid multisig") | |
372 | + | else false | |
373 | + | if ((err == err)) | |
374 | + | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
375 | + | else throw("Strict value is not equal to itself.") | |
376 | + | } | |
377 | + | ||
378 | + | ||
379 | + | @Verifier(tx) | |
380 | + | func verify () = match getString(KEY_MULTISIG) { | |
381 | + | case multisig: String => | |
382 | + | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false) | |
383 | + | case _ => | |
384 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
385 | + | } | |
386 | + |
github/deemru/w8io/169f3d6 30.08 ms ◑