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