tx · GXakgudwXb6iNeXLgPb2CrJxYW48UHHTSKQDJCuZNP26

3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu:  -0.01400000 Waves

2020.11.24 10:05 [1279173] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves

{ "type": 13, "id": "GXakgudwXb6iNeXLgPb2CrJxYW48UHHTSKQDJCuZNP26", "fee": 1400000, "feeAssetId": null, "timestamp": 1606201545389, "version": 2, "chainId": 84, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "4G6mW7iDKCSRgcfPVNuGaqfdSBh2mjjAoPfWZ8Y6XgeH2sqjYybiyLqtUxhWiwfRnXG3jvhSRixw1Ah9AwcYgHQe" ], "script": "base64:AAIDAAAAAAAAACwIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQESAwoBAQAAABUAAAAABnVwVm90ZQIAAAAGdXB2b3RlAAAAAA1hZG1pbkFkZHJlc3MxAQAAABoBVDi2IViANlgIPSCUAVQpoGSXhJ2Tw/Y0iwAAAAANYWRtaW5BZGRyZXNzMgEAAAAaAVTlj1A9878YQ058BBZUI9QC+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgfqtB2c5SyrdhjTSeT2NUMvY45D97zjqBcAiarzFPFmsBAAAADWdldFByb2ZpbGVLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAAmlkAgAAABRfZW50cmVwcmVuZXVyUHJvZmlsZQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAHX3N0YXR1cwEAAAARZ2V0Vm90ZXJBbW91bnRLZXkAAAACAAAAAmlkAAAABnZvdGVJZAkAASwAAAACCQABLAAAAAIJAAEsA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AAwkAAAAAAAACBQAAAAxjdXJyZW50U3Rha2UAAAAAAAAAAAAJAAACAAAAAQIAAAAZWW91IGRvbid0IGhhdmUgYW55IHN0YWtlcwMJAAAAAAAAAgUAAAAJc3Rha2VQb29sAAAAAAAAAAAACQAAAgAAAAECAAAAM05vdGhpbmcgaW4gU3Rha2UgcG9vbCBhdCB0aGlzIHRpbWUuIFRyeSBhZ2FpbiBsYXRlcgMJAABmAAAAAgUAAAAGcmV3YXJkBQAAAAlzdGFrZVBvb2wJAAACAAAAAQIAAAAXTm8gcmV3YXJkcyBhdCB0aGlzIHRpbWUEAAAADG5ld1N0YWtlUG9vbAkAAGUAAAACBQAAAAlzdGFrZVBvb2wFAAAABnJld2FyZAQAAAAObmV3U3Rha2VBbW91bnQJAABlAAAAAgUAAAAMY3VycmVudFN0YWtlBQAAAAZyZXdhcmQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0U3Rha2VyS2V5AAAAAQUAAAAGc3Rha2VyBQAAAA5uZXdTdGFrZUFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAD2dldFN0YWtlUG9vbEtleQAAAAAFAAAADG5ld1N0YWtlUG9vbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGcmV3YXJkBQAAAAVkeXpJZAUAAAADbmlsAAAAANPbkTU=", "height": 1279173, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6XH57mNapFhK5QeFe4fpMET2nkXmFf9d3z95KVKQVR9D Next: 3CHyyt5jbdWJLwefWPdFLsoULr7esVBNzRjDoaREYCPy Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "upvote"
55
6-let b = base58'3N5cTHzbHc9dyQuBfKMjFKaxcrmRq54XDLu'
6+let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
8-let c = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
8+let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
99
10-func d () = "stake_pool"
10+let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
11+
12+let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
13+
14+func f (g) = (g + "_entrepreneurProfile")
1115
1216
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- }
17+func h (g) = (g + "_status")
2218
2319
24-func h (i) = (i + "_stake")
20+func i (g,j) = (((g + "_") + j) + "_amount")
2521
2622
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")
23+func k (g,l) = if ((l == "upvote"))
24+ then (g + "_upvote")
4625 else throw("Invalid vote type")
4726
4827
49-func p (l) = {
50- let f = getString(this, k(l))
51- if ($isInstanceOf(f, "String"))
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"))
5236 then {
53- let g = f
37+ let p = o
5438 true
5539 }
5640 else false
5741 }
5842
5943
60-func q (r) = {
61- let f = getString(this, m(r))
62- if ($isInstanceOf(f, "String"))
44+func q (j) = {
45+ let o = getString(this, h(j))
46+ if ($isInstanceOf(o, "String"))
6347 then {
64- let g = f
65- g
48+ let p = o
49+ p
6650 }
6751 else false
6852 }
6953
7054
71-func s (r,t) = {
72- let f = getInteger(this, n(r, t))
73- if ($isInstanceOf(f, "Int"))
55+func r (j,s) = {
56+ let o = getInteger(this, k(j, s))
57+ if ($isInstanceOf(o, "Int"))
7458 then {
75- let g = f
76- g
59+ let p = o
60+ p
7761 }
7862 else throw("Not a valid vote ID")
7963 }
8064
8165
82-func u (v,r) = ((((v + "_") + r) + "_") + "vote")
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+ }
8375
8476
85-func w (v,r) = {
86- let f = getString(this, u(v, r))
87- if ($isInstanceOf(f, "String"))
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"))
8883 then {
89- let g = f
90- g
84+ let p = o
85+ p
9186 }
9287 else ""
9388 }
9489
9590
96-func x (v,r) = {
97- let y = w(v, r)
91+func x (v,j) = {
92+ let y = w(v, j)
9893 if ((y == ""))
9994 then true
10095 else false
10196 }
10297
10398
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")])
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")])
110136 }
137+ else throw("Only Dyzrupt Admin can call this dApp function")
111138
112139
113140
114-@Callable(z)
115-func vote (r,t) = {
116- let G = extract(z.payment)
117- if ((G.amount == 0))
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))
118146 then throw("You cannot vote without paying voting fee")
119- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
147+ else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
120148 then throw("You can only vote with DYZRUPT token")
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))
149+ else if (x(y, j))
150+ then if (n(j))
151+ then if ((q(j) == "open"))
152+ then if ((s == a))
125153 then {
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)]))
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)]))
129159 }
130160 else throw("Not a valid vote value")
131161 else throw("This profile is not open for voting")
135165
136166
137167
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")])
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")])
143176 else throw("Invalid ID")
177+ else throw("Only Dyzrupt Admin can call this dApp function")
144178
145179
146180
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")])
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")])
152189 else throw("Invalid ID")
190+ else throw("Only Dyzrupt Admin can call this dApp function")
153191
154192
155193
156-@Callable(z)
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)
157221 func stake () = {
158- let i = toBase58String(z.caller.bytes)
159- let G = extract(z.payment)
160- if ((G.amount == 0))
222+ let A = toBase58String(E.caller.bytes)
223+ let L = extract(E.payment)
224+ if ((L.amount == 0))
161225 then throw("Stake amount too low")
162- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
226+ else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
163227 then throw("You can only stake with DYZRUPT token")
164228 else {
165- let J = j(i)
166- let K = fraction(G.amount, 5, 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))
229+ let S = B(A)
230+ let T = (20 / 100)
231+ let U = (L.amount * T)
232+ let V = (L.amount - U)
233+ let W = (S + V)
234+ ScriptResult(WriteSet([DataEntry(z(A), W)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
172235 }
173236 }
174237
175238
176239
177-@Callable(z)
178-func unstake (P) = {
179- let i = toBase58String(z.caller.bytes)
180- let J = j(i)
181- if ((J == 0))
240+@Callable(E)
241+func unstake (X) = {
242+ let A = toBase58String(E.caller.bytes)
243+ let S = B(A)
244+ if ((S == 0))
182245 then throw("You don't have any stakes")
183- else if ((P > J))
246+ else if ((X > S))
184247 then throw("You can't withdraw an amount higher than you staked")
185248 else {
186- let Q = fraction(P, 10, 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)]))
249+ let W = (S - X)
250+ ScriptResult(WriteSet([DataEntry(z(A), W)]), TransferSet([ScriptTransfer(E.caller, X, e)]))
192251 }
193252 }
194253
195254
196255
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))
256+@Callable(E)
257+func claimDailyStakeReward (Y) = {
258+ let A = toBase58String(E.caller.bytes)
259+ let S = B(A)
260+ let Z = D()
261+ if ((S == 0))
203262 then throw("You don't have any stakes")
204- else if ((N == 0))
263+ else if ((Z == 0))
205264 then throw("Nothing in Stake pool at this time. Try again later")
206- else if ((T > N))
265+ else if ((Y > Z))
207266 then throw("No rewards at this time")
208267 else {
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)]))
268+ let aa = (Z - Y)
269+ let ab = (S - Y)
270+ ScriptResult(WriteSet([DataEntry(z(A), ab), DataEntry(C(), aa)]), TransferSet([ScriptTransfer(E.caller, Y, e)]))
212271 }
213272 }
214273
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "upvote"
55
6-let b = base58'3N5cTHzbHc9dyQuBfKMjFKaxcrmRq54XDLu'
6+let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
8-let c = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
8+let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
99
10-func d () = "stake_pool"
10+let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
11+
12+let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
13+
14+func f (g) = (g + "_entrepreneurProfile")
1115
1216
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- }
17+func h (g) = (g + "_status")
2218
2319
24-func h (i) = (i + "_stake")
20+func i (g,j) = (((g + "_") + j) + "_amount")
2521
2622
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")
23+func k (g,l) = if ((l == "upvote"))
24+ then (g + "_upvote")
4625 else throw("Invalid vote type")
4726
4827
49-func p (l) = {
50- let f = getString(this, k(l))
51- if ($isInstanceOf(f, "String"))
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"))
5236 then {
53- let g = f
37+ let p = o
5438 true
5539 }
5640 else false
5741 }
5842
5943
60-func q (r) = {
61- let f = getString(this, m(r))
62- if ($isInstanceOf(f, "String"))
44+func q (j) = {
45+ let o = getString(this, h(j))
46+ if ($isInstanceOf(o, "String"))
6347 then {
64- let g = f
65- g
48+ let p = o
49+ p
6650 }
6751 else false
6852 }
6953
7054
71-func s (r,t) = {
72- let f = getInteger(this, n(r, t))
73- if ($isInstanceOf(f, "Int"))
55+func r (j,s) = {
56+ let o = getInteger(this, k(j, s))
57+ if ($isInstanceOf(o, "Int"))
7458 then {
75- let g = f
76- g
59+ let p = o
60+ p
7761 }
7862 else throw("Not a valid vote ID")
7963 }
8064
8165
82-func u (v,r) = ((((v + "_") + r) + "_") + "vote")
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+ }
8375
8476
85-func w (v,r) = {
86- let f = getString(this, u(v, r))
87- if ($isInstanceOf(f, "String"))
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"))
8883 then {
89- let g = f
90- g
84+ let p = o
85+ p
9186 }
9287 else ""
9388 }
9489
9590
96-func x (v,r) = {
97- let y = w(v, r)
91+func x (v,j) = {
92+ let y = w(v, j)
9893 if ((y == ""))
9994 then true
10095 else false
10196 }
10297
10398
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")])
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")])
110136 }
137+ else throw("Only Dyzrupt Admin can call this dApp function")
111138
112139
113140
114-@Callable(z)
115-func vote (r,t) = {
116- let G = extract(z.payment)
117- if ((G.amount == 0))
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))
118146 then throw("You cannot vote without paying voting fee")
119- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
147+ else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
120148 then throw("You can only vote with DYZRUPT token")
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))
149+ else if (x(y, j))
150+ then if (n(j))
151+ then if ((q(j) == "open"))
152+ then if ((s == a))
125153 then {
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)]))
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)]))
129159 }
130160 else throw("Not a valid vote value")
131161 else throw("This profile is not open for voting")
132162 else throw("Invalid Profile")
133163 else throw("You can't vote twice")
134164 }
135165
136166
137167
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")])
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")])
143176 else throw("Invalid ID")
177+ else throw("Only Dyzrupt Admin can call this dApp function")
144178
145179
146180
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")])
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")])
152189 else throw("Invalid ID")
190+ else throw("Only Dyzrupt Admin can call this dApp function")
153191
154192
155193
156-@Callable(z)
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)
157221 func stake () = {
158- let i = toBase58String(z.caller.bytes)
159- let G = extract(z.payment)
160- if ((G.amount == 0))
222+ let A = toBase58String(E.caller.bytes)
223+ let L = extract(E.payment)
224+ if ((L.amount == 0))
161225 then throw("Stake amount too low")
162- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
226+ else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
163227 then throw("You can only stake with DYZRUPT token")
164228 else {
165- let J = j(i)
166- let K = fraction(G.amount, 5, 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))
229+ let S = B(A)
230+ let T = (20 / 100)
231+ let U = (L.amount * T)
232+ let V = (L.amount - U)
233+ let W = (S + V)
234+ ScriptResult(WriteSet([DataEntry(z(A), W)]), TransferSet([ScriptTransfer(this, L.amount, e)]))
172235 }
173236 }
174237
175238
176239
177-@Callable(z)
178-func unstake (P) = {
179- let i = toBase58String(z.caller.bytes)
180- let J = j(i)
181- if ((J == 0))
240+@Callable(E)
241+func unstake (X) = {
242+ let A = toBase58String(E.caller.bytes)
243+ let S = B(A)
244+ if ((S == 0))
182245 then throw("You don't have any stakes")
183- else if ((P > J))
246+ else if ((X > S))
184247 then throw("You can't withdraw an amount higher than you staked")
185248 else {
186- let Q = fraction(P, 10, 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)]))
249+ let W = (S - X)
250+ ScriptResult(WriteSet([DataEntry(z(A), W)]), TransferSet([ScriptTransfer(E.caller, X, e)]))
192251 }
193252 }
194253
195254
196255
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))
256+@Callable(E)
257+func claimDailyStakeReward (Y) = {
258+ let A = toBase58String(E.caller.bytes)
259+ let S = B(A)
260+ let Z = D()
261+ if ((S == 0))
203262 then throw("You don't have any stakes")
204- else if ((N == 0))
263+ else if ((Z == 0))
205264 then throw("Nothing in Stake pool at this time. Try again later")
206- else if ((T > N))
265+ else if ((Y > Z))
207266 then throw("No rewards at this time")
208267 else {
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)]))
268+ let aa = (Z - Y)
269+ let ab = (S - Y)
270+ ScriptResult(WriteSet([DataEntry(z(A), ab), DataEntry(C(), aa)]), TransferSet([ScriptTransfer(E.caller, Y, e)]))
212271 }
213272 }
214273
215274

github/deemru/w8io/026f985 
58.41 ms