tx · 82Cj8gGn6xRjSWQFfZLgLStB4aAQ3HqUuJXrBLBDxNW 3N1uuiCdWD6meTjPFUwWV3dVAksPSiAidez: -0.01940000 Waves 2020.10.30 20:27 [1243662] smart account 3N1uuiCdWD6meTjPFUwWV3dVAksPSiAidez > SELF 0.00000000 Waves
{ "type": 13, "id": "82Cj8gGn6xRjSWQFfZLgLStB4aAQ3HqUuJXrBLBDxNW", "fee": 1940000, "feeAssetId": null, "timestamp": 1604078912732, "version": 2, "chainId": 84, "sender": "3N1uuiCdWD6meTjPFUwWV3dVAksPSiAidez", "senderPublicKey": "34LvvP6RLph6fuHUj1P2FBRBBwKBF1fjYz6j3mW26qtp", "proofs": [ "46TTsXUXDE6HTdbF8M19t47DGPGcHFJwpMkwCDP3Cb64PWxUD28YXbzNWAEF5Y68iWrJ33wnnb9vvGvJ1vzjPDns" ], "script": "base64:AAIDAAAAAAAAABUIARIAEgASBAoCCAESABIDCgEBEgAAAAAAAAAABgAAAAFpAQAAAAxSZWFkUG9vbERhdGEAAAAABAAAAA5Hb3Zlcm5Ub2tlbktleQIAAAAVR292ZXJuVG9rZW5NYXhEZXBvc2l0BAAAABpNYXhHb3Zlcm5Ub2tlbkRlcG9zaXRlcktleQIAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkEAAAAC1N0YWtlZFRva2VuAQAAACCOrPKFX9iyxI4BbdwwZEALQLKrVFO/ELkmmh2Y+mC8aAQAAAALR292ZXJuVG9rZW4BAAAAIMtrm7pE5/6PvpYJJCZ4VYOnbodph6rsi95jG/KBisX4BAAAABJVc2VyU3Rha2VkVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAAAV8JAAJYAAAAAQUAAAALU3Rha2VkVG9rZW4EAAAAElVzZXJHb3Zlcm5Ub2tlbktleQkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAA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AAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAOR292ZXJuVG9rZW5LZXkAAAAAAAAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAElVzZXJHb3Zlcm5Ub2tlbktleQAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALUHJpemVBbW91bnQFAAAAC1N0YWtlZFRva2VuCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAZAUAAAALR292ZXJuVG9rZW4FAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAR1lvdSBoYXZlIHRvIGRlcG9zaXQgMTAwIEdvdmVyblRva2VuIHRvIGNsYWltIFJld2FyZCAKIFlvdXIgQmFsYW5jZSBpczogCQABpAAAAAEFAAAAFVVzZXJHb3Zlcm5Ub2tlbkFtb3VudAAAAAACM/si", "height": 1243662, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 43wEtCjJvekAGdzhCADMjwnWBuRPbxXCfnKXmJpGVHE9 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(a) | |
64 | - | func Stake () = { | |
64 | + | func Stake (q,r) = { | |
65 | 65 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
66 | 66 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
67 | - | let q = extract(a.payment) | |
68 | - | if (if (isDefined(q.assetId)) | |
69 | - | then (extract(q.assetId) == d) | |
67 | + | if (if ((r > 0)) | |
68 | + | then (q == toBase58String(d)) | |
70 | 69 | else false) | |
71 | 70 | then { | |
72 | 71 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
73 | 72 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
74 | 73 | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
75 | - | let | |
74 | + | let s = { | |
76 | 75 | let j = getInteger(this, p) | |
77 | 76 | if ($isInstanceOf(j, "Int")) | |
78 | 77 | then { | |
81 | 80 | } | |
82 | 81 | else 0 | |
83 | 82 | } | |
84 | - | let | |
85 | - | let | |
83 | + | let t = (s + 1) | |
84 | + | let u = { | |
86 | 85 | let j = getInteger(this, f) | |
87 | 86 | if ($isInstanceOf(j, "Int")) | |
88 | 87 | then { | |
91 | 90 | } | |
92 | 91 | else 0 | |
93 | 92 | } | |
94 | - | let | |
95 | - | let | |
93 | + | let v = (u + r) | |
94 | + | let w = { | |
96 | 95 | let j = getInteger(this, f) | |
97 | 96 | if ($isInstanceOf(j, "Int")) | |
98 | 97 | then { | |
101 | 100 | } | |
102 | 101 | else 0 | |
103 | 102 | } | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ((1 > | |
103 | + | let x = (w + 10) | |
104 | + | let y = assetBalance(this, e) | |
105 | + | let z = assetBalance(this, d) | |
106 | + | if ((1 > y)) | |
108 | 107 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
109 | - | else if (( | |
110 | - | then ScriptResult(WriteSet([DataEntry(g, | |
111 | - | else if (( | |
108 | + | else if ((z == 0)) | |
109 | + | then ScriptResult(WriteSet([DataEntry(g, x), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, 10, e)])) | |
110 | + | else if ((t > 50)) | |
112 | 111 | then { | |
113 | - | let | |
114 | - | ScriptResult(WriteSet([DataEntry(g, | |
112 | + | let A = (w + ((10 * t) * (v / z))) | |
113 | + | ScriptResult(WriteSet([DataEntry(g, A), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, A, e)])) | |
115 | 114 | } | |
116 | 115 | else { | |
117 | - | let | |
118 | - | ScriptResult(WriteSet([DataEntry(g, | |
116 | + | let A = (w + (10 * (v / z))) | |
117 | + | ScriptResult(WriteSet([DataEntry(g, A), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, A, e)])) | |
119 | 118 | } | |
120 | 119 | } | |
121 | 120 | else throw("Can deposit only StakeToken") | |
126 | 125 | @Callable(a) | |
127 | 126 | func DepositGovernToken () = { | |
128 | 127 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
129 | - | let | |
130 | - | let | |
131 | - | if (if (isDefined( | |
132 | - | then (extract( | |
128 | + | let B = toBase58String(e) | |
129 | + | let C = extract(a.payment) | |
130 | + | if (if (isDefined(C.assetId)) | |
131 | + | then (extract(C.assetId) == e) | |
133 | 132 | else false) | |
134 | 133 | then { | |
135 | - | let | |
136 | - | let | |
137 | - | let j = getInteger(this, | |
134 | + | let D = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
135 | + | let E = { | |
136 | + | let j = getInteger(this, D) | |
138 | 137 | if ($isInstanceOf(j, "Int")) | |
139 | 138 | then { | |
140 | 139 | let k = j | |
142 | 141 | } | |
143 | 142 | else 0 | |
144 | 143 | } | |
145 | - | let | |
144 | + | let F = (E + C.amount) | |
146 | 145 | let b = "GovernTokenMaxDeposit" | |
147 | 146 | let c = "MaxGovernTokenDepositerKey" | |
148 | 147 | let i = { | |
154 | 153 | } | |
155 | 154 | else 0 | |
156 | 155 | } | |
157 | - | if (( | |
158 | - | then WriteSet([DataEntry( | |
159 | - | else WriteSet([DataEntry( | |
156 | + | if ((F > i)) | |
157 | + | then WriteSet([DataEntry(D, F), DataEntry(b, F), DataEntry(c, D)]) | |
158 | + | else WriteSet([DataEntry(D, F)]) | |
160 | 159 | } | |
161 | 160 | else throw("Can deposit only Govern Token") | |
162 | 161 | } | |
164 | 163 | ||
165 | 164 | ||
166 | 165 | @Callable(a) | |
167 | - | func WithdrawStakedFunds ( | |
166 | + | func WithdrawStakedFunds (r) = { | |
168 | 167 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
169 | 168 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
170 | 169 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
171 | 170 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
172 | - | let | |
173 | - | let | |
171 | + | let D = toBase58String(a.caller.bytes) | |
172 | + | let E = { | |
174 | 173 | let j = getInteger(this, f) | |
175 | 174 | if ($isInstanceOf(j, "Int")) | |
176 | 175 | then { | |
179 | 178 | } | |
180 | 179 | else 0 | |
181 | 180 | } | |
182 | - | let | |
183 | - | if ((0 > | |
181 | + | let G = (E - r) | |
182 | + | if ((0 > r)) | |
184 | 183 | then throw("Can't withdraw negative amount") | |
185 | - | else if ((0 > | |
186 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
184 | + | else if ((0 > G)) | |
185 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(E))) | |
187 | 186 | else { | |
188 | - | let | |
189 | - | if ((1 > | |
187 | + | let H = assetBalance(this, e) | |
188 | + | if ((1 > H)) | |
190 | 189 | then throw("No enough GovernToken In Contract") | |
191 | - | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, | |
190 | + | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, G)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, r, d)])) | |
192 | 191 | } | |
193 | 192 | } | |
194 | 193 | ||
198 | 197 | func ClaimPrize () = { | |
199 | 198 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
200 | 199 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
201 | - | let | |
200 | + | let I = base58'3MsH5Hr1qQYUnwq4HTpiaGpXQi6cGPUsa5n' | |
202 | 201 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
203 | 202 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
204 | - | let | |
205 | - | let | |
203 | + | let J = ((toBase58String(I) + "_") + toBase58String(d)) | |
204 | + | let K = { | |
206 | 205 | let j = getInteger(this, g) | |
207 | 206 | if ($isInstanceOf(j, "Int")) | |
208 | 207 | then { | |
211 | 210 | } | |
212 | 211 | else 0 | |
213 | 212 | } | |
214 | - | let | |
213 | + | let L = { | |
215 | 214 | let j = getInteger(this, f) | |
216 | 215 | if ($isInstanceOf(j, "Int")) | |
217 | 216 | then { | |
220 | 219 | } | |
221 | 220 | else 0 | |
222 | 221 | } | |
223 | - | let | |
224 | - | let j = getInteger(this, | |
222 | + | let M = { | |
223 | + | let j = getInteger(this, J) | |
225 | 224 | if ($isInstanceOf(j, "Int")) | |
226 | 225 | then { | |
227 | 226 | let k = j | |
231 | 230 | } | |
232 | 231 | let b = "GovernTokenMaxDeposit" | |
233 | 232 | let c = "MaxGovernTokenDepositerKey" | |
234 | - | let | |
235 | - | if (( | |
233 | + | let N = getStringValue(this, c) | |
234 | + | if ((M == 0)) | |
236 | 235 | then throw("No prize to Claim") | |
237 | - | else if ((g != | |
236 | + | else if ((g != N)) | |
238 | 237 | then throw("You are not the winner hence cannot claim the reward ") | |
239 | - | else if ((1 > | |
238 | + | else if ((1 > L)) | |
240 | 239 | then throw(("You have to Stake StakedToken to claim reward | |
241 | - | Your Balance of Staked Tokens is: " + toString( | |
242 | - | else if (( | |
243 | - | then ScriptResult(WriteSet([DataEntry( | |
240 | + | Your Balance of Staked Tokens is: " + toString(L))) | |
241 | + | else if ((K > 100)) | |
242 | + | then ScriptResult(WriteSet([DataEntry(N, M), DataEntry(J, 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, "")]), TransferSet([ScriptTransfer(a.caller, M, d), ScriptTransfer(a.caller, 100, e)])) | |
244 | 243 | else throw(("You have to deposit 100 GovernToken to claim Reward | |
245 | - | Your Balance is: " + toString( | |
244 | + | Your Balance is: " + toString(K))) | |
246 | 245 | } | |
247 | 246 | ||
248 | 247 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func ReadPoolData () = { | |
8 | 8 | let b = "GovernTokenMaxDeposit" | |
9 | 9 | let c = "MaxGovernTokenDepositerKey" | |
10 | 10 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
11 | 11 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
12 | 12 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
13 | 13 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
14 | 14 | let h = getStringValue(this, c) | |
15 | 15 | let i = { | |
16 | 16 | let j = getInteger(this, b) | |
17 | 17 | if ($isInstanceOf(j, "Int")) | |
18 | 18 | then { | |
19 | 19 | let k = j | |
20 | 20 | k | |
21 | 21 | } | |
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | let l = getStringValue(this, g) | |
25 | 25 | let m = { | |
26 | 26 | let j = getInteger(this, g) | |
27 | 27 | if ($isInstanceOf(j, "Int")) | |
28 | 28 | then { | |
29 | 29 | let k = j | |
30 | 30 | k | |
31 | 31 | } | |
32 | 32 | else 0 | |
33 | 33 | } | |
34 | 34 | let n = getStringValue(this, f) | |
35 | 35 | let o = { | |
36 | 36 | let j = getInteger(this, f) | |
37 | 37 | if ($isInstanceOf(j, "Int")) | |
38 | 38 | then { | |
39 | 39 | let k = j | |
40 | 40 | k | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | throw(((((((("Winner is.....: " + h) + " Balance is: ") + toString(i)) + " | |
45 | 45 | Staked Token in your Balance is.....: ") + toString(o)) + " | |
46 | 46 | Govern Token in your Balance is.....: ") + toString(m))) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(a) | |
52 | 52 | func ResetAccount () = { | |
53 | 53 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
54 | 54 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
55 | 55 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
56 | 56 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
57 | 57 | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
58 | 58 | WriteSet([DataEntry(g, 0), DataEntry(f, 0), DataEntry(p, 0)]) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(a) | |
64 | - | func Stake () = { | |
64 | + | func Stake (q,r) = { | |
65 | 65 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
66 | 66 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
67 | - | let q = extract(a.payment) | |
68 | - | if (if (isDefined(q.assetId)) | |
69 | - | then (extract(q.assetId) == d) | |
67 | + | if (if ((r > 0)) | |
68 | + | then (q == toBase58String(d)) | |
70 | 69 | else false) | |
71 | 70 | then { | |
72 | 71 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
73 | 72 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
74 | 73 | let p = (toBase58String(a.caller.bytes) + "_StakedTransactions") | |
75 | - | let | |
74 | + | let s = { | |
76 | 75 | let j = getInteger(this, p) | |
77 | 76 | if ($isInstanceOf(j, "Int")) | |
78 | 77 | then { | |
79 | 78 | let k = j | |
80 | 79 | k | |
81 | 80 | } | |
82 | 81 | else 0 | |
83 | 82 | } | |
84 | - | let | |
85 | - | let | |
83 | + | let t = (s + 1) | |
84 | + | let u = { | |
86 | 85 | let j = getInteger(this, f) | |
87 | 86 | if ($isInstanceOf(j, "Int")) | |
88 | 87 | then { | |
89 | 88 | let k = j | |
90 | 89 | k | |
91 | 90 | } | |
92 | 91 | else 0 | |
93 | 92 | } | |
94 | - | let | |
95 | - | let | |
93 | + | let v = (u + r) | |
94 | + | let w = { | |
96 | 95 | let j = getInteger(this, f) | |
97 | 96 | if ($isInstanceOf(j, "Int")) | |
98 | 97 | then { | |
99 | 98 | let k = j | |
100 | 99 | k | |
101 | 100 | } | |
102 | 101 | else 0 | |
103 | 102 | } | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ((1 > | |
103 | + | let x = (w + 10) | |
104 | + | let y = assetBalance(this, e) | |
105 | + | let z = assetBalance(this, d) | |
106 | + | if ((1 > y)) | |
108 | 107 | then throw("No enough GovernToken In Contract, Please deposit GovernTokens") | |
109 | - | else if (( | |
110 | - | then ScriptResult(WriteSet([DataEntry(g, | |
111 | - | else if (( | |
108 | + | else if ((z == 0)) | |
109 | + | then ScriptResult(WriteSet([DataEntry(g, x), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, 10, e)])) | |
110 | + | else if ((t > 50)) | |
112 | 111 | then { | |
113 | - | let | |
114 | - | ScriptResult(WriteSet([DataEntry(g, | |
112 | + | let A = (w + ((10 * t) * (v / z))) | |
113 | + | ScriptResult(WriteSet([DataEntry(g, A), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, A, e)])) | |
115 | 114 | } | |
116 | 115 | else { | |
117 | - | let | |
118 | - | ScriptResult(WriteSet([DataEntry(g, | |
116 | + | let A = (w + (10 * (v / z))) | |
117 | + | ScriptResult(WriteSet([DataEntry(g, A), DataEntry(f, v), DataEntry(p, t)]), TransferSet([ScriptTransfer(a.caller, A, e)])) | |
119 | 118 | } | |
120 | 119 | } | |
121 | 120 | else throw("Can deposit only StakeToken") | |
122 | 121 | } | |
123 | 122 | ||
124 | 123 | ||
125 | 124 | ||
126 | 125 | @Callable(a) | |
127 | 126 | func DepositGovernToken () = { | |
128 | 127 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
129 | - | let | |
130 | - | let | |
131 | - | if (if (isDefined( | |
132 | - | then (extract( | |
128 | + | let B = toBase58String(e) | |
129 | + | let C = extract(a.payment) | |
130 | + | if (if (isDefined(C.assetId)) | |
131 | + | then (extract(C.assetId) == e) | |
133 | 132 | else false) | |
134 | 133 | then { | |
135 | - | let | |
136 | - | let | |
137 | - | let j = getInteger(this, | |
134 | + | let D = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
135 | + | let E = { | |
136 | + | let j = getInteger(this, D) | |
138 | 137 | if ($isInstanceOf(j, "Int")) | |
139 | 138 | then { | |
140 | 139 | let k = j | |
141 | 140 | k | |
142 | 141 | } | |
143 | 142 | else 0 | |
144 | 143 | } | |
145 | - | let | |
144 | + | let F = (E + C.amount) | |
146 | 145 | let b = "GovernTokenMaxDeposit" | |
147 | 146 | let c = "MaxGovernTokenDepositerKey" | |
148 | 147 | let i = { | |
149 | 148 | let j = getInteger(this, b) | |
150 | 149 | if ($isInstanceOf(j, "Int")) | |
151 | 150 | then { | |
152 | 151 | let k = j | |
153 | 152 | k | |
154 | 153 | } | |
155 | 154 | else 0 | |
156 | 155 | } | |
157 | - | if (( | |
158 | - | then WriteSet([DataEntry( | |
159 | - | else WriteSet([DataEntry( | |
156 | + | if ((F > i)) | |
157 | + | then WriteSet([DataEntry(D, F), DataEntry(b, F), DataEntry(c, D)]) | |
158 | + | else WriteSet([DataEntry(D, F)]) | |
160 | 159 | } | |
161 | 160 | else throw("Can deposit only Govern Token") | |
162 | 161 | } | |
163 | 162 | ||
164 | 163 | ||
165 | 164 | ||
166 | 165 | @Callable(a) | |
167 | - | func WithdrawStakedFunds ( | |
166 | + | func WithdrawStakedFunds (r) = { | |
168 | 167 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
169 | 168 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
170 | 169 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
171 | 170 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
172 | - | let | |
173 | - | let | |
171 | + | let D = toBase58String(a.caller.bytes) | |
172 | + | let E = { | |
174 | 173 | let j = getInteger(this, f) | |
175 | 174 | if ($isInstanceOf(j, "Int")) | |
176 | 175 | then { | |
177 | 176 | let k = j | |
178 | 177 | k | |
179 | 178 | } | |
180 | 179 | else 0 | |
181 | 180 | } | |
182 | - | let | |
183 | - | if ((0 > | |
181 | + | let G = (E - r) | |
182 | + | if ((0 > r)) | |
184 | 183 | then throw("Can't withdraw negative amount") | |
185 | - | else if ((0 > | |
186 | - | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString( | |
184 | + | else if ((0 > G)) | |
185 | + | then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(E))) | |
187 | 186 | else { | |
188 | - | let | |
189 | - | if ((1 > | |
187 | + | let H = assetBalance(this, e) | |
188 | + | if ((1 > H)) | |
190 | 189 | then throw("No enough GovernToken In Contract") | |
191 | - | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, | |
190 | + | else ScriptResult(WriteSet([DataEntry(g, 1), DataEntry(f, G)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, r, d)])) | |
192 | 191 | } | |
193 | 192 | } | |
194 | 193 | ||
195 | 194 | ||
196 | 195 | ||
197 | 196 | @Callable(a) | |
198 | 197 | func ClaimPrize () = { | |
199 | 198 | let d = base58'AbwrDfhBTCFySqCzhwcC6CaXTNKC7tFq5nx1cVUxqT2w' | |
200 | 199 | let e = base58'Eh4w4BjT7Qn51eXFV9tLzymsepCo8oPLxBRBg5aog98j' | |
201 | - | let | |
200 | + | let I = base58'3MsH5Hr1qQYUnwq4HTpiaGpXQi6cGPUsa5n' | |
202 | 201 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
203 | 202 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
204 | - | let | |
205 | - | let | |
203 | + | let J = ((toBase58String(I) + "_") + toBase58String(d)) | |
204 | + | let K = { | |
206 | 205 | let j = getInteger(this, g) | |
207 | 206 | if ($isInstanceOf(j, "Int")) | |
208 | 207 | then { | |
209 | 208 | let k = j | |
210 | 209 | k | |
211 | 210 | } | |
212 | 211 | else 0 | |
213 | 212 | } | |
214 | - | let | |
213 | + | let L = { | |
215 | 214 | let j = getInteger(this, f) | |
216 | 215 | if ($isInstanceOf(j, "Int")) | |
217 | 216 | then { | |
218 | 217 | let k = j | |
219 | 218 | k | |
220 | 219 | } | |
221 | 220 | else 0 | |
222 | 221 | } | |
223 | - | let | |
224 | - | let j = getInteger(this, | |
222 | + | let M = { | |
223 | + | let j = getInteger(this, J) | |
225 | 224 | if ($isInstanceOf(j, "Int")) | |
226 | 225 | then { | |
227 | 226 | let k = j | |
228 | 227 | k | |
229 | 228 | } | |
230 | 229 | else 0 | |
231 | 230 | } | |
232 | 231 | let b = "GovernTokenMaxDeposit" | |
233 | 232 | let c = "MaxGovernTokenDepositerKey" | |
234 | - | let | |
235 | - | if (( | |
233 | + | let N = getStringValue(this, c) | |
234 | + | if ((M == 0)) | |
236 | 235 | then throw("No prize to Claim") | |
237 | - | else if ((g != | |
236 | + | else if ((g != N)) | |
238 | 237 | then throw("You are not the winner hence cannot claim the reward ") | |
239 | - | else if ((1 > | |
238 | + | else if ((1 > L)) | |
240 | 239 | then throw(("You have to Stake StakedToken to claim reward | |
241 | - | Your Balance of Staked Tokens is: " + toString( | |
242 | - | else if (( | |
243 | - | then ScriptResult(WriteSet([DataEntry( | |
240 | + | Your Balance of Staked Tokens is: " + toString(L))) | |
241 | + | else if ((K > 100)) | |
242 | + | then ScriptResult(WriteSet([DataEntry(N, M), DataEntry(J, 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, "")]), TransferSet([ScriptTransfer(a.caller, M, d), ScriptTransfer(a.caller, 100, e)])) | |
244 | 243 | else throw(("You have to deposit 100 GovernToken to claim Reward | |
245 | - | Your Balance is: " + toString( | |
244 | + | Your Balance is: " + toString(K))) | |
246 | 245 | } | |
247 | 246 | ||
248 | 247 |
github/deemru/w8io/169f3d6 81.26 ms ◑