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 | |
---|---|---|---|
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getCurrentStake (staker) = match getInteger(this, getStakerKey(staker)) { | |
88 | + | case a: Int => | |
89 | + | a | |
90 | + | case _ => | |
91 | + | 0 | |
92 | + | } | |
93 | + | ||
94 | + | ||
95 | + | func getStakePoolKey () = "stake_pool" | |
96 | + | ||
97 | + | ||
98 | + | func getStakePool () = match getInteger(this, getStakePoolKey()) { | |
88 | 99 | case a: Int => | |
89 | 100 | a | |
90 | 101 | case _ => | |
192 | 203 | then throw("You can only stake with DYZRUPT token") | |
193 | 204 | else { | |
194 | 205 | let currentStake = getCurrentStake(staker) | |
195 | - | let stakePercent = ( | |
206 | + | let stakePercent = (10 / 100) | |
196 | 207 | let stakeableAmount = (pmt.amount * stakePercent) | |
197 | 208 | let amountToStake = (pmt.amount - stakeableAmount) | |
198 | 209 | let newStakedAmount = (currentStake + amountToStake) | |
199 | - | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount)]), TransferSet([ScriptTransfer(this, pmt.amount, dyzId)])) | |
210 | + | let stakePool = getStakePool() | |
211 | + | let newStakePool = (stakePool + stakeableAmount) | |
212 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(this, pmt.amount, dyzId)])) | |
200 | 213 | } | |
201 | 214 | } | |
202 | 215 | ||
211 | 224 | else if ((amount > currentStake)) | |
212 | 225 | then throw("You can't withdraw an amount higher than you staked") | |
213 | 226 | else { | |
214 | - | let newStakedAmount = (currentStake - amount) | |
215 | - | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount)]), TransferSet([ScriptTransfer(i.caller, amount, dyzId)])) | |
227 | + | let unstakePercent = (20 / 100) | |
228 | + | let unstakeableAmount = (amount * unstakePercent) | |
229 | + | let amountToUnstake = (amount - unstakeableAmount) | |
230 | + | let newUnstakedAmount = (currentStake - amount) | |
231 | + | let stakePool = getStakePool() | |
232 | + | let newStakePool = (stakePool + unstakeableAmount) | |
233 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newUnstakedAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, amountToUnstake, dyzId)])) | |
216 | 234 | } | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | ||
239 | + | @Callable(i) | |
240 | + | func claimDailyStakeReward (reward) = { | |
241 | + | let staker = toBase58String(i.caller.bytes) | |
242 | + | let currentStake = getCurrentStake(staker) | |
243 | + | let stakePool = getStakePool() | |
244 | + | if ((currentStake == 0)) | |
245 | + | then throw("You don't have any stakes") | |
246 | + | else if ((stakePool == 0)) | |
247 | + | then throw("Nothing in Stake pool at this time. Try again later") | |
248 | + | else if ((reward > stakePool)) | |
249 | + | then throw("No rewards at this time") | |
250 | + | else { | |
251 | + | let newStakePool = (stakePool - reward) | |
252 | + | let newStakeAmount = (currentStake - reward) | |
253 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakeAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, reward, dyzId)])) | |
254 | + | } | |
217 | 255 | } | |
218 | 256 | ||
219 | 257 |
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'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC' | |
7 | 7 | ||
8 | 8 | let adminAddress2 = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b' | |
9 | 9 | ||
10 | 10 | let adminAddress3 = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ' | |
11 | 11 | ||
12 | 12 | let dyzId = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G' | |
13 | 13 | ||
14 | 14 | func getProfileKey (id) = (id + "_entrepreneurProfile") | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getStatusKey (id) = (id + "_status") | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getVoterAmountKey (id,voteId) = (((id + "_") + voteId) + "_amount") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getVoteKey (id,type) = if ((type == "upvote")) | |
24 | 24 | then (id + "_upvote") | |
25 | 25 | else throw("Invalid vote type") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getVoteAmountKey (id,type) = if ((type == "upvote")) | |
29 | 29 | then (((id + "_") + type) + "_amount") | |
30 | 30 | else throw("Invalid vote type") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func profileExist (id) = match getString(this, getProfileKey(id)) { | |
34 | 34 | case a: String => | |
35 | 35 | true | |
36 | 36 | case _ => | |
37 | 37 | false | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getVoteStatus (voteId) = match getString(this, getStatusKey(voteId)) { | |
42 | 42 | case a: String => | |
43 | 43 | a | |
44 | 44 | case _ => | |
45 | 45 | false | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getVoteCount (voteId,vote) = match getInteger(this, getVoteKey(voteId, vote)) { | |
50 | 50 | case a: Int => | |
51 | 51 | a | |
52 | 52 | case _ => | |
53 | 53 | throw("Not a valid vote ID") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getVoteAmountCount (voteId,vote) = match getInteger(this, getVoteAmountKey(voteId, vote)) { | |
58 | 58 | case a: Int => | |
59 | 59 | a | |
60 | 60 | case _ => | |
61 | 61 | 0 | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getVoterKey (address,voteId) = ((((address + "_") + voteId) + "_") + "vote") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getVoter (address,voteId) = match getString(this, getVoterKey(address, voteId)) { | |
69 | 69 | case a: String => | |
70 | 70 | a | |
71 | 71 | case _ => | |
72 | 72 | "" | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func canVote (address,voteId) = { | |
77 | 77 | let voter = getVoter(address, voteId) | |
78 | 78 | if ((voter == "")) | |
79 | 79 | then true | |
80 | 80 | else false | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getStakerKey (staker) = (staker + "_stake") | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getCurrentStake (staker) = match getInteger(this, getStakerKey(staker)) { | |
88 | + | case a: Int => | |
89 | + | a | |
90 | + | case _ => | |
91 | + | 0 | |
92 | + | } | |
93 | + | ||
94 | + | ||
95 | + | func getStakePoolKey () = "stake_pool" | |
96 | + | ||
97 | + | ||
98 | + | func getStakePool () = match getInteger(this, getStakePoolKey()) { | |
88 | 99 | case a: Int => | |
89 | 100 | a | |
90 | 101 | case _ => | |
91 | 102 | 0 | |
92 | 103 | } | |
93 | 104 | ||
94 | 105 | ||
95 | 106 | @Callable(i) | |
96 | 107 | func addEntrepreneurProfile (name,avatar,bio,gender,location) = if (if (if ((i.caller.bytes == adminAddress1)) | |
97 | 108 | then true | |
98 | 109 | else (i.caller.bytes == adminAddress2)) | |
99 | 110 | then true | |
100 | 111 | else (i.caller.bytes == adminAddress3)) | |
101 | 112 | then { | |
102 | 113 | let transactionId = toBase58String(i.transactionId) | |
103 | 114 | WriteSet([DataEntry(getProfileKey(transactionId), ((((((((name + "_") + avatar) + "_") + bio) + "_") + gender) + "_") + location)), DataEntry(getVoteKey(transactionId, "upvote"), 0), DataEntry(getVoteAmountKey(transactionId, "upvote"), 0), DataEntry(getStatusKey(transactionId), "open")]) | |
104 | 115 | } | |
105 | 116 | else throw("Only Dyzrupt Admin can call this dApp function") | |
106 | 117 | ||
107 | 118 | ||
108 | 119 | ||
109 | 120 | @Callable(i) | |
110 | 121 | func vote (voteId,vote) = { | |
111 | 122 | let pmt = extract(i.payment) | |
112 | 123 | let voter = toBase58String(i.caller.bytes) | |
113 | 124 | if ((pmt.amount == 0)) | |
114 | 125 | then throw("You cannot vote without paying voting fee") | |
115 | 126 | else if ((pmt.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
116 | 127 | then throw("You can only vote with DYZRUPT token") | |
117 | 128 | else if (canVote(voter, voteId)) | |
118 | 129 | then if (profileExist(voteId)) | |
119 | 130 | then if ((getVoteStatus(voteId) == "open")) | |
120 | 131 | then if ((vote == upVote)) | |
121 | 132 | then { | |
122 | 133 | let voteCount = getVoteCount(voteId, vote) | |
123 | 134 | let voteAmountCount = getVoteAmountCount(voteId, vote) | |
124 | 135 | let newVoteCount = (voteCount + 1) | |
125 | 136 | let newVoteAmountCount = (voteAmountCount + pmt.amount) | |
126 | 137 | 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)])) | |
127 | 138 | } | |
128 | 139 | else throw("Not a valid vote value") | |
129 | 140 | else throw("This profile is not open for voting") | |
130 | 141 | else throw("Invalid Profile") | |
131 | 142 | else throw("You can't vote twice") | |
132 | 143 | } | |
133 | 144 | ||
134 | 145 | ||
135 | 146 | ||
136 | 147 | @Callable(i) | |
137 | 148 | func openVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1)) | |
138 | 149 | then true | |
139 | 150 | else (i.caller.bytes == adminAddress2)) | |
140 | 151 | then true | |
141 | 152 | else (i.caller.bytes == adminAddress3)) | |
142 | 153 | then if (profileExist(voteId)) | |
143 | 154 | then WriteSet([DataEntry(getStatusKey(voteId), "open")]) | |
144 | 155 | else throw("Invalid ID") | |
145 | 156 | else throw("Only Dyzrupt Admin can call this dApp function") | |
146 | 157 | ||
147 | 158 | ||
148 | 159 | ||
149 | 160 | @Callable(i) | |
150 | 161 | func closeVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1)) | |
151 | 162 | then true | |
152 | 163 | else (i.caller.bytes == adminAddress2)) | |
153 | 164 | then true | |
154 | 165 | else (i.caller.bytes == adminAddress3)) | |
155 | 166 | then if (profileExist(voteId)) | |
156 | 167 | then WriteSet([DataEntry(getStatusKey(voteId), "closed")]) | |
157 | 168 | else throw("Invalid ID") | |
158 | 169 | else throw("Only Dyzrupt Admin can call this dApp function") | |
159 | 170 | ||
160 | 171 | ||
161 | 172 | ||
162 | 173 | @Callable(i) | |
163 | 174 | func withdraw (voteId) = { | |
164 | 175 | let voter = toBase58String(i.caller.bytes) | |
165 | 176 | if ((getVoter(voter, voteId) != "")) | |
166 | 177 | then if ((getVoteStatus(voteId) == "closed")) | |
167 | 178 | then { | |
168 | 179 | let currentKey = getVoterAmountKey(voter, voteId) | |
169 | 180 | let currentAmount = match getInteger(this, currentKey) { | |
170 | 181 | case a: Int => | |
171 | 182 | a | |
172 | 183 | case _ => | |
173 | 184 | throw("You didn't vote for this entrepreneur") | |
174 | 185 | } | |
175 | 186 | if ((currentAmount == 0)) | |
176 | 187 | then throw("Seems you have previously withdrawn.") | |
177 | 188 | else ScriptResult(WriteSet([DataEntry(currentKey, 0)]), TransferSet([ScriptTransfer(i.caller, currentAmount, dyzId)])) | |
178 | 189 | } | |
179 | 190 | else throw("Can't withdraw vote amount while voting is still open.") | |
180 | 191 | else throw("You didn't vote for this entrepreneur") | |
181 | 192 | } | |
182 | 193 | ||
183 | 194 | ||
184 | 195 | ||
185 | 196 | @Callable(i) | |
186 | 197 | func stake () = { | |
187 | 198 | let staker = toBase58String(i.caller.bytes) | |
188 | 199 | let pmt = extract(i.payment) | |
189 | 200 | if ((pmt.amount == 0)) | |
190 | 201 | then throw("Stake amount too low") | |
191 | 202 | else if ((pmt.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G')) | |
192 | 203 | then throw("You can only stake with DYZRUPT token") | |
193 | 204 | else { | |
194 | 205 | let currentStake = getCurrentStake(staker) | |
195 | - | let stakePercent = ( | |
206 | + | let stakePercent = (10 / 100) | |
196 | 207 | let stakeableAmount = (pmt.amount * stakePercent) | |
197 | 208 | let amountToStake = (pmt.amount - stakeableAmount) | |
198 | 209 | let newStakedAmount = (currentStake + amountToStake) | |
199 | - | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount)]), TransferSet([ScriptTransfer(this, pmt.amount, dyzId)])) | |
210 | + | let stakePool = getStakePool() | |
211 | + | let newStakePool = (stakePool + stakeableAmount) | |
212 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(this, pmt.amount, dyzId)])) | |
200 | 213 | } | |
201 | 214 | } | |
202 | 215 | ||
203 | 216 | ||
204 | 217 | ||
205 | 218 | @Callable(i) | |
206 | 219 | func unstake (amount) = { | |
207 | 220 | let staker = toBase58String(i.caller.bytes) | |
208 | 221 | let currentStake = getCurrentStake(staker) | |
209 | 222 | if ((currentStake == 0)) | |
210 | 223 | then throw("You don't have any stakes") | |
211 | 224 | else if ((amount > currentStake)) | |
212 | 225 | then throw("You can't withdraw an amount higher than you staked") | |
213 | 226 | else { | |
214 | - | let newStakedAmount = (currentStake - amount) | |
215 | - | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakedAmount)]), TransferSet([ScriptTransfer(i.caller, amount, dyzId)])) | |
227 | + | let unstakePercent = (20 / 100) | |
228 | + | let unstakeableAmount = (amount * unstakePercent) | |
229 | + | let amountToUnstake = (amount - unstakeableAmount) | |
230 | + | let newUnstakedAmount = (currentStake - amount) | |
231 | + | let stakePool = getStakePool() | |
232 | + | let newStakePool = (stakePool + unstakeableAmount) | |
233 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newUnstakedAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, amountToUnstake, dyzId)])) | |
216 | 234 | } | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | ||
239 | + | @Callable(i) | |
240 | + | func claimDailyStakeReward (reward) = { | |
241 | + | let staker = toBase58String(i.caller.bytes) | |
242 | + | let currentStake = getCurrentStake(staker) | |
243 | + | let stakePool = getStakePool() | |
244 | + | if ((currentStake == 0)) | |
245 | + | then throw("You don't have any stakes") | |
246 | + | else if ((stakePool == 0)) | |
247 | + | then throw("Nothing in Stake pool at this time. Try again later") | |
248 | + | else if ((reward > stakePool)) | |
249 | + | then throw("No rewards at this time") | |
250 | + | else { | |
251 | + | let newStakePool = (stakePool - reward) | |
252 | + | let newStakeAmount = (currentStake - reward) | |
253 | + | ScriptResult(WriteSet([DataEntry(getStakerKey(staker), newStakeAmount), DataEntry(getStakePoolKey(), newStakePool)]), TransferSet([ScriptTransfer(i.caller, reward, dyzId)])) | |
254 | + | } | |
217 | 255 | } | |
218 | 256 | ||
219 | 257 |
github/deemru/w8io/026f985 59.29 ms ◑