tx · 6E7SeS9KNuHLoQvLSfiCPqtUD2EAVToZBcUiQVMGL2eJ 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9: -0.01000000 Waves 2023.09.26 00:34 [2771488] smart account 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9 > SELF 0.00000000 Waves
{ "type": 13, "id": "6E7SeS9KNuHLoQvLSfiCPqtUD2EAVToZBcUiQVMGL2eJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1695677737967, "version": 2, "chainId": 84, "sender": "3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9", "senderPublicKey": "4AVkL2DQJ8sngCNyArYueNuPS7cvygnakPJhU65LfPfu", "proofs": [ "5pBBMZD6ooghEdy7mi6GzsuJQgSyZUYv7gsHQrmLxkwP7QX3vdfZtTjo99NwtP5UD1FWf9ucoraBKX7NW66sJ7P7", "3qWUjkjF27dBARaQ5JuNU5vVNN5tu8DJ26bhpuQmxUdTyj1JfT8Ym2LqhfjhTccy9wqyixBCfFWv8TXTJPoDJXUF" ], "script": "base64:BgIMCAISAwoBGBIDCgEYDgAOQVhMWV9NQUlOX0FERFIJAQdBZGRyZXNzAQEaAVRHYdFKTc5/+9vupfS91sItmkjqQtK5YZsAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAKa1NoYXJlUG9vbAIMX3Bvb2xTaGFyZUlkAAVrUG9vbAIFcG9vbF8ACWtBZG1pbjFQSwIVZ3JvdXAxX2FkbWluMV9wdWJfa2V5AAlrQWRtaW4yUEsCFWdyb3VwMV9hZG1pbjJfcHViX2tleQAJa0FkbWluM1BLAhVncm91cDFfYWRtaW4zX3B1Yl9rZXkAD2tPcGVyYXRvckNhbGxQSwISYWRtaW5fY2FsbF9wdWJfa2V5AAhhZG1pbjFQSwkA2QQBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUOQVhMWV9NQUlOX0FERFIFCWtBZG1pbjFQSwISQ2FuJ3QgZ2V0IGFkbWluMVBL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J5T25lQWRtaW4HBBJhZG1pblB1YktleTFTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQhhZG1pbjFQSwABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCGFkbWluMlBLAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIg+jMe", "height": 2771488, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EuWFzAFhpCfG1ngNofmRejKiAZAkUNFomRGXxg5vKay7 Next: DVHYTiNpa3SRApNXgm1Dv3EKgUWRYEpAuuNfM9VRwuvG Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | else (r :+ false) | |
53 | 53 | } | |
54 | 54 | ||
55 | - | nil | |
55 | + | let z = { | |
56 | + | let A = p | |
57 | + | let B = size(A) | |
58 | + | let C = nil | |
59 | + | func D (E,F) = if ((F >= B)) | |
60 | + | then E | |
61 | + | else q(E, A[F]) | |
62 | + | ||
63 | + | func G (E,F) = if ((F >= B)) | |
64 | + | then E | |
65 | + | else throw("List size exceeds 50") | |
66 | + | ||
67 | + | G(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(C, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
68 | + | } | |
69 | + | $Tuple2(nil, z) | |
56 | 70 | } | |
57 | 71 | ||
58 | 72 | ||
59 | 73 | ||
60 | 74 | @Callable(o) | |
61 | - | func exchangeTokens ( | |
75 | + | func exchangeTokens (H) = nil | |
62 | 76 | ||
63 | 77 | ||
64 | - | @Verifier( | |
65 | - | func | |
66 | - | let | |
67 | - | if ($isInstanceOf( | |
78 | + | @Verifier(I) | |
79 | + | func J () = { | |
80 | + | let K = I | |
81 | + | if ($isInstanceOf(K, "InvokeScriptTransaction")) | |
68 | 82 | then { | |
69 | - | let y = | |
70 | - | let | |
83 | + | let y = K | |
84 | + | let L = if ((y.fee == 900000)) | |
71 | 85 | then (y.feeAssetId == unit) | |
72 | 86 | else false | |
73 | - | let | |
74 | - | let | |
87 | + | let M = (y.function == "exchangeLps") | |
88 | + | let N = if (sigVerify(I.bodyBytes, I.proofs[0], j)) | |
75 | 89 | then 1 | |
76 | 90 | else 0 | |
77 | - | let | |
91 | + | let O = if (sigVerify(I.bodyBytes, I.proofs[0], k)) | |
78 | 92 | then 1 | |
79 | 93 | else 0 | |
80 | - | let | |
94 | + | let P = if (sigVerify(I.bodyBytes, I.proofs[0], l)) | |
81 | 95 | then 1 | |
82 | 96 | else 0 | |
83 | - | let | |
97 | + | let Q = if (sigVerify(I.bodyBytes, I.proofs[0], m)) | |
84 | 98 | then 1 | |
85 | 99 | else 0 | |
86 | - | let | |
87 | - | if (if ( | |
88 | - | then | |
100 | + | let R = ((((N + O) + P) + Q) >= 1) | |
101 | + | if (if (L) | |
102 | + | then M | |
89 | 103 | else false) | |
90 | - | then | |
104 | + | then R | |
91 | 105 | else false | |
92 | 106 | } | |
93 | 107 | else { | |
94 | - | let | |
108 | + | let N = if (sigVerify(I.bodyBytes, I.proofs[0], j)) | |
95 | 109 | then 1 | |
96 | 110 | else 0 | |
97 | - | let | |
111 | + | let O = if (sigVerify(I.bodyBytes, I.proofs[1], k)) | |
98 | 112 | then 1 | |
99 | 113 | else 0 | |
100 | - | let | |
114 | + | let P = if (sigVerify(I.bodyBytes, I.proofs[2], l)) | |
101 | 115 | then 1 | |
102 | 116 | else 0 | |
103 | - | ((( | |
117 | + | (((N + O) + P) >= 2) | |
104 | 118 | } | |
105 | 119 | } | |
106 | 120 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS') | |
5 | 5 | ||
6 | 6 | let b = "SF" | |
7 | 7 | ||
8 | 8 | let c = "WX" | |
9 | 9 | ||
10 | 10 | let d = "_poolShareId" | |
11 | 11 | ||
12 | 12 | let e = "pool_" | |
13 | 13 | ||
14 | 14 | let f = "group1_admin1_pub_key" | |
15 | 15 | ||
16 | 16 | let g = "group1_admin2_pub_key" | |
17 | 17 | ||
18 | 18 | let h = "group1_admin3_pub_key" | |
19 | 19 | ||
20 | 20 | let i = "admin_call_pub_key" | |
21 | 21 | ||
22 | 22 | let j = fromBase58String(valueOrErrorMessage(getString(a, f), "Can't get admin1PK")) | |
23 | 23 | ||
24 | 24 | let k = fromBase58String(valueOrErrorMessage(getString(a, g), "Can't get admin2PK")) | |
25 | 25 | ||
26 | 26 | let l = fromBase58String(valueOrErrorMessage(getString(a, h), "Can't get admin3PK")) | |
27 | 27 | ||
28 | 28 | let m = fromBase58String(valueOrErrorMessage(getString(a, i), "Can't get operatorPK")) | |
29 | 29 | ||
30 | 30 | func n () = throw("Wrong pool type") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | @Callable(o) | |
34 | 34 | func exchangeLps (p) = { | |
35 | 35 | func q (r,s) = { | |
36 | 36 | let t = fromBase58String(s) | |
37 | 37 | let u = assetBalance(this, t) | |
38 | 38 | let v = valueOrErrorMessage(getString(a, (s + d)), ("Can't get pool of lp:" + s)) | |
39 | 39 | let w = valueOrErrorMessage(getString(this, (e + v)), "Pool is not inited") | |
40 | 40 | let x = valueOrErrorMessage(addressFromString(v), "unknown addr") | |
41 | 41 | if ((u > 0)) | |
42 | 42 | then { | |
43 | 43 | let y = if ((w == b)) | |
44 | 44 | then invoke(x, "callFunction", ["withdraw", ["0"]], [AttachedPayment(t, u)]) | |
45 | 45 | else if ((w == c)) | |
46 | 46 | then invoke(x, "get", nil, [AttachedPayment(t, u)]) | |
47 | 47 | else n() | |
48 | 48 | if ((y == y)) | |
49 | 49 | then (r :+ true) | |
50 | 50 | else throw("Strict value is not equal to itself.") | |
51 | 51 | } | |
52 | 52 | else (r :+ false) | |
53 | 53 | } | |
54 | 54 | ||
55 | - | nil | |
55 | + | let z = { | |
56 | + | let A = p | |
57 | + | let B = size(A) | |
58 | + | let C = nil | |
59 | + | func D (E,F) = if ((F >= B)) | |
60 | + | then E | |
61 | + | else q(E, A[F]) | |
62 | + | ||
63 | + | func G (E,F) = if ((F >= B)) | |
64 | + | then E | |
65 | + | else throw("List size exceeds 50") | |
66 | + | ||
67 | + | G(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(C, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
68 | + | } | |
69 | + | $Tuple2(nil, z) | |
56 | 70 | } | |
57 | 71 | ||
58 | 72 | ||
59 | 73 | ||
60 | 74 | @Callable(o) | |
61 | - | func exchangeTokens ( | |
75 | + | func exchangeTokens (H) = nil | |
62 | 76 | ||
63 | 77 | ||
64 | - | @Verifier( | |
65 | - | func | |
66 | - | let | |
67 | - | if ($isInstanceOf( | |
78 | + | @Verifier(I) | |
79 | + | func J () = { | |
80 | + | let K = I | |
81 | + | if ($isInstanceOf(K, "InvokeScriptTransaction")) | |
68 | 82 | then { | |
69 | - | let y = | |
70 | - | let | |
83 | + | let y = K | |
84 | + | let L = if ((y.fee == 900000)) | |
71 | 85 | then (y.feeAssetId == unit) | |
72 | 86 | else false | |
73 | - | let | |
74 | - | let | |
87 | + | let M = (y.function == "exchangeLps") | |
88 | + | let N = if (sigVerify(I.bodyBytes, I.proofs[0], j)) | |
75 | 89 | then 1 | |
76 | 90 | else 0 | |
77 | - | let | |
91 | + | let O = if (sigVerify(I.bodyBytes, I.proofs[0], k)) | |
78 | 92 | then 1 | |
79 | 93 | else 0 | |
80 | - | let | |
94 | + | let P = if (sigVerify(I.bodyBytes, I.proofs[0], l)) | |
81 | 95 | then 1 | |
82 | 96 | else 0 | |
83 | - | let | |
97 | + | let Q = if (sigVerify(I.bodyBytes, I.proofs[0], m)) | |
84 | 98 | then 1 | |
85 | 99 | else 0 | |
86 | - | let | |
87 | - | if (if ( | |
88 | - | then | |
100 | + | let R = ((((N + O) + P) + Q) >= 1) | |
101 | + | if (if (L) | |
102 | + | then M | |
89 | 103 | else false) | |
90 | - | then | |
104 | + | then R | |
91 | 105 | else false | |
92 | 106 | } | |
93 | 107 | else { | |
94 | - | let | |
108 | + | let N = if (sigVerify(I.bodyBytes, I.proofs[0], j)) | |
95 | 109 | then 1 | |
96 | 110 | else 0 | |
97 | - | let | |
111 | + | let O = if (sigVerify(I.bodyBytes, I.proofs[1], k)) | |
98 | 112 | then 1 | |
99 | 113 | else 0 | |
100 | - | let | |
114 | + | let P = if (sigVerify(I.bodyBytes, I.proofs[2], l)) | |
101 | 115 | then 1 | |
102 | 116 | else 0 | |
103 | - | ((( | |
117 | + | (((N + O) + P) >= 2) | |
104 | 118 | } | |
105 | 119 | } | |
106 | 120 |
github/deemru/w8io/026f985 33.49 ms ◑