tx · 7BJ3sbY7r7cXiZTPWoKtaCoP1cdbvZKJp6ADrAYkPqum 3N4revPn12feiSAyC78tAZEJfsyprVYPzsL: -0.05000000 Waves 2022.02.10 10:30 [1917235] smart account 3N4revPn12feiSAyC78tAZEJfsyprVYPzsL > SELF 0.00000000 Waves
{ "type": 13, "id": "7BJ3sbY7r7cXiZTPWoKtaCoP1cdbvZKJp6ADrAYkPqum", "fee": 5000000, "feeAssetId": null, "timestamp": 1644478285665, "version": 2, "chainId": 84, "sender": "3N4revPn12feiSAyC78tAZEJfsyprVYPzsL", "senderPublicKey": "5smGxL7bfeRokaN53Z31Y72dF2Lkr5Cg1kuWRV3gniNe", "proofs": [ "3iDNvvWmQuwp7bKcWynZk9rz27mwMpn1CCTVkEonG9ijaBa5HhuywM3DLmnp4kvgPXnv1iQwuYPrHu7adKFpmmnT" ], "script": "base64:AAIFAAAAAAAAABIIAhIECgIBARIICgYBAQEIAQEAAAAXAAAAAAtzdHJBc3NldElkQQIAAAAsMzROOVljRUVUTFduOTNxWVE2NEVzUDF4ODl0U3J1SlU0NFJyRU1TWFhFUEoAAAAAC3N0ckFzc2V0SWRCAgAAACxERzJ4RmtQZER3S1VvQmt6R0FoUXRMcFNHemZYTGlDWVBFemVLSDJBZDI0cAAAAAAIYXNzZXRJZEEDCQAAAAAAAAIFAAAAC3N0ckFzc2V0SWRBAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAtzdHJBc3NldElkQQAAAAAIYXNzZXRJZEIDCQAAAAAAAAIFAAAAC3N0ckFzc2V0SWRCAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAtzdHJBc3NldElkQgAAAAADZmVlAAAAAAAAAAH0AAAAAA1mZWVHb3Zlcm5hbmNlAAAAAAAAAADIAAAAAAlmZWVTY2FsZTYAAAAAAAAPQkAAAAAABnNjYWxlMwAAAAAAAAAD6AAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOj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235, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4eRLGCvaQrT3UQnUEijT5svXFnojb73pPgqBBFV7ixd3 Next: CRADEVKw3TwcL7KE6fXyQFgLCnRDAmuAX2s38vjFCNi2 Diff:
Old | New | Differences | |
---|---|---|---|
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(Y) | |
106 | + | func invariantCalcc (v,w) = { | |
107 | + | let y = u(v, w) | |
108 | + | let I = (fraction((v + w), i, pow(y, l, r, s, l, CEILING)) + (2 * fraction(pow(fraction(v, w, i), 0, 5, 1, (l / 2), DOWN), pow((y - t), l, r, s, l, DOWN), i))) | |
109 | + | [IntegerEntry("invariant", I)] | |
110 | + | } | |
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | @Callable(Y) | |
106 | 115 | func exchange (A,B,Z,aa,ab,ac) = { | |
107 | 116 | let ad = z(A, B, ab, ac, Z, aa) | |
108 | 117 | let ae = fraction(ad, f, g) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" | |
5 | 5 | ||
6 | 6 | let b = "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p" | |
7 | 7 | ||
8 | 8 | let c = if ((a == "WAVES")) | |
9 | 9 | then unit | |
10 | 10 | else fromBase58String(a) | |
11 | 11 | ||
12 | 12 | let d = if ((b == "WAVES")) | |
13 | 13 | then unit | |
14 | 14 | else fromBase58String(b) | |
15 | 15 | ||
16 | 16 | let e = 500 | |
17 | 17 | ||
18 | 18 | let f = 200 | |
19 | 19 | ||
20 | 20 | let g = 1000000 | |
21 | 21 | ||
22 | 22 | let h = 1000 | |
23 | 23 | ||
24 | 24 | let i = 100000000 | |
25 | 25 | ||
26 | 26 | let j = 1000000000000 | |
27 | 27 | ||
28 | 28 | let k = 1000 | |
29 | 29 | ||
30 | 30 | let l = 8 | |
31 | 31 | ||
32 | 32 | let m = 12 | |
33 | 33 | ||
34 | 34 | let n = 50 | |
35 | 35 | ||
36 | 36 | let o = 100 | |
37 | 37 | ||
38 | 38 | let p = 90000000 | |
39 | 39 | ||
40 | 40 | let q = 110000000 | |
41 | 41 | ||
42 | 42 | let r = 50 | |
43 | 43 | ||
44 | 44 | let s = 2 | |
45 | 45 | ||
46 | 46 | let t = 46000000 | |
47 | 47 | ||
48 | 48 | func u (v,w) = (((fraction(j, v, w) + fraction(j, w, v)) / 2) / 10000) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func x (v,w) = { | |
52 | 52 | let y = u(v, w) | |
53 | 53 | (fraction((v + w), i, pow(y, l, r, s, l, CEILING)) + (2 * fraction(pow(fraction(v, w, i), 0, 5, 1, (l / 2), DOWN), pow((y - t), l, r, s, l, DOWN), i))) | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func z (A,B,C,D,E,F) = { | |
58 | 58 | let G = (i - ((i * 1) / 10000000)) | |
59 | 59 | let H = (C - D) | |
60 | 60 | let v = (A + E) | |
61 | 61 | let w = (B + E) | |
62 | 62 | let I = x(A, B) | |
63 | 63 | let J = if ((F == a)) | |
64 | 64 | then x(v, (B - C)) | |
65 | 65 | else if ((F == b)) | |
66 | 66 | then x((A - C), w) | |
67 | 67 | else throw("Wrong asset in payment") | |
68 | 68 | let K = fraction(i, I, J) | |
69 | 69 | func L (M,N) = if ((M == -1)) | |
70 | 70 | then { | |
71 | 71 | let O = (C - ((N * H) / 5)) | |
72 | 72 | let P = if ((F == a)) | |
73 | 73 | then x(v, (B - O)) | |
74 | 74 | else x((A - O), w) | |
75 | 75 | if ((P > I)) | |
76 | 76 | then O | |
77 | 77 | else -1 | |
78 | 78 | } | |
79 | 79 | else M | |
80 | 80 | ||
81 | 81 | let Q = { | |
82 | 82 | let R = [1, 2, 3, 4, 5] | |
83 | 83 | let S = size(R) | |
84 | 84 | let T = -1 | |
85 | 85 | func U (V,W) = if ((W >= S)) | |
86 | 86 | then V | |
87 | 87 | else L(V, R[W]) | |
88 | 88 | ||
89 | 89 | func X (V,W) = if ((W >= S)) | |
90 | 90 | then V | |
91 | 91 | else throw("List size exceeds 5") | |
92 | 92 | ||
93 | 93 | X(U(U(U(U(U(T, 0), 1), 2), 3), 4), 5) | |
94 | 94 | } | |
95 | 95 | if ((0 > Q)) | |
96 | 96 | then throw("something went wrong while working with amountToSend") | |
97 | 97 | else if (if ((K > G)) | |
98 | 98 | then (J > I) | |
99 | 99 | else false) | |
100 | 100 | then C | |
101 | 101 | else Q | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(Y) | |
106 | + | func invariantCalcc (v,w) = { | |
107 | + | let y = u(v, w) | |
108 | + | let I = (fraction((v + w), i, pow(y, l, r, s, l, CEILING)) + (2 * fraction(pow(fraction(v, w, i), 0, 5, 1, (l / 2), DOWN), pow((y - t), l, r, s, l, DOWN), i))) | |
109 | + | [IntegerEntry("invariant", I)] | |
110 | + | } | |
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | @Callable(Y) | |
106 | 115 | func exchange (A,B,Z,aa,ab,ac) = { | |
107 | 116 | let ad = z(A, B, ab, ac, Z, aa) | |
108 | 117 | let ae = fraction(ad, f, g) | |
109 | 118 | let af = fraction(ad, (g - e), g) | |
110 | 119 | [IntegerEntry("sendAmount", ad), IntegerEntry("sendAmountWithComission", af)] | |
111 | 120 | } | |
112 | 121 | ||
113 | 122 | ||
114 | 123 | @Verifier(ag) | |
115 | 124 | func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey) | |
116 | 125 |
github/deemru/w8io/169f3d6 32.89 ms ◑