tx · 22iAgtg8xCHx5adVyxLGAv5tWQKJ682BjqeSoN2eYzLL

3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU:  -0.01400000 Waves

2024.03.22 15:25 [3029240] smart account 3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU > SELF 0.00000000 Waves

{ "type": 13, "id": "22iAgtg8xCHx5adVyxLGAv5tWQKJ682BjqeSoN2eYzLL", "fee": 1400000, "feeAssetId": null, "timestamp": 1711110362964, "version": 2, "chainId": 84, "sender": "3NCCbzmJYurqgXL9bh85G7gzASswGVjkfRU", "senderPublicKey": "7dYS4cBUtMS3qg16og5S9C9U6ygyVxgTqhJGoYcsuYzr", "proofs": [ "3YBR4ANHWXMAw5YpYibrh6sA5bM4udGAy5NBvyTnqCoEBNinTcqH3vbkTQmQddBPjALvyeoNH1shNSbg6M2dHxBb" ], "script": "base64:BwJPCAISBgoECAgICBIICgYICAgICAgSCQoHCAgBCAgBCBIICgYICAEICAgSCAoGCAgBCAgIEgUKAwEICBIFCgMBCAgSABIAEgMKAQgSAwoBCD4ACVNFUEFSQVRPUgICX18ADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAIS0VZX0lOSVQCBElOSVQACktFWV9QQVVTRUQCBlBBVVNFRAAKS0VZX1BBVVNFUgIGUEFVU0VSAAxLRVlfRVhFQ1VUT1ICCEVYRUNVVE9SABNLRVlfQ0FMTEVSX0NPTlRSQUNUAg9DQUxMRVJfQ09OVFJBQ1QAD0tFWV9XQVZFU19WQVVMVAILV0FWRVNfVkFVTFQAE0tFWV9BQ0NPVU5UX1NUT1JBR0UCD0FDQ09VTlRfU1RPUkFHRQAJS0VZX0NIQUlOAgVDSEFJTgASS0VZX0FTU0VUX0NVUlJFTkNZAg5BU1NFVF9DVVJSRU5DWQASS0VZX0FTU0VUX1JFU0VSVkVTAg5BU1NFVF9SRVNFUlZFUwAVS0VZX0NVUlJFTkNZX1JFU0VSVkVTAhFDVVJSRU5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cmluZwQIbXVsdGlzaWcFByRtYXRjaDAJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcJALkJAgkAzAgCBQpLRVlfU1RBVFVTCQDMCAIJAKUIAQUEdGhpcwkAzAgCCQDYBAEIBQJ0eAJpZAUDbmlsBQlTRVBBUkFUT1IHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5JVk0yw==", "height": 3029240, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CLk4CVvdQTVRU3ieWRkRFxpCDa1h1QrAJPCPCMGJaSTo Next: none Diff:
OldNewDifferences
2323
2424 let KEY_CHAIN = "CHAIN"
2525
26-let KEY_ASSET_TICKER = "ASSET_TICKER"
26+let KEY_ASSET_CURRENCY = "ASSET_CURRENCY"
2727
2828 let KEY_ASSET_RESERVES = "ASSET_RESERVES"
2929
30-let KEY_TICKER_RESERVES = "TICKER_RESERVES"
30+let KEY_CURRENCY_RESERVES = "CURRENCY_RESERVES"
3131
3232 let FUNC_DEPOSIT = "deposit"
3333
167167 func _saveChain (chainId_,name_) = [StringEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), name_)]
168168
169169
170-func _loadAssetTicker (chainId_,asset_) = match getString(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR)) {
170+func _loadAssetCurrency (chainId_,asset_) = match getString(makeString([KEY_ASSET_CURRENCY, toString(chainId_), asset_], SEPARATOR)) {
171171 case a: String =>
172172 a
173173 case _ =>
175175 }
176176
177177
178-func _saveAssetTicker (chainId_,asset_,ticker_) = [StringEntry(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR), ticker_)]
178+func _saveAssetCurrency (chainId_,asset_,currency_) = [StringEntry(makeString([KEY_ASSET_CURRENCY, toString(chainId_), asset_], SEPARATOR), currency_)]
179179
180180
181181 func _loadAssetReserves (chainId_,asset_) = match getString(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR)) {
189189 func _saveAssetReserves (chainId_,asset_,reserves_) = [StringEntry(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR), toString(reserves_))]
190190
191191
192-func _loadTickerReserves (ticker_) = match getString(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR)) {
192+func _loadCurrencyReserves (currency_) = match getString(makeString([KEY_CURRENCY_RESERVES, currency_], SEPARATOR)) {
193193 case a: String =>
194194 parseBigIntValue(a)
195195 case _ =>
197197 }
198198
199199
200-func _saveTickerReserves (ticker_,reserves_) = [StringEntry(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR), toString(reserves_))]
200+func _saveCurrencyReserves (currency_,reserves_) = [StringEntry(makeString([KEY_CURRENCY_RESERVES, currency_], SEPARATOR), toString(reserves_))]
201201
202202
203203 func _onlyThisContract (caller_) = if ((caller_ != this))
255255 else true
256256
257257
258-func _assetTickerExists (chainId_,asset_,err_) = if ((0 >= size(_loadAssetTicker(chainId_, asset_))))
258+func _assetCurrencyExists (chainId_,asset_,err_) = if ((0 >= size(_loadAssetCurrency(chainId_, asset_))))
259259 then throw(err_)
260260 else true
261261
262262
263-func _assetTickerNotExist (chainId_,asset_,err_) = if ((size(_loadAssetTicker(chainId_, asset_)) > 0))
263+func _assetCurrencyNotExist (chainId_,asset_,err_) = if ((size(_loadAssetCurrency(chainId_, asset_)) > 0))
264264 then throw(err_)
265265 else true
266266
305305 else false)
306306 then _validateString(to_, "deposit: invalid to")
307307 else false)
308- then _assetTickerExists(chainId, asset_, "deposit: invalid asset")
308+ then _assetCurrencyExists(chainId, asset_, "deposit: invalid asset")
309309 else false)
310310 then _validateBigInt(amount, ZERO_BIGINT, "deposit: invalid amount")
311311 else false
319319 if ((err1 == err1))
320320 then {
321321 let newAssetReserves = (_loadAssetReserves(chainId, asset_) + amount)
322- let ticker = _loadAssetTicker(chainId, asset_)
323- let newTickerReserves = (_loadTickerReserves(ticker) + amount)
324- let invocation = invoke(_loadAccountStorage(), FUNC_DEPOSIT, [to_, SPOT_WALLET, ticker, amount_], nil)
322+ let currency = _loadAssetCurrency(chainId, asset_)
323+ let newCurrencyReserves = (_loadCurrencyReserves(currency) + amount)
324+ let invocation = invoke(_loadAccountStorage(), FUNC_DEPOSIT, [to_, SPOT_WALLET, currency, amount_], nil)
325325 if ((invocation == invocation))
326- then $Tuple2((_saveAssetReserves(chainId, asset_, newAssetReserves) ++ _saveTickerReserves(ticker, newTickerReserves)), unit)
326+ then $Tuple2((_saveAssetReserves(chainId, asset_, newAssetReserves) ++ _saveCurrencyReserves(currency, newCurrencyReserves)), unit)
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 else throw("Strict value is not equal to itself.")
369369
370370
371371 @Callable(i)
372-func addAsset (chainId_,asset_,ticker_) = {
372+func addAsset (chainId_,asset_,currency_) = {
373373 let err = if (if (if (if (if (_onlyThisContract(i.caller))
374374 then _whenInitialized()
375375 else false)
377377 else false)
378378 then _validateString(asset_, "addAsset: invalid asset")
379379 else false)
380- then _validateString(ticker_, "addAsset: invalid ticker")
380+ then _validateString(currency_, "addAsset: invalid currency")
381381 else false)
382- then _assetTickerNotExist(chainId_, asset_, "addAsset: already exists")
382+ then _assetCurrencyNotExist(chainId_, asset_, "addAsset: already exists")
383383 else false
384384 if ((err == err))
385- then $Tuple2(_saveAssetTicker(chainId_, asset_, ticker_), unit)
385+ then $Tuple2(_saveAssetCurrency(chainId_, asset_, currency_), unit)
386386 else throw("Strict value is not equal to itself.")
387387 }
388388
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEPARATOR = "__"
55
66 let KEY_MULTISIG = "MULTISIG"
77
88 let KEY_STATUS = "STATUS"
99
1010 let KEY_INIT = "INIT"
1111
1212 let KEY_PAUSED = "PAUSED"
1313
1414 let KEY_PAUSER = "PAUSER"
1515
1616 let KEY_EXECUTOR = "EXECUTOR"
1717
1818 let KEY_CALLER_CONTRACT = "CALLER_CONTRACT"
1919
2020 let KEY_WAVES_VAULT = "WAVES_VAULT"
2121
2222 let KEY_ACCOUNT_STORAGE = "ACCOUNT_STORAGE"
2323
2424 let KEY_CHAIN = "CHAIN"
2525
26-let KEY_ASSET_TICKER = "ASSET_TICKER"
26+let KEY_ASSET_CURRENCY = "ASSET_CURRENCY"
2727
2828 let KEY_ASSET_RESERVES = "ASSET_RESERVES"
2929
30-let KEY_TICKER_RESERVES = "TICKER_RESERVES"
30+let KEY_CURRENCY_RESERVES = "CURRENCY_RESERVES"
3131
3232 let FUNC_DEPOSIT = "deposit"
3333
3434 let WAVES = "WAVES"
3535
3636 let SPOT_WALLET = "SPOT"
3737
3838 let MAX_INT = 9223372036854775807
3939
4040 let ZERO_BIGINT = toBigInt(0)
4141
4242 let ONE_BIGINT = toBigInt(1)
4343
4444 func _validateAddress (address_,err_) = match addressFromString(address_) {
4545 case a: Address =>
4646 true
4747 case _ =>
4848 throw(err_)
4949 }
5050
5151
5252 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
5353 then true
5454 else (val_ > upperBoundary_))
5555 then throw(err_)
5656 else true
5757
5858
5959 func _validateBigInt (val_,lowerBoundary_,err_) = if ((lowerBoundary_ > val_))
6060 then throw(err_)
6161 else true
6262
6363
6464 func _validateString (val_,err_) = if (if ((0 >= size(val_)))
6565 then true
6666 else contains(val_, SEPARATOR))
6767 then throw(err_)
6868 else true
6969
7070
7171 func _loadInit () = match getBoolean(KEY_INIT) {
7272 case a: Boolean =>
7373 a
7474 case _ =>
7575 false
7676 }
7777
7878
7979 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
8080
8181
8282 func _loadPause () = match getBoolean(KEY_PAUSED) {
8383 case a: Boolean =>
8484 a
8585 case _ =>
8686 false
8787 }
8888
8989
9090 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
9191
9292
9393 func _loadPauser () = match getString(KEY_PAUSER) {
9494 case a: String =>
9595 addressFromStringValue(a)
9696 case _ =>
9797 Address(base58'')
9898 }
9999
100100
101101 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
102102
103103
104104 func _loadMultisig () = match getString(KEY_MULTISIG) {
105105 case a: String =>
106106 addressFromStringValue(a)
107107 case _ =>
108108 Address(base58'')
109109 }
110110
111111
112112 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
113113
114114
115115 func _loadCallerContract (chainId_) = match getString(makeString([KEY_CALLER_CONTRACT, toString(chainId_)], SEPARATOR)) {
116116 case a: String =>
117117 a
118118 case _ =>
119119 ""
120120 }
121121
122122
123123 func _saveCallerContract (chainId_,callerContract_) = [StringEntry(makeString([KEY_CALLER_CONTRACT, toString(chainId_)], SEPARATOR), callerContract_)]
124124
125125
126126 func _loadExecutor () = match getString(KEY_EXECUTOR) {
127127 case a: String =>
128128 addressFromStringValue(a)
129129 case _ =>
130130 Address(base58'')
131131 }
132132
133133
134134 func _saveExecutor (executor_) = [StringEntry(KEY_EXECUTOR, toString(executor_))]
135135
136136
137137 func _loadAccountStorage () = match getString(KEY_ACCOUNT_STORAGE) {
138138 case a: String =>
139139 addressFromStringValue(a)
140140 case _ =>
141141 Address(base58'')
142142 }
143143
144144
145145 func _saveAccountStorage (accountStorage_) = [StringEntry(KEY_ACCOUNT_STORAGE, toString(accountStorage_))]
146146
147147
148148 func _loadWavesVault () = match getString(KEY_WAVES_VAULT) {
149149 case a: String =>
150150 addressFromStringValue(a)
151151 case _ =>
152152 Address(base58'')
153153 }
154154
155155
156156 func _saveWavesVault (wavesVault_) = [StringEntry(KEY_WAVES_VAULT, toString(wavesVault_))]
157157
158158
159159 func _loadChain (chainId_) = match getString(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR)) {
160160 case a: String =>
161161 a
162162 case _ =>
163163 ""
164164 }
165165
166166
167167 func _saveChain (chainId_,name_) = [StringEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), name_)]
168168
169169
170-func _loadAssetTicker (chainId_,asset_) = match getString(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR)) {
170+func _loadAssetCurrency (chainId_,asset_) = match getString(makeString([KEY_ASSET_CURRENCY, toString(chainId_), asset_], SEPARATOR)) {
171171 case a: String =>
172172 a
173173 case _ =>
174174 ""
175175 }
176176
177177
178-func _saveAssetTicker (chainId_,asset_,ticker_) = [StringEntry(makeString([KEY_ASSET_TICKER, toString(chainId_), asset_], SEPARATOR), ticker_)]
178+func _saveAssetCurrency (chainId_,asset_,currency_) = [StringEntry(makeString([KEY_ASSET_CURRENCY, toString(chainId_), asset_], SEPARATOR), currency_)]
179179
180180
181181 func _loadAssetReserves (chainId_,asset_) = match getString(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR)) {
182182 case a: String =>
183183 parseBigIntValue(a)
184184 case _ =>
185185 ZERO_BIGINT
186186 }
187187
188188
189189 func _saveAssetReserves (chainId_,asset_,reserves_) = [StringEntry(makeString([KEY_ASSET_RESERVES, toString(chainId_), asset_], SEPARATOR), toString(reserves_))]
190190
191191
192-func _loadTickerReserves (ticker_) = match getString(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR)) {
192+func _loadCurrencyReserves (currency_) = match getString(makeString([KEY_CURRENCY_RESERVES, currency_], SEPARATOR)) {
193193 case a: String =>
194194 parseBigIntValue(a)
195195 case _ =>
196196 ZERO_BIGINT
197197 }
198198
199199
200-func _saveTickerReserves (ticker_,reserves_) = [StringEntry(makeString([KEY_TICKER_RESERVES, ticker_], SEPARATOR), toString(reserves_))]
200+func _saveCurrencyReserves (currency_,reserves_) = [StringEntry(makeString([KEY_CURRENCY_RESERVES, currency_], SEPARATOR), toString(reserves_))]
201201
202202
203203 func _onlyThisContract (caller_) = if ((caller_ != this))
204204 then throw("_onlyThisContract: revert")
205205 else true
206206
207207
208208 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
209209 then throw("_whenMultisigSet: revert")
210210 else true
211211
212212
213213 func _whenNotInitialized () = if (_loadInit())
214214 then throw("_whenNotInitialized: revert")
215215 else true
216216
217217
218218 func _whenInitialized () = if (!(_loadInit()))
219219 then throw("_whenInitialized: revert")
220220 else true
221221
222222
223223 func _whenNotPaused () = if (_loadPause())
224224 then throw("_whenNotPaused: revert")
225225 else true
226226
227227
228228 func _whenPaused () = if (!(_loadPause()))
229229 then throw("_whenPaused: revert")
230230 else true
231231
232232
233233 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
234234 then throw("_onlyPauser: revert")
235235 else true
236236
237237
238238 func _validateExecutor (val_,err_) = if ((val_ != _loadExecutor()))
239239 then throw(err_)
240240 else true
241241
242242
243243 func _validateCallerContract (chainId_,callerContract_,err_) = if ((_loadCallerContract(chainId_) != callerContract_))
244244 then throw(err_)
245245 else true
246246
247247
248248 func _chainExists (chainId_,err_) = if ((0 >= size(_loadChain(chainId_))))
249249 then throw(err_)
250250 else true
251251
252252
253253 func _chainNotExist (chainId_,err_) = if ((size(_loadChain(chainId_)) > 0))
254254 then throw(err_)
255255 else true
256256
257257
258-func _assetTickerExists (chainId_,asset_,err_) = if ((0 >= size(_loadAssetTicker(chainId_, asset_))))
258+func _assetCurrencyExists (chainId_,asset_,err_) = if ((0 >= size(_loadAssetCurrency(chainId_, asset_))))
259259 then throw(err_)
260260 else true
261261
262262
263-func _assetTickerNotExist (chainId_,asset_,err_) = if ((size(_loadAssetTicker(chainId_, asset_)) > 0))
263+func _assetCurrencyNotExist (chainId_,asset_,err_) = if ((size(_loadAssetCurrency(chainId_, asset_)) > 0))
264264 then throw(err_)
265265 else true
266266
267267
268268 func _validateWavesVault (caller,err_) = if ((_loadWavesVault() != caller))
269269 then throw(err_)
270270 else true
271271
272272
273273 @Callable(i)
274274 func init (executor_,pauser_,accountStorage_,wavesVault_) = {
275275 let err = if (if (if (if (if (if (_onlyThisContract(i.caller))
276276 then _whenNotInitialized()
277277 else false)
278278 then _whenMultisigSet()
279279 else false)
280280 then _validateAddress(executor_, "init: invalid executor")
281281 else false)
282282 then _validateAddress(pauser_, "init: invalid pauser")
283283 else false)
284284 then _validateAddress(accountStorage_, "init: invalid accountStorage")
285285 else false)
286286 then _validateAddress(wavesVault_, "init: invalid wavesVault")
287287 else false
288288 if ((err == err))
289289 then $Tuple2(((((_saveInit(true) ++ _saveExecutor(addressFromStringValue(executor_))) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveAccountStorage(addressFromStringValue(accountStorage_))) ++ _saveWavesVault(addressFromStringValue(wavesVault_))), unit)
290290 else throw("Strict value is not equal to itself.")
291291 }
292292
293293
294294
295295 @Callable(i)
296296 func deposit (callerContract_,from_,to_,chainId_,asset_,amount_) = {
297297 let chainId = valueOrErrorMessage(parseInt(chainId_), "deposit: chainId not int")
298298 let amount = valueOrErrorMessage(parseBigInt(amount_), "deposit: amount not int")
299299 let err = if (if (if (if (if (if (_whenInitialized())
300300 then _whenNotPaused()
301301 else false)
302302 then _chainExists(chainId, "deposit: invalid chainId")
303303 else false)
304304 then _validateString(from_, "deposit: invalid from")
305305 else false)
306306 then _validateString(to_, "deposit: invalid to")
307307 else false)
308- then _assetTickerExists(chainId, asset_, "deposit: invalid asset")
308+ then _assetCurrencyExists(chainId, asset_, "deposit: invalid asset")
309309 else false)
310310 then _validateBigInt(amount, ZERO_BIGINT, "deposit: invalid amount")
311311 else false
312312 if ((err == err))
313313 then {
314314 let err1 = if ((_loadChain(chainId) == WAVES))
315315 then _validateWavesVault(i.caller, "deposit: invalid waves vault")
316316 else if (_validateExecutor(i.caller, "deposit: invalid executor"))
317317 then _validateCallerContract(chainId, callerContract_, "deposit: invalid caller contract")
318318 else false
319319 if ((err1 == err1))
320320 then {
321321 let newAssetReserves = (_loadAssetReserves(chainId, asset_) + amount)
322- let ticker = _loadAssetTicker(chainId, asset_)
323- let newTickerReserves = (_loadTickerReserves(ticker) + amount)
324- let invocation = invoke(_loadAccountStorage(), FUNC_DEPOSIT, [to_, SPOT_WALLET, ticker, amount_], nil)
322+ let currency = _loadAssetCurrency(chainId, asset_)
323+ let newCurrencyReserves = (_loadCurrencyReserves(currency) + amount)
324+ let invocation = invoke(_loadAccountStorage(), FUNC_DEPOSIT, [to_, SPOT_WALLET, currency, amount_], nil)
325325 if ((invocation == invocation))
326- then $Tuple2((_saveAssetReserves(chainId, asset_, newAssetReserves) ++ _saveTickerReserves(ticker, newTickerReserves)), unit)
326+ then $Tuple2((_saveAssetReserves(chainId, asset_, newAssetReserves) ++ _saveCurrencyReserves(currency, newCurrencyReserves)), unit)
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 else throw("Strict value is not equal to itself.")
330330 }
331331 else throw("Strict value is not equal to itself.")
332332 }
333333
334334
335335
336336 @Callable(i)
337337 func withdraw (from_,to_,chainId_,asset_,amount_,timestamp_,signature_) = $Tuple2(nil, unit)
338338
339339
340340
341341 @Callable(i)
342342 func requestWithdrawal (from_,to_,chainId_,asset_,amount_,signature_) = $Tuple2(nil, unit)
343343
344344
345345
346346 @Callable(i)
347347 func executeWithdrawal (from_,to_,chainId_,asset_,amount_,signature_) = $Tuple2(nil, unit)
348348
349349
350350
351351 @Callable(i)
352352 func addChain (chainId_,name_,callerContract_) = {
353353 let err = if (if (if (if (if (_onlyThisContract(i.caller))
354354 then _whenInitialized()
355355 else false)
356356 then _validateInt(chainId_, 0, MAX_INT, "addChain: invalid chainId")
357357 else false)
358358 then _validateString(name_, "addChain: invalid name")
359359 else false)
360360 then _validateString(callerContract_, "addChain: invalid callerContract")
361361 else false)
362362 then _chainNotExist(chainId_, "addChain: already exists")
363363 else false
364364 if ((err == err))
365365 then $Tuple2((_saveChain(chainId_, name_) ++ _saveCallerContract(chainId_, callerContract_)), unit)
366366 else throw("Strict value is not equal to itself.")
367367 }
368368
369369
370370
371371 @Callable(i)
372-func addAsset (chainId_,asset_,ticker_) = {
372+func addAsset (chainId_,asset_,currency_) = {
373373 let err = if (if (if (if (if (_onlyThisContract(i.caller))
374374 then _whenInitialized()
375375 else false)
376376 then _chainExists(chainId_, "addAsset: invalid chainId")
377377 else false)
378378 then _validateString(asset_, "addAsset: invalid asset")
379379 else false)
380- then _validateString(ticker_, "addAsset: invalid ticker")
380+ then _validateString(currency_, "addAsset: invalid currency")
381381 else false)
382- then _assetTickerNotExist(chainId_, asset_, "addAsset: already exists")
382+ then _assetCurrencyNotExist(chainId_, asset_, "addAsset: already exists")
383383 else false
384384 if ((err == err))
385- then $Tuple2(_saveAssetTicker(chainId_, asset_, ticker_), unit)
385+ then $Tuple2(_saveAssetCurrency(chainId_, asset_, currency_), unit)
386386 else throw("Strict value is not equal to itself.")
387387 }
388388
389389
390390
391391 @Callable(i)
392392 func pause () = {
393393 let err = if (if (_onlyPauser(i.caller))
394394 then _whenInitialized()
395395 else false)
396396 then _whenNotPaused()
397397 else false
398398 if ((err == err))
399399 then $Tuple2(_savePause(true), unit)
400400 else throw("Strict value is not equal to itself.")
401401 }
402402
403403
404404
405405 @Callable(i)
406406 func unpause () = {
407407 let err = if (if (_onlyPauser(i.caller))
408408 then _whenInitialized()
409409 else false)
410410 then _whenPaused()
411411 else false
412412 if ((err == err))
413413 then $Tuple2(_savePause(false), unit)
414414 else throw("Strict value is not equal to itself.")
415415 }
416416
417417
418418
419419 @Callable(i)
420420 func updatePauser (pauser_) = {
421421 let err = if (if (_onlyThisContract(i.caller))
422422 then _whenInitialized()
423423 else false)
424424 then _validateAddress(pauser_, "updatePauser: invalid pauser")
425425 else false
426426 if ((err == err))
427427 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
428428 else throw("Strict value is not equal to itself.")
429429 }
430430
431431
432432
433433 @Callable(i)
434434 func setMultisig (multisig_) = {
435435 let err = if (_onlyThisContract(i.caller))
436436 then _validateAddress(multisig_, "setMultisig: invalid multisig")
437437 else false
438438 if ((err == err))
439439 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
440440 else throw("Strict value is not equal to itself.")
441441 }
442442
443443
444444 @Verifier(tx)
445445 func verify () = match getString(KEY_MULTISIG) {
446446 case multisig: String =>
447447 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
448448 case _ =>
449449 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
450450 }
451451

github/deemru/w8io/169f3d6 
54.80 ms