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(H)
104+func blockDistribution (W) = if ((H.caller == this))
105+ then [BooleanEntry(B, W)]
106+ else throw("Only the Admin itself can invoke this function")
107+
108+
109+
110+@Callable(H)
104111 func deposit () = {
105- let W = getBooleanValue(this, x)
106- let X = getBooleanValue(this, A)
107- let Y = getBooleanValue(this, G)
108- let Z = H.payments[0]
109- let aa = fromBase58String(getStringValue(this, a))
110- if (W)
111- then if (!(X))
112- then if ((Z.assetId != aa))
113- then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(aa)))
112+ let X = getBooleanValue(this, x)
113+ let Y = getBooleanValue(this, A)
114+ let Z = getBooleanValue(this, G)
115+ let aa = H.payments[0]
116+ let ab = fromBase58String(getStringValue(this, a))
117+ if (X)
118+ then if (!(Y))
119+ then if ((aa.assetId != ab))
120+ then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(ab)))
114121 else {
115- let ab = toBase58String(H.caller.bytes)
116- let ac = {
117- let ad = getInteger(this, ab)
118- if ($isInstanceOf(ad, "Int"))
122+ let ac = toBase58String(H.caller.bytes)
123+ let ad = {
124+ let ae = getInteger(this, ac)
125+ if ($isInstanceOf(ae, "Int"))
119126 then {
120- let ae = ad
121- ae
127+ let af = ae
128+ af
122129 }
123130 else 0
124131 }
125- let af = (ac + Z.amount)
126- let ag = IntegerEntry(ab, af)
127- let ah = IntegerEntry(("Deposit_Height_Of_" + ab), height)
128- let ai = {
129- let ad = getInteger(this, "Total_Tokens_Locked:")
130- if ($isInstanceOf(ad, "Int"))
132+ let ag = (ad + aa.amount)
133+ let ah = IntegerEntry(ac, ag)
134+ let ai = IntegerEntry(("Deposit_Height_Of_" + ac), height)
135+ let aj = {
136+ let ae = getInteger(this, "Total_Tokens_Locked:")
137+ if ($isInstanceOf(ae, "Int"))
131138 then {
132- let ae = ad
133- ae
139+ let af = ae
140+ af
134141 }
135142 else 0
136143 }
137- let aj = (ai + Z.amount)
138- let ak = IntegerEntry("Total_Tokens_Locked:", aj)
139-[ag, ah, ak]
144+ let ak = (aj + aa.amount)
145+ let al = IntegerEntry("Total_Tokens_Locked:", ak)
146+[ah, ai, al]
140147 }
141148 else throw("liquidity is currently under maintenance.")
142149 else throw("dApp is currently under maintenance.")
145152
146153
147154 @Callable(H)
148-func remove (al) = {
149- let W = getBooleanValue(this, x)
150- let X = getBooleanValue(this, A)
151- let Y = getBooleanValue(this, G)
152- let Z = H.payments[0]
153- let aa = fromBase58String(getStringValue(this, a))
154- if (W)
155- then if (!(X))
155+func remove (am) = {
156+ let X = getBooleanValue(this, x)
157+ let Y = getBooleanValue(this, A)
158+ let Z = getBooleanValue(this, G)
159+ let aa = H.payments[0]
160+ let ab = fromBase58String(getStringValue(this, a))
161+ if (X)
162+ then if (!(Y))
156163 then {
157- let ab = toBase58String(H.caller.bytes)
158- let ac = valueOrElse(getInteger(this, ab), 0)
159- let am = ("Deposit_Height_Of_" + ab)
160- let ai = getIntegerValue(this, "Total_Tokens_Locked:")
161- let aj = (ai - al)
162- let an = (height - getIntegerValue(this, am))
163- let ao = getIntegerValue(this, B)
164- if ((0 > al))
164+ let ac = toBase58String(H.caller.bytes)
165+ let ad = valueOrElse(getInteger(this, ac), 0)
166+ let an = ("Deposit_Height_Of_" + ac)
167+ let aj = getIntegerValue(this, "Total_Tokens_Locked:")
168+ let ak = (aj - am)
169+ let ao = (height - getIntegerValue(this, an))
170+ let ap = getIntegerValue(this, B)
171+ if ((0 > am))
165172 then throw("Can't withdraw negative AxAi amount")
166173 else {
167- let af = (ac - al)
168- if ((0 > af))
174+ let ag = (ad - am)
175+ if ((0 > ag))
169176 then throw("Not enough AxAi balance")
170- else [IntegerEntry(ab, af), IntegerEntry("Total_Tokens_Locked:", aj), ScriptTransfer(H.caller, al, aa), ScriptTransfer(H.caller, (((an * ao) / ai) * ac), aa)]
177+ else [IntegerEntry(ac, ag), IntegerEntry("Total_Tokens_Locked:", ak), ScriptTransfer(H.caller, am, ab), ScriptTransfer(H.caller, (((ao * ap) / aj) * ad), ab)]
171178 }
172179 }
173180 else throw("liquidity is currently under maintenance.")
175182 }
176183
177184
178-@Verifier(ap)
179-func aq () = {
180- let ad = ap
181- sigVerify(ap.bodyBytes, ap.proofs[0], ap.senderPublicKey)
185+@Verifier(aq)
186+func ar () = {
187+ let ae = aq
188+ sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey)
182189 }
183190
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "main_asset"
55
66 let b = "lp_asset_"
77
88 let c = "swap_asset1_"
99
1010 let d = "address_staker_"
1111
1212 let e = "address_pool_"
1313
1414 let f = "address_swap_"
1515
1616 let g = "swap_asset2_"
1717
1818 let h = "pool_1_"
1919
2020 let i = "pool_2_"
2121
2222 let j = "staker_address"
2323
2424 let k = "type_"
2525
2626 let l = "STAKING_AMOUNT_"
2727
2828 let m = "LEASE_AMOUNT_"
2929
3030 let n = "ID_"
3131
3232 let o = "percentage_rate_fee"
3333
3434 let p = 100000000
3535
3636 let q = 1000000
3737
3838 let r = Address(this.bytes)
3939
4040 let s = 5
4141
4242 func t (u) = toString(valueOrErrorMessage(addressFromString(u), (("Can't parse " + u) + " as address")))
4343
4444
4545 func v (w) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(w))).id, (("Asset Id: " + w) + " is invalid.")))
4646
4747
4848 let x = "activate"
4949
5050 let y = "activate_pools"
5151
5252 let z = "activate_swap"
5353
5454 let A = "activate_liquidity"
5555
5656 let B = "block_distribuition"
5757
5858 let C = "usdn_asset"
5959
6060 let D = "usdt_asset"
6161
6262 let E = "usdc_asset"
6363
6464 let F = "ngnn_asset"
6565
6666 let G = "accept_waves"
6767
6868 @Callable(H)
6969 func constructor (I,J,K,L,M,N,O,P) = if ((H.caller == this))
7070 then [StringEntry(a, I), StringEntry(C, J), StringEntry(E, L), StringEntry(D, K), StringEntry(F, M), BooleanEntry(G, N), IntegerEntry(o, O), BooleanEntry(x, true), BooleanEntry(z, false), BooleanEntry(y, false), BooleanEntry(A, false), IntegerEntry(B, P)]
7171 else throw("Only the Admin itself can invoke this function")
7272
7373
7474
7575 @Callable(H)
7676 func activate (Q) = if ((H.caller == this))
7777 then [BooleanEntry(x, Q)]
7878 else throw("Only the Admin itself can invoke this function")
7979
8080
8181
8282 @Callable(H)
8383 func maintenance (R,S,T) = if ((H.caller == this))
8484 then [BooleanEntry(y, R), BooleanEntry(z, S), BooleanEntry(A, T)]
8585 else throw("Only the Admin itself can invoke this function")
8686
8787
8888
8989 @Callable(H)
9090 func percentualRateFeeEdit (U) = if ((H.caller == this))
9191 then [IntegerEntry(o, U)]
9292 else throw("Only the Admin itself can invoke this function")
9393
9494
9595
9696 @Callable(H)
9797 func acceptWaves (V) = if ((H.caller == this))
9898 then [BooleanEntry(G, V)]
9999 else throw("Only the Admin itself can invoke this function")
100100
101101
102102
103103 @Callable(H)
104+func blockDistribution (W) = if ((H.caller == this))
105+ then [BooleanEntry(B, W)]
106+ else throw("Only the Admin itself can invoke this function")
107+
108+
109+
110+@Callable(H)
104111 func deposit () = {
105- let W = getBooleanValue(this, x)
106- let X = getBooleanValue(this, A)
107- let Y = getBooleanValue(this, G)
108- let Z = H.payments[0]
109- let aa = fromBase58String(getStringValue(this, a))
110- if (W)
111- then if (!(X))
112- then if ((Z.assetId != aa))
113- then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(aa)))
112+ let X = getBooleanValue(this, x)
113+ let Y = getBooleanValue(this, A)
114+ let Z = getBooleanValue(this, G)
115+ let aa = H.payments[0]
116+ let ab = fromBase58String(getStringValue(this, a))
117+ if (X)
118+ then if (!(Y))
119+ then if ((aa.assetId != ab))
120+ then throw(("Invalid Asset! Kindly Deposit Only " + toBase58String(ab)))
114121 else {
115- let ab = toBase58String(H.caller.bytes)
116- let ac = {
117- let ad = getInteger(this, ab)
118- if ($isInstanceOf(ad, "Int"))
122+ let ac = toBase58String(H.caller.bytes)
123+ let ad = {
124+ let ae = getInteger(this, ac)
125+ if ($isInstanceOf(ae, "Int"))
119126 then {
120- let ae = ad
121- ae
127+ let af = ae
128+ af
122129 }
123130 else 0
124131 }
125- let af = (ac + Z.amount)
126- let ag = IntegerEntry(ab, af)
127- let ah = IntegerEntry(("Deposit_Height_Of_" + ab), height)
128- let ai = {
129- let ad = getInteger(this, "Total_Tokens_Locked:")
130- if ($isInstanceOf(ad, "Int"))
132+ let ag = (ad + aa.amount)
133+ let ah = IntegerEntry(ac, ag)
134+ let ai = IntegerEntry(("Deposit_Height_Of_" + ac), height)
135+ let aj = {
136+ let ae = getInteger(this, "Total_Tokens_Locked:")
137+ if ($isInstanceOf(ae, "Int"))
131138 then {
132- let ae = ad
133- ae
139+ let af = ae
140+ af
134141 }
135142 else 0
136143 }
137- let aj = (ai + Z.amount)
138- let ak = IntegerEntry("Total_Tokens_Locked:", aj)
139-[ag, ah, ak]
144+ let ak = (aj + aa.amount)
145+ let al = IntegerEntry("Total_Tokens_Locked:", ak)
146+[ah, ai, al]
140147 }
141148 else throw("liquidity is currently under maintenance.")
142149 else throw("dApp is currently under maintenance.")
143150 }
144151
145152
146153
147154 @Callable(H)
148-func remove (al) = {
149- let W = getBooleanValue(this, x)
150- let X = getBooleanValue(this, A)
151- let Y = getBooleanValue(this, G)
152- let Z = H.payments[0]
153- let aa = fromBase58String(getStringValue(this, a))
154- if (W)
155- then if (!(X))
155+func remove (am) = {
156+ let X = getBooleanValue(this, x)
157+ let Y = getBooleanValue(this, A)
158+ let Z = getBooleanValue(this, G)
159+ let aa = H.payments[0]
160+ let ab = fromBase58String(getStringValue(this, a))
161+ if (X)
162+ then if (!(Y))
156163 then {
157- let ab = toBase58String(H.caller.bytes)
158- let ac = valueOrElse(getInteger(this, ab), 0)
159- let am = ("Deposit_Height_Of_" + ab)
160- let ai = getIntegerValue(this, "Total_Tokens_Locked:")
161- let aj = (ai - al)
162- let an = (height - getIntegerValue(this, am))
163- let ao = getIntegerValue(this, B)
164- if ((0 > al))
164+ let ac = toBase58String(H.caller.bytes)
165+ let ad = valueOrElse(getInteger(this, ac), 0)
166+ let an = ("Deposit_Height_Of_" + ac)
167+ let aj = getIntegerValue(this, "Total_Tokens_Locked:")
168+ let ak = (aj - am)
169+ let ao = (height - getIntegerValue(this, an))
170+ let ap = getIntegerValue(this, B)
171+ if ((0 > am))
165172 then throw("Can't withdraw negative AxAi amount")
166173 else {
167- let af = (ac - al)
168- if ((0 > af))
174+ let ag = (ad - am)
175+ if ((0 > ag))
169176 then throw("Not enough AxAi balance")
170- else [IntegerEntry(ab, af), IntegerEntry("Total_Tokens_Locked:", aj), ScriptTransfer(H.caller, al, aa), ScriptTransfer(H.caller, (((an * ao) / ai) * ac), aa)]
177+ else [IntegerEntry(ac, ag), IntegerEntry("Total_Tokens_Locked:", ak), ScriptTransfer(H.caller, am, ab), ScriptTransfer(H.caller, (((ao * ap) / aj) * ad), ab)]
171178 }
172179 }
173180 else throw("liquidity is currently under maintenance.")
174181 else throw("dApp is currently under maintenance.")
175182 }
176183
177184
178-@Verifier(ap)
179-func aq () = {
180- let ad = ap
181- sigVerify(ap.bodyBytes, ap.proofs[0], ap.senderPublicKey)
185+@Verifier(aq)
186+func ar () = {
187+ let ae = aq
188+ sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey)
182189 }
183190

github/deemru/w8io/169f3d6 
55.80 ms