tx · 67Mtps1YjhhcDCD3CexZ6oKXa7dinBagYY2RF6sGrcnZ 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9: -0.01400000 Waves 2021.07.14 18:15 [1613460] smart account 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9 > SELF 0.00000000 Waves
{ "type": 13, "id": "67Mtps1YjhhcDCD3CexZ6oKXa7dinBagYY2RF6sGrcnZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1626275670818, "version": 2, "chainId": 84, "sender": "3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9", "senderPublicKey": "D1X9WatF6ARMCmm3jC4Ex5Wd5VQ3LY8i1xbHNqeHqeAa", "proofs": [ "3yM7AaVUgbokMGYsMQkrvWDk4GRTnvzCdMHYfpXEpM9eVmrUxRGP4rjAiS7eUdfDGnBBMmRhLEF1dZsBNk7D7YxB", "5xAyWFptCfRveuCiSkza8oWW77kzaYpoQucbSKzKYcfB6NDgHUGxPigLpU5zuBhzdkvjQ73yezHWgURbV19dmmjw" ], "script": "base64:AAIFAAAAAAAAABQIAhIECgIIARIECgIICBIECgIICAAAABYAAAAAEGtleVBvb2xzTGlzdE5hbWUCAAAABXBvb2xzAAAAABFrZXlQcmVmaXhQb29sTmFtZQIAAAAFcG9vbF8AAAAAEmtleVByZWZpeFBvb2xJbmRleAIAAAAGaW5kZXhfAAAAABFrZXlJbml0UG9vbEhlaWdodAIAAAAQaW5pdF9wb29sX2hpZ2h0XwAAAAASa2V5Q29uZmlybWVkQXNzZXRzAgAAABBjb25maXJtZWRfYXNzZXRzAAAAABBrZXlBc3NldFByaW9yaXR5AgAAAA9hc3NldF9wcmlvcml0eV8AAAAAB2tleVBhaXICAAAABXBhaXJfAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAD2tleUFkbWluUHViS2V5MQIAAAALYWRtaW5fcHViXzEAAAAAD2tleUFkbWlu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3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBQAAAA1zaWduZWRCeUFkbWluCQAAAgAAAAECAAAAC01hdGNoIGVycm9y8eXPTg==", "height": 1613460, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9YRENuSipaY15PJviXKxVJ6xcfBs5Q8Z14Pp1zpUGs8m Next: 2S2HvreMeWvdiAWVska6q8ECs5FLmXJPx1XVvZmmsR9n Diff:
Old | New | Differences | |
---|---|---|---|
143 | 143 | let aa = if ((Y.dApp == this)) | |
144 | 144 | then containsElement(["addPool"], Y.function) | |
145 | 145 | else false | |
146 | - | if (if (if (V) | |
146 | + | let ab = if ((Y.dApp == this)) | |
147 | + | then containsElement(["setPriority"], Y.function) | |
148 | + | else false | |
149 | + | if (if (if (if (V) | |
147 | 150 | then (size(Y.payments) == 0) | |
148 | 151 | else false) | |
149 | 152 | then Z | |
153 | 156 | then (size(Y.payments) == 0) | |
154 | 157 | else false) | |
155 | 158 | then aa | |
159 | + | else false) | |
160 | + | then true | |
161 | + | else if (if (V) | |
162 | + | then (size(Y.payments) == 0) | |
163 | + | else false) | |
164 | + | then ab | |
156 | 165 | else false | |
157 | 166 | } | |
158 | 167 | else if (if ($isInstanceOf(p, "Order")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "pools" | |
5 | 5 | ||
6 | 6 | let b = "pool_" | |
7 | 7 | ||
8 | 8 | let c = "index_" | |
9 | 9 | ||
10 | 10 | let d = "init_pool_hight_" | |
11 | 11 | ||
12 | 12 | let e = "confirmed_assets" | |
13 | 13 | ||
14 | 14 | let f = "asset_priority_" | |
15 | 15 | ||
16 | 16 | let g = "pair_" | |
17 | 17 | ||
18 | 18 | let h = "A_asset_id" | |
19 | 19 | ||
20 | 20 | let i = "B_asset_id" | |
21 | 21 | ||
22 | 22 | let j = "admin_pub_1" | |
23 | 23 | ||
24 | 24 | let k = "admin_pub_2" | |
25 | 25 | ||
26 | 26 | let l = "admin_pub_3" | |
27 | 27 | ||
28 | 28 | let m = Address(base58'3N1cPjixuHTujhGvb5HQoFvGt4fkUG8o3KF') | |
29 | 29 | ||
30 | 30 | func n (o) = { | |
31 | 31 | let p = getString(m, o) | |
32 | 32 | if ($isInstanceOf(p, "String")) | |
33 | 33 | then { | |
34 | 34 | let q = p | |
35 | 35 | fromBase58String(q) | |
36 | 36 | } | |
37 | 37 | else { | |
38 | 38 | let r = p | |
39 | 39 | throw("Admin public key is empty") | |
40 | 40 | } | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | let s = n(j) | |
45 | 45 | ||
46 | 46 | let t = n(k) | |
47 | 47 | ||
48 | 48 | let u = n(l) | |
49 | 49 | ||
50 | 50 | let v = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
51 | 51 | ||
52 | 52 | let w = { | |
53 | 53 | let p = getString(this, a) | |
54 | 54 | if ($isInstanceOf(p, "String")) | |
55 | 55 | then { | |
56 | 56 | let q = p | |
57 | 57 | split(q, ",") | |
58 | 58 | } | |
59 | 59 | else { | |
60 | 60 | let r = p | |
61 | 61 | nil | |
62 | 62 | } | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | func x (y) = if ((y.caller == this)) | |
66 | 66 | then unit | |
67 | 67 | else throw("Only the Oracle itself can invoke this function") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func z (A) = { | |
71 | 71 | let B = valueOrElse(indexOf(A, "_"), -1) | |
72 | 72 | let C = valueOrElse(lastIndexOf(A, "_"), -1) | |
73 | 73 | let D = if (if ((B == C)) | |
74 | 74 | then (B > 0) | |
75 | 75 | else false) | |
76 | 76 | then (B != (size(A) - 1)) | |
77 | 77 | else false | |
78 | 78 | if (D) | |
79 | 79 | then A | |
80 | 80 | else throw("Pool name must consist of two asset names separated by an underscore character") | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func E (F) = toString(valueOrErrorMessage(addressFromString(F), (("Can't parse \"" + F) + "\" as address"))) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(y) | |
88 | 88 | func setPriority (G,H) = valueOrElse(x(y), if ((0 > H)) | |
89 | 89 | then throw("Priority must be positive") | |
90 | 90 | else [IntegerEntry((f + G), H)]) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(y) | |
95 | 95 | func addPool (I,A) = valueOrElse(x(y), { | |
96 | 96 | let J = E(I) | |
97 | 97 | let K = (b + J) | |
98 | 98 | let L = (c + J) | |
99 | 99 | let M = valueOrErrorMessage(getString(value(addressFromString(I)), h), "Asset id A is incorrect") | |
100 | 100 | let N = valueOrErrorMessage(getString(value(addressFromString(I)), i), "Asset id B is incorrect") | |
101 | 101 | let O = getString(this, K) | |
102 | 102 | if (isDefined(O)) | |
103 | 103 | then throw((((("Pool with address \"" + J) + "\" is already defined with name \"") + value(O)) + "\"")) | |
104 | 104 | else [IntegerEntry(L, size(w)), IntegerEntry((d + I), height), StringEntry(K, z(A)), StringEntry((((g + M) + "_") + N), I), StringEntry(a, makeString((w :+ J), ","))] | |
105 | 105 | }) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | ||
109 | 109 | @Callable(y) | |
110 | 110 | func renamePool (I,P) = valueOrElse(x(y), { | |
111 | 111 | let J = E(I) | |
112 | 112 | let K = (b + J) | |
113 | 113 | let O = getString(this, K) | |
114 | 114 | if (isDefined(O)) | |
115 | 115 | then [StringEntry(K, z(P))] | |
116 | 116 | else throw((("Pool with address \"" + J) + "\" has not yet been added")) | |
117 | 117 | }) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Verifier(Q) | |
121 | 121 | func R () = { | |
122 | 122 | let S = if (sigVerify(Q.bodyBytes, Q.proofs[0], s)) | |
123 | 123 | then 1 | |
124 | 124 | else 0 | |
125 | 125 | let T = if (sigVerify(Q.bodyBytes, Q.proofs[1], t)) | |
126 | 126 | then 1 | |
127 | 127 | else 0 | |
128 | 128 | let U = if (sigVerify(Q.bodyBytes, Q.proofs[2], u)) | |
129 | 129 | then 1 | |
130 | 130 | else 0 | |
131 | 131 | let V = (((S + T) + U) >= 2) | |
132 | 132 | let W = if (sigVerify(Q.bodyBytes, Q.proofs[2], v)) | |
133 | 133 | then 1 | |
134 | 134 | else 0 | |
135 | 135 | let X = ((((S + T) + U) + W) >= 1) | |
136 | 136 | let p = Q | |
137 | 137 | if ($isInstanceOf(p, "InvokeScriptTransaction")) | |
138 | 138 | then { | |
139 | 139 | let Y = p | |
140 | 140 | let Z = if ((Y.dApp == this)) | |
141 | 141 | then containsElement(["renamePool"], Y.function) | |
142 | 142 | else false | |
143 | 143 | let aa = if ((Y.dApp == this)) | |
144 | 144 | then containsElement(["addPool"], Y.function) | |
145 | 145 | else false | |
146 | - | if (if (if (V) | |
146 | + | let ab = if ((Y.dApp == this)) | |
147 | + | then containsElement(["setPriority"], Y.function) | |
148 | + | else false | |
149 | + | if (if (if (if (V) | |
147 | 150 | then (size(Y.payments) == 0) | |
148 | 151 | else false) | |
149 | 152 | then Z | |
150 | 153 | else false) | |
151 | 154 | then true | |
152 | 155 | else if (if (X) | |
153 | 156 | then (size(Y.payments) == 0) | |
154 | 157 | else false) | |
155 | 158 | then aa | |
159 | + | else false) | |
160 | + | then true | |
161 | + | else if (if (V) | |
162 | + | then (size(Y.payments) == 0) | |
163 | + | else false) | |
164 | + | then ab | |
156 | 165 | else false | |
157 | 166 | } | |
158 | 167 | else if (if ($isInstanceOf(p, "Order")) | |
159 | 168 | then true | |
160 | 169 | else if ($isInstanceOf(p, "DataTransaction")) | |
161 | 170 | then true | |
162 | 171 | else if ($isInstanceOf(p, "SponsorFeeTransaction")) | |
163 | 172 | then true | |
164 | 173 | else if ($isInstanceOf(p, "SetScriptTransaction")) | |
165 | 174 | then true | |
166 | 175 | else if ($isInstanceOf(p, "CreateAliasTransaction")) | |
167 | 176 | then true | |
168 | 177 | else if ($isInstanceOf(p, "LeaseCancelTransaction")) | |
169 | 178 | then true | |
170 | 179 | else if ($isInstanceOf(p, "LeaseTransaction")) | |
171 | 180 | then true | |
172 | 181 | else if ($isInstanceOf(p, "IssueTransaction")) | |
173 | 182 | then true | |
174 | 183 | else if ($isInstanceOf(p, "UpdateAssetInfoTransaction")) | |
175 | 184 | then true | |
176 | 185 | else if ($isInstanceOf(p, "InvokeScriptTransaction")) | |
177 | 186 | then true | |
178 | 187 | else if ($isInstanceOf(p, "SetAssetScriptTransaction")) | |
179 | 188 | then true | |
180 | 189 | else if ($isInstanceOf(p, "TransferTransaction")) | |
181 | 190 | then true | |
182 | 191 | else if ($isInstanceOf(p, "ExchangeTransaction")) | |
183 | 192 | then true | |
184 | 193 | else if ($isInstanceOf(p, "MassTransferTransaction")) | |
185 | 194 | then true | |
186 | 195 | else if ($isInstanceOf(p, "BurnTransaction")) | |
187 | 196 | then true | |
188 | 197 | else $isInstanceOf(p, "ReissueTransaction")) | |
189 | 198 | then V | |
190 | 199 | else throw("Match error") | |
191 | 200 | } | |
192 | 201 |
github/deemru/w8io/169f3d6 42.57 ms ◑