tx · 5Hby5paWZK9a5daJyVhbjTCzEaTBCxP2nb4h9L9ZGFf2 3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt: -0.01400000 Waves 2021.10.07 13:30 [1735693] smart account 3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt > SELF 0.00000000 Waves
{ "type": 13, "id": "5Hby5paWZK9a5daJyVhbjTCzEaTBCxP2nb4h9L9ZGFf2", "fee": 1400000, "feeAssetId": null, "timestamp": 1633602688031, "version": 1, "sender": "3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt", "senderPublicKey": "GptvgtKyc2q5oyNw5gDtNYbcX6wsDyRMVRaAuFUZmzfy", "proofs": [ "5otpJjmnvNwiAP2aYnRSDagotXwVZbZndq9YfmfTGfbqWQFJjZErUu2q6oTRbhys7NVJyQUu6MitvHzHUeyo4gzE" ], "script": "base64:AAIFAAAAAAAAACgIAhIKCggICAgICAgIARIICgYICAgICAESBAoCCAESAwoBARIDCgEBAAAAIQAAAAARZGVjaW1hbHNNdWx0UHJpY2UJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAANTRVACAAAAAl9fAAAAAApQb29sQWN0aXZlAAAAAAAAAAABAAAAAA9Qb29sUHV0RGlzYWJsZWQAAAAAAAAAAAIAAAAAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAAAAAAAAAAMAAAAADFBvb2xTaHV0ZG93bgAAAAAAAAAABAAAAAASaWR4SW50ZXJuYWxBc3NldElkAAAAAAAAAAABAAAAAA9pZHhSZXN1dEFjdGlvbnMAAAAAAAAAAAIAAAAAIGlkeElmQXNzZXRJZENhbGN1bGF0aW9uUGVyZm9ybWVkAAAAAAAAAAADAQAAABBrZXlGYWN0b3J5Q29uZmlnAAAAAAIAAAARJXNfX2ZhY3RvcnlDb25maWcBAAAAD2tleUxwVG9rZW5zTGlzdAAAAAACAAAAECVzX19scFRva2Vuc0xpc3QBAAAAEWtleVBvb2xTY3JpcHRI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YW1vdW50BAAAAA9pbkFtb3VudEFzc2V0SWQJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAQAAAAabHBBc3NldFJlcXVlc3RlZEZvckJ1cm5pbmcJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCIAAAABCQEAAAAea2V5TWFwcGluZ1Bvb2xDb250cmFjVG9MUEFzc2V0AAAAAQkABCUAAAABBQAAAAZjYWxsZXICAAAAHUludmFsaWQgTFAgYWRkcmVzcyBjYWxsZWQgbWUuAwkBAAAAAiE9AAAAAgUAAAAPaW5BbW91bnRBc3NldElkBQAAABpscEFzc2V0UmVxdWVzdGVkRm9yQnVybmluZwkAAAIAAAABAgAAABVJbnZhbGlkIGFzc2V0IHBhc3NlZC4DCQEAAAACIT0AAAACBQAAAAxhbW91bnRUb0J1cm4FAAAADXBheW1lbnRBbW91bnQJAAACAAAAAQIAAAAWSW52YWxpZCBhbW91bnQgcGFzc2VkLgQAAAAHbHBBc3NldAkAAlkAAAABBQAAABpscEFzc2V0UmVxdWVzdGVkRm9yQnVybmluZwkABRQAAAACCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAHbHBBc3NldAUAAAAMYW1vdW50VG9CdXJuBQAAAANuaWwCAAAAB3N1Y2Nlc3MAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlebRz8+k=", "chainId": 84, "height": 1735693, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FbdNVGTqCJ2DbJG2rj3fqtPQtL8mmHcpkoqEyhrCi6oZ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | func j () = "%s__factoryConfig" | |
23 | 23 | ||
24 | 24 | ||
25 | - | func k () = "%s | |
25 | + | func k () = "%s__lpTokensList" | |
26 | 26 | ||
27 | 27 | ||
28 | - | func l () = "%s__ | |
28 | + | func l () = "%s%s__pool__scriptHash" | |
29 | 29 | ||
30 | 30 | ||
31 | - | func m () = "%s__ | |
31 | + | func m () = "%s__priceDecimals" | |
32 | 32 | ||
33 | 33 | ||
34 | - | func n () = "%s__ | |
34 | + | func n () = "%s__shutdown" | |
35 | 35 | ||
36 | 36 | ||
37 | - | func o ( | |
37 | + | func o () = "%s__nextInternalAssetId" | |
38 | 38 | ||
39 | 39 | ||
40 | - | func | |
40 | + | func p (q) = ("%s%s__poolWeight__" + q) | |
41 | 41 | ||
42 | 42 | ||
43 | - | func | |
43 | + | func r (s) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(s)) | |
44 | 44 | ||
45 | 45 | ||
46 | - | func | |
46 | + | func t (u) = ("%s%s%s__mappings__baseAsset2internalId__" + u) | |
47 | 47 | ||
48 | 48 | ||
49 | - | func | |
49 | + | func v (w,x) = (((("%d%d%s__" + w) + "__") + x) + "__config") | |
50 | 50 | ||
51 | 51 | ||
52 | - | func | |
52 | + | func y (z) = (("%s%s%s__" + z) + "__mappings__lpAsset2Pool") | |
53 | 53 | ||
54 | 54 | ||
55 | - | func | |
55 | + | func A (B,C) = (((("%d%d%s%s__" + B) + "__") + C) + "__mappings__PoolAssets2LpAsset") | |
56 | 56 | ||
57 | 57 | ||
58 | - | func | |
58 | + | func D (E) = (("%s%s%s__" + E) + "__mappings__poolContract2PoolAssets") | |
59 | 59 | ||
60 | 60 | ||
61 | - | func F ( | |
61 | + | func F (B,C) = (((("%d%d%s%s__" + toString(B)) + "__") + toString(C)) + "__mappings__poolAssets2PoolContract") | |
62 | 62 | ||
63 | 63 | ||
64 | - | func G ( | |
64 | + | func G (E) = (("%s%s%s__" + E) + "__mappings__poolContract2LpAsset") | |
65 | 65 | ||
66 | 66 | ||
67 | - | func H ( | |
67 | + | func H (z) = (("%s%s%s__" + z) + "__mappings__lpAsset2PoolContract") | |
68 | 68 | ||
69 | 69 | ||
70 | - | func | |
70 | + | func I (J) = valueOrErrorMessage(getString(this, J), ("No data for this.key=" + J)) | |
71 | 71 | ||
72 | 72 | ||
73 | - | func K ( | |
73 | + | func K (J) = valueOrErrorMessage(getBoolean(this, J), ("No data for this.key=" + J)) | |
74 | 74 | ||
75 | 75 | ||
76 | - | func L ( | |
76 | + | func L (J) = valueOrErrorMessage(getInteger(this, J), ("No data for this.key=" + J)) | |
77 | 77 | ||
78 | 78 | ||
79 | - | func | |
79 | + | func M (N,O,P,Q,R,S,T) = makeString(["%s%s%s%s%s%s", N, O, P, Q, R, S, T], b) | |
80 | 80 | ||
81 | 81 | ||
82 | - | func | |
82 | + | func U (q,V,W,X,Y,Z,aa,ab,ac,ad) = makeString(["%s%d%s%s%s%d%d%d%d%d%s", q, V, W, X, Y, toString(Z), toString(aa), toString(ab), toString(ac), toString(ad)], b) | |
83 | 83 | ||
84 | 84 | ||
85 | - | func ag (ah,ai) = { | |
86 | - | let aj = valueOrElse(getInteger(this, s(ah)), 0) | |
87 | - | let ak = valueOrElse(getInteger(this, n()), 0) | |
88 | - | let al = if ((aj == 0)) | |
85 | + | func ae (af,ag) = makeString(["%d%d", toString(af), toString(ag)], b) | |
86 | + | ||
87 | + | ||
88 | + | func ah (ai,aj) = { | |
89 | + | let ak = valueOrElse(getInteger(this, t(ai)), 0) | |
90 | + | let al = valueOrElse(getInteger(this, o()), 0) | |
91 | + | let am = if ((ak == 0)) | |
89 | 92 | then { | |
90 | - | let | |
91 | - | $Tuple3( | |
93 | + | let an = (al + aj) | |
94 | + | $Tuple3(an, [IntegerEntry(o(), an), IntegerEntry(t(ai), an), StringEntry(r(an), ai)], true) | |
92 | 95 | } | |
93 | - | else $Tuple3( | |
94 | - | | |
96 | + | else $Tuple3(ak, nil, false) | |
97 | + | am | |
95 | 98 | } | |
96 | 99 | ||
97 | 100 | ||
98 | - | @Callable(an) | |
99 | - | func constructor (ao,ap,O,P,Q,R,aq) = if ((an.caller != this)) | |
101 | + | func ao (ap) = { | |
102 | + | let aq = getString(this, k()) | |
103 | + | if (isDefined(aq)) | |
104 | + | then ((value(aq) + b) + ap) | |
105 | + | else ap | |
106 | + | } | |
107 | + | ||
108 | + | ||
109 | + | @Callable(ar) | |
110 | + | func constructor (as,at,P,Q,R,S,au,av) = if ((ar.caller != this)) | |
100 | 111 | then throw("permissions denied") | |
101 | - | else [StringEntry(j(), | |
112 | + | else [StringEntry(j(), M(as, at, P, Q, R, S, au)), IntegerEntry(m(), av)] | |
102 | 113 | ||
103 | 114 | ||
104 | 115 | ||
105 | - | @Callable( | |
106 | - | func activateNewPool ( | |
116 | + | @Callable(ar) | |
117 | + | func activateNewPool (q,X,Y,aw,ax,ay) = if ((ar.caller != this)) | |
107 | 118 | then throw("permissions denied") | |
108 | - | else if (isDefined(getString( | |
109 | - | then throw((("Pool address " + | |
119 | + | else if (isDefined(getString(D(q)))) | |
120 | + | then throw((("Pool address " + q) + " already registered.")) | |
110 | 121 | else { | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
122 | + | let az = ah(X, 1) | |
123 | + | let aA = az._1 | |
124 | + | let aB = ah(Y, if (az._3) | |
114 | 125 | then 2 | |
115 | 126 | else 1) | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | if (isDefined( | |
121 | - | then throw((((("Pool " + | |
127 | + | let aC = aB._1 | |
128 | + | let aD = valueOrErrorMessage(scriptHash(addressFromStringValue(q)), ("No script has been found on pool account " + q)) | |
129 | + | let aE = getBinaryValue(l()) | |
130 | + | let aF = getString(this, v(toString(aA), toString(aC))) | |
131 | + | if (isDefined(aF)) | |
132 | + | then throw((((("Pool " + X) + "/") + Y) + " has already been activated.")) | |
122 | 133 | else { | |
123 | - | let | |
124 | - | let | |
134 | + | let aG = value(getString(this, v(toString(aA), toString(aC)))) | |
135 | + | let aH = if ((X == "WAVES")) | |
125 | 136 | then a | |
126 | - | else pow(10, 0, value(assetInfo(fromBase58String( | |
127 | - | let | |
137 | + | else pow(10, 0, value(assetInfo(fromBase58String(X))).decimals, 0, 0, DOWN) | |
138 | + | let aI = if ((Y == "WAVES")) | |
128 | 139 | then a | |
129 | - | else pow(10, 0, value(assetInfo(fromBase58String( | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | if (( | |
135 | - | then if (( | |
140 | + | else pow(10, 0, value(assetInfo(fromBase58String(Y))).decimals, 0, 0, DOWN) | |
141 | + | let aJ = Issue(aw, ax, 1, 8, true) | |
142 | + | let W = calculateAssetId(aJ) | |
143 | + | let aK = toBase58String(W) | |
144 | + | let aL = invoke(addressFromStringValue(q), "activate", [X, Y], nil) | |
145 | + | if ((aL == aL)) | |
146 | + | then if ((aL != "success")) | |
136 | 147 | then throw("Pool initialisation error happened.") | |
137 | - | else $Tuple2((( | |
148 | + | else $Tuple2(((az._2 ++ aB._2) ++ [aJ, Burn(W, 1), StringEntry(v(toString(aA), toString(aC)), U(q, toString(c), aK, X, Y, aH, aI, aA, aC, a)), StringEntry(y(aK), ae(aA, aC)), StringEntry(A(toString(aA), toString(aC)), ("%s__" + aK)), StringEntry(D(q), ae(aA, aC)), StringEntry(F(aA, aC), q), StringEntry(H(aK), q), StringEntry(G(q), aK), IntegerEntry(p(q), ay), StringEntry(k(), ao(aK))]), "success") | |
138 | 149 | else throw("Strict value is not equal to itself.") | |
139 | 150 | } | |
140 | 151 | } | |
141 | 152 | ||
142 | 153 | ||
143 | 154 | ||
144 | - | @Callable( | |
145 | - | func managePool ( | |
155 | + | @Callable(ar) | |
156 | + | func managePool (aM,aN) = if ((ar.caller != this)) | |
146 | 157 | then throw("permissions denied") | |
147 | 158 | else nil | |
148 | 159 | ||
149 | 160 | ||
150 | 161 | ||
151 | - | @Callable(an) | |
152 | - | func emit (aJ) = { | |
153 | - | let aK = an.caller | |
154 | - | let aL = an.originCaller | |
155 | - | let aM = valueOrErrorMessage(getString(F(toString(aK))), "Invalid LP address called me.") | |
156 | - | let aN = fromBase58String(aM) | |
157 | - | $Tuple2([Reissue(aN, aJ, true), ScriptTransfer(an.caller, aJ, aN)], "success") | |
162 | + | @Callable(ar) | |
163 | + | func emit (aO) = { | |
164 | + | let aP = ar.caller | |
165 | + | let aQ = ar.originCaller | |
166 | + | let aR = valueOrErrorMessage(getString(G(toString(aP))), "Invalid LP address called me.") | |
167 | + | let aS = fromBase58String(aR) | |
168 | + | if ((aO > 0)) | |
169 | + | then $Tuple2([Reissue(aS, aO, true), ScriptTransfer(ar.caller, aO, aS)], "success") | |
170 | + | else nil | |
158 | 171 | } | |
159 | 172 | ||
160 | 173 | ||
161 | 174 | ||
162 | - | @Callable( | |
163 | - | func burn ( | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | if (( | |
175 | + | @Callable(ar) | |
176 | + | func burn (aT) = { | |
177 | + | let aP = ar.caller | |
178 | + | let aQ = ar.originCaller | |
179 | + | let aU = value(ar.payments[0]) | |
180 | + | let aV = value(aU.amount) | |
181 | + | let aW = toBase58String(value(aU.assetId)) | |
182 | + | let aX = valueOrErrorMessage(getString(G(toString(aP))), "Invalid LP address called me.") | |
183 | + | if ((aW != aX)) | |
171 | 184 | then throw("Invalid asset passed.") | |
172 | - | else if (( | |
185 | + | else if ((aT != aV)) | |
173 | 186 | then throw("Invalid amount passed.") | |
174 | 187 | else { | |
175 | - | let | |
176 | - | $Tuple2([Burn( | |
188 | + | let aS = fromBase58String(aX) | |
189 | + | $Tuple2([Burn(aS, aT)], "success") | |
177 | 190 | } | |
178 | 191 | } | |
179 | 192 | ||
180 | 193 | ||
181 | - | @Verifier( | |
182 | - | func | |
194 | + | @Verifier(aY) | |
195 | + | func aZ () = sigVerify(aY.bodyBytes, aY.proofs[0], aY.senderPublicKey) | |
183 | 196 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = ((100 * 1000) * 1000) | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 2 | |
11 | 11 | ||
12 | 12 | let e = 3 | |
13 | 13 | ||
14 | 14 | let f = 4 | |
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | 18 | let h = 2 | |
19 | 19 | ||
20 | 20 | let i = 3 | |
21 | 21 | ||
22 | 22 | func j () = "%s__factoryConfig" | |
23 | 23 | ||
24 | 24 | ||
25 | - | func k () = "%s | |
25 | + | func k () = "%s__lpTokensList" | |
26 | 26 | ||
27 | 27 | ||
28 | - | func l () = "%s__ | |
28 | + | func l () = "%s%s__pool__scriptHash" | |
29 | 29 | ||
30 | 30 | ||
31 | - | func m () = "%s__ | |
31 | + | func m () = "%s__priceDecimals" | |
32 | 32 | ||
33 | 33 | ||
34 | - | func n () = "%s__ | |
34 | + | func n () = "%s__shutdown" | |
35 | 35 | ||
36 | 36 | ||
37 | - | func o ( | |
37 | + | func o () = "%s__nextInternalAssetId" | |
38 | 38 | ||
39 | 39 | ||
40 | - | func | |
40 | + | func p (q) = ("%s%s__poolWeight__" + q) | |
41 | 41 | ||
42 | 42 | ||
43 | - | func | |
43 | + | func r (s) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(s)) | |
44 | 44 | ||
45 | 45 | ||
46 | - | func | |
46 | + | func t (u) = ("%s%s%s__mappings__baseAsset2internalId__" + u) | |
47 | 47 | ||
48 | 48 | ||
49 | - | func | |
49 | + | func v (w,x) = (((("%d%d%s__" + w) + "__") + x) + "__config") | |
50 | 50 | ||
51 | 51 | ||
52 | - | func | |
52 | + | func y (z) = (("%s%s%s__" + z) + "__mappings__lpAsset2Pool") | |
53 | 53 | ||
54 | 54 | ||
55 | - | func | |
55 | + | func A (B,C) = (((("%d%d%s%s__" + B) + "__") + C) + "__mappings__PoolAssets2LpAsset") | |
56 | 56 | ||
57 | 57 | ||
58 | - | func | |
58 | + | func D (E) = (("%s%s%s__" + E) + "__mappings__poolContract2PoolAssets") | |
59 | 59 | ||
60 | 60 | ||
61 | - | func F ( | |
61 | + | func F (B,C) = (((("%d%d%s%s__" + toString(B)) + "__") + toString(C)) + "__mappings__poolAssets2PoolContract") | |
62 | 62 | ||
63 | 63 | ||
64 | - | func G ( | |
64 | + | func G (E) = (("%s%s%s__" + E) + "__mappings__poolContract2LpAsset") | |
65 | 65 | ||
66 | 66 | ||
67 | - | func H ( | |
67 | + | func H (z) = (("%s%s%s__" + z) + "__mappings__lpAsset2PoolContract") | |
68 | 68 | ||
69 | 69 | ||
70 | - | func | |
70 | + | func I (J) = valueOrErrorMessage(getString(this, J), ("No data for this.key=" + J)) | |
71 | 71 | ||
72 | 72 | ||
73 | - | func K ( | |
73 | + | func K (J) = valueOrErrorMessage(getBoolean(this, J), ("No data for this.key=" + J)) | |
74 | 74 | ||
75 | 75 | ||
76 | - | func L ( | |
76 | + | func L (J) = valueOrErrorMessage(getInteger(this, J), ("No data for this.key=" + J)) | |
77 | 77 | ||
78 | 78 | ||
79 | - | func | |
79 | + | func M (N,O,P,Q,R,S,T) = makeString(["%s%s%s%s%s%s", N, O, P, Q, R, S, T], b) | |
80 | 80 | ||
81 | 81 | ||
82 | - | func | |
82 | + | func U (q,V,W,X,Y,Z,aa,ab,ac,ad) = makeString(["%s%d%s%s%s%d%d%d%d%d%s", q, V, W, X, Y, toString(Z), toString(aa), toString(ab), toString(ac), toString(ad)], b) | |
83 | 83 | ||
84 | 84 | ||
85 | - | func ag (ah,ai) = { | |
86 | - | let aj = valueOrElse(getInteger(this, s(ah)), 0) | |
87 | - | let ak = valueOrElse(getInteger(this, n()), 0) | |
88 | - | let al = if ((aj == 0)) | |
85 | + | func ae (af,ag) = makeString(["%d%d", toString(af), toString(ag)], b) | |
86 | + | ||
87 | + | ||
88 | + | func ah (ai,aj) = { | |
89 | + | let ak = valueOrElse(getInteger(this, t(ai)), 0) | |
90 | + | let al = valueOrElse(getInteger(this, o()), 0) | |
91 | + | let am = if ((ak == 0)) | |
89 | 92 | then { | |
90 | - | let | |
91 | - | $Tuple3( | |
93 | + | let an = (al + aj) | |
94 | + | $Tuple3(an, [IntegerEntry(o(), an), IntegerEntry(t(ai), an), StringEntry(r(an), ai)], true) | |
92 | 95 | } | |
93 | - | else $Tuple3( | |
94 | - | | |
96 | + | else $Tuple3(ak, nil, false) | |
97 | + | am | |
95 | 98 | } | |
96 | 99 | ||
97 | 100 | ||
98 | - | @Callable(an) | |
99 | - | func constructor (ao,ap,O,P,Q,R,aq) = if ((an.caller != this)) | |
101 | + | func ao (ap) = { | |
102 | + | let aq = getString(this, k()) | |
103 | + | if (isDefined(aq)) | |
104 | + | then ((value(aq) + b) + ap) | |
105 | + | else ap | |
106 | + | } | |
107 | + | ||
108 | + | ||
109 | + | @Callable(ar) | |
110 | + | func constructor (as,at,P,Q,R,S,au,av) = if ((ar.caller != this)) | |
100 | 111 | then throw("permissions denied") | |
101 | - | else [StringEntry(j(), | |
112 | + | else [StringEntry(j(), M(as, at, P, Q, R, S, au)), IntegerEntry(m(), av)] | |
102 | 113 | ||
103 | 114 | ||
104 | 115 | ||
105 | - | @Callable( | |
106 | - | func activateNewPool ( | |
116 | + | @Callable(ar) | |
117 | + | func activateNewPool (q,X,Y,aw,ax,ay) = if ((ar.caller != this)) | |
107 | 118 | then throw("permissions denied") | |
108 | - | else if (isDefined(getString( | |
109 | - | then throw((("Pool address " + | |
119 | + | else if (isDefined(getString(D(q)))) | |
120 | + | then throw((("Pool address " + q) + " already registered.")) | |
110 | 121 | else { | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
122 | + | let az = ah(X, 1) | |
123 | + | let aA = az._1 | |
124 | + | let aB = ah(Y, if (az._3) | |
114 | 125 | then 2 | |
115 | 126 | else 1) | |
116 | - | let | |
117 | - | let | |
118 | - | let | |
119 | - | let | |
120 | - | if (isDefined( | |
121 | - | then throw((((("Pool " + | |
127 | + | let aC = aB._1 | |
128 | + | let aD = valueOrErrorMessage(scriptHash(addressFromStringValue(q)), ("No script has been found on pool account " + q)) | |
129 | + | let aE = getBinaryValue(l()) | |
130 | + | let aF = getString(this, v(toString(aA), toString(aC))) | |
131 | + | if (isDefined(aF)) | |
132 | + | then throw((((("Pool " + X) + "/") + Y) + " has already been activated.")) | |
122 | 133 | else { | |
123 | - | let | |
124 | - | let | |
134 | + | let aG = value(getString(this, v(toString(aA), toString(aC)))) | |
135 | + | let aH = if ((X == "WAVES")) | |
125 | 136 | then a | |
126 | - | else pow(10, 0, value(assetInfo(fromBase58String( | |
127 | - | let | |
137 | + | else pow(10, 0, value(assetInfo(fromBase58String(X))).decimals, 0, 0, DOWN) | |
138 | + | let aI = if ((Y == "WAVES")) | |
128 | 139 | then a | |
129 | - | else pow(10, 0, value(assetInfo(fromBase58String( | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | if (( | |
135 | - | then if (( | |
140 | + | else pow(10, 0, value(assetInfo(fromBase58String(Y))).decimals, 0, 0, DOWN) | |
141 | + | let aJ = Issue(aw, ax, 1, 8, true) | |
142 | + | let W = calculateAssetId(aJ) | |
143 | + | let aK = toBase58String(W) | |
144 | + | let aL = invoke(addressFromStringValue(q), "activate", [X, Y], nil) | |
145 | + | if ((aL == aL)) | |
146 | + | then if ((aL != "success")) | |
136 | 147 | then throw("Pool initialisation error happened.") | |
137 | - | else $Tuple2((( | |
148 | + | else $Tuple2(((az._2 ++ aB._2) ++ [aJ, Burn(W, 1), StringEntry(v(toString(aA), toString(aC)), U(q, toString(c), aK, X, Y, aH, aI, aA, aC, a)), StringEntry(y(aK), ae(aA, aC)), StringEntry(A(toString(aA), toString(aC)), ("%s__" + aK)), StringEntry(D(q), ae(aA, aC)), StringEntry(F(aA, aC), q), StringEntry(H(aK), q), StringEntry(G(q), aK), IntegerEntry(p(q), ay), StringEntry(k(), ao(aK))]), "success") | |
138 | 149 | else throw("Strict value is not equal to itself.") | |
139 | 150 | } | |
140 | 151 | } | |
141 | 152 | ||
142 | 153 | ||
143 | 154 | ||
144 | - | @Callable( | |
145 | - | func managePool ( | |
155 | + | @Callable(ar) | |
156 | + | func managePool (aM,aN) = if ((ar.caller != this)) | |
146 | 157 | then throw("permissions denied") | |
147 | 158 | else nil | |
148 | 159 | ||
149 | 160 | ||
150 | 161 | ||
151 | - | @Callable(an) | |
152 | - | func emit (aJ) = { | |
153 | - | let aK = an.caller | |
154 | - | let aL = an.originCaller | |
155 | - | let aM = valueOrErrorMessage(getString(F(toString(aK))), "Invalid LP address called me.") | |
156 | - | let aN = fromBase58String(aM) | |
157 | - | $Tuple2([Reissue(aN, aJ, true), ScriptTransfer(an.caller, aJ, aN)], "success") | |
162 | + | @Callable(ar) | |
163 | + | func emit (aO) = { | |
164 | + | let aP = ar.caller | |
165 | + | let aQ = ar.originCaller | |
166 | + | let aR = valueOrErrorMessage(getString(G(toString(aP))), "Invalid LP address called me.") | |
167 | + | let aS = fromBase58String(aR) | |
168 | + | if ((aO > 0)) | |
169 | + | then $Tuple2([Reissue(aS, aO, true), ScriptTransfer(ar.caller, aO, aS)], "success") | |
170 | + | else nil | |
158 | 171 | } | |
159 | 172 | ||
160 | 173 | ||
161 | 174 | ||
162 | - | @Callable( | |
163 | - | func burn ( | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | if (( | |
175 | + | @Callable(ar) | |
176 | + | func burn (aT) = { | |
177 | + | let aP = ar.caller | |
178 | + | let aQ = ar.originCaller | |
179 | + | let aU = value(ar.payments[0]) | |
180 | + | let aV = value(aU.amount) | |
181 | + | let aW = toBase58String(value(aU.assetId)) | |
182 | + | let aX = valueOrErrorMessage(getString(G(toString(aP))), "Invalid LP address called me.") | |
183 | + | if ((aW != aX)) | |
171 | 184 | then throw("Invalid asset passed.") | |
172 | - | else if (( | |
185 | + | else if ((aT != aV)) | |
173 | 186 | then throw("Invalid amount passed.") | |
174 | 187 | else { | |
175 | - | let | |
176 | - | $Tuple2([Burn( | |
188 | + | let aS = fromBase58String(aX) | |
189 | + | $Tuple2([Burn(aS, aT)], "success") | |
177 | 190 | } | |
178 | 191 | } | |
179 | 192 | ||
180 | 193 | ||
181 | - | @Verifier( | |
182 | - | func | |
194 | + | @Verifier(aY) | |
195 | + | func aZ () = sigVerify(aY.bodyBytes, aY.proofs[0], aY.senderPublicKey) | |
183 | 196 |
github/deemru/w8io/026f985 86.04 ms ◑