tx · 8HvNPNdP97BGicKve75fd4YnVgPqpnmkXD7czAiA9U7x 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr: -0.00500000 Waves 2024.10.08 11:16 [3317591] smart account 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr > SELF 0.00000000 Waves
{ "type": 13, "id": "8HvNPNdP97BGicKve75fd4YnVgPqpnmkXD7czAiA9U7x", "fee": 500000, "feeAssetId": null, "timestamp": 1728375423214, "version": 2, "chainId": 84, "sender": "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr", "senderPublicKey": "jXCTQV8PjX2uC9UHBFveupYy9cjhY7stHbzE9cptymw", "proofs": [ "3Pozuq1YUGbQX6DpyPNwvkNK25GM8RUk7NAjkgVcH1EnaAKh6VbLxxsh99Vb1v6fxnygsk2CJLGxwSjBpJRShV7m" ], "script": "base64:BwITCAISAwoBCBIECgICGBIECgICGCAACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIXbWVtZV9pbV9jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8BB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwAMU1RBVFVTX0VNUFRZAAAADFNUQVRVU19SRUFEWQABAAlrU2h1dGRvd24CDnNodXRkb3duX19mbGFnAAtrUHJpY2VBc3NldAIMcHJpY2VfX2Fzc2V0AA5rTGlzdGluZ1ZvbHVtZQIPbGlzdGluZ19fdm9sdW1lABFrUG9vbENvbnRyYWN0SGFzaAIUcG9vbF9fY29udHJhY3RfX2hhc2gAE2tMYXN0RW1wdHlQb29sSW5kZXgCF2xhc3RfX2VtcHR5X3Bvb2xfX2luZGV4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UkVBRFkFA25pbAUDbmlsBQNuaWwJAJQKAgUDbmlsBQ5mYWN0b3J5QWN0aW9ucwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgC7vCwg", "height": 3317591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7JUWuphM5h4ZdpxN3hyfaKugfCUf64xuKNgXxqwoWQP2 Next: 2AW3Y8JnUxNYfeiLHxu249WqEXTva17XLYJ6uf6VAEi8 Diff:
Old | New | Differences | |
---|---|---|---|
151 | 151 | let ab = Q[0] | |
152 | 152 | let ac = Q[1] | |
153 | 153 | let ad = Q[2] | |
154 | - | let ae = invoke(z, "initPoolInvoke", [[Z, aa, ab, ac, ad]], [AttachedPayment(M.payments[0].assetId, M.payments[0].amount)]) | |
154 | + | let ae = invoke(z, "initPoolInvoke", [X, [Z, aa, ab, ac, ad]], [AttachedPayment(M.payments[0].assetId, M.payments[0].amount)]) | |
155 | 155 | if ((ae == ae)) | |
156 | 156 | then { | |
157 | 157 | let U = [invoke(z, "integerEntry", [q, V], nil), invoke(z, "integerEntry", [v(V), k], nil)] |
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 = "pool__contract__hash" | |
32 | 32 | ||
33 | 33 | let p = "last__empty_pool__index" | |
34 | 34 | ||
35 | 35 | let q = "first__empty__pool__index" | |
36 | 36 | ||
37 | 37 | func r (s) = makeString(["pool", toString(s)], a) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func t (i) = makeString(["pool", toString(i)], a) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func u (i) = makeString(["asset", toString(i)], a) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func v (s) = makeString(["pool", "status", toString(s)], a) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | let w = "factory__address" | |
50 | 50 | ||
51 | 51 | let x = { | |
52 | 52 | let y = getString(this, w) | |
53 | 53 | if ($isInstanceOf(y, "String")) | |
54 | 54 | then { | |
55 | 55 | let f = y | |
56 | 56 | addressFromString(f) | |
57 | 57 | } | |
58 | 58 | else if ($isInstanceOf(y, "Unit")) | |
59 | 59 | then unit | |
60 | 60 | else throw("Match error") | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | let z = valueOrErrorMessage(x, e("invalid factory address")) | |
64 | 64 | ||
65 | 65 | let A = valueOrElse(getBoolean(z, l), false) | |
66 | 66 | ||
67 | 67 | let B = valueOrElse(getInteger(z, p), 0) | |
68 | 68 | ||
69 | 69 | let C = valueOrElse(getInteger(z, q), 0) | |
70 | 70 | ||
71 | 71 | let D = valueOrElse(getInteger(z, n), 0) | |
72 | 72 | ||
73 | 73 | func E (F) = if ((F == b)) | |
74 | 74 | then unit | |
75 | 75 | else fromBase58String(F) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func G (F) = if ((F == unit)) | |
79 | 79 | then b | |
80 | 80 | else toBase58String(value(F)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func H (I,i) = if ((I == i)) | |
84 | 84 | then true | |
85 | 85 | else g("permission denied") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func J (I) = H(I, this) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func K (I) = H(I, z) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func L () = valueOrErrorMessage(getBinary(z, o), e("pool contract script hash is not set")) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(M) | |
98 | 98 | func init (N) = { | |
99 | 99 | let O = J(M.caller) | |
100 | 100 | if ((O == O)) | |
101 | 101 | then [StringEntry(w, N)] | |
102 | 102 | else throw("Strict value is not equal to itself.") | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | ||
107 | 107 | @Callable(M) | |
108 | 108 | func addEmptyPool (P,Q) = { | |
109 | 109 | let R = addressFromPublicKey(P) | |
110 | 110 | let S = (B + 1) | |
111 | 111 | let T = [if (!(A)) | |
112 | 112 | then true | |
113 | 113 | else g("not allowed (shutdown)"), if (!(isDefined(getInteger(z, t(R))))) | |
114 | 114 | then true | |
115 | 115 | else g("pool address is already registered")] | |
116 | 116 | if ((T == T)) | |
117 | 117 | then { | |
118 | 118 | let U = [invoke(z, "integerEntry", [p, S], nil), invoke(z, "stringEntry", [r(S), toString(R)], nil), invoke(z, "integerEntry", [t(R), S], nil), invoke(z, "integerEntry", [v(S), j], nil)] | |
119 | 119 | $Tuple2(nil, U) | |
120 | 120 | } | |
121 | 121 | else throw("Strict value is not equal to itself.") | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(M) | |
127 | 127 | func createPool (P,Q) = { | |
128 | 128 | let T = [if (!(A)) | |
129 | 129 | then true | |
130 | 130 | else g("not allowed (shutdown)"), K(M.caller), if (((B - C) > 0)) | |
131 | 131 | then true | |
132 | 132 | else g("no empty pools available"), if ((M.payments[0].assetId == unit)) | |
133 | 133 | then true | |
134 | 134 | else g("payment should be in WAVES"), if ((M.payments[0].amount > D)) | |
135 | 135 | then true | |
136 | 136 | else g("payment amount should be greater than listing volume"), if (isDefined(Q[0])) | |
137 | 137 | then true | |
138 | 138 | else g("tokenName is not provided"), if (isDefined(Q[1])) | |
139 | 139 | then true | |
140 | 140 | else g("tokenDescription is not provided"), if (isDefined(Q[2])) | |
141 | 141 | then true | |
142 | 142 | else g("tokenQuantity is not provided")] | |
143 | 143 | if ((T == T)) | |
144 | 144 | then { | |
145 | 145 | let V = (C + 1) | |
146 | 146 | let W = getStringValue(z, r(V)) | |
147 | 147 | let X = addressFromStringValue(W) | |
148 | 148 | let Y = addressFromPublicKey(P) | |
149 | 149 | let Z = toBase58String(take(X.bytes, 8)) | |
150 | 150 | let aa = toString(Y) | |
151 | 151 | let ab = Q[0] | |
152 | 152 | let ac = Q[1] | |
153 | 153 | let ad = Q[2] | |
154 | - | let ae = invoke(z, "initPoolInvoke", [[Z, aa, ab, ac, ad]], [AttachedPayment(M.payments[0].assetId, M.payments[0].amount)]) | |
154 | + | let ae = invoke(z, "initPoolInvoke", [X, [Z, aa, ab, ac, ad]], [AttachedPayment(M.payments[0].assetId, M.payments[0].amount)]) | |
155 | 155 | if ((ae == ae)) | |
156 | 156 | then { | |
157 | 157 | let U = [invoke(z, "integerEntry", [q, V], nil), invoke(z, "integerEntry", [v(V), k], nil)] | |
158 | 158 | $Tuple2(nil, U) | |
159 | 159 | } | |
160 | 160 | else throw("Strict value is not equal to itself.") | |
161 | 161 | } | |
162 | 162 | else throw("Strict value is not equal to itself.") | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 |
github/deemru/w8io/169f3d6 36.27 ms ◑