tx · 4SFvSn5rMHhPmBSB7LV1FDdgEAxM3MVkhN4Pp8SjbJ4U

3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY:  -0.01700000 Waves

2022.06.18 19:14 [2102038] smart account 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY > SELF 0.00000000 Waves

{ "type": 13, "id": "4SFvSn5rMHhPmBSB7LV1FDdgEAxM3MVkhN4Pp8SjbJ4U", "fee": 1700000, "feeAssetId": null, "timestamp": 1655568799944, "version": 2, "chainId": 84, "sender": "3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY", "senderPublicKey": "fFTt4dRQEMWmxs9cA5He1tph3gmQLAM4cnpj6eqkWPR", "proofs": [ "2sF7mNWp1b2QNt5t3wv3ypdk4gd4EYUr13Xn7z4vnJ6DeWL7XRCrA3iAtCCvbbk2v1JR4BwVsgcGZPZbrkQBjpt9" ], "script": "base64:AAIFAAAAAAAAAEIIAhIKCggICAgICAQBARIDCgEEEgUKAwQEBBIDCgEBEgMKAQQSAwoBARIECgIEARIECgIICBIAEgMKAQESBAoCCAgAAAAgAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAA2FhMQIAAAAGcG9vbF9fAAAAAAJzYQIAAAAPU1RBS0lOR19BTU9VTlRfAAAAAAJsYQIAAAANTEVBU0VfQU1PVU5UXwAAAAACaXgCAAAAA0lEXwAAAAAHcmF0ZUZlZQIAAAATcGVyY2VudGFnZV9yYXRlX2ZlZQAAAAAOZGVwb3NpdF9oZWlnaHQCAAAAEkRlcG9zaXRfSGVpZ2h0X09mXwAAAAACRDgAAAAAAAX14QAAAAAAAkQ2AAAAAAAAD0JAAAAAAA9jb250cmFjdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQgFAAAABHRoaXMAAAAFYnl0ZXMAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAABQEAAAARZ2V0QWRkcmVzc0lmVmFsaWQAAAABAAAAB2FkZHJlc3M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W50QW1vdW50BQAAAAlyZWNlaXZlTHAEAAAADW5ld2Fzc2V0MXBvb2wJAABkAAAAAgUAAAAKYXNzZXQxcG9vbAgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BAAAAA1uZXdhc3NldDJwb29sCQAAZAAAAAIFAAAACmFzc2V0MnBvb2wICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABAAAABmFtb3VudAUAAAADbmlsBQAAAANuaWwJAAACAAAAAQIAAAARSW52YWxpZCBQb29sIEtleS4JAAACAAAAAQIAAAAZSW52YWxpZCBBc3NldDEgb3IgQXNzZXQyIQkAAAIAAAABAgAAACBBc3NldDEgY2Fubm90IGJlIGVxdWFsIHRvIEFzc2V0MgkAAAIAAAABAgAAAClsaXF1aWRpdHkgaXMgY3VycmVudGx5IHVuZGVyIG1haW50ZW5hbmNlLgkAAAIAAAABAgAAACRkQXBwIGlzIGN1cnJlbnRseSB1bmRlciBtYWludGVuYW5jZS4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmGaH6j", "height": 2102038, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DxBZe1CnTKFKE86xM3btgvdpcnnXkua1WySFoPZ3oASj Next: none Diff:
OldNewDifferences
7474
7575
7676 @Callable(i)
77-func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRate,blockDistribution) = if ((i.caller == this))
77+func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRateSwap,blockDistribution) = if ((i.caller == this))
7878 then {
7979 let keyPoolUsdnUsdt = kp(UsdnAssetId, UsdtAssetId)
8080 let keyPoolUsdnUsdc = kp(UsdnAssetId, UsdcAssetId)
9191 let keyPoolNgnnWaves = kp(NgnnAssetId, "WAVES")
9292 let keyPoolNgnnMainAsset = kp(NgnnAssetId, MainAssetId)
9393 let keyPoolMainWaves = kp(MainAssetId, "WAVES")
94-[StringEntry(main, MainAssetId), StringEntry(usdn, UsdnAssetId), StringEntry(usdc, UsdcAssetId), StringEntry(usdt, UsdtAssetId), StringEntry(ngnn, NgnnAssetId), BooleanEntry(aWaves, acceptWaves), IntegerEntry(rateFee, percentageRate), BooleanEntry(ac, true), BooleanEntry(swapAc, false), BooleanEntry(poolAc, false), BooleanEntry(liquidityAc, false), IntegerEntry(bcD, blockDistribution), IntegerEntry(keyPoolUsdnUsdt, 0), IntegerEntry(keyPoolUsdnWaves, 0), IntegerEntry(keyPoolUsdnUsdc, 0), IntegerEntry(keyPoolUsdnNgnn, 0), IntegerEntry(keyPoolUsdnMainAsset, 0), IntegerEntry(keyPoolUsdcUsdt, 0), IntegerEntry(keyPoolUsdcNgnn, 0), IntegerEntry(keyPoolUsdcWaves, 0), IntegerEntry(keyPoolUsdtMainAsset, 0), IntegerEntry(keyPoolUsdtNgnn, 0), IntegerEntry(keyPoolUsdtWaves, 0), IntegerEntry(keyPoolNgnnWaves, 0), IntegerEntry(keyPoolNgnnMainAsset, 0), IntegerEntry(keyPoolMainWaves, 0), BooleanEntry(typeBcd, false)]
94+[StringEntry(main, MainAssetId), StringEntry(usdn, UsdnAssetId), StringEntry(usdc, UsdcAssetId), StringEntry(usdt, UsdtAssetId), StringEntry(ngnn, NgnnAssetId), BooleanEntry(aWaves, acceptWaves), IntegerEntry(rateFee, percentageRateSwap), BooleanEntry(ac, true), BooleanEntry(swapAc, false), BooleanEntry(poolAc, false), BooleanEntry(liquidityAc, false), IntegerEntry(bcD, blockDistribution), IntegerEntry(keyPoolUsdnUsdt, 0), IntegerEntry(keyPoolUsdnWaves, 0), IntegerEntry(keyPoolUsdnUsdc, 0), IntegerEntry(keyPoolUsdnNgnn, 0), IntegerEntry(keyPoolUsdnMainAsset, 0), IntegerEntry(keyPoolUsdcUsdt, 0), IntegerEntry(keyPoolUsdcNgnn, 0), IntegerEntry(keyPoolUsdcWaves, 0), IntegerEntry(keyPoolUsdtMainAsset, 0), IntegerEntry(keyPoolUsdtNgnn, 0), IntegerEntry(keyPoolUsdtWaves, 0), IntegerEntry(keyPoolNgnnWaves, 0), IntegerEntry(keyPoolNgnnMainAsset, 0), IntegerEntry(keyPoolMainWaves, 0), BooleanEntry(typeBcd, false)]
9595 }
9696 else throw("Only the Admin itself can invoke this function")
9797
112112
113113
114114 @Callable(i)
115-func percentualRateFeeEdit (rate) = if ((i.caller == this))
115+func percentualRateFeeSwapEdit (rate) = if ((i.caller == this))
116116 then [IntegerEntry(rateFee, rate)]
117117 else throw("Only the Admin itself can invoke this function")
118118
147147 then {
148148 let assetLpCreate = Issue(((("LP_" + asset1) + "_") + asset2), ((("LP asset for pool liquidity in AxAi Swap pair " + asset1) + "_") + asset2), 1, 8, true)
149149 let idAssetLp = calculateAssetId(assetLpCreate)
150- nil
150+[StringEntry((l + kp(asset1, asset2)), toBase58String(idAssetLp))]
151151 }
152152 else throw("Invalid Pool Key. Try inverting the assets")
153153 else throw("Only the Admin itself can invoke this function")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let main = "main_asset"
55
66 let l = "lp_asset_"
77
88 let aa1 = "pool__"
99
1010 let sa = "STAKING_AMOUNT_"
1111
1212 let la = "LEASE_AMOUNT_"
1313
1414 let ix = "ID_"
1515
1616 let rateFee = "percentage_rate_fee"
1717
1818 let deposit_height = "Deposit_Height_Of_"
1919
2020 let D8 = 100000000
2121
2222 let D6 = 1000000
2323
2424 let contractAddress = Address(this.bytes)
2525
2626 let exchangeRate = 5
2727
2828 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse " + address) + " as address")))
2929
3030
3131 func getAssetIfValid (assetId) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(assetId))).id, (("Asset Id: " + assetId) + " is invalid.")))
3232
3333
3434 let ac = "activate"
3535
3636 let poolAc = "activate_pools"
3737
3838 let swapAc = "activate_swap"
3939
4040 let liquidityAc = "activate_liquidity"
4141
4242 let bcD = "block_distribuition"
4343
4444 let typeBcd = "type_block_distribution"
4545
4646 let total_locked = "Total_Tokens_Locked_"
4747
4848 let usdn = "usdn_asset"
4949
5050 let usdt = "usdt_asset"
5151
5252 let usdc = "usdc_asset"
5353
5454 let ngnn = "ngnn_asset"
5555
5656 let aWaves = "accept_waves"
5757
5858 func kp (asset1,asset2) = (((aa1 + asset1) + "_") + asset2)
5959
6060
6161 func validPoolK (key) = valueOrElse(getInteger(this, key), 0)
6262
6363
6464 func kpAddress (address,key) = valueOrElse(getIntegerValue(this, ((key + "_") + address)), 0)
6565
6666
6767 func poolAA (address,key,asset) = valueOrElse(getIntegerValue(this, ((((key + "_") + address) + "_") + asset)), 0)
6868
6969
7070 func assetP (key,asset) = valueOrElse(getIntegerValue(this, ((key + "_") + asset)), 0)
7171
7272
7373 func pkey (Asset1,Asset2,address) = (((deposit_height + kp(Asset1, Asset2)) + "_") + address)
7474
7575
7676 @Callable(i)
77-func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRate,blockDistribution) = if ((i.caller == this))
77+func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRateSwap,blockDistribution) = if ((i.caller == this))
7878 then {
7979 let keyPoolUsdnUsdt = kp(UsdnAssetId, UsdtAssetId)
8080 let keyPoolUsdnUsdc = kp(UsdnAssetId, UsdcAssetId)
8181 let keyPoolUsdnNgnn = kp(UsdnAssetId, NgnnAssetId)
8282 let keyPoolUsdnWaves = kp(UsdnAssetId, "WAVES")
8383 let keyPoolUsdnMainAsset = kp(UsdnAssetId, MainAssetId)
8484 let keyPoolUsdcUsdt = kp(UsdcAssetId, UsdtAssetId)
8585 let keyPoolUsdcNgnn = kp(UsdcAssetId, NgnnAssetId)
8686 let keyPoolUsdcWaves = kp(UsdcAssetId, "WAVES")
8787 let keyPoolUsdcMainAsset = kp(UsdcAssetId, MainAssetId)
8888 let keyPoolUsdtNgnn = kp(UsdtAssetId, NgnnAssetId)
8989 let keyPoolUsdtWaves = kp(UsdtAssetId, "WAVES")
9090 let keyPoolUsdtMainAsset = kp(UsdtAssetId, MainAssetId)
9191 let keyPoolNgnnWaves = kp(NgnnAssetId, "WAVES")
9292 let keyPoolNgnnMainAsset = kp(NgnnAssetId, MainAssetId)
9393 let keyPoolMainWaves = kp(MainAssetId, "WAVES")
94-[StringEntry(main, MainAssetId), StringEntry(usdn, UsdnAssetId), StringEntry(usdc, UsdcAssetId), StringEntry(usdt, UsdtAssetId), StringEntry(ngnn, NgnnAssetId), BooleanEntry(aWaves, acceptWaves), IntegerEntry(rateFee, percentageRate), BooleanEntry(ac, true), BooleanEntry(swapAc, false), BooleanEntry(poolAc, false), BooleanEntry(liquidityAc, false), IntegerEntry(bcD, blockDistribution), IntegerEntry(keyPoolUsdnUsdt, 0), IntegerEntry(keyPoolUsdnWaves, 0), IntegerEntry(keyPoolUsdnUsdc, 0), IntegerEntry(keyPoolUsdnNgnn, 0), IntegerEntry(keyPoolUsdnMainAsset, 0), IntegerEntry(keyPoolUsdcUsdt, 0), IntegerEntry(keyPoolUsdcNgnn, 0), IntegerEntry(keyPoolUsdcWaves, 0), IntegerEntry(keyPoolUsdtMainAsset, 0), IntegerEntry(keyPoolUsdtNgnn, 0), IntegerEntry(keyPoolUsdtWaves, 0), IntegerEntry(keyPoolNgnnWaves, 0), IntegerEntry(keyPoolNgnnMainAsset, 0), IntegerEntry(keyPoolMainWaves, 0), BooleanEntry(typeBcd, false)]
94+[StringEntry(main, MainAssetId), StringEntry(usdn, UsdnAssetId), StringEntry(usdc, UsdcAssetId), StringEntry(usdt, UsdtAssetId), StringEntry(ngnn, NgnnAssetId), BooleanEntry(aWaves, acceptWaves), IntegerEntry(rateFee, percentageRateSwap), BooleanEntry(ac, true), BooleanEntry(swapAc, false), BooleanEntry(poolAc, false), BooleanEntry(liquidityAc, false), IntegerEntry(bcD, blockDistribution), IntegerEntry(keyPoolUsdnUsdt, 0), IntegerEntry(keyPoolUsdnWaves, 0), IntegerEntry(keyPoolUsdnUsdc, 0), IntegerEntry(keyPoolUsdnNgnn, 0), IntegerEntry(keyPoolUsdnMainAsset, 0), IntegerEntry(keyPoolUsdcUsdt, 0), IntegerEntry(keyPoolUsdcNgnn, 0), IntegerEntry(keyPoolUsdcWaves, 0), IntegerEntry(keyPoolUsdtMainAsset, 0), IntegerEntry(keyPoolUsdtNgnn, 0), IntegerEntry(keyPoolUsdtWaves, 0), IntegerEntry(keyPoolNgnnWaves, 0), IntegerEntry(keyPoolNgnnMainAsset, 0), IntegerEntry(keyPoolMainWaves, 0), BooleanEntry(typeBcd, false)]
9595 }
9696 else throw("Only the Admin itself can invoke this function")
9797
9898
9999
100100 @Callable(i)
101101 func activate (v) = if ((i.caller == this))
102102 then [BooleanEntry(ac, v)]
103103 else throw("Only the Admin itself can invoke this function")
104104
105105
106106
107107 @Callable(i)
108108 func maintenance (pools,swap,stake) = if ((i.caller == this))
109109 then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake)]
110110 else throw("Only the Admin itself can invoke this function")
111111
112112
113113
114114 @Callable(i)
115-func percentualRateFeeEdit (rate) = if ((i.caller == this))
115+func percentualRateFeeSwapEdit (rate) = if ((i.caller == this))
116116 then [IntegerEntry(rateFee, rate)]
117117 else throw("Only the Admin itself can invoke this function")
118118
119119
120120
121121 @Callable(i)
122122 func acceptWaves (activate) = if ((i.caller == this))
123123 then [BooleanEntry(aWaves, activate)]
124124 else throw("Only the Admin itself can invoke this function")
125125
126126
127127
128128 @Callable(i)
129129 func blockDistribution (newValue) = if ((i.caller == this))
130130 then [IntegerEntry(bcD, newValue)]
131131 else throw("Only the Admin itself can invoke this function")
132132
133133
134134
135135 @Callable(i)
136136 func blockDistributionPools (mainAsset,newValue) = if ((i.caller == this))
137137 then [BooleanEntry(typeBcd, mainAsset), IntegerEntry(bcD, newValue)]
138138 else throw("Only the Admin itself can invoke this function")
139139
140140
141141
142142 @Callable(i)
143143 func lpAssetCreateForPairPool (asset1,asset2) = {
144144 let key = validPoolK(kp(asset1, asset2))
145145 if ((i.caller == this))
146146 then if (!((key == 0)))
147147 then {
148148 let assetLpCreate = Issue(((("LP_" + asset1) + "_") + asset2), ((("LP asset for pool liquidity in AxAi Swap pair " + asset1) + "_") + asset2), 1, 8, true)
149149 let idAssetLp = calculateAssetId(assetLpCreate)
150- nil
150+[StringEntry((l + kp(asset1, asset2)), toBase58String(idAssetLp))]
151151 }
152152 else throw("Invalid Pool Key. Try inverting the assets")
153153 else throw("Only the Admin itself can invoke this function")
154154 }
155155
156156
157157
158158 @Callable(i)
159159 func deposit () = {
160160 let power = getBooleanValue(this, ac)
161161 let liquidityPower = getBooleanValue(this, liquidityAc)
162162 let acWaves = getBooleanValue(this, aWaves)
163163 let pmt = i.payments[0]
164164 let MainAsset = fromBase58String(getStringValue(this, main))
165165 if (power)
166166 then if (!(liquidityPower))
167167 then if ((pmt.assetId != MainAsset))
168168 then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(MainAsset)))
169169 else {
170170 let currentKey = toBase58String(i.caller.bytes)
171171 let currentAmount = match getInteger(this, currentKey) {
172172 case a: Int =>
173173 a
174174 case _ =>
175175 0
176176 }
177177 let newAmount = (currentAmount + pmt.amount)
178178 let useramount = IntegerEntry(currentKey, newAmount)
179179 let userdepositheight = IntegerEntry((deposit_height + currentKey), height)
180180 let previouslockbalance = match getInteger(this, "Total_Tokens_Locked:") {
181181 case a: Int =>
182182 a
183183 case _ =>
184184 0
185185 }
186186 let totaltoken = (previouslockbalance + pmt.amount)
187187 let TLV = IntegerEntry("Total_Tokens_Locked:", totaltoken)
188188 [useramount, userdepositheight, TLV]
189189 }
190190 else throw("liquidity is currently under maintenance.")
191191 else throw("dApp is currently under maintenance.")
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func remove (amount) = {
198198 let power = getBooleanValue(this, ac)
199199 let liquidityPower = getBooleanValue(this, liquidityAc)
200200 let acWaves = getBooleanValue(this, aWaves)
201201 let pmt = i.payments[0]
202202 let MainAsset = fromBase58String(getStringValue(this, main))
203203 if (power)
204204 then if (!(liquidityPower))
205205 then {
206206 let currentKey = toBase58String(i.caller.bytes)
207207 let currentAmount = valueOrElse(getInteger(this, currentKey), 0)
208208 let swapheightkeyname = (deposit_height + currentKey)
209209 let previouslockbalance = getIntegerValue(this, "Total_Tokens_Locked:")
210210 let totaltoken = (previouslockbalance - amount)
211211 let diff = (height - getIntegerValue(this, swapheightkeyname))
212212 let bcd = getIntegerValue(this, bcD)
213213 let reward = ((diff * bcd) * D8)
214214 let feeCalc = (reward / (previouslockbalance / amount))
215215 if ((0 > amount))
216216 then throw("Can't withdraw negative AxAi amount")
217217 else {
218218 let newAmount = (currentAmount - amount)
219219 if ((0 > newAmount))
220220 then throw("Not enough AxAi balance")
221221 else [IntegerEntry(currentKey, newAmount), IntegerEntry("Total_Tokens_Locked:", totaltoken), ScriptTransfer(i.caller, amount, MainAsset), ScriptTransfer(i.caller, feeCalc, MainAsset)]
222222 }
223223 }
224224 else throw("liquidity is currently under maintenance.")
225225 else throw("dApp is currently under maintenance.")
226226 }
227227
228228
229229
230230 @Callable(i)
231231 func addLiquidity (Asset1,Asset2) = {
232232 let power = getBooleanValue(this, ac)
233233 let poolActivate = getBooleanValue(this, poolAc)
234234 let acWaves = getBooleanValue(this, aWaves)
235235 let key = validPoolK(kp(Asset1, Asset2))
236236 let asset1 = i.payments[0].assetId
237237 let asset2 = i.payments[1].assetId
238238 let USDN = toBytes(getStringValue(this, usdn))
239239 let USDC = toBytes(getStringValue(this, usdc))
240240 let USDT = toBytes(getStringValue(this, usdt))
241241 let NGNN = toBytes(getStringValue(this, ngnn))
242242 let MainAsset = fromBase58String(getStringValue(this, main))
243243 if (power)
244244 then if (!(poolActivate))
245245 then if (if (if (!((asset1 == asset2)))
246246 then (asset1 == fromBase58String(Asset1))
247247 else false)
248248 then (asset2 == fromBase58String(Asset2))
249249 else false)
250250 then if (if (if (if (if (if (if (if (if (if ((asset1 == USDN))
251251 then true
252252 else (asset1 == USDC))
253253 then true
254254 else (asset1 == USDT))
255255 then true
256256 else (asset1 == NGNN))
257257 then true
258258 else (asset1 == MainAsset))
259259 then true
260260 else (asset2 == USDN))
261261 then true
262262 else (asset2 == USDC))
263263 then true
264264 else (asset2 == USDT))
265265 then true
266266 else (asset2 == NGNN))
267267 then true
268268 else (asset2 == MainAsset))
269269 then if (!((key == 0)))
270270 then {
271271 let currentKey = toBase58String(i.caller.bytes)
272272 let currentAmount = kpAddress(currentKey, kp(Asset1, Asset2))
273273 let currentAmountAsset1 = poolAA(currentKey, kp(Asset1, Asset2), Asset1)
274274 let currentAmountAsset2 = poolAA(currentKey, kp(Asset1, Asset2), Asset2)
275275 let asset1pool = assetP(kp(Asset1, Asset2), Asset1)
276276 let asset2pool = assetP(kp(Asset1, Asset2), Asset2)
277277 let pBlock = IntegerEntry(pkey(Asset1, Asset2, currentKey), height)
278278 if (if ((asset1pool == 0))
279279 then true
280280 else (asset2pool == 0))
281281 then {
282282 let newcurrentAmountAsset1 = (currentAmountAsset1 + i.payments[0].amount)
283283 let newcurrentAmountAsset2 = (currentAmountAsset2 + i.payments[1].amount)
284284 let receiveLp = (i.payments[0].amount / i.payments[1].amount)
285285 let newcurrentAmount = (currentAmount + receiveLp)
286286 let newasset1pool = (asset1pool + i.payments[0].amount)
287287 let newasset2pool = (asset2pool + i.payments[1].amount)
288288 nil
289289 }
290290 else nil
291291 }
292292 else throw("Invalid Pool Key.")
293293 else throw("Invalid Asset1 or Asset2!")
294294 else throw("Asset1 cannot be equal to Asset2")
295295 else throw("liquidity is currently under maintenance.")
296296 else throw("dApp is currently under maintenance.")
297297 }
298298
299299
300300 @Verifier(tx)
301301 func verify () = match tx {
302302 case _ =>
303303 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
304304 }
305305

github/deemru/w8io/169f3d6 
70.08 ms