tx · HiW16mYq6KyiLmdMS3vLGTRWu8widLEP9dKFYCw9kpxg

3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu:  -0.05000000 Waves

2020.11.15 17:31 [1266602] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves

{ "type": 13, "id": "HiW16mYq6KyiLmdMS3vLGTRWu8widLEP9dKFYCw9kpxg", "fee": 5000000, "feeAssetId": null, "timestamp": 1605450738161, "version": 2, "chainId": 84, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "2LLdiwjZvaLTCzaPCszkwBdtPFf8PXWoC8bHrv8Eetwn7oywjB9tsXwwfA1P2waBMkPndym7EGFG4pNGy2Wsot3t" ], "script": "base64:AAIDAAAAAAAAACcIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSABIDCgEBEgMKAQEAAAAQAAAAAAZ1cFZvdGUCAAAABnVwdm90ZQAAAAAMYWRtaW5BZGRyZXNzAQAAABoBVDi2IViANlgIPSCUAVQpoGSXhJ2Tw/Y0iwAAAAAFZHl6SWQBAAAAIH6rQdnOUsq3YY00nk9jVDL2OOQ/e846gXAImq8xTxZrAQAAAA9nZXRTdGFrZVBvb2xLZXkAAAAAAgAAAApzdGFrZV9wb29sAQAAAAxnZXRTdGFrZVBvb2wAAAAABAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAQAAAA9nZXRTdGFrZVBvb2xLZXkAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADGdldFN0YWtlcktleQAAAAEAAAAGc3Rha2VyCQABLAAAAAIFAAAABnN0YWtlcgIAAAAGX3N0YWtlAQAAAA9nZXRDdXJyZW50U3Rha2UAAAABAAAABnN0YWtlcgQAAAAHJG1hdGNoMAkABB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dhaW4gbGF0ZXIDCQAAZgAAAAIFAAAABnJld2FyZAUAAAAJc3Rha2VQb29sCQAAAgAAAAECAAAAF05vIHJld2FyZHMgYXQgdGhpcyB0aW1lBAAAAAxuZXdTdGFrZVBvb2wJAABlAAAAAgUAAAAJc3Rha2VQb29sBQAAAAZyZXdhcmQEAAAADm5ld1N0YWtlQW1vdW50CQAAZQAAAAIFAAAADGN1cnJlbnRTdGFrZQUAAAAGcmV3YXJkCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADGdldFN0YWtlcktleQAAAAEFAAAABnN0YWtlcgUAAAAObmV3U3Rha2VBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRTdGFrZVBvb2xLZXkAAAAABQAAAAxuZXdTdGFrZVBvb2wFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABnJld2FyZAUAAAAFZHl6SWQFAAAAA25pbAAAAABIs+xe", "height": 1266602, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DBo8gern8siwr5h3cZKaV1p9GPuNDkkPEMVQ9rAq7kuf Next: HXhCWcTPfxBjG9SJEiqG3XwWDgfubBxrWKxoe55NwkKR Diff:
OldNewDifferences
55
66 let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
8-let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
8+let c = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
99
10-let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
11-
12-let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
13-
14-func f (g) = (g + "_entrepreneurProfile")
10+func d () = "stake_pool"
1511
1612
17-func h (g) = (g + "_status")
13+func e () = {
14+ let f = getInteger(this, d())
15+ if ($isInstanceOf(f, "Int"))
16+ then {
17+ let g = f
18+ g
19+ }
20+ else 0
21+ }
1822
1923
20-func i (g,j) = (((g + "_") + j) + "_amount")
24+func h (i) = (i + "_stake")
2125
2226
23-func k (g,l) = if ((l == "upvote"))
24- then (g + "_upvote")
27+func j (i) = {
28+ let f = getInteger(this, h(i))
29+ if ($isInstanceOf(f, "Int"))
30+ then {
31+ let g = f
32+ g
33+ }
34+ else 0
35+ }
36+
37+
38+func k (l) = (l + "_entrepreneurProfile")
39+
40+
41+func m (l) = (l + "_status")
42+
43+
44+func n (l,o) = if ((o == "upvote"))
45+ then (l + "_upvote")
2546 else throw("Invalid vote type")
2647
2748
28-func m (g,l) = if ((l == "upvote"))
29- then (((g + "_") + l) + "_amount")
30- else throw("Invalid vote type")
31-
32-
33-func n (g) = {
34- let o = getString(this, f(g))
35- if ($isInstanceOf(o, "String"))
49+func p (l) = {
50+ let f = getString(this, k(l))
51+ if ($isInstanceOf(f, "String"))
3652 then {
37- let p = o
53+ let g = f
3854 true
3955 }
4056 else false
4157 }
4258
4359
44-func q (j) = {
45- let o = getString(this, h(j))
46- if ($isInstanceOf(o, "String"))
60+func q (r) = {
61+ let f = getString(this, m(r))
62+ if ($isInstanceOf(f, "String"))
4763 then {
48- let p = o
49- p
64+ let g = f
65+ g
5066 }
5167 else false
5268 }
5369
5470
55-func r (j,s) = {
56- let o = getInteger(this, k(j, s))
57- if ($isInstanceOf(o, "Int"))
71+func s (r,t) = {
72+ let f = getInteger(this, n(r, t))
73+ if ($isInstanceOf(f, "Int"))
5874 then {
59- let p = o
60- p
75+ let g = f
76+ g
6177 }
6278 else throw("Not a valid vote ID")
6379 }
6480
6581
66-func t (j,s) = {
67- let o = getInteger(this, m(j, s))
68- if ($isInstanceOf(o, "Int"))
69- then {
70- let p = o
71- p
72- }
73- else 0
74- }
82+func u (v,r) = ((((v + "_") + r) + "_") + "vote")
7583
7684
77-func u (v,j) = ((((v + "_") + j) + "_") + "vote")
78-
79-
80-func w (v,j) = {
81- let o = getString(this, u(v, j))
82- if ($isInstanceOf(o, "String"))
85+func w (v,r) = {
86+ let f = getString(this, u(v, r))
87+ if ($isInstanceOf(f, "String"))
8388 then {
84- let p = o
85- p
89+ let g = f
90+ g
8691 }
8792 else ""
8893 }
8994
9095
91-func x (v,j) = {
92- let y = w(v, j)
96+func x (v,r) = {
97+ let y = w(v, r)
9398 if ((y == ""))
9499 then true
95100 else false
96101 }
97102
98103
99-func z (A) = (A + "_stake")
100-
101-
102-func B (A) = {
103- let o = getInteger(this, z(A))
104- if ($isInstanceOf(o, "Int"))
105- then {
106- let p = o
107- p
108- }
109- else 0
110- }
111-
112-
113-func C () = "stake_pool"
114-
115-
116-func D () = {
117- let o = getInteger(this, C())
118- if ($isInstanceOf(o, "Int"))
119- then {
120- let p = o
121- p
122- }
123- else 0
124- }
125-
126-
127-@Callable(E)
128-func addEntrepreneurProfile (F,G,H,I,J) = if (if (if ((E.caller.bytes == b))
129- then true
130- else (E.caller.bytes == c))
131- then true
132- else (E.caller.bytes == d))
133- then {
134- let K = toBase58String(E.transactionId)
135- WriteSet([DataEntry(f(K), ((((((((F + "_") + G) + "_") + H) + "_") + I) + "_") + J)), DataEntry(k(K, "upvote"), 0), DataEntry(m(K, "upvote"), 0), DataEntry(h(K), "open")])
104+@Callable(z)
105+func addEntrepreneurProfile (A,B,C,D,E) = if ((z.caller.bytes != b))
106+ then throw("Only Dyzrupt Admin can call this dApp function")
107+ else {
108+ let F = toBase58String(z.transactionId)
109+ WriteSet([DataEntry(k(F), ((((((((A + "_") + B) + "_") + C) + "_") + D) + "_") + E)), DataEntry(n(F, "upvote"), 0), DataEntry(m(F), "open")])
136110 }
137- else throw("Only Dyzrupt Admin can call this dApp function")
138111
139112
140113
141-@Callable(E)
142-func vote (j,s) = {
143- let L = extract(E.payment)
144- let y = toBase58String(E.caller.bytes)
145- if ((L.amount == 0))
114+@Callable(z)
115+func vote (r,t) = {
116+ let G = extract(z.payment)
117+ if ((G.amount == 0))
146118 then throw("You cannot vote without paying voting fee")
147- else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
119+ else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
148120 then throw("You can only vote with DYZRUPT token")
149- else if (x(y, j))
150- then if (n(j))
151- then if ((q(j) == "open"))
152- then if ((s == a))
121+ else if (x(toBase58String(z.caller.bytes), r))
122+ then if (p(r))
123+ then if ((q(r) == "open"))
124+ then if ((t == a))
153125 then {
154- let M = r(j, s)
155- let N = t(j, s)
156- let O = (M + 1)
157- let P = (N + L.amount)
158- ScriptResult(WriteSet([DataEntry(k(j, s), O), DataEntry(u(y, j), j), DataEntry(i(y, j), L.amount), DataEntry(m(j, s), P)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
126+ let H = s(r, t)
127+ let I = (H + 1)
128+ ScriptResult(WriteSet([DataEntry(n(r, t), I), DataEntry(u(toBase58String(z.caller.bytes), r), r)]), TransferSet([ScriptTransfer(this, G.amount, c)]))
159129 }
160130 else throw("Not a valid vote value")
161131 else throw("This profile is not open for voting")
165135
166136
167137
168-@Callable(E)
169-func openVote (j) = if (if (if ((E.caller.bytes == b))
170- then true
171- else (E.caller.bytes == c))
172- then true
173- else (E.caller.bytes == d))
174- then if (n(j))
175- then WriteSet([DataEntry(h(j), "open")])
138+@Callable(z)
139+func openVote (r) = if ((z.caller.bytes != b))
140+ then throw("Only Dyzrupt Admin can call this dApp function")
141+ else if (p(r))
142+ then WriteSet([DataEntry(m(r), "open")])
176143 else throw("Invalid ID")
177- else throw("Only Dyzrupt Admin can call this dApp function")
178144
179145
180146
181-@Callable(E)
182-func closeVote (j) = if (if (if ((E.caller.bytes == b))
183- then true
184- else (E.caller.bytes == c))
185- then true
186- else (E.caller.bytes == d))
187- then if (n(j))
188- then WriteSet([DataEntry(h(j), "closed")])
147+@Callable(z)
148+func closeVote (r) = if ((z.caller.bytes != b))
149+ then throw("Only Dyzrupt Admin can call this dApp function")
150+ else if (p(r))
151+ then WriteSet([DataEntry(m(r), "closed")])
189152 else throw("Invalid ID")
190- else throw("Only Dyzrupt Admin can call this dApp function")
191153
192154
193155
194-@Callable(E)
195-func withdraw (j) = {
196- let y = toBase58String(E.caller.bytes)
197- if ((w(y, j) != ""))
198- then if ((q(j) == "closed"))
199- then {
200- let Q = i(y, j)
201- let R = {
202- let o = getInteger(this, Q)
203- if ($isInstanceOf(o, "Int"))
204- then {
205- let p = o
206- p
207- }
208- else throw("You didn't vote for this entrepreneur")
209- }
210- if ((R == 0))
211- then throw("Seems you have previously withdrawn.")
212- else ScriptResult(WriteSet([DataEntry(Q, 0)]), TransferSet([ScriptTransfer(E.caller, R, e)]))
213- }
214- else throw("Can't withdraw vote amount while voting is still open.")
215- else throw("You didn't vote for this entrepreneur")
216- }
217-
218-
219-
220-@Callable(E)
156+@Callable(z)
221157 func stake () = {
222- let A = toBase58String(E.caller.bytes)
223- let L = extract(E.payment)
224- if ((L.amount == 0))
158+ let i = toBase58String(z.caller.bytes)
159+ let G = extract(z.payment)
160+ if ((G.amount == 0))
225161 then throw("Stake amount too low")
226- else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
162+ else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
227163 then throw("You can only stake with DYZRUPT token")
228164 else {
229- let S = B(A)
230- let T = (10 / 100)
231- let U = (L.amount * T)
232- let V = (L.amount - U)
233- let W = (S + V)
234- let X = D()
235- let Y = (X + U)
236- ScriptResult(WriteSet([DataEntry(z(A), W), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
165+ let J = j(i)
166+ let K = fraction(G.amount, 10, 100)
167+ let L = (G.amount - K)
168+ let M = (J + L)
169+ let N = e()
170+ let O = (N + K)
171+ ScriptResult(WriteSet([DataEntry(h(i), M), DataEntry(d(), O)]), TransferSet(nil))
237172 }
238173 }
239174
240175
241176
242-@Callable(E)
243-func unstake (Z) = {
244- let A = toBase58String(E.caller.bytes)
245- let S = B(A)
246- if ((S == 0))
177+@Callable(z)
178+func unstake (P) = {
179+ let i = toBase58String(z.caller.bytes)
180+ let J = j(i)
181+ if ((J == 0))
247182 then throw("You don't have any stakes")
248- else if ((Z > S))
183+ else if ((P > J))
249184 then throw("You can't withdraw an amount higher than you staked")
250185 else {
251- let aa = (20 / 100)
252- let ab = (Z * aa)
253- let ac = (Z - ab)
254- let ad = (S - Z)
255- let X = D()
256- let Y = (X + ab)
257- ScriptResult(WriteSet([DataEntry(z(A), ad), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(E.caller, ac, e)]))
186+ let Q = fraction(P, 20, 100)
187+ let R = (P - Q)
188+ let S = (J - P)
189+ let N = e()
190+ let O = (N + Q)
191+ ScriptResult(WriteSet([DataEntry(h(i), S), DataEntry(d(), O)]), TransferSet([ScriptTransfer(z.caller, R, c)]))
258192 }
259193 }
260194
261195
262196
263-@Callable(E)
264-func claimDailyStakeReward (ae) = {
265- let A = toBase58String(E.caller.bytes)
266- let S = B(A)
267- let X = D()
268- if ((S == 0))
197+@Callable(z)
198+func claimDailyStakeReward (T) = {
199+ let i = toBase58String(z.caller.bytes)
200+ let J = j(i)
201+ let N = e()
202+ if ((J == 0))
269203 then throw("You don't have any stakes")
270- else if ((X == 0))
204+ else if ((N == 0))
271205 then throw("Nothing in Stake pool at this time. Try again later")
272- else if ((ae > X))
206+ else if ((T > N))
273207 then throw("No rewards at this time")
274208 else {
275- let Y = (X - ae)
276- let af = (S - ae)
277- ScriptResult(WriteSet([DataEntry(z(A), af), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(E.caller, ae, e)]))
209+ let O = (N - T)
210+ let U = (J - T)
211+ ScriptResult(WriteSet([DataEntry(h(i), U), DataEntry(d(), O)]), TransferSet([ScriptTransfer(z.caller, T, c)]))
278212 }
279213 }
280214
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "upvote"
55
66 let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
8-let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
8+let c = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
99
10-let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
11-
12-let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
13-
14-func f (g) = (g + "_entrepreneurProfile")
10+func d () = "stake_pool"
1511
1612
17-func h (g) = (g + "_status")
13+func e () = {
14+ let f = getInteger(this, d())
15+ if ($isInstanceOf(f, "Int"))
16+ then {
17+ let g = f
18+ g
19+ }
20+ else 0
21+ }
1822
1923
20-func i (g,j) = (((g + "_") + j) + "_amount")
24+func h (i) = (i + "_stake")
2125
2226
23-func k (g,l) = if ((l == "upvote"))
24- then (g + "_upvote")
27+func j (i) = {
28+ let f = getInteger(this, h(i))
29+ if ($isInstanceOf(f, "Int"))
30+ then {
31+ let g = f
32+ g
33+ }
34+ else 0
35+ }
36+
37+
38+func k (l) = (l + "_entrepreneurProfile")
39+
40+
41+func m (l) = (l + "_status")
42+
43+
44+func n (l,o) = if ((o == "upvote"))
45+ then (l + "_upvote")
2546 else throw("Invalid vote type")
2647
2748
28-func m (g,l) = if ((l == "upvote"))
29- then (((g + "_") + l) + "_amount")
30- else throw("Invalid vote type")
31-
32-
33-func n (g) = {
34- let o = getString(this, f(g))
35- if ($isInstanceOf(o, "String"))
49+func p (l) = {
50+ let f = getString(this, k(l))
51+ if ($isInstanceOf(f, "String"))
3652 then {
37- let p = o
53+ let g = f
3854 true
3955 }
4056 else false
4157 }
4258
4359
44-func q (j) = {
45- let o = getString(this, h(j))
46- if ($isInstanceOf(o, "String"))
60+func q (r) = {
61+ let f = getString(this, m(r))
62+ if ($isInstanceOf(f, "String"))
4763 then {
48- let p = o
49- p
64+ let g = f
65+ g
5066 }
5167 else false
5268 }
5369
5470
55-func r (j,s) = {
56- let o = getInteger(this, k(j, s))
57- if ($isInstanceOf(o, "Int"))
71+func s (r,t) = {
72+ let f = getInteger(this, n(r, t))
73+ if ($isInstanceOf(f, "Int"))
5874 then {
59- let p = o
60- p
75+ let g = f
76+ g
6177 }
6278 else throw("Not a valid vote ID")
6379 }
6480
6581
66-func t (j,s) = {
67- let o = getInteger(this, m(j, s))
68- if ($isInstanceOf(o, "Int"))
69- then {
70- let p = o
71- p
72- }
73- else 0
74- }
82+func u (v,r) = ((((v + "_") + r) + "_") + "vote")
7583
7684
77-func u (v,j) = ((((v + "_") + j) + "_") + "vote")
78-
79-
80-func w (v,j) = {
81- let o = getString(this, u(v, j))
82- if ($isInstanceOf(o, "String"))
85+func w (v,r) = {
86+ let f = getString(this, u(v, r))
87+ if ($isInstanceOf(f, "String"))
8388 then {
84- let p = o
85- p
89+ let g = f
90+ g
8691 }
8792 else ""
8893 }
8994
9095
91-func x (v,j) = {
92- let y = w(v, j)
96+func x (v,r) = {
97+ let y = w(v, r)
9398 if ((y == ""))
9499 then true
95100 else false
96101 }
97102
98103
99-func z (A) = (A + "_stake")
100-
101-
102-func B (A) = {
103- let o = getInteger(this, z(A))
104- if ($isInstanceOf(o, "Int"))
105- then {
106- let p = o
107- p
108- }
109- else 0
110- }
111-
112-
113-func C () = "stake_pool"
114-
115-
116-func D () = {
117- let o = getInteger(this, C())
118- if ($isInstanceOf(o, "Int"))
119- then {
120- let p = o
121- p
122- }
123- else 0
124- }
125-
126-
127-@Callable(E)
128-func addEntrepreneurProfile (F,G,H,I,J) = if (if (if ((E.caller.bytes == b))
129- then true
130- else (E.caller.bytes == c))
131- then true
132- else (E.caller.bytes == d))
133- then {
134- let K = toBase58String(E.transactionId)
135- WriteSet([DataEntry(f(K), ((((((((F + "_") + G) + "_") + H) + "_") + I) + "_") + J)), DataEntry(k(K, "upvote"), 0), DataEntry(m(K, "upvote"), 0), DataEntry(h(K), "open")])
104+@Callable(z)
105+func addEntrepreneurProfile (A,B,C,D,E) = if ((z.caller.bytes != b))
106+ then throw("Only Dyzrupt Admin can call this dApp function")
107+ else {
108+ let F = toBase58String(z.transactionId)
109+ WriteSet([DataEntry(k(F), ((((((((A + "_") + B) + "_") + C) + "_") + D) + "_") + E)), DataEntry(n(F, "upvote"), 0), DataEntry(m(F), "open")])
136110 }
137- else throw("Only Dyzrupt Admin can call this dApp function")
138111
139112
140113
141-@Callable(E)
142-func vote (j,s) = {
143- let L = extract(E.payment)
144- let y = toBase58String(E.caller.bytes)
145- if ((L.amount == 0))
114+@Callable(z)
115+func vote (r,t) = {
116+ let G = extract(z.payment)
117+ if ((G.amount == 0))
146118 then throw("You cannot vote without paying voting fee")
147- else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
119+ else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
148120 then throw("You can only vote with DYZRUPT token")
149- else if (x(y, j))
150- then if (n(j))
151- then if ((q(j) == "open"))
152- then if ((s == a))
121+ else if (x(toBase58String(z.caller.bytes), r))
122+ then if (p(r))
123+ then if ((q(r) == "open"))
124+ then if ((t == a))
153125 then {
154- let M = r(j, s)
155- let N = t(j, s)
156- let O = (M + 1)
157- let P = (N + L.amount)
158- ScriptResult(WriteSet([DataEntry(k(j, s), O), DataEntry(u(y, j), j), DataEntry(i(y, j), L.amount), DataEntry(m(j, s), P)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
126+ let H = s(r, t)
127+ let I = (H + 1)
128+ ScriptResult(WriteSet([DataEntry(n(r, t), I), DataEntry(u(toBase58String(z.caller.bytes), r), r)]), TransferSet([ScriptTransfer(this, G.amount, c)]))
159129 }
160130 else throw("Not a valid vote value")
161131 else throw("This profile is not open for voting")
162132 else throw("Invalid Profile")
163133 else throw("You can't vote twice")
164134 }
165135
166136
167137
168-@Callable(E)
169-func openVote (j) = if (if (if ((E.caller.bytes == b))
170- then true
171- else (E.caller.bytes == c))
172- then true
173- else (E.caller.bytes == d))
174- then if (n(j))
175- then WriteSet([DataEntry(h(j), "open")])
138+@Callable(z)
139+func openVote (r) = if ((z.caller.bytes != b))
140+ then throw("Only Dyzrupt Admin can call this dApp function")
141+ else if (p(r))
142+ then WriteSet([DataEntry(m(r), "open")])
176143 else throw("Invalid ID")
177- else throw("Only Dyzrupt Admin can call this dApp function")
178144
179145
180146
181-@Callable(E)
182-func closeVote (j) = if (if (if ((E.caller.bytes == b))
183- then true
184- else (E.caller.bytes == c))
185- then true
186- else (E.caller.bytes == d))
187- then if (n(j))
188- then WriteSet([DataEntry(h(j), "closed")])
147+@Callable(z)
148+func closeVote (r) = if ((z.caller.bytes != b))
149+ then throw("Only Dyzrupt Admin can call this dApp function")
150+ else if (p(r))
151+ then WriteSet([DataEntry(m(r), "closed")])
189152 else throw("Invalid ID")
190- else throw("Only Dyzrupt Admin can call this dApp function")
191153
192154
193155
194-@Callable(E)
195-func withdraw (j) = {
196- let y = toBase58String(E.caller.bytes)
197- if ((w(y, j) != ""))
198- then if ((q(j) == "closed"))
199- then {
200- let Q = i(y, j)
201- let R = {
202- let o = getInteger(this, Q)
203- if ($isInstanceOf(o, "Int"))
204- then {
205- let p = o
206- p
207- }
208- else throw("You didn't vote for this entrepreneur")
209- }
210- if ((R == 0))
211- then throw("Seems you have previously withdrawn.")
212- else ScriptResult(WriteSet([DataEntry(Q, 0)]), TransferSet([ScriptTransfer(E.caller, R, e)]))
213- }
214- else throw("Can't withdraw vote amount while voting is still open.")
215- else throw("You didn't vote for this entrepreneur")
216- }
217-
218-
219-
220-@Callable(E)
156+@Callable(z)
221157 func stake () = {
222- let A = toBase58String(E.caller.bytes)
223- let L = extract(E.payment)
224- if ((L.amount == 0))
158+ let i = toBase58String(z.caller.bytes)
159+ let G = extract(z.payment)
160+ if ((G.amount == 0))
225161 then throw("Stake amount too low")
226- else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
162+ else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
227163 then throw("You can only stake with DYZRUPT token")
228164 else {
229- let S = B(A)
230- let T = (10 / 100)
231- let U = (L.amount * T)
232- let V = (L.amount - U)
233- let W = (S + V)
234- let X = D()
235- let Y = (X + U)
236- ScriptResult(WriteSet([DataEntry(z(A), W), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
165+ let J = j(i)
166+ let K = fraction(G.amount, 10, 100)
167+ let L = (G.amount - K)
168+ let M = (J + L)
169+ let N = e()
170+ let O = (N + K)
171+ ScriptResult(WriteSet([DataEntry(h(i), M), DataEntry(d(), O)]), TransferSet(nil))
237172 }
238173 }
239174
240175
241176
242-@Callable(E)
243-func unstake (Z) = {
244- let A = toBase58String(E.caller.bytes)
245- let S = B(A)
246- if ((S == 0))
177+@Callable(z)
178+func unstake (P) = {
179+ let i = toBase58String(z.caller.bytes)
180+ let J = j(i)
181+ if ((J == 0))
247182 then throw("You don't have any stakes")
248- else if ((Z > S))
183+ else if ((P > J))
249184 then throw("You can't withdraw an amount higher than you staked")
250185 else {
251- let aa = (20 / 100)
252- let ab = (Z * aa)
253- let ac = (Z - ab)
254- let ad = (S - Z)
255- let X = D()
256- let Y = (X + ab)
257- ScriptResult(WriteSet([DataEntry(z(A), ad), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(E.caller, ac, e)]))
186+ let Q = fraction(P, 20, 100)
187+ let R = (P - Q)
188+ let S = (J - P)
189+ let N = e()
190+ let O = (N + Q)
191+ ScriptResult(WriteSet([DataEntry(h(i), S), DataEntry(d(), O)]), TransferSet([ScriptTransfer(z.caller, R, c)]))
258192 }
259193 }
260194
261195
262196
263-@Callable(E)
264-func claimDailyStakeReward (ae) = {
265- let A = toBase58String(E.caller.bytes)
266- let S = B(A)
267- let X = D()
268- if ((S == 0))
197+@Callable(z)
198+func claimDailyStakeReward (T) = {
199+ let i = toBase58String(z.caller.bytes)
200+ let J = j(i)
201+ let N = e()
202+ if ((J == 0))
269203 then throw("You don't have any stakes")
270- else if ((X == 0))
204+ else if ((N == 0))
271205 then throw("Nothing in Stake pool at this time. Try again later")
272- else if ((ae > X))
206+ else if ((T > N))
273207 then throw("No rewards at this time")
274208 else {
275- let Y = (X - ae)
276- let af = (S - ae)
277- ScriptResult(WriteSet([DataEntry(z(A), af), DataEntry(C(), Y)]), TransferSet([ScriptTransfer(E.caller, ae, e)]))
209+ let O = (N - T)
210+ let U = (J - T)
211+ ScriptResult(WriteSet([DataEntry(h(i), U), DataEntry(d(), O)]), TransferSet([ScriptTransfer(z.caller, T, c)]))
278212 }
279213 }
280214
281215

github/deemru/w8io/169f3d6 
55.97 ms