tx · 2BV7j3oqWwSdRDLzRbgfbmiZqRCPBe6N5wZdugm9SoAN

3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc:  -0.05000000 Waves

2019.12.29 17:01 [830442] smart account 3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc > SELF 0.00000000 Waves

{ "type": 13, "id": "2BV7j3oqWwSdRDLzRbgfbmiZqRCPBe6N5wZdugm9SoAN", "fee": 5000000, "feeAssetId": null, "timestamp": 1577627959542, "version": 1, "sender": "3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc", "senderPublicKey": "5M79Anear5ntQk2bbDdFA2goiPXkv7Xy2UpV4n5RKRv", "proofs": [ "3rnsvooMgSuSzJwW9ZuMw4gT2NFS7oUcpjZkTsNwWF6SMp7UX3NUcB72ULWPYQtubFWEmTRBf684BbHZw2b7z5dA" ], "script": "base64:AAIDAAAAAAAAABoIARIAEgMKAQgSAwoBCBIDCgEIEgASAwoBAQAAABQAAAAADUxPQ0tFRFdCRVRLRVkCAAAAEyRXQkVUX0xPQ0tFRF9BTU9VTlQAAAAADkxPQ0tFRFJPWUFMS0VZAgAAABQkUk9ZQUxfTE9DS0VSX0FNT1VOVAAAAAAQV0FMTEVUQ09VTlRFUktFWQIAAAALJFdBTExFVF9OVU0AAAAAD0NPTU1VTklUWUZFRUtFWQIAAAAUJENPTU1VTklUWUZFRV9BTU9VTlQAAAAABFdCRVQBAAAAIIa0Nqh40w7M2PAXrUsuLAQfB5+6yrkWqUrXbyWtm9B2AAAAAAVST1lBTAEAAAAgQ+mKgsIl2XSclXwgUknGo5qQsraVX2JiXso4iYkMaRwAAAAAD0NPTU1VTklUWVdBTExFVAkBAAAAB0FkZHJlc3MAAAABAQAAABoBVC8R8HhOr9aTn6luIitmtR+yU9d4zzto+wAAAAAKV0JFVExPQ0tFRAAAAAAAAAAAAAAAAAALUk9ZQUxMT0NLRUQAAAAAAAAAAAEAAAAADFdCRVRXSVRIRFJBVwAAAAAAAAAAAgAAAAANUk9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AAAECAAAANFlvdSBkbyBub3QgaGF2ZSBwZXJtaXNzaW9uIHRvIHBlcmZvcm0gdGhpcyBmdW5jdGlvbi4AAAAALvCsbA==", "chainId": 84, "height": 830442, "spentComplexity": 0 } View: original | compacted Prev: ATvFWxCGiu9qBmeVFK6Ejc4eZ5hgbGcBDzq8Yi2Kf8ZY Next: AHu7het4xbRrs4AVgTj5x1VMqnTJyRvYBvwR63vqcYLa Diff:
OldNewDifferences
77
88 let c = "$WALLET_NUM"
99
10-let d = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
10+let d = "$COMMUNITYFEE_AMOUNT"
1111
12-let e = base58'5a6rvDEiVwvhTvTH6ce2qFwqdCt3VKaHKXEpwLXXVvyy'
12+let e = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
1313
14-let f = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
14+let f = base58'5a6rvDEiVwvhTvTH6ce2qFwqdCt3VKaHKXEpwLXXVvyy'
1515
16-let g = 0
16+let g = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1717
18-let h = 1
18+let h = 0
1919
20-let i = 2
20+let i = 1
2121
22-let j = 3
22+let j = 2
2323
24-let k = 4
24+let k = 3
2525
26-func l () = {
27- let m = {
28- let n = getInteger(this, c)
29- if ($isInstanceOf(n, "Int"))
26+let l = 4
27+
28+func m () = {
29+ let n = {
30+ let o = getInteger(this, c)
31+ if ($isInstanceOf(o, "Int"))
3032 then {
31- let o = n
32- o
33+ let p = o
34+ p
3335 }
3436 else 0
3537 }
36- (m + 1)
38+ (n + 1)
3739 }
3840
3941
40-func p () = {
41- let n = getInteger(this, a)
42- if ($isInstanceOf(n, "Int"))
42+func q () = {
43+ let o = getInteger(this, a)
44+ if ($isInstanceOf(o, "Int"))
4345 then {
44- let q = n
45- q
46+ let r = o
47+ r
4648 }
4749 else 0
4850 }
4951
5052
51-func r () = {
52- let n = getInteger(this, b)
53- if ($isInstanceOf(n, "Int"))
53+func s () = {
54+ let o = getInteger(this, b)
55+ if ($isInstanceOf(o, "Int"))
5456 then {
55- let q = n
56- q
57+ let r = o
58+ r
5759 }
5860 else 0
5961 }
6062
6163
62-func s (t) = {
63- let n = getString(this, t)
64- if ($isInstanceOf(n, "String"))
64+func t () = {
65+ let o = getInteger(this, d)
66+ if ($isInstanceOf(o, "Int"))
6567 then {
66- let u = n
67- u
68+ let r = o
69+ r
70+ }
71+ else 0
72+ }
73+
74+
75+func u (v) = {
76+ let o = getString(this, v)
77+ if ($isInstanceOf(o, "String"))
78+ then {
79+ let w = o
80+ w
6881 }
6982 else "0_0_0_0_0"
7083 }
7184
7285
73-func v (t) = {
74- let n = getString(this, t)
75- if ($isInstanceOf(n, "String"))
86+func x (v) = {
87+ let o = getString(this, v)
88+ if ($isInstanceOf(o, "String"))
7689 then {
77- let u = n
90+ let w = o
7891 true
7992 }
8093 else false
8194 }
8295
8396
84-func w (x,y,z,A,B) = ((((((((toString(x) + "_") + toString(y)) + "_") + toString(z)) + "_") + toString(A)) + "_") + toString(B))
97+func y (z,A,B,C,D) = ((((((((toString(z) + "_") + toString(A)) + "_") + toString(B)) + "_") + toString(C)) + "_") + toString(D))
8598
8699
87-func C (t) = {
88- let D = split(s(t), "_")
89- let E = parseIntValue(D[g])
90- let F = parseIntValue(D[h])
91- let z = parseIntValue(D[i])
92- let A = parseIntValue(D[j])
93- let B = parseIntValue(D[k])
94-[E, F, z, A, B]
100+func E (v) = {
101+ let F = split(u(v), "_")
102+ let G = parseIntValue(F[h])
103+ let H = parseIntValue(F[i])
104+ let B = parseIntValue(F[j])
105+ let C = parseIntValue(F[k])
106+ let D = parseIntValue(F[l])
107+[G, H, B, C, D]
95108 }
96109
97110
98-@Callable(G)
111+@Callable(I)
99112 func lock () = {
100- let H = extract(G.payment)
101- if (if ((H.assetId != d))
102- then (H.assetId != e)
113+ let J = extract(I.payment)
114+ if (if ((J.assetId != e))
115+ then (J.assetId != f)
103116 else false)
104117 then throw("The token should be in WBET or ROYAL.")
105118 else {
106- let t = toString(G.caller)
107- let I = C(t)
108- if ((H.assetId == d))
119+ let v = toString(I.caller)
120+ let K = E(v)
121+ if ((J.assetId == e))
109122 then {
110- let J = (p() + H.amount)
111- let K = (I[g] + H.amount)
112- if (v(t))
113- then ScriptResult(WriteSet([DataEntry(a, J), DataEntry(t, w(K, I[h], I[i], I[j], I[k]))]), TransferSet(nil))
123+ let L = (q() + J.amount)
124+ let M = (K[h] + J.amount)
125+ if (x(v))
126+ then ScriptResult(WriteSet([DataEntry(a, L), DataEntry(v, y(M, K[i], K[j], K[k], K[l]))]), TransferSet(nil))
114127 else {
115- let L = l()
116- ScriptResult(WriteSet([DataEntry(c, L), DataEntry(a, J), DataEntry(t, w(K, I[h], I[i], I[j], I[k]))]), TransferSet(nil))
128+ let N = m()
129+ ScriptResult(WriteSet([DataEntry(c, N), DataEntry(a, L), DataEntry(v, y(M, K[i], K[j], K[k], K[l]))]), TransferSet(nil))
117130 }
118131 }
119- else if ((H.assetId == e))
132+ else if ((J.assetId == f))
120133 then {
121- let M = (r() + H.amount)
122- let N = (I[h] + H.amount)
123- if (v(t))
124- then ScriptResult(WriteSet([DataEntry(b, M), DataEntry(t, w(I[g], N, I[i], I[j], I[k]))]), TransferSet(nil))
134+ let O = (s() + J.amount)
135+ let P = (K[i] + J.amount)
136+ if (x(v))
137+ then ScriptResult(WriteSet([DataEntry(b, O), DataEntry(v, y(K[h], P, K[j], K[k], K[l]))]), TransferSet(nil))
125138 else {
126- let L = l()
127- ScriptResult(WriteSet([DataEntry(c, L), DataEntry(b, M), DataEntry(t, w(I[g], N, I[i], I[j], I[k]))]), TransferSet(nil))
139+ let N = m()
140+ ScriptResult(WriteSet([DataEntry(c, N), DataEntry(b, O), DataEntry(v, y(K[h], P, K[j], K[k], K[l]))]), TransferSet(nil))
128141 }
129142 }
130143 else throw("error")
133146
134147
135148
136-@Callable(G)
137-func unlock (O) = {
138- let t = toString(G.caller)
139- let I = C(t)
140- if ((O == "WBET"))
141- then if ((0 >= I[g]))
149+@Callable(I)
150+func unlock (Q) = {
151+ let v = toString(I.caller)
152+ let K = E(v)
153+ if ((Q == "WBET"))
154+ then if ((0 >= K[h]))
142155 then throw("You dont have enough balance to withdraw the amount requested.")
143156 else {
144- let J = (p() - I[g])
145- ScriptResult(WriteSet([DataEntry(a, J), DataEntry(t, w(0, I[h], I[i], I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[g], d)]))
157+ let L = (q() - K[h])
158+ ScriptResult(WriteSet([DataEntry(a, L), DataEntry(v, y(0, K[i], K[j], K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[h], e)]))
146159 }
147- else if ((O == "ROYAL"))
148- then if ((0 >= I[h]))
160+ else if ((Q == "ROYAL"))
161+ then if ((0 >= K[i]))
149162 then throw("You dont have enough balance to withdraw the amount requested.")
150163 else {
151- let M = (r() - I[h])
152- ScriptResult(WriteSet([DataEntry(b, M), DataEntry(t, w(I[g], 0, I[i], I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[h], e)]))
164+ let O = (s() - K[i])
165+ ScriptResult(WriteSet([DataEntry(b, O), DataEntry(v, y(K[h], 0, K[j], K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[i], f)]))
153166 }
154167 else throw("Invalid asset")
155168 }
156169
157170
158171
159-@Callable(G)
160-func withdraw (O) = {
161- let t = toString(G.caller)
162- let I = C(t)
163- if ((O == "WBET"))
164- then if ((0 >= I[i]))
172+@Callable(I)
173+func withdraw (Q) = {
174+ let v = toString(I.caller)
175+ let K = E(v)
176+ if ((Q == "WBET"))
177+ then if ((0 >= K[j]))
165178 then throw("You dont have enough balance to withdraw the amount requested.")
166- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], 0, I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[i], d)]))
167- else if ((O == "ROYAL"))
168- then if ((0 >= I[j]))
179+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], 0, K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[j], e)]))
180+ else if ((Q == "ROYAL"))
181+ then if ((0 >= K[k]))
169182 then throw("You dont have enough balance to withdraw the amount requested.")
170- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], 0, I[k]))]), TransferSet([ScriptTransfer(G.caller, I[j], e)]))
171- else if ((O == "WAVES"))
172- then if ((0 >= I[k]))
183+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], 0, K[l]))]), TransferSet([ScriptTransfer(I.caller, K[k], f)]))
184+ else if ((Q == "WAVES"))
185+ then if ((0 >= K[l]))
173186 then throw("You dont have enough balance to withdraw the amount requested.")
174- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], I[i], 0))]), TransferSet([ScriptTransfer(G.caller, I[k], unit)]))
187+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], K[j], 0))]), TransferSet([ScriptTransfer(I.caller, K[l], unit)]))
175188 else throw("Invalid asset")
176189 }
177190
178191
179192
180-@Callable(G)
181-func addWithdraw (t) = if ((G.caller == f))
193+@Callable(I)
194+func addWithdraw (v) = if ((I.caller == g))
182195 then {
183- let H = extract(G.payment)
184- let I = C(t)
185- if ((H.assetId == d))
196+ let J = extract(I.payment)
197+ let K = E(v)
198+ if ((J.assetId == e))
186199 then {
187- let P = (I[i] + H.amount)
188- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], P, I[j], I[k]))]), TransferSet(nil))
200+ let R = (K[j] + J.amount)
201+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], R, K[k], K[l]))]), TransferSet(nil))
189202 }
190- else if ((H.assetId == e))
203+ else if ((J.assetId == f))
191204 then {
192- let Q = (I[j] + H.amount)
193- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], Q, I[k]))]), TransferSet(nil))
205+ let S = (K[k] + J.amount)
206+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], S, K[l]))]), TransferSet(nil))
194207 }
195- else if ((H.assetId == unit))
208+ else if ((J.assetId == unit))
196209 then {
197- let R = (I[k] + H.amount)
198- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], I[j], R))]), TransferSet(nil))
210+ let T = (K[l] + J.amount)
211+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], K[k], T))]), TransferSet(nil))
199212 }
200213 else throw("Invalid asset")
214+ }
215+ else throw("You do not have permission to perform this function.")
216+
217+
218+
219+@Callable(I)
220+func addCommunityFee () = {
221+ let J = extract(I.payment)
222+ if ((J.assetId != assetInfo(base58'WAVES')))
223+ then throw("Payment should be in WAVES.")
224+ else {
225+ let U = (t() + J.amount)
226+ ScriptResult(WriteSet([DataEntry(d, U)]), TransferSet(nil))
227+ }
228+ }
229+
230+
231+
232+@Callable(I)
233+func getCommunityFee (V) = if ((I.caller == g))
234+ then {
235+ let J = extract(I.payment)
236+ let W = t()
237+ if ((V > W))
238+ then throw("You dont have enough balance to transfer the amount requested.")
239+ else {
240+ let U = (W - V)
241+ ScriptResult(WriteSet([DataEntry(d, U)]), TransferSet([ScriptTransfer(g, V, unit)]))
242+ }
201243 }
202244 else throw("You do not have permission to perform this function.")
203245
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "$WBET_LOCKED_AMOUNT"
55
66 let b = "$ROYAL_LOCKER_AMOUNT"
77
88 let c = "$WALLET_NUM"
99
10-let d = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
10+let d = "$COMMUNITYFEE_AMOUNT"
1111
12-let e = base58'5a6rvDEiVwvhTvTH6ce2qFwqdCt3VKaHKXEpwLXXVvyy'
12+let e = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
1313
14-let f = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
14+let f = base58'5a6rvDEiVwvhTvTH6ce2qFwqdCt3VKaHKXEpwLXXVvyy'
1515
16-let g = 0
16+let g = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1717
18-let h = 1
18+let h = 0
1919
20-let i = 2
20+let i = 1
2121
22-let j = 3
22+let j = 2
2323
24-let k = 4
24+let k = 3
2525
26-func l () = {
27- let m = {
28- let n = getInteger(this, c)
29- if ($isInstanceOf(n, "Int"))
26+let l = 4
27+
28+func m () = {
29+ let n = {
30+ let o = getInteger(this, c)
31+ if ($isInstanceOf(o, "Int"))
3032 then {
31- let o = n
32- o
33+ let p = o
34+ p
3335 }
3436 else 0
3537 }
36- (m + 1)
38+ (n + 1)
3739 }
3840
3941
40-func p () = {
41- let n = getInteger(this, a)
42- if ($isInstanceOf(n, "Int"))
42+func q () = {
43+ let o = getInteger(this, a)
44+ if ($isInstanceOf(o, "Int"))
4345 then {
44- let q = n
45- q
46+ let r = o
47+ r
4648 }
4749 else 0
4850 }
4951
5052
51-func r () = {
52- let n = getInteger(this, b)
53- if ($isInstanceOf(n, "Int"))
53+func s () = {
54+ let o = getInteger(this, b)
55+ if ($isInstanceOf(o, "Int"))
5456 then {
55- let q = n
56- q
57+ let r = o
58+ r
5759 }
5860 else 0
5961 }
6062
6163
62-func s (t) = {
63- let n = getString(this, t)
64- if ($isInstanceOf(n, "String"))
64+func t () = {
65+ let o = getInteger(this, d)
66+ if ($isInstanceOf(o, "Int"))
6567 then {
66- let u = n
67- u
68+ let r = o
69+ r
70+ }
71+ else 0
72+ }
73+
74+
75+func u (v) = {
76+ let o = getString(this, v)
77+ if ($isInstanceOf(o, "String"))
78+ then {
79+ let w = o
80+ w
6881 }
6982 else "0_0_0_0_0"
7083 }
7184
7285
73-func v (t) = {
74- let n = getString(this, t)
75- if ($isInstanceOf(n, "String"))
86+func x (v) = {
87+ let o = getString(this, v)
88+ if ($isInstanceOf(o, "String"))
7689 then {
77- let u = n
90+ let w = o
7891 true
7992 }
8093 else false
8194 }
8295
8396
84-func w (x,y,z,A,B) = ((((((((toString(x) + "_") + toString(y)) + "_") + toString(z)) + "_") + toString(A)) + "_") + toString(B))
97+func y (z,A,B,C,D) = ((((((((toString(z) + "_") + toString(A)) + "_") + toString(B)) + "_") + toString(C)) + "_") + toString(D))
8598
8699
87-func C (t) = {
88- let D = split(s(t), "_")
89- let E = parseIntValue(D[g])
90- let F = parseIntValue(D[h])
91- let z = parseIntValue(D[i])
92- let A = parseIntValue(D[j])
93- let B = parseIntValue(D[k])
94-[E, F, z, A, B]
100+func E (v) = {
101+ let F = split(u(v), "_")
102+ let G = parseIntValue(F[h])
103+ let H = parseIntValue(F[i])
104+ let B = parseIntValue(F[j])
105+ let C = parseIntValue(F[k])
106+ let D = parseIntValue(F[l])
107+[G, H, B, C, D]
95108 }
96109
97110
98-@Callable(G)
111+@Callable(I)
99112 func lock () = {
100- let H = extract(G.payment)
101- if (if ((H.assetId != d))
102- then (H.assetId != e)
113+ let J = extract(I.payment)
114+ if (if ((J.assetId != e))
115+ then (J.assetId != f)
103116 else false)
104117 then throw("The token should be in WBET or ROYAL.")
105118 else {
106- let t = toString(G.caller)
107- let I = C(t)
108- if ((H.assetId == d))
119+ let v = toString(I.caller)
120+ let K = E(v)
121+ if ((J.assetId == e))
109122 then {
110- let J = (p() + H.amount)
111- let K = (I[g] + H.amount)
112- if (v(t))
113- then ScriptResult(WriteSet([DataEntry(a, J), DataEntry(t, w(K, I[h], I[i], I[j], I[k]))]), TransferSet(nil))
123+ let L = (q() + J.amount)
124+ let M = (K[h] + J.amount)
125+ if (x(v))
126+ then ScriptResult(WriteSet([DataEntry(a, L), DataEntry(v, y(M, K[i], K[j], K[k], K[l]))]), TransferSet(nil))
114127 else {
115- let L = l()
116- ScriptResult(WriteSet([DataEntry(c, L), DataEntry(a, J), DataEntry(t, w(K, I[h], I[i], I[j], I[k]))]), TransferSet(nil))
128+ let N = m()
129+ ScriptResult(WriteSet([DataEntry(c, N), DataEntry(a, L), DataEntry(v, y(M, K[i], K[j], K[k], K[l]))]), TransferSet(nil))
117130 }
118131 }
119- else if ((H.assetId == e))
132+ else if ((J.assetId == f))
120133 then {
121- let M = (r() + H.amount)
122- let N = (I[h] + H.amount)
123- if (v(t))
124- then ScriptResult(WriteSet([DataEntry(b, M), DataEntry(t, w(I[g], N, I[i], I[j], I[k]))]), TransferSet(nil))
134+ let O = (s() + J.amount)
135+ let P = (K[i] + J.amount)
136+ if (x(v))
137+ then ScriptResult(WriteSet([DataEntry(b, O), DataEntry(v, y(K[h], P, K[j], K[k], K[l]))]), TransferSet(nil))
125138 else {
126- let L = l()
127- ScriptResult(WriteSet([DataEntry(c, L), DataEntry(b, M), DataEntry(t, w(I[g], N, I[i], I[j], I[k]))]), TransferSet(nil))
139+ let N = m()
140+ ScriptResult(WriteSet([DataEntry(c, N), DataEntry(b, O), DataEntry(v, y(K[h], P, K[j], K[k], K[l]))]), TransferSet(nil))
128141 }
129142 }
130143 else throw("error")
131144 }
132145 }
133146
134147
135148
136-@Callable(G)
137-func unlock (O) = {
138- let t = toString(G.caller)
139- let I = C(t)
140- if ((O == "WBET"))
141- then if ((0 >= I[g]))
149+@Callable(I)
150+func unlock (Q) = {
151+ let v = toString(I.caller)
152+ let K = E(v)
153+ if ((Q == "WBET"))
154+ then if ((0 >= K[h]))
142155 then throw("You dont have enough balance to withdraw the amount requested.")
143156 else {
144- let J = (p() - I[g])
145- ScriptResult(WriteSet([DataEntry(a, J), DataEntry(t, w(0, I[h], I[i], I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[g], d)]))
157+ let L = (q() - K[h])
158+ ScriptResult(WriteSet([DataEntry(a, L), DataEntry(v, y(0, K[i], K[j], K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[h], e)]))
146159 }
147- else if ((O == "ROYAL"))
148- then if ((0 >= I[h]))
160+ else if ((Q == "ROYAL"))
161+ then if ((0 >= K[i]))
149162 then throw("You dont have enough balance to withdraw the amount requested.")
150163 else {
151- let M = (r() - I[h])
152- ScriptResult(WriteSet([DataEntry(b, M), DataEntry(t, w(I[g], 0, I[i], I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[h], e)]))
164+ let O = (s() - K[i])
165+ ScriptResult(WriteSet([DataEntry(b, O), DataEntry(v, y(K[h], 0, K[j], K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[i], f)]))
153166 }
154167 else throw("Invalid asset")
155168 }
156169
157170
158171
159-@Callable(G)
160-func withdraw (O) = {
161- let t = toString(G.caller)
162- let I = C(t)
163- if ((O == "WBET"))
164- then if ((0 >= I[i]))
172+@Callable(I)
173+func withdraw (Q) = {
174+ let v = toString(I.caller)
175+ let K = E(v)
176+ if ((Q == "WBET"))
177+ then if ((0 >= K[j]))
165178 then throw("You dont have enough balance to withdraw the amount requested.")
166- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], 0, I[j], I[k]))]), TransferSet([ScriptTransfer(G.caller, I[i], d)]))
167- else if ((O == "ROYAL"))
168- then if ((0 >= I[j]))
179+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], 0, K[k], K[l]))]), TransferSet([ScriptTransfer(I.caller, K[j], e)]))
180+ else if ((Q == "ROYAL"))
181+ then if ((0 >= K[k]))
169182 then throw("You dont have enough balance to withdraw the amount requested.")
170- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], 0, I[k]))]), TransferSet([ScriptTransfer(G.caller, I[j], e)]))
171- else if ((O == "WAVES"))
172- then if ((0 >= I[k]))
183+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], 0, K[l]))]), TransferSet([ScriptTransfer(I.caller, K[k], f)]))
184+ else if ((Q == "WAVES"))
185+ then if ((0 >= K[l]))
173186 then throw("You dont have enough balance to withdraw the amount requested.")
174- else ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], I[i], 0))]), TransferSet([ScriptTransfer(G.caller, I[k], unit)]))
187+ else ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], K[j], 0))]), TransferSet([ScriptTransfer(I.caller, K[l], unit)]))
175188 else throw("Invalid asset")
176189 }
177190
178191
179192
180-@Callable(G)
181-func addWithdraw (t) = if ((G.caller == f))
193+@Callable(I)
194+func addWithdraw (v) = if ((I.caller == g))
182195 then {
183- let H = extract(G.payment)
184- let I = C(t)
185- if ((H.assetId == d))
196+ let J = extract(I.payment)
197+ let K = E(v)
198+ if ((J.assetId == e))
186199 then {
187- let P = (I[i] + H.amount)
188- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], P, I[j], I[k]))]), TransferSet(nil))
200+ let R = (K[j] + J.amount)
201+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], R, K[k], K[l]))]), TransferSet(nil))
189202 }
190- else if ((H.assetId == e))
203+ else if ((J.assetId == f))
191204 then {
192- let Q = (I[j] + H.amount)
193- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], Q, I[k]))]), TransferSet(nil))
205+ let S = (K[k] + J.amount)
206+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], S, K[l]))]), TransferSet(nil))
194207 }
195- else if ((H.assetId == unit))
208+ else if ((J.assetId == unit))
196209 then {
197- let R = (I[k] + H.amount)
198- ScriptResult(WriteSet([DataEntry(t, w(I[g], I[h], I[i], I[j], R))]), TransferSet(nil))
210+ let T = (K[l] + J.amount)
211+ ScriptResult(WriteSet([DataEntry(v, y(K[h], K[i], K[j], K[k], T))]), TransferSet(nil))
199212 }
200213 else throw("Invalid asset")
214+ }
215+ else throw("You do not have permission to perform this function.")
216+
217+
218+
219+@Callable(I)
220+func addCommunityFee () = {
221+ let J = extract(I.payment)
222+ if ((J.assetId != assetInfo(base58'WAVES')))
223+ then throw("Payment should be in WAVES.")
224+ else {
225+ let U = (t() + J.amount)
226+ ScriptResult(WriteSet([DataEntry(d, U)]), TransferSet(nil))
227+ }
228+ }
229+
230+
231+
232+@Callable(I)
233+func getCommunityFee (V) = if ((I.caller == g))
234+ then {
235+ let J = extract(I.payment)
236+ let W = t()
237+ if ((V > W))
238+ then throw("You dont have enough balance to transfer the amount requested.")
239+ else {
240+ let U = (W - V)
241+ ScriptResult(WriteSet([DataEntry(d, U)]), TransferSet([ScriptTransfer(g, V, unit)]))
242+ }
201243 }
202244 else throw("You do not have permission to perform this function.")
203245
204246

github/deemru/w8io/026f985 
73.29 ms