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