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 | |
---|---|---|---|
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(a) | |
64 | - | func Stake () = { | |
65 | - | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
64 | + | func PushReward () = { | |
66 | 65 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
67 | - | let q = assetBalance(this, e) | |
68 | - | let r = assetBalance(this, d) | |
69 | - | let s = extract(a.payment) | |
70 | - | if (if ((s.amount > 0)) | |
71 | - | then (s.assetId == d) | |
66 | + | let q = extract(a.payment) | |
67 | + | let r = toBase58String(a.caller.bytes) | |
68 | + | if (if ((q.amount > 0)) | |
69 | + | then (q.assetId == e) | |
72 | 70 | else false) | |
73 | 71 | then { | |
74 | - | let f = (toBase58String(a.caller.bytes) + "_Staking") | |
75 | - | let g = (toBase58String(a.caller.bytes) + "_Earnings") | |
76 | - | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
77 | - | let t = (toBase58String(a.caller.bytes) + "_PrizeHeight") | |
78 | - | let u = { | |
79 | - | let j = getInteger(this, p) | |
80 | - | if ($isInstanceOf(j, "Int")) | |
81 | - | then { | |
82 | - | let k = j | |
83 | - | k | |
84 | - | } | |
85 | - | else 0 | |
86 | - | } | |
87 | - | let v = (u + 1) | |
88 | - | let w = { | |
89 | - | let j = getInteger(this, f) | |
90 | - | if ($isInstanceOf(j, "Int")) | |
91 | - | then { | |
92 | - | let k = j | |
93 | - | k | |
94 | - | } | |
95 | - | else 0 | |
96 | - | } | |
97 | - | let x = (w + s.amount) | |
98 | - | let y = assetBalance(this, d) | |
99 | - | let z = { | |
100 | - | let j = getInteger(this, "StakeBalance") | |
101 | - | if ($isInstanceOf(j, "Int")) | |
102 | - | then { | |
103 | - | let k = j | |
104 | - | k | |
105 | - | } | |
106 | - | else 0 | |
107 | - | } | |
108 | - | let A = (z + s.amount) | |
109 | - | let B = (y - z) | |
110 | - | let C = { | |
111 | - | let j = getInteger(this, g) | |
112 | - | if ($isInstanceOf(j, "Int")) | |
113 | - | then { | |
114 | - | let k = j | |
115 | - | k | |
116 | - | } | |
117 | - | else 0 | |
118 | - | } | |
119 | - | let D = { | |
120 | - | let j = getInteger(this, "PrizeHeight") | |
121 | - | if ($isInstanceOf(j, "Int")) | |
122 | - | then { | |
123 | - | let k = j | |
124 | - | k | |
125 | - | } | |
126 | - | else 0 | |
127 | - | } | |
128 | - | let E = if (if ((D == 0)) | |
129 | - | then (B != 0) | |
130 | - | else false) | |
131 | - | then height | |
132 | - | else 0 | |
133 | - | if ((1 > q)) | |
134 | - | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
135 | - | else { | |
136 | - | let F = if ((r == 0)) | |
137 | - | then 10 | |
138 | - | else if ((v > 50)) | |
139 | - | then ((10 * v) * (x / r)) | |
140 | - | else (10 * (x / r)) | |
141 | - | let G = (C + F) | |
142 | - | ScriptResult(WriteSet([DataEntry(g, G), DataEntry(f, x), DataEntry(p, v), DataEntry("StakeBalance", A), DataEntry("FundBox", B), DataEntry("PrizeHeight", E)]), TransferSet([ScriptTransfer(a.caller, F, e)])) | |
143 | - | } | |
144 | - | } | |
145 | - | else throw("Can deposit only StakeToken") | |
146 | - | } | |
147 | - | ||
148 | - | ||
149 | - | ||
150 | - | @Callable(a) | |
151 | - | func DepositGovernToken () = { | |
152 | - | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
153 | - | let H = toBase58String(e) | |
154 | - | let s = extract(a.payment) | |
155 | - | if (if (isDefined(s.assetId)) | |
156 | - | then (extract(s.assetId) == e) | |
157 | - | else false) | |
158 | - | then { | |
159 | - | let I = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
160 | - | let J = { | |
161 | - | let j = getInteger(this, I) | |
162 | - | if ($isInstanceOf(j, "Int")) | |
163 | - | then { | |
164 | - | let k = j | |
165 | - | k | |
166 | - | } | |
167 | - | else 0 | |
168 | - | } | |
169 | - | let K = (J + s.amount) | |
170 | 72 | let b = "GovernTokenMaxDeposit" | |
171 | 73 | let c = "MaxGovernTokenDepositerKey" | |
172 | 74 | let i = { | |
178 | 80 | } | |
179 | 81 | else 0 | |
180 | 82 | } | |
181 | - | if ((K > i)) | |
182 | - | then WriteSet([DataEntry(I, K), DataEntry(b, K), DataEntry(c, I)]) | |
183 | - | else WriteSet([DataEntry(I, K)]) | |
83 | + | let s = { | |
84 | + | let j = getInteger(this, r) | |
85 | + | if ($isInstanceOf(j, "Int")) | |
86 | + | then { | |
87 | + | let k = j | |
88 | + | k | |
89 | + | } | |
90 | + | else 0 | |
91 | + | } | |
92 | + | let t = (s + q.amount) | |
93 | + | if ((t > i)) | |
94 | + | then WriteSet([DataEntry(r, t), DataEntry(b, t), DataEntry(c, r)]) | |
95 | + | else WriteSet([DataEntry(r, t)]) | |
96 | + | } | |
97 | + | else throw("Can deposit only StakeToken") | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | @Callable(a) | |
103 | + | func Stake () = { | |
104 | + | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
105 | + | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
106 | + | let u = assetBalance(this, e) | |
107 | + | let v = assetBalance(this, d) | |
108 | + | let q = extract(a.payment) | |
109 | + | if (if ((q.amount > 0)) | |
110 | + | then (q.assetId == d) | |
111 | + | else false) | |
112 | + | then { | |
113 | + | let f = (toBase58String(a.caller.bytes) + "_Staking") | |
114 | + | let g = (toBase58String(a.caller.bytes) + "_Earnings") | |
115 | + | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
116 | + | let w = (toBase58String(a.caller.bytes) + "_PrizeHeight") | |
117 | + | let x = { | |
118 | + | let j = getInteger(this, p) | |
119 | + | if ($isInstanceOf(j, "Int")) | |
120 | + | then { | |
121 | + | let k = j | |
122 | + | k | |
123 | + | } | |
124 | + | else 0 | |
125 | + | } | |
126 | + | let y = (x + 1) | |
127 | + | let z = { | |
128 | + | let j = getInteger(this, f) | |
129 | + | if ($isInstanceOf(j, "Int")) | |
130 | + | then { | |
131 | + | let k = j | |
132 | + | k | |
133 | + | } | |
134 | + | else 0 | |
135 | + | } | |
136 | + | let A = (z + q.amount) | |
137 | + | let B = assetBalance(this, d) | |
138 | + | let C = { | |
139 | + | let j = getInteger(this, "StakeBalance") | |
140 | + | if ($isInstanceOf(j, "Int")) | |
141 | + | then { | |
142 | + | let k = j | |
143 | + | k | |
144 | + | } | |
145 | + | else 0 | |
146 | + | } | |
147 | + | let D = (C + q.amount) | |
148 | + | let E = (B - C) | |
149 | + | let F = { | |
150 | + | let j = getInteger(this, g) | |
151 | + | if ($isInstanceOf(j, "Int")) | |
152 | + | then { | |
153 | + | let k = j | |
154 | + | k | |
155 | + | } | |
156 | + | else 0 | |
157 | + | } | |
158 | + | let G = { | |
159 | + | let j = getInteger(this, "PrizeHeight") | |
160 | + | if ($isInstanceOf(j, "Int")) | |
161 | + | then { | |
162 | + | let k = j | |
163 | + | k | |
164 | + | } | |
165 | + | else 0 | |
166 | + | } | |
167 | + | let H = if (if ((G == 0)) | |
168 | + | then (E != 0) | |
169 | + | else false) | |
170 | + | then height | |
171 | + | else 0 | |
172 | + | if ((1 > u)) | |
173 | + | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
174 | + | else { | |
175 | + | let I = if ((v == 0)) | |
176 | + | then 10 | |
177 | + | else if ((y > 50)) | |
178 | + | then ((10 * y) * (A / v)) | |
179 | + | else (10 * (A / v)) | |
180 | + | let J = (F + I) | |
181 | + | ScriptResult(WriteSet([DataEntry(g, J), DataEntry(f, A), DataEntry(p, y), DataEntry("StakeBalance", D), DataEntry("FundBox", E), DataEntry("PrizeHeight", H)]), TransferSet([ScriptTransfer(a.caller, I, e)])) | |
182 | + | } | |
183 | + | } | |
184 | + | else throw("Can deposit only StakeToken") | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | @Callable(a) | |
190 | + | func DepositGovernToken () = { | |
191 | + | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
192 | + | let K = toBase58String(e) | |
193 | + | let q = extract(a.payment) | |
194 | + | if (if (isDefined(q.assetId)) | |
195 | + | then (extract(q.assetId) == e) | |
196 | + | else false) | |
197 | + | then { | |
198 | + | let r = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
199 | + | let s = { | |
200 | + | let j = getInteger(this, r) | |
201 | + | if ($isInstanceOf(j, "Int")) | |
202 | + | then { | |
203 | + | let k = j | |
204 | + | k | |
205 | + | } | |
206 | + | else 0 | |
207 | + | } | |
208 | + | let t = (s + q.amount) | |
209 | + | let b = "GovernTokenMaxDeposit" | |
210 | + | let c = "MaxGovernTokenDepositerKey" | |
211 | + | let i = { | |
212 | + | let j = getInteger(this, b) | |
213 | + | if ($isInstanceOf(j, "Int")) | |
214 | + | then { | |
215 | + | let k = j | |
216 | + | k | |
217 | + | } | |
218 | + | else 0 | |
219 | + | } | |
220 | + | if ((t > i)) | |
221 | + | then WriteSet([DataEntry(r, t), DataEntry(b, t), DataEntry(c, r)]) | |
222 | + | else WriteSet([DataEntry(r, t)]) | |
184 | 223 | } | |
185 | 224 | else throw("Can deposit only Govern Token") | |
186 | 225 | } | |
193 | 232 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
194 | 233 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
195 | 234 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
196 | - | let | |
197 | - | let | |
235 | + | let r = toBase58String(a.caller.bytes) | |
236 | + | let s = { | |
198 | 237 | let j = getInteger(this, f) | |
199 | 238 | if ($isInstanceOf(j, "Int")) | |
200 | 239 | then { | |
203 | 242 | } | |
204 | 243 | else 0 | |
205 | 244 | } | |
206 | - | let M = ( | |
207 | - | let | |
245 | + | let M = (s - L) | |
246 | + | let C = { | |
208 | 247 | let j = getInteger(this, "StakeBalance") | |
209 | 248 | if ($isInstanceOf(j, "Int")) | |
210 | 249 | then { | |
213 | 252 | } | |
214 | 253 | else 0 | |
215 | 254 | } | |
216 | - | let | |
255 | + | let D = (C - L) | |
217 | 256 | if ((0 > L)) | |
218 | 257 | then throw("Can't withdraw negative amount") | |
219 | 258 | else if ((0 > M)) | |
220 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
259 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(s))) | |
221 | 260 | else { | |
222 | 261 | let N = assetBalance(this, e) | |
223 | 262 | if ((1 > N)) | |
224 | 263 | then throw("No enough GovernToken In Contract") | |
225 | - | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, M), DataEntry("StakeBalance", | |
264 | + | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, M), DataEntry("StakeBalance", D)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, L, d)])) | |
226 | 265 | } | |
227 | 266 | } | |
228 | 267 | ||
232 | 271 | func HarvestGovernToiken (L) = { | |
233 | 272 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
234 | 273 | let g = ((toBase58String(a.caller.bytes) + "_Farm_") + toBase58String(e)) | |
235 | - | let | |
236 | - | let | |
274 | + | let r = toBase58String(a.caller.bytes) | |
275 | + | let s = { | |
237 | 276 | let j = getInteger(this, g) | |
238 | 277 | if ($isInstanceOf(j, "Int")) | |
239 | 278 | then { | |
242 | 281 | } | |
243 | 282 | else 0 | |
244 | 283 | } | |
245 | - | let M = ( | |
284 | + | let M = (s - L) | |
246 | 285 | if ((0 > L)) | |
247 | 286 | then throw("Can't withdraw negative amount") | |
248 | 287 | else if ((0 > M)) | |
249 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
288 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(s))) | |
250 | 289 | else { | |
251 | 290 | let N = assetBalance(this, e) | |
252 | 291 | ScriptResult(WriteSet([DataEntry(g, M)]), TransferSet([ScriptTransfer(a.caller, L, e)])) | |
278 | 317 | } | |
279 | 318 | else 10 | |
280 | 319 | } | |
281 | - | let | |
282 | - | if (if (isDefined( | |
283 | - | then (extract( | |
320 | + | let q = extract(a.payment) | |
321 | + | if (if (isDefined(q.assetId)) | |
322 | + | then (extract(q.assetId) == e) | |
284 | 323 | else false) | |
285 | 324 | then { | |
286 | - | let R = | |
325 | + | let R = q.amount | |
287 | 326 | let S = if ((Q == 0)) | |
288 | 327 | then 10 | |
289 | 328 | else (2 * Q) | |
306 | 345 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
307 | 346 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
308 | 347 | let N = assetBalance(this, e) | |
309 | - | let | |
310 | - | let | |
348 | + | let B = assetBalance(this, d) | |
349 | + | let C = { | |
311 | 350 | let j = getInteger(this, "StakeBalance") | |
312 | 351 | if ($isInstanceOf(j, "Int")) | |
313 | 352 | then { | |
316 | 355 | } | |
317 | 356 | else 0 | |
318 | 357 | } | |
319 | - | let | |
358 | + | let E = (B - C) | |
320 | 359 | let R = { | |
321 | 360 | let j = getInteger(this, g) | |
322 | 361 | if ($isInstanceOf(j, "Int")) | |
365 | 404 | } | |
366 | 405 | else 0 | |
367 | 406 | } | |
368 | - | if (if (( | |
407 | + | if (if ((E == 0)) | |
369 | 408 | then true | |
370 | 409 | else (100 > N)) | |
371 | 410 | then throw("No prize to Claim or No enough Govern Token en Contract") | |
380 | 419 | then (height > 0) | |
381 | 420 | else false) | |
382 | 421 | then if ((R >= i)) | |
383 | - | then ScriptResult(WriteSet([DataEntry(V, | |
422 | + | then ScriptResult(WriteSet([DataEntry(V, E), DataEntry("FundBox", 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, ""), DataEntry("PrizeHeight", 0), DataEntry("Delay", 0), DataEntry("DelayCost", 0)]), TransferSet([ScriptTransfer(a.caller, E, d), ScriptTransfer(a.caller, 100, e)])) | |
384 | 423 | else throw((("You should deposit at least " + toString(i)) + " to be able to claim reward")) | |
385 | 424 | else throw(((((((("You have to deposit 100 GovernToken to claim Reward | |
386 | 425 | Your Balance is: " + toString(R)) + " |
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(a) | |
7 | 7 | func ReadPoolData () = { | |
8 | 8 | let b = "GovernTokenMaxDeposit" | |
9 | 9 | let c = "MaxGovernTokenDepositerKey" | |
10 | 10 | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
11 | 11 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
12 | 12 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
13 | 13 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
14 | 14 | let h = getStringValue(this, c) | |
15 | 15 | let i = { | |
16 | 16 | let j = getInteger(this, b) | |
17 | 17 | if ($isInstanceOf(j, "Int")) | |
18 | 18 | then { | |
19 | 19 | let k = j | |
20 | 20 | k | |
21 | 21 | } | |
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | let l = getStringValue(this, g) | |
25 | 25 | let m = { | |
26 | 26 | let j = getInteger(this, g) | |
27 | 27 | if ($isInstanceOf(j, "Int")) | |
28 | 28 | then { | |
29 | 29 | let k = j | |
30 | 30 | k | |
31 | 31 | } | |
32 | 32 | else 0 | |
33 | 33 | } | |
34 | 34 | let n = getStringValue(this, f) | |
35 | 35 | let o = { | |
36 | 36 | let j = getInteger(this, f) | |
37 | 37 | if ($isInstanceOf(j, "Int")) | |
38 | 38 | then { | |
39 | 39 | let k = j | |
40 | 40 | k | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | throw(((((((("Winner is.....: " + h) + " Balance is: ") + toString(i)) + " | |
45 | 45 | Staked Token in your Balance is.....: ") + toString(o)) + " | |
46 | 46 | Govern Token in your Balance is.....: ") + toString(m))) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(a) | |
52 | 52 | func ResetAccount () = { | |
53 | 53 | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
54 | 54 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
55 | 55 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
56 | 56 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
57 | 57 | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
58 | 58 | WriteSet([DataEntry(g, 0), DataEntry(f, 0), DataEntry(p, 0)]) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(a) | |
64 | - | func Stake () = { | |
65 | - | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
64 | + | func PushReward () = { | |
66 | 65 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
67 | - | let q = assetBalance(this, e) | |
68 | - | let r = assetBalance(this, d) | |
69 | - | let s = extract(a.payment) | |
70 | - | if (if ((s.amount > 0)) | |
71 | - | then (s.assetId == d) | |
66 | + | let q = extract(a.payment) | |
67 | + | let r = toBase58String(a.caller.bytes) | |
68 | + | if (if ((q.amount > 0)) | |
69 | + | then (q.assetId == e) | |
72 | 70 | else false) | |
73 | 71 | then { | |
74 | - | let f = (toBase58String(a.caller.bytes) + "_Staking") | |
75 | - | let g = (toBase58String(a.caller.bytes) + "_Earnings") | |
76 | - | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
77 | - | let t = (toBase58String(a.caller.bytes) + "_PrizeHeight") | |
78 | - | let u = { | |
79 | - | let j = getInteger(this, p) | |
80 | - | if ($isInstanceOf(j, "Int")) | |
81 | - | then { | |
82 | - | let k = j | |
83 | - | k | |
84 | - | } | |
85 | - | else 0 | |
86 | - | } | |
87 | - | let v = (u + 1) | |
88 | - | let w = { | |
89 | - | let j = getInteger(this, f) | |
90 | - | if ($isInstanceOf(j, "Int")) | |
91 | - | then { | |
92 | - | let k = j | |
93 | - | k | |
94 | - | } | |
95 | - | else 0 | |
96 | - | } | |
97 | - | let x = (w + s.amount) | |
98 | - | let y = assetBalance(this, d) | |
99 | - | let z = { | |
100 | - | let j = getInteger(this, "StakeBalance") | |
101 | - | if ($isInstanceOf(j, "Int")) | |
102 | - | then { | |
103 | - | let k = j | |
104 | - | k | |
105 | - | } | |
106 | - | else 0 | |
107 | - | } | |
108 | - | let A = (z + s.amount) | |
109 | - | let B = (y - z) | |
110 | - | let C = { | |
111 | - | let j = getInteger(this, g) | |
112 | - | if ($isInstanceOf(j, "Int")) | |
113 | - | then { | |
114 | - | let k = j | |
115 | - | k | |
116 | - | } | |
117 | - | else 0 | |
118 | - | } | |
119 | - | let D = { | |
120 | - | let j = getInteger(this, "PrizeHeight") | |
121 | - | if ($isInstanceOf(j, "Int")) | |
122 | - | then { | |
123 | - | let k = j | |
124 | - | k | |
125 | - | } | |
126 | - | else 0 | |
127 | - | } | |
128 | - | let E = if (if ((D == 0)) | |
129 | - | then (B != 0) | |
130 | - | else false) | |
131 | - | then height | |
132 | - | else 0 | |
133 | - | if ((1 > q)) | |
134 | - | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
135 | - | else { | |
136 | - | let F = if ((r == 0)) | |
137 | - | then 10 | |
138 | - | else if ((v > 50)) | |
139 | - | then ((10 * v) * (x / r)) | |
140 | - | else (10 * (x / r)) | |
141 | - | let G = (C + F) | |
142 | - | ScriptResult(WriteSet([DataEntry(g, G), DataEntry(f, x), DataEntry(p, v), DataEntry("StakeBalance", A), DataEntry("FundBox", B), DataEntry("PrizeHeight", E)]), TransferSet([ScriptTransfer(a.caller, F, e)])) | |
143 | - | } | |
144 | - | } | |
145 | - | else throw("Can deposit only StakeToken") | |
146 | - | } | |
147 | - | ||
148 | - | ||
149 | - | ||
150 | - | @Callable(a) | |
151 | - | func DepositGovernToken () = { | |
152 | - | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
153 | - | let H = toBase58String(e) | |
154 | - | let s = extract(a.payment) | |
155 | - | if (if (isDefined(s.assetId)) | |
156 | - | then (extract(s.assetId) == e) | |
157 | - | else false) | |
158 | - | then { | |
159 | - | let I = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
160 | - | let J = { | |
161 | - | let j = getInteger(this, I) | |
162 | - | if ($isInstanceOf(j, "Int")) | |
163 | - | then { | |
164 | - | let k = j | |
165 | - | k | |
166 | - | } | |
167 | - | else 0 | |
168 | - | } | |
169 | - | let K = (J + s.amount) | |
170 | 72 | let b = "GovernTokenMaxDeposit" | |
171 | 73 | let c = "MaxGovernTokenDepositerKey" | |
172 | 74 | let i = { | |
173 | 75 | let j = getInteger(this, b) | |
174 | 76 | if ($isInstanceOf(j, "Int")) | |
175 | 77 | then { | |
176 | 78 | let k = j | |
177 | 79 | k | |
178 | 80 | } | |
179 | 81 | else 0 | |
180 | 82 | } | |
181 | - | if ((K > i)) | |
182 | - | then WriteSet([DataEntry(I, K), DataEntry(b, K), DataEntry(c, I)]) | |
183 | - | else WriteSet([DataEntry(I, K)]) | |
83 | + | let s = { | |
84 | + | let j = getInteger(this, r) | |
85 | + | if ($isInstanceOf(j, "Int")) | |
86 | + | then { | |
87 | + | let k = j | |
88 | + | k | |
89 | + | } | |
90 | + | else 0 | |
91 | + | } | |
92 | + | let t = (s + q.amount) | |
93 | + | if ((t > i)) | |
94 | + | then WriteSet([DataEntry(r, t), DataEntry(b, t), DataEntry(c, r)]) | |
95 | + | else WriteSet([DataEntry(r, t)]) | |
96 | + | } | |
97 | + | else throw("Can deposit only StakeToken") | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | @Callable(a) | |
103 | + | func Stake () = { | |
104 | + | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
105 | + | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
106 | + | let u = assetBalance(this, e) | |
107 | + | let v = assetBalance(this, d) | |
108 | + | let q = extract(a.payment) | |
109 | + | if (if ((q.amount > 0)) | |
110 | + | then (q.assetId == d) | |
111 | + | else false) | |
112 | + | then { | |
113 | + | let f = (toBase58String(a.caller.bytes) + "_Staking") | |
114 | + | let g = (toBase58String(a.caller.bytes) + "_Earnings") | |
115 | + | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
116 | + | let w = (toBase58String(a.caller.bytes) + "_PrizeHeight") | |
117 | + | let x = { | |
118 | + | let j = getInteger(this, p) | |
119 | + | if ($isInstanceOf(j, "Int")) | |
120 | + | then { | |
121 | + | let k = j | |
122 | + | k | |
123 | + | } | |
124 | + | else 0 | |
125 | + | } | |
126 | + | let y = (x + 1) | |
127 | + | let z = { | |
128 | + | let j = getInteger(this, f) | |
129 | + | if ($isInstanceOf(j, "Int")) | |
130 | + | then { | |
131 | + | let k = j | |
132 | + | k | |
133 | + | } | |
134 | + | else 0 | |
135 | + | } | |
136 | + | let A = (z + q.amount) | |
137 | + | let B = assetBalance(this, d) | |
138 | + | let C = { | |
139 | + | let j = getInteger(this, "StakeBalance") | |
140 | + | if ($isInstanceOf(j, "Int")) | |
141 | + | then { | |
142 | + | let k = j | |
143 | + | k | |
144 | + | } | |
145 | + | else 0 | |
146 | + | } | |
147 | + | let D = (C + q.amount) | |
148 | + | let E = (B - C) | |
149 | + | let F = { | |
150 | + | let j = getInteger(this, g) | |
151 | + | if ($isInstanceOf(j, "Int")) | |
152 | + | then { | |
153 | + | let k = j | |
154 | + | k | |
155 | + | } | |
156 | + | else 0 | |
157 | + | } | |
158 | + | let G = { | |
159 | + | let j = getInteger(this, "PrizeHeight") | |
160 | + | if ($isInstanceOf(j, "Int")) | |
161 | + | then { | |
162 | + | let k = j | |
163 | + | k | |
164 | + | } | |
165 | + | else 0 | |
166 | + | } | |
167 | + | let H = if (if ((G == 0)) | |
168 | + | then (E != 0) | |
169 | + | else false) | |
170 | + | then height | |
171 | + | else 0 | |
172 | + | if ((1 > u)) | |
173 | + | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
174 | + | else { | |
175 | + | let I = if ((v == 0)) | |
176 | + | then 10 | |
177 | + | else if ((y > 50)) | |
178 | + | then ((10 * y) * (A / v)) | |
179 | + | else (10 * (A / v)) | |
180 | + | let J = (F + I) | |
181 | + | ScriptResult(WriteSet([DataEntry(g, J), DataEntry(f, A), DataEntry(p, y), DataEntry("StakeBalance", D), DataEntry("FundBox", E), DataEntry("PrizeHeight", H)]), TransferSet([ScriptTransfer(a.caller, I, e)])) | |
182 | + | } | |
183 | + | } | |
184 | + | else throw("Can deposit only StakeToken") | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | @Callable(a) | |
190 | + | func DepositGovernToken () = { | |
191 | + | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
192 | + | let K = toBase58String(e) | |
193 | + | let q = extract(a.payment) | |
194 | + | if (if (isDefined(q.assetId)) | |
195 | + | then (extract(q.assetId) == e) | |
196 | + | else false) | |
197 | + | then { | |
198 | + | let r = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
199 | + | let s = { | |
200 | + | let j = getInteger(this, r) | |
201 | + | if ($isInstanceOf(j, "Int")) | |
202 | + | then { | |
203 | + | let k = j | |
204 | + | k | |
205 | + | } | |
206 | + | else 0 | |
207 | + | } | |
208 | + | let t = (s + q.amount) | |
209 | + | let b = "GovernTokenMaxDeposit" | |
210 | + | let c = "MaxGovernTokenDepositerKey" | |
211 | + | let i = { | |
212 | + | let j = getInteger(this, b) | |
213 | + | if ($isInstanceOf(j, "Int")) | |
214 | + | then { | |
215 | + | let k = j | |
216 | + | k | |
217 | + | } | |
218 | + | else 0 | |
219 | + | } | |
220 | + | if ((t > i)) | |
221 | + | then WriteSet([DataEntry(r, t), DataEntry(b, t), DataEntry(c, r)]) | |
222 | + | else WriteSet([DataEntry(r, t)]) | |
184 | 223 | } | |
185 | 224 | else throw("Can deposit only Govern Token") | |
186 | 225 | } | |
187 | 226 | ||
188 | 227 | ||
189 | 228 | ||
190 | 229 | @Callable(a) | |
191 | 230 | func WithdrawStakedFunds (L) = { | |
192 | 231 | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
193 | 232 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
194 | 233 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
195 | 234 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
196 | - | let | |
197 | - | let | |
235 | + | let r = toBase58String(a.caller.bytes) | |
236 | + | let s = { | |
198 | 237 | let j = getInteger(this, f) | |
199 | 238 | if ($isInstanceOf(j, "Int")) | |
200 | 239 | then { | |
201 | 240 | let k = j | |
202 | 241 | k | |
203 | 242 | } | |
204 | 243 | else 0 | |
205 | 244 | } | |
206 | - | let M = ( | |
207 | - | let | |
245 | + | let M = (s - L) | |
246 | + | let C = { | |
208 | 247 | let j = getInteger(this, "StakeBalance") | |
209 | 248 | if ($isInstanceOf(j, "Int")) | |
210 | 249 | then { | |
211 | 250 | let k = j | |
212 | 251 | k | |
213 | 252 | } | |
214 | 253 | else 0 | |
215 | 254 | } | |
216 | - | let | |
255 | + | let D = (C - L) | |
217 | 256 | if ((0 > L)) | |
218 | 257 | then throw("Can't withdraw negative amount") | |
219 | 258 | else if ((0 > M)) | |
220 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
259 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(s))) | |
221 | 260 | else { | |
222 | 261 | let N = assetBalance(this, e) | |
223 | 262 | if ((1 > N)) | |
224 | 263 | then throw("No enough GovernToken In Contract") | |
225 | - | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, M), DataEntry("StakeBalance", | |
264 | + | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, M), DataEntry("StakeBalance", D)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, L, d)])) | |
226 | 265 | } | |
227 | 266 | } | |
228 | 267 | ||
229 | 268 | ||
230 | 269 | ||
231 | 270 | @Callable(a) | |
232 | 271 | func HarvestGovernToiken (L) = { | |
233 | 272 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
234 | 273 | let g = ((toBase58String(a.caller.bytes) + "_Farm_") + toBase58String(e)) | |
235 | - | let | |
236 | - | let | |
274 | + | let r = toBase58String(a.caller.bytes) | |
275 | + | let s = { | |
237 | 276 | let j = getInteger(this, g) | |
238 | 277 | if ($isInstanceOf(j, "Int")) | |
239 | 278 | then { | |
240 | 279 | let k = j | |
241 | 280 | k | |
242 | 281 | } | |
243 | 282 | else 0 | |
244 | 283 | } | |
245 | - | let M = ( | |
284 | + | let M = (s - L) | |
246 | 285 | if ((0 > L)) | |
247 | 286 | then throw("Can't withdraw negative amount") | |
248 | 287 | else if ((0 > M)) | |
249 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
288 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(s))) | |
250 | 289 | else { | |
251 | 290 | let N = assetBalance(this, e) | |
252 | 291 | ScriptResult(WriteSet([DataEntry(g, M)]), TransferSet([ScriptTransfer(a.caller, L, e)])) | |
253 | 292 | } | |
254 | 293 | } | |
255 | 294 | ||
256 | 295 | ||
257 | 296 | ||
258 | 297 | @Callable(a) | |
259 | 298 | func delayprize () = { | |
260 | 299 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
261 | 300 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
262 | 301 | let O = assetBalance(Address(a.caller.bytes), e) | |
263 | 302 | let P = { | |
264 | 303 | let j = getInteger(this, "Delay") | |
265 | 304 | if ($isInstanceOf(j, "Int")) | |
266 | 305 | then { | |
267 | 306 | let k = j | |
268 | 307 | k | |
269 | 308 | } | |
270 | 309 | else 0 | |
271 | 310 | } | |
272 | 311 | let Q = { | |
273 | 312 | let j = getInteger(this, "DelayCost") | |
274 | 313 | if ($isInstanceOf(j, "Int")) | |
275 | 314 | then { | |
276 | 315 | let k = j | |
277 | 316 | k | |
278 | 317 | } | |
279 | 318 | else 10 | |
280 | 319 | } | |
281 | - | let | |
282 | - | if (if (isDefined( | |
283 | - | then (extract( | |
320 | + | let q = extract(a.payment) | |
321 | + | if (if (isDefined(q.assetId)) | |
322 | + | then (extract(q.assetId) == e) | |
284 | 323 | else false) | |
285 | 324 | then { | |
286 | - | let R = | |
325 | + | let R = q.amount | |
287 | 326 | let S = if ((Q == 0)) | |
288 | 327 | then 10 | |
289 | 328 | else (2 * Q) | |
290 | 329 | if ((R >= S)) | |
291 | 330 | then { | |
292 | 331 | let T = (P + 10) | |
293 | 332 | WriteSet([DataEntry("Delay", T), DataEntry("DelayCost", S)]) | |
294 | 333 | } | |
295 | 334 | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(S)) + "TROIKAs")) | |
296 | 335 | } | |
297 | 336 | else throw("Can Use only Govern Token to Delay Reward") | |
298 | 337 | } | |
299 | 338 | ||
300 | 339 | ||
301 | 340 | ||
302 | 341 | @Callable(a) | |
303 | 342 | func ClaimPrize () = { | |
304 | 343 | let d = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr' | |
305 | 344 | let e = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P' | |
306 | 345 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
307 | 346 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
308 | 347 | let N = assetBalance(this, e) | |
309 | - | let | |
310 | - | let | |
348 | + | let B = assetBalance(this, d) | |
349 | + | let C = { | |
311 | 350 | let j = getInteger(this, "StakeBalance") | |
312 | 351 | if ($isInstanceOf(j, "Int")) | |
313 | 352 | then { | |
314 | 353 | let k = j | |
315 | 354 | k | |
316 | 355 | } | |
317 | 356 | else 0 | |
318 | 357 | } | |
319 | - | let | |
358 | + | let E = (B - C) | |
320 | 359 | let R = { | |
321 | 360 | let j = getInteger(this, g) | |
322 | 361 | if ($isInstanceOf(j, "Int")) | |
323 | 362 | then { | |
324 | 363 | let k = j | |
325 | 364 | k | |
326 | 365 | } | |
327 | 366 | else 0 | |
328 | 367 | } | |
329 | 368 | let U = { | |
330 | 369 | let j = getInteger(this, f) | |
331 | 370 | if ($isInstanceOf(j, "Int")) | |
332 | 371 | then { | |
333 | 372 | let k = j | |
334 | 373 | k | |
335 | 374 | } | |
336 | 375 | else 0 | |
337 | 376 | } | |
338 | 377 | let P = { | |
339 | 378 | let j = getInteger(this, "Delay") | |
340 | 379 | if ($isInstanceOf(j, "Int")) | |
341 | 380 | then { | |
342 | 381 | let k = j | |
343 | 382 | k | |
344 | 383 | } | |
345 | 384 | else 0 | |
346 | 385 | } | |
347 | 386 | let b = "GovernTokenMaxDeposit" | |
348 | 387 | let c = "MaxGovernTokenDepositerKey" | |
349 | 388 | let V = getStringValue(this, c) | |
350 | 389 | let W = { | |
351 | 390 | let j = getInteger(this, "PrizeHeight") | |
352 | 391 | if ($isInstanceOf(j, "Int")) | |
353 | 392 | then { | |
354 | 393 | let k = j | |
355 | 394 | k | |
356 | 395 | } | |
357 | 396 | else 0 | |
358 | 397 | } | |
359 | 398 | let i = { | |
360 | 399 | let j = getInteger(this, b) | |
361 | 400 | if ($isInstanceOf(j, "Int")) | |
362 | 401 | then { | |
363 | 402 | let k = j | |
364 | 403 | k | |
365 | 404 | } | |
366 | 405 | else 0 | |
367 | 406 | } | |
368 | - | if (if (( | |
407 | + | if (if ((E == 0)) | |
369 | 408 | then true | |
370 | 409 | else (100 > N)) | |
371 | 410 | then throw("No prize to Claim or No enough Govern Token en Contract") | |
372 | 411 | else if ((g != V)) | |
373 | 412 | then throw("You are not the winner hence cannot claim the reward ") | |
374 | 413 | else if ((1 > U)) | |
375 | 414 | then throw(("You have to Stake StakedToken to claim reward | |
376 | 415 | Your Balance of Staked Tokens is: " + toString(U))) | |
377 | 416 | else if (if (if ((R >= 100)) | |
378 | 417 | then (height >= (W + P)) | |
379 | 418 | else false) | |
380 | 419 | then (height > 0) | |
381 | 420 | else false) | |
382 | 421 | then if ((R >= i)) | |
383 | - | then ScriptResult(WriteSet([DataEntry(V, | |
422 | + | then ScriptResult(WriteSet([DataEntry(V, E), DataEntry("FundBox", 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, ""), DataEntry("PrizeHeight", 0), DataEntry("Delay", 0), DataEntry("DelayCost", 0)]), TransferSet([ScriptTransfer(a.caller, E, d), ScriptTransfer(a.caller, 100, e)])) | |
384 | 423 | else throw((("You should deposit at least " + toString(i)) + " to be able to claim reward")) | |
385 | 424 | else throw(((((((("You have to deposit 100 GovernToken to claim Reward | |
386 | 425 | Your Balance is: " + toString(R)) + " | |
387 | 426 | Deposit done at: ") + toString(W)) + " And wait:") + toString((W + 10))) + "And Height is:") + toString(height))) | |
388 | 427 | } | |
389 | 428 | ||
390 | 429 |
github/deemru/w8io/169f3d6 61.12 ms ◑