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