tx · 5MXivYkxKU7eHY4jf4gHvn9WdAJSmhL7N6zYfHU3AvmA 3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq: -0.01400000 Waves 2021.04.03 15:28 [1466258] smart account 3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq > SELF 0.00000000 Waves
{ "type": 13, "id": "5MXivYkxKU7eHY4jf4gHvn9WdAJSmhL7N6zYfHU3AvmA", "fee": 1400000, "feeAssetId": null, "timestamp": 1617452900984, "version": 2, "chainId": 84, "sender": "3MyytsRPxYr48we6CPWAQ1z4x6cmEbHWtFq", "senderPublicKey": "551T51u5CXgqTybnycyVjFjM9tKkqVEenm7ZrxxC7gLe", "proofs": [ "5DrJJg9j1u59PpumSPCVZxanH1rEQYnTM59L52DdE7jJL85gYtMFaLJKVonEzLuLvkMhedHZczvQCYRM234SMMhM" ], "script": "base64:AAIDAAAAAAAAACkIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQESAAAAABoAAAAABnVwVm90ZQIAAAAGdXB2b3RlAAAAAA1hZG1pbkFkZHJlc3MxAQAAABoBVGx6nhB9WGGjnofF5YsTbL8z35oL0vs2fAAAAAANYWRtaW5BZGRyZXNzMgEAAAAaAVTlj1A9878YQ058BBZUI9QC+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgFZsfdOZJuZHuLptIBwOCMHYpnDoPtCAZD6J+T/NJGW4BAAAAD2dldFN0YWtlUG9vbEtleQAAAAACAAAACnN0YWtlX3Bvb2wBAAAADGdldFN0YWtlUG9vbAAAAAAEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkBAAAAD2dldFN0YWtlUG9vbEtleQAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAQZ2V0Vm90Z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AAAAAFAAAADG5ld1N0YWtlUG9vbAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGcmV3YXJkBQAAAAVkeXpJZAUAAAADbmlsAAAAADgdNfI=", "height": 1466258, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8d58HpFC73VqGv9Y7JwX917L86Uuzt8Sp4nvZ321ST55 Next: 9eAv3agTC3xfNHePVy3vtb7vawL3Ny8ZZ3DGdMpEdrLH Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let upVote = "upvote" | |
5 | 5 | ||
6 | 6 | let adminAddress1 = base58'3MyofeFJ29LLoVcHYtYgkLP7EUuYYGKBB4P' | |
7 | 7 | ||
8 | 8 | let adminAddress2 = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | 10 | let adminAddress3 = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | 11 | ||
12 | 12 | let dyzId = base58'2TLkgUERqF1y21ShjiFVVTVYtP1BL8wvc6BGLZvt4fND' | |
13 | 13 | ||
14 | 14 | func getStakePoolKey () = "stake_pool" | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getStakePool () = match getInteger(this, getStakePoolKey()) { | |
18 | 18 | case a: Int => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | 0 | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getVoteAmountKey (id,type) = if ((type == "upvote")) | |
26 | 26 | then (((id + "_") + type) + "_amount") | |
27 | 27 | else throw("Invalid vote type") | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func getTotalDzyStakeKey () = "total_staked_amount" | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getTotalDzyStakeAmount () = match getInteger(this, getTotalDzyStakeKey()) { | |
34 | 34 | case a: Int => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | 3170666847757 | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getStakerKey (staker) = (staker + "_stake") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getCurrentStake (staker) = match getInteger(this, getStakerKey(staker)) { | |
45 | 45 | case a: Int => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | 0 | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getProfileKey (id) = (id + "_entrepreneurProfile") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getStatusKey (id) = (id + "_status") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getVoteKey (id,type) = if ((type == "upvote")) | |
59 | 59 | then (id + "_upvote") | |
60 | 60 | else throw("Invalid vote type") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func profileExist (id) = match getString(this, getProfileKey(id)) { | |
64 | 64 | case a: String => | |
65 | 65 | true | |
66 | 66 | case _ => | |
67 | 67 | false | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getVoteStatus (voteId) = match getString(this, getStatusKey(voteId)) { | |
72 | 72 | case a: String => | |
73 | 73 | a | |
74 | 74 | case _ => | |
75 | 75 | false | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getVoterAmountKey (id,voteId) = (((id + "_") + voteId) + "_amount") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getVoteAmountCount (voteId,vote) = match getInteger(this, getVoteAmountKey(voteId, vote)) { | |
83 | 83 | case a: Int => | |
84 | 84 | a | |
85 | 85 | case _ => | |
86 | 86 | 0 | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getLastClaimHeight (pubKey) = match getInteger(this, ("last_claim_" + pubKey)) { | |
91 | 91 | case a: Int => | |
92 | 92 | a | |
93 | 93 | case _ => | |
94 | 94 | 0 | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getVoteCount (voteId,vote) = match getInteger(this, getVoteKey(voteId, vote)) { | |
99 | 99 | case a: Int => | |
100 | 100 | a | |
101 | 101 | case _ => | |
102 | 102 | throw("Not a valid vote ID") | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getVoterKey (address,voteId) = ((((address + "_") + voteId) + "_") + "vote") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getVoter (address,voteId) = match getString(this, getVoterKey(address, voteId)) { | |
110 | 110 | case a: String => | |
111 | 111 | a | |
112 | 112 | case _ => | |
113 | 113 | "" | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func canVote (address,voteId) = { | |
118 | 118 | let voter = getVoter(address, voteId) | |
119 | 119 | if ((voter == "")) | |
120 | 120 | then true | |
121 | 121 | else false | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getClaimedTotal () = match getInteger(this, "claimed_total") { | |
126 | 126 | case a: Int => | |
127 | 127 | a | |
128 | 128 | case _ => | |
129 | 129 | 0 | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getClaimedByStaker (address) = match getInteger(this, ("claimed_total_" + address)) { | |
134 | 134 | case a: Int => | |
135 | 135 | a | |
136 | 136 | case _ => | |
137 | 137 | 0 | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func addEntrepreneurProfile (name,avatar,bio,gender,location) = if (if (if ((i.caller.bytes == adminAddress1)) | |
143 | 143 | then true | |
144 | 144 | else (i.caller.bytes == adminAddress2)) | |
145 | 145 | then true | |
146 | 146 | else (i.caller.bytes == adminAddress3)) | |
147 | 147 | then { | |
148 | 148 | let transactionId = toBase58String(i.transactionId) | |
149 | 149 | WriteSet([DataEntry(getProfileKey(transactionId), ((((((((name + "_") + avatar) + "_") + bio) + "_") + gender) + "_") + location)), DataEntry(getVoteKey(transactionId, "upvote"), 0), DataEntry(getVoteAmountKey(transactionId, "upvote"), 0), DataEntry(getStatusKey(transactionId), "open")]) | |
150 | 150 | } | |
151 | 151 | else throw("Only Dyzrupt Admin can call this dApp function") | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(i) | |
156 | 156 | func vote (voteId,vote) = { | |
157 | 157 | let pmt = extract(i.payment) | |
158 | 158 | let voter = toBase58String(i.caller.bytes) | |
159 | 159 | if ((pmt.amount == 0)) | |
160 | 160 | then throw("You cannot vote without paying voting fee") | |
161 | 161 | else if ((pmt.assetId != dyzId)) | |
162 | 162 | then throw("You can only vote with DYZRUPT token") | |
163 | 163 | else if (canVote(toBase58String(i.caller.bytes), voteId)) | |
164 | 164 | then if (profileExist(voteId)) | |
165 | 165 | then if ((getVoteStatus(voteId) == "open")) | |
166 | 166 | then if ((vote == upVote)) | |
167 | 167 | then { | |
168 | 168 | let voteCount = getVoteCount(voteId, vote) | |
169 | 169 | let voteAmountCount = getVoteAmountCount(voteId, vote) | |
170 | 170 | let newVoteCount = (voteCount + 1) | |
171 | 171 | let newVoteAmountCount = (voteAmountCount + pmt.amount) | |
172 | 172 | ScriptResult(WriteSet([DataEntry(getVoteKey(voteId, vote), newVoteCount), DataEntry(getVoterKey(voter, voteId), voteId), DataEntry(getVoterAmountKey(voter, voteId), pmt.amount), DataEntry(getVoteAmountKey(voteId, vote), newVoteAmountCount)]), TransferSet([ScriptTransfer(this, pmt.amount, dyzId)])) | |
173 | 173 | } | |
174 | 174 | else throw("Not a valid vote value") | |
175 | 175 | else throw("This profile is not open for voting") | |
176 | 176 | else throw("Invalid Profile") | |
177 | 177 | else throw("You can't vote twice") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | ||
182 | 182 | @Callable(i) | |
183 | 183 | func openVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1)) | |
184 | 184 | then true | |
185 | 185 | else (i.caller.bytes == adminAddress2)) | |
186 | 186 | then true | |
187 | 187 | else (i.caller.bytes == adminAddress3)) | |
188 | 188 | then if (profileExist(voteId)) | |
189 | 189 | then WriteSet([DataEntry(getStatusKey(voteId), "open")]) | |
190 | 190 | else throw("Invalid ID") | |
191 | 191 | else throw("Only Dyzrupt Admin can call this dApp function") | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(i) | |
196 | 196 | func closeVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1)) | |
197 | 197 | then true | |
198 | 198 | else (i.caller.bytes == adminAddress2)) | |
199 | 199 | then true | |
200 | 200 | else (i.caller.bytes == adminAddress3)) | |
201 | 201 | then if (profileExist(voteId)) | |
202 | 202 | then WriteSet([DataEntry(getStatusKey(voteId), "closed")]) | |
203 | 203 | else throw("Invalid ID") | |
204 | 204 | else throw("Only Dyzrupt Admin can call this dApp function") | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(i) | |
209 | 209 | func withdraw (voteId) = { | |
210 | 210 | let voter = toBase58String(i.caller.bytes) | |
211 | 211 | if ((getVoter(voter, voteId) != "")) | |
212 | 212 | then if ((getVoteStatus(voteId) == "closed")) | |
213 | 213 | then { | |
214 | 214 | let currentKey = getVoterAmountKey(voter, voteId) | |
215 | 215 | let currentAmount = match getInteger(this, currentKey) { | |
216 | 216 | case a: Int => | |
217 | 217 | a | |
218 | 218 | case _ => | |
219 | 219 | throw("You didn't vote for this entrepreneur") | |
220 | 220 | } | |
221 | 221 | if ((currentAmount == 0)) | |
222 | 222 | then throw("Seems you have previously withdrawn.") | |
223 | 223 | else ScriptResult(WriteSet([DataEntry(currentKey, 0)]), TransferSet([ScriptTransfer(i.caller, currentAmount, dyzId)])) | |
224 | 224 | } | |
225 | 225 | else throw("Can't withdraw vote amount while voting is still open.") | |
226 | 226 | else throw("You didn't vote for this entrepreneur") | |
227 | 227 | } | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | ||
231 | 231 | @Callable(i) | |
232 | 232 | func stake () = { | |
233 | 233 | let staker = toBase58String(i.caller.bytes) | |
234 | 234 | let pmt = extract(i.payment) | |
235 | 235 | if ((pmt.amount == 0)) | |
236 | 236 | then throw("Stake amount too low") | |
237 | 237 | else if ((pmt.assetId != dyzId)) | |
238 | 238 | then throw("You can only stake with DYZRUPT token") | |
239 | 239 | else { | |
240 | 240 | let currentStake = getCurrentStake(staker) | |
241 | 241 | let stakeableAmount = fraction(pmt.amount, 5, 100) | |
242 | 242 | let amountToStake = (pmt.amount - stakeableAmount) | |
243 | 243 | let newStakedAmount = (currentStake + amountToStake) | |
244 | 244 | let stakePool = getStakePool() | |
245 | 245 | let newStakePool = (stakePool + stakeableAmount) | |
246 | 246 | let newTotalDzyStakeAmount = (getTotalDzyStakeAmount() + amountToStake) | |
247 | 247 | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount), DataEntry(getTotalDzyStakeKey(), newTotalDzyStakeAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet(nil)) | |
248 | 248 | } | |
249 | 249 | } | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | ||
253 | 253 | @Callable(i) | |
254 | 254 | func unstake (amount) = { | |
255 | 255 | let staker = toBase58String(i.caller.bytes) | |
256 | 256 | let currentStake = getCurrentStake(staker) | |
257 | 257 | if ((currentStake == 0)) | |
258 | 258 | then throw("You don't have any stakes") | |
259 | 259 | else if ((amount > currentStake)) | |
260 | 260 | then throw("You can't withdraw an amount higher than you staked") | |
261 | 261 | else { | |
262 | 262 | let unstakeableAmount = fraction(amount, 10, 100) | |
263 | 263 | let amountToUnstake = (amount - unstakeableAmount) | |
264 | 264 | let newUnstakedAmount = (currentStake - amount) | |
265 | 265 | let stakePool = getStakePool() | |
266 | 266 | let newStakePool = (stakePool + unstakeableAmount) | |
267 | 267 | let newTotalDzyStakeAmount = (getTotalDzyStakeAmount() - amount) | |
268 | 268 | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newUnstakedAmount), DataEntry(getTotalDzyStakeKey(), newTotalDzyStakeAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, amountToUnstake, dyzId)])) | |
269 | 269 | } | |
270 | 270 | } | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | 274 | @Callable(i) | |
275 | 275 | func claimDailyStakeReward () = { | |
276 | 276 | let staker = toBase58String(i.caller.bytes) | |
277 | 277 | let currentStake = getCurrentStake(staker) | |
278 | 278 | let stakePool = getStakePool() | |
279 | 279 | let currentHeight = height | |
280 | 280 | let lastClaimHeight = getLastClaimHeight(staker) | |
281 | 281 | let claimedTotalSoFar = getClaimedTotal() | |
282 | 282 | let claimedByStaker = getClaimedByStaker(staker) | |
283 | 283 | let reward = fraction(currentStake, stakePool, getTotalDzyStakeAmount()) | |
284 | 284 | if ((currentStake == 0)) | |
285 | 285 | then throw("You don't have any stakes") | |
286 | 286 | else if ((stakePool == 0)) | |
287 | 287 | then throw("Nothing in Stake pool at this time. Try again later") | |
288 | 288 | else if ((reward > stakePool)) | |
289 | 289 | then throw("No rewards at this time") | |
290 | 290 | else if (((lastClaimHeight + 1440) > currentHeight)) | |
291 | 291 | then throw("You can only claim once a day") | |
292 | 292 | else { | |
293 | 293 | let newStakePool = (stakePool - reward) | |
294 | 294 | let newStakeAmount = currentStake | |
295 | 295 | ScriptResult(WriteSet([DataEntry(("claimed_total_" + staker), (claimedByStaker + reward)), DataEntry("claimed_total", (claimedTotalSoFar + reward)), DataEntry(("last_claim_" + staker), currentHeight), DataEntry(getStakerKey(staker), newStakeAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, reward, dyzId)])) | |
296 | 296 | } | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 |
github/deemru/w8io/169f3d6 42.20 ms ◑