tx · ErZh2Cy8xigxkf5jGfEeqexNvWmNJNJKxdWptzDCJWfy 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr: -0.00600000 Waves 2024.10.14 09:24 [3326151] smart account 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr > SELF 0.00000000 Waves
{ "type": 13, "id": "ErZh2Cy8xigxkf5jGfEeqexNvWmNJNJKxdWptzDCJWfy", "fee": 600000, "feeAssetId": null, "timestamp": 1728887144606, "version": 2, "chainId": 84, "sender": "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr", "senderPublicKey": "jXCTQV8PjX2uC9UHBFveupYy9cjhY7stHbzE9cptymw", "proofs": [ "4inB71tWDPZh9fHzAN9i8n9FiECzCcDDNghx31EYyP2BtZ7QZ936RjBdZTEEg3N3RFx8RWMsk8b77C28pC1UBAFW" ], "script": "base64:BwIZCAISAwoBCBIECgICGBIECgICGBIECgICGCYACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIXbWVtZV9pbV9jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8BB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwAMU1RBVFVTX0VNUFRZAAAADFNUQVRVU19SRUFEWQABAAlrU2h1dGRvd24CDnNodXRkb3duX19mbGFnAAtrUHJpY2VBc3NldAIMcHJpY2VfX2Fzc2V0AA5rTGlzdGluZ1ZvbHVtZQIPbGlzdGluZ19fdm9sdW1lAAxrQ3JlYXRpb25GZWUCEnNldHVwX19jcmVhdGlvbkZlZQAMa0N1cnZlVGFyZ2V0AhJzZXR1cF9fY3VydmVUYXJnZXQAEWtWaXJ0dWFsT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yZXNzAQULcG9vbEFkZHJlc3MECW5ld1N0YXR1cwkBDXBhcnNlSW50VmFsdWUBCQCRAwIFBGFyZ3MAAAQOZmFjdG9yeUFjdGlvbnMJAMwIAgkA/AcEBQ5mYWN0b3J5QWRkcmVzcwIMaW50ZWdlckVudHJ5CQDMCAIJAQtrUG9vbFN0YXR1cwEFCXBvb2xJbmRleAkAzAgCBQluZXdTdGF0dXMFA25pbAUDbmlsBQNuaWwJAJQKAgUDbmlsBQ5mYWN0b3J5QWN0aW9ucwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBgDIBd", "height": 3326151, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7NXY6k4e2uyrY1u2DJBfpoDuHgpPZArA2R5uTSP7nBTy Next: 8osuQYpZNKAMJGgbCULjAqTb692jAtAfNCBAQgnq34H7 Diff:
Old | New | Differences | |
---|---|---|---|
78 | 78 | ||
79 | 79 | let H = valueOrElse(getInteger(C, o), 0) | |
80 | 80 | ||
81 | - | let I = | |
81 | + | let I = getBinary(C, r) | |
82 | 82 | ||
83 | 83 | func J (K) = if ((K == b)) | |
84 | 84 | then unit |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "WAVES" | |
7 | 7 | ||
8 | 8 | let c = "meme_im_calculator.ride" | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | func e (f) = ((c + ": ") + f) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func g (f) = throw(e(f)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func h (i) = isDefined(addressFromString(i)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let j = 0 | |
22 | 22 | ||
23 | 23 | let k = 1 | |
24 | 24 | ||
25 | 25 | let l = "shutdown__flag" | |
26 | 26 | ||
27 | 27 | let m = "price__asset" | |
28 | 28 | ||
29 | 29 | let n = "listing__volume" | |
30 | 30 | ||
31 | 31 | let o = "setup__creationFee" | |
32 | 32 | ||
33 | 33 | let p = "setup__curveTarget" | |
34 | 34 | ||
35 | 35 | let q = "setup__virtualLiquidity" | |
36 | 36 | ||
37 | 37 | let r = "pool__contract__hash" | |
38 | 38 | ||
39 | 39 | let s = "last__empty_pool__index" | |
40 | 40 | ||
41 | 41 | let t = "first__empty__pool__index" | |
42 | 42 | ||
43 | 43 | func u (v) = makeString(["pool", toString(v)], a) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func w (i) = makeString(["pool", toString(i)], a) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func x (i) = makeString(["asset", toString(i)], a) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func y (v) = makeString(["pool", "status", toString(v)], a) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | let z = "factory__address" | |
56 | 56 | ||
57 | 57 | let A = { | |
58 | 58 | let B = getString(this, z) | |
59 | 59 | if ($isInstanceOf(B, "String")) | |
60 | 60 | then { | |
61 | 61 | let f = B | |
62 | 62 | addressFromString(f) | |
63 | 63 | } | |
64 | 64 | else if ($isInstanceOf(B, "Unit")) | |
65 | 65 | then unit | |
66 | 66 | else throw("Match error") | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | let C = valueOrErrorMessage(A, e("invalid factory address")) | |
70 | 70 | ||
71 | 71 | let D = valueOrElse(getBoolean(C, l), false) | |
72 | 72 | ||
73 | 73 | let E = valueOrElse(getInteger(C, s), 0) | |
74 | 74 | ||
75 | 75 | let F = valueOrElse(getInteger(C, t), 0) | |
76 | 76 | ||
77 | 77 | let G = valueOrElse(getInteger(C, n), 0) | |
78 | 78 | ||
79 | 79 | let H = valueOrElse(getInteger(C, o), 0) | |
80 | 80 | ||
81 | - | let I = | |
81 | + | let I = getBinary(C, r) | |
82 | 82 | ||
83 | 83 | func J (K) = if ((K == b)) | |
84 | 84 | then unit | |
85 | 85 | else fromBase58String(K) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func L (K) = if ((K == unit)) | |
89 | 89 | then b | |
90 | 90 | else toBase58String(value(K)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func M (N,i) = if ((N == i)) | |
94 | 94 | then true | |
95 | 95 | else g("permission denied") | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func O (N) = M(N, this) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func P (N) = M(N, C) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func Q (i) = { | |
105 | 105 | let B = I | |
106 | 106 | if ($isInstanceOf(B, "ByteVector")) | |
107 | 107 | then { | |
108 | 108 | let R = B | |
109 | 109 | (scriptHash(i) == R) | |
110 | 110 | } | |
111 | 111 | else true | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func S (T) = isDefined(getInteger(C, w(T))) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(U) | |
119 | 119 | func init (V) = { | |
120 | 120 | let W = O(U.caller) | |
121 | 121 | if ((W == W)) | |
122 | 122 | then [StringEntry(z, V)] | |
123 | 123 | else throw("Strict value is not equal to itself.") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(U) | |
129 | 129 | func addEmptyPool (X,Y) = { | |
130 | 130 | let Z = addressFromPublicKey(X) | |
131 | 131 | let aa = (E + 1) | |
132 | 132 | let ab = [if (!(D)) | |
133 | 133 | then true | |
134 | 134 | else g("not allowed (shutdown)"), if (Q(Z)) | |
135 | 135 | then true | |
136 | 136 | else g("pool script hash is not allowed"), if (!(S(Z))) | |
137 | 137 | then true | |
138 | 138 | else g("pool address is already registered")] | |
139 | 139 | if ((ab == ab)) | |
140 | 140 | then { | |
141 | 141 | let ac = [invoke(C, "integerEntry", [s, aa], nil), invoke(C, "stringEntry", [u(aa), toString(Z)], nil), invoke(C, "integerEntry", [w(Z), aa], nil), invoke(C, "integerEntry", [y(aa), j], nil)] | |
142 | 142 | $Tuple2(nil, ac) | |
143 | 143 | } | |
144 | 144 | else throw("Strict value is not equal to itself.") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(U) | |
150 | 150 | func createPool (X,Y) = { | |
151 | 151 | let ad = (G + H) | |
152 | 152 | let ab = [if (!(D)) | |
153 | 153 | then true | |
154 | 154 | else g("not allowed (shutdown)"), P(U.caller), if (((E - F) > 0)) | |
155 | 155 | then true | |
156 | 156 | else g("no empty pools available"), if ((U.payments[0].assetId == unit)) | |
157 | 157 | then true | |
158 | 158 | else g("payment should be in WAVES"), if ((U.payments[0].amount >= ad)) | |
159 | 159 | then true | |
160 | 160 | else g(("payment amount should be greater than " + toString(ad))), if (isDefined(Y[0])) | |
161 | 161 | then true | |
162 | 162 | else g("tokenName is not provided"), if (isDefined(Y[1])) | |
163 | 163 | then true | |
164 | 164 | else g("tokenDescription is not provided"), if (isDefined(Y[2])) | |
165 | 165 | then true | |
166 | 166 | else g("tokenQuantity is not provided")] | |
167 | 167 | if ((ab == ab)) | |
168 | 168 | then { | |
169 | 169 | let ae = (F + 1) | |
170 | 170 | let af = getStringValue(C, u(ae)) | |
171 | 171 | let T = addressFromStringValue(af) | |
172 | 172 | let ag = addressFromPublicKey(X) | |
173 | 173 | let ah = take(af, 8) | |
174 | 174 | let ai = toString(ag) | |
175 | 175 | let aj = Y[0] | |
176 | 176 | let ak = Y[1] | |
177 | 177 | let al = Y[2] | |
178 | 178 | let am = invoke(C, "initPoolInvoke", [af, [ah, ai, aj, ak, al]], [AttachedPayment(U.payments[0].assetId, U.payments[0].amount)]) | |
179 | 179 | if ((am == am)) | |
180 | 180 | then { | |
181 | 181 | let ac = [invoke(C, "integerEntry", [t, ae], nil), invoke(C, "integerEntry", [y(ae), k], nil)] | |
182 | 182 | $Tuple2(nil, ac) | |
183 | 183 | } | |
184 | 184 | else throw("Strict value is not equal to itself.") | |
185 | 185 | } | |
186 | 186 | else throw("Strict value is not equal to itself.") | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | ||
191 | 191 | @Callable(U) | |
192 | 192 | func notifyStatusUpdate (X,Y) = { | |
193 | 193 | let T = addressFromPublicKey(X) | |
194 | 194 | let ab = [if (S(T)) | |
195 | 195 | then true | |
196 | 196 | else g("pool not found")] | |
197 | 197 | if ((ab == ab)) | |
198 | 198 | then { | |
199 | 199 | let ae = getIntegerValue(C, w(T)) | |
200 | 200 | let an = parseIntValue(Y[0]) | |
201 | 201 | let ac = [invoke(C, "integerEntry", [y(ae), an], nil)] | |
202 | 202 | $Tuple2(nil, ac) | |
203 | 203 | } | |
204 | 204 | else throw("Strict value is not equal to itself.") | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 |
github/deemru/w8io/169f3d6 35.91 ms ◑