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