tx · 9Ws4KU82DfTWY7JLQVVrU6iCAAKwFPtZJ4WT8ikd4hGJ 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u: -0.01440000 Waves 2020.12.29 23:22 [1330460] smart account 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u > SELF 0.00000000 Waves
{ "type": 13, "id": "9Ws4KU82DfTWY7JLQVVrU6iCAAKwFPtZJ4WT8ikd4hGJ", "fee": 1440000, "feeAssetId": null, "timestamp": 1609273384176, "version": 2, "chainId": 84, "sender": "3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u", "senderPublicKey": "FFDorDp8bC9dyUK2w8hYPWPVEcbbk9zYkpHn3gcq9svn", "proofs": [ "4p5Tu3LKsmkNfJmPa84bWAssXwBa1sjFuzpm1DR2B67RnoWPyeLeLhfSjwVLJRGsv27zTVoqZioqZ9H5VBHPZJ6" ], "script": "base64:AAIDAAAAAAAAABoIARIAEgASABIAEgASAwoBARIDCgEBEgASAAAAAAAAAAAJAAAAAWkBAAAADFJlYWRQb29sRGF0YQAAAAAEAAAADkdvdmVyblRva2VuS2V5AgAAABVHb3Zlcm5Ub2tlbk1heERlcG9zaXQEAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5AgAAABpNYXhHb3Zlcm5Ub2tlbkRlcG9zaXRlcktleQQAAAALU3Rha2VkVG9rZW4BAAAAIOJAq7QDzYhwTET2LzAl3k4QauipUX+nMXuMlL1UtmqFBAAAAAtHb3Zlcm5Ub2tlbgEAAAAgEoln+FdEbOEqcKWqoZ9m31Y57dZjzuqbe0fGUmeoMV4EAAAAElVzZXJTdGFrZWRUb2tlbktleQkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAABXwkAAlgAAAABBQAAAAtTdGFrZWRUb2tlbgQAAAASVXNlckdvdmVyblRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAW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VyblRva2VuRGVwb3NpdAIAAAAbIHRvIGJlIGFibGUgdG8gY2xhaW0gcmV3YXJkCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAABHWW91IGhhdmUgdG8gZGVwb3NpdCAxMDAgR292ZXJuVG9rZW4gdG8gY2xhaW0gUmV3YXJkIAogWW91ciBCYWxhbmNlIGlzOiAJAAGkAAAAAQUAAAAVVXNlckdvdmVyblRva2VuQW1vdW50AgAAABMKIERlcG9zaXQgZG9uZSBhdDogCQABpAAAAAEFAAAAC1ByaXplSGVpZ2h0AgAAAAsgIEFuZCB3YWl0OgkAAaQAAAABCQAAZAAAAAIFAAAAC1ByaXplSGVpZ2h0AAAAAAAAAAAKAgAAAA5BbmQgSGVpZ2h0IGlzOgkAAaQAAAABBQAAAAZoZWlnaHQAAAAAjZ15Ng==", "height": 1330460, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9DJGnpqoMJQ8LkhzKi1cswsGLD7AQdLjsHM2MsqfeL4b Next: GwhcxLeYiqUoHzhG5M1zj6ANEU5ZwxPqcN8Dg5CAJZ7P Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
48 | 48 | let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions") | |
49 | 49 | WriteSet([DataEntry(UserGovernTokenKey, 0), DataEntry(UserStakedTokenKey, 0), DataEntry(UserStakeTransactionsKey, 0)]) | |
50 | + | } | |
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | @Callable(i) | |
55 | + | func PushReward () = { | |
56 | + | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
57 | + | let pmt = extract(i.payment) | |
58 | + | let currentKey = toBase58String(i.caller.bytes) | |
59 | + | if (if ((pmt.amount > 0)) | |
60 | + | then (pmt.assetId == GovernToken) | |
61 | + | else false) | |
62 | + | then { | |
63 | + | let GovernTokenKey = "GovernTokenMaxDeposit" | |
64 | + | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
65 | + | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
66 | + | case a: Int => | |
67 | + | a | |
68 | + | case _ => | |
69 | + | 0 | |
70 | + | } | |
71 | + | let currentAmount = match getInteger(this, currentKey) { | |
72 | + | case a: Int => | |
73 | + | a | |
74 | + | case _ => | |
75 | + | 0 | |
76 | + | } | |
77 | + | let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount) | |
78 | + | if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit)) | |
79 | + | then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)]) | |
80 | + | else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)]) | |
81 | + | } | |
82 | + | else throw("Can deposit only StakeToken") | |
50 | 83 | } | |
51 | 84 | ||
52 | 85 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func ReadPoolData () = { | |
8 | 8 | let GovernTokenKey = "GovernTokenMaxDeposit" | |
9 | 9 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
10 | 10 | let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
11 | 11 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
12 | 12 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
13 | 13 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
14 | 14 | let Winner = getStringValue(this, MaxGovernTokenDepositerKey) | |
15 | 15 | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
16 | 16 | case a: Int => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | 0 | |
20 | 20 | } | |
21 | 21 | let ReadUserGovernTokenKey = getStringValue(this, UserGovernTokenKey) | |
22 | 22 | let UserGovernTokenBalance = match getInteger(this, UserGovernTokenKey) { | |
23 | 23 | case a: Int => | |
24 | 24 | a | |
25 | 25 | case _ => | |
26 | 26 | 0 | |
27 | 27 | } | |
28 | 28 | let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey) | |
29 | 29 | let UserStakedTokenBalance = match getInteger(this, UserStakedTokenKey) { | |
30 | 30 | case a: Int => | |
31 | 31 | a | |
32 | 32 | case _ => | |
33 | 33 | 0 | |
34 | 34 | } | |
35 | 35 | throw(((((((("Winner is.....: " + Winner) + " Balance is: ") + toString(MaxGovernTokenDeposit)) + " | |
36 | 36 | Staked Token in your Balance is.....: ") + toString(UserStakedTokenBalance)) + " | |
37 | 37 | Govern Token in your Balance is.....: ") + toString(UserGovernTokenBalance))) | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(i) | |
43 | 43 | func ResetAccount () = { | |
44 | 44 | let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
45 | 45 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
46 | 46 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
47 | 47 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
48 | 48 | let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions") | |
49 | 49 | WriteSet([DataEntry(UserGovernTokenKey, 0), DataEntry(UserStakedTokenKey, 0), DataEntry(UserStakeTransactionsKey, 0)]) | |
50 | + | } | |
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | @Callable(i) | |
55 | + | func PushReward () = { | |
56 | + | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
57 | + | let pmt = extract(i.payment) | |
58 | + | let currentKey = toBase58String(i.caller.bytes) | |
59 | + | if (if ((pmt.amount > 0)) | |
60 | + | then (pmt.assetId == GovernToken) | |
61 | + | else false) | |
62 | + | then { | |
63 | + | let GovernTokenKey = "GovernTokenMaxDeposit" | |
64 | + | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
65 | + | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
66 | + | case a: Int => | |
67 | + | a | |
68 | + | case _ => | |
69 | + | 0 | |
70 | + | } | |
71 | + | let currentAmount = match getInteger(this, currentKey) { | |
72 | + | case a: Int => | |
73 | + | a | |
74 | + | case _ => | |
75 | + | 0 | |
76 | + | } | |
77 | + | let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount) | |
78 | + | if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit)) | |
79 | + | then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)]) | |
80 | + | else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)]) | |
81 | + | } | |
82 | + | else throw("Can deposit only StakeToken") | |
50 | 83 | } | |
51 | 84 | ||
52 | 85 | ||
53 | 86 | ||
54 | 87 | @Callable(i) | |
55 | 88 | func Stake () = { | |
56 | 89 | let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
57 | 90 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
58 | 91 | let GovernTokenSmartContractBalance = assetBalance(this, GovernToken) | |
59 | 92 | let StakedTokenSmartContractBalance = assetBalance(this, StakedToken) | |
60 | 93 | let pmt = extract(i.payment) | |
61 | 94 | if (if ((pmt.amount > 0)) | |
62 | 95 | then (pmt.assetId == StakedToken) | |
63 | 96 | else false) | |
64 | 97 | then { | |
65 | 98 | let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking") | |
66 | 99 | let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings") | |
67 | 100 | let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions") | |
68 | 101 | let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight") | |
69 | 102 | let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) { | |
70 | 103 | case a: Int => | |
71 | 104 | a | |
72 | 105 | case _ => | |
73 | 106 | 0 | |
74 | 107 | } | |
75 | 108 | let NewUserStakeTransactions = (UserStakeTransactions + 1) | |
76 | 109 | let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) { | |
77 | 110 | case a: Int => | |
78 | 111 | a | |
79 | 112 | case _ => | |
80 | 113 | 0 | |
81 | 114 | } | |
82 | 115 | let newAmountStakedToken = (currentAmountStakedToken + pmt.amount) | |
83 | 116 | let ContractWalletStakeBalance = assetBalance(this, StakedToken) | |
84 | 117 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
85 | 118 | case a: Int => | |
86 | 119 | a | |
87 | 120 | case _ => | |
88 | 121 | 0 | |
89 | 122 | } | |
90 | 123 | let StakeBalanceAmount = (StakeBalance + pmt.amount) | |
91 | 124 | let PrizeAmount = (ContractWalletStakeBalance - StakeBalance) | |
92 | 125 | let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) { | |
93 | 126 | case a: Int => | |
94 | 127 | a | |
95 | 128 | case _ => | |
96 | 129 | 0 | |
97 | 130 | } | |
98 | 131 | let HeightTransactFundBox = match getInteger(this, "PrizeHeight") { | |
99 | 132 | case a: Int => | |
100 | 133 | a | |
101 | 134 | case _ => | |
102 | 135 | 0 | |
103 | 136 | } | |
104 | 137 | let PrizeHeightValue = if (if ((HeightTransactFundBox == 0)) | |
105 | 138 | then (PrizeAmount != 0) | |
106 | 139 | else false) | |
107 | 140 | then height | |
108 | 141 | else 0 | |
109 | 142 | if ((1 > GovernTokenSmartContractBalance)) | |
110 | 143 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
111 | 144 | else { | |
112 | 145 | let Reward = if ((StakedTokenSmartContractBalance == 0)) | |
113 | 146 | then 10 | |
114 | 147 | else if ((NewUserStakeTransactions > 50)) | |
115 | 148 | then ((10 * NewUserStakeTransactions) * (newAmountStakedToken / StakedTokenSmartContractBalance)) | |
116 | 149 | else (10 * (newAmountStakedToken / StakedTokenSmartContractBalance)) | |
117 | 150 | let newAmountGovernToken = (currentAmountGovernToken + Reward) | |
118 | 151 | ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmountGovernToken), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, Reward, GovernToken)])) | |
119 | 152 | } | |
120 | 153 | } | |
121 | 154 | else throw("Can deposit only StakeToken") | |
122 | 155 | } | |
123 | 156 | ||
124 | 157 | ||
125 | 158 | ||
126 | 159 | @Callable(i) | |
127 | 160 | func DepositGovernToken () = { | |
128 | 161 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
129 | 162 | let GovernTokenMaxDeposit = toBase58String(GovernToken) | |
130 | 163 | let pmt = extract(i.payment) | |
131 | 164 | if (if (isDefined(pmt.assetId)) | |
132 | 165 | then (extract(pmt.assetId) == GovernToken) | |
133 | 166 | else false) | |
134 | 167 | then { | |
135 | 168 | let currentKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
136 | 169 | let currentAmount = match getInteger(this, currentKey) { | |
137 | 170 | case a: Int => | |
138 | 171 | a | |
139 | 172 | case _ => | |
140 | 173 | 0 | |
141 | 174 | } | |
142 | 175 | let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount) | |
143 | 176 | let GovernTokenKey = "GovernTokenMaxDeposit" | |
144 | 177 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
145 | 178 | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
146 | 179 | case a: Int => | |
147 | 180 | a | |
148 | 181 | case _ => | |
149 | 182 | 0 | |
150 | 183 | } | |
151 | 184 | if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit)) | |
152 | 185 | then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)]) | |
153 | 186 | else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)]) | |
154 | 187 | } | |
155 | 188 | else throw("Can deposit only Govern Token") | |
156 | 189 | } | |
157 | 190 | ||
158 | 191 | ||
159 | 192 | ||
160 | 193 | @Callable(i) | |
161 | 194 | func WithdrawStakedFunds (amount) = { | |
162 | 195 | let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
163 | 196 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
164 | 197 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
165 | 198 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
166 | 199 | let currentKey = toBase58String(i.caller.bytes) | |
167 | 200 | let currentAmount = match getInteger(this, UserStakedTokenKey) { | |
168 | 201 | case a: Int => | |
169 | 202 | a | |
170 | 203 | case _ => | |
171 | 204 | 0 | |
172 | 205 | } | |
173 | 206 | let newAmount = (currentAmount - amount) | |
174 | 207 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
175 | 208 | case a: Int => | |
176 | 209 | a | |
177 | 210 | case _ => | |
178 | 211 | 0 | |
179 | 212 | } | |
180 | 213 | let StakeBalanceAmount = (StakeBalance - amount) | |
181 | 214 | if ((0 > amount)) | |
182 | 215 | then throw("Can't withdraw negative amount") | |
183 | 216 | else if ((0 > newAmount)) | |
184 | 217 | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(currentAmount))) | |
185 | 218 | else { | |
186 | 219 | let GovernTokenAmount = assetBalance(this, GovernToken) | |
187 | 220 | if ((1 > GovernTokenAmount)) | |
188 | 221 | then throw("No enough GovernToken In Contract") | |
189 | 222 | else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 1), DataEntry(UserStakedTokenKey, newAmount), DataEntry("StakeBalance", StakeBalanceAmount)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken), ScriptTransfer(i.caller, amount, StakedToken)])) | |
190 | 223 | } | |
191 | 224 | } | |
192 | 225 | ||
193 | 226 | ||
194 | 227 | ||
195 | 228 | @Callable(i) | |
196 | 229 | func HarvestGovernToiken (amount) = { | |
197 | 230 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
198 | 231 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_Farm_") + toBase58String(GovernToken)) | |
199 | 232 | let currentKey = toBase58String(i.caller.bytes) | |
200 | 233 | let currentAmount = match getInteger(this, UserGovernTokenKey) { | |
201 | 234 | case a: Int => | |
202 | 235 | a | |
203 | 236 | case _ => | |
204 | 237 | 0 | |
205 | 238 | } | |
206 | 239 | let newAmount = (currentAmount - amount) | |
207 | 240 | if ((0 > amount)) | |
208 | 241 | then throw("Can't withdraw negative amount") | |
209 | 242 | else if ((0 > newAmount)) | |
210 | 243 | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(currentAmount))) | |
211 | 244 | else { | |
212 | 245 | let GovernTokenAmount = assetBalance(this, GovernToken) | |
213 | 246 | ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, GovernToken)])) | |
214 | 247 | } | |
215 | 248 | } | |
216 | 249 | ||
217 | 250 | ||
218 | 251 | ||
219 | 252 | @Callable(i) | |
220 | 253 | func delayprize () = { | |
221 | 254 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
222 | 255 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
223 | 256 | let UserWalletSGovernBalance = assetBalance(Address(i.caller.bytes), GovernToken) | |
224 | 257 | let ActualDelay = match getInteger(this, "Delay") { | |
225 | 258 | case a: Int => | |
226 | 259 | a | |
227 | 260 | case _ => | |
228 | 261 | 0 | |
229 | 262 | } | |
230 | 263 | let ActualDelayCost = match getInteger(this, "DelayCost") { | |
231 | 264 | case a: Int => | |
232 | 265 | a | |
233 | 266 | case _ => | |
234 | 267 | 10 | |
235 | 268 | } | |
236 | 269 | let pmt = extract(i.payment) | |
237 | 270 | if (if (isDefined(pmt.assetId)) | |
238 | 271 | then (extract(pmt.assetId) == GovernToken) | |
239 | 272 | else false) | |
240 | 273 | then { | |
241 | 274 | let UserGovernTokenAmount = pmt.amount | |
242 | 275 | let NewDelayCost = if ((ActualDelayCost == 0)) | |
243 | 276 | then 10 | |
244 | 277 | else (2 * ActualDelayCost) | |
245 | 278 | if ((UserGovernTokenAmount >= NewDelayCost)) | |
246 | 279 | then { | |
247 | 280 | let NewDelay = (ActualDelay + 10) | |
248 | 281 | WriteSet([DataEntry("Delay", NewDelay), DataEntry("DelayCost", NewDelayCost)]) | |
249 | 282 | } | |
250 | 283 | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(NewDelayCost)) + "TROIKAs")) | |
251 | 284 | } | |
252 | 285 | else throw("Can Use only Govern Token to Delay Reward") | |
253 | 286 | } | |
254 | 287 | ||
255 | 288 | ||
256 | 289 | ||
257 | 290 | @Callable(i) | |
258 | 291 | func ClaimPrize () = { | |
259 | 292 | let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
260 | 293 | let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
261 | 294 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
262 | 295 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
263 | 296 | let GovernTokenAmount = assetBalance(this, GovernToken) | |
264 | 297 | let ContractWalletStakeBalance = assetBalance(this, StakedToken) | |
265 | 298 | let StakeBalance = match getInteger(this, "StakeBalance") { | |
266 | 299 | case a: Int => | |
267 | 300 | a | |
268 | 301 | case _ => | |
269 | 302 | 0 | |
270 | 303 | } | |
271 | 304 | let PrizeAmount = (ContractWalletStakeBalance - StakeBalance) | |
272 | 305 | let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) { | |
273 | 306 | case a: Int => | |
274 | 307 | a | |
275 | 308 | case _ => | |
276 | 309 | 0 | |
277 | 310 | } | |
278 | 311 | let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) { | |
279 | 312 | case a: Int => | |
280 | 313 | a | |
281 | 314 | case _ => | |
282 | 315 | 0 | |
283 | 316 | } | |
284 | 317 | let ActualDelay = match getInteger(this, "Delay") { | |
285 | 318 | case a: Int => | |
286 | 319 | a | |
287 | 320 | case _ => | |
288 | 321 | 0 | |
289 | 322 | } | |
290 | 323 | let GovernTokenKey = "GovernTokenMaxDeposit" | |
291 | 324 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
292 | 325 | let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey) | |
293 | 326 | let PrizeHeight = match getInteger(this, "PrizeHeight") { | |
294 | 327 | case a: Int => | |
295 | 328 | a | |
296 | 329 | case _ => | |
297 | 330 | 0 | |
298 | 331 | } | |
299 | 332 | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
300 | 333 | case a: Int => | |
301 | 334 | a | |
302 | 335 | case _ => | |
303 | 336 | 0 | |
304 | 337 | } | |
305 | 338 | if (if ((PrizeAmount == 0)) | |
306 | 339 | then true | |
307 | 340 | else (100 > GovernTokenAmount)) | |
308 | 341 | then throw("No prize to Claim or No enough Govern Token en Contract") | |
309 | 342 | else if ((UserGovernTokenKey != PrizeWinner)) | |
310 | 343 | then throw("You are not the winner hence cannot claim the reward ") | |
311 | 344 | else if ((1 > UserStakedTokenAmount)) | |
312 | 345 | then throw(("You have to Stake StakedToken to claim reward | |
313 | 346 | Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount))) | |
314 | 347 | else if (if (if ((UserGovernTokenAmount >= 100)) | |
315 | 348 | then (height >= (PrizeHeight + ActualDelay)) | |
316 | 349 | else false) | |
317 | 350 | then (height > 0) | |
318 | 351 | else false) | |
319 | 352 | then if ((UserGovernTokenAmount >= MaxGovernTokenDeposit)) | |
320 | 353 | then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry("FundBox", 0), DataEntry(GovernTokenKey, 0), DataEntry(UserGovernTokenKey, 0), DataEntry(MaxGovernTokenDepositerKey, ""), DataEntry("PrizeHeight", 0), DataEntry("Delay", 0), DataEntry("DelayCost", 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)])) | |
321 | 354 | else throw((("You should deposit at least " + toString(MaxGovernTokenDeposit)) + " to be able to claim reward")) | |
322 | 355 | else throw(((((((("You have to deposit 100 GovernToken to claim Reward | |
323 | 356 | Your Balance is: " + toString(UserGovernTokenAmount)) + " | |
324 | 357 | Deposit done at: ") + toString(PrizeHeight)) + " And wait:") + toString((PrizeHeight + 10))) + "And Height is:") + toString(height))) | |
325 | 358 | } | |
326 | 359 | ||
327 | 360 |
github/deemru/w8io/169f3d6 41.55 ms ◑