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