tx · 2MeQMcZRet4yaVP3U5kuKxSoYL9tqCimJzpgNRmKzx4g 3MsPYUm9723jTqtBwkhTaPZam3cmZKipw1k: -0.01000000 Waves 2024.10.07 20:27 [3316721] smart account 3MsPYUm9723jTqtBwkhTaPZam3cmZKipw1k > SELF 0.00000000 Waves
{ "type": 13, "id": "2MeQMcZRet4yaVP3U5kuKxSoYL9tqCimJzpgNRmKzx4g", "fee": 1000000, "feeAssetId": null, "timestamp": 1728322041065, "version": 2, "chainId": 84, "sender": "3MsPYUm9723jTqtBwkhTaPZam3cmZKipw1k", "senderPublicKey": "7dnHR7YjY1ki4PgPiRqzkkSgSPapC3yD1dC5jkDJq2wx", "proofs": [ "5n5A2ELPGR422rRFfEJ2HZsr78YBxcfSB38YLcvqsgwV6HnCTR6g3k8v5C7EuNn2qvrLYtUX9df7sju2Ufr6bFUw" ], "script": "base64:BgIZCAISAwoBCBIGCgQIAQEIEgASBgoECAEBCBsBF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAIUc3RhdGljX29yYWNsZUFkZHJlc3MBF3N0YXRpY0tleV9mZWVBZ2dyZWdhdG9yAAIUc3RhdGljX2ZlZUFnZ3JlZ2F0b3IBFHN0YXRpY0tleV9lZ2dBc3NldElkAAIRc3RhdGljX2VnZ0Fzc2V0SWQBF3N0YXRpY0tleV9iYWNrZW5kUHViS2V5AAIUc3RhdGljX2JhY2tlbmRQdWJLZXkBHHN0YXRpY0tleV9yZWZDb250cmFjdEFkZHJlc3MAAhlzdGF0aWNfcmVmQ29udHJhY3RBZGRyZXNzARVzdGF0aWNLZXlfYnVybkFkZHJlc3MAAhJzdGF0aWNfYnVybkFkZHJlc3MBGHN0YXRpY0tleV9jb3Vwb25zQWRkcmVzcwACFXN0YXRpY19jb3Vwb25zQWRkcmVzcwEWc3RhdGljS2V5X2l0ZW1zQWRkcmVzcwACE3N0YXRpY19pdGVtc0FkZHJlc3MBEnN0YXRpY0tleV9leHRyYUZlZQACD3N0YXRpY19leHRyYUZ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lyZFVzZXJTaWduZWQEByRtYXRjaDAFAnR4CQBnAgUPc2lnbmF0dXJlc0NvdW50AAK4XZeZ", "height": 3316721, "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 | + | func a () = "static_oracleAddress" | |
5 | + | ||
6 | + | ||
7 | + | func b () = "static_feeAggregator" | |
8 | + | ||
9 | + | ||
10 | + | func c () = "static_eggAssetId" | |
11 | + | ||
12 | + | ||
13 | + | func d () = "static_backendPubKey" | |
14 | + | ||
15 | + | ||
16 | + | func e () = "static_refContractAddress" | |
17 | + | ||
18 | + | ||
19 | + | func f () = "static_burnAddress" | |
20 | + | ||
21 | + | ||
22 | + | func g () = "static_couponsAddress" | |
23 | + | ||
24 | + | ||
25 | + | func h () = "static_itemsAddress" | |
26 | + | ||
27 | + | ||
28 | + | func i () = "static_extraFee" | |
29 | + | ||
30 | + | ||
31 | + | func j () = { | |
32 | + | let k = { | |
33 | + | let l = getBoolean(this, "TESTENV") | |
34 | + | if ($isInstanceOf(l, "Boolean")) | |
35 | + | then { | |
36 | + | let m = l | |
37 | + | m | |
38 | + | } | |
39 | + | else false | |
40 | + | } | |
41 | + | k | |
42 | + | } | |
43 | + | ||
44 | + | ||
45 | + | func n (o,p) = ((("eggId_" + o) + "_") + p) | |
46 | + | ||
47 | + | ||
48 | + | func q (r,p,s) = ((((("booster_" + r) + "_") + p) + "_") + toString(s)) | |
49 | + | ||
50 | + | ||
51 | + | func t (u,v) = { | |
52 | + | let l = getString(u, v) | |
53 | + | if ($isInstanceOf(l, "String")) | |
54 | + | then { | |
55 | + | let w = l | |
56 | + | w | |
57 | + | } | |
58 | + | else "" | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | func x (v) = t(this, v) | |
63 | + | ||
64 | + | ||
65 | + | func y () = Address(fromBase58String(x(a()))) | |
66 | + | ||
67 | + | ||
68 | + | func z () = fromBase58String(t(y(), c())) | |
69 | + | ||
70 | + | ||
71 | + | func A () = fromBase58String(getStringValue(y(), d())) | |
72 | + | ||
73 | + | ||
74 | + | func B () = Address(fromBase58String(t(y(), b()))) | |
75 | + | ||
76 | + | ||
77 | + | func C () = Address(fromBase58String(t(y(), e()))) | |
78 | + | ||
79 | + | ||
80 | + | func D () = Address(fromBase58String(t(y(), f()))) | |
81 | + | ||
82 | + | ||
83 | + | func E () = Address(fromBase58String(t(y(), g()))) | |
84 | + | ||
85 | + | ||
86 | + | func F () = Address(fromBase58String(t(y(), h()))) | |
87 | + | ||
88 | + | ||
89 | + | func G (o,H,I) = makeString([o, toString(H), toString(I)], ";") | |
90 | + | ||
91 | + | ||
92 | + | func J (K,L) = if (isDefined(K.assetId)) | |
93 | + | then throw("RCAP: Please attach waves") | |
94 | + | else if ((K.amount != L)) | |
95 | + | then throw((("RCAP: Please attach exactly " + toString(L)) + " amount of wavelets")) | |
96 | + | else [ScriptTransfer(B(), L, unit)] | |
97 | + | ||
98 | + | ||
99 | + | func M (N) = { | |
100 | + | let l = N | |
101 | + | if ($isInstanceOf(l, "Boolean")) | |
102 | + | then { | |
103 | + | let O = l | |
104 | + | O | |
105 | + | } | |
106 | + | else throw("TI: wrong type, expected: Boolean") | |
107 | + | } | |
108 | + | ||
109 | + | ||
110 | + | func P (N) = { | |
111 | + | let l = N | |
112 | + | if ($isInstanceOf(l, "Int")) | |
113 | + | then { | |
114 | + | let Q = l | |
115 | + | Q | |
116 | + | } | |
117 | + | else throw("FAI: wrong type, expected: Int") | |
118 | + | } | |
119 | + | ||
120 | + | ||
121 | + | func R (N) = { | |
122 | + | let l = N | |
123 | + | if ($isInstanceOf(l, "String")) | |
124 | + | then { | |
125 | + | let S = l | |
126 | + | S | |
127 | + | } | |
128 | + | else throw("wrong type, expected: String") | |
129 | + | } | |
130 | + | ||
131 | + | ||
132 | + | @Callable(T) | |
133 | + | func configureOracle (U) = if ((T.caller != this)) | |
134 | + | then throw("RCO: admin only") | |
135 | + | else [StringEntry(a(), U)] | |
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | @Callable(T) | |
140 | + | func buyRope (o,H,I,V) = throw("Deprecated method! Please use buyRopeInverted") | |
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | @Callable(T) | |
145 | + | func useBooster () = { | |
146 | + | let W = J(T.payments[0], getIntegerValue(y(), i())) | |
147 | + | if ((W == W)) | |
148 | + | then if (!(if ((size(T.payments) == 2)) | |
149 | + | then (T.payments[1].amount == 1) | |
150 | + | else false)) | |
151 | + | then throw("Invalid payment") | |
152 | + | else { | |
153 | + | let X = value(T.payments[1].assetId) | |
154 | + | let Y = R(invoke(F(), "checkArtefactDetails", [toBase58String(X)], nil)) | |
155 | + | if ((Y == Y)) | |
156 | + | then ([Burn(X, 1), StringEntry(q(Y, toString(T.caller), height), toBase58String(X))] ++ W) | |
157 | + | else throw("Strict value is not equal to itself.") | |
158 | + | } | |
159 | + | else throw("Strict value is not equal to itself.") | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | ||
164 | + | @Callable(T) | |
165 | + | func buyRopeInverted (o,H,I,V) = { | |
166 | + | let Z = toString(T.caller) | |
167 | + | let aa = G(o, H, I) | |
168 | + | let ab = x(n(o, toString(T.originCaller))) | |
169 | + | let ac = (H / 2) | |
170 | + | let W = J(T.payments[0], H) | |
171 | + | if ((W == W)) | |
172 | + | then if (!(sigVerify_8Kb(toBytes(aa), fromBase58String(V), A()))) | |
173 | + | then throw("RBR: Invalid proof from backend") | |
174 | + | else if ((I > 1200)) | |
175 | + | then throw("RBR: You can only maximum boost 1200 meters distance!") | |
176 | + | else { | |
177 | + | let ad = if ((T.originCaller == T.caller)) | |
178 | + | then { | |
179 | + | let ae = P(invoke(E(), "useCoupons", [ac], nil)) | |
180 | + | if ((ae == ae)) | |
181 | + | then (ac - ae) | |
182 | + | else throw("Strict value is not equal to itself.") | |
183 | + | } | |
184 | + | else ac | |
185 | + | let af = if ((ad != 0)) | |
186 | + | then { | |
187 | + | let ag = value(T.payments[1]) | |
188 | + | if ((ag.assetId != z())) | |
189 | + | then throw(("RBR: You can attach only EGG tokens with the following asset id: " + toBase58String(z()))) | |
190 | + | else if ((ad > ag.amount)) | |
191 | + | then throw(((("RBR: To rope a egg you currently need the following amount of EGGlets: " + toString(ad)) + " ") + toString(T.caller))) | |
192 | + | else { | |
193 | + | let ah = 0 | |
194 | + | let ai = ad | |
195 | + | let aj = invoke(D(), "burnAttachedPayments", nil, [AttachedPayment(z(), ai)]) | |
196 | + | if ((aj == aj)) | |
197 | + | then [ScriptTransfer(T.caller, (T.payments[1].amount - ad), z())] | |
198 | + | else throw("Strict value is not equal to itself.") | |
199 | + | } | |
200 | + | } | |
201 | + | else nil | |
202 | + | if ((af == af)) | |
203 | + | then { | |
204 | + | let ak = invoke(E(), "recordAction", ["ROPE"], nil) | |
205 | + | if ((ak == ak)) | |
206 | + | then if ((ab != "")) | |
207 | + | then throw("RBR: Rope was already bought for this egg by this user!") | |
208 | + | else (([StringEntry(n(o, toString(T.originCaller)), ((toString(H) + ";") + toString(I)))] ++ W) ++ af) | |
209 | + | else throw("Strict value is not equal to itself.") | |
210 | + | } | |
211 | + | else throw("Strict value is not equal to itself.") | |
212 | + | } | |
213 | + | else throw("Strict value is not equal to itself.") | |
214 | + | } | |
215 | + | ||
216 | + | ||
217 | + | @Verifier(al) | |
218 | + | func am () = if (j()) | |
219 | + | then sigVerify(al.bodyBytes, al.proofs[0], al.senderPublicKey) | |
220 | + | else { | |
221 | + | let an = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
222 | + | let ao = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
223 | + | let ap = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
224 | + | let aq = if (sigVerify(al.bodyBytes, al.proofs[0], an)) | |
225 | + | then 1 | |
226 | + | else if (sigVerify(al.bodyBytes, al.proofs[1], an)) | |
227 | + | then 1 | |
228 | + | else if (sigVerify(al.bodyBytes, al.proofs[2], an)) | |
229 | + | then 1 | |
230 | + | else 0 | |
231 | + | let ar = if (sigVerify(al.bodyBytes, al.proofs[0], ao)) | |
232 | + | then 1 | |
233 | + | else if (sigVerify(al.bodyBytes, al.proofs[1], ao)) | |
234 | + | then 1 | |
235 | + | else if (sigVerify(al.bodyBytes, al.proofs[2], ao)) | |
236 | + | then 1 | |
237 | + | else 0 | |
238 | + | let as = if (sigVerify(al.bodyBytes, al.proofs[0], ap)) | |
239 | + | then 1 | |
240 | + | else if (sigVerify(al.bodyBytes, al.proofs[1], ap)) | |
241 | + | then 1 | |
242 | + | else if (sigVerify(al.bodyBytes, al.proofs[2], ap)) | |
243 | + | then 1 | |
244 | + | else 0 | |
245 | + | let at = ((aq + ar) + as) | |
246 | + | let l = al | |
247 | + | (at >= 2) | |
248 | + | } | |
249 | + |
github/deemru/w8io/026f985 16.70 ms ◑