tx · DBo8gern8siwr5h3cZKaV1p9GPuNDkkPEMVQ9rAq7kuf 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu: -0.01400000 Waves 2020.11.13 09:37 [1263206] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves
{ "type": 13, "id": "DBo8gern8siwr5h3cZKaV1p9GPuNDkkPEMVQ9rAq7kuf", "fee": 1400000, "feeAssetId": null, "timestamp": 1605249433666, "version": 2, "chainId": 84, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "kjxYqAWr6cJjcCtiwxZAy4Hn2XkZn3cQzvJbwxDq8qAt1Nd2TT7QLDRKrUPpsHtkkvcUJFiPNF3fJ4WgCAmCd5v" ], "script": "base64:AAIDAAAAAAAAACwIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQESAwoBAQAAABUAAAAABnVwVm90ZQIAAAAGdXB2b3RlAAAAAA1hZG1pbkFkZHJlc3MxAQAAABoBVDi2IViANlgIPSCUAVQpoGSXhJ2Tw/Y0iwAAAAANYWRtaW5BZGRyZXNzMgEAAAAaAVTlj1A9878YQ058BBZUI9QC+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgfqtB2c5SyrdhjTSeT2NUMvY45D97zjqBcAiarzFPFmsBAAAADWdldFByb2ZpbGVLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAAmlkAgAAABRfZW50cmVwcmVuZXVyUHJvZmlsZQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAHX3N0YXR1cwEAAAARZ2V0Vm90ZXJBbW91bnRLZXkAAAACAAAAAmlkAAAABnZvdGVJZAkAASwAAAACCQABLAAAAAIJA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rZUFtb3VudAkAAGUAAAACBQAAAAxjdXJyZW50U3Rha2UFAAAABnJld2FyZAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAxnZXRTdGFrZXJLZXkAAAABBQAAAAZzdGFrZXIFAAAADm5ld1N0YWtlQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAPZ2V0U3Rha2VQb29sS2V5AAAAAAUAAAAMbmV3U3Rha2VQb29sBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZyZXdhcmQFAAAABWR5eklkBQAAAANuaWwAAAAA9l46oQ==", "height": 1263206, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p Next: HiW16mYq6KyiLmdMS3vLGTRWu8widLEP9dKFYCw9kpxg Diff:
Old | New | Differences | |
---|---|---|---|
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | - | @Callable(C) | |
114 | - | func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b)) | |
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)) | |
115 | 129 | then true | |
116 | - | else ( | |
130 | + | else (E.caller.bytes == c)) | |
117 | 131 | then true | |
118 | - | else ( | |
132 | + | else (E.caller.bytes == d)) | |
119 | 133 | then { | |
120 | - | let | |
121 | - | WriteSet([DataEntry(f( | |
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")]) | |
122 | 136 | } | |
123 | 137 | else throw("Only Dyzrupt Admin can call this dApp function") | |
124 | 138 | ||
125 | 139 | ||
126 | 140 | ||
127 | - | @Callable( | |
141 | + | @Callable(E) | |
128 | 142 | func vote (j,s) = { | |
129 | - | let | |
130 | - | let y = toBase58String( | |
131 | - | if (( | |
143 | + | let L = extract(E.payment) | |
144 | + | let y = toBase58String(E.caller.bytes) | |
145 | + | if ((L.amount == 0)) | |
132 | 146 | then throw("You cannot vote without paying voting fee") | |
133 | - | else if (( | |
147 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
134 | 148 | then throw("You can only vote with DYZRUPT token") | |
135 | 149 | else if (x(y, j)) | |
136 | 150 | then if (n(j)) | |
137 | 151 | then if ((q(j) == "open")) | |
138 | 152 | then if ((s == a)) | |
139 | 153 | then { | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | ScriptResult(WriteSet([DataEntry(k(j, s), | |
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)])) | |
145 | 159 | } | |
146 | 160 | else throw("Not a valid vote value") | |
147 | 161 | else throw("This profile is not open for voting") | |
151 | 165 | ||
152 | 166 | ||
153 | 167 | ||
154 | - | @Callable( | |
155 | - | func openVote (j) = if (if (if (( | |
168 | + | @Callable(E) | |
169 | + | func openVote (j) = if (if (if ((E.caller.bytes == b)) | |
156 | 170 | then true | |
157 | - | else ( | |
171 | + | else (E.caller.bytes == c)) | |
158 | 172 | then true | |
159 | - | else ( | |
173 | + | else (E.caller.bytes == d)) | |
160 | 174 | then if (n(j)) | |
161 | 175 | then WriteSet([DataEntry(h(j), "open")]) | |
162 | 176 | else throw("Invalid ID") | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
168 | - | func closeVote (j) = if (if (if (( | |
181 | + | @Callable(E) | |
182 | + | func closeVote (j) = if (if (if ((E.caller.bytes == b)) | |
169 | 183 | then true | |
170 | - | else ( | |
184 | + | else (E.caller.bytes == c)) | |
171 | 185 | then true | |
172 | - | else ( | |
186 | + | else (E.caller.bytes == d)) | |
173 | 187 | then if (n(j)) | |
174 | 188 | then WriteSet([DataEntry(h(j), "closed")]) | |
175 | 189 | else throw("Invalid ID") | |
177 | 191 | ||
178 | 192 | ||
179 | 193 | ||
180 | - | @Callable( | |
194 | + | @Callable(E) | |
181 | 195 | func withdraw (j) = { | |
182 | - | let y = toBase58String( | |
196 | + | let y = toBase58String(E.caller.bytes) | |
183 | 197 | if ((w(y, j) != "")) | |
184 | 198 | then if ((q(j) == "closed")) | |
185 | 199 | then { | |
186 | - | let | |
187 | - | let | |
188 | - | let o = getInteger(this, | |
200 | + | let Q = i(y, j) | |
201 | + | let R = { | |
202 | + | let o = getInteger(this, Q) | |
189 | 203 | if ($isInstanceOf(o, "Int")) | |
190 | 204 | then { | |
191 | 205 | let p = o | |
193 | 207 | } | |
194 | 208 | else throw("You didn't vote for this entrepreneur") | |
195 | 209 | } | |
196 | - | if (( | |
210 | + | if ((R == 0)) | |
197 | 211 | then throw("Seems you have previously withdrawn.") | |
198 | - | else ScriptResult(WriteSet([DataEntry( | |
212 | + | else ScriptResult(WriteSet([DataEntry(Q, 0)]), TransferSet([ScriptTransfer(E.caller, R, e)])) | |
199 | 213 | } | |
200 | 214 | else throw("Can't withdraw vote amount while voting is still open.") | |
201 | 215 | else throw("You didn't vote for this entrepreneur") | |
203 | 217 | ||
204 | 218 | ||
205 | 219 | ||
206 | - | @Callable( | |
220 | + | @Callable(E) | |
207 | 221 | func stake () = { | |
208 | - | let A = toBase58String( | |
209 | - | let | |
210 | - | if (( | |
222 | + | let A = toBase58String(E.caller.bytes) | |
223 | + | let L = extract(E.payment) | |
224 | + | if ((L.amount == 0)) | |
211 | 225 | then throw("Stake amount too low") | |
212 | - | else if (( | |
226 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
213 | 227 | then throw("You can only stake with DYZRUPT token") | |
214 | 228 | else { | |
215 | - | let Q = B(A) | |
216 | - | let R = (20 / 100) | |
217 | - | let S = (J.amount * R) | |
218 | - | let T = (J.amount - S) | |
219 | - | let U = (Q + T) | |
220 | - | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(this, J.amount, e)])) | |
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)])) | |
221 | 237 | } | |
222 | 238 | } | |
223 | 239 | ||
224 | 240 | ||
225 | 241 | ||
226 | - | @Callable( | |
227 | - | func unstake ( | |
228 | - | let A = toBase58String( | |
229 | - | let | |
230 | - | if (( | |
242 | + | @Callable(E) | |
243 | + | func unstake (Z) = { | |
244 | + | let A = toBase58String(E.caller.bytes) | |
245 | + | let S = B(A) | |
246 | + | if ((S == 0)) | |
231 | 247 | then throw("You don't have any stakes") | |
232 | - | else if (( | |
248 | + | else if ((Z > S)) | |
233 | 249 | then throw("You can't withdraw an amount higher than you staked") | |
234 | 250 | else { | |
235 | - | let U = (Q - V) | |
236 | - | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)])) | |
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)])) | |
237 | 258 | } | |
259 | + | } | |
260 | + | ||
261 | + | ||
262 | + | ||
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)) | |
269 | + | then throw("You don't have any stakes") | |
270 | + | else if ((X == 0)) | |
271 | + | then throw("Nothing in Stake pool at this time. Try again later") | |
272 | + | else if ((ae > X)) | |
273 | + | then throw("No rewards at this time") | |
274 | + | 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)])) | |
278 | + | } | |
238 | 279 | } | |
239 | 280 | ||
240 | 281 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "upvote" | |
5 | 5 | ||
6 | 6 | let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
7 | 7 | ||
8 | 8 | let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | 10 | let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | 11 | ||
12 | 12 | let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G' | |
13 | 13 | ||
14 | 14 | func f (g) = (g + "_entrepreneurProfile") | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func h (g) = (g + "_status") | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func i (g,j) = (((g + "_") + j) + "_amount") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (g,l) = if ((l == "upvote")) | |
24 | 24 | then (g + "_upvote") | |
25 | 25 | else throw("Invalid vote type") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func m (g,l) = if ((l == "upvote")) | |
29 | 29 | then (((g + "_") + l) + "_amount") | |
30 | 30 | else throw("Invalid vote type") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func n (g) = { | |
34 | 34 | let o = getString(this, f(g)) | |
35 | 35 | if ($isInstanceOf(o, "String")) | |
36 | 36 | then { | |
37 | 37 | let p = o | |
38 | 38 | true | |
39 | 39 | } | |
40 | 40 | else false | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func q (j) = { | |
45 | 45 | let o = getString(this, h(j)) | |
46 | 46 | if ($isInstanceOf(o, "String")) | |
47 | 47 | then { | |
48 | 48 | let p = o | |
49 | 49 | p | |
50 | 50 | } | |
51 | 51 | else false | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func r (j,s) = { | |
56 | 56 | let o = getInteger(this, k(j, s)) | |
57 | 57 | if ($isInstanceOf(o, "Int")) | |
58 | 58 | then { | |
59 | 59 | let p = o | |
60 | 60 | p | |
61 | 61 | } | |
62 | 62 | else throw("Not a valid vote ID") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func t (j,s) = { | |
67 | 67 | let o = getInteger(this, m(j, s)) | |
68 | 68 | if ($isInstanceOf(o, "Int")) | |
69 | 69 | then { | |
70 | 70 | let p = o | |
71 | 71 | p | |
72 | 72 | } | |
73 | 73 | else 0 | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func u (v,j) = ((((v + "_") + j) + "_") + "vote") | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func w (v,j) = { | |
81 | 81 | let o = getString(this, u(v, j)) | |
82 | 82 | if ($isInstanceOf(o, "String")) | |
83 | 83 | then { | |
84 | 84 | let p = o | |
85 | 85 | p | |
86 | 86 | } | |
87 | 87 | else "" | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func x (v,j) = { | |
92 | 92 | let y = w(v, j) | |
93 | 93 | if ((y == "")) | |
94 | 94 | then true | |
95 | 95 | else false | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func z (A) = (A + "_stake") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func B (A) = { | |
103 | 103 | let o = getInteger(this, z(A)) | |
104 | 104 | if ($isInstanceOf(o, "Int")) | |
105 | 105 | then { | |
106 | 106 | let p = o | |
107 | 107 | p | |
108 | 108 | } | |
109 | 109 | else 0 | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | - | @Callable(C) | |
114 | - | func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b)) | |
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)) | |
115 | 129 | then true | |
116 | - | else ( | |
130 | + | else (E.caller.bytes == c)) | |
117 | 131 | then true | |
118 | - | else ( | |
132 | + | else (E.caller.bytes == d)) | |
119 | 133 | then { | |
120 | - | let | |
121 | - | WriteSet([DataEntry(f( | |
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")]) | |
122 | 136 | } | |
123 | 137 | else throw("Only Dyzrupt Admin can call this dApp function") | |
124 | 138 | ||
125 | 139 | ||
126 | 140 | ||
127 | - | @Callable( | |
141 | + | @Callable(E) | |
128 | 142 | func vote (j,s) = { | |
129 | - | let | |
130 | - | let y = toBase58String( | |
131 | - | if (( | |
143 | + | let L = extract(E.payment) | |
144 | + | let y = toBase58String(E.caller.bytes) | |
145 | + | if ((L.amount == 0)) | |
132 | 146 | then throw("You cannot vote without paying voting fee") | |
133 | - | else if (( | |
147 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
134 | 148 | then throw("You can only vote with DYZRUPT token") | |
135 | 149 | else if (x(y, j)) | |
136 | 150 | then if (n(j)) | |
137 | 151 | then if ((q(j) == "open")) | |
138 | 152 | then if ((s == a)) | |
139 | 153 | then { | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | ScriptResult(WriteSet([DataEntry(k(j, s), | |
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)])) | |
145 | 159 | } | |
146 | 160 | else throw("Not a valid vote value") | |
147 | 161 | else throw("This profile is not open for voting") | |
148 | 162 | else throw("Invalid Profile") | |
149 | 163 | else throw("You can't vote twice") | |
150 | 164 | } | |
151 | 165 | ||
152 | 166 | ||
153 | 167 | ||
154 | - | @Callable( | |
155 | - | func openVote (j) = if (if (if (( | |
168 | + | @Callable(E) | |
169 | + | func openVote (j) = if (if (if ((E.caller.bytes == b)) | |
156 | 170 | then true | |
157 | - | else ( | |
171 | + | else (E.caller.bytes == c)) | |
158 | 172 | then true | |
159 | - | else ( | |
173 | + | else (E.caller.bytes == d)) | |
160 | 174 | then if (n(j)) | |
161 | 175 | then WriteSet([DataEntry(h(j), "open")]) | |
162 | 176 | else throw("Invalid ID") | |
163 | 177 | else throw("Only Dyzrupt Admin can call this dApp function") | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
168 | - | func closeVote (j) = if (if (if (( | |
181 | + | @Callable(E) | |
182 | + | func closeVote (j) = if (if (if ((E.caller.bytes == b)) | |
169 | 183 | then true | |
170 | - | else ( | |
184 | + | else (E.caller.bytes == c)) | |
171 | 185 | then true | |
172 | - | else ( | |
186 | + | else (E.caller.bytes == d)) | |
173 | 187 | then if (n(j)) | |
174 | 188 | then WriteSet([DataEntry(h(j), "closed")]) | |
175 | 189 | else throw("Invalid ID") | |
176 | 190 | else throw("Only Dyzrupt Admin can call this dApp function") | |
177 | 191 | ||
178 | 192 | ||
179 | 193 | ||
180 | - | @Callable( | |
194 | + | @Callable(E) | |
181 | 195 | func withdraw (j) = { | |
182 | - | let y = toBase58String( | |
196 | + | let y = toBase58String(E.caller.bytes) | |
183 | 197 | if ((w(y, j) != "")) | |
184 | 198 | then if ((q(j) == "closed")) | |
185 | 199 | then { | |
186 | - | let | |
187 | - | let | |
188 | - | let o = getInteger(this, | |
200 | + | let Q = i(y, j) | |
201 | + | let R = { | |
202 | + | let o = getInteger(this, Q) | |
189 | 203 | if ($isInstanceOf(o, "Int")) | |
190 | 204 | then { | |
191 | 205 | let p = o | |
192 | 206 | p | |
193 | 207 | } | |
194 | 208 | else throw("You didn't vote for this entrepreneur") | |
195 | 209 | } | |
196 | - | if (( | |
210 | + | if ((R == 0)) | |
197 | 211 | then throw("Seems you have previously withdrawn.") | |
198 | - | else ScriptResult(WriteSet([DataEntry( | |
212 | + | else ScriptResult(WriteSet([DataEntry(Q, 0)]), TransferSet([ScriptTransfer(E.caller, R, e)])) | |
199 | 213 | } | |
200 | 214 | else throw("Can't withdraw vote amount while voting is still open.") | |
201 | 215 | else throw("You didn't vote for this entrepreneur") | |
202 | 216 | } | |
203 | 217 | ||
204 | 218 | ||
205 | 219 | ||
206 | - | @Callable( | |
220 | + | @Callable(E) | |
207 | 221 | func stake () = { | |
208 | - | let A = toBase58String( | |
209 | - | let | |
210 | - | if (( | |
222 | + | let A = toBase58String(E.caller.bytes) | |
223 | + | let L = extract(E.payment) | |
224 | + | if ((L.amount == 0)) | |
211 | 225 | then throw("Stake amount too low") | |
212 | - | else if (( | |
226 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
213 | 227 | then throw("You can only stake with DYZRUPT token") | |
214 | 228 | else { | |
215 | - | let Q = B(A) | |
216 | - | let R = (20 / 100) | |
217 | - | let S = (J.amount * R) | |
218 | - | let T = (J.amount - S) | |
219 | - | let U = (Q + T) | |
220 | - | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(this, J.amount, e)])) | |
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)])) | |
221 | 237 | } | |
222 | 238 | } | |
223 | 239 | ||
224 | 240 | ||
225 | 241 | ||
226 | - | @Callable( | |
227 | - | func unstake ( | |
228 | - | let A = toBase58String( | |
229 | - | let | |
230 | - | if (( | |
242 | + | @Callable(E) | |
243 | + | func unstake (Z) = { | |
244 | + | let A = toBase58String(E.caller.bytes) | |
245 | + | let S = B(A) | |
246 | + | if ((S == 0)) | |
231 | 247 | then throw("You don't have any stakes") | |
232 | - | else if (( | |
248 | + | else if ((Z > S)) | |
233 | 249 | then throw("You can't withdraw an amount higher than you staked") | |
234 | 250 | else { | |
235 | - | let U = (Q - V) | |
236 | - | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)])) | |
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)])) | |
237 | 258 | } | |
259 | + | } | |
260 | + | ||
261 | + | ||
262 | + | ||
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)) | |
269 | + | then throw("You don't have any stakes") | |
270 | + | else if ((X == 0)) | |
271 | + | then throw("Nothing in Stake pool at this time. Try again later") | |
272 | + | else if ((ae > X)) | |
273 | + | then throw("No rewards at this time") | |
274 | + | 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)])) | |
278 | + | } | |
238 | 279 | } | |
239 | 280 | ||
240 | 281 |
github/deemru/w8io/026f985 49.39 ms ◑