tx · EkmnDMW7YNFu146auHdnCg627annJ8gVjiBk9kdQm5GR

3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed:  -0.01400000 Waves

2023.03.09 19:14 [2482785] smart account 3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed > SELF 0.00000000 Waves

{ "type": 13, "id": "EkmnDMW7YNFu146auHdnCg627annJ8gVjiBk9kdQm5GR", "fee": 1400000, "feeAssetId": null, "timestamp": 1678378447675, "version": 2, "chainId": 84, "sender": "3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed", "senderPublicKey": "9DpEgmia9fGpxtGGDeSMtER4g9qB7WQPPYTKTHzqSFuX", "proofs": [ "2fMKAgVL7aaHmPNbVyGXYCkkuRySUaNX6RaG7jYhhK9ipoKxcBQxxJTy5HX5n6BfTGDMEo9863Wzr5ja58cEAWmZ" ], "script": "base64:BgJMCAISBgoECAgICBIJCgcICAgICAgIEgUKAwEIARIDCgEIEgMKAQgSBAoCAQQSAwoBCBILCgkBCAgBAQEBAQQSABIAEgMKAQgSAwoBCDsACVNFUEFSQVRPUgICX18ACEtFWV9JTklUAgRJTklUAAxLRVlfTVVMVElTSUcCCE1VTFRJU0lHAApLRVlfU1RBVFVTAgZTVEFUVVMACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAAxLRVlfRVhFQ1VUT1ICCEVYRUNVVE9SABBLRVlfUk9PVF9BREFQVEVSAgxST09UX0FEQVBURVIAE0tFWV9DQUxMRVJfQ09OVFJBQ1QCD0NBTExFUl9DT05UUkFDVAAJS0VZX0NIQUlOAgVDSEFJTgALS0VZX0JJTkRJTkcCB0JJTkRJTkcAB0tFWV9GRUUCA0ZFRQARS0VZX0ZFRV9SRUNJUElFTlQCDUZFRV9SRUNJUElFTlQAE0ZVTkNfUkVMRUFTRV9UT0tFTlMCDXJlbGVhc2VUb2tlbnMABVdBVkVTAgVXQVZFUwAOV0FWRVNfREVDSU1BTFM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2V0TXVsdGlzaWcBCW11bHRpc2lnXwQDZXJyAwkBEV9vbmx5VGhpc0NvbnRyYWN0AQgFAWkGY2FsbGVyCQEQX3ZhbGlkYXRlQWRkcmVzcwIFCW11bHRpc2lnXwIdc2V0TXVsdGlzaWc6IGludmFsaWQgbXVsdGlzaWcHAwkAAAIFA2VycgUDZXJyCQCUCgIJAQ1fc2F2ZU11bHRpc2lnAQkBEUBleHRyTmF0aXZlKDEwNjIpAQUJbXVsdGlzaWdfBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQHJG1hdGNoMAkAoggBBQxLRVlfTVVMVElTSUcDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAhtdWx0aXNpZwUHJG1hdGNoMAkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQhtdWx0aXNpZwkAuQkCCQDMCAIFCktFWV9TVEFUVVMJAMwIAgkApQgBBQR0aGlzCQDMCAIJANgEAQgFAnR4AmlkBQNuaWwFCVNFUEFSQVRPUgcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmYoTl9", "height": 2482785, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: AYFnp5rYW8kJxTU3XfHTS36TQmnTRmvNWWLoDDyZfUDy Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEPARATOR = "__"
5+
6+let KEY_INIT = "INIT"
7+
8+let KEY_MULTISIG = "MULTISIG"
9+
10+let KEY_STATUS = "STATUS"
11+
12+let KEY_PAUSED = "PAUSED"
13+
14+let KEY_PAUSER = "PAUSER"
15+
16+let KEY_EXECUTOR = "EXECUTOR"
17+
18+let KEY_ROOT_ADAPTER = "ROOT_ADAPTER"
19+
20+let KEY_CALLER_CONTRACT = "CALLER_CONTRACT"
21+
22+let KEY_CHAIN = "CHAIN"
23+
24+let KEY_BINDING = "BINDING"
25+
26+let KEY_FEE = "FEE"
27+
28+let KEY_FEE_RECIPIENT = "FEE_RECIPIENT"
29+
30+let FUNC_RELEASE_TOKENS = "releaseTokens"
31+
32+let WAVES = "WAVES"
33+
34+let WAVES_DECIMALS = 8
35+
36+let DECIMALS = 6
37+
38+let PERCENT_FACTOR = 1000000
39+
40+let MAX_INT = 9223372036854775807
41+
42+func _validateAddress (address_,err_) = match addressFromString(address_) {
43+ case a: Address =>
44+ true
45+ case _ =>
46+ throw(err_)
47+}
48+
49+
50+func _validateAsset (assetId_,err_) = match assetInfo(fromBase58String(assetId_)) {
51+ case a: Asset =>
52+ true
53+ case _ =>
54+ throw(err_)
55+}
56+
57+
58+func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
59+ then true
60+ else (val_ > upperBoundary_))
61+ then throw(err_)
62+ else true
63+
64+
65+func _validateBool (val_,target_,err_) = if ((val_ != target_))
66+ then throw(err_)
67+ else true
68+
69+
70+func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_))
71+ then throw(err_)
72+ else true
73+
74+
75+func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_) = if ((sourceDecimals_ >= targetDecimals_))
76+ then (amount_ / pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN))
77+ else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN))
78+
79+
80+func _loadInit () = match getBoolean(KEY_INIT) {
81+ case a: Boolean =>
82+ a
83+ case _ =>
84+ false
85+}
86+
87+
88+func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
89+
90+
91+func _loadPause () = match getBoolean(KEY_PAUSED) {
92+ case a: Boolean =>
93+ a
94+ case _ =>
95+ false
96+}
97+
98+
99+func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
100+
101+
102+func _loadPauser () = match getString(KEY_PAUSER) {
103+ case a: String =>
104+ addressFromStringValue(a)
105+ case _ =>
106+ Address(base58'')
107+}
108+
109+
110+func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
111+
112+
113+func _loadMultisig () = match getString(KEY_MULTISIG) {
114+ case a: String =>
115+ addressFromStringValue(a)
116+ case _ =>
117+ Address(base58'')
118+}
119+
120+
121+func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
122+
123+
124+func _loadExecutor () = match getString(KEY_EXECUTOR) {
125+ case a: String =>
126+ addressFromStringValue(a)
127+ case _ =>
128+ Address(base58'')
129+}
130+
131+
132+func _saveExecutor (executor_) = [StringEntry(KEY_EXECUTOR, toString(executor_))]
133+
134+
135+func _loadCallerContract () = match getString(KEY_CALLER_CONTRACT) {
136+ case a: String =>
137+ a
138+ case _ =>
139+ ""
140+}
141+
142+
143+func _saveCallerContract (caller_) = [StringEntry(KEY_CALLER_CONTRACT, caller_)]
144+
145+
146+func _loadChain (chainId_) = match getBoolean(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR)) {
147+ case a: Boolean =>
148+ a
149+ case _ =>
150+ false
151+}
152+
153+
154+func _saveChain (chainId_,val_) = [BooleanEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), val_)]
155+
156+
157+func _loadBinding (executionChainId_,assetId_) = match getString(makeString([KEY_BINDING, toString(executionChainId_), toBase58String(assetId_)], SEPARATOR)) {
158+ case a: String =>
159+ let struct = split(a, SEPARATOR)
160+ $Tuple8(addressFromStringValue(struct[0]), struct[1], parseIntValue(struct[2]), parseIntValue(struct[3]), parseIntValue(struct[4]), parseIntValue(struct[5]), parseIntValue(struct[6]), if ((struct[7] == "1"))
161+ then true
162+ else false)
163+ case _ =>
164+ $Tuple8(Address(base58''), "", 0, 0, 0, 0, 0, false)
165+}
166+
167+
168+func _saveBinding (executionChainId_,assetId_,binding_) = [StringEntry(makeString([KEY_BINDING, toString(executionChainId_), toBase58String(assetId_)], SEPARATOR), makeString([toString(binding_._1), binding_._2, toString(binding_._3), toString(binding_._4), toString(binding_._5), toString(binding_._6), toString(binding_._7), if (binding_._8)
169+ then "1"
170+ else "0"], SEPARATOR))]
171+
172+
173+func _loadFee (assetId_) = match getInteger(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR)) {
174+ case a: Int =>
175+ a
176+ case _ =>
177+ 0
178+}
179+
180+
181+func _saveFee (assetId_,val_) = [IntegerEntry(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR), val_)]
182+
183+
184+func _loadRootAdapter () = match getString(KEY_ROOT_ADAPTER) {
185+ case a: String =>
186+ addressFromStringValue(a)
187+ case _ =>
188+ Address(base58'')
189+}
190+
191+
192+func _saveRootAdapter (adapter_) = [StringEntry(KEY_ROOT_ADAPTER, toString(adapter_))]
193+
194+
195+func _loadFeeRecipient () = match getString(KEY_FEE_RECIPIENT) {
196+ case a: String =>
197+ addressFromStringValue(a)
198+ case _ =>
199+ Address(base58'')
200+}
201+
202+
203+func _saveFeeRecipient (val_) = [StringEntry(KEY_FEE_RECIPIENT, toString(val_))]
204+
205+
206+func _onlyThisContract (caller_) = if ((caller_ != this))
207+ then throw("_onlyThisContract: revert")
208+ else true
209+
210+
211+func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
212+ then throw("_whenMultisigSet: revert")
213+ else true
214+
215+
216+func _whenNotInitialized () = if (_loadInit())
217+ then throw("_whenNotInitialized: revert")
218+ else true
219+
220+
221+func _whenInitialized () = if (!(_loadInit()))
222+ then throw("_whenInitialized: revert")
223+ else true
224+
225+
226+func _whenNotPaused () = if (_loadPause())
227+ then throw("_whenNotPaused: revert")
228+ else true
229+
230+
231+func _whenPaused () = if (!(_loadPause()))
232+ then throw("_whenPaused: revert")
233+ else true
234+
235+
236+func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
237+ then throw("_onlyPauser: revert")
238+ else true
239+
240+
241+func _asInt (val_) = match val_ {
242+ case a: Int =>
243+ a
244+ case _ =>
245+ throw("_asInt: revert")
246+}
247+
248+
249+func _asBytes (val_) = match val_ {
250+ case a: ByteVector =>
251+ a
252+ case _ =>
253+ throw("_asBytes: revert")
254+}
255+
256+
257+func _validateExecutor (val_,err_) = if ((val_ != _loadExecutor()))
258+ then throw(err_)
259+ else true
260+
261+
262+func _validateCaller (val_,err_) = if ((val_ != _loadCallerContract()))
263+ then throw(err_)
264+ else true
265+
266+
267+func _validateChain (executionChainId_,err_) = if (!(_loadChain(executionChainId_)))
268+ then throw(err_)
269+ else true
270+
271+
272+@Callable(i)
273+func init (executor_,adapter_,pauser_,feeRecipient_) = {
274+ let err = if (if (if (if (if (if (_onlyThisContract(i.caller))
275+ then _whenNotInitialized()
276+ else false)
277+ then _whenMultisigSet()
278+ else false)
279+ then _validateAddress(executor_, "init: invalid executor")
280+ else false)
281+ then _validateAddress(adapter_, "init: invalid adapter")
282+ else false)
283+ then _validateAddress(pauser_, "init: invalid pauser")
284+ else false)
285+ then _validateAddress(feeRecipient_, "init: invalid feeRecipient")
286+ else false
287+ if ((err == err))
288+ then $Tuple2(((((_saveInit(true) ++ _saveExecutor(addressFromStringValue(executor_))) ++ _saveRootAdapter(addressFromStringValue(adapter_))) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveFeeRecipient(addressFromStringValue(feeRecipient_))), unit)
289+ else throw("Strict value is not equal to itself.")
290+ }
291+
292+
293+
294+@Callable(i)
295+func mintTokens (callerContract_,assetContract_,amount_,recipient_,gaslessReward_,referrer_,referrerFee_) = {
296+ let amount = valueOrErrorMessage(parseInt(amount_), "mint: amount is not Int")
297+ let gaslessReward = valueOrErrorMessage(parseInt(gaslessReward_), "mint: gaslessReward is not Int")
298+ let referrerFee = valueOrErrorMessage(parseInt(referrerFee_), "mint: referrerFee is not Int")
299+ let err = if (if (if (if (if (if (if (if (_whenInitialized())
300+ then _whenNotPaused()
301+ else false)
302+ then _validateAddress(assetContract_, "mint: invalid asset contract")
303+ else false)
304+ then _validateExecutor(i.caller, "mint: invalid executor")
305+ else false)
306+ then _validateCaller(callerContract_, "mint: invalid caller")
307+ else false)
308+ then _validateAddress(recipient_, "mint: invalid recipient address")
309+ else false)
310+ then _validateInt(amount, 0, MAX_INT, "mint: invalid amount")
311+ else false)
312+ then _validateInt(gaslessReward, 0, MAX_INT, "mint: invalid gaslessReward")
313+ else false)
314+ then _validateInt(referrerFee, 0, MAX_INT, "mint: invalid referrer fee")
315+ else false
316+ if ((err == err))
317+ then {
318+ let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
319+ if ((assetId == assetId))
320+ then {
321+ let assetDecimals = _asInt(invoke(addressFromStringValue(assetContract_), "getDecimals", nil, nil))
322+ if ((assetDecimals == assetDecimals))
323+ then {
324+ let normalizedAmount = _normalizeDecimals(amount, DECIMALS, assetDecimals)
325+ let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, assetDecimals)
326+ let referrer = match addressFromString(referrer_) {
327+ case refererAddress: Address =>
328+ let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, assetDecimals)
329+ $Tuple2(normalizedReferrerFee, [ScriptTransfer(refererAddress, normalizedReferrerFee, assetId)])
330+ case _ =>
331+ $Tuple2(0, nil)
332+ }
333+ let normalizedReferrerFee = referrer._1
334+ let referrerActions = referrer._2
335+ let invocation = invoke(addressFromStringValue(assetContract_), "mint", [(normalizedAmount + normalizedReferrerFee), toString(this)], nil)
336+ if ((invocation == invocation))
337+ then {
338+ let actions = if (if ((normalizedGasless > 0))
339+ then (addressFromStringValue(recipient_) != i.originCaller)
340+ else false)
341+ then [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGasless), assetId), ScriptTransfer(i.originCaller, normalizedGasless, assetId)]
342+ else [ScriptTransfer(addressFromStringValue(recipient_), normalizedAmount, assetId)]
343+ $Tuple2((actions ++ referrerActions), unit)
344+ }
345+ else throw("Strict value is not equal to itself.")
346+ }
347+ else throw("Strict value is not equal to itself.")
348+ }
349+ else throw("Strict value is not equal to itself.")
350+ }
351+ else throw("Strict value is not equal to itself.")
352+ }
353+
354+
355+
356+@Callable(i)
357+func burnTokens (executionChainId_,recipient_,gaslessReward_) = {
358+ let err = if (if (if (if (_whenInitialized())
359+ then _whenNotPaused()
360+ else false)
361+ then _validateChain(executionChainId_, "burn: invalid execution chain")
362+ else false)
363+ then _validatePaymentsSize(i.payments, 1, "burn: no payment")
364+ else false)
365+ then _validateInt(i.payments[0].amount, 0, MAX_INT, "burn: invalid payment amount")
366+ else false
367+ if ((err == err))
368+ then {
369+ let amount = i.payments[0].amount
370+ let assetId = match i.payments[0].assetId {
371+ case a: ByteVector =>
372+ a
373+ case _ =>
374+ throw("burn: invalid asset")
375+ }
376+ let binding = _loadBinding(executionChainId_, assetId)
377+ let assetContract = binding._1
378+ let executionAsset = binding._2
379+ let minAmount = binding._3
380+ let minFee = binding._4
381+ let thresholdFee = binding._5
382+ let beforePercentFee = binding._6
383+ let afterPercentFee = binding._7
384+ let enabled = binding._8
385+ let err1 = if (if (_validateAddress(toString(assetContract), "burn: no such binding"))
386+ then _validateInt(amount, minAmount, MAX_INT, "burn: less than min")
387+ else false)
388+ then _validateBool(enabled, true, "burn: token is disabled")
389+ else false
390+ if ((err1 == err1))
391+ then {
392+ let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil))
393+ if ((assetDecimals == assetDecimals))
394+ then {
395+ let percent = if ((amount > thresholdFee))
396+ then afterPercentFee
397+ else beforePercentFee
398+ let fee = (minFee + ((amount * percent) / PERCENT_FACTOR))
399+ let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burn: fee more than amount")
400+ if ((err2 == err2))
401+ then {
402+ let amountToSend = (amount - fee)
403+ let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burn: reward more than amount")
404+ if ((err3 == err3))
405+ then {
406+ let updateFee = (_loadFee(assetId) + fee)
407+ let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS)
408+ let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS)
409+ let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil)
410+ if ((invocation == invocation))
411+ then $Tuple2((_saveFee(assetId, updateFee) ++ [Burn(assetId, amountToSend)]), unit)
412+ else throw("Strict value is not equal to itself.")
413+ }
414+ else throw("Strict value is not equal to itself.")
415+ }
416+ else throw("Strict value is not equal to itself.")
417+ }
418+ else throw("Strict value is not equal to itself.")
419+ }
420+ else throw("Strict value is not equal to itself.")
421+ }
422+ else throw("Strict value is not equal to itself.")
423+ }
424+
425+
426+
427+@Callable(i)
428+func transferFee (assetContract_) = {
429+ let err = if (if (_whenInitialized())
430+ then _whenNotPaused()
431+ else false)
432+ then _validateAddress(assetContract_, "burnFee: invalid asset contract")
433+ else false
434+ if ((err == err))
435+ then {
436+ let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
437+ if ((assetId == assetId))
438+ then $Tuple2((_saveFee(assetId, 0) ++ [ScriptTransfer(_loadFeeRecipient(), _loadFee(assetId), assetId)]), unit)
439+ else throw("Strict value is not equal to itself.")
440+ }
441+ else throw("Strict value is not equal to itself.")
442+ }
443+
444+
445+
446+@Callable(i)
447+func updateCallerContract (callerContract_) = {
448+ let err = if (_onlyThisContract(i.caller))
449+ then _whenInitialized()
450+ else false
451+ if ((err == err))
452+ then $Tuple2(_saveCallerContract(callerContract_), unit)
453+ else throw("Strict value is not equal to itself.")
454+ }
455+
456+
457+
458+@Callable(i)
459+func updateExecutionChain (executionChainId_,enabled_) = {
460+ let err = if (if (_onlyThisContract(i.caller))
461+ then _whenInitialized()
462+ else false)
463+ then _validateInt(executionChainId_, 0, MAX_INT, "updateExecutionChain: invalid executionChainId")
464+ else false
465+ if ((err == err))
466+ then $Tuple2(_saveChain(executionChainId_, enabled_), unit)
467+ else throw("Strict value is not equal to itself.")
468+ }
469+
470+
471+
472+@Callable(i)
473+func updateFeeRecipient (feeRecipient_) = {
474+ let err = if (if (_onlyThisContract(i.caller))
475+ then _whenInitialized()
476+ else false)
477+ then _validateAddress(feeRecipient_, "updateFeeRecipient: invalid feeRecipient")
478+ else false
479+ if ((err == err))
480+ then $Tuple2(_saveFeeRecipient(addressFromStringValue(feeRecipient_)), unit)
481+ else throw("Strict value is not equal to itself.")
482+ }
483+
484+
485+
486+@Callable(i)
487+func updateBindingInfo (executionChainId_,assetContract_,executionAsset_,minAmount_,minFee_,thresholdFee_,beforePercentFee_,afterPercentFee_,enabled_) = {
488+ let err = if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
489+ then _whenInitialized()
490+ else false)
491+ then _validateAddress(assetContract_, "updateBindingInfo: invalid asset contract")
492+ else false)
493+ then _validateInt(executionChainId_, 0, MAX_INT, "updateBindingInfo: invalid executionChainId")
494+ else false)
495+ then _validateInt(minAmount_, 0, MAX_INT, "updateBindingInfo: invalid minAmount")
496+ else false)
497+ then _validateInt(minFee_, 0, MAX_INT, "updateBindingInfo: invalid minFee")
498+ else false)
499+ then _validateInt(thresholdFee_, 0, MAX_INT, "updateBindingInfo: invalid thresholdFee")
500+ else false)
501+ then _validateInt(beforePercentFee_, 0, MAX_INT, "updateBindingInfo: invalid beforePercentFee")
502+ else false)
503+ then _validateInt(afterPercentFee_, 0, MAX_INT, "updateBindingInfo: invalid afterPercentFee")
504+ else false
505+ if ((err == err))
506+ then {
507+ let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
508+ if ((assetId == assetId))
509+ then {
510+ let binding = $Tuple8(addressFromStringValue(assetContract_), executionAsset_, minAmount_, minFee_, thresholdFee_, beforePercentFee_, afterPercentFee_, enabled_)
511+ $Tuple2(_saveBinding(executionChainId_, assetId, binding), unit)
512+ }
513+ else throw("Strict value is not equal to itself.")
514+ }
515+ else throw("Strict value is not equal to itself.")
516+ }
517+
518+
519+
520+@Callable(i)
521+func pause () = {
522+ let err = if (if (_onlyPauser(i.caller))
523+ then _whenInitialized()
524+ else false)
525+ then _whenNotPaused()
526+ else false
527+ if ((err == err))
528+ then $Tuple2(_savePause(true), unit)
529+ else throw("Strict value is not equal to itself.")
530+ }
531+
532+
533+
534+@Callable(i)
535+func unpause () = {
536+ let err = if (if (_onlyPauser(i.caller))
537+ then _whenInitialized()
538+ else false)
539+ then _whenPaused()
540+ else false
541+ if ((err == err))
542+ then $Tuple2(_savePause(false), unit)
543+ else throw("Strict value is not equal to itself.")
544+ }
545+
546+
547+
548+@Callable(i)
549+func updatePauser (pauser_) = {
550+ let err = if (if (_onlyThisContract(i.caller))
551+ then _whenInitialized()
552+ else false)
553+ then _validateAddress(pauser_, "init: invalid pauser")
554+ else false
555+ if ((err == err))
556+ then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
557+ else throw("Strict value is not equal to itself.")
558+ }
559+
560+
561+
562+@Callable(i)
563+func setMultisig (multisig_) = {
564+ let err = if (_onlyThisContract(i.caller))
565+ then _validateAddress(multisig_, "setMultisig: invalid multisig")
566+ else false
567+ if ((err == err))
568+ then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
569+ else throw("Strict value is not equal to itself.")
570+ }
571+
572+
573+@Verifier(tx)
574+func verify () = match getString(KEY_MULTISIG) {
575+ case multisig: String =>
576+ valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
577+ case _ =>
578+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
579+}
580+

github/deemru/w8io/026f985 
48.45 ms