tx · 55MhKMxjoz7PKofjrwtsdg5zSDFfPMxqgz38sKm1mnRu 3MvJen6AwbwMF5SVu6UH6VuXaTJhfVhAAPw: -0.01000000 Waves 2020.09.11 14:07 [1172572] smart account 3MvJen6AwbwMF5SVu6UH6VuXaTJhfVhAAPw > SELF 0.00000000 Waves
{ "type": 13, "id": "55MhKMxjoz7PKofjrwtsdg5zSDFfPMxqgz38sKm1mnRu", "fee": 1000000, "feeAssetId": null, "timestamp": 1599822542194, "version": 1, "sender": "3MvJen6AwbwMF5SVu6UH6VuXaTJhfVhAAPw", "senderPublicKey": "CPGE6FMqaGGqpVc4wASJHjteT51xEdi8edwq6TnYLByZ", "proofs": [ "44YfktGU8iNcP3Czyr1KZXWWFRVP2e2oJua6rAdC25gRUsqwCR9mxwQXemjnLxmQHJNznRcbmA7rQ6uXdnSnfvuk" ], "script": "base64:AAIEAAAAAAAAABIIAhIAEgASAwoBCBIFCgMIAQEAAABFAQAAAA5rZXlVY29sbGF0ZXJhbAAAAAACAAAADCR1Y29sbGF0ZXJhbAEAAAAbZ2VuZXJhdGVLZXlBc3NldExvY2tlZFRvdGFsAAAAAQAAAAdhc3NldElkCQABLAAAAAICAAAAFiRhc3NldF9sb2NrZWRfdG90YWxfXyQFAAAAB2Fzc2V0SWQBAAAAE2tleUFjY291bnRPcGVyYXRpb24AAAADAAAADHVubG9ja0hlaWdodAAAAAdhZGRyZXNzAAAABnN0YXR1cwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAFyRkZWZvQXNzZXRfb3BlcmF0aW9uX18kBQAAAAdhZGRyZXNzAgAAAANfXyMJAAGkAAAAAQUAAAAMdW5sb2NrSGVpZ2h0AgAAAANfXyQFAAAABnN0YXR1cwAAAAAUSWR4T3BlcmF0aW9uQW1vdW50SW4AAAAAAAAAAAAAAAAAE0lkeE9wZXJhdGlvbkFzc2V0SW4AAAAAAAAAAAEAAAAAEUlkeE9wZXJhdGlvblByaWNlAAAAAAA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dGVyYWxFbnRyeQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V51UvnYw==", "chainId": 84, "height": 1172572, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a () = "$ucollateral" | |
5 | + | ||
6 | + | ||
7 | + | func b (c) = ("$asset_locked_total__$" + c) | |
8 | + | ||
9 | + | ||
10 | + | func d (e,f,g) = ((((("$defoAsset_operation__$" + f) + "__#") + toString(e)) + "__$") + g) | |
11 | + | ||
12 | + | ||
13 | + | let h = 0 | |
14 | + | ||
15 | + | let i = 1 | |
16 | + | ||
17 | + | let j = 2 | |
18 | + | ||
19 | + | let k = 3 | |
20 | + | ||
21 | + | let l = 4 | |
22 | + | ||
23 | + | func m (n,o,p,q,r,s,t) = ((((((((((((toString(n) + "__") + o) + "__") + toString(q)) + "__") + r) + "__") + toString(p)) + "__") + toString(s)) + "__") + toString(t)) | |
24 | + | ||
25 | + | ||
26 | + | func u (v) = { | |
27 | + | let w = valueOrErrorMessage(getString(this, v), ("There is no request for passed arguments: " + v)) | |
28 | + | split(w, "__") | |
29 | + | } | |
30 | + | ||
31 | + | ||
32 | + | let x = -1 | |
33 | + | ||
34 | + | let y = "NULL" | |
35 | + | ||
36 | + | let z = addressFromStringValue(getStringValue(this, "factory")) | |
37 | + | ||
38 | + | func A (B) = (("asset_" + B) + "_address") | |
39 | + | ||
40 | + | ||
41 | + | func C (D) = (("asset_" + D) + "_symbol") | |
42 | + | ||
43 | + | ||
44 | + | func E (D) = (("asset_" + D) + "_meta") | |
45 | + | ||
46 | + | ||
47 | + | func F (D) = (("asset_" + D) + "_status") | |
48 | + | ||
49 | + | ||
50 | + | func G (D) = (("asset_" + D) + "_init_height") | |
51 | + | ||
52 | + | ||
53 | + | func H (D) = (("asset_" + D) + "_activate_height") | |
54 | + | ||
55 | + | ||
56 | + | func I (D) = (("asset_" + D) + "_address") | |
57 | + | ||
58 | + | ||
59 | + | func J (D) = (("asset_" + D) + "_min_pool") | |
60 | + | ||
61 | + | ||
62 | + | func K (D) = (("asset_" + D) + "_current_pool") | |
63 | + | ||
64 | + | ||
65 | + | func L (D) = (("asset_" + D) + "_max_pool") | |
66 | + | ||
67 | + | ||
68 | + | func M (D,N) = (((("pool_" + D) + "_") + N) + "_amount") | |
69 | + | ||
70 | + | ||
71 | + | func O (D,N) = (((("pool_" + D) + "_") + N) + "max_amount") | |
72 | + | ||
73 | + | ||
74 | + | let P = 0 | |
75 | + | ||
76 | + | let Q = 1 | |
77 | + | ||
78 | + | let R = 2 | |
79 | + | ||
80 | + | let S = 3 | |
81 | + | ||
82 | + | let T = 4 | |
83 | + | ||
84 | + | let U = 5 | |
85 | + | ||
86 | + | let V = 6 | |
87 | + | ||
88 | + | let W = 7 | |
89 | + | ||
90 | + | let X = 8 | |
91 | + | ||
92 | + | let Y = 9 | |
93 | + | ||
94 | + | let Z = 10 | |
95 | + | ||
96 | + | let aa = 11 | |
97 | + | ||
98 | + | let ab = 12 | |
99 | + | ||
100 | + | let ac = 13 | |
101 | + | ||
102 | + | let ad = getStringValue(z, "neutrino_staking") | |
103 | + | ||
104 | + | let ae = addressFromStringValue(ad) | |
105 | + | ||
106 | + | let af = getStringValue(z, ("$defoAsset_" + toString(this))) | |
107 | + | ||
108 | + | let ag = split(af, "__") | |
109 | + | ||
110 | + | let ah = ag[P] | |
111 | + | ||
112 | + | let ai = fromBase58String(ag[Q]) | |
113 | + | ||
114 | + | let aj = addressFromStringValue(ag[W]) | |
115 | + | ||
116 | + | let ak = parseIntValue(ag[U]) | |
117 | + | ||
118 | + | let al = ag[T] | |
119 | + | ||
120 | + | let am = fromBase58String(al) | |
121 | + | ||
122 | + | let an = parseIntValue(ag[S]) | |
123 | + | ||
124 | + | let ao = parseIntValue(ag[X]) | |
125 | + | ||
126 | + | let ap = parseIntValue(ag[Y]) | |
127 | + | ||
128 | + | let aq = parseIntValue(ag[Z]) | |
129 | + | ||
130 | + | let ar = parseIntValue(ag[aa]) | |
131 | + | ||
132 | + | let as = parseIntValue(ag[ab]) | |
133 | + | ||
134 | + | func at () = valueOrErrorMessage(getInteger(aj, "currIdx"), ("No currIdx at controlAcc=" + toString(aj))) | |
135 | + | ||
136 | + | ||
137 | + | func au (av) = { | |
138 | + | let aw = ("idxHeight_" + toString(av)) | |
139 | + | valueOrElse(getInteger(aj, aw), 0) | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | func ax (ay) = { | |
144 | + | let az = ("price_" + toString(ay)) | |
145 | + | valueOrErrorMessage(getInteger(aj, az), ((("No " + az) + " at controlAcc=") + toString(aj))) | |
146 | + | } | |
147 | + | ||
148 | + | ||
149 | + | func aA () = valueOrElse(getInteger(this, ((("rpd_balance_" + al) + "_") + toString(this))), 0) | |
150 | + | ||
151 | + | ||
152 | + | let aB = valueOrElse(getInteger(this, a()), 0) | |
153 | + | ||
154 | + | let aC = getIntegerValue(z, (("$defoAsset_" + toString(this)) + "_currentPool")) | |
155 | + | ||
156 | + | let aD = (assetBalance(this, am) + aA()) | |
157 | + | ||
158 | + | let aE = if ((0 > aB)) | |
159 | + | then 0 | |
160 | + | else aB | |
161 | + | ||
162 | + | let aF = (aD - aE) | |
163 | + | ||
164 | + | let p = getIntegerValue(aj, ("$price_" + ah)) | |
165 | + | ||
166 | + | let aG = (((an + ak) * p) / an) | |
167 | + | ||
168 | + | let aH = value(assetInfo(ai)).quantity | |
169 | + | ||
170 | + | let aI = valueOrElse(getInteger(this, b(al)), 0) | |
171 | + | ||
172 | + | let aJ = (aC - aI) | |
173 | + | ||
174 | + | @Callable(aK) | |
175 | + | func buyAsset () = if ((aC != aF)) | |
176 | + | then throw(((("Invalid currPoolAmount calculations: currPoolAmount=" + toString(aC)) + " doubleCheckCurrPoolAmount=") + toString(aF))) | |
177 | + | else { | |
178 | + | let aL = value(aK.payments[0]) | |
179 | + | let aM = value(aL.assetId) | |
180 | + | let aN = (fraction(aJ, an, aG) - aH) | |
181 | + | let aO = fraction(aL.amount, an, p) | |
182 | + | let aP = fraction((an - as), aO, an) | |
183 | + | let t = (aO - aP) | |
184 | + | let aQ = if ((aP > aN)) | |
185 | + | then (aP - aN) | |
186 | + | else aP | |
187 | + | let aR = fraction(aO, p, an) | |
188 | + | let aS = (aL.amount - aR) | |
189 | + | if ((0 >= aN)) | |
190 | + | then throw((("Impossible to issue new " + ah) + ": not enough collateral")) | |
191 | + | else if ((aM != am)) | |
192 | + | then throw(((("Payment asset id doesn't match basic asset: expected=" + toBase58String(am)) + " actual=") + toBase58String(aM))) | |
193 | + | else if ((ao > aL.amount)) | |
194 | + | then throw(((((("Impossible to issue new " + ah) + ": payment=") + toString(aL.amount)) + "is less then min amount=") + toString(ao))) | |
195 | + | else [IntegerEntry(a(), (aB + aR)), StringEntry(d(height, toString(aK.caller), "FINISHED"), m(aL.amount, toBase58String(aM), p, aP, toBase58String(ai), aO, t)), Reissue(ai, aQ, true), ScriptTransfer(aK.caller, aQ, ai), ScriptTransfer(aK.caller, aS, am)] | |
196 | + | } | |
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | @Callable(aK) | |
201 | + | func sellAsset () = { | |
202 | + | let aL = value(aK.payments[0]) | |
203 | + | let aM = value(aL.assetId) | |
204 | + | let aT = toString(aK.caller) | |
205 | + | let aU = b(toBase58String(aM)) | |
206 | + | let aV = valueOrElse(getInteger(this, aU), 0) | |
207 | + | let e = (height + ar) | |
208 | + | let aW = d(e, aT, "PENDING") | |
209 | + | if ((aM != ai)) | |
210 | + | then throw(((("Invalid payment asset id: expected=" + toBase58String(ai)) + " actual=") + toBase58String(aM))) | |
211 | + | else if ((ap > aL.amount)) | |
212 | + | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(aL.amount)) + " minAmount=") + toString(ap))) | |
213 | + | else if (isDefined(getInteger(this, aW))) | |
214 | + | then throw((((("Sell request has been already defined for " + aT) + "_") + toString(e)) + " pair: need to wait next block")) | |
215 | + | else [IntegerEntry(aU, (aV + aL.amount)), StringEntry(aW, m(aL.amount, toBase58String(ai), x, x, toBase58String(am), x, x))] | |
216 | + | } | |
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | @Callable(aK) | |
221 | + | func crossExchange (ai) = throw("Temporary not implemented") | |
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | @Callable(aK) | |
226 | + | func withdraw (aX,e,av) = { | |
227 | + | let v = d(e, aX, "PENDING") | |
228 | + | let aY = u(v) | |
229 | + | let n = parseIntValue(aY[h]) | |
230 | + | let o = aY[i] | |
231 | + | let r = aY[l] | |
232 | + | if ((e > height)) | |
233 | + | then throw((("Please wait " + toString(e)) + " to withdraw your funds")) | |
234 | + | else { | |
235 | + | let aZ = n | |
236 | + | if ((0 >= aZ)) | |
237 | + | then throw("LockedAmount <= 0") | |
238 | + | else { | |
239 | + | let aU = b(aY[i]) | |
240 | + | let ba = valueOrErrorMessage(getInteger(this, aU), (("State contains sellAssetRequest=" + v) + " BUT no totalLocked")) | |
241 | + | let bb = au(av) | |
242 | + | let bc = au((av - 1)) | |
243 | + | let bd = at() | |
244 | + | if (if (if ((av > bd)) | |
245 | + | then true | |
246 | + | else (e > bb)) | |
247 | + | then true | |
248 | + | else if ((bc != 0)) | |
249 | + | then (bc >= e) | |
250 | + | else false) | |
251 | + | then throw(((((((((("invalid price idx: idx=" + toString(av)) + " currIdx=") + toString(bd)) + " idxHeight=") + toString(bb)) + " unlockHeight=") + toString(e)) + " prevIdxHeight=") + toString(bc))) | |
252 | + | else { | |
253 | + | let be = ax(bb) | |
254 | + | let bf = fromBase58String(o) | |
255 | + | let bg = if ((bf == am)) | |
256 | + | then { | |
257 | + | let bh = fraction(n, an, be) | |
258 | + | $Tuple4(bh, Reissue(ai, bh, true), ScriptTransfer(addressFromStringValue(aX), bh, ai), IntegerEntry(a(), (aB + n))) | |
259 | + | } | |
260 | + | else if ((bf == ai)) | |
261 | + | then { | |
262 | + | let bi = fraction(n, be, an) | |
263 | + | let bj = (aB - bi) | |
264 | + | $Tuple4(bi, Burn(am, bi), ScriptTransfer(addressFromStringValue(aX), bi, am), IntegerEntry(a(), (aB - bi))) | |
265 | + | } | |
266 | + | else throw(("Unsupported assetIn=" + o)) | |
267 | + | let q = bg._1 | |
268 | + | let bk = bg._2 | |
269 | + | let bl = bg._3 | |
270 | + | let bm = bg._4 | |
271 | + | if ((0 > (ba - aZ))) | |
272 | + | then throw((("Invalid data state: " + aU) + " less then 0")) | |
273 | + | else ((([IntegerEntry(aU, (ba - aZ)), DeleteEntry(v), StringEntry(d(e, aX, "FINISHED"), m(n, o, be, q, r, 0, 0))] :+ bk) :+ bl) :+ bm) | |
274 | + | } | |
275 | + | } | |
276 | + | } | |
277 | + | } | |
278 | + | ||
279 | + | ||
280 | + | @Verifier(bn) | |
281 | + | func bo () = sigVerify(bn.bodyBytes, bn.proofs[0], bn.senderPublicKey) | |
282 | + |
github/deemru/w8io/026f985 23.20 ms ◑