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