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