tx · 6pHsHCrvu1vz2NGNAyFgDMTzBdkCAg1isAFSCNTuPjSX

3N3ThrxAQfwbdarfoZiSb4jBzeRSjim63nT:  -0.01400000 Waves

2022.04.04 16:28 [1993903] smart account 3N3ThrxAQfwbdarfoZiSb4jBzeRSjim63nT > SELF 0.00000000 Waves

{ "type": 13, "id": "6pHsHCrvu1vz2NGNAyFgDMTzBdkCAg1isAFSCNTuPjSX", "fee": 1400000, "feeAssetId": null, "timestamp": 1649078929555, "version": 1, "sender": "3N3ThrxAQfwbdarfoZiSb4jBzeRSjim63nT", "senderPublicKey": "BA8BVt7GxxXRVzXaEkeEaMeorLE65GfdGaR6dNZNtZFM", "proofs": [ "2DPFwwckJk5BoqMt7Xpdn7x3wvPz3Uj7eGs1dwGSdkJ98ENKDkAikBMiNgboTuec1SrSkwZ1Rh9AS3P8Cfkms8hB" ], "script": "base64:AAIFAAAAAAAAABcIAhIAEgASAwoBCBIDCgEBEgMKAQgSAAAAABUAAAAABm9yYWNsZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMEQugxza0zTxSJ70/EPOAOm7zhpdY/ynAAAAAARU1dPUGdvdmVybmFuY2VBZHIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAZvcmFjbGUCAAAAD3N3b3BfZ292ZXJuYW5jZQIAAAAZRW1wdHkga2V5IHN3b3BfZ292ZXJuYW5jZQAAAAANV2F2ZXNVc2RuUG9vbAkBAAAABXZhbHVlAAAAAQkABCYAAAABCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABm9yYWNsZQIAAAAPV0FWRVNfVVNETl9wb29sAgAAABlFbXB0eSBrZXkgV0FWRVNfVVNETl9wb29sAAAAAAljb25zdW1lcnMJAAS1AAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAZvcmFjbGUCAAAACWNvbnN1bWVycwI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QAAAAZjYWxsZXIAAAAFYnl0ZXMHCQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAAOaXNfZGFwcF9hY3RpdmUHBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkBAAAAASEAAAABCQEAAAAVaXNUcmFuc2FjdGlvbkFwcHJvdmVkAAAAAQkAAlgAAAABCAUAAAACdHgAAAACaWQJAAACAAAAAQIAAAAlVHJhbnNhY3Rpb24gaWQgbm90IGFwcHJvdmVkIGJ5IGFkbWlucwZcDBgD", "chainId": 84, "height": 1993903, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = Address(base58'3N7WvE91gUwkV4fyewjrzzAVajRD4kcq8Fd')
5+
6+let b = addressFromStringValue(valueOrErrorMessage(getString(a, "swop_governance"), "Empty key swop_governance"))
7+
8+let c = value(addressFromString(valueOrElse(getString(a, "WAVES_USDN_pool"), "Empty key WAVES_USDN_pool")))
9+
10+let d = split(valueOrElse(getString(a, "consumers"), "Empty key consumer"), ",")
11+
12+let e = addressFromStringValue(valueOrElse(getString(a, "admin_1"), "Empty key admin_1"))
13+
14+let f = addressFromStringValue(valueOrElse(getString(a, "admin_2"), "Empty key admin_2"))
15+
16+let g = addressFromStringValue(valueOrElse(getString(a, "admin_3"), "Empty key admin_3"))
17+
18+let h = addressFromStringValue(valueOrElse(getString(a, "admin_4"), "Empty key admin_4"))
19+
20+let i = addressFromStringValue(valueOrElse(getString(a, "admin_5"), "Empty key admin_5"))
21+
22+let j = valueOrErrorMessage(getInteger(a, "protocol_fee_in_usdn"), "Empty protocol_fee_in_usdn")
23+
24+let k = valueOrErrorMessage(getBoolean(a, "is_protocol_active"), "Empty key is_protocol_active")
25+
26+let l = "owner"
27+
28+let m = "_balance"
29+
30+let n = "is_dapp_active"
31+
32+let o = "overall_balance"
33+
34+let p = valueOrErrorMessage(getBoolean(this, n), "Empty key is_dapp_active")
35+
36+let q = valueOrErrorMessage(getInteger(this, o), "Empty key overall_balance")
37+
38+let r = 500000
39+
40+func s (t) = {
41+ let u = {
42+ let v = getInteger(this, (t + m))
43+ if ($isInstanceOf(v, "Int"))
44+ then {
45+ let w = v
46+ w
47+ }
48+ else if ($isInstanceOf(v, "Unit"))
49+ then {
50+ let x = v
51+ 0
52+ }
53+ else throw("Match error")
54+ }
55+ u
56+ }
57+
58+
59+func y () = {
60+ let z = valueOrErrorMessage(getInteger(c, "B_asset_balance"), "Empty B_asset_balance")
61+ let A = valueOrErrorMessage(getInteger(c, "A_asset_balance"), "Empty A_asset_balance")
62+ let B = fraction(j, A, z)
63+ (B + r)
64+ }
65+
66+
67+func C (D) = {
68+ let E = if (valueOrElse(getBoolean(e, D), false))
69+ then 1
70+ else 0
71+ let F = if (valueOrElse(getBoolean(f, D), false))
72+ then 1
73+ else 0
74+ let G = if (valueOrElse(getBoolean(g, D), false))
75+ then 1
76+ else 0
77+ let H = if (valueOrElse(getBoolean(h, D), false))
78+ then 1
79+ else 0
80+ let I = if (valueOrElse(getBoolean(i, D), false))
81+ then 1
82+ else 0
83+ (((((E + F) + G) + H) + I) >= 3)
84+ }
85+
86+
87+@Callable(J)
88+func init () = if (if (isDefined(getString(this, "is_dapp_active")))
89+ then true
90+ else isDefined(getInteger(this, "overall_balance")))
91+ then throw("Already initialized")
92+ else [IntegerEntry("overall_balance", 0), BooleanEntry("is_dapp_active", true)]
93+
94+
95+
96+@Callable(J)
97+func extractFee () = if (!(if (k)
98+ then p
99+ else false))
100+ then throw("Protol stopped by admin")
101+ else {
102+ let K = valueOrErrorMessage(getString(J.caller, l), "Empty keyOwner")
103+ let L = toString(J.originCaller)
104+ let M = valueOrErrorMessage(containsElement(d, L), "Empty key: consumers")
105+ if (!(M))
106+ then throw((L + " is not a consumer"))
107+ else {
108+ let N = y()
109+ let u = s(K)
110+ let O = (u - N)
111+ let P = (q - N)
112+ if ((0 > O))
113+ then throw(((("Insufficient new balance: " + toString(O)) + " for user ") + K))
114+ else if ((0 > P))
115+ then throw(("Negativa overall balance:" + toString(P)))
116+ else [IntegerEntry((K + m), O), IntegerEntry(o, P)]
117+ }
118+ }
119+
120+
121+
122+@Callable(J)
123+func replenishBalance (Q) = if (!(if (k)
124+ then p
125+ else false))
126+ then throw("Protol stopped by admin")
127+ else {
128+ let R = valueOrErrorMessage(addressFromString(Q), "Argument must be base58 string address")
129+ let S = $Tuple2(J.payments[0].amount, J.payments[0].assetId)
130+ let T = S._1
131+ let U = S._2
132+ if ((U != unit))
133+ then throw("Only WAVES available for replenishment")
134+ else {
135+ let V = s(Q)
136+ let O = (V + T)
137+ let P = (q + T)
138+[IntegerEntry((toBase58String(R.bytes) + m), O), IntegerEntry(o, P)]
139+ }
140+ }
141+
142+
143+
144+@Callable(J)
145+func withdraw (W) = if (!(if (k)
146+ then p
147+ else false))
148+ then throw("Protol stopped by admin")
149+ else {
150+ let X = toString(J.caller)
151+ let Y = s(X)
152+ let Z = (Y - W)
153+ let P = (q - W)
154+ if ((W > Y))
155+ then throw("withdrawAmt > callerBalance")
156+ else [IntegerEntry((X + m), Z), IntegerEntry(o, P), ScriptTransfer(J.caller, W, unit)]
157+ }
158+
159+
160+
161+@Callable(J)
162+func incomeProtocolWithdraw (aa) = if (!(if (k)
163+ then p
164+ else false))
165+ then throw("Protocol stopped by admin")
166+ else if (!(C(toBase58String(J.transactionId))))
167+ then throw("Transaction id not approved by admins")
168+ else {
169+ let ab = (wavesBalance(this).available - q)
170+ if ((0 >= ab))
171+ then throw("income <= 0 ")
172+ else [ScriptTransfer(valueOrErrorMessage(addressFromString(aa), "Argument must be base58 string address"), ab, unit)]
173+ }
174+
175+
176+
177+@Callable(J)
178+func shutdownDapp () = if (!(p))
179+ then throw("Protol stopped by admin")
180+ else if (if (!(containsElement([e, f, g, h, i], J.caller)))
181+ then !(containsElement(d, toBase58String(J.caller.bytes)))
182+ else false)
183+ then throw("Only admin can call this function")
184+ else [BooleanEntry("is_dapp_active", false)]
185+
186+
187+@Verifier(ac)
188+func ad () = if (!(C(toBase58String(ac.id))))
189+ then throw("Transaction id not approved by admins")
190+ else true
191+

github/deemru/w8io/169f3d6 
29.94 ms