tx · B4tw6JUmfdpcDni1S2mf9oM5xX52zGgKdAEdmPAP6iDw 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01000000 Waves 2023.06.05 16:32 [2609438] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "B4tw6JUmfdpcDni1S2mf9oM5xX52zGgKdAEdmPAP6iDw", "fee": 1000000, "feeAssetId": null, "timestamp": 1685972005188, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "4TzDovE3wL8fnHYqVnPrAjmhiRr7UpvM8Q7K5HaV4bVLmc73mAP8JgZNdHLydgHZBrpAFF2YBMDhwguQr8Z9h1zR" ], "script": "base64:BgIVCAISBQoDCAgIEgMKAQESAwoBARIAJwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAFWRlZmF1bHRSZXN0QWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BRQ3V2RmJ2aDRMa1BVbnJuVTF6M2puYkExcDltM1dOaHYDCQAAAgEBVAUHJG1hdGNoMAIjM011bWtHR3p0Q0tBWHBXRHF4a2Rkb2ZxWFNVYnFRa3ZTSnkJAAIBAg1Vbmtub3duIGNoYWluAANTRVACAl9fAAVNVUxUNgDAhD0ABVNTSVpFABkABU1TSVpFAGQABUxTSVpFAOEBAAZYTFNJWkUAkAMAB1hYTFNJWkUA8QQAC3JlY0xhbmRTaXplAAEBD2dldFN0cmluZ09yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuC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kBC3ZhbHVlT3JFbHNlAgkAnwgBBQt1c2VyVGltZUtleQUJaXNzdWVUaW1lBANlZmYJAQ5nZXRWb3RpbmdQb3dlcgEFCmNhbGxlckFkZHIECnVzZXJBbW91bnQJAGsDCQBrAwkAawMFBk1VTFQxNAULUExBWUVSU0hBUkUFBU1VTFQ2CQCRAwIFA2VmZgUKSWR4RWZmVXNlcgkAkQMCBQNlZmYFC0lkeEVmZlRvdGFsCQBlAgUDbm93BQxsYXN0VXNlclRpbWUJAGgCAAMFCllFQVJNSUxMSVMJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUNbWFya2V0aW5nQWRkcgUPbWFya2V0aW5nQW1vdW50BQp3bGdBc3NldElkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCHRlYW1BZGRyBQp0ZWFtQW1vdW50BQp3bGdBc3NldElkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFDHJlc3RDb250cmFjdAUJYWN0QW1vdW50BQp3bGdBc3NldElkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFBmNhbGxlcgUKdXNlckFtb3VudAUKd2xnQXNzZXRJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgUUbGFzdE1hcmtldGluZ1RpbWVLZXkFA25vdwkAzAgCCQEMSW50ZWdlckVudHJ5AgUPbGFzdFRlYW1UaW1lS2V5BQNub3cJAMwIAgkBDEludGVnZXJFbnRyeQIFFWxhc3RBY3Rpdml0aWVzVGltZUtleQUDbm93CQDMCAIJAQxJbnRlZ2VyRW50cnkCBQt1c2VyVGltZUtleQUDbm93BQNuaWwAIkfGjQ==", "height": 2609438, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A3ggoZJHcLYD45zjLSGy2818nuQzSZL1FRfyvfkmvYRZ Next: H5RbdsG7QRKzR6YpJ7yX4U5aoAJd7dndHaBGmXyvaJAZ Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = take(drop(this.bytes, 1), 1) | |
5 | + | ||
6 | + | let b = { | |
7 | + | let c = a | |
8 | + | if ((base58'2W' == c)) | |
9 | + | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
10 | + | else if ((base58'2T' == c)) | |
11 | + | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
12 | + | else throw("Unknown chain") | |
13 | + | } | |
14 | + | ||
15 | + | let d = "__" | |
16 | + | ||
17 | + | let e = 1000000 | |
18 | + | ||
19 | + | let f = 25 | |
20 | + | ||
21 | + | let g = 100 | |
22 | + | ||
23 | + | let h = 225 | |
24 | + | ||
25 | + | let i = 400 | |
26 | + | ||
27 | + | let j = 625 | |
28 | + | ||
29 | + | let k = 1 | |
30 | + | ||
31 | + | func l (m,n) = valueOrErrorMessage(getString(m, n), makeString(["mandatory ", toString(m), ".", n, " is not defined"], "")) | |
4 | 32 | ||
5 | 33 | ||
6 | - | @Callable(a) | |
7 | - | func test1 () = { | |
8 | - | let b = 666 | |
9 | - | $Tuple2(nil, b) | |
34 | + | let o = 1 | |
35 | + | ||
36 | + | func p () = "%s__restConfig" | |
37 | + | ||
38 | + | ||
39 | + | func q () = "%s__restAddr" | |
40 | + | ||
41 | + | ||
42 | + | func r (s) = split_4C(l(s, p()), d) | |
43 | + | ||
44 | + | ||
45 | + | func t (u,v) = valueOrErrorMessage(addressFromString(u[v]), ("Rest cfg doesn't contain address at index " + toString(v))) | |
46 | + | ||
47 | + | ||
48 | + | let w = addressFromStringValue(valueOrElse(getString(this, q()), b)) | |
49 | + | ||
50 | + | let u = r(w) | |
51 | + | ||
52 | + | let x = t(u, o) | |
53 | + | ||
54 | + | func y (z) = ("stakedLandsByOwner_" + z) | |
55 | + | ||
56 | + | ||
57 | + | func A () = "resTypesProportions" | |
58 | + | ||
59 | + | ||
60 | + | func B (C) = { | |
61 | + | let c = C | |
62 | + | if (("S" == c)) | |
63 | + | then f | |
64 | + | else if (("M" == c)) | |
65 | + | then g | |
66 | + | else if (("L" == c)) | |
67 | + | then h | |
68 | + | else if (("XL" == c)) | |
69 | + | then i | |
70 | + | else if (("XXL" == c)) | |
71 | + | then j | |
72 | + | else throw("Unknown land size") | |
73 | + | } | |
74 | + | ||
75 | + | ||
76 | + | let D = 0 | |
77 | + | ||
78 | + | let E = 1 | |
79 | + | ||
80 | + | func F (G) = { | |
81 | + | let H = split(valueOrElse(getString(x, A()), "0_0_0_0_0_0"), "_") | |
82 | + | func I (J,K) = (J + parseIntValue(K)) | |
83 | + | ||
84 | + | let L = { | |
85 | + | let M = H | |
86 | + | let N = size(M) | |
87 | + | let O = 0 | |
88 | + | func P (Q,R) = if ((R >= N)) | |
89 | + | then Q | |
90 | + | else I(Q, M[R]) | |
91 | + | ||
92 | + | func S (Q,R) = if ((R >= N)) | |
93 | + | then Q | |
94 | + | else throw("List size exceeds 6") | |
95 | + | ||
96 | + | S(P(P(P(P(P(P(O, 0), 1), 2), 3), 4), 5), 6) | |
97 | + | } | |
98 | + | let T = if ((G == "")) | |
99 | + | then 0 | |
100 | + | else { | |
101 | + | let U = getString(x, y(G)) | |
102 | + | let V = if (isDefined(U)) | |
103 | + | then split_51C(value(U), "_") | |
104 | + | else nil | |
105 | + | func W (J,X) = { | |
106 | + | let Y = value(assetInfo(fromBase58String(X))) | |
107 | + | let C = split(Y.description, "_")[k] | |
108 | + | (J + B(C)) | |
109 | + | } | |
110 | + | ||
111 | + | let M = V | |
112 | + | let N = size(M) | |
113 | + | let O = 0 | |
114 | + | func Z (Q,R) = if ((R >= N)) | |
115 | + | then Q | |
116 | + | else W(Q, M[R]) | |
117 | + | ||
118 | + | func aa (Q,R) = if ((R >= N)) | |
119 | + | then Q | |
120 | + | else throw("List size exceeds 100") | |
121 | + | ||
122 | + | aa(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(O, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
123 | + | } | |
124 | + | [L, T] | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | let ab = 100000000000000 | |
129 | + | ||
130 | + | let ac = 100000 | |
131 | + | ||
132 | + | let ad = 200000 | |
133 | + | ||
134 | + | let ae = 100000 | |
135 | + | ||
136 | + | let af = 400000 | |
137 | + | ||
138 | + | let ag = 31557600000 | |
139 | + | ||
140 | + | let ah = "wlg_assetId" | |
141 | + | ||
142 | + | let ai = "wlg_issueTime" | |
143 | + | ||
144 | + | let aj = "marketingAddr" | |
145 | + | ||
146 | + | let ak = "teamAddr" | |
147 | + | ||
148 | + | let al = "lastClaimedTime_marketing" | |
149 | + | ||
150 | + | let am = "lastClaimedTime_team" | |
151 | + | ||
152 | + | let an = "lastClaimedTime_activities" | |
153 | + | ||
154 | + | func ao (ap) = "lastClaimedTimeUser_ + addr" | |
155 | + | ||
156 | + | ||
157 | + | @Callable(aq) | |
158 | + | func constructorV1 (ar,as,at) = if ((aq.caller != this)) | |
159 | + | then throw("Permission denied") | |
160 | + | else if (isDefined(getString(ah))) | |
161 | + | then throw("Already initialized") | |
162 | + | else { | |
163 | + | let au = Issue("WLGOLD", "WavesLands Gold investment token", ab, 8, true, unit, 0) | |
164 | + | let av = calculateAssetId(au) | |
165 | + | [au, IntegerEntry(ai, lastBlock.timestamp), BinaryEntry(ah, av), StringEntry(q(), ar), StringEntry(aj, as), StringEntry(ak, at)] | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(aq) | |
171 | + | func buyWlg (aw) = nil | |
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | @Callable(aq) | |
176 | + | func sellWlg (aw) = nil | |
177 | + | ||
178 | + | ||
179 | + | ||
180 | + | @Callable(aq) | |
181 | + | func claim () = { | |
182 | + | let ax = aq.caller | |
183 | + | let ay = toString(ax) | |
184 | + | let az = lastBlock.timestamp | |
185 | + | let aA = valueOrErrorMessage(getInteger(ai), "Not initialized") | |
186 | + | let aB = value(getBinary(ah)) | |
187 | + | let aC = valueOrElse(getInteger(al), aA) | |
188 | + | let as = addressFromStringValue(value(getString(aj))) | |
189 | + | let aD = fraction(fraction(ab, ac, e), (az - aC), ag) | |
190 | + | let aE = valueOrElse(getInteger(am), aA) | |
191 | + | let at = addressFromStringValue(value(getString(ak))) | |
192 | + | let aF = fraction(fraction(ab, ad, e), (az - aE), (3 * ag)) | |
193 | + | let aG = valueOrElse(getInteger(an), aA) | |
194 | + | let aH = fraction(fraction(ab, ae, e), (az - aG), (3 * ag)) | |
195 | + | let aI = ao(ay) | |
196 | + | let aJ = valueOrElse(getInteger(aI), aA) | |
197 | + | let aK = F(ay) | |
198 | + | let aL = fraction(fraction(fraction(ab, af, e), aK[E], aK[D]), (az - aJ), (3 * ag)) | |
199 | + | [ScriptTransfer(as, aD, aB), ScriptTransfer(at, aF, aB), ScriptTransfer(w, aH, aB), ScriptTransfer(ax, aL, aB), IntegerEntry(al, az), IntegerEntry(am, az), IntegerEntry(an, az), IntegerEntry(aI, az)] | |
10 | 200 | } | |
11 | 201 | ||
12 | 202 |
github/deemru/w8io/026f985 30.24 ms ◑