tx · 89kWQo6McU2xsm6pV9fEbC9mygjJs2ieu9a3SqChrech 3MpWdTGf7g4WqgCF16vRCm47r3jqWR4x3rH: -0.01400000 Waves 2023.09.06 15:20 [2743503] smart account 3MpWdTGf7g4WqgCF16vRCm47r3jqWR4x3rH > SELF 0.00000000 Waves
{ "type": 13, "id": "89kWQo6McU2xsm6pV9fEbC9mygjJs2ieu9a3SqChrech", "fee": 1400000, "feeAssetId": null, "timestamp": 1694002831173, "version": 2, "chainId": 84, "sender": "3MpWdTGf7g4WqgCF16vRCm47r3jqWR4x3rH", "senderPublicKey": "E1AisEe56YET9Mh4nmc7caxvzk8vBN6W6Er2y7XoyLHt", "proofs": [ "2gJytW9N5bcfqiJMRc64yrnSct9Q1SWWdCgGZNsbfbztkhvdTPmPELCGoVb2B2sB6ZZopb9JndfHTAT1P8Lassuy" ], "script": "base64:AAIFAAAAAAAAACAIAhIHCgUIAQgYARIDCgEBEgQKAgEBEgMKAQQSAwoBAQAAAA8AAAAAEGN1cnJlbnRMb2NrSWRLZXkCAAAADWN1cnJlbnRMb2NrSWQAAAAAEGFkbWluQ29udHJhY3RLZXkCAAAADWFkbWluQ29udHJhY3QAAAAAE3RyZWFzdXJ5Q29udHJhY3RLZXkCAAAAEHRyZWFzdXJ5Q29udHJhY3QAAAAADGlzRnJlZXplZEtleQIAAAAJaXNGcmVlemVkAAAAABBpc0NvbnN0cnVjdGVkS2V5AgAAAA1pc0NvbnN0cnVjdGVkAAAAAAx2ZXJpZmllcnNLZXkCAAAACXZlcmlmaWVycwAAAAAQdmVyaWZpZXJzRGF0YUtleQIAAAANdmVyaWZpZXJzRGF0YQAAAAARdW5sb2NrRmVlQmFzaXNLZXkCAAAADnVubG9ja0ZlZUJhc2lzAAAAAANTRVACAAAAAl9fAAAAAAZNVUxUMTAAAAAAAlQL5AABAAAACWFzUGF5bWVudAAAAAEAAAABdgQAAAAHJG1hdGNoMAUAAAABdgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR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5kZXgJAAJZAAAAAQUAAAAEbmV4dAAAAAAAAAAAAQAAAAAAAAAAAAkABRQAAAACCQAAZAAAAAIFAAAAFHZhbGlkYXRlZFByb29mc0NvdW50BQAAAAppc1ZlcmlmaWVkCQAAZAAAAAIFAAAAEmN1cnJlbnRQcm9vZnNJbmRleAAAAAAAAAAAAQQAAAAOdmFsaWRhdGlvbkRhdGEKAAAAAAIkbAUAAAAJdmVyaWZpZXJzCgAAAAACJHMJAAGQAAAAAQUAAAACJGwKAAAAAAUkYWNjMAkABRQAAAACAAAAAAAAAAAAAAAAAAAAAAAACgEAAAAFJGYwXzEAAAACAAAAAiRhAAAAAiRpAwkAAGcAAAACBQAAAAIkaQUAAAACJHMFAAAAAiRhCQEAAAADc3VtAAAAAgUAAAACJGEJAAGRAAAAAgUAAAACJGwFAAAAAiRpCgEAAAAFJGYwXzIAAAACAAAAAiRhAAAAAiRpAwkAAGcAAAACBQAAAAIkaQUAAAACJHMFAAAAAiRhCQAAAgAAAAECAAAAE0xpc3Qgc2l6ZSBleGNlZWRzIDgJAQAAAAUkZjBfMgAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIJAQAAAAUkZjBfMQAAAAIFAAAABSRhY2MwAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAACAAAAAAAAAAADAAAAAAAAAAAEAAAAAAAAAAAFAAAAAAAAAAAGAAAAAAAAAAAHAAAAAAAAAAAICQAAZwAAAAIIBQAAAA52YWxpZGF0aW9uRGF0YQAAAAJfMQUAAAARdmVyaWZpZXJzUmVxdWlyZWTYcYR+", "height": 2743503, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AQHZK71TiM3hwqXmCwXgqDBnmSXk9rieCee1EVpQFsN1 Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = "currentLockId" | |
5 | 5 | ||
6 | - | @Callable(b) | |
7 | - | func call () = [BooleanEntry("Executed_6", true), ScriptTransfer(b.caller, 200000, unit)] | |
6 | + | let b = "adminContract" | |
7 | + | ||
8 | + | let c = "treasuryContract" | |
9 | + | ||
10 | + | let d = "isFreezed" | |
11 | + | ||
12 | + | let e = "isConstructed" | |
13 | + | ||
14 | + | let f = "verifiers" | |
15 | + | ||
16 | + | let g = "verifiersData" | |
17 | + | ||
18 | + | let h = "unlockFeeBasis" | |
19 | + | ||
20 | + | let i = "__" | |
21 | + | ||
22 | + | let j = 10000000000 | |
23 | + | ||
24 | + | func k (l) = { | |
25 | + | let m = l | |
26 | + | if ($isInstanceOf(m, "AttachedPayment")) | |
27 | + | then { | |
28 | + | let n = m | |
29 | + | n | |
30 | + | } | |
31 | + | else throw("fail to cast into AttachedPayment") | |
32 | + | } | |
8 | 33 | ||
9 | 34 | ||
10 | - | @Verifier(c) | |
11 | - | func d () = sigVerify(c.bodyBytes, c.proofs[0], a) | |
35 | + | func o (l) = { | |
36 | + | let m = l | |
37 | + | if ($isInstanceOf(m, "ByteVector")) | |
38 | + | then { | |
39 | + | let n = m | |
40 | + | n | |
41 | + | } | |
42 | + | else throw("fail to cast into ByteVector") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | func p (q) = { | |
47 | + | let m = q | |
48 | + | if ($isInstanceOf(m, "Int")) | |
49 | + | then { | |
50 | + | let r = m | |
51 | + | r | |
52 | + | } | |
53 | + | else throw("fail to cast into Int") | |
54 | + | } | |
55 | + | ||
56 | + | ||
57 | + | func s (t,u,v,w) = { | |
58 | + | let x = (height - t) | |
59 | + | if ((x >= u)) | |
60 | + | then (v - w) | |
61 | + | else { | |
62 | + | let y = fraction(v, j, u, HALFUP) | |
63 | + | let z = fraction(y, x, j) | |
64 | + | (z - w) | |
65 | + | } | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | func A (v) = { | |
70 | + | let B = getIntegerValue(h) | |
71 | + | if ((B == 0)) | |
72 | + | then 0 | |
73 | + | else 0 | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | @Callable(C) | |
78 | + | func constructor (D,E,F,G,H) = { | |
79 | + | let m = getBoolean(e) | |
80 | + | if ($isInstanceOf(m, "Boolean")) | |
81 | + | then throw("Constructor can be called just once") | |
82 | + | else { | |
83 | + | let I = size(G) | |
84 | + | if ((I > 8)) | |
85 | + | then throw("Max verifiers number is 8") | |
86 | + | else { | |
87 | + | let J = makeString(G, i) | |
88 | + | [StringEntry(b, D), IntegerEntry(a, 0), BooleanEntry(d, false), BooleanEntry(e, true), IntegerEntry(h, E), StringEntry(c, F), StringEntry(f, J), StringEntry(g, ((toString(I) + i) + toString(H)))] | |
89 | + | } | |
90 | + | } | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | @Callable(C) | |
96 | + | func lock (K) = if (getBooleanValue(d)) | |
97 | + | then throw("Contract operations is suspended") | |
98 | + | else { | |
99 | + | let L = k(C.payments[0]) | |
100 | + | if ((0 >= L.amount)) | |
101 | + | then throw("Amount must be positive") | |
102 | + | else if ((1440 > K)) | |
103 | + | then throw("24 hours is minimum vesting period") | |
104 | + | else { | |
105 | + | let M = getIntegerValue(a) | |
106 | + | let N = toBase58String(C.caller.bytes) | |
107 | + | let O = toBase58String(o(L.assetId)) | |
108 | + | let P = ((N + i) + toString(M)) | |
109 | + | let Q = ((((((((toString(height) + i) + toString(L.amount)) + i) + "0") + i) + toString(K)) + i) + O) | |
110 | + | [StringEntry(P, Q), IntegerEntry(a, (M + 1))] | |
111 | + | } | |
112 | + | } | |
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | @Callable(C) | |
117 | + | func withdraw (v,R) = if (getBooleanValue(d)) | |
118 | + | then throw("Contract operations is suspended") | |
119 | + | else if (if ((0 >= v)) | |
120 | + | then true | |
121 | + | else (0 > R)) | |
122 | + | then throw("Amount must be positive or wrong lock id") | |
123 | + | else { | |
124 | + | let N = toBase58String(C.caller.bytes) | |
125 | + | let P = ((N + i) + toString(R)) | |
126 | + | let S = split(getStringValue(P), i) | |
127 | + | if ((size(S) != 5)) | |
128 | + | then throw("Internal error") | |
129 | + | else { | |
130 | + | let T = S[0] | |
131 | + | let U = S[1] | |
132 | + | let V = S[2] | |
133 | + | let W = S[3] | |
134 | + | let X = S[4] | |
135 | + | let Y = s(p(T), p(W), p(U), p(V)) | |
136 | + | if ((v > Y)) | |
137 | + | then throw(("Requested amount is two big, max available amount is: " + toString(Y))) | |
138 | + | else { | |
139 | + | let Z = ((((((((T + i) + U) + i) + toString((p(V) + v))) + i) + W) + i) + X) | |
140 | + | [StringEntry(P, Z), ScriptTransfer(C.caller, v, fromBase58String(X))] | |
141 | + | } | |
142 | + | } | |
143 | + | } | |
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | @Callable(C) | |
148 | + | func freezeContract (aa) = { | |
149 | + | let ab = getStringValue(b) | |
150 | + | if ((ab != toBase58String(C.caller.bytes))) | |
151 | + | then throw("Only admin contract can call this function") | |
152 | + | else [BooleanEntry(d, !(aa))] | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | @Callable(C) | |
158 | + | func changeFeeBasis (ac) = { | |
159 | + | let ab = getStringValue(b) | |
160 | + | if ((ab != toBase58String(C.caller.bytes))) | |
161 | + | then throw("Only admin contract can call this function") | |
162 | + | else if ((0 > ac)) | |
163 | + | then throw("Fee basis can't be negative") | |
164 | + | else if ((ac > 1000)) | |
165 | + | then throw("Fee basis can't be bigger than 10 percent") | |
166 | + | else [IntegerEntry(h, ac)] | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | @Verifier(ad) | |
171 | + | func ae () = { | |
172 | + | let G = split(getStringValue(f), i) | |
173 | + | let af = split(getStringValue(g), i) | |
174 | + | let I = p(af[0]) | |
175 | + | let ag = p(af[1]) | |
176 | + | func ah (ai,aj) = { | |
177 | + | let ak = ai._1 | |
178 | + | let al = ai._2 | |
179 | + | let am = if (sigVerify(ad.bodyBytes, ad.proofs[al], fromBase58String(aj))) | |
180 | + | then 1 | |
181 | + | else 0 | |
182 | + | $Tuple2((ak + am), (al + 1)) | |
183 | + | } | |
184 | + | ||
185 | + | let an = { | |
186 | + | let ao = G | |
187 | + | let ap = size(ao) | |
188 | + | let aq = $Tuple2(0, 0) | |
189 | + | func ar (as,at) = if ((at >= ap)) | |
190 | + | then as | |
191 | + | else ah(as, ao[at]) | |
192 | + | ||
193 | + | func au (as,at) = if ((at >= ap)) | |
194 | + | then as | |
195 | + | else throw("List size exceeds 8") | |
196 | + | ||
197 | + | au(ar(ar(ar(ar(ar(ar(ar(ar(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
198 | + | } | |
199 | + | (an._1 >= ag) | |
200 | + | } | |
12 | 201 |
github/deemru/w8io/169f3d6 28.25 ms ◑