tx · 2SVgtDgfCvjCov92pPuARYXX4jMLwroMZsBNFCM1NMnZ

3Ms4UaoW7ASsYza1dDMj8wFQp11qzmGrHcV:  -0.01400000 Waves

2021.12.03 10:36 [1817802] smart account 3Ms4UaoW7ASsYza1dDMj8wFQp11qzmGrHcV > SELF 0.00000000 Waves

{ "type": 13, "id": "2SVgtDgfCvjCov92pPuARYXX4jMLwroMZsBNFCM1NMnZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1638517059925, "version": 1, "sender": "3Ms4UaoW7ASsYza1dDMj8wFQp11qzmGrHcV", "senderPublicKey": "5VMKj2RYBMXQCDwZXF5XJy1zA81CYcE8EM7T3PSurkdB", "proofs": [ "2RzJKZdgy6AYPdpBwujEfSoLPHxLQd5v1CVqXxcb4dU38HaptGfTFB8iiNJetwVf5pEVeemfVW4mSDrriRrbrjfa" ], "script": "base64:AAIFAAAAAAAAABoIAhIAEgMKAQQSAwoBCBIDCgEBEgMKAQgSAAAAABUAAAAABm9yYWNsZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEw5zKsHMBQ7bczdTaS1XKYTuSoWhWSSNwAAAAARU1dPUGdvdmVybmFuY2VBZHIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAZvcmFjbGUCAAAAD3N3b3BfZ292ZXJuYW5jZQIAAAAZRW1wdHkga2V5IHN3b3BfZ292ZXJuYW5jZQAAAAANV2F2ZXNVc2RuUG9vbAkBAAAABXZhbHVlAAAAAQkABCYAAAABCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABm9yYWNsZQIAAAAPV0FWRVNfVVNETl9wb29sAgAAABlFbXB0eSBrZXkgV0FWRVNfVVNETl9wb29sAAAAAAljb25zdW1lcnMJAAS1AAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAZvcmFjbGUCAAAACWNvbnN1bWV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WRtaW41BQAAAANuaWwIBQAAAAFpAAAABmNhbGxlcgkBAAAAASEAAAABCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgUAAAAJY29uc3VtZXJzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMHCQAAAgAAAAECAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAAOaXNfZGFwcF9hY3RpdmUHBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkBAAAAASEAAAABCQEAAAAVaXNUcmFuc2FjdGlvbkFwcHJvdmVkAAAAAQkAAlgAAAABCAUAAAACdHgAAAACaWQJAAACAAAAAQIAAAAlVHJhbnNhY3Rpb24gaWQgbm90IGFwcHJvdmVkIGJ5IGFkbWlucwZqmafu", "chainId": 84, "height": 1817802, "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'3Mvs8NUh6nLUuymUHYCs6475Gm1DKyfM5MY')
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 (K) = if (!(if (k)
98+ then p
99+ else false))
100+ then throw("Protol stopped by admin")
101+ else {
102+ let L = valueOrErrorMessage(getString(J.caller, l), "Empty keyOwner")
103+ let M = toString(J.originCaller)
104+ let N = if (valueOrErrorMessage(containsElement(d, M), "Empty key: consumers"))
105+ then true
106+ else (M == L)
107+ if (!(N))
108+ then throw((M + " is not a consumer or user"))
109+ else {
110+ let O = if (K)
111+ then y()
112+ else 0
113+ let u = s(L)
114+ let P = (u - O)
115+ let Q = (q - O)
116+ if ((0 > P))
117+ then throw(((("Insufficient new balance: " + toString(P)) + " for user ") + L))
118+ else if ((0 > Q))
119+ then throw(("Negativa overall balance:" + toString(Q)))
120+ else [IntegerEntry((L + m), P), IntegerEntry(o, Q)]
121+ }
122+ }
123+
124+
125+
126+@Callable(J)
127+func replenishBalance (R) = if (!(if (k)
128+ then p
129+ else false))
130+ then throw("Protol stopped by admin")
131+ else {
132+ let S = valueOrErrorMessage(addressFromString(R), "Argument must be base58 string address")
133+ let T = $Tuple2(J.payments[0].amount, J.payments[0].assetId)
134+ let U = T._1
135+ let V = T._2
136+ if ((V != unit))
137+ then throw("Only WAVES available for replenishment")
138+ else {
139+ let W = s(R)
140+ let P = (W + U)
141+ let Q = (q + U)
142+[IntegerEntry((toBase58String(S.bytes) + m), P), IntegerEntry(o, Q)]
143+ }
144+ }
145+
146+
147+
148+@Callable(J)
149+func withdraw (X) = if (!(if (k)
150+ then p
151+ else false))
152+ then throw("Protol stopped by admin")
153+ else {
154+ let Y = toString(J.caller)
155+ let Z = s(Y)
156+ let aa = (Z - X)
157+ let Q = (q - X)
158+ if ((X > Z))
159+ then throw("withdrawAmt > callerBalance")
160+ else [IntegerEntry((Y + m), aa), IntegerEntry(o, Q), ScriptTransfer(J.caller, X, unit)]
161+ }
162+
163+
164+
165+@Callable(J)
166+func incomeProtocolWithdraw (ab) = if (!(if (k)
167+ then p
168+ else false))
169+ then throw("Protocol stopped by admin")
170+ else if (!(C(toBase58String(J.transactionId))))
171+ then throw("Transaction id not approved by admins")
172+ else {
173+ let ac = (wavesBalance(this).available - q)
174+ if ((0 >= ac))
175+ then throw("income <= 0 ")
176+ else [ScriptTransfer(valueOrErrorMessage(addressFromString(ab), "Argument must be base58 string address"), ac, unit)]
177+ }
178+
179+
180+
181+@Callable(J)
182+func shutdownDapp () = if (!(p))
183+ then throw("Protol stopped by admin")
184+ else if (if (!(containsElement([e, f, g, h, i], J.caller)))
185+ then !(containsElement(d, toBase58String(J.caller.bytes)))
186+ else false)
187+ then throw("Only admin can call this function")
188+ else [BooleanEntry("is_dapp_active", false)]
189+
190+
191+@Verifier(ad)
192+func ae () = if (!(C(toBase58String(ad.id))))
193+ then throw("Transaction id not approved by admins")
194+ else true
195+

github/deemru/w8io/169f3d6 
23.01 ms