tx · 2gGowJzTrhqPdrzth1yUmASGB3Sh4vUq2NoHoVfti8fw 3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz: -0.10000000 Waves 2023.01.24 12:09 [2418841] smart account 3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz > SELF 0.00000000 Waves
{ "type": 13, "id": "2gGowJzTrhqPdrzth1yUmASGB3Sh4vUq2NoHoVfti8fw", "fee": 10000000, "feeAssetId": null, "timestamp": 1674551380887, "version": 2, "chainId": 84, "sender": "3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz", "senderPublicKey": "C3v9sfZTmGuW7YXwjUKypU41QpFcHCoJxLpvdR4d3iSv", "proofs": [ "3MiJ7SRaPbz61vCoVDhMaC84vgawCLRAEcpDoDJnGN5rswRW576sUqnj5b8kLUxpLs58EdWe2B7dFQ6tvzsaLCDz", "3UrJwQg1WjcKZiJHeMyTP3Uukc24MWtmjEspD1khRrF5B5CTyepV4eFUFm35N13x3Cg8Ai92sHT3wcTiuqBLN6xh" ], "script": "base64:BgImCAISBAoCAQgSBAoCCAgSAwoBCBIDCgEEEgMKAQgSAwoBCBIAEgAUAA9rUHJlZml4UG9vbE5hbWUCBXBvb2xfABFrUHJlZml4RGVwcmVjYXRlZAILZGVwcmVjYXRlZF8ABWtQYWlyAgVwYWlyXwAJa0Fzc2V0SWRBAgpBX2Fzc2V0X2lkAAlrQXNzZXRJZEICCkJfYXNzZXRfaWQAH2tMYXVuY2hwYWREYXRhVHJhbnNhY3Rpb25TdGF0dXMCIWxhdW5jaHBhZF9kYXRhX3RyYW5zYWN0aW9uX3N0YXR1cwATa0FjdGl2ZUFsbENvbnRyYWN0cwIUYWN0aXZlX2FsbF9jb250cmFjdHMADGtBZG1pblB1YktleQIKYWRtaW5fcHViXwANa0FkbWluUHViS2V5MQILYWRtaW5fcHViXzEADWtBZG1pblB1YktleTICC2FkbWluX3B1Yl8yAA1rQWRtaW5QdWJLZXkzAgthZG1pbl9wdWJfMwAUa0Fj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AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUMYWRtaW5QdWJLZXkyAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUMYWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACwuXPeA==", "height": 2418841, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: S8GRrhGeZVgYxG8kvR2Z6UvibVeXuSDCUf1qE7x3Yi1 Next: 8G1tTMfohNveAoXptFWcBXFZNztBPNdn6EuHXSRGhFgF Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "pool_" | |
5 | 5 | ||
6 | 6 | let b = "deprecated_" | |
7 | 7 | ||
8 | 8 | let c = "pair_" | |
9 | 9 | ||
10 | 10 | let d = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let e = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let f = "launchpad_data_transaction_status" | |
15 | 15 | ||
16 | 16 | let g = "active_all_contracts" | |
17 | 17 | ||
18 | 18 | let h = "admin_pub_" | |
19 | 19 | ||
20 | 20 | let i = "admin_pub_1" | |
21 | 21 | ||
22 | 22 | let j = "admin_pub_2" | |
23 | 23 | ||
24 | 24 | let k = "admin_pub_3" | |
25 | 25 | ||
26 | 26 | let l = "achievements_writers" | |
27 | 27 | ||
28 | 28 | let m = fromBase58String(getStringValue(this, i)) | |
29 | 29 | ||
30 | 30 | let n = fromBase58String(getStringValue(this, j)) | |
31 | 31 | ||
32 | 32 | let o = fromBase58String(getStringValue(this, k)) | |
33 | 33 | ||
34 | 34 | let p = getBooleanValue(this, g) | |
35 | 35 | ||
36 | 36 | func q (r) = if ((r.caller == this)) | |
37 | 37 | then unit | |
38 | 38 | else throw("Only the Oracle itself can invoke this function") | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func s (t) = { | |
42 | 42 | let u = valueOrErrorMessage(getString(t, "version"), "Pool is not initialized") | |
43 | 43 | if ((u == "1.0.0")) | |
44 | 44 | then "cpmm" | |
45 | 45 | else if ((u == "2.0.0")) | |
46 | 46 | then "flat" | |
47 | 47 | else if ((u == "3.0.0")) | |
48 | 48 | then "multycurve" | |
49 | 49 | else throw("Unknown version of pool") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func v (w) = toString(valueOrErrorMessage(addressFromString(w), (("Can't parse \"" + w) + "\" as address"))) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func x (r) = if (containsElement([m, n, o], r.callerPublicKey)) | |
57 | 57 | then unit | |
58 | 58 | else throw("Only admin can call this function") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Callable(r) | |
62 | 62 | func setAdmin (y,z) = valueOrElse(q(r), if (if ((0 > y)) | |
63 | 63 | then (y > 3) | |
64 | 64 | else false) | |
65 | 65 | then throw("Wrong admin id") | |
66 | 66 | else [StringEntry((h + toString(y)), z)]) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | 70 | @Callable(r) | |
71 | 71 | func addPool (t,A) = valueOrElse(x(r), { | |
72 | 72 | let B = v(t) | |
73 | 73 | let C = (a + B) | |
74 | 74 | let D = getString(this, C) | |
75 | 75 | if (isDefined(D)) | |
76 | 76 | then throw((((("Pool with address \"" + B) + "\" is already defined with name \"") + value(D)) + "\"")) | |
77 | 77 | else ([StringEntry(C, A)] ++ (if ((s(value(addressFromString(t))) == "multycurve")) | |
78 | 78 | then nil | |
79 | 79 | else { | |
80 | 80 | let E = valueOrErrorMessage(getString(value(addressFromString(t)), d), "Asset id A is incorrect") | |
81 | 81 | let F = valueOrErrorMessage(getString(value(addressFromString(t)), e), "Asset id B is incorrect") | |
82 | 82 | [StringEntry((((c + E) + "_") + F), t)] | |
83 | 83 | })) | |
84 | 84 | }) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | ||
88 | 88 | @Callable(r) | |
89 | 89 | func setDeprecated (t) = valueOrElse(x(r), { | |
90 | 90 | let C = (a + t) | |
91 | 91 | if (!(isDefined(getString(this, C)))) | |
92 | 92 | then throw(("Couldn't found pool with address " + t)) | |
93 | 93 | else [BooleanEntry((b + t), true)] | |
94 | 94 | }) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(r) | |
99 | 99 | func launchpadDataTransactionStatus (G) = valueOrElse(x(r), [BooleanEntry(f, G)]) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | ||
103 | 103 | @Callable(r) | |
104 | 104 | func addAchievementsWriter (w) = valueOrElse(x(r), { | |
105 | 105 | let H = valueOrElse(getString(this, l), "") | |
106 | 106 | let I = if ((H == "")) | |
107 | 107 | then nil | |
108 | 108 | else split(H, ",") | |
109 | 109 | [StringEntry(l, makeString((I :+ w), ","))] | |
110 | 110 | }) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(r) | |
115 | 115 | func removeAchievementsWriter (w) = valueOrElse(x(r), { | |
116 | 116 | let H = split(valueOrElse(getString(this, l), ""), ",") | |
117 | 117 | let J = valueOrErrorMessage(indexOf(H, w), "Can't find address in the list") | |
118 | 118 | [StringEntry(l, makeString(removeByIndex(H, J), ","))] | |
119 | 119 | }) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(r) | |
124 | 124 | func shutdownAllContracts () = valueOrElse(x(r), if (!(p)) | |
125 | 125 | then throw("All contracts already shutdown") | |
126 | 126 | else [BooleanEntry(g, false)]) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(r) | |
131 | 131 | func activateAllContracts () = valueOrElse(x(r), if (p) | |
132 | 132 | then throw("All contracts already active") | |
133 | 133 | else [BooleanEntry(g, true)]) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Verifier(K) | |
137 | 137 | func L () = { | |
138 | 138 | let M = if (sigVerify(K.bodyBytes, K.proofs[0], m)) | |
139 | 139 | then 1 | |
140 | 140 | else 0 | |
141 | 141 | let N = if (sigVerify(K.bodyBytes, K.proofs[1], n)) | |
142 | 142 | then 1 | |
143 | 143 | else 0 | |
144 | 144 | let O = if (sigVerify(K.bodyBytes, K.proofs[2], o)) | |
145 | 145 | then 1 | |
146 | 146 | else 0 | |
147 | 147 | (((M + N) + O) >= 2) | |
148 | 148 | } | |
149 | 149 |
github/deemru/w8io/026f985 28.07 ms ◑