tx · 41exwtqWT7YAmEyhUFR2wK39mmxoZ1dgWHEAe1U4Bwe5

3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY:  -0.01000000 Waves

2022.06.16 01:40 [2098100] smart account 3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY > SELF 0.00000000 Waves

{ "type": 13, "id": "41exwtqWT7YAmEyhUFR2wK39mmxoZ1dgWHEAe1U4Bwe5", "fee": 1000000, "feeAssetId": null, "timestamp": 1655332862900, "version": 2, "chainId": 84, "sender": "3N6LXAerq2VVAPds14fKmB72f1Whmem7pxY", "senderPublicKey": "fFTt4dRQEMWmxs9cA5He1tph3gmQLAM4cnpj6eqkWPR", "proofs": [ "5EdHnNrQgqcf8TTTVovFSeGqb3mo5DMfaMaZ4tvBZvkf5FA6vccxUpcNoFA64XQ41o1tXzVGx8VcaLMZqSkK7ZFq" ], "script": "base64:AAIFAAAAAAAAADAIAhIKCggICAgICAQBARIDCgEEEgUKAwQEBBIDCgEBEgMKAQQSAwoBBBIAEgMKAQEAAAAfAAAAAARtYWluAgAAAAptYWluX2Fzc2V0AAAAAAFsAgAAAAlscF9hc3NldF8AAAAAAmExAgAAAAxzd2FwX2Fzc2V0MV8AAAAAAnN0AgAAAA9hZGRyZXNzX3N0YWtlcl8AAAAAA3NzdAIAAAANYWRkcmVzc19wb29sXwAAAAADc3dwAgAAAA1hZGRyZXNzX3N3YXBfAAAAAAJhMgIAAAAMc3dhcF9hc3NldDJfAAAAAANhYTECAAAAB3Bvb2xfMV8AAAAAA2FhMgIAAAAHcG9vbF8yXwAAAAADc3QxAgAAAA5zdGFrZXJfYWRkcmVzcwAAAAAEdHlwZQIAAAAFdHlwZV8AAAAAAnNhAgAAAA9TVEFLSU5HX0FNT1VOVF8AAAAAAmxhAgAAAA1MRUFTRV9BTU9VTlRfAAAAAAJpeAIAAAADSURfAAAAAAdyYXRlRmVlAgAAABNwZXJjZW50YWdlX3JhdGVfZmVlAAAAAAJEOAAAAAAABfXhAAAAAAACRDYA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exity": 0 } View: original | compacted Prev: C7XMpyex3FdL3tmBKZA7RtsDzkM9WZg5JbfY1xwr4iGo Next: 2n2gtzArNCdz5Pn4BPkboGYxJrgS8P8AnTgXsHm5STcw Diff:
OldNewDifferences
101101
102102
103103 @Callable(i)
104+func blockDistribution (newValue) = if ((i.caller == this))
105+ then [BooleanEntry(bcD, newValue)]
106+ else throw("Only the Admin itself can invoke this function")
107+
108+
109+
110+@Callable(i)
104111 func deposit () = {
105112 let power = getBooleanValue(this, ac)
106113 let liquidityPower = getBooleanValue(this, liquidityAc)
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 bcD = "block_distribuition"
5757
5858 let usdn = "usdn_asset"
5959
6060 let usdt = "usdt_asset"
6161
6262 let usdc = "usdc_asset"
6363
6464 let ngnn = "ngnn_asset"
6565
6666 let aWaves = "accept_waves"
6767
6868 @Callable(i)
6969 func constructor (MainAssetId,UsdnAssetId,UsdtAssetId,UsdcAssetId,NgnnAssetId,acceptWaves,percentageRate,blockDistribution) = if ((i.caller == this))
7070 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), IntegerEntry(bcD, blockDistribution)]
7171 else throw("Only the Admin itself can invoke this function")
7272
7373
7474
7575 @Callable(i)
7676 func activate (v) = if ((i.caller == this))
7777 then [BooleanEntry(ac, v)]
7878 else throw("Only the Admin itself can invoke this function")
7979
8080
8181
8282 @Callable(i)
8383 func maintenance (pools,swap,stake) = if ((i.caller == this))
8484 then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake)]
8585 else throw("Only the Admin itself can invoke this function")
8686
8787
8888
8989 @Callable(i)
9090 func percentualRateFeeEdit (rate) = if ((i.caller == this))
9191 then [IntegerEntry(rateFee, rate)]
9292 else throw("Only the Admin itself can invoke this function")
9393
9494
9595
9696 @Callable(i)
9797 func acceptWaves (activate) = if ((i.caller == this))
9898 then [BooleanEntry(aWaves, activate)]
9999 else throw("Only the Admin itself can invoke this function")
100100
101101
102102
103103 @Callable(i)
104+func blockDistribution (newValue) = if ((i.caller == this))
105+ then [BooleanEntry(bcD, newValue)]
106+ else throw("Only the Admin itself can invoke this function")
107+
108+
109+
110+@Callable(i)
104111 func deposit () = {
105112 let power = getBooleanValue(this, ac)
106113 let liquidityPower = getBooleanValue(this, liquidityAc)
107114 let acWaves = getBooleanValue(this, aWaves)
108115 let pmt = i.payments[0]
109116 let MainAsset = fromBase58String(getStringValue(this, main))
110117 if (power)
111118 then if (!(liquidityPower))
112119 then if ((pmt.assetId != MainAsset))
113120 then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(MainAsset)))
114121 else {
115122 let currentKey = toBase58String(i.caller.bytes)
116123 let currentAmount = match getInteger(this, currentKey) {
117124 case a: Int =>
118125 a
119126 case _ =>
120127 0
121128 }
122129 let newAmount = (currentAmount + pmt.amount)
123130 let useramount = IntegerEntry(currentKey, newAmount)
124131 let userdepositheight = IntegerEntry(("Deposit_Height_Of_" + currentKey), height)
125132 let previouslockbalance = match getInteger(this, "Total_Tokens_Locked:") {
126133 case a: Int =>
127134 a
128135 case _ =>
129136 0
130137 }
131138 let totaltoken = (previouslockbalance + pmt.amount)
132139 let TLV = IntegerEntry("Total_Tokens_Locked:", totaltoken)
133140 [useramount, userdepositheight, TLV]
134141 }
135142 else throw("liquidity is currently under maintenance.")
136143 else throw("dApp is currently under maintenance.")
137144 }
138145
139146
140147
141148 @Callable(i)
142149 func remove (amount) = {
143150 let power = getBooleanValue(this, ac)
144151 let liquidityPower = getBooleanValue(this, liquidityAc)
145152 let acWaves = getBooleanValue(this, aWaves)
146153 let pmt = i.payments[0]
147154 let MainAsset = fromBase58String(getStringValue(this, main))
148155 if (power)
149156 then if (!(liquidityPower))
150157 then {
151158 let currentKey = toBase58String(i.caller.bytes)
152159 let currentAmount = valueOrElse(getInteger(this, currentKey), 0)
153160 let swapheightkeyname = ("Deposit_Height_Of_" + currentKey)
154161 let previouslockbalance = getIntegerValue(this, "Total_Tokens_Locked:")
155162 let totaltoken = (previouslockbalance - amount)
156163 let diff = (height - getIntegerValue(this, swapheightkeyname))
157164 let bcd = getIntegerValue(this, bcD)
158165 if ((0 > amount))
159166 then throw("Can't withdraw negative AxAi amount")
160167 else {
161168 let newAmount = (currentAmount - amount)
162169 if ((0 > newAmount))
163170 then throw("Not enough AxAi balance")
164171 else [IntegerEntry(currentKey, newAmount), IntegerEntry("Total_Tokens_Locked:", totaltoken), ScriptTransfer(i.caller, amount, MainAsset), ScriptTransfer(i.caller, (((diff * bcd) / previouslockbalance) * currentAmount), MainAsset)]
165172 }
166173 }
167174 else throw("liquidity is currently under maintenance.")
168175 else throw("dApp is currently under maintenance.")
169176 }
170177
171178
172179 @Verifier(tx)
173180 func verify () = match tx {
174181 case _ =>
175182 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
176183 }
177184

github/deemru/w8io/026f985 
64.04 ms