tx · Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu: -0.01400000 Waves 2020.11.12 10:52 [1261866] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves
{ "type": 13, "id": "Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p", "fee": 1400000, "feeAssetId": null, "timestamp": 1605167571039, "version": 2, "chainId": 84, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "5ax4Gi7ABDyfarT5Jud5FaRqHYdGDEWFS4iMHHQJyzXYmVA5wuNwsbkFehPPWFPxhXTxGsAemTN6ArKmD2ZpZbGk" ], "script": "base64:AAIDAAAAAAAAACcIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQEAAAATAAAAAAZ1cFZvdGUCAAAABnVwdm90ZQAAAAANYWRtaW5BZGRyZXNzMQEAAAAaAVQ4tiFYgDZYCD0glAFUKaBkl4Sdk8P2NIsAAAAADWFkbWluQWRkcmVzczIBAAAAGgFU5Y9QPfO/GENOfAQWVCPUAvi8IBb2t+w6AAAAAA1hZG1pbkFkZHJlc3MzAQAAABoBVD6NGwucHiBYhj9yswIcasK4s6nfRDIKFQAAAAAFZHl6SWQBAAAAIH6rQdnOUsq3YY00nk9jVDL2OOQ/e846gXAImq8xTxZrAQAAAA1nZXRQcm9maWxlS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAUX2VudHJlcHJlbmV1clByb2ZpbGUBAAAADGdldFN0YXR1c0tleQAAAAEAAAACaWQJAAEsAAAAAgUAAAACaWQCAAAAB19zdGF0dXMBAAAAEWdldFZvdGVyQW1vdW50S2V5AAAAAgAAAAJpZAAAAAZ2b3RlSWQJAAEsAAAAAgkAASwAAAACCQABLAA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lvdSBkb24ndCBoYXZlIGFueSBzdGFrZXMDCQAAZgAAAAIFAAAABmFtb3VudAUAAAAMY3VycmVudFN0YWtlCQAAAgAAAAECAAAAM1lvdSBjYW4ndCB3aXRoZHJhdyBhbiBhbW91bnQgaGlnaGVyIHRoYW4geW91IHN0YWtlZAQAAAAPbmV3U3Rha2VkQW1vdW50CQAAZQAAAAIFAAAADGN1cnJlbnRTdGFrZQUAAAAGYW1vdW50CQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADGdldFN0YWtlcktleQAAAAEFAAAABnN0YWtlcgUAAAAPbmV3U3Rha2VkQW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABWR5eklkBQAAAANuaWwAAAAA14PZeQ==", "height": 1261866, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F3Fdv54noSFXLmYRku2G9QF9ktXH6PQaop6nVLY43tby Next: DBo8gern8siwr5h3cZKaV1p9GPuNDkkPEMVQ9rAq7kuf Diff:
Old | New | Differences | |
---|---|---|---|
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | - | @Callable(z) | |
100 | - | func addEntrepreneurProfile (A,B,C,D,E) = if (if (if ((z.caller.bytes == b)) | |
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 | + | @Callable(C) | |
114 | + | func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b)) | |
101 | 115 | then true | |
102 | - | else ( | |
116 | + | else (C.caller.bytes == c)) | |
103 | 117 | then true | |
104 | - | else ( | |
118 | + | else (C.caller.bytes == d)) | |
105 | 119 | then { | |
106 | - | let | |
107 | - | WriteSet([DataEntry(f( | |
120 | + | let I = toBase58String(C.transactionId) | |
121 | + | WriteSet([DataEntry(f(I), ((((((((D + "_") + E) + "_") + F) + "_") + G) + "_") + H)), DataEntry(k(I, "upvote"), 0), DataEntry(m(I, "upvote"), 0), DataEntry(h(I), "open")]) | |
108 | 122 | } | |
109 | 123 | else throw("Only Dyzrupt Admin can call this dApp function") | |
110 | 124 | ||
111 | 125 | ||
112 | 126 | ||
113 | - | @Callable( | |
127 | + | @Callable(C) | |
114 | 128 | func vote (j,s) = { | |
115 | - | let | |
116 | - | let y = toBase58String( | |
117 | - | if (( | |
129 | + | let J = extract(C.payment) | |
130 | + | let y = toBase58String(C.caller.bytes) | |
131 | + | if ((J.amount == 0)) | |
118 | 132 | then throw("You cannot vote without paying voting fee") | |
119 | - | else if (( | |
133 | + | else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
120 | 134 | then throw("You can only vote with DYZRUPT token") | |
121 | 135 | else if (x(y, j)) | |
122 | 136 | then if (n(j)) | |
123 | 137 | then if ((q(j) == "open")) | |
124 | 138 | then if ((s == a)) | |
125 | 139 | then { | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | ScriptResult(WriteSet([DataEntry(k(j, s), | |
140 | + | let K = r(j, s) | |
141 | + | let L = t(j, s) | |
142 | + | let M = (K + 1) | |
143 | + | let N = (L + J.amount) | |
144 | + | ScriptResult(WriteSet([DataEntry(k(j, s), M), DataEntry(u(y, j), j), DataEntry(i(y, j), J.amount), DataEntry(m(j, s), N)]), TransferSet([ScriptTransfer(this, J.amount, e)])) | |
131 | 145 | } | |
132 | 146 | else throw("Not a valid vote value") | |
133 | 147 | else throw("This profile is not open for voting") | |
137 | 151 | ||
138 | 152 | ||
139 | 153 | ||
140 | - | @Callable( | |
141 | - | func openVote (j) = if (if (if (( | |
154 | + | @Callable(C) | |
155 | + | func openVote (j) = if (if (if ((C.caller.bytes == b)) | |
142 | 156 | then true | |
143 | - | else ( | |
157 | + | else (C.caller.bytes == c)) | |
144 | 158 | then true | |
145 | - | else ( | |
159 | + | else (C.caller.bytes == d)) | |
146 | 160 | then if (n(j)) | |
147 | 161 | then WriteSet([DataEntry(h(j), "open")]) | |
148 | 162 | else throw("Invalid ID") | |
150 | 164 | ||
151 | 165 | ||
152 | 166 | ||
153 | - | @Callable( | |
154 | - | func closeVote (j) = if (if (if (( | |
167 | + | @Callable(C) | |
168 | + | func closeVote (j) = if (if (if ((C.caller.bytes == b)) | |
155 | 169 | then true | |
156 | - | else ( | |
170 | + | else (C.caller.bytes == c)) | |
157 | 171 | then true | |
158 | - | else ( | |
172 | + | else (C.caller.bytes == d)) | |
159 | 173 | then if (n(j)) | |
160 | 174 | then WriteSet([DataEntry(h(j), "closed")]) | |
161 | 175 | else throw("Invalid ID") | |
163 | 177 | ||
164 | 178 | ||
165 | 179 | ||
166 | - | @Callable( | |
180 | + | @Callable(C) | |
167 | 181 | func withdraw (j) = { | |
168 | - | let y = toBase58String( | |
182 | + | let y = toBase58String(C.caller.bytes) | |
169 | 183 | if ((w(y, j) != "")) | |
170 | 184 | then if ((q(j) == "closed")) | |
171 | 185 | then { | |
172 | - | let | |
173 | - | let | |
174 | - | let o = getInteger(this, | |
186 | + | let O = i(y, j) | |
187 | + | let P = { | |
188 | + | let o = getInteger(this, O) | |
175 | 189 | if ($isInstanceOf(o, "Int")) | |
176 | 190 | then { | |
177 | 191 | let p = o | |
179 | 193 | } | |
180 | 194 | else throw("You didn't vote for this entrepreneur") | |
181 | 195 | } | |
182 | - | if (( | |
196 | + | if ((P == 0)) | |
183 | 197 | then throw("Seems you have previously withdrawn.") | |
184 | - | else ScriptResult(WriteSet([DataEntry( | |
198 | + | else ScriptResult(WriteSet([DataEntry(O, 0)]), TransferSet([ScriptTransfer(C.caller, P, e)])) | |
185 | 199 | } | |
186 | 200 | else throw("Can't withdraw vote amount while voting is still open.") | |
187 | 201 | else throw("You didn't vote for this entrepreneur") | |
202 | + | } | |
203 | + | ||
204 | + | ||
205 | + | ||
206 | + | @Callable(C) | |
207 | + | func stake () = { | |
208 | + | let A = toBase58String(C.caller.bytes) | |
209 | + | let J = extract(C.payment) | |
210 | + | if ((J.amount == 0)) | |
211 | + | then throw("Stake amount too low") | |
212 | + | else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
213 | + | then throw("You can only stake with DYZRUPT token") | |
214 | + | 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)])) | |
221 | + | } | |
222 | + | } | |
223 | + | ||
224 | + | ||
225 | + | ||
226 | + | @Callable(C) | |
227 | + | func unstake (V) = { | |
228 | + | let A = toBase58String(C.caller.bytes) | |
229 | + | let Q = B(A) | |
230 | + | if ((Q == 0)) | |
231 | + | then throw("You don't have any stakes") | |
232 | + | else if ((V > Q)) | |
233 | + | then throw("You can't withdraw an amount higher than you staked") | |
234 | + | else { | |
235 | + | let U = (Q - V) | |
236 | + | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)])) | |
237 | + | } | |
188 | 238 | } | |
189 | 239 | ||
190 | 240 |
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 | - | @Callable(z) | |
100 | - | func addEntrepreneurProfile (A,B,C,D,E) = if (if (if ((z.caller.bytes == b)) | |
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 | + | @Callable(C) | |
114 | + | func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b)) | |
101 | 115 | then true | |
102 | - | else ( | |
116 | + | else (C.caller.bytes == c)) | |
103 | 117 | then true | |
104 | - | else ( | |
118 | + | else (C.caller.bytes == d)) | |
105 | 119 | then { | |
106 | - | let | |
107 | - | WriteSet([DataEntry(f( | |
120 | + | let I = toBase58String(C.transactionId) | |
121 | + | WriteSet([DataEntry(f(I), ((((((((D + "_") + E) + "_") + F) + "_") + G) + "_") + H)), DataEntry(k(I, "upvote"), 0), DataEntry(m(I, "upvote"), 0), DataEntry(h(I), "open")]) | |
108 | 122 | } | |
109 | 123 | else throw("Only Dyzrupt Admin can call this dApp function") | |
110 | 124 | ||
111 | 125 | ||
112 | 126 | ||
113 | - | @Callable( | |
127 | + | @Callable(C) | |
114 | 128 | func vote (j,s) = { | |
115 | - | let | |
116 | - | let y = toBase58String( | |
117 | - | if (( | |
129 | + | let J = extract(C.payment) | |
130 | + | let y = toBase58String(C.caller.bytes) | |
131 | + | if ((J.amount == 0)) | |
118 | 132 | then throw("You cannot vote without paying voting fee") | |
119 | - | else if (( | |
133 | + | else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
120 | 134 | then throw("You can only vote with DYZRUPT token") | |
121 | 135 | else if (x(y, j)) | |
122 | 136 | then if (n(j)) | |
123 | 137 | then if ((q(j) == "open")) | |
124 | 138 | then if ((s == a)) | |
125 | 139 | then { | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | ScriptResult(WriteSet([DataEntry(k(j, s), | |
140 | + | let K = r(j, s) | |
141 | + | let L = t(j, s) | |
142 | + | let M = (K + 1) | |
143 | + | let N = (L + J.amount) | |
144 | + | ScriptResult(WriteSet([DataEntry(k(j, s), M), DataEntry(u(y, j), j), DataEntry(i(y, j), J.amount), DataEntry(m(j, s), N)]), TransferSet([ScriptTransfer(this, J.amount, e)])) | |
131 | 145 | } | |
132 | 146 | else throw("Not a valid vote value") | |
133 | 147 | else throw("This profile is not open for voting") | |
134 | 148 | else throw("Invalid Profile") | |
135 | 149 | else throw("You can't vote twice") | |
136 | 150 | } | |
137 | 151 | ||
138 | 152 | ||
139 | 153 | ||
140 | - | @Callable( | |
141 | - | func openVote (j) = if (if (if (( | |
154 | + | @Callable(C) | |
155 | + | func openVote (j) = if (if (if ((C.caller.bytes == b)) | |
142 | 156 | then true | |
143 | - | else ( | |
157 | + | else (C.caller.bytes == c)) | |
144 | 158 | then true | |
145 | - | else ( | |
159 | + | else (C.caller.bytes == d)) | |
146 | 160 | then if (n(j)) | |
147 | 161 | then WriteSet([DataEntry(h(j), "open")]) | |
148 | 162 | else throw("Invalid ID") | |
149 | 163 | else throw("Only Dyzrupt Admin can call this dApp function") | |
150 | 164 | ||
151 | 165 | ||
152 | 166 | ||
153 | - | @Callable( | |
154 | - | func closeVote (j) = if (if (if (( | |
167 | + | @Callable(C) | |
168 | + | func closeVote (j) = if (if (if ((C.caller.bytes == b)) | |
155 | 169 | then true | |
156 | - | else ( | |
170 | + | else (C.caller.bytes == c)) | |
157 | 171 | then true | |
158 | - | else ( | |
172 | + | else (C.caller.bytes == d)) | |
159 | 173 | then if (n(j)) | |
160 | 174 | then WriteSet([DataEntry(h(j), "closed")]) | |
161 | 175 | else throw("Invalid ID") | |
162 | 176 | else throw("Only Dyzrupt Admin can call this dApp function") | |
163 | 177 | ||
164 | 178 | ||
165 | 179 | ||
166 | - | @Callable( | |
180 | + | @Callable(C) | |
167 | 181 | func withdraw (j) = { | |
168 | - | let y = toBase58String( | |
182 | + | let y = toBase58String(C.caller.bytes) | |
169 | 183 | if ((w(y, j) != "")) | |
170 | 184 | then if ((q(j) == "closed")) | |
171 | 185 | then { | |
172 | - | let | |
173 | - | let | |
174 | - | let o = getInteger(this, | |
186 | + | let O = i(y, j) | |
187 | + | let P = { | |
188 | + | let o = getInteger(this, O) | |
175 | 189 | if ($isInstanceOf(o, "Int")) | |
176 | 190 | then { | |
177 | 191 | let p = o | |
178 | 192 | p | |
179 | 193 | } | |
180 | 194 | else throw("You didn't vote for this entrepreneur") | |
181 | 195 | } | |
182 | - | if (( | |
196 | + | if ((P == 0)) | |
183 | 197 | then throw("Seems you have previously withdrawn.") | |
184 | - | else ScriptResult(WriteSet([DataEntry( | |
198 | + | else ScriptResult(WriteSet([DataEntry(O, 0)]), TransferSet([ScriptTransfer(C.caller, P, e)])) | |
185 | 199 | } | |
186 | 200 | else throw("Can't withdraw vote amount while voting is still open.") | |
187 | 201 | else throw("You didn't vote for this entrepreneur") | |
202 | + | } | |
203 | + | ||
204 | + | ||
205 | + | ||
206 | + | @Callable(C) | |
207 | + | func stake () = { | |
208 | + | let A = toBase58String(C.caller.bytes) | |
209 | + | let J = extract(C.payment) | |
210 | + | if ((J.amount == 0)) | |
211 | + | then throw("Stake amount too low") | |
212 | + | else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
213 | + | then throw("You can only stake with DYZRUPT token") | |
214 | + | 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)])) | |
221 | + | } | |
222 | + | } | |
223 | + | ||
224 | + | ||
225 | + | ||
226 | + | @Callable(C) | |
227 | + | func unstake (V) = { | |
228 | + | let A = toBase58String(C.caller.bytes) | |
229 | + | let Q = B(A) | |
230 | + | if ((Q == 0)) | |
231 | + | then throw("You don't have any stakes") | |
232 | + | else if ((V > Q)) | |
233 | + | then throw("You can't withdraw an amount higher than you staked") | |
234 | + | else { | |
235 | + | let U = (Q - V) | |
236 | + | ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)])) | |
237 | + | } | |
188 | 238 | } | |
189 | 239 | ||
190 | 240 |
github/deemru/w8io/026f985 43.89 ms ◑