tx · 8VxFpMDDQrrtHDJGgPNvidZ89kGzSEEt8RaHuPvSaTGh 3Mt7wmkWeioUsmfaBu6PsNq9j9SUs7f9qrs: -0.01000000 Waves 2022.11.21 13:53 [2326779] smart account 3Mt7wmkWeioUsmfaBu6PsNq9j9SUs7f9qrs > SELF 0.00000000 Waves
{ "type": 13, "id": "8VxFpMDDQrrtHDJGgPNvidZ89kGzSEEt8RaHuPvSaTGh", "fee": 1000000, "feeAssetId": null, "timestamp": 1669027985132, "version": 2, "chainId": 84, "sender": "3Mt7wmkWeioUsmfaBu6PsNq9j9SUs7f9qrs", "senderPublicKey": "BLEvt3fBtK9gbCuj3VA7nHviqe3TPkRrF9KL6ZaHGgr4", "proofs": [ "3BagkquFWuE7ZLYx6XLKJ2yobCNR1Y4WwFdiiD8qEgR5h2561A3R4z81hhtjn8WRviATeZFFP5dE4kzyYKQbaPST" ], "script": "base64:BgIQCAISBQoDCAEBEgASAwoBCDsAC3JldmlzaW9uTnVtAgAABkVVTEVSOADWic+BAQAFTVVMVDYAwIQ9AAZNVUxUWDYJALYCAQDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYOAkAtgIBAIDC1y8ABk1VTFQxMgCAoJSljR0ABk1VTFQxOAkAtgIBAICAkLu61q3wDQADU0VQAgJfXwAHV0FWRVNJRAkA2QQBAgVXQVZFUwEPZ2V0U3RyaW5nT3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgABDGdldEludE9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAmggCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQ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ity": 0 } View: original | compacted Prev: 2BKzVwtEUzd874fV7Pc8uVLysxhwJShZuTwzMvN1axeo Next: HanFeBzrKV8M7SJmVRkPNy6BsfeoakJ8vSnLzdKBjYVF Diff:
Old | New | Differences | |
---|---|---|---|
162 | 162 | ||
163 | 163 | let am = ac(ad, W) | |
164 | 164 | ||
165 | - | @Callable(an) | |
166 | - | func gnsbtInfoSYSREADONLY (ao,ap,aq) = { | |
167 | - | let ar = t(invoke(al, "nsbtStakingSYSREADONLY", [ao, ap], nil)) | |
168 | - | let as = x(ar[0]) | |
169 | - | let at = x(ar[1]) | |
170 | - | let au = as | |
171 | - | let av = at | |
172 | - | let aw = t(invoke(am, "surfStakingSYSREADONLY", [ao, aq], nil)) | |
173 | - | let ax = x(aw[0]) | |
174 | - | let ay = x(aw[1]) | |
175 | - | let az = x(aw[2]) | |
176 | - | let aA = x(aw[3]) | |
177 | - | let aB = x(aw[4]) | |
178 | - | let aC = x(aw[5]) | |
179 | - | let aD = (au + az) | |
180 | - | let aE = (av + aA) | |
181 | - | $Tuple2(nil, [aD, aE, [as, at, au, av], [ax, ay, az, aA], aB, aC]) | |
165 | + | let an = 0 | |
166 | + | ||
167 | + | let ao = 1 | |
168 | + | ||
169 | + | let ap = 2 | |
170 | + | ||
171 | + | let aq = 3 | |
172 | + | ||
173 | + | let ar = 4 | |
174 | + | ||
175 | + | let as = 5 | |
176 | + | ||
177 | + | let at = 6 | |
178 | + | ||
179 | + | let au = 7 | |
180 | + | ||
181 | + | let av = 8 | |
182 | + | ||
183 | + | let aw = 9 | |
184 | + | ||
185 | + | let ax = 10 | |
186 | + | ||
187 | + | let ay = 11 | |
188 | + | ||
189 | + | @Callable(az) | |
190 | + | func gnsbtInfoSYSREADONLY (aA,aB,aC) = { | |
191 | + | let aD = t(invoke(al, "nsbtStakingSYSREADONLY", [aA, aB], nil)) | |
192 | + | let aE = x(aD[0]) | |
193 | + | let aF = x(aD[1]) | |
194 | + | let aG = aE | |
195 | + | let aH = aF | |
196 | + | let aI = t(invoke(am, "surfStakingSYSREADONLY", [aA, aC], nil)) | |
197 | + | let aJ = x(aI[an]) | |
198 | + | let aK = x(aI[ao]) | |
199 | + | let aL = x(aI[ap]) | |
200 | + | let aM = x(aI[aq]) | |
201 | + | let aN = (aG + aL) | |
202 | + | let aO = (aH + aM) | |
203 | + | $Tuple2(nil, [aN, aO, [aE, aF, aG, aH], [aJ, aK, aL, aM], x(aI[ar]), x(aI[as]), x(aI[at]), x(aI[au]), x(aI[av]), x(aI[aw]), x(aI[ax]), x(aI[ay])]) | |
182 | 204 | } | |
183 | 205 | ||
184 | 206 | ||
185 | 207 | ||
186 | - | @Callable( | |
208 | + | @Callable(az) | |
187 | 209 | func claimRewards () = { | |
188 | - | let | |
189 | - | let | |
190 | - | if ((( | |
210 | + | let aP = x(invoke(al, "claimRewardsByOriginCaller", nil, nil)) | |
211 | + | let aQ = x(invoke(am, "claimRewardsByOriginCaller", nil, nil)) | |
212 | + | if (((aP + aQ) == 0)) | |
191 | 213 | then throw("Nothing to claim") | |
192 | 214 | else nil | |
193 | 215 | } | |
194 | 216 | ||
195 | 217 | ||
196 | 218 | ||
197 | - | @Callable( | |
198 | - | func gnsbtRewardsSYSREADONLY ( | |
199 | - | let | |
200 | - | let | |
201 | - | $Tuple2(nil, [ | |
219 | + | @Callable(az) | |
220 | + | func gnsbtRewardsSYSREADONLY (aA) = { | |
221 | + | let aR = z(invoke(al, "unclaimedRewardsREADONLY", [aA], nil)) | |
222 | + | let aS = z(invoke(am, "unclaimedRewardsREADONLY", [aA], nil)) | |
223 | + | $Tuple2(nil, [aR, aS]) | |
202 | 224 | } | |
203 | 225 | ||
204 | 226 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "" | |
5 | 5 | ||
6 | 6 | let b = 271828182 | |
7 | 7 | ||
8 | 8 | let c = 1000000 | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000) | |
11 | 11 | ||
12 | 12 | let e = 100000000 | |
13 | 13 | ||
14 | 14 | let f = toBigInt(100000000) | |
15 | 15 | ||
16 | 16 | let g = 1000000000000 | |
17 | 17 | ||
18 | 18 | let h = toBigInt(1000000000000000000) | |
19 | 19 | ||
20 | 20 | let i = "__" | |
21 | 21 | ||
22 | 22 | let j = fromBase58String("WAVES") | |
23 | 23 | ||
24 | 24 | func k (l,m) = valueOrErrorMessage(getString(l, m), makeString(["mandatory ", toString(l), ".", m, " is not defined"], "")) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func n (l,m) = valueOrErrorMessage(getInteger(l, m), makeString(["mandatory ", toString(l), ".", m, " is not defined"], "")) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func o (l,m) = valueOrErrorMessage(getBoolean(l, m), makeString(["mandatory ", toString(l), ".", m, " is not defined"], "")) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func p (q,r) = fraction(q, e, r) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func s (q,r) = fraction(q, r, e) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func t (u) = { | |
40 | 40 | let v = u | |
41 | 41 | if ($isInstanceOf(v, "List[Any]")) | |
42 | 42 | then { | |
43 | 43 | let w = v | |
44 | 44 | w | |
45 | 45 | } | |
46 | 46 | else throw("fail to cast into List[Any]") | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func x (u) = { | |
51 | 51 | let v = u | |
52 | 52 | if ($isInstanceOf(v, "Int")) | |
53 | 53 | then { | |
54 | 54 | let y = v | |
55 | 55 | y | |
56 | 56 | } | |
57 | 57 | else throw("fail to cast into Int") | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func z (u) = { | |
62 | 62 | let v = u | |
63 | 63 | if ($isInstanceOf(v, "String")) | |
64 | 64 | then { | |
65 | 65 | let A = v | |
66 | 66 | A | |
67 | 67 | } | |
68 | 68 | else throw("fail to cast into String") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func B (u) = { | |
73 | 73 | let v = u | |
74 | 74 | if ($isInstanceOf(v, "(Int, Int)")) | |
75 | 75 | then { | |
76 | 76 | let C = v | |
77 | 77 | C | |
78 | 78 | } | |
79 | 79 | else throw("fail to cast into Tuple2 ints") | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func D (u) = { | |
84 | 84 | let v = u | |
85 | 85 | if ($isInstanceOf(v, "(Int, Int, Int, Int, Int, Int, Int)")) | |
86 | 86 | then { | |
87 | 87 | let E = v | |
88 | 88 | E | |
89 | 89 | } | |
90 | 90 | else throw("fail to cast into SwapParamsSTRUCT") | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func F (G) = if ((0 > G)) | |
95 | 95 | then -1 | |
96 | 96 | else { | |
97 | 97 | let v = blockInfoByHeight(G) | |
98 | 98 | if ($isInstanceOf(v, "BlockInfo")) | |
99 | 99 | then { | |
100 | 100 | let H = v | |
101 | 101 | H.timestamp | |
102 | 102 | } | |
103 | 103 | else -1 | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func I (J,K) = fraction(toBigInt(J), h, toBigInt(K)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func L (u,M) = toInt(fraction(u, toBigInt(M), h)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | let N = 1 | |
114 | 114 | ||
115 | 115 | let O = 2 | |
116 | 116 | ||
117 | 117 | let P = 3 | |
118 | 118 | ||
119 | 119 | let Q = 4 | |
120 | 120 | ||
121 | 121 | let R = 5 | |
122 | 122 | ||
123 | 123 | let S = 6 | |
124 | 124 | ||
125 | 125 | let T = 7 | |
126 | 126 | ||
127 | 127 | let U = 8 | |
128 | 128 | ||
129 | 129 | let V = 9 | |
130 | 130 | ||
131 | 131 | let W = 10 | |
132 | 132 | ||
133 | 133 | let X = 11 | |
134 | 134 | ||
135 | 135 | func Y () = "%s%s__config__controlAddress" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func Z () = "%s__controlConfig" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func aa (ab) = split_4C(k(ab, Z()), i) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func ac (ad,ae) = valueOrErrorMessage(addressFromString(ad[ae]), ("Control cfg doesn't contain address at index " + toString(ae))) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | let af = addressFromStringValue(valueOrElse(getString(this, Y()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
148 | 148 | ||
149 | 149 | let ad = aa(af) | |
150 | 150 | ||
151 | 151 | let ag = ac(ad, Q) | |
152 | 152 | ||
153 | 153 | let ah = ac(ad, N) | |
154 | 154 | ||
155 | 155 | let ai = ac(ad, O) | |
156 | 156 | ||
157 | 157 | let aj = ac(ad, R) | |
158 | 158 | ||
159 | 159 | let ak = ac(ad, P) | |
160 | 160 | ||
161 | 161 | let al = ac(ad, U) | |
162 | 162 | ||
163 | 163 | let am = ac(ad, W) | |
164 | 164 | ||
165 | - | @Callable(an) | |
166 | - | func gnsbtInfoSYSREADONLY (ao,ap,aq) = { | |
167 | - | let ar = t(invoke(al, "nsbtStakingSYSREADONLY", [ao, ap], nil)) | |
168 | - | let as = x(ar[0]) | |
169 | - | let at = x(ar[1]) | |
170 | - | let au = as | |
171 | - | let av = at | |
172 | - | let aw = t(invoke(am, "surfStakingSYSREADONLY", [ao, aq], nil)) | |
173 | - | let ax = x(aw[0]) | |
174 | - | let ay = x(aw[1]) | |
175 | - | let az = x(aw[2]) | |
176 | - | let aA = x(aw[3]) | |
177 | - | let aB = x(aw[4]) | |
178 | - | let aC = x(aw[5]) | |
179 | - | let aD = (au + az) | |
180 | - | let aE = (av + aA) | |
181 | - | $Tuple2(nil, [aD, aE, [as, at, au, av], [ax, ay, az, aA], aB, aC]) | |
165 | + | let an = 0 | |
166 | + | ||
167 | + | let ao = 1 | |
168 | + | ||
169 | + | let ap = 2 | |
170 | + | ||
171 | + | let aq = 3 | |
172 | + | ||
173 | + | let ar = 4 | |
174 | + | ||
175 | + | let as = 5 | |
176 | + | ||
177 | + | let at = 6 | |
178 | + | ||
179 | + | let au = 7 | |
180 | + | ||
181 | + | let av = 8 | |
182 | + | ||
183 | + | let aw = 9 | |
184 | + | ||
185 | + | let ax = 10 | |
186 | + | ||
187 | + | let ay = 11 | |
188 | + | ||
189 | + | @Callable(az) | |
190 | + | func gnsbtInfoSYSREADONLY (aA,aB,aC) = { | |
191 | + | let aD = t(invoke(al, "nsbtStakingSYSREADONLY", [aA, aB], nil)) | |
192 | + | let aE = x(aD[0]) | |
193 | + | let aF = x(aD[1]) | |
194 | + | let aG = aE | |
195 | + | let aH = aF | |
196 | + | let aI = t(invoke(am, "surfStakingSYSREADONLY", [aA, aC], nil)) | |
197 | + | let aJ = x(aI[an]) | |
198 | + | let aK = x(aI[ao]) | |
199 | + | let aL = x(aI[ap]) | |
200 | + | let aM = x(aI[aq]) | |
201 | + | let aN = (aG + aL) | |
202 | + | let aO = (aH + aM) | |
203 | + | $Tuple2(nil, [aN, aO, [aE, aF, aG, aH], [aJ, aK, aL, aM], x(aI[ar]), x(aI[as]), x(aI[at]), x(aI[au]), x(aI[av]), x(aI[aw]), x(aI[ax]), x(aI[ay])]) | |
182 | 204 | } | |
183 | 205 | ||
184 | 206 | ||
185 | 207 | ||
186 | - | @Callable( | |
208 | + | @Callable(az) | |
187 | 209 | func claimRewards () = { | |
188 | - | let | |
189 | - | let | |
190 | - | if ((( | |
210 | + | let aP = x(invoke(al, "claimRewardsByOriginCaller", nil, nil)) | |
211 | + | let aQ = x(invoke(am, "claimRewardsByOriginCaller", nil, nil)) | |
212 | + | if (((aP + aQ) == 0)) | |
191 | 213 | then throw("Nothing to claim") | |
192 | 214 | else nil | |
193 | 215 | } | |
194 | 216 | ||
195 | 217 | ||
196 | 218 | ||
197 | - | @Callable( | |
198 | - | func gnsbtRewardsSYSREADONLY ( | |
199 | - | let | |
200 | - | let | |
201 | - | $Tuple2(nil, [ | |
219 | + | @Callable(az) | |
220 | + | func gnsbtRewardsSYSREADONLY (aA) = { | |
221 | + | let aR = z(invoke(al, "unclaimedRewardsREADONLY", [aA], nil)) | |
222 | + | let aS = z(invoke(am, "unclaimedRewardsREADONLY", [aA], nil)) | |
223 | + | $Tuple2(nil, [aR, aS]) | |
202 | 224 | } | |
203 | 225 | ||
204 | 226 |
github/deemru/w8io/169f3d6 34.88 ms ◑