tx · B6MPnqNvu7YTFn7hsqwrvLDpeFPSCuAviNf7nNM4z4x9 3N9evuqxGecMq9hBmpdJu2VkMzdR5VNVrvK: -0.02500000 Waves 2022.07.19 19:09 [2146854] smart account 3N9evuqxGecMq9hBmpdJu2VkMzdR5VNVrvK > SELF 0.00000000 Waves
{ "type": 13, "id": "B6MPnqNvu7YTFn7hsqwrvLDpeFPSCuAviNf7nNM4z4x9", "fee": 2500000, "feeAssetId": null, "timestamp": 1658246960437, "version": 2, "chainId": 84, "sender": "3N9evuqxGecMq9hBmpdJu2VkMzdR5VNVrvK", "senderPublicKey": "AHY8zupoYc6HPJ5fh1gQiGE9bNZSeifFbcQQ89okxVug", "proofs": [ "4gpRsru355rL9QCiub58nURNPH86ACb77PGrMVM1To8kf32EKpEaqmpBryPxUexdcTUciBHCSrnxUuyZ99bo5HzP" ], "script": "base64:BgI1CAISABIAEgASABIDCgEBEgASAwoBARIAEgASAwoBCBIECgIBARIECgIBARIDCgEIEgMKAQgDAAtTdGFrZWRUb2tlbgEg+a5dhaqgwfNcHhVklvUuRcimKrmAG+DKV13AJarHD1AAC0dvdmVyblRva2VuASABbIXC10DGLlfEc7PFC2dO3zpcxegcWHrOz/9RkZaZLQAJZEFwcEFkbWluAiMzUDc0YnVIdDk4Qm5vakZjYVJFSlp0Yjk4S0R5VW1aR2VtSg4BaQELRGV2V2l0aGRyYXcABApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMDCQAAAgUKY3VycmVudEtleQUJZEFwcEFkbWluBAxEZXZCb3hBbW91bnQEByRtYXRjaDAJAJoIAgUEdGhpcwIGRGV2Qm94AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAAAwkAZgIAAAUMRGV2Qm94QW1vdW50CQACAQISTm90IGVub3VnaCBiYWxhbmNlCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgZEZXZCb3gAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjY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Glua2VkIHRvIHRoZSBUd2l0dGVyIGFjY291bnQDAwkBAiE9AgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBRNUd2l0dGVyTGlua2VkV2FsbGV0CQECIT0CBRNUd2l0dGVyTGlua2VkV2FsbGV0AgROb25lBwkAAgECSVRoZSB3YWxsZXQgeW91IGFyZSB1c2luZyBpcyBub3QgdGhlIGxpbmtlZCBXYWxsZXQgdG8gdGhpcyBUd2l0dGVyIGFjY291bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQ1Ud2l0dGVyVXNlcklkAgdfV2FsbGV0CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMFA25pbACfNYIx", "height": 2146854, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7db296TdSDtxQ1aGsiUKGe6d1ajzxETUwyGbtqQDs644 Next: QezNWzwaroNcHwRVJK6jFzFMWYwfTtyErcF8cXepTnT Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let b = base58'6ZPMzZseuYoMP4ByozJpVxbugXBobwJYF22zVjW5JjN' | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = "3P74buHt98BnojFcaREJZtb98KDyUmZGemJ" | |
9 | 9 | ||
10 | - | let d = (5 * 100000000) | |
11 | - | ||
12 | - | @Callable(e) | |
10 | + | @Callable(d) | |
13 | 11 | func DevWithdraw () = { | |
14 | - | let | |
15 | - | if (( | |
12 | + | let e = toBase58String(d.caller.bytes) | |
13 | + | if ((e == c)) | |
16 | 14 | then { | |
17 | - | let | |
18 | - | let | |
19 | - | if ($isInstanceOf( | |
15 | + | let f = { | |
16 | + | let g = getInteger(this, "DevBox") | |
17 | + | if ($isInstanceOf(g, "Int")) | |
20 | 18 | then { | |
21 | - | let | |
22 | - | | |
19 | + | let h = g | |
20 | + | h | |
23 | 21 | } | |
24 | 22 | else 0 | |
25 | 23 | } | |
26 | - | if ((0 > | |
24 | + | if ((0 > f)) | |
27 | 25 | then throw("Not enough balance") | |
28 | - | else [IntegerEntry("DevBox", 0), ScriptTransfer( | |
26 | + | else [IntegerEntry("DevBox", 0), ScriptTransfer(d.caller, f, b)] | |
29 | 27 | } | |
30 | 28 | else throw("You cannot withdraw as your are not the Dev.") | |
31 | 29 | } | |
32 | 30 | ||
33 | 31 | ||
34 | 32 | ||
35 | - | @Callable( | |
33 | + | @Callable(d) | |
36 | 34 | func WithdrawWeeklyEarning () = { | |
37 | - | let | |
38 | - | let | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
35 | + | let i = assetBalance(this, a) | |
36 | + | let j = { | |
37 | + | let g = getString(this, "MaxDepositer") | |
38 | + | if ($isInstanceOf(g, "String")) | |
41 | 39 | then { | |
42 | - | let | |
43 | - | | |
40 | + | let h = g | |
41 | + | h | |
44 | 42 | } | |
45 | 43 | else "" | |
46 | 44 | } | |
47 | - | let l = (toBase58String(e.caller.bytes) + "_WeekEarning") | |
45 | + | let k = (toBase58String(d.caller.bytes) + "_WeekEarning") | |
46 | + | let l = { | |
47 | + | let g = getInteger(this, "StakeBalance") | |
48 | + | if ($isInstanceOf(g, "Int")) | |
49 | + | then { | |
50 | + | let h = g | |
51 | + | h | |
52 | + | } | |
53 | + | else 0 | |
54 | + | } | |
48 | 55 | let m = { | |
49 | - | let | |
50 | - | if ($isInstanceOf( | |
56 | + | let g = getInteger(this, "FundBox") | |
57 | + | if ($isInstanceOf(g, "Int")) | |
51 | 58 | then { | |
52 | - | let | |
53 | - | | |
59 | + | let h = g | |
60 | + | h | |
54 | 61 | } | |
55 | 62 | else 0 | |
56 | 63 | } | |
57 | 64 | let n = { | |
58 | - | let | |
59 | - | if ($isInstanceOf( | |
65 | + | let g = getInteger(this, "PrizeHeight") | |
66 | + | if ($isInstanceOf(g, "Int")) | |
60 | 67 | then { | |
61 | - | let | |
62 | - | | |
68 | + | let h = g | |
69 | + | h | |
63 | 70 | } | |
64 | 71 | else 0 | |
65 | 72 | } | |
66 | - | let o = { | |
67 | - | let h = getInteger(this, "PrizeHeight") | |
68 | - | if ($isInstanceOf(h, "Int")) | |
73 | + | let o = if (if ((n == 0)) | |
74 | + | then (m == 0) | |
75 | + | else false) | |
76 | + | then 0 | |
77 | + | else if (if ((n == 0)) | |
78 | + | then (m != 0) | |
79 | + | else false) | |
80 | + | then height | |
81 | + | else if (if ((n != 0)) | |
82 | + | then (m != 0) | |
83 | + | else false) | |
84 | + | then n | |
85 | + | else 0 | |
86 | + | let e = toBase58String(d.caller.bytes) | |
87 | + | let p = { | |
88 | + | let g = getInteger(this, k) | |
89 | + | if ($isInstanceOf(g, "Int")) | |
69 | 90 | then { | |
70 | - | let | |
71 | - | | |
91 | + | let h = g | |
92 | + | h | |
72 | 93 | } | |
73 | 94 | else 0 | |
74 | 95 | } | |
75 | - | let p = if (if ((o == 0)) | |
76 | - | then (n == 0) | |
77 | - | else false) | |
78 | - | then 0 | |
79 | - | else if (if ((o == 0)) | |
80 | - | then (n != 0) | |
81 | - | else false) | |
82 | - | then height | |
83 | - | else if (if ((o != 0)) | |
84 | - | then (n != 0) | |
85 | - | else false) | |
86 | - | then o | |
87 | - | else 0 | |
88 | - | let f = toBase58String(e.caller.bytes) | |
89 | - | let q = { | |
90 | - | let h = getInteger(this, l) | |
91 | - | if ($isInstanceOf(h, "Int")) | |
92 | - | then { | |
93 | - | let i = h | |
94 | - | i | |
95 | - | } | |
96 | - | else 0 | |
97 | - | } | |
98 | - | if ((0 > q)) | |
96 | + | if ((0 > p)) | |
99 | 97 | then throw("Can't withdraw negative amount") | |
100 | - | else if ((0 > | |
101 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(( | |
102 | - | else [IntegerEntry( | |
98 | + | else if ((0 > p)) | |
99 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((p / 100000000)))) | |
100 | + | else [IntegerEntry(k, 0), IntegerEntry("PrizeHeight", o), IntegerEntry("MaxDeposit", 0), ScriptTransfer(d.caller, p, a)] | |
103 | 101 | } | |
104 | 102 | ||
105 | 103 | ||
106 | 104 | ||
107 | - | @Callable( | |
105 | + | @Callable(d) | |
108 | 106 | func PushReward () = { | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | then | |
107 | + | let q = 10 | |
108 | + | let r = (7 * 1440) | |
109 | + | let s = 60 | |
110 | + | let t = (1440 * 1) | |
111 | + | let u = 3 | |
112 | + | let v = (7 * 1440) | |
113 | + | let w = assetBalance(Address(d.caller.bytes), b) | |
114 | + | let x = if ((size(d.payments) == 1)) | |
115 | + | then d.payments[0] | |
118 | 116 | else throw("Attached payment is required") | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
117 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
118 | + | let z = { | |
119 | + | let g = getInteger(this, y) | |
120 | + | if ($isInstanceOf(g, "Int")) | |
123 | 121 | then { | |
124 | - | let | |
125 | - | | |
122 | + | let h = g | |
123 | + | h | |
126 | 124 | } | |
127 | 125 | else 0 | |
128 | 126 | } | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | if ($isInstanceOf( | |
127 | + | let A = (toBase58String(d.caller.bytes) + "_refs") | |
128 | + | let B = { | |
129 | + | let g = getInteger(this, A) | |
130 | + | if ($isInstanceOf(g, "Int")) | |
133 | 131 | then { | |
134 | - | let | |
135 | - | | |
132 | + | let h = g | |
133 | + | h | |
136 | 134 | } | |
137 | 135 | else 0 | |
138 | 136 | } | |
139 | - | let | |
140 | - | let | |
141 | - | if ($isInstanceOf( | |
137 | + | let C = { | |
138 | + | let g = getInteger(this, "HighestPush") | |
139 | + | if ($isInstanceOf(g, "Int")) | |
142 | 140 | then { | |
143 | - | let | |
144 | - | | |
141 | + | let h = g | |
142 | + | h | |
145 | 143 | } | |
146 | 144 | else 0 | |
147 | 145 | } | |
148 | - | if (( | |
149 | - | then if (if ((( | |
150 | - | then ( | |
146 | + | if ((w > x.amount)) | |
147 | + | then if (if (((x.amount + z) > C)) | |
148 | + | then (x.assetId == b) | |
151 | 149 | else false) | |
152 | 150 | then { | |
153 | - | let E = (toBase58String(e.caller.bytes) + "_UserLastPushBlock") | |
154 | - | let F = (toBase58String(e.caller.bytes) + "_UserLastStakeBlock") | |
155 | - | let G = (toBase58String(e.caller.bytes) + "_Staking") | |
156 | - | let j = assetBalance(this, a) | |
151 | + | let D = (toBase58String(d.caller.bytes) + "_UserLastPushBlock") | |
152 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
153 | + | let F = (toBase58String(d.caller.bytes) + "_Staking") | |
154 | + | let i = assetBalance(this, a) | |
155 | + | let l = { | |
156 | + | let g = getInteger(this, "StakeBalance") | |
157 | + | if ($isInstanceOf(g, "Int")) | |
158 | + | then { | |
159 | + | let h = g | |
160 | + | h | |
161 | + | } | |
162 | + | else 0 | |
163 | + | } | |
157 | 164 | let m = { | |
158 | - | let | |
159 | - | if ($isInstanceOf( | |
165 | + | let g = getInteger(this, "FundBox") | |
166 | + | if ($isInstanceOf(g, "Int")) | |
160 | 167 | then { | |
161 | - | let | |
162 | - | | |
168 | + | let h = g | |
169 | + | h | |
163 | 170 | } | |
164 | 171 | else 0 | |
165 | 172 | } | |
166 | 173 | let n = { | |
167 | - | let | |
168 | - | if ($isInstanceOf( | |
174 | + | let g = getInteger(this, "PrizeHeight") | |
175 | + | if ($isInstanceOf(g, "Int")) | |
169 | 176 | then { | |
170 | - | let | |
171 | - | | |
177 | + | let h = g | |
178 | + | h | |
172 | 179 | } | |
173 | 180 | else 0 | |
174 | 181 | } | |
175 | - | let o = { | |
176 | - | let h = getInteger(this, "PrizeHeight") | |
177 | - | if ($isInstanceOf(h, "Int")) | |
182 | + | let o = if (if ((n == 0)) | |
183 | + | then (m == 0) | |
184 | + | else false) | |
185 | + | then 0 | |
186 | + | else if (if ((n == 0)) | |
187 | + | then (m != 0) | |
188 | + | else false) | |
189 | + | then height | |
190 | + | else if (if ((n != 0)) | |
191 | + | then (m != 0) | |
192 | + | else false) | |
193 | + | then n | |
194 | + | else 0 | |
195 | + | let G = { | |
196 | + | let g = getInteger(this, "Delay") | |
197 | + | if ($isInstanceOf(g, "Int")) | |
178 | 198 | then { | |
179 | - | let | |
180 | - | | |
199 | + | let h = g | |
200 | + | h | |
181 | 201 | } | |
182 | 202 | else 0 | |
183 | 203 | } | |
184 | - | let p = if (if ((o == 0)) | |
185 | - | then (n == 0) | |
186 | - | else false) | |
187 | - | then 0 | |
188 | - | else if (if ((o == 0)) | |
189 | - | then (n != 0) | |
190 | - | else false) | |
191 | - | then height | |
192 | - | else if (if ((o != 0)) | |
193 | - | then (n != 0) | |
194 | - | else false) | |
195 | - | then o | |
196 | - | else 0 | |
197 | 204 | let H = { | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
205 | + | let g = getInteger(this, "HighestPushAddress") | |
206 | + | if ($isInstanceOf(g, "Int")) | |
200 | 207 | then { | |
201 | - | let | |
202 | - | | |
208 | + | let h = g | |
209 | + | h | |
203 | 210 | } | |
204 | 211 | else 0 | |
205 | 212 | } | |
206 | 213 | let I = { | |
207 | - | let | |
208 | - | if ($isInstanceOf( | |
214 | + | let g = getInteger(this, D) | |
215 | + | if ($isInstanceOf(g, "Int")) | |
209 | 216 | then { | |
210 | - | let | |
211 | - | | |
217 | + | let h = g | |
218 | + | h | |
212 | 219 | } | |
213 | 220 | else 0 | |
214 | 221 | } | |
215 | 222 | let J = { | |
216 | - | let | |
217 | - | if ($isInstanceOf( | |
223 | + | let g = getInteger(this, E) | |
224 | + | if ($isInstanceOf(g, "Int")) | |
218 | 225 | then { | |
219 | - | let | |
220 | - | | |
226 | + | let h = g | |
227 | + | h | |
221 | 228 | } | |
222 | 229 | else 0 | |
223 | 230 | } | |
224 | 231 | let K = { | |
225 | - | let | |
226 | - | if ($isInstanceOf( | |
232 | + | let g = getInteger(this, F) | |
233 | + | if ($isInstanceOf(g, "Int")) | |
227 | 234 | then { | |
228 | - | let | |
229 | - | | |
235 | + | let h = g | |
236 | + | h | |
230 | 237 | } | |
231 | 238 | else 0 | |
232 | 239 | } | |
233 | 240 | let L = { | |
234 | - | let | |
235 | - | if ($isInstanceOf( | |
241 | + | let g = getInteger(this, "DevBox") | |
242 | + | if ($isInstanceOf(g, "Int")) | |
236 | 243 | then { | |
237 | - | let | |
238 | - | | |
244 | + | let h = g | |
245 | + | h | |
239 | 246 | } | |
240 | 247 | else 0 | |
241 | 248 | } | |
242 | - | let M = { | |
243 | - | let h = getInteger(this, "DevBox") | |
244 | - | if ($isInstanceOf(h, "Int")) | |
245 | - | then { | |
246 | - | let i = h | |
247 | - | i | |
248 | - | } | |
249 | - | else 0 | |
250 | - | } | |
251 | - | let g = (M + ((y.amount * 5) / 1000)) | |
252 | - | let N = (y.amount + A) | |
253 | - | let O = if (if ((height > ((p + H) + u))) | |
254 | - | then (D > 0) | |
249 | + | let f = (L + ((x.amount * 5) / 1000)) | |
250 | + | let M = (x.amount + z) | |
251 | + | let N = if (if ((height > ((o + G) + t))) | |
252 | + | then (C > 0) | |
255 | 253 | else false) | |
256 | - | then | |
257 | - | else ( | |
258 | - | let | |
259 | - | then ( | |
254 | + | then v | |
255 | + | else (G + s) | |
256 | + | let O = if (if ((height > ((o + N) + t))) | |
257 | + | then (C > 0) | |
260 | 258 | else false) | |
261 | 259 | then "" | |
262 | - | else | |
263 | - | let | |
264 | - | then ( | |
260 | + | else H | |
261 | + | let P = if (if ((height > ((o + N) + t))) | |
262 | + | then (C > 0) | |
265 | 263 | else false) | |
266 | 264 | then height | |
267 | - | else | |
268 | - | if (if (( | |
269 | - | then ((height - | |
265 | + | else o | |
266 | + | if (if ((M > 0)) | |
267 | + | then ((height - J) > r) | |
270 | 268 | else false) | |
271 | - | then if (((height - | |
272 | - | then if (( | |
273 | - | then if (( | |
274 | - | then if (( | |
275 | - | then if (if (if (if ((( | |
269 | + | then if (((height - I) > q)) | |
270 | + | then if ((K > 0)) | |
271 | + | then if ((M > C)) | |
272 | + | then if ((m > 0)) | |
273 | + | then if (if (if (if (((P + N) >= height)) | |
276 | 274 | then true | |
277 | - | else (height >= (( | |
278 | - | then ( | |
275 | + | else (height >= ((P + N) + t))) | |
276 | + | then (C > 0) | |
279 | 277 | else false) | |
280 | 278 | then true | |
281 | - | else ( | |
282 | - | then if (( | |
283 | - | then [IntegerEntry( | |
284 | - | else throw((("You have to have " + toString( | |
279 | + | else (C == 0)) | |
280 | + | then if ((B >= u)) | |
281 | + | then [IntegerEntry(y, M), StringEntry("HighestPushAddress", toBase58String(d.caller.bytes)), IntegerEntry("HighestPush", M), IntegerEntry(D, height), IntegerEntry("PrizeHeight", P), IntegerEntry("Delay", N), IntegerEntry("DevBox", f)] | |
282 | + | else throw((("You have to have " + toString(u)) + " referrals already staking for a minimum of 10 days, to push")) | |
285 | 283 | else { | |
286 | - | let | |
284 | + | let Q = if ((C > 0)) | |
287 | 285 | then "You cannot Push after rewarding Prize and before One day has passed after award" | |
288 | 286 | else "Unexpected error" | |
289 | - | throw( | |
287 | + | throw(Q) | |
290 | 288 | } | |
291 | 289 | else throw("You cannot push before the reward is unlocked, no reward has been detected yet") | |
292 | 290 | else throw("Your push in troikan token, should be Higher than last Highest Push") | |
295 | 293 | else throw(("Your Push dot not comply one of the following conditions: " + "1. Positive Value for Push in Troikan Toke | |
296 | 294 | 2. Must Staked ASIMI Token for a minimum of week ")) | |
297 | 295 | } | |
298 | - | else throw((("Can deposit only positive amounts of Troikan Token, or Check your Wallet balance in Troika, you should have more than " + toString( | |
296 | + | else throw((("Can deposit only positive amounts of Troikan Token, or Check your Wallet balance in Troika, you should have more than " + toString(C)) + " to push")) | |
299 | 297 | else throw("You do not have enough Troikan Tokens in your Wallet Balance, Please Harvest if you have earned Troikan wallet or transfer to your wallet necessary Troikan amount !") | |
300 | 298 | } | |
301 | 299 | ||
302 | 300 | ||
303 | 301 | ||
304 | - | @Callable( | |
302 | + | @Callable(d) | |
305 | 303 | func Stake () = { | |
306 | - | let | |
307 | - | let | |
308 | - | then | |
304 | + | let t = (1440 * 1) | |
305 | + | let x = if ((size(d.payments) == 1)) | |
306 | + | then d.payments[0] | |
309 | 307 | else throw("Attached payment is required") | |
310 | - | if (if (( | |
311 | - | then ( | |
308 | + | if (if ((x.amount > 0)) | |
309 | + | then (x.assetId == a) | |
312 | 310 | else false) | |
313 | 311 | then { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | if ($isInstanceOf( | |
312 | + | let R = assetBalance(this, b) | |
313 | + | let S = (toBase58String(d.caller.bytes) + "_APY") | |
314 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
315 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
316 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
317 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
318 | + | let V = (toBase58String(d.caller.bytes) + "_StakedTransactions") | |
319 | + | let W = (toBase58String(d.caller.bytes) + "_PrizeHeight") | |
320 | + | let X = (toBase58String(d.caller.bytes) + "_WeekEarning") | |
321 | + | let Y = { | |
322 | + | let g = getInteger(this, V) | |
323 | + | if ($isInstanceOf(g, "Int")) | |
326 | 324 | then { | |
327 | - | let | |
328 | - | | |
325 | + | let h = g | |
326 | + | h | |
329 | 327 | } | |
330 | 328 | else 0 | |
331 | 329 | } | |
332 | - | let | |
333 | - | let | |
334 | - | if ($isInstanceOf( | |
330 | + | let j = { | |
331 | + | let g = getString(this, "MaxDepositer") | |
332 | + | if ($isInstanceOf(g, "String")) | |
335 | 333 | then { | |
336 | - | let | |
337 | - | | |
334 | + | let h = g | |
335 | + | h | |
338 | 336 | } | |
339 | 337 | else "" | |
340 | 338 | } | |
341 | - | let | |
342 | - | let | |
343 | - | if ($isInstanceOf( | |
339 | + | let Z = { | |
340 | + | let g = getInteger(this, "MaxDepositBlock") | |
341 | + | if ($isInstanceOf(g, "Int")) | |
344 | 342 | then { | |
345 | - | let | |
346 | - | | |
343 | + | let h = g | |
344 | + | h | |
347 | 345 | } | |
348 | 346 | else 0 | |
349 | 347 | } | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
348 | + | let aa = { | |
349 | + | let g = getInteger(this, "MaxDeposit") | |
350 | + | if ($isInstanceOf(g, "Int")) | |
353 | 351 | then { | |
354 | - | let | |
355 | - | | |
352 | + | let h = g | |
353 | + | h | |
356 | 354 | } | |
357 | 355 | else 0 | |
358 | 356 | } | |
359 | - | let | |
360 | - | then toBase58String( | |
361 | - | else | |
362 | - | let | |
363 | - | then | |
364 | - | else | |
365 | - | let | |
357 | + | let ab = if ((x.amount > aa)) | |
358 | + | then toBase58String(d.caller.bytes) | |
359 | + | else j | |
360 | + | let ac = if ((x.amount > aa)) | |
361 | + | then x.amount | |
362 | + | else aa | |
363 | + | let ad = if ((x.amount > aa)) | |
366 | 364 | then height | |
367 | - | else | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
365 | + | else Z | |
366 | + | let ae = { | |
367 | + | let g = getInteger(this, y) | |
368 | + | if ($isInstanceOf(g, "Int")) | |
371 | 369 | then { | |
372 | - | let | |
373 | - | | |
370 | + | let h = g | |
371 | + | h | |
374 | 372 | } | |
375 | 373 | else 0 | |
376 | 374 | } | |
377 | - | let | |
378 | - | let | |
379 | - | if ($isInstanceOf( | |
375 | + | let J = { | |
376 | + | let g = getInteger(this, E) | |
377 | + | if ($isInstanceOf(g, "Int")) | |
380 | 378 | then { | |
381 | - | let | |
382 | - | | |
379 | + | let h = g | |
380 | + | h | |
383 | 381 | } | |
384 | 382 | else 0 | |
385 | 383 | } | |
386 | - | let | |
384 | + | let af = if ((J == 0)) | |
387 | 385 | then height | |
388 | - | else | |
389 | - | let | |
390 | - | let | |
391 | - | let | |
392 | - | if ($isInstanceOf( | |
386 | + | else J | |
387 | + | let ag = (Y + 1) | |
388 | + | let ah = { | |
389 | + | let g = getInteger(this, T) | |
390 | + | if ($isInstanceOf(g, "Int")) | |
393 | 391 | then { | |
394 | - | let | |
395 | - | | |
392 | + | let h = g | |
393 | + | h | |
396 | 394 | } | |
397 | 395 | else 0 | |
398 | 396 | } | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
397 | + | let ai = (ah + x.amount) | |
398 | + | let i = assetBalance(this, a) | |
399 | + | let l = { | |
400 | + | let g = getInteger(this, "StakeBalance") | |
401 | + | if ($isInstanceOf(g, "Int")) | |
404 | 402 | then { | |
405 | - | let | |
406 | - | | |
403 | + | let h = g | |
404 | + | h | |
407 | 405 | } | |
408 | 406 | else 0 | |
409 | 407 | } | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | if ($isInstanceOf( | |
408 | + | let aj = (l + x.amount) | |
409 | + | let m = { | |
410 | + | let g = getInteger(this, "FundBox") | |
411 | + | if ($isInstanceOf(g, "Int")) | |
414 | 412 | then { | |
415 | - | let i = h | |
416 | - | i | |
413 | + | let h = g | |
414 | + | h | |
415 | + | } | |
416 | + | else 0 | |
417 | + | } | |
418 | + | let ak = { | |
419 | + | let g = getInteger(this, X) | |
420 | + | if ($isInstanceOf(g, "Int")) | |
421 | + | then { | |
422 | + | let h = g | |
423 | + | h | |
417 | 424 | } | |
418 | 425 | else 0 | |
419 | 426 | } | |
420 | 427 | let al = { | |
421 | - | let | |
422 | - | if ($isInstanceOf( | |
428 | + | let g = getInteger(this, U) | |
429 | + | if ($isInstanceOf(g, "Int")) | |
423 | 430 | then { | |
424 | - | let | |
425 | - | | |
431 | + | let h = g | |
432 | + | h | |
426 | 433 | } | |
427 | 434 | else 0 | |
428 | 435 | } | |
429 | - | let | |
430 | - | let | |
431 | - | if ($isInstanceOf( | |
436 | + | let n = { | |
437 | + | let g = getInteger(this, "PrizeHeight") | |
438 | + | if ($isInstanceOf(g, "Int")) | |
432 | 439 | then { | |
433 | - | let | |
434 | - | | |
440 | + | let h = g | |
441 | + | h | |
435 | 442 | } | |
436 | 443 | else 0 | |
437 | 444 | } | |
438 | - | let o = { | |
439 | - | let h = getInteger(this, "PrizeHeight") | |
440 | - | if ($isInstanceOf(h, "Int")) | |
445 | + | let o = if (if ((n == 0)) | |
446 | + | then (m == 0) | |
447 | + | else false) | |
448 | + | then 0 | |
449 | + | else if (if ((n == 0)) | |
450 | + | then (m != 0) | |
451 | + | else false) | |
452 | + | then height | |
453 | + | else if (if ((n != 0)) | |
454 | + | then (m != 0) | |
455 | + | else false) | |
456 | + | then n | |
457 | + | else 0 | |
458 | + | let G = { | |
459 | + | let g = getInteger(this, "Delay") | |
460 | + | if ($isInstanceOf(g, "Int")) | |
441 | 461 | then { | |
442 | - | let | |
443 | - | | |
462 | + | let h = g | |
463 | + | h | |
444 | 464 | } | |
445 | 465 | else 0 | |
446 | 466 | } | |
447 | - | let p = if (if ((o == 0)) | |
448 | - | then (n == 0) | |
449 | - | else false) | |
450 | - | then 0 | |
451 | - | else if (if ((o == 0)) | |
452 | - | then (n != 0) | |
453 | - | else false) | |
454 | - | then height | |
455 | - | else if (if ((o != 0)) | |
456 | - | then (n != 0) | |
457 | - | else false) | |
458 | - | then o | |
459 | - | else 0 | |
460 | - | let H = { | |
461 | - | let h = getInteger(this, "Delay") | |
462 | - | if ($isInstanceOf(h, "Int")) | |
467 | + | let C = { | |
468 | + | let g = getInteger(this, "HighestPush") | |
469 | + | if ($isInstanceOf(g, "Int")) | |
463 | 470 | then { | |
464 | - | let | |
465 | - | | |
471 | + | let h = g | |
472 | + | h | |
466 | 473 | } | |
467 | 474 | else 0 | |
468 | 475 | } | |
469 | - | let | |
470 | - | let | |
471 | - | if ($isInstanceOf( | |
476 | + | let H = { | |
477 | + | let g = getString(this, "HighestPushAddress") | |
478 | + | if ($isInstanceOf(g, "String")) | |
472 | 479 | then { | |
473 | - | let i = h | |
474 | - | i | |
475 | - | } | |
476 | - | else 0 | |
477 | - | } | |
478 | - | let I = { | |
479 | - | let h = getString(this, "HighestPushAddress") | |
480 | - | if ($isInstanceOf(h, "String")) | |
481 | - | then { | |
482 | - | let i = h | |
483 | - | i | |
480 | + | let h = g | |
481 | + | h | |
484 | 482 | } | |
485 | 483 | else "" | |
486 | 484 | } | |
487 | - | let | |
488 | - | then ( | |
485 | + | let O = if (if ((height > ((o + G) + t))) | |
486 | + | then (C > 0) | |
489 | 487 | else false) | |
490 | 488 | then "" | |
491 | - | else | |
492 | - | let | |
493 | - | then ( | |
489 | + | else H | |
490 | + | let P = if (if ((height > ((o + G) + t))) | |
491 | + | then (C > 0) | |
494 | 492 | else false) | |
495 | 493 | then height | |
496 | - | else | |
497 | - | if ((100000000 > | |
494 | + | else o | |
495 | + | if ((100000000 > R)) | |
498 | 496 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
499 | 497 | else { | |
500 | - | let | |
498 | + | let am = if ((l == 0)) | |
501 | 499 | then 10000 | |
502 | - | else if (( | |
503 | - | then ((10000 * | |
504 | - | else (10000 * (1 + ( | |
505 | - | let | |
506 | - | then ((100 * | |
500 | + | else if ((ag > 10)) | |
501 | + | then ((10000 * ag) * (1 + (ai / l))) | |
502 | + | else (10000 * (1 + (ai / l))) | |
503 | + | let an = if ((al > 0)) | |
504 | + | then ((100 * am) / al) | |
507 | 505 | else 0 | |
508 | - | let | |
509 | - | [IntegerEntry(V, | |
506 | + | let ao = (al + am) | |
507 | + | [IntegerEntry(U, ao), IntegerEntry(T, ai), IntegerEntry(V, ag), IntegerEntry("StakeBalance", aj), IntegerEntry("PrizeHeight", P), IntegerEntry(S, an), IntegerEntry(E, af), IntegerEntry(y, ae), StringEntry("MaxDepositer", ab), IntegerEntry("MaxDeposit", ac), IntegerEntry("MaxDepositBlock", ad), StringEntry("HighestPushAddress", O), IntegerEntry(X, ak), ScriptTransfer(d.caller, am, b)] | |
510 | 508 | } | |
511 | 509 | } | |
512 | 510 | else throw("Can deposit only StakeToken") | |
514 | 512 | ||
515 | 513 | ||
516 | 514 | ||
517 | - | @Callable( | |
518 | - | func WithdrawStakedFunds ( | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | if ($isInstanceOf( | |
515 | + | @Callable(d) | |
516 | + | func WithdrawStakedFunds (ap) = { | |
517 | + | let t = (1440 * 1) | |
518 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
519 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
520 | + | let U = ((toBase58String(d.caller.bytes) + "_") + toBase58String(b)) | |
521 | + | let i = assetBalance(this, a) | |
522 | + | let J = { | |
523 | + | let g = getInteger(this, E) | |
524 | + | if ($isInstanceOf(g, "Int")) | |
527 | 525 | then { | |
528 | - | let i = h | |
529 | - | i | |
526 | + | let h = g | |
527 | + | h | |
528 | + | } | |
529 | + | else 0 | |
530 | + | } | |
531 | + | let l = { | |
532 | + | let g = getInteger(this, "StakeBalance") | |
533 | + | if ($isInstanceOf(g, "Int")) | |
534 | + | then { | |
535 | + | let h = g | |
536 | + | h | |
530 | 537 | } | |
531 | 538 | else 0 | |
532 | 539 | } | |
533 | 540 | let m = { | |
534 | - | let | |
535 | - | if ($isInstanceOf( | |
541 | + | let g = getInteger(this, "FundBox") | |
542 | + | if ($isInstanceOf(g, "Int")) | |
536 | 543 | then { | |
537 | - | let | |
538 | - | | |
544 | + | let h = g | |
545 | + | h | |
539 | 546 | } | |
540 | 547 | else 0 | |
541 | 548 | } | |
542 | 549 | let n = { | |
543 | - | let | |
544 | - | if ($isInstanceOf( | |
550 | + | let g = getInteger(this, "PrizeHeight") | |
551 | + | if ($isInstanceOf(g, "Int")) | |
545 | 552 | then { | |
546 | - | let | |
547 | - | | |
553 | + | let h = g | |
554 | + | h | |
548 | 555 | } | |
549 | 556 | else 0 | |
550 | 557 | } | |
551 | - | let | |
552 | - | let | |
553 | - | if ($isInstanceOf( | |
558 | + | let G = { | |
559 | + | let g = getInteger(this, "Delay") | |
560 | + | if ($isInstanceOf(g, "Int")) | |
554 | 561 | then { | |
555 | - | let i = h | |
556 | - | i | |
562 | + | let h = g | |
563 | + | h | |
564 | + | } | |
565 | + | else 0 | |
566 | + | } | |
567 | + | let C = { | |
568 | + | let g = getInteger(this, "HighestPush") | |
569 | + | if ($isInstanceOf(g, "Int")) | |
570 | + | then { | |
571 | + | let h = g | |
572 | + | h | |
573 | + | } | |
574 | + | else 0 | |
575 | + | } | |
576 | + | let o = if (if ((n == 0)) | |
577 | + | then (m == 0) | |
578 | + | else false) | |
579 | + | then 0 | |
580 | + | else if (if ((n == 0)) | |
581 | + | then (m != 0) | |
582 | + | else false) | |
583 | + | then height | |
584 | + | else if (if ((n != 0)) | |
585 | + | then (m != 0) | |
586 | + | else false) | |
587 | + | then n | |
588 | + | else 0 | |
589 | + | let H = { | |
590 | + | let g = getString(this, "HighestPushAddress") | |
591 | + | if ($isInstanceOf(g, "String")) | |
592 | + | then { | |
593 | + | let h = g | |
594 | + | h | |
595 | + | } | |
596 | + | else "" | |
597 | + | } | |
598 | + | let O = if (if ((height > ((o + G) + t))) | |
599 | + | then (C > 0) | |
600 | + | else false) | |
601 | + | then "" | |
602 | + | else H | |
603 | + | let P = if (if ((height > ((o + G) + t))) | |
604 | + | then (C > 0) | |
605 | + | else false) | |
606 | + | then height | |
607 | + | else o | |
608 | + | let e = toBase58String(d.caller.bytes) | |
609 | + | let aq = { | |
610 | + | let g = getInteger(this, T) | |
611 | + | if ($isInstanceOf(g, "Int")) | |
612 | + | then { | |
613 | + | let h = g | |
614 | + | h | |
615 | + | } | |
616 | + | else 0 | |
617 | + | } | |
618 | + | let p = (aq - ap) | |
619 | + | let aj = (l - ap) | |
620 | + | let af = if ((aj == 0)) | |
621 | + | then 0 | |
622 | + | else J | |
623 | + | if ((0 > ap)) | |
624 | + | then throw("Can't withdraw negative amount") | |
625 | + | else if ((0 > p)) | |
626 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((aq / 100000000)))) | |
627 | + | else if ((100000000 > assetBalance(this, b))) | |
628 | + | then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, b) / 100000000)))) | |
629 | + | else [IntegerEntry(U, 100000000), IntegerEntry(T, p), IntegerEntry("StakeBalance", aj), IntegerEntry("PrizeHeight", P), IntegerEntry(E, af), StringEntry("HighestPushAddress", O), ScriptTransfer(d.caller, 100000000, b), ScriptTransfer(d.caller, ap, a)] | |
630 | + | } | |
631 | + | ||
632 | + | ||
633 | + | ||
634 | + | @Callable(d) | |
635 | + | func WithdrawBigStakeReward () = { | |
636 | + | let t = (1440 * 1) | |
637 | + | let ar = (toBase58String(d.caller.bytes) + "_LastBigStakerRewardBlock") | |
638 | + | let as = (toBase58String(d.caller.bytes) + "_BigStaker") | |
639 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
640 | + | let at = 10 | |
641 | + | let au = { | |
642 | + | let g = getInteger(this, U) | |
643 | + | if ($isInstanceOf(g, "Int")) | |
644 | + | then { | |
645 | + | let h = g | |
646 | + | h | |
647 | + | } | |
648 | + | else 0 | |
649 | + | } | |
650 | + | let av = { | |
651 | + | let g = getInteger(this, ar) | |
652 | + | if ($isInstanceOf(g, "Int")) | |
653 | + | then { | |
654 | + | let h = g | |
655 | + | h | |
656 | + | } | |
657 | + | else 0 | |
658 | + | } | |
659 | + | let aw = { | |
660 | + | let g = getInteger(this, "BigStakerRewardTotal") | |
661 | + | if ($isInstanceOf(g, "Int")) | |
662 | + | then { | |
663 | + | let h = g | |
664 | + | h | |
665 | + | } | |
666 | + | else 0 | |
667 | + | } | |
668 | + | let m = { | |
669 | + | let g = getInteger(this, "FundBox") | |
670 | + | if ($isInstanceOf(g, "Int")) | |
671 | + | then { | |
672 | + | let h = g | |
673 | + | h | |
674 | + | } | |
675 | + | else 0 | |
676 | + | } | |
677 | + | let n = { | |
678 | + | let g = getInteger(this, "PrizeHeight") | |
679 | + | if ($isInstanceOf(g, "Int")) | |
680 | + | then { | |
681 | + | let h = g | |
682 | + | h | |
683 | + | } | |
684 | + | else 0 | |
685 | + | } | |
686 | + | let o = if (if ((n == 0)) | |
687 | + | then (m == 0) | |
688 | + | else false) | |
689 | + | then 0 | |
690 | + | else if (if ((n == 0)) | |
691 | + | then (m != 0) | |
692 | + | else false) | |
693 | + | then height | |
694 | + | else if (if ((n != 0)) | |
695 | + | then (m != 0) | |
696 | + | else false) | |
697 | + | then n | |
698 | + | else 0 | |
699 | + | let G = { | |
700 | + | let g = getInteger(this, "Delay") | |
701 | + | if ($isInstanceOf(g, "Int")) | |
702 | + | then { | |
703 | + | let h = g | |
704 | + | h | |
705 | + | } | |
706 | + | else 0 | |
707 | + | } | |
708 | + | let C = { | |
709 | + | let g = getInteger(this, "HighestPush") | |
710 | + | if ($isInstanceOf(g, "Int")) | |
711 | + | then { | |
712 | + | let h = g | |
713 | + | h | |
557 | 714 | } | |
558 | 715 | else 0 | |
559 | 716 | } | |
560 | 717 | let H = { | |
561 | - | let | |
562 | - | if ($isInstanceOf( | |
718 | + | let g = getString(this, "HighestPushAddress") | |
719 | + | if ($isInstanceOf(g, "String")) | |
563 | 720 | then { | |
564 | - | let i = h | |
565 | - | i | |
721 | + | let h = g | |
722 | + | h | |
723 | + | } | |
724 | + | else "" | |
725 | + | } | |
726 | + | let O = if (if ((height > ((o + G) + t))) | |
727 | + | then (C > 0) | |
728 | + | else false) | |
729 | + | then "" | |
730 | + | else H | |
731 | + | let P = if (if ((height > ((o + G) + t))) | |
732 | + | then (C > 0) | |
733 | + | else false) | |
734 | + | then height | |
735 | + | else o | |
736 | + | let e = toBase58String(d.caller.bytes) | |
737 | + | let ap = { | |
738 | + | let g = getInteger(this, as) | |
739 | + | if ($isInstanceOf(g, "Int")) | |
740 | + | then { | |
741 | + | let h = g | |
742 | + | h | |
566 | 743 | } | |
567 | 744 | else 0 | |
568 | 745 | } | |
569 | - | let D = { | |
570 | - | let h = getInteger(this, "HighestPush") | |
571 | - | if ($isInstanceOf(h, "Int")) | |
572 | - | then { | |
573 | - | let i = h | |
574 | - | i | |
575 | - | } | |
576 | - | else 0 | |
577 | - | } | |
578 | - | let p = if (if ((o == 0)) | |
579 | - | then (n == 0) | |
580 | - | else false) | |
581 | - | then 0 | |
582 | - | else if (if ((o == 0)) | |
583 | - | then (n != 0) | |
584 | - | else false) | |
585 | - | then height | |
586 | - | else if (if ((o != 0)) | |
587 | - | then (n != 0) | |
588 | - | else false) | |
589 | - | then o | |
590 | - | else 0 | |
591 | - | let I = { | |
592 | - | let h = getString(this, "HighestPushAddress") | |
593 | - | if ($isInstanceOf(h, "String")) | |
594 | - | then { | |
595 | - | let i = h | |
596 | - | i | |
597 | - | } | |
598 | - | else "" | |
599 | - | } | |
600 | - | let P = if (if ((height > ((p + H) + u))) | |
601 | - | then (D > 0) | |
602 | - | else false) | |
603 | - | then "" | |
604 | - | else I | |
605 | - | let Q = if (if ((height > ((p + H) + u))) | |
606 | - | then (D > 0) | |
607 | - | else false) | |
608 | - | then height | |
609 | - | else p | |
610 | - | let f = toBase58String(e.caller.bytes) | |
611 | - | let ar = { | |
612 | - | let h = getInteger(this, U) | |
613 | - | if ($isInstanceOf(h, "Int")) | |
614 | - | then { | |
615 | - | let i = h | |
616 | - | i | |
617 | - | } | |
618 | - | else 0 | |
619 | - | } | |
620 | - | let q = (ar - aq) | |
621 | - | let ak = (m - aq) | |
622 | - | let ag = if ((ak == 0)) | |
623 | - | then 0 | |
624 | - | else K | |
625 | - | if ((0 > aq)) | |
626 | - | then throw("Can't withdraw negative amount") | |
627 | - | else if ((0 > q)) | |
628 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((ar / 100000000)))) | |
629 | - | else if ((100000000 > assetBalance(this, b))) | |
630 | - | then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, b) / 100000000)))) | |
631 | - | else [IntegerEntry(V, 100000000), IntegerEntry(U, q), IntegerEntry("StakeBalance", ak), IntegerEntry("PrizeHeight", Q), IntegerEntry(F, ag), StringEntry("HighestPushAddress", P), ScriptTransfer(e.caller, 100000000, b), ScriptTransfer(e.caller, aq, a)] | |
632 | - | } | |
633 | - | ||
634 | - | ||
635 | - | ||
636 | - | @Callable(e) | |
637 | - | func WithdrawBigStakeReward () = { | |
638 | - | let u = (1440 * 1) | |
639 | - | let as = (toBase58String(e.caller.bytes) + "_LastBigStakerRewardBlock") | |
640 | - | let at = (toBase58String(e.caller.bytes) + "_BigStaker") | |
641 | - | let V = (toBase58String(e.caller.bytes) + "_Earnings") | |
642 | - | let au = 10 | |
643 | - | let av = { | |
644 | - | let h = getInteger(this, V) | |
645 | - | if ($isInstanceOf(h, "Int")) | |
646 | - | then { | |
647 | - | let i = h | |
648 | - | i | |
649 | - | } | |
650 | - | else 0 | |
651 | - | } | |
652 | - | let aw = { | |
653 | - | let h = getInteger(this, as) | |
654 | - | if ($isInstanceOf(h, "Int")) | |
655 | - | then { | |
656 | - | let i = h | |
657 | - | i | |
658 | - | } | |
659 | - | else 0 | |
660 | - | } | |
661 | - | let ax = { | |
662 | - | let h = getInteger(this, "BigStakerRewardTotal") | |
663 | - | if ($isInstanceOf(h, "Int")) | |
664 | - | then { | |
665 | - | let i = h | |
666 | - | i | |
667 | - | } | |
668 | - | else 0 | |
669 | - | } | |
670 | - | let n = { | |
671 | - | let h = getInteger(this, "FundBox") | |
672 | - | if ($isInstanceOf(h, "Int")) | |
673 | - | then { | |
674 | - | let i = h | |
675 | - | i | |
676 | - | } | |
677 | - | else 0 | |
678 | - | } | |
679 | - | let o = { | |
680 | - | let h = getInteger(this, "PrizeHeight") | |
681 | - | if ($isInstanceOf(h, "Int")) | |
682 | - | then { | |
683 | - | let i = h | |
684 | - | i | |
685 | - | } | |
686 | - | else 0 | |
687 | - | } | |
688 | - | let p = if (if ((o == 0)) | |
689 | - | then (n == 0) | |
690 | - | else false) | |
691 | - | then 0 | |
692 | - | else if (if ((o == 0)) | |
693 | - | then (n != 0) | |
694 | - | else false) | |
695 | - | then height | |
696 | - | else if (if ((o != 0)) | |
697 | - | then (n != 0) | |
698 | - | else false) | |
699 | - | then o | |
700 | - | else 0 | |
701 | - | let H = { | |
702 | - | let h = getInteger(this, "Delay") | |
703 | - | if ($isInstanceOf(h, "Int")) | |
704 | - | then { | |
705 | - | let i = h | |
706 | - | i | |
707 | - | } | |
708 | - | else 0 | |
709 | - | } | |
710 | - | let D = { | |
711 | - | let h = getInteger(this, "HighestPush") | |
712 | - | if ($isInstanceOf(h, "Int")) | |
713 | - | then { | |
714 | - | let i = h | |
715 | - | i | |
716 | - | } | |
717 | - | else 0 | |
718 | - | } | |
719 | - | let I = { | |
720 | - | let h = getString(this, "HighestPushAddress") | |
721 | - | if ($isInstanceOf(h, "String")) | |
722 | - | then { | |
723 | - | let i = h | |
724 | - | i | |
725 | - | } | |
726 | - | else "" | |
727 | - | } | |
728 | - | let P = if (if ((height > ((p + H) + u))) | |
729 | - | then (D > 0) | |
730 | - | else false) | |
731 | - | then "" | |
732 | - | else I | |
733 | - | let Q = if (if ((height > ((p + H) + u))) | |
734 | - | then (D > 0) | |
735 | - | else false) | |
736 | - | then height | |
737 | - | else p | |
738 | - | let f = toBase58String(e.caller.bytes) | |
739 | - | let aq = { | |
740 | - | let h = getInteger(this, at) | |
741 | - | if ($isInstanceOf(h, "Int")) | |
742 | - | then { | |
743 | - | let i = h | |
744 | - | i | |
745 | - | } | |
746 | - | else 0 | |
747 | - | } | |
748 | - | let ak = (ax - aq) | |
749 | - | let ay = if ((0 > ((av / 1000) * (1000 - ((1000 * (height - aw)) / (au * 1440)))))) | |
746 | + | let aj = (aw - ap) | |
747 | + | let ax = if ((0 > ((au / 1000) * (1000 - ((1000 * (height - av)) / (at * 1440)))))) | |
750 | 748 | then (1000 * 100000000) | |
751 | - | else (( | |
752 | - | if ((0 > | |
753 | - | then throw(((("Can't withdraw negative amount " + toString(( | |
754 | - | else if (if (if (((1000 * 100000000) > | |
749 | + | else ((au / 1000) * (1000 - ((1000 * (height - av)) / (at * 1440)))) | |
750 | + | if ((0 > ap)) | |
751 | + | then throw(((("Can't withdraw negative amount " + toString((au - (1000 * 100000000)))) + " ... ") + toString(ap))) | |
752 | + | else if (if (if (((1000 * 100000000) > au)) | |
755 | 753 | then true | |
756 | - | else (1 > | |
754 | + | else (1 > ap)) | |
757 | 755 | then true | |
758 | - | else (0 > ( | |
759 | - | then throw(("No ASIMI reward available, or Not enough Earned Troikan Tokens to do transaction, you have: " + toString(( | |
760 | - | else if (( | |
761 | - | then [IntegerEntry( | |
756 | + | else (0 > (au - ax))) | |
757 | + | then throw(("No ASIMI reward available, or Not enough Earned Troikan Tokens to do transaction, you have: " + toString((au / 100000000)))) | |
758 | + | else if ((aj > 0)) | |
759 | + | then [IntegerEntry(as, 0), IntegerEntry("BigStakerRewardTotal", aj), IntegerEntry(U, (au - ax)), IntegerEntry("PrizeHeight", o), IntegerEntry(ar, height), StringEntry("HighestPushAddress", O), ScriptTransfer(d.caller, ap, a)] | |
762 | 760 | else throw("Balance Error, Total Big Stakers cannot be negative, Operation won't be authorized") | |
763 | 761 | } | |
764 | 762 | ||
765 | 763 | ||
766 | 764 | ||
767 | - | @Callable(e) | |
768 | - | func HarvestGovernToiken (aq) = { | |
769 | - | let j = assetBalance(this, a) | |
770 | - | let V = (toBase58String(e.caller.bytes) + "_Earnings") | |
765 | + | @Callable(d) | |
766 | + | func HarvestGovernToiken (ap) = { | |
767 | + | let i = assetBalance(this, a) | |
768 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
769 | + | let l = { | |
770 | + | let g = getInteger(this, "StakeBalance") | |
771 | + | if ($isInstanceOf(g, "Int")) | |
772 | + | then { | |
773 | + | let h = g | |
774 | + | h | |
775 | + | } | |
776 | + | else 0 | |
777 | + | } | |
771 | 778 | let m = { | |
772 | - | let | |
773 | - | if ($isInstanceOf( | |
779 | + | let g = getInteger(this, "FundBox") | |
780 | + | if ($isInstanceOf(g, "Int")) | |
774 | 781 | then { | |
775 | - | let | |
776 | - | | |
782 | + | let h = g | |
783 | + | h | |
777 | 784 | } | |
778 | 785 | else 0 | |
779 | 786 | } | |
780 | 787 | let n = { | |
781 | - | let | |
782 | - | if ($isInstanceOf( | |
788 | + | let g = getInteger(this, "PrizeHeight") | |
789 | + | if ($isInstanceOf(g, "Int")) | |
783 | 790 | then { | |
784 | - | let | |
785 | - | | |
791 | + | let h = g | |
792 | + | h | |
786 | 793 | } | |
787 | 794 | else 0 | |
788 | 795 | } | |
789 | - | let o = { | |
790 | - | let h = getInteger(this, "PrizeHeight") | |
791 | - | if ($isInstanceOf(h, "Int")) | |
796 | + | let o = if (if ((n == 0)) | |
797 | + | then (m == 0) | |
798 | + | else false) | |
799 | + | then 0 | |
800 | + | else if (if ((n == 0)) | |
801 | + | then (m != 0) | |
802 | + | else false) | |
803 | + | then height | |
804 | + | else if (if ((n != 0)) | |
805 | + | then (m != 0) | |
806 | + | else false) | |
807 | + | then n | |
808 | + | else 0 | |
809 | + | let e = toBase58String(d.caller.bytes) | |
810 | + | let aq = { | |
811 | + | let g = getInteger(this, U) | |
812 | + | if ($isInstanceOf(g, "Int")) | |
792 | 813 | then { | |
793 | - | let | |
794 | - | | |
814 | + | let h = g | |
815 | + | h | |
795 | 816 | } | |
796 | 817 | else 0 | |
797 | 818 | } | |
798 | - | let p = if (if ((o == 0)) | |
799 | - | then (n == 0) | |
800 | - | else false) | |
801 | - | then 0 | |
802 | - | else if (if ((o == 0)) | |
803 | - | then (n != 0) | |
804 | - | else false) | |
805 | - | then height | |
806 | - | else if (if ((o != 0)) | |
807 | - | then (n != 0) | |
808 | - | else false) | |
809 | - | then o | |
810 | - | else 0 | |
811 | - | let f = toBase58String(e.caller.bytes) | |
812 | - | let ar = { | |
813 | - | let h = getInteger(this, V) | |
814 | - | if ($isInstanceOf(h, "Int")) | |
815 | - | then { | |
816 | - | let i = h | |
817 | - | i | |
818 | - | } | |
819 | - | else 0 | |
820 | - | } | |
821 | - | let q = (ar - aq) | |
822 | - | if ((0 > aq)) | |
819 | + | let p = (aq - ap) | |
820 | + | if ((0 > ap)) | |
823 | 821 | then throw("Can't withdraw negative amount") | |
824 | - | else if ((0 > | |
825 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(( | |
826 | - | else [IntegerEntry( | |
822 | + | else if ((0 > p)) | |
823 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((aq / 100000000)))) | |
824 | + | else [IntegerEntry(U, p), IntegerEntry("PrizeHeight", o), ScriptTransfer(d.caller, ap, b)] | |
827 | 825 | } | |
828 | 826 | ||
829 | 827 | ||
830 | 828 | ||
831 | - | @Callable( | |
829 | + | @Callable(d) | |
832 | 830 | func delayprize () = { | |
833 | - | let az = (1440 * 1) | |
834 | - | let u = (1440 * 1) | |
835 | - | let V = ((toBase58String(e.caller.bytes) + "_") + toBase58String(b)) | |
836 | - | let aA = assetBalance(Address(e.caller.bytes), b) | |
837 | - | let j = assetBalance(this, a) | |
831 | + | let ay = (1440 * 1) | |
832 | + | let t = (1440 * 1) | |
833 | + | let U = ((toBase58String(d.caller.bytes) + "_") + toBase58String(b)) | |
834 | + | let az = assetBalance(Address(d.caller.bytes), b) | |
835 | + | let i = assetBalance(this, a) | |
836 | + | let l = { | |
837 | + | let g = getInteger(this, "StakeBalance") | |
838 | + | if ($isInstanceOf(g, "Int")) | |
839 | + | then { | |
840 | + | let h = g | |
841 | + | h | |
842 | + | } | |
843 | + | else 0 | |
844 | + | } | |
838 | 845 | let m = { | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
846 | + | let g = getInteger(this, "FundBox") | |
847 | + | if ($isInstanceOf(g, "Int")) | |
841 | 848 | then { | |
842 | - | let | |
843 | - | | |
849 | + | let h = g | |
850 | + | h | |
844 | 851 | } | |
845 | 852 | else 0 | |
846 | 853 | } | |
847 | 854 | let n = { | |
848 | - | let | |
849 | - | if ($isInstanceOf( | |
855 | + | let g = getInteger(this, "PrizeHeight") | |
856 | + | if ($isInstanceOf(g, "Int")) | |
850 | 857 | then { | |
851 | - | let | |
852 | - | | |
858 | + | let h = g | |
859 | + | h | |
853 | 860 | } | |
854 | 861 | else 0 | |
855 | 862 | } | |
856 | - | let | |
857 | - | let | |
858 | - | if ($isInstanceOf( | |
863 | + | let G = { | |
864 | + | let g = getInteger(this, "Delay") | |
865 | + | if ($isInstanceOf(g, "Int")) | |
859 | 866 | then { | |
860 | - | let i = h | |
861 | - | i | |
867 | + | let h = g | |
868 | + | h | |
869 | + | } | |
870 | + | else 0 | |
871 | + | } | |
872 | + | let o = if (if ((n == 0)) | |
873 | + | then (m == 0) | |
874 | + | else false) | |
875 | + | then 0 | |
876 | + | else if (if ((n == 0)) | |
877 | + | then (m != 0) | |
878 | + | else false) | |
879 | + | then height | |
880 | + | else if (if ((n != 0)) | |
881 | + | then (m != 0) | |
882 | + | else false) | |
883 | + | then n | |
884 | + | else 0 | |
885 | + | let C = { | |
886 | + | let g = getInteger(this, "HighestPush") | |
887 | + | if ($isInstanceOf(g, "Int")) | |
888 | + | then { | |
889 | + | let h = g | |
890 | + | h | |
862 | 891 | } | |
863 | 892 | else 0 | |
864 | 893 | } | |
865 | 894 | let H = { | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
895 | + | let g = getString(this, "HighestPushAddress") | |
896 | + | if ($isInstanceOf(g, "String")) | |
868 | 897 | then { | |
869 | - | let i = h | |
870 | - | i | |
898 | + | let h = g | |
899 | + | h | |
900 | + | } | |
901 | + | else "" | |
902 | + | } | |
903 | + | let O = if (if ((height > ((o + G) + t))) | |
904 | + | then (C > 0) | |
905 | + | else false) | |
906 | + | then "" | |
907 | + | else H | |
908 | + | let P = if (if ((height > ((o + G) + t))) | |
909 | + | then (C > 0) | |
910 | + | else false) | |
911 | + | then height | |
912 | + | else o | |
913 | + | let aA = { | |
914 | + | let g = getInteger(this, "DelayCost") | |
915 | + | if ($isInstanceOf(g, "Int")) | |
916 | + | then { | |
917 | + | let h = g | |
918 | + | h | |
919 | + | } | |
920 | + | else 10 | |
921 | + | } | |
922 | + | let x = if ((size(d.payments) == 1)) | |
923 | + | then d.payments[0] | |
924 | + | else throw("Attached payment is required") | |
925 | + | let L = { | |
926 | + | let g = getInteger(this, "DevBox") | |
927 | + | if ($isInstanceOf(g, "Int")) | |
928 | + | then { | |
929 | + | let h = g | |
930 | + | h | |
871 | 931 | } | |
872 | 932 | else 0 | |
873 | 933 | } | |
874 | - | | |
875 | - | then ( | |
934 | + | if (if (isDefined(x.assetId)) | |
935 | + | then (x.assetId == b) | |
876 | 936 | else false) | |
877 | - | then 0 | |
878 | - | else if (if ((o == 0)) | |
879 | - | then (n != 0) | |
880 | - | else false) | |
881 | - | then height | |
882 | - | else if (if ((o != 0)) | |
883 | - | then (n != 0) | |
884 | - | else false) | |
885 | - | then o | |
886 | - | else 0 | |
887 | - | let D = { | |
888 | - | let h = getInteger(this, "HighestPush") | |
889 | - | if ($isInstanceOf(h, "Int")) | |
937 | + | then if ((m > 0)) | |
890 | 938 | then { | |
891 | - | let i = h | |
892 | - | i | |
893 | - | } | |
894 | - | else 0 | |
895 | - | } | |
896 | - | let I = { | |
897 | - | let h = getString(this, "HighestPushAddress") | |
898 | - | if ($isInstanceOf(h, "String")) | |
899 | - | then { | |
900 | - | let i = h | |
901 | - | i | |
902 | - | } | |
903 | - | else "" | |
904 | - | } | |
905 | - | let P = if (if ((height > ((p + H) + u))) | |
906 | - | then (D > 0) | |
907 | - | else false) | |
908 | - | then "" | |
909 | - | else I | |
910 | - | let Q = if (if ((height > ((p + H) + u))) | |
911 | - | then (D > 0) | |
912 | - | else false) | |
913 | - | then height | |
914 | - | else p | |
915 | - | let aB = { | |
916 | - | let h = getInteger(this, "DelayCost") | |
917 | - | if ($isInstanceOf(h, "Int")) | |
918 | - | then { | |
919 | - | let i = h | |
920 | - | i | |
921 | - | } | |
922 | - | else 10 | |
923 | - | } | |
924 | - | let y = if ((size(e.payments) == 1)) | |
925 | - | then e.payments[0] | |
926 | - | else throw("Attached payment is required") | |
927 | - | let M = { | |
928 | - | let h = getInteger(this, "DevBox") | |
929 | - | if ($isInstanceOf(h, "Int")) | |
930 | - | then { | |
931 | - | let i = h | |
932 | - | i | |
933 | - | } | |
934 | - | else 0 | |
935 | - | } | |
936 | - | if (if (isDefined(y.assetId)) | |
937 | - | then (y.assetId == b) | |
938 | - | else false) | |
939 | - | then if ((n > 0)) | |
940 | - | then { | |
941 | - | let av = y.amount | |
942 | - | let g = (M + ((y.amount * 5) / 1000)) | |
943 | - | let aC = if ((aB == 0)) | |
939 | + | let au = x.amount | |
940 | + | let f = (L + ((x.amount * 5) / 1000)) | |
941 | + | let aB = if ((aA == 0)) | |
944 | 942 | then 1000000000 | |
945 | - | else (2 * | |
946 | - | if (( | |
943 | + | else (2 * aA) | |
944 | + | if ((au >= aB)) | |
947 | 945 | then { | |
948 | - | let | |
949 | - | [IntegerEntry("Delay", | |
946 | + | let N = (G + ay) | |
947 | + | [IntegerEntry("Delay", N), IntegerEntry("DelayCost", aB), IntegerEntry("PrizeHeight", P), IntegerEntry("DevBox", f), StringEntry("HighestPushAddress", O)] | |
950 | 948 | } | |
951 | - | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString( | |
949 | + | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(aB)) + "TROIKAs")) | |
952 | 950 | } | |
953 | 951 | else throw("You cannot delay the reward before reward is received! Please wait until a reward is available") | |
954 | 952 | else throw("Can Use only Troika Token to Delay Reward") | |
956 | 954 | ||
957 | 955 | ||
958 | 956 | ||
959 | - | @Callable( | |
957 | + | @Callable(d) | |
960 | 958 | func ClaimPrize () = { | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | if ($isInstanceOf( | |
959 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
960 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
961 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
962 | + | let r = (1440 * 7) | |
963 | + | let u = 3 | |
964 | + | let aC = assetBalance(this, b) | |
965 | + | let i = assetBalance(this, a) | |
966 | + | let l = { | |
967 | + | let g = getInteger(this, "StakeBalance") | |
968 | + | if ($isInstanceOf(g, "Int")) | |
971 | 969 | then { | |
972 | - | let | |
973 | - | | |
970 | + | let h = g | |
971 | + | h | |
974 | 972 | } | |
975 | 973 | else 0 | |
976 | 974 | } | |
977 | - | let | |
978 | - | let | |
979 | - | if ($isInstanceOf( | |
975 | + | let m = { | |
976 | + | let g = getInteger(this, "FundBox") | |
977 | + | if ($isInstanceOf(g, "Int")) | |
980 | 978 | then { | |
981 | - | let | |
982 | - | | |
979 | + | let h = g | |
980 | + | h | |
983 | 981 | } | |
984 | 982 | else 0 | |
985 | 983 | } | |
986 | - | let | |
987 | - | let | |
988 | - | if ($isInstanceOf( | |
984 | + | let ae = { | |
985 | + | let g = getInteger(this, y) | |
986 | + | if ($isInstanceOf(g, "Int")) | |
989 | 987 | then { | |
990 | - | let | |
991 | - | | |
988 | + | let h = g | |
989 | + | h | |
992 | 990 | } | |
993 | 991 | else 0 | |
994 | 992 | } | |
995 | - | let | |
996 | - | let | |
997 | - | if ($isInstanceOf( | |
993 | + | let J = { | |
994 | + | let g = getInteger(this, E) | |
995 | + | if ($isInstanceOf(g, "Int")) | |
998 | 996 | then { | |
999 | - | let i = h | |
1000 | - | i | |
997 | + | let h = g | |
998 | + | h | |
999 | + | } | |
1000 | + | else 0 | |
1001 | + | } | |
1002 | + | let aD = { | |
1003 | + | let g = getInteger(this, T) | |
1004 | + | if ($isInstanceOf(g, "Int")) | |
1005 | + | then { | |
1006 | + | let h = g | |
1007 | + | h | |
1008 | + | } | |
1009 | + | else 0 | |
1010 | + | } | |
1011 | + | let G = { | |
1012 | + | let g = getInteger(this, "Delay") | |
1013 | + | if ($isInstanceOf(g, "Int")) | |
1014 | + | then { | |
1015 | + | let h = g | |
1016 | + | h | |
1001 | 1017 | } | |
1002 | 1018 | else 0 | |
1003 | 1019 | } | |
1004 | 1020 | let aE = { | |
1005 | - | let | |
1006 | - | if ($isInstanceOf( | |
1021 | + | let g = getString(this, "HighestPushAddress") | |
1022 | + | if ($isInstanceOf(g, "String")) | |
1007 | 1023 | then { | |
1008 | - | let i = h | |
1009 | - | i | |
1024 | + | let h = g | |
1025 | + | h | |
1026 | + | } | |
1027 | + | else "" | |
1028 | + | } | |
1029 | + | let aF = { | |
1030 | + | let g = getInteger(this, "PrizeHeight") | |
1031 | + | if ($isInstanceOf(g, "Int")) | |
1032 | + | then { | |
1033 | + | let h = g | |
1034 | + | h | |
1010 | 1035 | } | |
1011 | 1036 | else 0 | |
1012 | 1037 | } | |
1013 | - | let | |
1014 | - | let | |
1015 | - | if ($isInstanceOf( | |
1038 | + | let C = { | |
1039 | + | let g = getInteger(this, "HighestPush") | |
1040 | + | if ($isInstanceOf(g, "Int")) | |
1016 | 1041 | then { | |
1017 | - | let | |
1018 | - | | |
1042 | + | let h = g | |
1043 | + | h | |
1019 | 1044 | } | |
1020 | 1045 | else 0 | |
1021 | 1046 | } | |
1022 | - | let aF = { | |
1023 | - | let h = getString(this, "HighestPushAddress") | |
1024 | - | if ($isInstanceOf(h, "String")) | |
1047 | + | let A = (toBase58String(d.caller.bytes) + "_refs") | |
1048 | + | let B = { | |
1049 | + | let g = getInteger(this, A) | |
1050 | + | if ($isInstanceOf(g, "Int")) | |
1025 | 1051 | then { | |
1026 | - | let i = h | |
1027 | - | i | |
1028 | - | } | |
1029 | - | else "" | |
1030 | - | } | |
1031 | - | let aG = { | |
1032 | - | let h = getInteger(this, "PrizeHeight") | |
1033 | - | if ($isInstanceOf(h, "Int")) | |
1034 | - | then { | |
1035 | - | let i = h | |
1036 | - | i | |
1052 | + | let h = g | |
1053 | + | h | |
1037 | 1054 | } | |
1038 | 1055 | else 0 | |
1039 | 1056 | } | |
1040 | - | let D = { | |
1041 | - | let h = getInteger(this, "HighestPush") | |
1042 | - | if ($isInstanceOf(h, "Int")) | |
1043 | - | then { | |
1044 | - | let i = h | |
1045 | - | i | |
1046 | - | } | |
1047 | - | else 0 | |
1048 | - | } | |
1049 | - | let B = (toBase58String(e.caller.bytes) + "_refs") | |
1050 | - | let C = { | |
1051 | - | let h = getInteger(this, B) | |
1052 | - | if ($isInstanceOf(h, "Int")) | |
1053 | - | then { | |
1054 | - | let i = h | |
1055 | - | i | |
1056 | - | } | |
1057 | - | else 0 | |
1058 | - | } | |
1059 | - | if (if ((n == 0)) | |
1057 | + | if (if ((m == 0)) | |
1060 | 1058 | then true | |
1061 | - | else (10000000000 > | |
1059 | + | else (10000000000 > aC)) | |
1062 | 1060 | then throw("No prize to Claim or Not enough Govern Token en Contract (Min 100 Troika)") | |
1063 | - | else if ((toBase58String( | |
1061 | + | else if ((toBase58String(d.caller.bytes) != aE)) | |
1064 | 1062 | then throw("You are not the winner hence cannot claim the reward ") | |
1065 | - | else if (if ((100000000 > | |
1066 | - | then ( | |
1063 | + | else if (if ((100000000 > aD)) | |
1064 | + | then (r > J) | |
1067 | 1065 | else false) | |
1068 | 1066 | then throw("You have to Stake ASIMI Token to claim reward ") | |
1069 | - | else if (if ((height > ( | |
1070 | - | then ( | |
1067 | + | else if (if ((height > (aF + G))) | |
1068 | + | then (ae >= C) | |
1071 | 1069 | else false) | |
1072 | - | then if (( | |
1073 | - | then [IntegerEntry( | |
1074 | - | else throw((("You have to have " + toString( | |
1070 | + | then if ((B >= u)) | |
1071 | + | then [IntegerEntry(aE, m), IntegerEntry("FundBox", 0), IntegerEntry("HighestPush", 0), IntegerEntry(y, 0), StringEntry("HighestPushAddress", ""), IntegerEntry("PrizeHeight", 0), IntegerEntry("Delay", 0), IntegerEntry("DelayCost", 0), StringEntry("LastWinner", aE), IntegerEntry("LastPrize", m), ScriptTransfer(d.caller, m, a), ScriptTransfer(d.caller, 1000000000, b)] | |
1072 | + | else throw((("You have to have " + toString(u)) + " referrals already staking for a minimum of 10 days to Claim the prize")) | |
1075 | 1073 | else throw("You have to be the user with the highest Push and wait till countown is finished, to claim Reward") | |
1076 | 1074 | } | |
1077 | 1075 | ||
1078 | 1076 | ||
1079 | 1077 | ||
1080 | - | @Callable( | |
1081 | - | func Addmentor ( | |
1082 | - | let | |
1083 | - | if (( | |
1084 | - | then [StringEntry( | |
1078 | + | @Callable(d) | |
1079 | + | func Addmentor (aG) = { | |
1080 | + | let aH = (toBase58String(d.caller.bytes) + "_Mentor") | |
1081 | + | if ((aG != "")) | |
1082 | + | then [StringEntry(aH, aG)] | |
1085 | 1083 | else throw("Mentor's Address cannot be empty") | |
1086 | 1084 | } | |
1087 | 1085 | ||
1088 | 1086 | ||
1089 | 1087 | ||
1090 | - | @Callable(e) | |
1091 | - | func GetLikesPackage (aJ,aK) = { | |
1092 | - | let aL = { | |
1093 | - | let h = getInteger(this, "LikePackageTROIKANCost") | |
1094 | - | if ($isInstanceOf(h, "Int")) | |
1088 | + | @Callable(d) | |
1089 | + | func UpdateTwittsCost (aI,aJ) = if ((toBase58String(d.caller.bytes) == c)) | |
1090 | + | then [IntegerEntry("LikePackageASIMICost", aI), IntegerEntry("LikePackageTROIKANCost", aJ)] | |
1091 | + | else throw("Only available for Admin") | |
1092 | + | ||
1093 | + | ||
1094 | + | ||
1095 | + | @Callable(d) | |
1096 | + | func GetLikesPackage (aK,aL) = { | |
1097 | + | let aM = { | |
1098 | + | let g = getInteger(this, "LikePackageTROIKANCost") | |
1099 | + | if ($isInstanceOf(g, "Int")) | |
1095 | 1100 | then { | |
1096 | - | let | |
1097 | - | | |
1101 | + | let h = g | |
1102 | + | h | |
1098 | 1103 | } | |
1099 | 1104 | else 0 | |
1100 | 1105 | } | |
1101 | - | let | |
1102 | - | let | |
1103 | - | if ($isInstanceOf( | |
1106 | + | let aN = { | |
1107 | + | let g = getInteger(this, "LikePackageASIMICost") | |
1108 | + | if ($isInstanceOf(g, "Int")) | |
1104 | 1109 | then { | |
1105 | - | let | |
1106 | - | | |
1110 | + | let h = g | |
1111 | + | h | |
1107 | 1112 | } | |
1108 | 1113 | else 0 | |
1109 | 1114 | } | |
1110 | - | let | |
1111 | - | then | |
1115 | + | let x = if ((size(d.payments) == 2)) | |
1116 | + | then d.payments[0] | |
1112 | 1117 | else throw("Attached payment is required") | |
1113 | - | if (if (( | |
1114 | - | then ( | |
1118 | + | if (if ((d.payments[0].assetId == a)) | |
1119 | + | then (d.payments[1].assetId == b) | |
1115 | 1120 | else false) | |
1116 | - | then if (( | |
1117 | - | then if (( | |
1121 | + | then if ((d.payments[0].amount >= aN)) | |
1122 | + | then if ((d.payments[1].amount >= aM)) | |
1118 | 1123 | then { | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let | |
1122 | - | if ($isInstanceOf( | |
1124 | + | let aO = ((toString(aK) + "_Twitt2Like_") + toString(aL)) | |
1125 | + | let aP = { | |
1126 | + | let g = getInteger(this, aO) | |
1127 | + | if ($isInstanceOf(g, "Int")) | |
1123 | 1128 | then { | |
1124 | - | let | |
1125 | - | | |
1129 | + | let h = g | |
1130 | + | h | |
1126 | 1131 | } | |
1127 | 1132 | else 0 | |
1128 | 1133 | } | |
1129 | - | if (( | |
1130 | - | then [IntegerEntry(((toString( | |
1134 | + | if ((aP == 0)) | |
1135 | + | then [IntegerEntry(((toString(aK) + "_Twitt2Like_") + toString(aL)), ((95 * aN) / 100)), IntegerEntry("LikeTwittsDevBox", ((5 * aN) / 100))] | |
1131 | 1136 | else throw("Cannot acquire a new package, the prior like package has to be drained to be able to acquire a new one") | |
1132 | 1137 | } | |
1133 | - | else throw(("TROIKAN Amount should be :" + toString(( | |
1134 | - | else throw(("ASIMI Amount should be :" + toString(( | |
1138 | + | else throw(("TROIKAN Amount should be :" + toString((aN / 100000000)))) | |
1139 | + | else throw(("ASIMI Amount should be :" + toString((aM / 100000000)))) | |
1135 | 1140 | else throw("Payments should be both ASIMI and TROIKAN tokens") | |
1136 | 1141 | } | |
1137 | 1142 | ||
1138 | 1143 | ||
1139 | 1144 | ||
1140 | - | @Callable( | |
1141 | - | func GetMyLikedTwittsRewards ( | |
1142 | - | let | |
1143 | - | let | |
1144 | - | if ($isInstanceOf( | |
1145 | + | @Callable(d) | |
1146 | + | func GetMyLikedTwittsRewards (aQ) = { | |
1147 | + | let aR = { | |
1148 | + | let g = getInteger(this, (aQ + "_Like_Amount")) | |
1149 | + | if ($isInstanceOf(g, "Int")) | |
1145 | 1150 | then { | |
1146 | - | let | |
1147 | - | | |
1151 | + | let h = g | |
1152 | + | h | |
1148 | 1153 | } | |
1149 | 1154 | else 0 | |
1150 | 1155 | } | |
1151 | - | let | |
1152 | - | let | |
1153 | - | if ($isInstanceOf( | |
1156 | + | let aS = { | |
1157 | + | let g = getInteger(this, (aQ + "_TroikandApp_RT_Amount")) | |
1158 | + | if ($isInstanceOf(g, "Int")) | |
1154 | 1159 | then { | |
1155 | - | let | |
1156 | - | | |
1160 | + | let h = g | |
1161 | + | h | |
1157 | 1162 | } | |
1158 | 1163 | else 0 | |
1159 | 1164 | } | |
1160 | - | if (if (( | |
1161 | - | then ( | |
1165 | + | if (if ((aR >= (1 * 100000000))) | |
1166 | + | then (aS >= (1 * 100000000)) | |
1162 | 1167 | else false) | |
1163 | - | then [IntegerEntry(( | |
1168 | + | then [IntegerEntry((aQ + "_TroikandApp_RT_Amount"), 0), IntegerEntry((aQ + "_Like_Amount"), 0), ScriptTransfer(d.caller, aR, a), ScriptTransfer(d.caller, aS, b)] | |
1164 | 1169 | else throw("Minimum earnings to withdraw are: 100 ASIMI and 50 Troikans") | |
1165 | 1170 | } | |
1166 | 1171 | ||
1167 | 1172 | ||
1168 | 1173 | ||
1169 | - | @Callable( | |
1170 | - | func LinkTwitterAcc2Wallet ( | |
1171 | - | let | |
1172 | - | let | |
1173 | - | if ($isInstanceOf( | |
1174 | + | @Callable(d) | |
1175 | + | func LinkTwitterAcc2Wallet (aK) = { | |
1176 | + | let aT = { | |
1177 | + | let g = getString(this, (aK + "_Wallet")) | |
1178 | + | if ($isInstanceOf(g, "String")) | |
1174 | 1179 | then { | |
1175 | - | let | |
1176 | - | | |
1180 | + | let h = g | |
1181 | + | h | |
1177 | 1182 | } | |
1178 | 1183 | else "None" | |
1179 | 1184 | } | |
1180 | - | if ((toBase58String( | |
1185 | + | if ((toBase58String(d.caller.bytes) == aT)) | |
1181 | 1186 | then throw("You already have your wallet linked to the Twitter account") | |
1182 | - | else if (if ((toBase58String( | |
1183 | - | then ( | |
1187 | + | else if (if ((toBase58String(d.caller.bytes) != aT)) | |
1188 | + | then (aT != "None") | |
1184 | 1189 | else false) | |
1185 | 1190 | then throw("The wallet you are using is not the linked Wallet to this Twitter account") | |
1186 | - | else [StringEntry(( | |
1191 | + | else [StringEntry((aK + "_Wallet"), toBase58String(d.caller.bytes))] | |
1187 | 1192 | } | |
1188 | 1193 | ||
1189 | 1194 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Hoej8L1ezqQY4Miex4Z4J7uJ33LCdcubV3DsubGHEqWP' | |
5 | 5 | ||
6 | 6 | let b = base58'6ZPMzZseuYoMP4ByozJpVxbugXBobwJYF22zVjW5JjN' | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = "3P74buHt98BnojFcaREJZtb98KDyUmZGemJ" | |
9 | 9 | ||
10 | - | let d = (5 * 100000000) | |
11 | - | ||
12 | - | @Callable(e) | |
10 | + | @Callable(d) | |
13 | 11 | func DevWithdraw () = { | |
14 | - | let | |
15 | - | if (( | |
12 | + | let e = toBase58String(d.caller.bytes) | |
13 | + | if ((e == c)) | |
16 | 14 | then { | |
17 | - | let | |
18 | - | let | |
19 | - | if ($isInstanceOf( | |
15 | + | let f = { | |
16 | + | let g = getInteger(this, "DevBox") | |
17 | + | if ($isInstanceOf(g, "Int")) | |
20 | 18 | then { | |
21 | - | let | |
22 | - | | |
19 | + | let h = g | |
20 | + | h | |
23 | 21 | } | |
24 | 22 | else 0 | |
25 | 23 | } | |
26 | - | if ((0 > | |
24 | + | if ((0 > f)) | |
27 | 25 | then throw("Not enough balance") | |
28 | - | else [IntegerEntry("DevBox", 0), ScriptTransfer( | |
26 | + | else [IntegerEntry("DevBox", 0), ScriptTransfer(d.caller, f, b)] | |
29 | 27 | } | |
30 | 28 | else throw("You cannot withdraw as your are not the Dev.") | |
31 | 29 | } | |
32 | 30 | ||
33 | 31 | ||
34 | 32 | ||
35 | - | @Callable( | |
33 | + | @Callable(d) | |
36 | 34 | func WithdrawWeeklyEarning () = { | |
37 | - | let | |
38 | - | let | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
35 | + | let i = assetBalance(this, a) | |
36 | + | let j = { | |
37 | + | let g = getString(this, "MaxDepositer") | |
38 | + | if ($isInstanceOf(g, "String")) | |
41 | 39 | then { | |
42 | - | let | |
43 | - | | |
40 | + | let h = g | |
41 | + | h | |
44 | 42 | } | |
45 | 43 | else "" | |
46 | 44 | } | |
47 | - | let l = (toBase58String(e.caller.bytes) + "_WeekEarning") | |
45 | + | let k = (toBase58String(d.caller.bytes) + "_WeekEarning") | |
46 | + | let l = { | |
47 | + | let g = getInteger(this, "StakeBalance") | |
48 | + | if ($isInstanceOf(g, "Int")) | |
49 | + | then { | |
50 | + | let h = g | |
51 | + | h | |
52 | + | } | |
53 | + | else 0 | |
54 | + | } | |
48 | 55 | let m = { | |
49 | - | let | |
50 | - | if ($isInstanceOf( | |
56 | + | let g = getInteger(this, "FundBox") | |
57 | + | if ($isInstanceOf(g, "Int")) | |
51 | 58 | then { | |
52 | - | let | |
53 | - | | |
59 | + | let h = g | |
60 | + | h | |
54 | 61 | } | |
55 | 62 | else 0 | |
56 | 63 | } | |
57 | 64 | let n = { | |
58 | - | let | |
59 | - | if ($isInstanceOf( | |
65 | + | let g = getInteger(this, "PrizeHeight") | |
66 | + | if ($isInstanceOf(g, "Int")) | |
60 | 67 | then { | |
61 | - | let | |
62 | - | | |
68 | + | let h = g | |
69 | + | h | |
63 | 70 | } | |
64 | 71 | else 0 | |
65 | 72 | } | |
66 | - | let o = { | |
67 | - | let h = getInteger(this, "PrizeHeight") | |
68 | - | if ($isInstanceOf(h, "Int")) | |
73 | + | let o = if (if ((n == 0)) | |
74 | + | then (m == 0) | |
75 | + | else false) | |
76 | + | then 0 | |
77 | + | else if (if ((n == 0)) | |
78 | + | then (m != 0) | |
79 | + | else false) | |
80 | + | then height | |
81 | + | else if (if ((n != 0)) | |
82 | + | then (m != 0) | |
83 | + | else false) | |
84 | + | then n | |
85 | + | else 0 | |
86 | + | let e = toBase58String(d.caller.bytes) | |
87 | + | let p = { | |
88 | + | let g = getInteger(this, k) | |
89 | + | if ($isInstanceOf(g, "Int")) | |
69 | 90 | then { | |
70 | - | let | |
71 | - | | |
91 | + | let h = g | |
92 | + | h | |
72 | 93 | } | |
73 | 94 | else 0 | |
74 | 95 | } | |
75 | - | let p = if (if ((o == 0)) | |
76 | - | then (n == 0) | |
77 | - | else false) | |
78 | - | then 0 | |
79 | - | else if (if ((o == 0)) | |
80 | - | then (n != 0) | |
81 | - | else false) | |
82 | - | then height | |
83 | - | else if (if ((o != 0)) | |
84 | - | then (n != 0) | |
85 | - | else false) | |
86 | - | then o | |
87 | - | else 0 | |
88 | - | let f = toBase58String(e.caller.bytes) | |
89 | - | let q = { | |
90 | - | let h = getInteger(this, l) | |
91 | - | if ($isInstanceOf(h, "Int")) | |
92 | - | then { | |
93 | - | let i = h | |
94 | - | i | |
95 | - | } | |
96 | - | else 0 | |
97 | - | } | |
98 | - | if ((0 > q)) | |
96 | + | if ((0 > p)) | |
99 | 97 | then throw("Can't withdraw negative amount") | |
100 | - | else if ((0 > | |
101 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(( | |
102 | - | else [IntegerEntry( | |
98 | + | else if ((0 > p)) | |
99 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((p / 100000000)))) | |
100 | + | else [IntegerEntry(k, 0), IntegerEntry("PrizeHeight", o), IntegerEntry("MaxDeposit", 0), ScriptTransfer(d.caller, p, a)] | |
103 | 101 | } | |
104 | 102 | ||
105 | 103 | ||
106 | 104 | ||
107 | - | @Callable( | |
105 | + | @Callable(d) | |
108 | 106 | func PushReward () = { | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | then | |
107 | + | let q = 10 | |
108 | + | let r = (7 * 1440) | |
109 | + | let s = 60 | |
110 | + | let t = (1440 * 1) | |
111 | + | let u = 3 | |
112 | + | let v = (7 * 1440) | |
113 | + | let w = assetBalance(Address(d.caller.bytes), b) | |
114 | + | let x = if ((size(d.payments) == 1)) | |
115 | + | then d.payments[0] | |
118 | 116 | else throw("Attached payment is required") | |
119 | - | let | |
120 | - | let | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
117 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
118 | + | let z = { | |
119 | + | let g = getInteger(this, y) | |
120 | + | if ($isInstanceOf(g, "Int")) | |
123 | 121 | then { | |
124 | - | let | |
125 | - | | |
122 | + | let h = g | |
123 | + | h | |
126 | 124 | } | |
127 | 125 | else 0 | |
128 | 126 | } | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | if ($isInstanceOf( | |
127 | + | let A = (toBase58String(d.caller.bytes) + "_refs") | |
128 | + | let B = { | |
129 | + | let g = getInteger(this, A) | |
130 | + | if ($isInstanceOf(g, "Int")) | |
133 | 131 | then { | |
134 | - | let | |
135 | - | | |
132 | + | let h = g | |
133 | + | h | |
136 | 134 | } | |
137 | 135 | else 0 | |
138 | 136 | } | |
139 | - | let | |
140 | - | let | |
141 | - | if ($isInstanceOf( | |
137 | + | let C = { | |
138 | + | let g = getInteger(this, "HighestPush") | |
139 | + | if ($isInstanceOf(g, "Int")) | |
142 | 140 | then { | |
143 | - | let | |
144 | - | | |
141 | + | let h = g | |
142 | + | h | |
145 | 143 | } | |
146 | 144 | else 0 | |
147 | 145 | } | |
148 | - | if (( | |
149 | - | then if (if ((( | |
150 | - | then ( | |
146 | + | if ((w > x.amount)) | |
147 | + | then if (if (((x.amount + z) > C)) | |
148 | + | then (x.assetId == b) | |
151 | 149 | else false) | |
152 | 150 | then { | |
153 | - | let E = (toBase58String(e.caller.bytes) + "_UserLastPushBlock") | |
154 | - | let F = (toBase58String(e.caller.bytes) + "_UserLastStakeBlock") | |
155 | - | let G = (toBase58String(e.caller.bytes) + "_Staking") | |
156 | - | let j = assetBalance(this, a) | |
151 | + | let D = (toBase58String(d.caller.bytes) + "_UserLastPushBlock") | |
152 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
153 | + | let F = (toBase58String(d.caller.bytes) + "_Staking") | |
154 | + | let i = assetBalance(this, a) | |
155 | + | let l = { | |
156 | + | let g = getInteger(this, "StakeBalance") | |
157 | + | if ($isInstanceOf(g, "Int")) | |
158 | + | then { | |
159 | + | let h = g | |
160 | + | h | |
161 | + | } | |
162 | + | else 0 | |
163 | + | } | |
157 | 164 | let m = { | |
158 | - | let | |
159 | - | if ($isInstanceOf( | |
165 | + | let g = getInteger(this, "FundBox") | |
166 | + | if ($isInstanceOf(g, "Int")) | |
160 | 167 | then { | |
161 | - | let | |
162 | - | | |
168 | + | let h = g | |
169 | + | h | |
163 | 170 | } | |
164 | 171 | else 0 | |
165 | 172 | } | |
166 | 173 | let n = { | |
167 | - | let | |
168 | - | if ($isInstanceOf( | |
174 | + | let g = getInteger(this, "PrizeHeight") | |
175 | + | if ($isInstanceOf(g, "Int")) | |
169 | 176 | then { | |
170 | - | let | |
171 | - | | |
177 | + | let h = g | |
178 | + | h | |
172 | 179 | } | |
173 | 180 | else 0 | |
174 | 181 | } | |
175 | - | let o = { | |
176 | - | let h = getInteger(this, "PrizeHeight") | |
177 | - | if ($isInstanceOf(h, "Int")) | |
182 | + | let o = if (if ((n == 0)) | |
183 | + | then (m == 0) | |
184 | + | else false) | |
185 | + | then 0 | |
186 | + | else if (if ((n == 0)) | |
187 | + | then (m != 0) | |
188 | + | else false) | |
189 | + | then height | |
190 | + | else if (if ((n != 0)) | |
191 | + | then (m != 0) | |
192 | + | else false) | |
193 | + | then n | |
194 | + | else 0 | |
195 | + | let G = { | |
196 | + | let g = getInteger(this, "Delay") | |
197 | + | if ($isInstanceOf(g, "Int")) | |
178 | 198 | then { | |
179 | - | let | |
180 | - | | |
199 | + | let h = g | |
200 | + | h | |
181 | 201 | } | |
182 | 202 | else 0 | |
183 | 203 | } | |
184 | - | let p = if (if ((o == 0)) | |
185 | - | then (n == 0) | |
186 | - | else false) | |
187 | - | then 0 | |
188 | - | else if (if ((o == 0)) | |
189 | - | then (n != 0) | |
190 | - | else false) | |
191 | - | then height | |
192 | - | else if (if ((o != 0)) | |
193 | - | then (n != 0) | |
194 | - | else false) | |
195 | - | then o | |
196 | - | else 0 | |
197 | 204 | let H = { | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
205 | + | let g = getInteger(this, "HighestPushAddress") | |
206 | + | if ($isInstanceOf(g, "Int")) | |
200 | 207 | then { | |
201 | - | let | |
202 | - | | |
208 | + | let h = g | |
209 | + | h | |
203 | 210 | } | |
204 | 211 | else 0 | |
205 | 212 | } | |
206 | 213 | let I = { | |
207 | - | let | |
208 | - | if ($isInstanceOf( | |
214 | + | let g = getInteger(this, D) | |
215 | + | if ($isInstanceOf(g, "Int")) | |
209 | 216 | then { | |
210 | - | let | |
211 | - | | |
217 | + | let h = g | |
218 | + | h | |
212 | 219 | } | |
213 | 220 | else 0 | |
214 | 221 | } | |
215 | 222 | let J = { | |
216 | - | let | |
217 | - | if ($isInstanceOf( | |
223 | + | let g = getInteger(this, E) | |
224 | + | if ($isInstanceOf(g, "Int")) | |
218 | 225 | then { | |
219 | - | let | |
220 | - | | |
226 | + | let h = g | |
227 | + | h | |
221 | 228 | } | |
222 | 229 | else 0 | |
223 | 230 | } | |
224 | 231 | let K = { | |
225 | - | let | |
226 | - | if ($isInstanceOf( | |
232 | + | let g = getInteger(this, F) | |
233 | + | if ($isInstanceOf(g, "Int")) | |
227 | 234 | then { | |
228 | - | let | |
229 | - | | |
235 | + | let h = g | |
236 | + | h | |
230 | 237 | } | |
231 | 238 | else 0 | |
232 | 239 | } | |
233 | 240 | let L = { | |
234 | - | let | |
235 | - | if ($isInstanceOf( | |
241 | + | let g = getInteger(this, "DevBox") | |
242 | + | if ($isInstanceOf(g, "Int")) | |
236 | 243 | then { | |
237 | - | let | |
238 | - | | |
244 | + | let h = g | |
245 | + | h | |
239 | 246 | } | |
240 | 247 | else 0 | |
241 | 248 | } | |
242 | - | let M = { | |
243 | - | let h = getInteger(this, "DevBox") | |
244 | - | if ($isInstanceOf(h, "Int")) | |
245 | - | then { | |
246 | - | let i = h | |
247 | - | i | |
248 | - | } | |
249 | - | else 0 | |
250 | - | } | |
251 | - | let g = (M + ((y.amount * 5) / 1000)) | |
252 | - | let N = (y.amount + A) | |
253 | - | let O = if (if ((height > ((p + H) + u))) | |
254 | - | then (D > 0) | |
249 | + | let f = (L + ((x.amount * 5) / 1000)) | |
250 | + | let M = (x.amount + z) | |
251 | + | let N = if (if ((height > ((o + G) + t))) | |
252 | + | then (C > 0) | |
255 | 253 | else false) | |
256 | - | then | |
257 | - | else ( | |
258 | - | let | |
259 | - | then ( | |
254 | + | then v | |
255 | + | else (G + s) | |
256 | + | let O = if (if ((height > ((o + N) + t))) | |
257 | + | then (C > 0) | |
260 | 258 | else false) | |
261 | 259 | then "" | |
262 | - | else | |
263 | - | let | |
264 | - | then ( | |
260 | + | else H | |
261 | + | let P = if (if ((height > ((o + N) + t))) | |
262 | + | then (C > 0) | |
265 | 263 | else false) | |
266 | 264 | then height | |
267 | - | else | |
268 | - | if (if (( | |
269 | - | then ((height - | |
265 | + | else o | |
266 | + | if (if ((M > 0)) | |
267 | + | then ((height - J) > r) | |
270 | 268 | else false) | |
271 | - | then if (((height - | |
272 | - | then if (( | |
273 | - | then if (( | |
274 | - | then if (( | |
275 | - | then if (if (if (if ((( | |
269 | + | then if (((height - I) > q)) | |
270 | + | then if ((K > 0)) | |
271 | + | then if ((M > C)) | |
272 | + | then if ((m > 0)) | |
273 | + | then if (if (if (if (((P + N) >= height)) | |
276 | 274 | then true | |
277 | - | else (height >= (( | |
278 | - | then ( | |
275 | + | else (height >= ((P + N) + t))) | |
276 | + | then (C > 0) | |
279 | 277 | else false) | |
280 | 278 | then true | |
281 | - | else ( | |
282 | - | then if (( | |
283 | - | then [IntegerEntry( | |
284 | - | else throw((("You have to have " + toString( | |
279 | + | else (C == 0)) | |
280 | + | then if ((B >= u)) | |
281 | + | then [IntegerEntry(y, M), StringEntry("HighestPushAddress", toBase58String(d.caller.bytes)), IntegerEntry("HighestPush", M), IntegerEntry(D, height), IntegerEntry("PrizeHeight", P), IntegerEntry("Delay", N), IntegerEntry("DevBox", f)] | |
282 | + | else throw((("You have to have " + toString(u)) + " referrals already staking for a minimum of 10 days, to push")) | |
285 | 283 | else { | |
286 | - | let | |
284 | + | let Q = if ((C > 0)) | |
287 | 285 | then "You cannot Push after rewarding Prize and before One day has passed after award" | |
288 | 286 | else "Unexpected error" | |
289 | - | throw( | |
287 | + | throw(Q) | |
290 | 288 | } | |
291 | 289 | else throw("You cannot push before the reward is unlocked, no reward has been detected yet") | |
292 | 290 | else throw("Your push in troikan token, should be Higher than last Highest Push") | |
293 | 291 | else throw("To be able to participate in Pushing for the reward you need to Stake ASIMIs in the dApp") | |
294 | 292 | else throw("You have to wait 10min before you can make a new Push") | |
295 | 293 | else throw(("Your Push dot not comply one of the following conditions: " + "1. Positive Value for Push in Troikan Toke | |
296 | 294 | 2. Must Staked ASIMI Token for a minimum of week ")) | |
297 | 295 | } | |
298 | - | else throw((("Can deposit only positive amounts of Troikan Token, or Check your Wallet balance in Troika, you should have more than " + toString( | |
296 | + | else throw((("Can deposit only positive amounts of Troikan Token, or Check your Wallet balance in Troika, you should have more than " + toString(C)) + " to push")) | |
299 | 297 | else throw("You do not have enough Troikan Tokens in your Wallet Balance, Please Harvest if you have earned Troikan wallet or transfer to your wallet necessary Troikan amount !") | |
300 | 298 | } | |
301 | 299 | ||
302 | 300 | ||
303 | 301 | ||
304 | - | @Callable( | |
302 | + | @Callable(d) | |
305 | 303 | func Stake () = { | |
306 | - | let | |
307 | - | let | |
308 | - | then | |
304 | + | let t = (1440 * 1) | |
305 | + | let x = if ((size(d.payments) == 1)) | |
306 | + | then d.payments[0] | |
309 | 307 | else throw("Attached payment is required") | |
310 | - | if (if (( | |
311 | - | then ( | |
308 | + | if (if ((x.amount > 0)) | |
309 | + | then (x.assetId == a) | |
312 | 310 | else false) | |
313 | 311 | then { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | if ($isInstanceOf( | |
312 | + | let R = assetBalance(this, b) | |
313 | + | let S = (toBase58String(d.caller.bytes) + "_APY") | |
314 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
315 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
316 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
317 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
318 | + | let V = (toBase58String(d.caller.bytes) + "_StakedTransactions") | |
319 | + | let W = (toBase58String(d.caller.bytes) + "_PrizeHeight") | |
320 | + | let X = (toBase58String(d.caller.bytes) + "_WeekEarning") | |
321 | + | let Y = { | |
322 | + | let g = getInteger(this, V) | |
323 | + | if ($isInstanceOf(g, "Int")) | |
326 | 324 | then { | |
327 | - | let | |
328 | - | | |
325 | + | let h = g | |
326 | + | h | |
329 | 327 | } | |
330 | 328 | else 0 | |
331 | 329 | } | |
332 | - | let | |
333 | - | let | |
334 | - | if ($isInstanceOf( | |
330 | + | let j = { | |
331 | + | let g = getString(this, "MaxDepositer") | |
332 | + | if ($isInstanceOf(g, "String")) | |
335 | 333 | then { | |
336 | - | let | |
337 | - | | |
334 | + | let h = g | |
335 | + | h | |
338 | 336 | } | |
339 | 337 | else "" | |
340 | 338 | } | |
341 | - | let | |
342 | - | let | |
343 | - | if ($isInstanceOf( | |
339 | + | let Z = { | |
340 | + | let g = getInteger(this, "MaxDepositBlock") | |
341 | + | if ($isInstanceOf(g, "Int")) | |
344 | 342 | then { | |
345 | - | let | |
346 | - | | |
343 | + | let h = g | |
344 | + | h | |
347 | 345 | } | |
348 | 346 | else 0 | |
349 | 347 | } | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
348 | + | let aa = { | |
349 | + | let g = getInteger(this, "MaxDeposit") | |
350 | + | if ($isInstanceOf(g, "Int")) | |
353 | 351 | then { | |
354 | - | let | |
355 | - | | |
352 | + | let h = g | |
353 | + | h | |
356 | 354 | } | |
357 | 355 | else 0 | |
358 | 356 | } | |
359 | - | let | |
360 | - | then toBase58String( | |
361 | - | else | |
362 | - | let | |
363 | - | then | |
364 | - | else | |
365 | - | let | |
357 | + | let ab = if ((x.amount > aa)) | |
358 | + | then toBase58String(d.caller.bytes) | |
359 | + | else j | |
360 | + | let ac = if ((x.amount > aa)) | |
361 | + | then x.amount | |
362 | + | else aa | |
363 | + | let ad = if ((x.amount > aa)) | |
366 | 364 | then height | |
367 | - | else | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
365 | + | else Z | |
366 | + | let ae = { | |
367 | + | let g = getInteger(this, y) | |
368 | + | if ($isInstanceOf(g, "Int")) | |
371 | 369 | then { | |
372 | - | let | |
373 | - | | |
370 | + | let h = g | |
371 | + | h | |
374 | 372 | } | |
375 | 373 | else 0 | |
376 | 374 | } | |
377 | - | let | |
378 | - | let | |
379 | - | if ($isInstanceOf( | |
375 | + | let J = { | |
376 | + | let g = getInteger(this, E) | |
377 | + | if ($isInstanceOf(g, "Int")) | |
380 | 378 | then { | |
381 | - | let | |
382 | - | | |
379 | + | let h = g | |
380 | + | h | |
383 | 381 | } | |
384 | 382 | else 0 | |
385 | 383 | } | |
386 | - | let | |
384 | + | let af = if ((J == 0)) | |
387 | 385 | then height | |
388 | - | else | |
389 | - | let | |
390 | - | let | |
391 | - | let | |
392 | - | if ($isInstanceOf( | |
386 | + | else J | |
387 | + | let ag = (Y + 1) | |
388 | + | let ah = { | |
389 | + | let g = getInteger(this, T) | |
390 | + | if ($isInstanceOf(g, "Int")) | |
393 | 391 | then { | |
394 | - | let | |
395 | - | | |
392 | + | let h = g | |
393 | + | h | |
396 | 394 | } | |
397 | 395 | else 0 | |
398 | 396 | } | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
397 | + | let ai = (ah + x.amount) | |
398 | + | let i = assetBalance(this, a) | |
399 | + | let l = { | |
400 | + | let g = getInteger(this, "StakeBalance") | |
401 | + | if ($isInstanceOf(g, "Int")) | |
404 | 402 | then { | |
405 | - | let | |
406 | - | | |
403 | + | let h = g | |
404 | + | h | |
407 | 405 | } | |
408 | 406 | else 0 | |
409 | 407 | } | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | if ($isInstanceOf( | |
408 | + | let aj = (l + x.amount) | |
409 | + | let m = { | |
410 | + | let g = getInteger(this, "FundBox") | |
411 | + | if ($isInstanceOf(g, "Int")) | |
414 | 412 | then { | |
415 | - | let i = h | |
416 | - | i | |
413 | + | let h = g | |
414 | + | h | |
415 | + | } | |
416 | + | else 0 | |
417 | + | } | |
418 | + | let ak = { | |
419 | + | let g = getInteger(this, X) | |
420 | + | if ($isInstanceOf(g, "Int")) | |
421 | + | then { | |
422 | + | let h = g | |
423 | + | h | |
417 | 424 | } | |
418 | 425 | else 0 | |
419 | 426 | } | |
420 | 427 | let al = { | |
421 | - | let | |
422 | - | if ($isInstanceOf( | |
428 | + | let g = getInteger(this, U) | |
429 | + | if ($isInstanceOf(g, "Int")) | |
423 | 430 | then { | |
424 | - | let | |
425 | - | | |
431 | + | let h = g | |
432 | + | h | |
426 | 433 | } | |
427 | 434 | else 0 | |
428 | 435 | } | |
429 | - | let | |
430 | - | let | |
431 | - | if ($isInstanceOf( | |
436 | + | let n = { | |
437 | + | let g = getInteger(this, "PrizeHeight") | |
438 | + | if ($isInstanceOf(g, "Int")) | |
432 | 439 | then { | |
433 | - | let | |
434 | - | | |
440 | + | let h = g | |
441 | + | h | |
435 | 442 | } | |
436 | 443 | else 0 | |
437 | 444 | } | |
438 | - | let o = { | |
439 | - | let h = getInteger(this, "PrizeHeight") | |
440 | - | if ($isInstanceOf(h, "Int")) | |
445 | + | let o = if (if ((n == 0)) | |
446 | + | then (m == 0) | |
447 | + | else false) | |
448 | + | then 0 | |
449 | + | else if (if ((n == 0)) | |
450 | + | then (m != 0) | |
451 | + | else false) | |
452 | + | then height | |
453 | + | else if (if ((n != 0)) | |
454 | + | then (m != 0) | |
455 | + | else false) | |
456 | + | then n | |
457 | + | else 0 | |
458 | + | let G = { | |
459 | + | let g = getInteger(this, "Delay") | |
460 | + | if ($isInstanceOf(g, "Int")) | |
441 | 461 | then { | |
442 | - | let | |
443 | - | | |
462 | + | let h = g | |
463 | + | h | |
444 | 464 | } | |
445 | 465 | else 0 | |
446 | 466 | } | |
447 | - | let p = if (if ((o == 0)) | |
448 | - | then (n == 0) | |
449 | - | else false) | |
450 | - | then 0 | |
451 | - | else if (if ((o == 0)) | |
452 | - | then (n != 0) | |
453 | - | else false) | |
454 | - | then height | |
455 | - | else if (if ((o != 0)) | |
456 | - | then (n != 0) | |
457 | - | else false) | |
458 | - | then o | |
459 | - | else 0 | |
460 | - | let H = { | |
461 | - | let h = getInteger(this, "Delay") | |
462 | - | if ($isInstanceOf(h, "Int")) | |
467 | + | let C = { | |
468 | + | let g = getInteger(this, "HighestPush") | |
469 | + | if ($isInstanceOf(g, "Int")) | |
463 | 470 | then { | |
464 | - | let | |
465 | - | | |
471 | + | let h = g | |
472 | + | h | |
466 | 473 | } | |
467 | 474 | else 0 | |
468 | 475 | } | |
469 | - | let | |
470 | - | let | |
471 | - | if ($isInstanceOf( | |
476 | + | let H = { | |
477 | + | let g = getString(this, "HighestPushAddress") | |
478 | + | if ($isInstanceOf(g, "String")) | |
472 | 479 | then { | |
473 | - | let i = h | |
474 | - | i | |
475 | - | } | |
476 | - | else 0 | |
477 | - | } | |
478 | - | let I = { | |
479 | - | let h = getString(this, "HighestPushAddress") | |
480 | - | if ($isInstanceOf(h, "String")) | |
481 | - | then { | |
482 | - | let i = h | |
483 | - | i | |
480 | + | let h = g | |
481 | + | h | |
484 | 482 | } | |
485 | 483 | else "" | |
486 | 484 | } | |
487 | - | let | |
488 | - | then ( | |
485 | + | let O = if (if ((height > ((o + G) + t))) | |
486 | + | then (C > 0) | |
489 | 487 | else false) | |
490 | 488 | then "" | |
491 | - | else | |
492 | - | let | |
493 | - | then ( | |
489 | + | else H | |
490 | + | let P = if (if ((height > ((o + G) + t))) | |
491 | + | then (C > 0) | |
494 | 492 | else false) | |
495 | 493 | then height | |
496 | - | else | |
497 | - | if ((100000000 > | |
494 | + | else o | |
495 | + | if ((100000000 > R)) | |
498 | 496 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
499 | 497 | else { | |
500 | - | let | |
498 | + | let am = if ((l == 0)) | |
501 | 499 | then 10000 | |
502 | - | else if (( | |
503 | - | then ((10000 * | |
504 | - | else (10000 * (1 + ( | |
505 | - | let | |
506 | - | then ((100 * | |
500 | + | else if ((ag > 10)) | |
501 | + | then ((10000 * ag) * (1 + (ai / l))) | |
502 | + | else (10000 * (1 + (ai / l))) | |
503 | + | let an = if ((al > 0)) | |
504 | + | then ((100 * am) / al) | |
507 | 505 | else 0 | |
508 | - | let | |
509 | - | [IntegerEntry(V, | |
506 | + | let ao = (al + am) | |
507 | + | [IntegerEntry(U, ao), IntegerEntry(T, ai), IntegerEntry(V, ag), IntegerEntry("StakeBalance", aj), IntegerEntry("PrizeHeight", P), IntegerEntry(S, an), IntegerEntry(E, af), IntegerEntry(y, ae), StringEntry("MaxDepositer", ab), IntegerEntry("MaxDeposit", ac), IntegerEntry("MaxDepositBlock", ad), StringEntry("HighestPushAddress", O), IntegerEntry(X, ak), ScriptTransfer(d.caller, am, b)] | |
510 | 508 | } | |
511 | 509 | } | |
512 | 510 | else throw("Can deposit only StakeToken") | |
513 | 511 | } | |
514 | 512 | ||
515 | 513 | ||
516 | 514 | ||
517 | - | @Callable( | |
518 | - | func WithdrawStakedFunds ( | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | if ($isInstanceOf( | |
515 | + | @Callable(d) | |
516 | + | func WithdrawStakedFunds (ap) = { | |
517 | + | let t = (1440 * 1) | |
518 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
519 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
520 | + | let U = ((toBase58String(d.caller.bytes) + "_") + toBase58String(b)) | |
521 | + | let i = assetBalance(this, a) | |
522 | + | let J = { | |
523 | + | let g = getInteger(this, E) | |
524 | + | if ($isInstanceOf(g, "Int")) | |
527 | 525 | then { | |
528 | - | let i = h | |
529 | - | i | |
526 | + | let h = g | |
527 | + | h | |
528 | + | } | |
529 | + | else 0 | |
530 | + | } | |
531 | + | let l = { | |
532 | + | let g = getInteger(this, "StakeBalance") | |
533 | + | if ($isInstanceOf(g, "Int")) | |
534 | + | then { | |
535 | + | let h = g | |
536 | + | h | |
530 | 537 | } | |
531 | 538 | else 0 | |
532 | 539 | } | |
533 | 540 | let m = { | |
534 | - | let | |
535 | - | if ($isInstanceOf( | |
541 | + | let g = getInteger(this, "FundBox") | |
542 | + | if ($isInstanceOf(g, "Int")) | |
536 | 543 | then { | |
537 | - | let | |
538 | - | | |
544 | + | let h = g | |
545 | + | h | |
539 | 546 | } | |
540 | 547 | else 0 | |
541 | 548 | } | |
542 | 549 | let n = { | |
543 | - | let | |
544 | - | if ($isInstanceOf( | |
550 | + | let g = getInteger(this, "PrizeHeight") | |
551 | + | if ($isInstanceOf(g, "Int")) | |
545 | 552 | then { | |
546 | - | let | |
547 | - | | |
553 | + | let h = g | |
554 | + | h | |
548 | 555 | } | |
549 | 556 | else 0 | |
550 | 557 | } | |
551 | - | let | |
552 | - | let | |
553 | - | if ($isInstanceOf( | |
558 | + | let G = { | |
559 | + | let g = getInteger(this, "Delay") | |
560 | + | if ($isInstanceOf(g, "Int")) | |
554 | 561 | then { | |
555 | - | let i = h | |
556 | - | i | |
562 | + | let h = g | |
563 | + | h | |
564 | + | } | |
565 | + | else 0 | |
566 | + | } | |
567 | + | let C = { | |
568 | + | let g = getInteger(this, "HighestPush") | |
569 | + | if ($isInstanceOf(g, "Int")) | |
570 | + | then { | |
571 | + | let h = g | |
572 | + | h | |
573 | + | } | |
574 | + | else 0 | |
575 | + | } | |
576 | + | let o = if (if ((n == 0)) | |
577 | + | then (m == 0) | |
578 | + | else false) | |
579 | + | then 0 | |
580 | + | else if (if ((n == 0)) | |
581 | + | then (m != 0) | |
582 | + | else false) | |
583 | + | then height | |
584 | + | else if (if ((n != 0)) | |
585 | + | then (m != 0) | |
586 | + | else false) | |
587 | + | then n | |
588 | + | else 0 | |
589 | + | let H = { | |
590 | + | let g = getString(this, "HighestPushAddress") | |
591 | + | if ($isInstanceOf(g, "String")) | |
592 | + | then { | |
593 | + | let h = g | |
594 | + | h | |
595 | + | } | |
596 | + | else "" | |
597 | + | } | |
598 | + | let O = if (if ((height > ((o + G) + t))) | |
599 | + | then (C > 0) | |
600 | + | else false) | |
601 | + | then "" | |
602 | + | else H | |
603 | + | let P = if (if ((height > ((o + G) + t))) | |
604 | + | then (C > 0) | |
605 | + | else false) | |
606 | + | then height | |
607 | + | else o | |
608 | + | let e = toBase58String(d.caller.bytes) | |
609 | + | let aq = { | |
610 | + | let g = getInteger(this, T) | |
611 | + | if ($isInstanceOf(g, "Int")) | |
612 | + | then { | |
613 | + | let h = g | |
614 | + | h | |
615 | + | } | |
616 | + | else 0 | |
617 | + | } | |
618 | + | let p = (aq - ap) | |
619 | + | let aj = (l - ap) | |
620 | + | let af = if ((aj == 0)) | |
621 | + | then 0 | |
622 | + | else J | |
623 | + | if ((0 > ap)) | |
624 | + | then throw("Can't withdraw negative amount") | |
625 | + | else if ((0 > p)) | |
626 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((aq / 100000000)))) | |
627 | + | else if ((100000000 > assetBalance(this, b))) | |
628 | + | then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, b) / 100000000)))) | |
629 | + | else [IntegerEntry(U, 100000000), IntegerEntry(T, p), IntegerEntry("StakeBalance", aj), IntegerEntry("PrizeHeight", P), IntegerEntry(E, af), StringEntry("HighestPushAddress", O), ScriptTransfer(d.caller, 100000000, b), ScriptTransfer(d.caller, ap, a)] | |
630 | + | } | |
631 | + | ||
632 | + | ||
633 | + | ||
634 | + | @Callable(d) | |
635 | + | func WithdrawBigStakeReward () = { | |
636 | + | let t = (1440 * 1) | |
637 | + | let ar = (toBase58String(d.caller.bytes) + "_LastBigStakerRewardBlock") | |
638 | + | let as = (toBase58String(d.caller.bytes) + "_BigStaker") | |
639 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
640 | + | let at = 10 | |
641 | + | let au = { | |
642 | + | let g = getInteger(this, U) | |
643 | + | if ($isInstanceOf(g, "Int")) | |
644 | + | then { | |
645 | + | let h = g | |
646 | + | h | |
647 | + | } | |
648 | + | else 0 | |
649 | + | } | |
650 | + | let av = { | |
651 | + | let g = getInteger(this, ar) | |
652 | + | if ($isInstanceOf(g, "Int")) | |
653 | + | then { | |
654 | + | let h = g | |
655 | + | h | |
656 | + | } | |
657 | + | else 0 | |
658 | + | } | |
659 | + | let aw = { | |
660 | + | let g = getInteger(this, "BigStakerRewardTotal") | |
661 | + | if ($isInstanceOf(g, "Int")) | |
662 | + | then { | |
663 | + | let h = g | |
664 | + | h | |
665 | + | } | |
666 | + | else 0 | |
667 | + | } | |
668 | + | let m = { | |
669 | + | let g = getInteger(this, "FundBox") | |
670 | + | if ($isInstanceOf(g, "Int")) | |
671 | + | then { | |
672 | + | let h = g | |
673 | + | h | |
674 | + | } | |
675 | + | else 0 | |
676 | + | } | |
677 | + | let n = { | |
678 | + | let g = getInteger(this, "PrizeHeight") | |
679 | + | if ($isInstanceOf(g, "Int")) | |
680 | + | then { | |
681 | + | let h = g | |
682 | + | h | |
683 | + | } | |
684 | + | else 0 | |
685 | + | } | |
686 | + | let o = if (if ((n == 0)) | |
687 | + | then (m == 0) | |
688 | + | else false) | |
689 | + | then 0 | |
690 | + | else if (if ((n == 0)) | |
691 | + | then (m != 0) | |
692 | + | else false) | |
693 | + | then height | |
694 | + | else if (if ((n != 0)) | |
695 | + | then (m != 0) | |
696 | + | else false) | |
697 | + | then n | |
698 | + | else 0 | |
699 | + | let G = { | |
700 | + | let g = getInteger(this, "Delay") | |
701 | + | if ($isInstanceOf(g, "Int")) | |
702 | + | then { | |
703 | + | let h = g | |
704 | + | h | |
705 | + | } | |
706 | + | else 0 | |
707 | + | } | |
708 | + | let C = { | |
709 | + | let g = getInteger(this, "HighestPush") | |
710 | + | if ($isInstanceOf(g, "Int")) | |
711 | + | then { | |
712 | + | let h = g | |
713 | + | h | |
557 | 714 | } | |
558 | 715 | else 0 | |
559 | 716 | } | |
560 | 717 | let H = { | |
561 | - | let | |
562 | - | if ($isInstanceOf( | |
718 | + | let g = getString(this, "HighestPushAddress") | |
719 | + | if ($isInstanceOf(g, "String")) | |
563 | 720 | then { | |
564 | - | let i = h | |
565 | - | i | |
721 | + | let h = g | |
722 | + | h | |
723 | + | } | |
724 | + | else "" | |
725 | + | } | |
726 | + | let O = if (if ((height > ((o + G) + t))) | |
727 | + | then (C > 0) | |
728 | + | else false) | |
729 | + | then "" | |
730 | + | else H | |
731 | + | let P = if (if ((height > ((o + G) + t))) | |
732 | + | then (C > 0) | |
733 | + | else false) | |
734 | + | then height | |
735 | + | else o | |
736 | + | let e = toBase58String(d.caller.bytes) | |
737 | + | let ap = { | |
738 | + | let g = getInteger(this, as) | |
739 | + | if ($isInstanceOf(g, "Int")) | |
740 | + | then { | |
741 | + | let h = g | |
742 | + | h | |
566 | 743 | } | |
567 | 744 | else 0 | |
568 | 745 | } | |
569 | - | let D = { | |
570 | - | let h = getInteger(this, "HighestPush") | |
571 | - | if ($isInstanceOf(h, "Int")) | |
572 | - | then { | |
573 | - | let i = h | |
574 | - | i | |
575 | - | } | |
576 | - | else 0 | |
577 | - | } | |
578 | - | let p = if (if ((o == 0)) | |
579 | - | then (n == 0) | |
580 | - | else false) | |
581 | - | then 0 | |
582 | - | else if (if ((o == 0)) | |
583 | - | then (n != 0) | |
584 | - | else false) | |
585 | - | then height | |
586 | - | else if (if ((o != 0)) | |
587 | - | then (n != 0) | |
588 | - | else false) | |
589 | - | then o | |
590 | - | else 0 | |
591 | - | let I = { | |
592 | - | let h = getString(this, "HighestPushAddress") | |
593 | - | if ($isInstanceOf(h, "String")) | |
594 | - | then { | |
595 | - | let i = h | |
596 | - | i | |
597 | - | } | |
598 | - | else "" | |
599 | - | } | |
600 | - | let P = if (if ((height > ((p + H) + u))) | |
601 | - | then (D > 0) | |
602 | - | else false) | |
603 | - | then "" | |
604 | - | else I | |
605 | - | let Q = if (if ((height > ((p + H) + u))) | |
606 | - | then (D > 0) | |
607 | - | else false) | |
608 | - | then height | |
609 | - | else p | |
610 | - | let f = toBase58String(e.caller.bytes) | |
611 | - | let ar = { | |
612 | - | let h = getInteger(this, U) | |
613 | - | if ($isInstanceOf(h, "Int")) | |
614 | - | then { | |
615 | - | let i = h | |
616 | - | i | |
617 | - | } | |
618 | - | else 0 | |
619 | - | } | |
620 | - | let q = (ar - aq) | |
621 | - | let ak = (m - aq) | |
622 | - | let ag = if ((ak == 0)) | |
623 | - | then 0 | |
624 | - | else K | |
625 | - | if ((0 > aq)) | |
626 | - | then throw("Can't withdraw negative amount") | |
627 | - | else if ((0 > q)) | |
628 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((ar / 100000000)))) | |
629 | - | else if ((100000000 > assetBalance(this, b))) | |
630 | - | then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, b) / 100000000)))) | |
631 | - | else [IntegerEntry(V, 100000000), IntegerEntry(U, q), IntegerEntry("StakeBalance", ak), IntegerEntry("PrizeHeight", Q), IntegerEntry(F, ag), StringEntry("HighestPushAddress", P), ScriptTransfer(e.caller, 100000000, b), ScriptTransfer(e.caller, aq, a)] | |
632 | - | } | |
633 | - | ||
634 | - | ||
635 | - | ||
636 | - | @Callable(e) | |
637 | - | func WithdrawBigStakeReward () = { | |
638 | - | let u = (1440 * 1) | |
639 | - | let as = (toBase58String(e.caller.bytes) + "_LastBigStakerRewardBlock") | |
640 | - | let at = (toBase58String(e.caller.bytes) + "_BigStaker") | |
641 | - | let V = (toBase58String(e.caller.bytes) + "_Earnings") | |
642 | - | let au = 10 | |
643 | - | let av = { | |
644 | - | let h = getInteger(this, V) | |
645 | - | if ($isInstanceOf(h, "Int")) | |
646 | - | then { | |
647 | - | let i = h | |
648 | - | i | |
649 | - | } | |
650 | - | else 0 | |
651 | - | } | |
652 | - | let aw = { | |
653 | - | let h = getInteger(this, as) | |
654 | - | if ($isInstanceOf(h, "Int")) | |
655 | - | then { | |
656 | - | let i = h | |
657 | - | i | |
658 | - | } | |
659 | - | else 0 | |
660 | - | } | |
661 | - | let ax = { | |
662 | - | let h = getInteger(this, "BigStakerRewardTotal") | |
663 | - | if ($isInstanceOf(h, "Int")) | |
664 | - | then { | |
665 | - | let i = h | |
666 | - | i | |
667 | - | } | |
668 | - | else 0 | |
669 | - | } | |
670 | - | let n = { | |
671 | - | let h = getInteger(this, "FundBox") | |
672 | - | if ($isInstanceOf(h, "Int")) | |
673 | - | then { | |
674 | - | let i = h | |
675 | - | i | |
676 | - | } | |
677 | - | else 0 | |
678 | - | } | |
679 | - | let o = { | |
680 | - | let h = getInteger(this, "PrizeHeight") | |
681 | - | if ($isInstanceOf(h, "Int")) | |
682 | - | then { | |
683 | - | let i = h | |
684 | - | i | |
685 | - | } | |
686 | - | else 0 | |
687 | - | } | |
688 | - | let p = if (if ((o == 0)) | |
689 | - | then (n == 0) | |
690 | - | else false) | |
691 | - | then 0 | |
692 | - | else if (if ((o == 0)) | |
693 | - | then (n != 0) | |
694 | - | else false) | |
695 | - | then height | |
696 | - | else if (if ((o != 0)) | |
697 | - | then (n != 0) | |
698 | - | else false) | |
699 | - | then o | |
700 | - | else 0 | |
701 | - | let H = { | |
702 | - | let h = getInteger(this, "Delay") | |
703 | - | if ($isInstanceOf(h, "Int")) | |
704 | - | then { | |
705 | - | let i = h | |
706 | - | i | |
707 | - | } | |
708 | - | else 0 | |
709 | - | } | |
710 | - | let D = { | |
711 | - | let h = getInteger(this, "HighestPush") | |
712 | - | if ($isInstanceOf(h, "Int")) | |
713 | - | then { | |
714 | - | let i = h | |
715 | - | i | |
716 | - | } | |
717 | - | else 0 | |
718 | - | } | |
719 | - | let I = { | |
720 | - | let h = getString(this, "HighestPushAddress") | |
721 | - | if ($isInstanceOf(h, "String")) | |
722 | - | then { | |
723 | - | let i = h | |
724 | - | i | |
725 | - | } | |
726 | - | else "" | |
727 | - | } | |
728 | - | let P = if (if ((height > ((p + H) + u))) | |
729 | - | then (D > 0) | |
730 | - | else false) | |
731 | - | then "" | |
732 | - | else I | |
733 | - | let Q = if (if ((height > ((p + H) + u))) | |
734 | - | then (D > 0) | |
735 | - | else false) | |
736 | - | then height | |
737 | - | else p | |
738 | - | let f = toBase58String(e.caller.bytes) | |
739 | - | let aq = { | |
740 | - | let h = getInteger(this, at) | |
741 | - | if ($isInstanceOf(h, "Int")) | |
742 | - | then { | |
743 | - | let i = h | |
744 | - | i | |
745 | - | } | |
746 | - | else 0 | |
747 | - | } | |
748 | - | let ak = (ax - aq) | |
749 | - | let ay = if ((0 > ((av / 1000) * (1000 - ((1000 * (height - aw)) / (au * 1440)))))) | |
746 | + | let aj = (aw - ap) | |
747 | + | let ax = if ((0 > ((au / 1000) * (1000 - ((1000 * (height - av)) / (at * 1440)))))) | |
750 | 748 | then (1000 * 100000000) | |
751 | - | else (( | |
752 | - | if ((0 > | |
753 | - | then throw(((("Can't withdraw negative amount " + toString(( | |
754 | - | else if (if (if (((1000 * 100000000) > | |
749 | + | else ((au / 1000) * (1000 - ((1000 * (height - av)) / (at * 1440)))) | |
750 | + | if ((0 > ap)) | |
751 | + | then throw(((("Can't withdraw negative amount " + toString((au - (1000 * 100000000)))) + " ... ") + toString(ap))) | |
752 | + | else if (if (if (((1000 * 100000000) > au)) | |
755 | 753 | then true | |
756 | - | else (1 > | |
754 | + | else (1 > ap)) | |
757 | 755 | then true | |
758 | - | else (0 > ( | |
759 | - | then throw(("No ASIMI reward available, or Not enough Earned Troikan Tokens to do transaction, you have: " + toString(( | |
760 | - | else if (( | |
761 | - | then [IntegerEntry( | |
756 | + | else (0 > (au - ax))) | |
757 | + | then throw(("No ASIMI reward available, or Not enough Earned Troikan Tokens to do transaction, you have: " + toString((au / 100000000)))) | |
758 | + | else if ((aj > 0)) | |
759 | + | then [IntegerEntry(as, 0), IntegerEntry("BigStakerRewardTotal", aj), IntegerEntry(U, (au - ax)), IntegerEntry("PrizeHeight", o), IntegerEntry(ar, height), StringEntry("HighestPushAddress", O), ScriptTransfer(d.caller, ap, a)] | |
762 | 760 | else throw("Balance Error, Total Big Stakers cannot be negative, Operation won't be authorized") | |
763 | 761 | } | |
764 | 762 | ||
765 | 763 | ||
766 | 764 | ||
767 | - | @Callable(e) | |
768 | - | func HarvestGovernToiken (aq) = { | |
769 | - | let j = assetBalance(this, a) | |
770 | - | let V = (toBase58String(e.caller.bytes) + "_Earnings") | |
765 | + | @Callable(d) | |
766 | + | func HarvestGovernToiken (ap) = { | |
767 | + | let i = assetBalance(this, a) | |
768 | + | let U = (toBase58String(d.caller.bytes) + "_Earnings") | |
769 | + | let l = { | |
770 | + | let g = getInteger(this, "StakeBalance") | |
771 | + | if ($isInstanceOf(g, "Int")) | |
772 | + | then { | |
773 | + | let h = g | |
774 | + | h | |
775 | + | } | |
776 | + | else 0 | |
777 | + | } | |
771 | 778 | let m = { | |
772 | - | let | |
773 | - | if ($isInstanceOf( | |
779 | + | let g = getInteger(this, "FundBox") | |
780 | + | if ($isInstanceOf(g, "Int")) | |
774 | 781 | then { | |
775 | - | let | |
776 | - | | |
782 | + | let h = g | |
783 | + | h | |
777 | 784 | } | |
778 | 785 | else 0 | |
779 | 786 | } | |
780 | 787 | let n = { | |
781 | - | let | |
782 | - | if ($isInstanceOf( | |
788 | + | let g = getInteger(this, "PrizeHeight") | |
789 | + | if ($isInstanceOf(g, "Int")) | |
783 | 790 | then { | |
784 | - | let | |
785 | - | | |
791 | + | let h = g | |
792 | + | h | |
786 | 793 | } | |
787 | 794 | else 0 | |
788 | 795 | } | |
789 | - | let o = { | |
790 | - | let h = getInteger(this, "PrizeHeight") | |
791 | - | if ($isInstanceOf(h, "Int")) | |
796 | + | let o = if (if ((n == 0)) | |
797 | + | then (m == 0) | |
798 | + | else false) | |
799 | + | then 0 | |
800 | + | else if (if ((n == 0)) | |
801 | + | then (m != 0) | |
802 | + | else false) | |
803 | + | then height | |
804 | + | else if (if ((n != 0)) | |
805 | + | then (m != 0) | |
806 | + | else false) | |
807 | + | then n | |
808 | + | else 0 | |
809 | + | let e = toBase58String(d.caller.bytes) | |
810 | + | let aq = { | |
811 | + | let g = getInteger(this, U) | |
812 | + | if ($isInstanceOf(g, "Int")) | |
792 | 813 | then { | |
793 | - | let | |
794 | - | | |
814 | + | let h = g | |
815 | + | h | |
795 | 816 | } | |
796 | 817 | else 0 | |
797 | 818 | } | |
798 | - | let p = if (if ((o == 0)) | |
799 | - | then (n == 0) | |
800 | - | else false) | |
801 | - | then 0 | |
802 | - | else if (if ((o == 0)) | |
803 | - | then (n != 0) | |
804 | - | else false) | |
805 | - | then height | |
806 | - | else if (if ((o != 0)) | |
807 | - | then (n != 0) | |
808 | - | else false) | |
809 | - | then o | |
810 | - | else 0 | |
811 | - | let f = toBase58String(e.caller.bytes) | |
812 | - | let ar = { | |
813 | - | let h = getInteger(this, V) | |
814 | - | if ($isInstanceOf(h, "Int")) | |
815 | - | then { | |
816 | - | let i = h | |
817 | - | i | |
818 | - | } | |
819 | - | else 0 | |
820 | - | } | |
821 | - | let q = (ar - aq) | |
822 | - | if ((0 > aq)) | |
819 | + | let p = (aq - ap) | |
820 | + | if ((0 > ap)) | |
823 | 821 | then throw("Can't withdraw negative amount") | |
824 | - | else if ((0 > | |
825 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(( | |
826 | - | else [IntegerEntry( | |
822 | + | else if ((0 > p)) | |
823 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((aq / 100000000)))) | |
824 | + | else [IntegerEntry(U, p), IntegerEntry("PrizeHeight", o), ScriptTransfer(d.caller, ap, b)] | |
827 | 825 | } | |
828 | 826 | ||
829 | 827 | ||
830 | 828 | ||
831 | - | @Callable( | |
829 | + | @Callable(d) | |
832 | 830 | func delayprize () = { | |
833 | - | let az = (1440 * 1) | |
834 | - | let u = (1440 * 1) | |
835 | - | let V = ((toBase58String(e.caller.bytes) + "_") + toBase58String(b)) | |
836 | - | let aA = assetBalance(Address(e.caller.bytes), b) | |
837 | - | let j = assetBalance(this, a) | |
831 | + | let ay = (1440 * 1) | |
832 | + | let t = (1440 * 1) | |
833 | + | let U = ((toBase58String(d.caller.bytes) + "_") + toBase58String(b)) | |
834 | + | let az = assetBalance(Address(d.caller.bytes), b) | |
835 | + | let i = assetBalance(this, a) | |
836 | + | let l = { | |
837 | + | let g = getInteger(this, "StakeBalance") | |
838 | + | if ($isInstanceOf(g, "Int")) | |
839 | + | then { | |
840 | + | let h = g | |
841 | + | h | |
842 | + | } | |
843 | + | else 0 | |
844 | + | } | |
838 | 845 | let m = { | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
846 | + | let g = getInteger(this, "FundBox") | |
847 | + | if ($isInstanceOf(g, "Int")) | |
841 | 848 | then { | |
842 | - | let | |
843 | - | | |
849 | + | let h = g | |
850 | + | h | |
844 | 851 | } | |
845 | 852 | else 0 | |
846 | 853 | } | |
847 | 854 | let n = { | |
848 | - | let | |
849 | - | if ($isInstanceOf( | |
855 | + | let g = getInteger(this, "PrizeHeight") | |
856 | + | if ($isInstanceOf(g, "Int")) | |
850 | 857 | then { | |
851 | - | let | |
852 | - | | |
858 | + | let h = g | |
859 | + | h | |
853 | 860 | } | |
854 | 861 | else 0 | |
855 | 862 | } | |
856 | - | let | |
857 | - | let | |
858 | - | if ($isInstanceOf( | |
863 | + | let G = { | |
864 | + | let g = getInteger(this, "Delay") | |
865 | + | if ($isInstanceOf(g, "Int")) | |
859 | 866 | then { | |
860 | - | let i = h | |
861 | - | i | |
867 | + | let h = g | |
868 | + | h | |
869 | + | } | |
870 | + | else 0 | |
871 | + | } | |
872 | + | let o = if (if ((n == 0)) | |
873 | + | then (m == 0) | |
874 | + | else false) | |
875 | + | then 0 | |
876 | + | else if (if ((n == 0)) | |
877 | + | then (m != 0) | |
878 | + | else false) | |
879 | + | then height | |
880 | + | else if (if ((n != 0)) | |
881 | + | then (m != 0) | |
882 | + | else false) | |
883 | + | then n | |
884 | + | else 0 | |
885 | + | let C = { | |
886 | + | let g = getInteger(this, "HighestPush") | |
887 | + | if ($isInstanceOf(g, "Int")) | |
888 | + | then { | |
889 | + | let h = g | |
890 | + | h | |
862 | 891 | } | |
863 | 892 | else 0 | |
864 | 893 | } | |
865 | 894 | let H = { | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
895 | + | let g = getString(this, "HighestPushAddress") | |
896 | + | if ($isInstanceOf(g, "String")) | |
868 | 897 | then { | |
869 | - | let i = h | |
870 | - | i | |
898 | + | let h = g | |
899 | + | h | |
900 | + | } | |
901 | + | else "" | |
902 | + | } | |
903 | + | let O = if (if ((height > ((o + G) + t))) | |
904 | + | then (C > 0) | |
905 | + | else false) | |
906 | + | then "" | |
907 | + | else H | |
908 | + | let P = if (if ((height > ((o + G) + t))) | |
909 | + | then (C > 0) | |
910 | + | else false) | |
911 | + | then height | |
912 | + | else o | |
913 | + | let aA = { | |
914 | + | let g = getInteger(this, "DelayCost") | |
915 | + | if ($isInstanceOf(g, "Int")) | |
916 | + | then { | |
917 | + | let h = g | |
918 | + | h | |
919 | + | } | |
920 | + | else 10 | |
921 | + | } | |
922 | + | let x = if ((size(d.payments) == 1)) | |
923 | + | then d.payments[0] | |
924 | + | else throw("Attached payment is required") | |
925 | + | let L = { | |
926 | + | let g = getInteger(this, "DevBox") | |
927 | + | if ($isInstanceOf(g, "Int")) | |
928 | + | then { | |
929 | + | let h = g | |
930 | + | h | |
871 | 931 | } | |
872 | 932 | else 0 | |
873 | 933 | } | |
874 | - | | |
875 | - | then ( | |
934 | + | if (if (isDefined(x.assetId)) | |
935 | + | then (x.assetId == b) | |
876 | 936 | else false) | |
877 | - | then 0 | |
878 | - | else if (if ((o == 0)) | |
879 | - | then (n != 0) | |
880 | - | else false) | |
881 | - | then height | |
882 | - | else if (if ((o != 0)) | |
883 | - | then (n != 0) | |
884 | - | else false) | |
885 | - | then o | |
886 | - | else 0 | |
887 | - | let D = { | |
888 | - | let h = getInteger(this, "HighestPush") | |
889 | - | if ($isInstanceOf(h, "Int")) | |
937 | + | then if ((m > 0)) | |
890 | 938 | then { | |
891 | - | let i = h | |
892 | - | i | |
893 | - | } | |
894 | - | else 0 | |
895 | - | } | |
896 | - | let I = { | |
897 | - | let h = getString(this, "HighestPushAddress") | |
898 | - | if ($isInstanceOf(h, "String")) | |
899 | - | then { | |
900 | - | let i = h | |
901 | - | i | |
902 | - | } | |
903 | - | else "" | |
904 | - | } | |
905 | - | let P = if (if ((height > ((p + H) + u))) | |
906 | - | then (D > 0) | |
907 | - | else false) | |
908 | - | then "" | |
909 | - | else I | |
910 | - | let Q = if (if ((height > ((p + H) + u))) | |
911 | - | then (D > 0) | |
912 | - | else false) | |
913 | - | then height | |
914 | - | else p | |
915 | - | let aB = { | |
916 | - | let h = getInteger(this, "DelayCost") | |
917 | - | if ($isInstanceOf(h, "Int")) | |
918 | - | then { | |
919 | - | let i = h | |
920 | - | i | |
921 | - | } | |
922 | - | else 10 | |
923 | - | } | |
924 | - | let y = if ((size(e.payments) == 1)) | |
925 | - | then e.payments[0] | |
926 | - | else throw("Attached payment is required") | |
927 | - | let M = { | |
928 | - | let h = getInteger(this, "DevBox") | |
929 | - | if ($isInstanceOf(h, "Int")) | |
930 | - | then { | |
931 | - | let i = h | |
932 | - | i | |
933 | - | } | |
934 | - | else 0 | |
935 | - | } | |
936 | - | if (if (isDefined(y.assetId)) | |
937 | - | then (y.assetId == b) | |
938 | - | else false) | |
939 | - | then if ((n > 0)) | |
940 | - | then { | |
941 | - | let av = y.amount | |
942 | - | let g = (M + ((y.amount * 5) / 1000)) | |
943 | - | let aC = if ((aB == 0)) | |
939 | + | let au = x.amount | |
940 | + | let f = (L + ((x.amount * 5) / 1000)) | |
941 | + | let aB = if ((aA == 0)) | |
944 | 942 | then 1000000000 | |
945 | - | else (2 * | |
946 | - | if (( | |
943 | + | else (2 * aA) | |
944 | + | if ((au >= aB)) | |
947 | 945 | then { | |
948 | - | let | |
949 | - | [IntegerEntry("Delay", | |
946 | + | let N = (G + ay) | |
947 | + | [IntegerEntry("Delay", N), IntegerEntry("DelayCost", aB), IntegerEntry("PrizeHeight", P), IntegerEntry("DevBox", f), StringEntry("HighestPushAddress", O)] | |
950 | 948 | } | |
951 | - | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString( | |
949 | + | else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(aB)) + "TROIKAs")) | |
952 | 950 | } | |
953 | 951 | else throw("You cannot delay the reward before reward is received! Please wait until a reward is available") | |
954 | 952 | else throw("Can Use only Troika Token to Delay Reward") | |
955 | 953 | } | |
956 | 954 | ||
957 | 955 | ||
958 | 956 | ||
959 | - | @Callable( | |
957 | + | @Callable(d) | |
960 | 958 | func ClaimPrize () = { | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | if ($isInstanceOf( | |
959 | + | let T = (toBase58String(d.caller.bytes) + "_Staking") | |
960 | + | let y = (toBase58String(d.caller.bytes) + "_Push") | |
961 | + | let E = (toBase58String(d.caller.bytes) + "_UserLastStakeBlock") | |
962 | + | let r = (1440 * 7) | |
963 | + | let u = 3 | |
964 | + | let aC = assetBalance(this, b) | |
965 | + | let i = assetBalance(this, a) | |
966 | + | let l = { | |
967 | + | let g = getInteger(this, "StakeBalance") | |
968 | + | if ($isInstanceOf(g, "Int")) | |
971 | 969 | then { | |
972 | - | let | |
973 | - | | |
970 | + | let h = g | |
971 | + | h | |
974 | 972 | } | |
975 | 973 | else 0 | |
976 | 974 | } | |
977 | - | let | |
978 | - | let | |
979 | - | if ($isInstanceOf( | |
975 | + | let m = { | |
976 | + | let g = getInteger(this, "FundBox") | |
977 | + | if ($isInstanceOf(g, "Int")) | |
980 | 978 | then { | |
981 | - | let | |
982 | - | | |
979 | + | let h = g | |
980 | + | h | |
983 | 981 | } | |
984 | 982 | else 0 | |
985 | 983 | } | |
986 | - | let | |
987 | - | let | |
988 | - | if ($isInstanceOf( | |
984 | + | let ae = { | |
985 | + | let g = getInteger(this, y) | |
986 | + | if ($isInstanceOf(g, "Int")) | |
989 | 987 | then { | |
990 | - | let | |
991 | - | | |
988 | + | let h = g | |
989 | + | h | |
992 | 990 | } | |
993 | 991 | else 0 | |
994 | 992 | } | |
995 | - | let | |
996 | - | let | |
997 | - | if ($isInstanceOf( | |
993 | + | let J = { | |
994 | + | let g = getInteger(this, E) | |
995 | + | if ($isInstanceOf(g, "Int")) | |
998 | 996 | then { | |
999 | - | let i = h | |
1000 | - | i | |
997 | + | let h = g | |
998 | + | h | |
999 | + | } | |
1000 | + | else 0 | |
1001 | + | } | |
1002 | + | let aD = { | |
1003 | + | let g = getInteger(this, T) | |
1004 | + | if ($isInstanceOf(g, "Int")) | |
1005 | + | then { | |
1006 | + | let h = g | |
1007 | + | h | |
1008 | + | } | |
1009 | + | else 0 | |
1010 | + | } | |
1011 | + | let G = { | |
1012 | + | let g = getInteger(this, "Delay") | |
1013 | + | if ($isInstanceOf(g, "Int")) | |
1014 | + | then { | |
1015 | + | let h = g | |
1016 | + | h | |
1001 | 1017 | } | |
1002 | 1018 | else 0 | |
1003 | 1019 | } | |
1004 | 1020 | let aE = { | |
1005 | - | let | |
1006 | - | if ($isInstanceOf( | |
1021 | + | let g = getString(this, "HighestPushAddress") | |
1022 | + | if ($isInstanceOf(g, "String")) | |
1007 | 1023 | then { | |
1008 | - | let i = h | |
1009 | - | i | |
1024 | + | let h = g | |
1025 | + | h | |
1026 | + | } | |
1027 | + | else "" | |
1028 | + | } | |
1029 | + | let aF = { | |
1030 | + | let g = getInteger(this, "PrizeHeight") | |
1031 | + | if ($isInstanceOf(g, "Int")) | |
1032 | + | then { | |
1033 | + | let h = g | |
1034 | + | h | |
1010 | 1035 | } | |
1011 | 1036 | else 0 | |
1012 | 1037 | } | |
1013 | - | let | |
1014 | - | let | |
1015 | - | if ($isInstanceOf( | |
1038 | + | let C = { | |
1039 | + | let g = getInteger(this, "HighestPush") | |
1040 | + | if ($isInstanceOf(g, "Int")) | |
1016 | 1041 | then { | |
1017 | - | let | |
1018 | - | | |
1042 | + | let h = g | |
1043 | + | h | |
1019 | 1044 | } | |
1020 | 1045 | else 0 | |
1021 | 1046 | } | |
1022 | - | let aF = { | |
1023 | - | let h = getString(this, "HighestPushAddress") | |
1024 | - | if ($isInstanceOf(h, "String")) | |
1047 | + | let A = (toBase58String(d.caller.bytes) + "_refs") | |
1048 | + | let B = { | |
1049 | + | let g = getInteger(this, A) | |
1050 | + | if ($isInstanceOf(g, "Int")) | |
1025 | 1051 | then { | |
1026 | - | let i = h | |
1027 | - | i | |
1028 | - | } | |
1029 | - | else "" | |
1030 | - | } | |
1031 | - | let aG = { | |
1032 | - | let h = getInteger(this, "PrizeHeight") | |
1033 | - | if ($isInstanceOf(h, "Int")) | |
1034 | - | then { | |
1035 | - | let i = h | |
1036 | - | i | |
1052 | + | let h = g | |
1053 | + | h | |
1037 | 1054 | } | |
1038 | 1055 | else 0 | |
1039 | 1056 | } | |
1040 | - | let D = { | |
1041 | - | let h = getInteger(this, "HighestPush") | |
1042 | - | if ($isInstanceOf(h, "Int")) | |
1043 | - | then { | |
1044 | - | let i = h | |
1045 | - | i | |
1046 | - | } | |
1047 | - | else 0 | |
1048 | - | } | |
1049 | - | let B = (toBase58String(e.caller.bytes) + "_refs") | |
1050 | - | let C = { | |
1051 | - | let h = getInteger(this, B) | |
1052 | - | if ($isInstanceOf(h, "Int")) | |
1053 | - | then { | |
1054 | - | let i = h | |
1055 | - | i | |
1056 | - | } | |
1057 | - | else 0 | |
1058 | - | } | |
1059 | - | if (if ((n == 0)) | |
1057 | + | if (if ((m == 0)) | |
1060 | 1058 | then true | |
1061 | - | else (10000000000 > | |
1059 | + | else (10000000000 > aC)) | |
1062 | 1060 | then throw("No prize to Claim or Not enough Govern Token en Contract (Min 100 Troika)") | |
1063 | - | else if ((toBase58String( | |
1061 | + | else if ((toBase58String(d.caller.bytes) != aE)) | |
1064 | 1062 | then throw("You are not the winner hence cannot claim the reward ") | |
1065 | - | else if (if ((100000000 > | |
1066 | - | then ( | |
1063 | + | else if (if ((100000000 > aD)) | |
1064 | + | then (r > J) | |
1067 | 1065 | else false) | |
1068 | 1066 | then throw("You have to Stake ASIMI Token to claim reward ") | |
1069 | - | else if (if ((height > ( | |
1070 | - | then ( | |
1067 | + | else if (if ((height > (aF + G))) | |
1068 | + | then (ae >= C) | |
1071 | 1069 | else false) | |
1072 | - | then if (( | |
1073 | - | then [IntegerEntry( | |
1074 | - | else throw((("You have to have " + toString( | |
1070 | + | then if ((B >= u)) | |
1071 | + | then [IntegerEntry(aE, m), IntegerEntry("FundBox", 0), IntegerEntry("HighestPush", 0), IntegerEntry(y, 0), StringEntry("HighestPushAddress", ""), IntegerEntry("PrizeHeight", 0), IntegerEntry("Delay", 0), IntegerEntry("DelayCost", 0), StringEntry("LastWinner", aE), IntegerEntry("LastPrize", m), ScriptTransfer(d.caller, m, a), ScriptTransfer(d.caller, 1000000000, b)] | |
1072 | + | else throw((("You have to have " + toString(u)) + " referrals already staking for a minimum of 10 days to Claim the prize")) | |
1075 | 1073 | else throw("You have to be the user with the highest Push and wait till countown is finished, to claim Reward") | |
1076 | 1074 | } | |
1077 | 1075 | ||
1078 | 1076 | ||
1079 | 1077 | ||
1080 | - | @Callable( | |
1081 | - | func Addmentor ( | |
1082 | - | let | |
1083 | - | if (( | |
1084 | - | then [StringEntry( | |
1078 | + | @Callable(d) | |
1079 | + | func Addmentor (aG) = { | |
1080 | + | let aH = (toBase58String(d.caller.bytes) + "_Mentor") | |
1081 | + | if ((aG != "")) | |
1082 | + | then [StringEntry(aH, aG)] | |
1085 | 1083 | else throw("Mentor's Address cannot be empty") | |
1086 | 1084 | } | |
1087 | 1085 | ||
1088 | 1086 | ||
1089 | 1087 | ||
1090 | - | @Callable(e) | |
1091 | - | func GetLikesPackage (aJ,aK) = { | |
1092 | - | let aL = { | |
1093 | - | let h = getInteger(this, "LikePackageTROIKANCost") | |
1094 | - | if ($isInstanceOf(h, "Int")) | |
1088 | + | @Callable(d) | |
1089 | + | func UpdateTwittsCost (aI,aJ) = if ((toBase58String(d.caller.bytes) == c)) | |
1090 | + | then [IntegerEntry("LikePackageASIMICost", aI), IntegerEntry("LikePackageTROIKANCost", aJ)] | |
1091 | + | else throw("Only available for Admin") | |
1092 | + | ||
1093 | + | ||
1094 | + | ||
1095 | + | @Callable(d) | |
1096 | + | func GetLikesPackage (aK,aL) = { | |
1097 | + | let aM = { | |
1098 | + | let g = getInteger(this, "LikePackageTROIKANCost") | |
1099 | + | if ($isInstanceOf(g, "Int")) | |
1095 | 1100 | then { | |
1096 | - | let | |
1097 | - | | |
1101 | + | let h = g | |
1102 | + | h | |
1098 | 1103 | } | |
1099 | 1104 | else 0 | |
1100 | 1105 | } | |
1101 | - | let | |
1102 | - | let | |
1103 | - | if ($isInstanceOf( | |
1106 | + | let aN = { | |
1107 | + | let g = getInteger(this, "LikePackageASIMICost") | |
1108 | + | if ($isInstanceOf(g, "Int")) | |
1104 | 1109 | then { | |
1105 | - | let | |
1106 | - | | |
1110 | + | let h = g | |
1111 | + | h | |
1107 | 1112 | } | |
1108 | 1113 | else 0 | |
1109 | 1114 | } | |
1110 | - | let | |
1111 | - | then | |
1115 | + | let x = if ((size(d.payments) == 2)) | |
1116 | + | then d.payments[0] | |
1112 | 1117 | else throw("Attached payment is required") | |
1113 | - | if (if (( | |
1114 | - | then ( | |
1118 | + | if (if ((d.payments[0].assetId == a)) | |
1119 | + | then (d.payments[1].assetId == b) | |
1115 | 1120 | else false) | |
1116 | - | then if (( | |
1117 | - | then if (( | |
1121 | + | then if ((d.payments[0].amount >= aN)) | |
1122 | + | then if ((d.payments[1].amount >= aM)) | |
1118 | 1123 | then { | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let | |
1122 | - | if ($isInstanceOf( | |
1124 | + | let aO = ((toString(aK) + "_Twitt2Like_") + toString(aL)) | |
1125 | + | let aP = { | |
1126 | + | let g = getInteger(this, aO) | |
1127 | + | if ($isInstanceOf(g, "Int")) | |
1123 | 1128 | then { | |
1124 | - | let | |
1125 | - | | |
1129 | + | let h = g | |
1130 | + | h | |
1126 | 1131 | } | |
1127 | 1132 | else 0 | |
1128 | 1133 | } | |
1129 | - | if (( | |
1130 | - | then [IntegerEntry(((toString( | |
1134 | + | if ((aP == 0)) | |
1135 | + | then [IntegerEntry(((toString(aK) + "_Twitt2Like_") + toString(aL)), ((95 * aN) / 100)), IntegerEntry("LikeTwittsDevBox", ((5 * aN) / 100))] | |
1131 | 1136 | else throw("Cannot acquire a new package, the prior like package has to be drained to be able to acquire a new one") | |
1132 | 1137 | } | |
1133 | - | else throw(("TROIKAN Amount should be :" + toString(( | |
1134 | - | else throw(("ASIMI Amount should be :" + toString(( | |
1138 | + | else throw(("TROIKAN Amount should be :" + toString((aN / 100000000)))) | |
1139 | + | else throw(("ASIMI Amount should be :" + toString((aM / 100000000)))) | |
1135 | 1140 | else throw("Payments should be both ASIMI and TROIKAN tokens") | |
1136 | 1141 | } | |
1137 | 1142 | ||
1138 | 1143 | ||
1139 | 1144 | ||
1140 | - | @Callable( | |
1141 | - | func GetMyLikedTwittsRewards ( | |
1142 | - | let | |
1143 | - | let | |
1144 | - | if ($isInstanceOf( | |
1145 | + | @Callable(d) | |
1146 | + | func GetMyLikedTwittsRewards (aQ) = { | |
1147 | + | let aR = { | |
1148 | + | let g = getInteger(this, (aQ + "_Like_Amount")) | |
1149 | + | if ($isInstanceOf(g, "Int")) | |
1145 | 1150 | then { | |
1146 | - | let | |
1147 | - | | |
1151 | + | let h = g | |
1152 | + | h | |
1148 | 1153 | } | |
1149 | 1154 | else 0 | |
1150 | 1155 | } | |
1151 | - | let | |
1152 | - | let | |
1153 | - | if ($isInstanceOf( | |
1156 | + | let aS = { | |
1157 | + | let g = getInteger(this, (aQ + "_TroikandApp_RT_Amount")) | |
1158 | + | if ($isInstanceOf(g, "Int")) | |
1154 | 1159 | then { | |
1155 | - | let | |
1156 | - | | |
1160 | + | let h = g | |
1161 | + | h | |
1157 | 1162 | } | |
1158 | 1163 | else 0 | |
1159 | 1164 | } | |
1160 | - | if (if (( | |
1161 | - | then ( | |
1165 | + | if (if ((aR >= (1 * 100000000))) | |
1166 | + | then (aS >= (1 * 100000000)) | |
1162 | 1167 | else false) | |
1163 | - | then [IntegerEntry(( | |
1168 | + | then [IntegerEntry((aQ + "_TroikandApp_RT_Amount"), 0), IntegerEntry((aQ + "_Like_Amount"), 0), ScriptTransfer(d.caller, aR, a), ScriptTransfer(d.caller, aS, b)] | |
1164 | 1169 | else throw("Minimum earnings to withdraw are: 100 ASIMI and 50 Troikans") | |
1165 | 1170 | } | |
1166 | 1171 | ||
1167 | 1172 | ||
1168 | 1173 | ||
1169 | - | @Callable( | |
1170 | - | func LinkTwitterAcc2Wallet ( | |
1171 | - | let | |
1172 | - | let | |
1173 | - | if ($isInstanceOf( | |
1174 | + | @Callable(d) | |
1175 | + | func LinkTwitterAcc2Wallet (aK) = { | |
1176 | + | let aT = { | |
1177 | + | let g = getString(this, (aK + "_Wallet")) | |
1178 | + | if ($isInstanceOf(g, "String")) | |
1174 | 1179 | then { | |
1175 | - | let | |
1176 | - | | |
1180 | + | let h = g | |
1181 | + | h | |
1177 | 1182 | } | |
1178 | 1183 | else "None" | |
1179 | 1184 | } | |
1180 | - | if ((toBase58String( | |
1185 | + | if ((toBase58String(d.caller.bytes) == aT)) | |
1181 | 1186 | then throw("You already have your wallet linked to the Twitter account") | |
1182 | - | else if (if ((toBase58String( | |
1183 | - | then ( | |
1187 | + | else if (if ((toBase58String(d.caller.bytes) != aT)) | |
1188 | + | then (aT != "None") | |
1184 | 1189 | else false) | |
1185 | 1190 | then throw("The wallet you are using is not the linked Wallet to this Twitter account") | |
1186 | - | else [StringEntry(( | |
1191 | + | else [StringEntry((aK + "_Wallet"), toBase58String(d.caller.bytes))] | |
1187 | 1192 | } | |
1188 | 1193 | ||
1189 | 1194 |
github/deemru/w8io/873ac7e 264.40 ms ◑![]()