tx · 2fJgQi3tSRUvkKCu86am6U7Vc3DWauzroPQJ4EB9PtLH

3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY:  -0.01000000 Waves

2022.06.15 04:42 [2096846] smart account 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY > SELF 0.00000000 Waves

{ "type": 13, "id": "2fJgQi3tSRUvkKCu86am6U7Vc3DWauzroPQJ4EB9PtLH", "fee": 1000000, "feeAssetId": null, "timestamp": 1655257306491, "version": 2, "chainId": 84, "sender": "3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY", "senderPublicKey": "fFTt4dRQEMWmxs9cA5He1tph3gmQLAM4cnpj6eqkWPR", "proofs": [ "3LhDVJHjZA764PisisjUjMhp8D2xhWmHad7JsykSCc5zyyYzrATYH5jrv3LCKzbCF78sQpEFX9htmTXkehR4Kg1H" ], "script": "base64:AAIFAAAAAAAAACoIAhIJCgcICAgICAQBEgMKAQQSBQoDBAQEEgMKAQESAwoBBBIAEgMKAQEAAAAeAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAAAnNhAgAAAA9TVEFLSU5HX0FNT1VOVF8AAAAAAmxhAgAAAA1MRUFTRV9BTU9VTlRfAAAAAAJpeAIAAAADSURfAAAAAAdyYXRlRmVlAgAAABNwZXJjZW50YWdlX3JhdGVfZmVlAAAAAAJEOAAAAAAABfXhAAAAAAACRDYAAAAAAAAPQkAAAAAAD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AACmN1cnJlbnRLZXkFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAUVG90YWxfVG9rZW5zX0xvY2tlZDoFAAAACnRvdGFsdG9rZW4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAABmFtb3VudAUAAAACRDgFAAAACU1haW5Bc3NldAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABpAAAAAgkAAGgAAAACCQAAaAAAAAIFAAAABGRpZmYFAAAABmFtb3VudAAAAAAAAAAABAAAAAAAAAAFoAUAAAAJTWFpbkFzc2V0BQAAAANuaWwJAAACAAAAAQIAAAApbGlxdWlkaXR5IGlzIGN1cnJlbnRseSB1bmRlciBtYWludGVuYW5jZS4JAAACAAAAAQIAAAAkZEFwcCBpcyBjdXJyZW50bHkgdW5kZXIgbWFpbnRlbmFuY2UuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5dGgssQ==", "height": 2096846, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GZKWsj8YqZEwYJSfY9vkrAmf8P5tbX3PxocP6FL8hXaj Next: 4LtLbaFqQ7uvFuT9KsAdwTk5cpnK7xNbpayAFFayde22 Diff:
OldNewDifferences
106106 let pmt = i.payments[0]
107107 let MainAsset = toBytes(getStringValue(this, main))
108108 if (power)
109- then if (liquidityPower)
109+ then if (!(liquidityPower))
110110 then if ((pmt.assetId != MainAsset))
111111 then throw("Invalid Asset! Kindly Deposit Only A4tvKLB66QMmSJPXJgiajNnrtSjvqAapxTqhLzJbBNFX (AxAi).")
112112 else {
139139 let pmt = i.payments[0]
140140 let MainAsset = toBytes(getStringValue(this, main))
141141 if (power)
142- then if (liquidityPower)
142+ then if (!(liquidityPower))
143143 then if ((pmt.assetId != MainAsset))
144144 then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(MainAsset)))
145145 else {
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 a1 = "swap_asset1_"
99
1010 let st = "address_staker_"
1111
1212 let sst = "address_pool_"
1313
1414 let swp = "address_swap_"
1515
1616 let a2 = "swap_asset2_"
1717
1818 let aa1 = "pool_1_"
1919
2020 let aa2 = "pool_2_"
2121
2222 let st1 = "staker_address"
2323
2424 let type = "type_"
2525
2626 let sa = "STAKING_AMOUNT_"
2727
2828 let la = "LEASE_AMOUNT_"
2929
3030 let ix = "ID_"
3131
3232 let rateFee = "percentage_rate_fee"
3333
3434 let D8 = 100000000
3535
3636 let D6 = 1000000
3737
3838 let contractAddress = Address(this.bytes)
3939
4040 let exchangeRate = 5
4141
4242 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse " + address) + " as address")))
4343
4444
4545 func getAssetIfValid (assetId) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(assetId))).id, (("Asset Id: " + assetId) + " is invalid.")))
4646
4747
4848 let ac = "activate"
4949
5050 let poolAc = "activate_pools"
5151
5252 let swapAc = "activate_swap"
5353
5454 let liquidityAc = "activate_liquidity"
5555
5656 let usdn = "usdn_asset"
5757
5858 let usdt = "usdt_asset"
5959
6060 let usdc = "usdc_asset"
6161
6262 let ngnn = "ngnn_asset"
6363
6464 let aWaves = "accept_waves"
6565
6666 @Callable(i)
6767 func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRate) = if ((i.caller == this))
6868 then [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)]
6969 else throw("Only the Admin itself can invoke this function")
7070
7171
7272
7373 @Callable(i)
7474 func activate (v) = if ((i.caller == this))
7575 then [BooleanEntry(ac, v)]
7676 else throw("Only the Admin itself can invoke this function")
7777
7878
7979
8080 @Callable(i)
8181 func maintenance (pools,swap,stake) = if ((i.caller == this))
8282 then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake)]
8383 else throw("Only the Admin itself can invoke this function")
8484
8585
8686
8787 @Callable(i)
8888 func percentualRateFeeEdit (rate) = if ((i.caller == this))
8989 then [IntegerEntry(rateFee, rate)]
9090 else throw("Only the Admin itself can invoke this function")
9191
9292
9393
9494 @Callable(i)
9595 func acceptWaves (activate) = if ((i.caller == this))
9696 then [BooleanEntry(aWaves, activate)]
9797 else throw("Only the Admin itself can invoke this function")
9898
9999
100100
101101 @Callable(i)
102102 func deposit () = {
103103 let power = getBooleanValue(this, ac)
104104 let liquidityPower = getBooleanValue(this, liquidityAc)
105105 let acWaves = getBooleanValue(this, aWaves)
106106 let pmt = i.payments[0]
107107 let MainAsset = toBytes(getStringValue(this, main))
108108 if (power)
109- then if (liquidityPower)
109+ then if (!(liquidityPower))
110110 then if ((pmt.assetId != MainAsset))
111111 then throw("Invalid Asset! Kindly Deposit Only A4tvKLB66QMmSJPXJgiajNnrtSjvqAapxTqhLzJbBNFX (AxAi).")
112112 else {
113113 let currentKey = toBase58String(i.caller.bytes)
114114 let currentAmount = match getInteger(this, currentKey) {
115115 case a: Int =>
116116 a
117117 case _ =>
118118 0
119119 }
120120 let newAmount = (currentAmount + pmt.amount)
121121 let useramount = IntegerEntry(currentKey, newAmount)
122122 let userdepositheight = IntegerEntry(("Deposit_Height_Of_" + currentKey), height)
123123 let previouslockbalance = getIntegerValue(this, "Total_Tokens_Locked:")
124124 let totaltoken = (previouslockbalance + pmt.amount)
125125 let TLV = IntegerEntry("Total_Tokens_Locked:", totaltoken)
126126 [useramount, userdepositheight, TLV]
127127 }
128128 else throw("liquidity is currently under maintenance.")
129129 else throw("dApp is currently under maintenance.")
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func remove (amount) = {
136136 let power = getBooleanValue(this, ac)
137137 let liquidityPower = getBooleanValue(this, liquidityAc)
138138 let acWaves = getBooleanValue(this, aWaves)
139139 let pmt = i.payments[0]
140140 let MainAsset = toBytes(getStringValue(this, main))
141141 if (power)
142- then if (liquidityPower)
142+ then if (!(liquidityPower))
143143 then if ((pmt.assetId != MainAsset))
144144 then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(MainAsset)))
145145 else {
146146 let currentKey = toBase58String(i.caller.bytes)
147147 let currentAmount = match getInteger(this, currentKey) {
148148 case a: Int =>
149149 a
150150 case _ =>
151151 0
152152 }
153153 let newAmount = (currentAmount - (amount * D8))
154154 let swapheightkeyname = ("Deposit_Height_Of_" + currentKey)
155155 let previouslockbalance = getIntegerValue(this, "Total_Tokens_Locked:")
156156 let totaltoken = (previouslockbalance - (amount * D8))
157157 let diff = (height - getIntegerValue(this, swapheightkeyname))
158158 if ((0 > amount))
159159 then throw("Can't withdraw negative AxAi amount")
160160 else if ((0 > newAmount))
161161 then throw("Not enough AxAi balance")
162162 else [IntegerEntry(currentKey, newAmount), IntegerEntry("Total_Tokens_Locked:", totaltoken), ScriptTransfer(i.caller, (amount * D8), MainAsset), ScriptTransfer(i.caller, (((diff * amount) * 4) / 1440), MainAsset)]
163163 }
164164 else throw("liquidity is currently under maintenance.")
165165 else throw("dApp is currently under maintenance.")
166166 }
167167
168168
169169 @Verifier(tx)
170170 func verify () = match tx {
171171 case _ =>
172172 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
173173 }
174174

github/deemru/w8io/169f3d6 
57.47 ms