tx · CszdeK3gpqyjG8yPyXEqmyVPehoKX71WYW4U2cH6TACZ 3N7Ceyu23j5bYLLkou2xqucWC8f5Ma5b3WL: -0.02950000 Waves 2020.10.21 20:44 [1230643] smart account 3N7Ceyu23j5bYLLkou2xqucWC8f5Ma5b3WL > SELF 0.00000000 Waves
{ "type": 13, "id": "CszdeK3gpqyjG8yPyXEqmyVPehoKX71WYW4U2cH6TACZ", "fee": 2950000, "feeAssetId": null, "timestamp": 1603302270348, "version": 2, "chainId": 84, "sender": "3N7Ceyu23j5bYLLkou2xqucWC8f5Ma5b3WL", "senderPublicKey": "4sCkx8qKE5wmxM8E1kfvNPCWnrTM2A6TTPYUQTsAWwwm", "proofs": [ "4w2Wp4JZx5DcmPX8TzfKkmJkKhqCJQuyCckxfpgbigtzMtN2Yvt5GiwrYohCaotoDdrSehQ2RCoLU7E3Kijnk3SH" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAgRcBshwjyRR7E4jbQIGP2jvCbtpj52Gvg2osXltv2/UMEAAAAC0dvdmVyblRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjY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AgUAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALUHJpemVBbW91bnQFAAAAC1N0YWtlZFRva2VuCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAZAUAAAALR292ZXJuVG9rZW4FAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAR1lvdSBoYXZlIHRvIGRlcG9zaXQgMTAwIEdvdmVyblRva2VuIHRvIGNsYWltIFJld2FyZCAKIFlvdXIgQmFsYW5jZSBpczogCQABpAAAAAEFAAAAFVVzZXJHb3Zlcm5Ub2tlbkFtb3VudAAAAAB3WcfJ", "height": 1230643, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AiiCjVVhxTPWeaFni2vikifJWYqn58TrFcYv4ihJ6eby Next: 4eMRwHbjyh5ZHewbDeKoApifNMSmN6VKXnKqG6fUMQH7 Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | let l = getStringValue(this, g) | |
25 | - | let m = { | |
26 | - | let j = getInteger(this, l) | |
27 | - | if ($isInstanceOf(j, "Int")) | |
28 | - | then { | |
29 | - | let k = j | |
30 | - | k | |
31 | - | } | |
32 | - | else 0 | |
33 | - | } | |
34 | - | let n = getStringValue(this, f) | |
25 | + | let m = getStringValue(this, f) | |
35 | 26 | throw(((("Winner is.....: " + h) + " Balance is: ") + toString(i))) | |
36 | 27 | } | |
37 | 28 | ||
40 | 31 | @Callable(a) | |
41 | 32 | func payYield () = { | |
42 | 33 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
43 | - | let | |
44 | - | let | |
45 | - | let j = getInteger(this, | |
34 | + | let n = toBase58String(a.caller.bytes) | |
35 | + | let o = { | |
36 | + | let j = getInteger(this, n) | |
46 | 37 | if ($isInstanceOf(j, "Int")) | |
47 | 38 | then { | |
48 | 39 | let k = j | |
50 | 41 | } | |
51 | 42 | else 0 | |
52 | 43 | } | |
53 | - | if (( | |
44 | + | if ((o > 0)) | |
54 | 45 | then { | |
55 | - | let | |
56 | - | if ((1 > | |
46 | + | let p = assetBalance(this, e) | |
47 | + | if ((1 > p)) | |
57 | 48 | then throw("No enough GovernToken In Contract") | |
58 | - | else ScriptResult(WriteSet([DataEntry( | |
49 | + | else ScriptResult(WriteSet([DataEntry(n, 10)]), TransferSet([ScriptTransfer(a.caller, 1, e)])) | |
59 | 50 | } | |
60 | 51 | else throw("You need to deposit Collateral Token to receive Govern Token") | |
61 | 52 | } | |
66 | 57 | func Stake () = { | |
67 | 58 | let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
68 | 59 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
69 | - | let | |
70 | - | if (if (isDefined( | |
71 | - | then (extract( | |
60 | + | let q = extract(a.payment) | |
61 | + | if (if (isDefined(q.assetId)) | |
62 | + | then (extract(q.assetId) == d) | |
72 | 63 | else false) | |
73 | 64 | then { | |
74 | 65 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
75 | 66 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
76 | - | let | |
67 | + | let o = { | |
77 | 68 | let j = getInteger(this, f) | |
78 | 69 | if ($isInstanceOf(j, "Int")) | |
79 | 70 | then { | |
82 | 73 | } | |
83 | 74 | else 0 | |
84 | 75 | } | |
85 | - | let | |
86 | - | let | |
87 | - | if ((1 > | |
76 | + | let r = (o + q.amount) | |
77 | + | let s = assetBalance(this, e) | |
78 | + | if ((1 > s)) | |
88 | 79 | then throw("No enough GovernToken In Contract") | |
89 | - | else ScriptResult(WriteSet([DataEntry(g, 10), DataEntry(f, | |
80 | + | else ScriptResult(WriteSet([DataEntry(g, 10), DataEntry(f, r)]), TransferSet([ScriptTransfer(a.caller, 10, e)])) | |
90 | 81 | } | |
91 | 82 | else throw("Can deposit only StakeToken") | |
92 | 83 | } | |
96 | 87 | @Callable(a) | |
97 | 88 | func DepositGovernToken () = { | |
98 | 89 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
99 | - | let | |
100 | - | let | |
101 | - | if (if (isDefined( | |
102 | - | then (extract( | |
90 | + | let t = toBase58String(e) | |
91 | + | let q = extract(a.payment) | |
92 | + | if (if (isDefined(q.assetId)) | |
93 | + | then (extract(q.assetId) == e) | |
103 | 94 | else false) | |
104 | 95 | then { | |
105 | - | let | |
106 | - | let | |
107 | - | let j = getInteger(this, | |
96 | + | let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
97 | + | let o = { | |
98 | + | let j = getInteger(this, n) | |
108 | 99 | if ($isInstanceOf(j, "Int")) | |
109 | 100 | then { | |
110 | 101 | let k = j | |
112 | 103 | } | |
113 | 104 | else 0 | |
114 | 105 | } | |
115 | - | let | |
106 | + | let u = (o + q.amount) | |
116 | 107 | let b = "GovernTokenMaxDeposit" | |
117 | 108 | let c = "MaxGovernTokenDepositerKey" | |
118 | 109 | let i = { | |
124 | 115 | } | |
125 | 116 | else 0 | |
126 | 117 | } | |
127 | - | if (( | |
128 | - | then WriteSet([DataEntry( | |
129 | - | else WriteSet([DataEntry( | |
118 | + | if ((u > i)) | |
119 | + | then WriteSet([DataEntry(n, u), DataEntry(b, u), DataEntry(c, n)]) | |
120 | + | else WriteSet([DataEntry(n, u)]) | |
130 | 121 | } | |
131 | 122 | else throw("Can deposit only Govern Token") | |
132 | 123 | } | |
134 | 125 | ||
135 | 126 | ||
136 | 127 | @Callable(a) | |
137 | - | func WithdrawStakedFunds ( | |
138 | - | let | |
128 | + | func WithdrawStakedFunds (v) = { | |
129 | + | let w = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
139 | 130 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
140 | - | let | |
141 | - | let | |
142 | - | let j = getInteger(this, | |
131 | + | let n = toBase58String(a.caller.bytes) | |
132 | + | let o = { | |
133 | + | let j = getInteger(this, n) | |
143 | 134 | if ($isInstanceOf(j, "Int")) | |
144 | 135 | then { | |
145 | 136 | let k = j | |
147 | 138 | } | |
148 | 139 | else 0 | |
149 | 140 | } | |
150 | - | let | |
151 | - | if ((0 > | |
141 | + | let r = (o - v) | |
142 | + | if ((0 > v)) | |
152 | 143 | then throw("Can't withdraw negative amount") | |
153 | - | else if ((0 > | |
144 | + | else if ((0 > r)) | |
154 | 145 | then throw("User cannot withdraw more than deposited funds") | |
155 | 146 | else { | |
156 | - | let | |
157 | - | if ((1 > | |
147 | + | let p = assetBalance(this, e) | |
148 | + | if ((1 > p)) | |
158 | 149 | then throw("No enough GovernToken In Contract") | |
159 | - | else ScriptResult(WriteSet([DataEntry( | |
150 | + | else ScriptResult(WriteSet([DataEntry(n, 1), DataEntry(n, r)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, v, w)])) | |
160 | 151 | } | |
161 | 152 | } | |
162 | 153 | ||
166 | 157 | func ClaimPrize () = { | |
167 | 158 | let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
168 | 159 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
169 | - | let | |
160 | + | let x = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD' | |
170 | 161 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
171 | 162 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
172 | - | let | |
173 | - | let | |
163 | + | let y = ((toBase58String(x) + "_") + toBase58String(d)) | |
164 | + | let z = { | |
174 | 165 | let j = getInteger(this, g) | |
175 | 166 | if ($isInstanceOf(j, "Int")) | |
176 | 167 | then { | |
179 | 170 | } | |
180 | 171 | else 0 | |
181 | 172 | } | |
182 | - | let | |
173 | + | let A = { | |
183 | 174 | let j = getInteger(this, f) | |
184 | 175 | if ($isInstanceOf(j, "Int")) | |
185 | 176 | then { | |
188 | 179 | } | |
189 | 180 | else 0 | |
190 | 181 | } | |
191 | - | let | |
192 | - | let j = getInteger(this, | |
182 | + | let B = { | |
183 | + | let j = getInteger(this, y) | |
193 | 184 | if ($isInstanceOf(j, "Int")) | |
194 | 185 | then { | |
195 | 186 | let k = j | |
199 | 190 | } | |
200 | 191 | let b = "GovernTokenMaxDeposit" | |
201 | 192 | let c = "MaxGovernTokenDepositerKey" | |
202 | - | let | |
203 | - | if (( | |
193 | + | let C = getStringValue(this, c) | |
194 | + | if ((B == 0)) | |
204 | 195 | then throw("No prize to Claim") | |
205 | - | else if ((g != | |
196 | + | else if ((g != C)) | |
206 | 197 | then throw("You are not the winner hence cannot claim the reward ") | |
207 | - | else if ((1 > | |
198 | + | else if ((1 > A)) | |
208 | 199 | then throw(("You have to Stake StakedToken to claim reward | |
209 | - | Your Balance of Staked Tokens is: " + toString( | |
210 | - | else if (( | |
211 | - | then ScriptResult(WriteSet([DataEntry( | |
200 | + | Your Balance of Staked Tokens is: " + toString(A))) | |
201 | + | else if ((z > 100)) | |
202 | + | then ScriptResult(WriteSet([DataEntry(C, B), DataEntry(y, 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, "")]), TransferSet([ScriptTransfer(a.caller, B, d), ScriptTransfer(a.caller, 100, e)])) | |
212 | 203 | else throw(("You have to deposit 100 GovernToken to claim Reward | |
213 | - | Your Balance is: " + toString( | |
204 | + | Your Balance is: " + toString(z))) | |
214 | 205 | } | |
215 | 206 | ||
216 | 207 |
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 ReadMaxGovernDeposit () = { | |
8 | 8 | let b = "GovernTokenMaxDeposit" | |
9 | 9 | let c = "MaxGovernTokenDepositerKey" | |
10 | 10 | let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
11 | 11 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
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 | - | let m = { | |
26 | - | let j = getInteger(this, l) | |
27 | - | if ($isInstanceOf(j, "Int")) | |
28 | - | then { | |
29 | - | let k = j | |
30 | - | k | |
31 | - | } | |
32 | - | else 0 | |
33 | - | } | |
34 | - | let n = getStringValue(this, f) | |
25 | + | let m = getStringValue(this, f) | |
35 | 26 | throw(((("Winner is.....: " + h) + " Balance is: ") + toString(i))) | |
36 | 27 | } | |
37 | 28 | ||
38 | 29 | ||
39 | 30 | ||
40 | 31 | @Callable(a) | |
41 | 32 | func payYield () = { | |
42 | 33 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
43 | - | let | |
44 | - | let | |
45 | - | let j = getInteger(this, | |
34 | + | let n = toBase58String(a.caller.bytes) | |
35 | + | let o = { | |
36 | + | let j = getInteger(this, n) | |
46 | 37 | if ($isInstanceOf(j, "Int")) | |
47 | 38 | then { | |
48 | 39 | let k = j | |
49 | 40 | k | |
50 | 41 | } | |
51 | 42 | else 0 | |
52 | 43 | } | |
53 | - | if (( | |
44 | + | if ((o > 0)) | |
54 | 45 | then { | |
55 | - | let | |
56 | - | if ((1 > | |
46 | + | let p = assetBalance(this, e) | |
47 | + | if ((1 > p)) | |
57 | 48 | then throw("No enough GovernToken In Contract") | |
58 | - | else ScriptResult(WriteSet([DataEntry( | |
49 | + | else ScriptResult(WriteSet([DataEntry(n, 10)]), TransferSet([ScriptTransfer(a.caller, 1, e)])) | |
59 | 50 | } | |
60 | 51 | else throw("You need to deposit Collateral Token to receive Govern Token") | |
61 | 52 | } | |
62 | 53 | ||
63 | 54 | ||
64 | 55 | ||
65 | 56 | @Callable(a) | |
66 | 57 | func Stake () = { | |
67 | 58 | let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
68 | 59 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
69 | - | let | |
70 | - | if (if (isDefined( | |
71 | - | then (extract( | |
60 | + | let q = extract(a.payment) | |
61 | + | if (if (isDefined(q.assetId)) | |
62 | + | then (extract(q.assetId) == d) | |
72 | 63 | else false) | |
73 | 64 | then { | |
74 | 65 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
75 | 66 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
76 | - | let | |
67 | + | let o = { | |
77 | 68 | let j = getInteger(this, f) | |
78 | 69 | if ($isInstanceOf(j, "Int")) | |
79 | 70 | then { | |
80 | 71 | let k = j | |
81 | 72 | k | |
82 | 73 | } | |
83 | 74 | else 0 | |
84 | 75 | } | |
85 | - | let | |
86 | - | let | |
87 | - | if ((1 > | |
76 | + | let r = (o + q.amount) | |
77 | + | let s = assetBalance(this, e) | |
78 | + | if ((1 > s)) | |
88 | 79 | then throw("No enough GovernToken In Contract") | |
89 | - | else ScriptResult(WriteSet([DataEntry(g, 10), DataEntry(f, | |
80 | + | else ScriptResult(WriteSet([DataEntry(g, 10), DataEntry(f, r)]), TransferSet([ScriptTransfer(a.caller, 10, e)])) | |
90 | 81 | } | |
91 | 82 | else throw("Can deposit only StakeToken") | |
92 | 83 | } | |
93 | 84 | ||
94 | 85 | ||
95 | 86 | ||
96 | 87 | @Callable(a) | |
97 | 88 | func DepositGovernToken () = { | |
98 | 89 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
99 | - | let | |
100 | - | let | |
101 | - | if (if (isDefined( | |
102 | - | then (extract( | |
90 | + | let t = toBase58String(e) | |
91 | + | let q = extract(a.payment) | |
92 | + | if (if (isDefined(q.assetId)) | |
93 | + | then (extract(q.assetId) == e) | |
103 | 94 | else false) | |
104 | 95 | then { | |
105 | - | let | |
106 | - | let | |
107 | - | let j = getInteger(this, | |
96 | + | let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
97 | + | let o = { | |
98 | + | let j = getInteger(this, n) | |
108 | 99 | if ($isInstanceOf(j, "Int")) | |
109 | 100 | then { | |
110 | 101 | let k = j | |
111 | 102 | k | |
112 | 103 | } | |
113 | 104 | else 0 | |
114 | 105 | } | |
115 | - | let | |
106 | + | let u = (o + q.amount) | |
116 | 107 | let b = "GovernTokenMaxDeposit" | |
117 | 108 | let c = "MaxGovernTokenDepositerKey" | |
118 | 109 | let i = { | |
119 | 110 | let j = getInteger(this, b) | |
120 | 111 | if ($isInstanceOf(j, "Int")) | |
121 | 112 | then { | |
122 | 113 | let k = j | |
123 | 114 | k | |
124 | 115 | } | |
125 | 116 | else 0 | |
126 | 117 | } | |
127 | - | if (( | |
128 | - | then WriteSet([DataEntry( | |
129 | - | else WriteSet([DataEntry( | |
118 | + | if ((u > i)) | |
119 | + | then WriteSet([DataEntry(n, u), DataEntry(b, u), DataEntry(c, n)]) | |
120 | + | else WriteSet([DataEntry(n, u)]) | |
130 | 121 | } | |
131 | 122 | else throw("Can deposit only Govern Token") | |
132 | 123 | } | |
133 | 124 | ||
134 | 125 | ||
135 | 126 | ||
136 | 127 | @Callable(a) | |
137 | - | func WithdrawStakedFunds ( | |
138 | - | let | |
128 | + | func WithdrawStakedFunds (v) = { | |
129 | + | let w = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
139 | 130 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
140 | - | let | |
141 | - | let | |
142 | - | let j = getInteger(this, | |
131 | + | let n = toBase58String(a.caller.bytes) | |
132 | + | let o = { | |
133 | + | let j = getInteger(this, n) | |
143 | 134 | if ($isInstanceOf(j, "Int")) | |
144 | 135 | then { | |
145 | 136 | let k = j | |
146 | 137 | k | |
147 | 138 | } | |
148 | 139 | else 0 | |
149 | 140 | } | |
150 | - | let | |
151 | - | if ((0 > | |
141 | + | let r = (o - v) | |
142 | + | if ((0 > v)) | |
152 | 143 | then throw("Can't withdraw negative amount") | |
153 | - | else if ((0 > | |
144 | + | else if ((0 > r)) | |
154 | 145 | then throw("User cannot withdraw more than deposited funds") | |
155 | 146 | else { | |
156 | - | let | |
157 | - | if ((1 > | |
147 | + | let p = assetBalance(this, e) | |
148 | + | if ((1 > p)) | |
158 | 149 | then throw("No enough GovernToken In Contract") | |
159 | - | else ScriptResult(WriteSet([DataEntry( | |
150 | + | else ScriptResult(WriteSet([DataEntry(n, 1), DataEntry(n, r)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, v, w)])) | |
160 | 151 | } | |
161 | 152 | } | |
162 | 153 | ||
163 | 154 | ||
164 | 155 | ||
165 | 156 | @Callable(a) | |
166 | 157 | func ClaimPrize () = { | |
167 | 158 | let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
168 | 159 | let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
169 | - | let | |
160 | + | let x = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD' | |
170 | 161 | let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d)) | |
171 | 162 | let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e)) | |
172 | - | let | |
173 | - | let | |
163 | + | let y = ((toBase58String(x) + "_") + toBase58String(d)) | |
164 | + | let z = { | |
174 | 165 | let j = getInteger(this, g) | |
175 | 166 | if ($isInstanceOf(j, "Int")) | |
176 | 167 | then { | |
177 | 168 | let k = j | |
178 | 169 | k | |
179 | 170 | } | |
180 | 171 | else 0 | |
181 | 172 | } | |
182 | - | let | |
173 | + | let A = { | |
183 | 174 | let j = getInteger(this, f) | |
184 | 175 | if ($isInstanceOf(j, "Int")) | |
185 | 176 | then { | |
186 | 177 | let k = j | |
187 | 178 | k | |
188 | 179 | } | |
189 | 180 | else 0 | |
190 | 181 | } | |
191 | - | let | |
192 | - | let j = getInteger(this, | |
182 | + | let B = { | |
183 | + | let j = getInteger(this, y) | |
193 | 184 | if ($isInstanceOf(j, "Int")) | |
194 | 185 | then { | |
195 | 186 | let k = j | |
196 | 187 | k | |
197 | 188 | } | |
198 | 189 | else 0 | |
199 | 190 | } | |
200 | 191 | let b = "GovernTokenMaxDeposit" | |
201 | 192 | let c = "MaxGovernTokenDepositerKey" | |
202 | - | let | |
203 | - | if (( | |
193 | + | let C = getStringValue(this, c) | |
194 | + | if ((B == 0)) | |
204 | 195 | then throw("No prize to Claim") | |
205 | - | else if ((g != | |
196 | + | else if ((g != C)) | |
206 | 197 | then throw("You are not the winner hence cannot claim the reward ") | |
207 | - | else if ((1 > | |
198 | + | else if ((1 > A)) | |
208 | 199 | then throw(("You have to Stake StakedToken to claim reward | |
209 | - | Your Balance of Staked Tokens is: " + toString( | |
210 | - | else if (( | |
211 | - | then ScriptResult(WriteSet([DataEntry( | |
200 | + | Your Balance of Staked Tokens is: " + toString(A))) | |
201 | + | else if ((z > 100)) | |
202 | + | then ScriptResult(WriteSet([DataEntry(C, B), DataEntry(y, 0), DataEntry(b, 0), DataEntry(g, 0), DataEntry(c, "")]), TransferSet([ScriptTransfer(a.caller, B, d), ScriptTransfer(a.caller, 100, e)])) | |
212 | 203 | else throw(("You have to deposit 100 GovernToken to claim Reward | |
213 | - | Your Balance is: " + toString( | |
204 | + | Your Balance is: " + toString(z))) | |
214 | 205 | } | |
215 | 206 | ||
216 | 207 |
github/deemru/w8io/169f3d6 53.96 ms ◑