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+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgfqtB2c5SyrdhjTSeT2NUMvY45D97zjqBcAiarzFPFmsBAAAADWdldFByb2ZpbGVLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAAmlkAgAAABRfZW50cmVwcmVuZXVyUHJvZmlsZQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAHX3N0YXR1cwEAAAARZ2V0Vm90ZXJBbW91bnRLZXkAAAACAAAAAmlkAAAABnZvdGVJZAkAASwAAAACCQABLAAAAAIJAAEsAA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AwkAAAAAAAACBQAAAAxjdXJyZW50U3Rha2UAAAAAAAAAAAAJAAACAAAAAQIAAAAZWW91IGRvbid0IGhhdmUgYW55IHN0YWtlcwMJAAAAAAAAAgUAAAAJc3Rha2VQb29sAAAAAAAAAAAACQAAAgAAAAECAAAAM05vdGhpbmcgaW4gU3Rha2UgcG9vbCBhdCB0aGlzIHRpbWUuIFRyeSBhZ2FpbiBsYXRlcgMJAABmAAAAAgUAAAAGcmV3YXJkBQAAAAlzdGFrZVBvb2wJAAACAAAAAQIAAAAXTm8gcmV3YXJkcyBhdCB0aGlzIHRpbWUEAAAADG5ld1N0YWtlUG9vbAkAAGUAAAACBQAAAAlzdGFrZVBvb2wFAAAABnJld2FyZAQAAAAObmV3U3Rha2VBbW91bnQJAABlAAAAAgUAAAAMY3VycmVudFN0YWtlBQAAAAZyZXdhcmQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0U3Rha2VyS2V5AAAAAQUAAAAGc3Rha2VyBQAAAA5uZXdTdGFrZUFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAD2dldFN0YWtlUG9vbEtleQAAAAAFAAAADG5ld1N0YWtlUG9vbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGcmV3YXJkBQAAAAVkeXpJZAUAAAADbmlsAAAAANPbkTU=", "height": 1279173, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6XH57mNapFhK5QeFe4fpMET2nkXmFf9d3z95KVKQVR9D Next: 3CHyyt5jbdWJLwefWPdFLsoULr7esVBNzRjDoaREYCPy Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "upvote" | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | - | func d () = "stake_pool" | |
10 | + | let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | + | ||
12 | + | let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G' | |
13 | + | ||
14 | + | func f (g) = (g + "_entrepreneurProfile") | |
11 | 15 | ||
12 | 16 | ||
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") | |
22 | 18 | ||
23 | 19 | ||
24 | - | func | |
20 | + | func i (g,j) = (((g + "_") + j) + "_amount") | |
25 | 21 | ||
26 | 22 | ||
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") | |
46 | 25 | else throw("Invalid vote type") | |
47 | 26 | ||
48 | 27 | ||
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")) | |
52 | 36 | then { | |
53 | - | let | |
37 | + | let p = o | |
54 | 38 | true | |
55 | 39 | } | |
56 | 40 | else false | |
57 | 41 | } | |
58 | 42 | ||
59 | 43 | ||
60 | - | func q ( | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
44 | + | func q (j) = { | |
45 | + | let o = getString(this, h(j)) | |
46 | + | if ($isInstanceOf(o, "String")) | |
63 | 47 | then { | |
64 | - | let | |
65 | - | | |
48 | + | let p = o | |
49 | + | p | |
66 | 50 | } | |
67 | 51 | else false | |
68 | 52 | } | |
69 | 53 | ||
70 | 54 | ||
71 | - | func | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
55 | + | func r (j,s) = { | |
56 | + | let o = getInteger(this, k(j, s)) | |
57 | + | if ($isInstanceOf(o, "Int")) | |
74 | 58 | then { | |
75 | - | let | |
76 | - | | |
59 | + | let p = o | |
60 | + | p | |
77 | 61 | } | |
78 | 62 | else throw("Not a valid vote ID") | |
79 | 63 | } | |
80 | 64 | ||
81 | 65 | ||
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 | + | } | |
83 | 75 | ||
84 | 76 | ||
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")) | |
88 | 83 | then { | |
89 | - | let | |
90 | - | | |
84 | + | let p = o | |
85 | + | p | |
91 | 86 | } | |
92 | 87 | else "" | |
93 | 88 | } | |
94 | 89 | ||
95 | 90 | ||
96 | - | func x (v, | |
97 | - | let y = w(v, | |
91 | + | func x (v,j) = { | |
92 | + | let y = w(v, j) | |
98 | 93 | if ((y == "")) | |
99 | 94 | then true | |
100 | 95 | else false | |
101 | 96 | } | |
102 | 97 | ||
103 | 98 | ||
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")]) | |
110 | 136 | } | |
137 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
111 | 138 | ||
112 | 139 | ||
113 | 140 | ||
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)) | |
118 | 146 | then throw("You cannot vote without paying voting fee") | |
119 | - | else if (( | |
147 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
120 | 148 | then throw("You can only vote with DYZRUPT token") | |
121 | - | else if (x( | |
122 | - | then if ( | |
123 | - | then if ((q( | |
124 | - | then if (( | |
149 | + | else if (x(y, j)) | |
150 | + | then if (n(j)) | |
151 | + | then if ((q(j) == "open")) | |
152 | + | then if ((s == a)) | |
125 | 153 | 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)])) | |
129 | 159 | } | |
130 | 160 | else throw("Not a valid vote value") | |
131 | 161 | else throw("This profile is not open for voting") | |
135 | 165 | ||
136 | 166 | ||
137 | 167 | ||
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")]) | |
143 | 176 | else throw("Invalid ID") | |
177 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
144 | 178 | ||
145 | 179 | ||
146 | 180 | ||
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")]) | |
152 | 189 | else throw("Invalid ID") | |
190 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
153 | 191 | ||
154 | 192 | ||
155 | 193 | ||
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) | |
157 | 221 | func stake () = { | |
158 | - | let | |
159 | - | let | |
160 | - | if (( | |
222 | + | let A = toBase58String(E.caller.bytes) | |
223 | + | let L = extract(E.payment) | |
224 | + | if ((L.amount == 0)) | |
161 | 225 | then throw("Stake amount too low") | |
162 | - | else if (( | |
226 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
163 | 227 | then throw("You can only stake with DYZRUPT token") | |
164 | 228 | 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)])) | |
172 | 235 | } | |
173 | 236 | } | |
174 | 237 | ||
175 | 238 | ||
176 | 239 | ||
177 | - | @Callable( | |
178 | - | func unstake ( | |
179 | - | let | |
180 | - | let | |
181 | - | if (( | |
240 | + | @Callable(E) | |
241 | + | func unstake (X) = { | |
242 | + | let A = toBase58String(E.caller.bytes) | |
243 | + | let S = B(A) | |
244 | + | if ((S == 0)) | |
182 | 245 | then throw("You don't have any stakes") | |
183 | - | else if (( | |
246 | + | else if ((X > S)) | |
184 | 247 | then throw("You can't withdraw an amount higher than you staked") | |
185 | 248 | 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)])) | |
192 | 251 | } | |
193 | 252 | } | |
194 | 253 | ||
195 | 254 | ||
196 | 255 | ||
197 | - | @Callable( | |
198 | - | func claimDailyStakeReward ( | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | if (( | |
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)) | |
203 | 262 | then throw("You don't have any stakes") | |
204 | - | else if (( | |
263 | + | else if ((Z == 0)) | |
205 | 264 | then throw("Nothing in Stake pool at this time. Try again later") | |
206 | - | else if (( | |
265 | + | else if ((Y > Z)) | |
207 | 266 | then throw("No rewards at this time") | |
208 | 267 | else { | |
209 | - | let | |
210 | - | let | |
211 | - | ScriptResult(WriteSet([DataEntry( | |
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)])) | |
212 | 271 | } | |
213 | 272 | } | |
214 | 273 |
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 | - | let b = base58' | |
6 | + | let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | - | func d () = "stake_pool" | |
10 | + | let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | + | ||
12 | + | let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G' | |
13 | + | ||
14 | + | func f (g) = (g + "_entrepreneurProfile") | |
11 | 15 | ||
12 | 16 | ||
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") | |
22 | 18 | ||
23 | 19 | ||
24 | - | func | |
20 | + | func i (g,j) = (((g + "_") + j) + "_amount") | |
25 | 21 | ||
26 | 22 | ||
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") | |
46 | 25 | else throw("Invalid vote type") | |
47 | 26 | ||
48 | 27 | ||
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")) | |
52 | 36 | then { | |
53 | - | let | |
37 | + | let p = o | |
54 | 38 | true | |
55 | 39 | } | |
56 | 40 | else false | |
57 | 41 | } | |
58 | 42 | ||
59 | 43 | ||
60 | - | func q ( | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
44 | + | func q (j) = { | |
45 | + | let o = getString(this, h(j)) | |
46 | + | if ($isInstanceOf(o, "String")) | |
63 | 47 | then { | |
64 | - | let | |
65 | - | | |
48 | + | let p = o | |
49 | + | p | |
66 | 50 | } | |
67 | 51 | else false | |
68 | 52 | } | |
69 | 53 | ||
70 | 54 | ||
71 | - | func | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
55 | + | func r (j,s) = { | |
56 | + | let o = getInteger(this, k(j, s)) | |
57 | + | if ($isInstanceOf(o, "Int")) | |
74 | 58 | then { | |
75 | - | let | |
76 | - | | |
59 | + | let p = o | |
60 | + | p | |
77 | 61 | } | |
78 | 62 | else throw("Not a valid vote ID") | |
79 | 63 | } | |
80 | 64 | ||
81 | 65 | ||
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 | + | } | |
83 | 75 | ||
84 | 76 | ||
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")) | |
88 | 83 | then { | |
89 | - | let | |
90 | - | | |
84 | + | let p = o | |
85 | + | p | |
91 | 86 | } | |
92 | 87 | else "" | |
93 | 88 | } | |
94 | 89 | ||
95 | 90 | ||
96 | - | func x (v, | |
97 | - | let y = w(v, | |
91 | + | func x (v,j) = { | |
92 | + | let y = w(v, j) | |
98 | 93 | if ((y == "")) | |
99 | 94 | then true | |
100 | 95 | else false | |
101 | 96 | } | |
102 | 97 | ||
103 | 98 | ||
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")]) | |
110 | 136 | } | |
137 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
111 | 138 | ||
112 | 139 | ||
113 | 140 | ||
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)) | |
118 | 146 | then throw("You cannot vote without paying voting fee") | |
119 | - | else if (( | |
147 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
120 | 148 | then throw("You can only vote with DYZRUPT token") | |
121 | - | else if (x( | |
122 | - | then if ( | |
123 | - | then if ((q( | |
124 | - | then if (( | |
149 | + | else if (x(y, j)) | |
150 | + | then if (n(j)) | |
151 | + | then if ((q(j) == "open")) | |
152 | + | then if ((s == a)) | |
125 | 153 | 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)])) | |
129 | 159 | } | |
130 | 160 | else throw("Not a valid vote value") | |
131 | 161 | else throw("This profile is not open for voting") | |
132 | 162 | else throw("Invalid Profile") | |
133 | 163 | else throw("You can't vote twice") | |
134 | 164 | } | |
135 | 165 | ||
136 | 166 | ||
137 | 167 | ||
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")]) | |
143 | 176 | else throw("Invalid ID") | |
177 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
144 | 178 | ||
145 | 179 | ||
146 | 180 | ||
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")]) | |
152 | 189 | else throw("Invalid ID") | |
190 | + | else throw("Only Dyzrupt Admin can call this dApp function") | |
153 | 191 | ||
154 | 192 | ||
155 | 193 | ||
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) | |
157 | 221 | func stake () = { | |
158 | - | let | |
159 | - | let | |
160 | - | if (( | |
222 | + | let A = toBase58String(E.caller.bytes) | |
223 | + | let L = extract(E.payment) | |
224 | + | if ((L.amount == 0)) | |
161 | 225 | then throw("Stake amount too low") | |
162 | - | else if (( | |
226 | + | else if ((L.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
163 | 227 | then throw("You can only stake with DYZRUPT token") | |
164 | 228 | 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)])) | |
172 | 235 | } | |
173 | 236 | } | |
174 | 237 | ||
175 | 238 | ||
176 | 239 | ||
177 | - | @Callable( | |
178 | - | func unstake ( | |
179 | - | let | |
180 | - | let | |
181 | - | if (( | |
240 | + | @Callable(E) | |
241 | + | func unstake (X) = { | |
242 | + | let A = toBase58String(E.caller.bytes) | |
243 | + | let S = B(A) | |
244 | + | if ((S == 0)) | |
182 | 245 | then throw("You don't have any stakes") | |
183 | - | else if (( | |
246 | + | else if ((X > S)) | |
184 | 247 | then throw("You can't withdraw an amount higher than you staked") | |
185 | 248 | 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)])) | |
192 | 251 | } | |
193 | 252 | } | |
194 | 253 | ||
195 | 254 | ||
196 | 255 | ||
197 | - | @Callable( | |
198 | - | func claimDailyStakeReward ( | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | if (( | |
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)) | |
203 | 262 | then throw("You don't have any stakes") | |
204 | - | else if (( | |
263 | + | else if ((Z == 0)) | |
205 | 264 | then throw("Nothing in Stake pool at this time. Try again later") | |
206 | - | else if (( | |
265 | + | else if ((Y > Z)) | |
207 | 266 | then throw("No rewards at this time") | |
208 | 267 | else { | |
209 | - | let | |
210 | - | let | |
211 | - | ScriptResult(WriteSet([DataEntry( | |
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)])) | |
212 | 271 | } | |
213 | 272 | } | |
214 | 273 | ||
215 | 274 |
github/deemru/w8io/169f3d6 64.87 ms ◑