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:AAIFAAAAAAAAAEIIAhIKCggICAgICAQBARIDCgEEEgUKAwQEBBIDCgEBEgMKAQQSAwoBARIECgIEARIECgIICBIAEgMKAQESBAoCCAgAAAAgAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAA2FhMQIAAAAGcG9vbF9fAAAAAAJzYQIAAAAPU1RBS0lOR19BTU9VTlRfAAAAAAJsYQIAAAANTEVBU0VfQU1PVU5UXwAAAAACaXgCAAAAA0lEXwAAAAAHcmF0ZUZlZQIAAAATcGVyY2VudGFnZV9yYXRlX2ZlZQAAAAAOZGVwb3NpdF9oZWlnaHQCAAAAEkRlcG9zaXRfSGVpZ2h0X09mXwAAAAACRDgAAAAAAAX14QAAAAAAAkQ2AAAAAAAAD0JAAAAAAA9jb250cmFjdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQgFAAAABHRoaXMAAAAFYnl0ZXMAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAABQEAAAARZ2V0QWRkcmVzc0lmVmFsaWQAAAABAAAAB2FkZHJlc3MJ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50QW1vdW50BQAAAAlyZWNlaXZlTHAEAAAADW5ld2Fzc2V0MXBvb2wJAABkAAAAAgUAAAAKYXNzZXQxcG9vbAgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BAAAAA1uZXdhc3NldDJwb29sCQAAZAAAAAIFAAAACmFzc2V0MnBvb2wICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABAAAABmFtb3VudAUAAAADbmlsBQAAAANuaWwJAAACAAAAAQIAAAARSW52YWxpZCBQb29sIEtleS4JAAACAAAAAQIAAAAZSW52YWxpZCBBc3NldDEgb3IgQXNzZXQyIQkAAAIAAAABAgAAACBBc3NldDEgY2Fubm90IGJlIGVxdWFsIHRvIEFzc2V0MgkAAAIAAAABAgAAAClsaXF1aWRpdHkgaXMgY3VycmVudGx5IHVuZGVyIG1haW50ZW5hbmNlLgkAAAIAAAABAgAAACRkQXBwIGlzIGN1cnJlbnRseSB1bmRlciBtYWludGVuYW5jZS4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmGaH6j", "height": 2102038, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DxBZe1CnTKFKE86xM3btgvdpcnnXkua1WySFoPZ3oASj Next: none Diff:
Old | New | Differences | |
---|---|---|---|
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(i) | |
77 | - | func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves, | |
77 | + | func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRateSwap,blockDistribution) = if ((i.caller == this)) | |
78 | 78 | then { | |
79 | 79 | let keyPoolUsdnUsdt = kp(UsdnAssetId, UsdtAssetId) | |
80 | 80 | let keyPoolUsdnUsdc = kp(UsdnAssetId, UsdcAssetId) | |
91 | 91 | let keyPoolNgnnWaves = kp(NgnnAssetId, "WAVES") | |
92 | 92 | let keyPoolNgnnMainAsset = kp(NgnnAssetId, MainAssetId) | |
93 | 93 | 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, | |
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)] | |
95 | 95 | } | |
96 | 96 | else throw("Only the Admin itself can invoke this function") | |
97 | 97 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(i) | |
115 | - | func | |
115 | + | func percentualRateFeeSwapEdit (rate) = if ((i.caller == this)) | |
116 | 116 | then [IntegerEntry(rateFee, rate)] | |
117 | 117 | else throw("Only the Admin itself can invoke this function") | |
118 | 118 | ||
147 | 147 | then { | |
148 | 148 | let assetLpCreate = Issue(((("LP_" + asset1) + "_") + asset2), ((("LP asset for pool liquidity in AxAi Swap pair " + asset1) + "_") + asset2), 1, 8, true) | |
149 | 149 | let idAssetLp = calculateAssetId(assetLpCreate) | |
150 | - | ||
150 | + | [StringEntry((l + kp(asset1, asset2)), toBase58String(idAssetLp))] | |
151 | 151 | } | |
152 | 152 | else throw("Invalid Pool Key. Try inverting the assets") | |
153 | 153 | else throw("Only the Admin itself can invoke this function") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let main = "main_asset" | |
5 | 5 | ||
6 | 6 | let l = "lp_asset_" | |
7 | 7 | ||
8 | 8 | let aa1 = "pool__" | |
9 | 9 | ||
10 | 10 | let sa = "STAKING_AMOUNT_" | |
11 | 11 | ||
12 | 12 | let la = "LEASE_AMOUNT_" | |
13 | 13 | ||
14 | 14 | let ix = "ID_" | |
15 | 15 | ||
16 | 16 | let rateFee = "percentage_rate_fee" | |
17 | 17 | ||
18 | 18 | let deposit_height = "Deposit_Height_Of_" | |
19 | 19 | ||
20 | 20 | let D8 = 100000000 | |
21 | 21 | ||
22 | 22 | let D6 = 1000000 | |
23 | 23 | ||
24 | 24 | let contractAddress = Address(this.bytes) | |
25 | 25 | ||
26 | 26 | let exchangeRate = 5 | |
27 | 27 | ||
28 | 28 | func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse " + address) + " as address"))) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getAssetIfValid (assetId) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(assetId))).id, (("Asset Id: " + assetId) + " is invalid."))) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let ac = "activate" | |
35 | 35 | ||
36 | 36 | let poolAc = "activate_pools" | |
37 | 37 | ||
38 | 38 | let swapAc = "activate_swap" | |
39 | 39 | ||
40 | 40 | let liquidityAc = "activate_liquidity" | |
41 | 41 | ||
42 | 42 | let bcD = "block_distribuition" | |
43 | 43 | ||
44 | 44 | let typeBcd = "type_block_distribution" | |
45 | 45 | ||
46 | 46 | let total_locked = "Total_Tokens_Locked_" | |
47 | 47 | ||
48 | 48 | let usdn = "usdn_asset" | |
49 | 49 | ||
50 | 50 | let usdt = "usdt_asset" | |
51 | 51 | ||
52 | 52 | let usdc = "usdc_asset" | |
53 | 53 | ||
54 | 54 | let ngnn = "ngnn_asset" | |
55 | 55 | ||
56 | 56 | let aWaves = "accept_waves" | |
57 | 57 | ||
58 | 58 | func kp (asset1,asset2) = (((aa1 + asset1) + "_") + asset2) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func validPoolK (key) = valueOrElse(getInteger(this, key), 0) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func kpAddress (address,key) = valueOrElse(getIntegerValue(this, ((key + "_") + address)), 0) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func poolAA (address,key,asset) = valueOrElse(getIntegerValue(this, ((((key + "_") + address) + "_") + asset)), 0) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func assetP (key,asset) = valueOrElse(getIntegerValue(this, ((key + "_") + asset)), 0) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func pkey (Asset1,Asset2,address) = (((deposit_height + kp(Asset1, Asset2)) + "_") + address) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(i) | |
77 | - | func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves, | |
77 | + | func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRateSwap,blockDistribution) = if ((i.caller == this)) | |
78 | 78 | then { | |
79 | 79 | let keyPoolUsdnUsdt = kp(UsdnAssetId, UsdtAssetId) | |
80 | 80 | let keyPoolUsdnUsdc = kp(UsdnAssetId, UsdcAssetId) | |
81 | 81 | let keyPoolUsdnNgnn = kp(UsdnAssetId, NgnnAssetId) | |
82 | 82 | let keyPoolUsdnWaves = kp(UsdnAssetId, "WAVES") | |
83 | 83 | let keyPoolUsdnMainAsset = kp(UsdnAssetId, MainAssetId) | |
84 | 84 | let keyPoolUsdcUsdt = kp(UsdcAssetId, UsdtAssetId) | |
85 | 85 | let keyPoolUsdcNgnn = kp(UsdcAssetId, NgnnAssetId) | |
86 | 86 | let keyPoolUsdcWaves = kp(UsdcAssetId, "WAVES") | |
87 | 87 | let keyPoolUsdcMainAsset = kp(UsdcAssetId, MainAssetId) | |
88 | 88 | let keyPoolUsdtNgnn = kp(UsdtAssetId, NgnnAssetId) | |
89 | 89 | let keyPoolUsdtWaves = kp(UsdtAssetId, "WAVES") | |
90 | 90 | let keyPoolUsdtMainAsset = kp(UsdtAssetId, MainAssetId) | |
91 | 91 | let keyPoolNgnnWaves = kp(NgnnAssetId, "WAVES") | |
92 | 92 | let keyPoolNgnnMainAsset = kp(NgnnAssetId, MainAssetId) | |
93 | 93 | 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, | |
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)] | |
95 | 95 | } | |
96 | 96 | else throw("Only the Admin itself can invoke this function") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | 101 | func activate (v) = if ((i.caller == this)) | |
102 | 102 | then [BooleanEntry(ac, v)] | |
103 | 103 | else throw("Only the Admin itself can invoke this function") | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | ||
107 | 107 | @Callable(i) | |
108 | 108 | func maintenance (pools,swap,stake) = if ((i.caller == this)) | |
109 | 109 | then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake)] | |
110 | 110 | else throw("Only the Admin itself can invoke this function") | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(i) | |
115 | - | func | |
115 | + | func percentualRateFeeSwapEdit (rate) = if ((i.caller == this)) | |
116 | 116 | then [IntegerEntry(rateFee, rate)] | |
117 | 117 | else throw("Only the Admin itself can invoke this function") | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(i) | |
122 | 122 | func acceptWaves (activate) = if ((i.caller == this)) | |
123 | 123 | then [BooleanEntry(aWaves, activate)] | |
124 | 124 | else throw("Only the Admin itself can invoke this function") | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(i) | |
129 | 129 | func blockDistribution (newValue) = if ((i.caller == this)) | |
130 | 130 | then [IntegerEntry(bcD, newValue)] | |
131 | 131 | else throw("Only the Admin itself can invoke this function") | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(i) | |
136 | 136 | func blockDistributionPools (mainAsset,newValue) = if ((i.caller == this)) | |
137 | 137 | then [BooleanEntry(typeBcd, mainAsset), IntegerEntry(bcD, newValue)] | |
138 | 138 | else throw("Only the Admin itself can invoke this function") | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(i) | |
143 | 143 | func lpAssetCreateForPairPool (asset1,asset2) = { | |
144 | 144 | let key = validPoolK(kp(asset1, asset2)) | |
145 | 145 | if ((i.caller == this)) | |
146 | 146 | then if (!((key == 0))) | |
147 | 147 | then { | |
148 | 148 | let assetLpCreate = Issue(((("LP_" + asset1) + "_") + asset2), ((("LP asset for pool liquidity in AxAi Swap pair " + asset1) + "_") + asset2), 1, 8, true) | |
149 | 149 | let idAssetLp = calculateAssetId(assetLpCreate) | |
150 | - | ||
150 | + | [StringEntry((l + kp(asset1, asset2)), toBase58String(idAssetLp))] | |
151 | 151 | } | |
152 | 152 | else throw("Invalid Pool Key. Try inverting the assets") | |
153 | 153 | else throw("Only the Admin itself can invoke this function") | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Callable(i) | |
159 | 159 | func deposit () = { | |
160 | 160 | let power = getBooleanValue(this, ac) | |
161 | 161 | let liquidityPower = getBooleanValue(this, liquidityAc) | |
162 | 162 | let acWaves = getBooleanValue(this, aWaves) | |
163 | 163 | let pmt = i.payments[0] | |
164 | 164 | let MainAsset = fromBase58String(getStringValue(this, main)) | |
165 | 165 | if (power) | |
166 | 166 | then if (!(liquidityPower)) | |
167 | 167 | then if ((pmt.assetId != MainAsset)) | |
168 | 168 | then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(MainAsset))) | |
169 | 169 | else { | |
170 | 170 | let currentKey = toBase58String(i.caller.bytes) | |
171 | 171 | let currentAmount = match getInteger(this, currentKey) { | |
172 | 172 | case a: Int => | |
173 | 173 | a | |
174 | 174 | case _ => | |
175 | 175 | 0 | |
176 | 176 | } | |
177 | 177 | let newAmount = (currentAmount + pmt.amount) | |
178 | 178 | let useramount = IntegerEntry(currentKey, newAmount) | |
179 | 179 | let userdepositheight = IntegerEntry((deposit_height + currentKey), height) | |
180 | 180 | let previouslockbalance = match getInteger(this, "Total_Tokens_Locked:") { | |
181 | 181 | case a: Int => | |
182 | 182 | a | |
183 | 183 | case _ => | |
184 | 184 | 0 | |
185 | 185 | } | |
186 | 186 | let totaltoken = (previouslockbalance + pmt.amount) | |
187 | 187 | let TLV = IntegerEntry("Total_Tokens_Locked:", totaltoken) | |
188 | 188 | [useramount, userdepositheight, TLV] | |
189 | 189 | } | |
190 | 190 | else throw("liquidity is currently under maintenance.") | |
191 | 191 | else throw("dApp is currently under maintenance.") | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(i) | |
197 | 197 | func remove (amount) = { | |
198 | 198 | let power = getBooleanValue(this, ac) | |
199 | 199 | let liquidityPower = getBooleanValue(this, liquidityAc) | |
200 | 200 | let acWaves = getBooleanValue(this, aWaves) | |
201 | 201 | let pmt = i.payments[0] | |
202 | 202 | let MainAsset = fromBase58String(getStringValue(this, main)) | |
203 | 203 | if (power) | |
204 | 204 | then if (!(liquidityPower)) | |
205 | 205 | then { | |
206 | 206 | let currentKey = toBase58String(i.caller.bytes) | |
207 | 207 | let currentAmount = valueOrElse(getInteger(this, currentKey), 0) | |
208 | 208 | let swapheightkeyname = (deposit_height + currentKey) | |
209 | 209 | let previouslockbalance = getIntegerValue(this, "Total_Tokens_Locked:") | |
210 | 210 | let totaltoken = (previouslockbalance - amount) | |
211 | 211 | let diff = (height - getIntegerValue(this, swapheightkeyname)) | |
212 | 212 | let bcd = getIntegerValue(this, bcD) | |
213 | 213 | let reward = ((diff * bcd) * D8) | |
214 | 214 | let feeCalc = (reward / (previouslockbalance / amount)) | |
215 | 215 | if ((0 > amount)) | |
216 | 216 | then throw("Can't withdraw negative AxAi amount") | |
217 | 217 | else { | |
218 | 218 | let newAmount = (currentAmount - amount) | |
219 | 219 | if ((0 > newAmount)) | |
220 | 220 | then throw("Not enough AxAi balance") | |
221 | 221 | else [IntegerEntry(currentKey, newAmount), IntegerEntry("Total_Tokens_Locked:", totaltoken), ScriptTransfer(i.caller, amount, MainAsset), ScriptTransfer(i.caller, feeCalc, MainAsset)] | |
222 | 222 | } | |
223 | 223 | } | |
224 | 224 | else throw("liquidity is currently under maintenance.") | |
225 | 225 | else throw("dApp is currently under maintenance.") | |
226 | 226 | } | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | ||
230 | 230 | @Callable(i) | |
231 | 231 | func addLiquidity (Asset1,Asset2) = { | |
232 | 232 | let power = getBooleanValue(this, ac) | |
233 | 233 | let poolActivate = getBooleanValue(this, poolAc) | |
234 | 234 | let acWaves = getBooleanValue(this, aWaves) | |
235 | 235 | let key = validPoolK(kp(Asset1, Asset2)) | |
236 | 236 | let asset1 = i.payments[0].assetId | |
237 | 237 | let asset2 = i.payments[1].assetId | |
238 | 238 | let USDN = toBytes(getStringValue(this, usdn)) | |
239 | 239 | let USDC = toBytes(getStringValue(this, usdc)) | |
240 | 240 | let USDT = toBytes(getStringValue(this, usdt)) | |
241 | 241 | let NGNN = toBytes(getStringValue(this, ngnn)) | |
242 | 242 | let MainAsset = fromBase58String(getStringValue(this, main)) | |
243 | 243 | if (power) | |
244 | 244 | then if (!(poolActivate)) | |
245 | 245 | then if (if (if (!((asset1 == asset2))) | |
246 | 246 | then (asset1 == fromBase58String(Asset1)) | |
247 | 247 | else false) | |
248 | 248 | then (asset2 == fromBase58String(Asset2)) | |
249 | 249 | else false) | |
250 | 250 | then if (if (if (if (if (if (if (if (if (if ((asset1 == USDN)) | |
251 | 251 | then true | |
252 | 252 | else (asset1 == USDC)) | |
253 | 253 | then true | |
254 | 254 | else (asset1 == USDT)) | |
255 | 255 | then true | |
256 | 256 | else (asset1 == NGNN)) | |
257 | 257 | then true | |
258 | 258 | else (asset1 == MainAsset)) | |
259 | 259 | then true | |
260 | 260 | else (asset2 == USDN)) | |
261 | 261 | then true | |
262 | 262 | else (asset2 == USDC)) | |
263 | 263 | then true | |
264 | 264 | else (asset2 == USDT)) | |
265 | 265 | then true | |
266 | 266 | else (asset2 == NGNN)) | |
267 | 267 | then true | |
268 | 268 | else (asset2 == MainAsset)) | |
269 | 269 | then if (!((key == 0))) | |
270 | 270 | then { | |
271 | 271 | let currentKey = toBase58String(i.caller.bytes) | |
272 | 272 | let currentAmount = kpAddress(currentKey, kp(Asset1, Asset2)) | |
273 | 273 | let currentAmountAsset1 = poolAA(currentKey, kp(Asset1, Asset2), Asset1) | |
274 | 274 | let currentAmountAsset2 = poolAA(currentKey, kp(Asset1, Asset2), Asset2) | |
275 | 275 | let asset1pool = assetP(kp(Asset1, Asset2), Asset1) | |
276 | 276 | let asset2pool = assetP(kp(Asset1, Asset2), Asset2) | |
277 | 277 | let pBlock = IntegerEntry(pkey(Asset1, Asset2, currentKey), height) | |
278 | 278 | if (if ((asset1pool == 0)) | |
279 | 279 | then true | |
280 | 280 | else (asset2pool == 0)) | |
281 | 281 | then { | |
282 | 282 | let newcurrentAmountAsset1 = (currentAmountAsset1 + i.payments[0].amount) | |
283 | 283 | let newcurrentAmountAsset2 = (currentAmountAsset2 + i.payments[1].amount) | |
284 | 284 | let receiveLp = (i.payments[0].amount / i.payments[1].amount) | |
285 | 285 | let newcurrentAmount = (currentAmount + receiveLp) | |
286 | 286 | let newasset1pool = (asset1pool + i.payments[0].amount) | |
287 | 287 | let newasset2pool = (asset2pool + i.payments[1].amount) | |
288 | 288 | nil | |
289 | 289 | } | |
290 | 290 | else nil | |
291 | 291 | } | |
292 | 292 | else throw("Invalid Pool Key.") | |
293 | 293 | else throw("Invalid Asset1 or Asset2!") | |
294 | 294 | else throw("Asset1 cannot be equal to Asset2") | |
295 | 295 | else throw("liquidity is currently under maintenance.") | |
296 | 296 | else throw("dApp is currently under maintenance.") | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Verifier(tx) | |
301 | 301 | func verify () = match tx { | |
302 | 302 | case _ => | |
303 | 303 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
304 | 304 | } | |
305 | 305 |
github/deemru/w8io/169f3d6 70.08 ms ◑