tx · 4fhcd1HgnUKfZaeAcEytGCGsTyhr7jAdcGVZTEYYLce6 3MsuzNhpf1PM7tJ8QR26ufcAL2JV8vrozdE: -0.01000000 Waves 2023.09.27 17:26 [2773933] smart account 3MsuzNhpf1PM7tJ8QR26ufcAL2JV8vrozdE > SELF 0.00000000 Waves
{ "type": 13, "id": "4fhcd1HgnUKfZaeAcEytGCGsTyhr7jAdcGVZTEYYLce6", "fee": 1000000, "feeAssetId": null, "timestamp": 1695824831147, "version": 2, "chainId": 84, "sender": "3MsuzNhpf1PM7tJ8QR26ufcAL2JV8vrozdE", "senderPublicKey": "J5B7BY9sGuLSoU8BBteMaRpgnv7xMaYUecAPQCwo8mYd", "proofs": [ "2GFS4J6qJsTSJsBUsnMmeHPBrsqPfPQHyJvHjmtovhaxtKkgGHc4SbDfu6tXTHuZs4eu36YjFmACABHGAVdYUM3R" ], "script": "base64:BgIYCAISBwoFCAgBCAgSABIDCgEBEgASABIADgAGTVVMVDEwAIDIr6AlAANTRVACAl9fABBpc0NvbnN0cnVjdGVkS2V5Ag5pc19jb25zdHJ1Y3RlZAAXd2l0aGRyYXdhbExvY2tQZXJpb2RLZXkCFndpdGhkcmF3YWxfbG9ja19wZXJpb2QAEHJld2FyZEFzc2V0SWRLZXkCD3Jld2FyZF9hc3NldF9pZAATcG9vbFN0YWtlQXNzZXRJZEtleQITcG9vbF9zdGFrZV9hc3NldF9pZAAWcm9vdENvbnRyYWN0QWRkcmVzc0tleQIVcm9vdF9jb250cmFjdF9hZGRyZXNzAA9hZG1pbkFkZHJlc3NLZXkCEWFkbWluX2FkZHJlc3Nfa2V5ABJ0b3RhbFBvb2xTdGFrZWRLZXkCEnRvdGFsX3Bvb2xfX3N0YWtlZAASdG90YWxQb29sRWFybmVkS2V5AhF0b3RhbF9wb29sX2Vhcm5lZAAVcG9vbEN1cnJlbnRDbGFpbUlkS2V5AhVwb29sX2N1cnJlbnRfY2xhaW1faWQAKHBvb2xDdXJyZW50VW5jbGFpbWVkQWR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EFKHBvb2xDdXJyZW50VW5jbGFpbWVkQWRkaXRpb25hbFJld2FyZHNLZXkJAMwIAgkBDEludGVnZXJFbnRyeQIFKHBvb2xDdXJyZW50VW5jbGFpbWVkQWRkaXRpb25hbFJld2FyZHNLZXkJAGQCBSFjdXJyZW50VW5jbGFpbWVkQWRkaXRpb25hbFJld2FyZHMIBQdwYXltZW50BmFtb3VudAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleVL+lcc=", "height": 2773933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = 10000000000 | |
5 | + | ||
6 | + | let b = "__" | |
7 | + | ||
8 | + | let c = "is_constructed" | |
9 | + | ||
10 | + | let d = "withdrawal_lock_period" | |
11 | + | ||
12 | + | let e = "reward_asset_id" | |
13 | + | ||
14 | + | let f = "pool_stake_asset_id" | |
15 | + | ||
16 | + | let g = "root_contract_address" | |
17 | + | ||
18 | + | let h = "admin_address_key" | |
19 | + | ||
20 | + | let i = "total_pool__staked" | |
21 | + | ||
22 | + | let j = "total_pool_earned" | |
23 | + | ||
24 | + | let k = "pool_current_claim_id" | |
25 | + | ||
26 | + | let l = "pool_current_unclaimed_additional_rewards" | |
27 | + | ||
28 | + | func m (n) = { | |
29 | + | let o = n | |
30 | + | if ($isInstanceOf(o, "AttachedPayment")) | |
31 | + | then { | |
32 | + | let p = o | |
33 | + | p | |
34 | + | } | |
35 | + | else throw("fail to cast into AttachedPayment") | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | func q (r) = if (!(isDefined(getString(r)))) | |
40 | + | then false | |
41 | + | else { | |
42 | + | let s = getIntegerValue(k) | |
43 | + | let t = split(getStringValue(r), b) | |
44 | + | let u = parseIntValue(t[2]) | |
45 | + | (s > u) | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | @Callable(v) | |
50 | + | func constructor (w,x,y,z,A) = if (isDefined(getBoolean(c))) | |
51 | + | then throw("Constructor can be called one time") | |
52 | + | else [BooleanEntry(c, true), IntegerEntry(l, 0), StringEntry(e, w), StringEntry(f, x), StringEntry(g, z), StringEntry(h, A), IntegerEntry(j, 0), IntegerEntry(k, 0), IntegerEntry(i, 0), IntegerEntry(d, y)] | |
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | @Callable(v) | |
57 | + | func stake () = if ((size(v.payments) != 1)) | |
58 | + | then throw("One Payment expected") | |
59 | + | else { | |
60 | + | let B = toBase58String(v.caller.bytes) | |
61 | + | let C = m(v.payments[0]) | |
62 | + | let x = fromBase58String(getStringValue(f)) | |
63 | + | if (if ((C.assetId != x)) | |
64 | + | then true | |
65 | + | else (0 >= C.amount)) | |
66 | + | then throw("Wrong asset id or negative amount") | |
67 | + | else if (q(B)) | |
68 | + | then throw("You have unclaimed rewards on contract, claim them first") | |
69 | + | else { | |
70 | + | let s = getIntegerValue(k) | |
71 | + | let D = getIntegerValue(i) | |
72 | + | let E = getIntegerValue(j) | |
73 | + | let F = getStringValue(g) | |
74 | + | let G = if ((size(F) > 0)) | |
75 | + | then invoke(Address(fromBase58String(F)), "stakePoolLps", nil, [C]) | |
76 | + | else unit | |
77 | + | if ((G == G)) | |
78 | + | then { | |
79 | + | let H = valueOrElse(getString(B), "") | |
80 | + | let t = if ((size(H) > 0)) | |
81 | + | then { | |
82 | + | let t = split(H, b) | |
83 | + | let I = parseIntValue(t[0]) | |
84 | + | makeString([toString((I + C.amount)), t[1], t[2], t[3], toString(height)], b) | |
85 | + | } | |
86 | + | else makeString([toString(C.amount), "0", toString(s), toString(E), toString(height)], b) | |
87 | + | [StringEntry(B, t), IntegerEntry(i, (D + C.amount))] | |
88 | + | } | |
89 | + | else throw("Strict value is not equal to itself.") | |
90 | + | } | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | @Callable(v) | |
96 | + | func withdraw (J) = if ((0 >= J)) | |
97 | + | then throw("Amount must be positive") | |
98 | + | else { | |
99 | + | let B = toBase58String(v.caller.bytes) | |
100 | + | if (q(B)) | |
101 | + | then throw("You have unclaimed rewards on contract, claim them first") | |
102 | + | else { | |
103 | + | let t = split(valueOrErrorMessage(getString(B), "User not found"), b) | |
104 | + | let I = parseIntValue(t[0]) | |
105 | + | if ((J > I)) | |
106 | + | then throw("Insufficient funds") | |
107 | + | else { | |
108 | + | let y = getIntegerValue(d) | |
109 | + | let K = parseIntValue(t[4]) | |
110 | + | if (if ((y > 0)) | |
111 | + | then (y > (height - K)) | |
112 | + | else false) | |
113 | + | then throw((("This pool have lock period. You need to wait " + toString((y - (height - K)))) + " blocks")) | |
114 | + | else { | |
115 | + | let F = getStringValue(g) | |
116 | + | let D = valueOrElse(getInteger(i), 0) | |
117 | + | let x = getStringValue(f) | |
118 | + | let G = if ((size(F) > 0)) | |
119 | + | then invoke(Address(fromBase58String(F)), "withdrawPoolLps", [J], nil) | |
120 | + | else unit | |
121 | + | if ((G == G)) | |
122 | + | then { | |
123 | + | let L = [toString((I - J)), removeByIndex(t, 0)] | |
124 | + | ([IntegerEntry(i, (D - J)), ScriptTransfer(Address(v.caller.bytes), J, fromBase58String(x))] :+ (if (((I - J) == 0)) | |
125 | + | then DeleteEntry(B) | |
126 | + | else StringEntry(B, makeString(L, b)))) | |
127 | + | } | |
128 | + | else throw("Strict value is not equal to itself.") | |
129 | + | } | |
130 | + | } | |
131 | + | } | |
132 | + | } | |
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | @Callable(v) | |
137 | + | func claimRewards () = { | |
138 | + | let B = toBase58String(v.caller.bytes) | |
139 | + | if (!(q(B))) | |
140 | + | then throw("Nothing to claim, or user not found") | |
141 | + | else { | |
142 | + | let M = getIntegerValue(k) | |
143 | + | let N = getIntegerValue(j) | |
144 | + | let t = split(getStringValue(B), b) | |
145 | + | let O = parseIntValue(t[0]) | |
146 | + | let P = parseIntValue(t[1]) | |
147 | + | let Q = parseIntValue(t[2]) | |
148 | + | let R = parseIntValue(t[3]) | |
149 | + | let S = (N - R) | |
150 | + | let T = fraction(S, O, a) | |
151 | + | let L = makeString([t[0], toString((P + T)), toString(M), toString((R + S)), t[4]], b) | |
152 | + | let w = fromBase58String(getStringValue(e)) | |
153 | + | [StringEntry(B, L), ScriptTransfer(v.caller, T, w)] | |
154 | + | } | |
155 | + | } | |
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | @Callable(v) | |
160 | + | func claimPoolRewards () = if ((v.caller.bytes != fromBase58String(getStringValue(h)))) | |
161 | + | then throw("Admin only") | |
162 | + | else { | |
163 | + | let U = getIntegerValue(i) | |
164 | + | let V = getIntegerValue(j) | |
165 | + | let M = getIntegerValue(k) | |
166 | + | let w = fromBase58String(getStringValue(e)) | |
167 | + | let F = getStringValue(g) | |
168 | + | let W = assetBalance(this, w) | |
169 | + | if ((W == W)) | |
170 | + | then { | |
171 | + | let X = if ((size(F) > 0)) | |
172 | + | then invoke(Address(fromBase58String(F)), "claimPoolRewards", nil, nil) | |
173 | + | else unit | |
174 | + | if ((X == X)) | |
175 | + | then { | |
176 | + | let Y = assetBalance(this, w) | |
177 | + | let Z = getIntegerValue(l) | |
178 | + | let aa = ((Y - W) + Z) | |
179 | + | if ((aa == 0)) | |
180 | + | then nil | |
181 | + | else { | |
182 | + | let ab = fraction(aa, a, U) | |
183 | + | [IntegerEntry(k, (M + 1)), IntegerEntry(j, (V + ab)), IntegerEntry(l, 0)] | |
184 | + | } | |
185 | + | } | |
186 | + | else throw("Strict value is not equal to itself.") | |
187 | + | } | |
188 | + | else throw("Strict value is not equal to itself.") | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | @Callable(v) | |
194 | + | func receiveAdditionalReward () = if ((size(v.payments) != 1)) | |
195 | + | then throw("One Payment expected") | |
196 | + | else { | |
197 | + | let C = m(v.payments[0]) | |
198 | + | let w = fromBase58String(getStringValue(e)) | |
199 | + | if (if ((C.assetId != w)) | |
200 | + | then true | |
201 | + | else (0 >= C.amount)) | |
202 | + | then throw("Wrong reward asset id or negative amount") | |
203 | + | else { | |
204 | + | let ac = getIntegerValue(l) | |
205 | + | [IntegerEntry(l, (ac + C.amount))] | |
206 | + | } | |
207 | + | } | |
208 | + | ||
209 | + | ||
210 | + | @Verifier(ad) | |
211 | + | func ae () = sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey) | |
212 | + |
github/deemru/w8io/026f985 26.59 ms ◑