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+LwgFva37DoAAAAADWFkbWluQWRkcmVzczMBAAAAGgFUPo0bC5weIFiGP3KzAhxqwrizqd9EMgoVAAAAAAVkeXpJZAEAAAAgfqtB2c5SyrdhjTSeT2NUMvY45D97zjqBcAiarzFPFmsBAAAADWdldFByb2ZpbGVLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAAmlkAgAAABRfZW50cmVwcmVuZXVyUHJvZmlsZQEAAAAMZ2V0U3RhdHVzS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAHX3N0YXR1cwEAAAARZ2V0Vm90ZXJBbW91bnRLZXkAAAACAAAAAmlkAAAABnZvdGVJZAkAASwAAAACCQABLAAAAAIJ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FrZUFtb3VudAkAAGUAAAACBQAAAAxjdXJyZW50U3Rha2UFAAAABnJld2FyZAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAxnZXRTdGFrZXJLZXkAAAABBQAAAAZzdGFrZXIFAAAADm5ld1N0YWtlQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAPZ2V0U3Rha2VQb29sS2V5AAAAAAUAAAAMbmV3U3Rha2VQb29sBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZyZXdhcmQFAAAABWR5eklkBQAAAANuaWwAAAAA9l46oQ==", "height": 1263206, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p Next: HiW16mYq6KyiLmdMS3vLGTRWu8widLEP9dKFYCw9kpxg Diff:
OldNewDifferences
8585
8686
8787 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()) {
8899 case a: Int =>
89100 a
90101 case _ =>
192203 then throw("You can only stake with DYZRUPT token")
193204 else {
194205 let currentStake = getCurrentStake(staker)
195- let stakePercent = (20 / 100)
206+ let stakePercent = (10 / 100)
196207 let stakeableAmount = (pmt.amount * stakePercent)
197208 let amountToStake = (pmt.amount - stakeableAmount)
198209 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)]))
200213 }
201214 }
202215
211224 else if ((amount > currentStake))
212225 then throw("You can't withdraw an amount higher than you staked")
213226 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)]))
216234 }
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+ }
217255 }
218256
219257
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let upVote = "upvote"
55
66 let adminAddress1 = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
88 let adminAddress2 = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
99
1010 let adminAddress3 = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
1111
1212 let dyzId = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
1313
1414 func getProfileKey (id) = (id + "_entrepreneurProfile")
1515
1616
1717 func getStatusKey (id) = (id + "_status")
1818
1919
2020 func getVoterAmountKey (id,voteId) = (((id + "_") + voteId) + "_amount")
2121
2222
2323 func getVoteKey (id,type) = if ((type == "upvote"))
2424 then (id + "_upvote")
2525 else throw("Invalid vote type")
2626
2727
2828 func getVoteAmountKey (id,type) = if ((type == "upvote"))
2929 then (((id + "_") + type) + "_amount")
3030 else throw("Invalid vote type")
3131
3232
3333 func profileExist (id) = match getString(this, getProfileKey(id)) {
3434 case a: String =>
3535 true
3636 case _ =>
3737 false
3838 }
3939
4040
4141 func getVoteStatus (voteId) = match getString(this, getStatusKey(voteId)) {
4242 case a: String =>
4343 a
4444 case _ =>
4545 false
4646 }
4747
4848
4949 func getVoteCount (voteId,vote) = match getInteger(this, getVoteKey(voteId, vote)) {
5050 case a: Int =>
5151 a
5252 case _ =>
5353 throw("Not a valid vote ID")
5454 }
5555
5656
5757 func getVoteAmountCount (voteId,vote) = match getInteger(this, getVoteAmountKey(voteId, vote)) {
5858 case a: Int =>
5959 a
6060 case _ =>
6161 0
6262 }
6363
6464
6565 func getVoterKey (address,voteId) = ((((address + "_") + voteId) + "_") + "vote")
6666
6767
6868 func getVoter (address,voteId) = match getString(this, getVoterKey(address, voteId)) {
6969 case a: String =>
7070 a
7171 case _ =>
7272 ""
7373 }
7474
7575
7676 func canVote (address,voteId) = {
7777 let voter = getVoter(address, voteId)
7878 if ((voter == ""))
7979 then true
8080 else false
8181 }
8282
8383
8484 func getStakerKey (staker) = (staker + "_stake")
8585
8686
8787 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()) {
8899 case a: Int =>
89100 a
90101 case _ =>
91102 0
92103 }
93104
94105
95106 @Callable(i)
96107 func addEntrepreneurProfile (name,avatar,bio,gender,location) = if (if (if ((i.caller.bytes == adminAddress1))
97108 then true
98109 else (i.caller.bytes == adminAddress2))
99110 then true
100111 else (i.caller.bytes == adminAddress3))
101112 then {
102113 let transactionId = toBase58String(i.transactionId)
103114 WriteSet([DataEntry(getProfileKey(transactionId), ((((((((name + "_") + avatar) + "_") + bio) + "_") + gender) + "_") + location)), DataEntry(getVoteKey(transactionId, "upvote"), 0), DataEntry(getVoteAmountKey(transactionId, "upvote"), 0), DataEntry(getStatusKey(transactionId), "open")])
104115 }
105116 else throw("Only Dyzrupt Admin can call this dApp function")
106117
107118
108119
109120 @Callable(i)
110121 func vote (voteId,vote) = {
111122 let pmt = extract(i.payment)
112123 let voter = toBase58String(i.caller.bytes)
113124 if ((pmt.amount == 0))
114125 then throw("You cannot vote without paying voting fee")
115126 else if ((pmt.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
116127 then throw("You can only vote with DYZRUPT token")
117128 else if (canVote(voter, voteId))
118129 then if (profileExist(voteId))
119130 then if ((getVoteStatus(voteId) == "open"))
120131 then if ((vote == upVote))
121132 then {
122133 let voteCount = getVoteCount(voteId, vote)
123134 let voteAmountCount = getVoteAmountCount(voteId, vote)
124135 let newVoteCount = (voteCount + 1)
125136 let newVoteAmountCount = (voteAmountCount + pmt.amount)
126137 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)]))
127138 }
128139 else throw("Not a valid vote value")
129140 else throw("This profile is not open for voting")
130141 else throw("Invalid Profile")
131142 else throw("You can't vote twice")
132143 }
133144
134145
135146
136147 @Callable(i)
137148 func openVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1))
138149 then true
139150 else (i.caller.bytes == adminAddress2))
140151 then true
141152 else (i.caller.bytes == adminAddress3))
142153 then if (profileExist(voteId))
143154 then WriteSet([DataEntry(getStatusKey(voteId), "open")])
144155 else throw("Invalid ID")
145156 else throw("Only Dyzrupt Admin can call this dApp function")
146157
147158
148159
149160 @Callable(i)
150161 func closeVote (voteId) = if (if (if ((i.caller.bytes == adminAddress1))
151162 then true
152163 else (i.caller.bytes == adminAddress2))
153164 then true
154165 else (i.caller.bytes == adminAddress3))
155166 then if (profileExist(voteId))
156167 then WriteSet([DataEntry(getStatusKey(voteId), "closed")])
157168 else throw("Invalid ID")
158169 else throw("Only Dyzrupt Admin can call this dApp function")
159170
160171
161172
162173 @Callable(i)
163174 func withdraw (voteId) = {
164175 let voter = toBase58String(i.caller.bytes)
165176 if ((getVoter(voter, voteId) != ""))
166177 then if ((getVoteStatus(voteId) == "closed"))
167178 then {
168179 let currentKey = getVoterAmountKey(voter, voteId)
169180 let currentAmount = match getInteger(this, currentKey) {
170181 case a: Int =>
171182 a
172183 case _ =>
173184 throw("You didn't vote for this entrepreneur")
174185 }
175186 if ((currentAmount == 0))
176187 then throw("Seems you have previously withdrawn.")
177188 else ScriptResult(WriteSet([DataEntry(currentKey, 0)]), TransferSet([ScriptTransfer(i.caller, currentAmount, dyzId)]))
178189 }
179190 else throw("Can't withdraw vote amount while voting is still open.")
180191 else throw("You didn't vote for this entrepreneur")
181192 }
182193
183194
184195
185196 @Callable(i)
186197 func stake () = {
187198 let staker = toBase58String(i.caller.bytes)
188199 let pmt = extract(i.payment)
189200 if ((pmt.amount == 0))
190201 then throw("Stake amount too low")
191202 else if ((pmt.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
192203 then throw("You can only stake with DYZRUPT token")
193204 else {
194205 let currentStake = getCurrentStake(staker)
195- let stakePercent = (20 / 100)
206+ let stakePercent = (10 / 100)
196207 let stakeableAmount = (pmt.amount * stakePercent)
197208 let amountToStake = (pmt.amount - stakeableAmount)
198209 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)]))
200213 }
201214 }
202215
203216
204217
205218 @Callable(i)
206219 func unstake (amount) = {
207220 let staker = toBase58String(i.caller.bytes)
208221 let currentStake = getCurrentStake(staker)
209222 if ((currentStake == 0))
210223 then throw("You don't have any stakes")
211224 else if ((amount > currentStake))
212225 then throw("You can't withdraw an amount higher than you staked")
213226 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)]))
216234 }
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+ }
217255 }
218256
219257

github/deemru/w8io/026f985 
59.29 ms