diff --git a/Cargo.toml b/Cargo.toml index 5a9fcea5..3bd877fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,31 +95,17 @@ members = [ "coordinator", "substrate/primitives", - - "substrate/coins/primitives", - "substrate/coins/pallet", - - "substrate/dex/pallet", - - "substrate/validator-sets/primitives", - "substrate/validator-sets/pallet", - - "substrate/genesis-liquidity/primitives", - "substrate/genesis-liquidity/pallet", - - "substrate/emissions/primitives", - "substrate/emissions/pallet", - - "substrate/economic-security/pallet", - - "substrate/in-instructions/primitives", - "substrate/in-instructions/pallet", - - "substrate/signals/primitives", - "substrate/signals/pallet", - "substrate/abi", + "substrate/coins", + "substrate/validator-sets", + "substrate/signals", + "substrate/dex", + "substrate/genesis-liquidity", + "substrate/economic-security", + "substrate/emissions", + "substrate/in-instructions", + "substrate/runtime", "substrate/node", diff --git a/coordinator/Cargo.toml b/coordinator/Cargo.toml index fdb019d3..e30208e3 100644 --- a/coordinator/Cargo.toml +++ b/coordinator/Cargo.toml @@ -45,7 +45,7 @@ messages = { package = "serai-processor-messages", path = "../processor/messages message-queue = { package = "serai-message-queue", path = "../message-queue" } tributary-sdk = { path = "./tributary-sdk" } -serai-client = { path = "../substrate/client", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../substrate/client", default-features = false, features = ["serai"] } log = { version = "0.4", default-features = false, features = ["std"] } env_logger = { version = "0.10", default-features = false, features = ["humantime"] } diff --git a/coordinator/cosign/Cargo.toml b/coordinator/cosign/Cargo.toml index 2154adcc..a6330be9 100644 --- a/coordinator/cosign/Cargo.toml +++ b/coordinator/cosign/Cargo.toml @@ -23,7 +23,7 @@ schnorrkel = { version = "0.11", default-features = false, features = ["std"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive"] } borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] } -serai-client = { path = "../../substrate/client", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../../substrate/client", default-features = false, features = ["serai"] } log = { version = "0.4", default-features = false, features = ["std"] } diff --git a/coordinator/p2p/Cargo.toml b/coordinator/p2p/Cargo.toml index 5579982c..b24532db 100644 --- a/coordinator/p2p/Cargo.toml +++ b/coordinator/p2p/Cargo.toml @@ -22,7 +22,7 @@ borsh = { version = "1", default-features = false, features = ["std", "derive", serai-db = { path = "../../common/db", version = "0.1" } -serai-client = { path = "../../substrate/client", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../../substrate/client", default-features = false, features = ["serai"] } serai-cosign = { path = "../cosign" } tributary-sdk = { path = "../tributary-sdk" } diff --git a/coordinator/p2p/libp2p/Cargo.toml b/coordinator/p2p/libp2p/Cargo.toml index 450c0f38..bbb56036 100644 --- a/coordinator/p2p/libp2p/Cargo.toml +++ b/coordinator/p2p/libp2p/Cargo.toml @@ -29,7 +29,7 @@ schnorrkel = { version = "0.11", default-features = false, features = ["std"] } hex = { version = "0.4", default-features = false, features = ["std"] } borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] } -serai-client = { path = "../../../substrate/client", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../../../substrate/client", default-features = false, features = ["serai"] } serai-cosign = { path = "../../cosign" } tributary-sdk = { path = "../../tributary-sdk" } diff --git a/coordinator/substrate/Cargo.toml b/coordinator/substrate/Cargo.toml index 3e66c079..d78ace99 100644 --- a/coordinator/substrate/Cargo.toml +++ b/coordinator/substrate/Cargo.toml @@ -25,7 +25,7 @@ borsh = { version = "1", default-features = false, features = ["std", "derive", dkg = { path = "../../crypto/dkg", default-features = false, features = ["std"] } -serai-client = { path = "../../substrate/client", version = "0.1", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../../substrate/client", version = "0.1", default-features = false, features = ["serai"] } log = { version = "0.4", default-features = false, features = ["std"] } diff --git a/coordinator/tributary/Cargo.toml b/coordinator/tributary/Cargo.toml index af533e64..57471672 100644 --- a/coordinator/tributary/Cargo.toml +++ b/coordinator/tributary/Cargo.toml @@ -30,7 +30,7 @@ dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = fals dkg = { path = "../../crypto/dkg", default-features = false, features = ["std"] } schnorr = { package = "schnorr-signatures", path = "../../crypto/schnorr", default-features = false, features = ["std"] } -serai-client = { path = "../../substrate/client", default-features = false, features = ["serai", "borsh"] } +serai-client = { path = "../../substrate/client", default-features = false, features = ["serai"] } serai-db = { path = "../../common/db" } serai-task = { path = "../../common/task", version = "0.1" } diff --git a/message-queue/Cargo.toml b/message-queue/Cargo.toml index fc65e59b..72fc7e6f 100644 --- a/message-queue/Cargo.toml +++ b/message-queue/Cargo.toml @@ -46,7 +46,7 @@ serai-db = { path = "../common/db", optional = true } serai-env = { path = "../common/env" } -serai-primitives = { path = "../substrate/primitives", features = ["borsh"] } +serai-primitives = { path = "../substrate/primitives", default-features = false, features = ["std"] } [features] parity-db = ["serai-db/parity-db"] diff --git a/processor/frost-attempt-manager/Cargo.toml b/processor/frost-attempt-manager/Cargo.toml index 68fd1669..3f3c3839 100644 --- a/processor/frost-attempt-manager/Cargo.toml +++ b/processor/frost-attempt-manager/Cargo.toml @@ -25,7 +25,7 @@ rand_core = { version = "0.6", default-features = false, features = ["std", "get frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false } -serai-validator-sets-primitives = { path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std"] } +serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } log = { version = "0.4", default-features = false, features = ["std"] } diff --git a/processor/key-gen/Cargo.toml b/processor/key-gen/Cargo.toml index c1de1a81..ab80116d 100644 --- a/processor/key-gen/Cargo.toml +++ b/processor/key-gen/Cargo.toml @@ -35,7 +35,7 @@ ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, fea dkg = { package = "dkg-evrf", path = "../../crypto/dkg/evrf", default-features = false, features = ["std", "ristretto"] } # Substrate -serai-validator-sets-primitives = { path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std"] } +serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } # Encoders scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std"] } diff --git a/processor/messages/Cargo.toml b/processor/messages/Cargo.toml index a505b0a9..c3e5fbbc 100644 --- a/processor/messages/Cargo.toml +++ b/processor/messages/Cargo.toml @@ -25,9 +25,6 @@ borsh = { version = "1", default-features = false, features = ["std", "derive", dkg = { path = "../../crypto/dkg", default-features = false, features = ["std", "borsh"] } -serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std", "borsh"] } -in-instructions-primitives = { package = "serai-in-instructions-primitives", path = "../../substrate/in-instructions/primitives", default-features = false, features = ["std", "borsh"] } -coins-primitives = { package = "serai-coins-primitives", path = "../../substrate/coins/primitives", default-features = false, features = ["std", "borsh"] } -validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std", "borsh"] } +serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } serai-cosign = { path = "../../coordinator/cosign", default-features = false } diff --git a/processor/primitives/Cargo.toml b/processor/primitives/Cargo.toml index aadb73d1..f2ae7a9c 100644 --- a/processor/primitives/Cargo.toml +++ b/processor/primitives/Cargo.toml @@ -20,8 +20,7 @@ workspace = true [dependencies] group = { version = "0.13", default-features = false } -serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std", "borsh"] } -serai-coins-primitives = { path = "../../substrate/coins/primitives", default-features = false, features = ["std", "borsh"] } +serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std"] } borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] } diff --git a/processor/scanner/Cargo.toml b/processor/scanner/Cargo.toml index 7067c330..770d6276 100644 --- a/processor/scanner/Cargo.toml +++ b/processor/scanner/Cargo.toml @@ -36,9 +36,6 @@ serai-db = { path = "../../common/db" } messages = { package = "serai-processor-messages", path = "../messages" } serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } -serai-validator-sets-primitives = { path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std", "borsh"] } -serai-in-instructions-primitives = { path = "../../substrate/in-instructions/primitives", default-features = false, features = ["std", "borsh"] } -serai-coins-primitives = { path = "../../substrate/coins/primitives", default-features = false, features = ["std", "borsh"] } primitives = { package = "serai-processor-primitives", path = "../primitives" } scheduler-primitives = { package = "serai-processor-scheduler-primitives", path = "../scheduler/primitives" } diff --git a/processor/signers/Cargo.toml b/processor/signers/Cargo.toml index 2a81e7bb..0529439f 100644 --- a/processor/signers/Cargo.toml +++ b/processor/signers/Cargo.toml @@ -34,8 +34,6 @@ scale = { package = "parity-scale-codec", version = "3", default-features = fals borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] } serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] } -serai-validator-sets-primitives = { path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std"] } -serai-in-instructions-primitives = { path = "../../substrate/in-instructions/primitives", default-features = false, features = ["std"] } serai-db = { path = "../../common/db" } log = { version = "0.4", default-features = false, features = ["std"] } diff --git a/substrate/client/Cargo.toml b/substrate/client/Cargo.toml index 0ca04a47..cbaf359a 100644 --- a/substrate/client/Cargo.toml +++ b/substrate/client/Cargo.toml @@ -65,7 +65,6 @@ serai-docker-tests = { path = "../../tests/docker" } [features] serai = ["thiserror/std", "serde", "serde_json", "multiaddr", "sp-core", "sp-runtime", "frame-system", "simple-request"] -borsh = [] networks = [] bitcoin = ["networks", "dep:bitcoin"] diff --git a/substrate/coins/pallet/Cargo.toml b/substrate/coins/Cargo.toml similarity index 88% rename from substrate/coins/pallet/Cargo.toml rename to substrate/coins/Cargo.toml index 953c4564..f72f9136 100644 --- a/substrate/coins/pallet/Cargo.toml +++ b/substrate/coins/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-coins-pallet" version = "0.1.0" description = "Coins pallet for Serai" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/coins/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/coins" authors = ["Akil Demir "] edition = "2021" rust-version = "1.85" @@ -31,8 +31,7 @@ sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "sera pallet-transaction-payment = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false, features = ["serde"] } -coins-primitives = { package = "serai-coins-primitives", path = "../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } [dev-dependencies] sp-io = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false, features = ["std"] } @@ -49,7 +48,6 @@ std = [ "pallet-transaction-payment/std", "serai-primitives/std", - "coins-primitives/std", ] try-runtime = [ diff --git a/substrate/coins/pallet/LICENSE b/substrate/coins/LICENSE similarity index 100% rename from substrate/coins/pallet/LICENSE rename to substrate/coins/LICENSE diff --git a/substrate/coins/primitives/Cargo.toml b/substrate/coins/primitives/Cargo.toml deleted file mode 100644 index 9b0a160a..00000000 --- a/substrate/coins/primitives/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "serai-coins-primitives" -version = "0.1.0" -description = "Serai coins primitives" -license = "MIT" -authors = ["Luke Parker "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -zeroize = { version = "^1.5", features = ["derive"], optional = true } - -borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } -serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2", default-features = false, features = ["derive"] } - -serai-primitives = { path = "../../primitives", default-features = false } - -[dev-dependencies] -sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } - -[features] -std = ["zeroize", "borsh?/std", "serde?/std", "scale/std", "scale-info/std", "sp-runtime/std", "serai-primitives/std"] -borsh = ["dep:borsh", "serai-primitives/borsh"] -serde = ["dep:serde", "serai-primitives/serde"] -default = ["std"] diff --git a/substrate/coins/primitives/LICENSE b/substrate/coins/primitives/LICENSE deleted file mode 100644 index 68206b77..00000000 --- a/substrate/coins/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/coins/primitives/src/lib.rs b/substrate/coins/primitives/src/lib.rs deleted file mode 100644 index 8b137891..00000000 --- a/substrate/coins/primitives/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/substrate/coins/pallet/src/lib.rs b/substrate/coins/src/lib.rs similarity index 100% rename from substrate/coins/pallet/src/lib.rs rename to substrate/coins/src/lib.rs diff --git a/substrate/coins/pallet/src/mock.rs b/substrate/coins/src/mock.rs similarity index 100% rename from substrate/coins/pallet/src/mock.rs rename to substrate/coins/src/mock.rs diff --git a/substrate/coins/pallet/src/tests.rs b/substrate/coins/src/tests.rs similarity index 100% rename from substrate/coins/pallet/src/tests.rs rename to substrate/coins/src/tests.rs diff --git a/substrate/dex/pallet/Cargo.toml b/substrate/dex/Cargo.toml similarity index 91% rename from substrate/dex/pallet/Cargo.toml rename to substrate/dex/Cargo.toml index 9a607375..9b166714 100644 --- a/substrate/dex/pallet/Cargo.toml +++ b/substrate/dex/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-dex-pallet" version = "0.1.0" description = "DEX pallet for Serai" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/dex/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/dex" authors = ["Parity Technologies , Akil Demir "] edition = "2021" rust-version = "1.85" @@ -32,9 +32,9 @@ frame-system = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "se frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-benchmarking = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false, optional = true } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } [dev-dependencies] rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } diff --git a/substrate/dex/pallet/LICENSE-AGPL3 b/substrate/dex/LICENSE-AGPL3 similarity index 100% rename from substrate/dex/pallet/LICENSE-AGPL3 rename to substrate/dex/LICENSE-AGPL3 diff --git a/substrate/dex/pallet/LICENSE-APACHE2 b/substrate/dex/LICENSE-APACHE2 similarity index 100% rename from substrate/dex/pallet/LICENSE-APACHE2 rename to substrate/dex/LICENSE-APACHE2 diff --git a/substrate/dex/pallet/src/benchmarking.rs b/substrate/dex/src/benchmarking.rs similarity index 100% rename from substrate/dex/pallet/src/benchmarking.rs rename to substrate/dex/src/benchmarking.rs diff --git a/substrate/dex/pallet/src/lib.rs b/substrate/dex/src/lib.rs similarity index 100% rename from substrate/dex/pallet/src/lib.rs rename to substrate/dex/src/lib.rs diff --git a/substrate/dex/pallet/src/mock.rs b/substrate/dex/src/mock.rs similarity index 100% rename from substrate/dex/pallet/src/mock.rs rename to substrate/dex/src/mock.rs diff --git a/substrate/dex/pallet/src/tests.rs b/substrate/dex/src/tests.rs similarity index 100% rename from substrate/dex/pallet/src/tests.rs rename to substrate/dex/src/tests.rs diff --git a/substrate/dex/pallet/src/types.rs b/substrate/dex/src/types.rs similarity index 100% rename from substrate/dex/pallet/src/types.rs rename to substrate/dex/src/types.rs diff --git a/substrate/dex/pallet/src/weights.rs b/substrate/dex/src/weights.rs similarity index 100% rename from substrate/dex/pallet/src/weights.rs rename to substrate/dex/src/weights.rs diff --git a/substrate/economic-security/pallet/Cargo.toml b/substrate/economic-security/Cargo.toml similarity index 85% rename from substrate/economic-security/pallet/Cargo.toml rename to substrate/economic-security/Cargo.toml index 73e7c6de..c13bcdb8 100644 --- a/substrate/economic-security/pallet/Cargo.toml +++ b/substrate/economic-security/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-economic-security-pallet" version = "0.1.0" description = "Economic Security pallet for Serai" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/economic-security/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/economic-security" authors = ["Akil Demir "] edition = "2021" rust-version = "1.85" @@ -25,17 +25,17 @@ scale-info = { version = "2", default-features = false, features = ["derive"] } frame-system = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -dex-pallet = { package = "serai-dex-pallet", path = "../../dex/pallet", default-features = false } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } +dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } [dev-dependencies] pallet-babe = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } pallet-grandpa = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } pallet-timestamp = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../../validator-sets/pallet", default-features = false } +validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } sp-io = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } diff --git a/substrate/economic-security/pallet/LICENSE b/substrate/economic-security/LICENSE similarity index 100% rename from substrate/economic-security/pallet/LICENSE rename to substrate/economic-security/LICENSE diff --git a/substrate/economic-security/pallet/src/lib.rs b/substrate/economic-security/src/lib.rs similarity index 100% rename from substrate/economic-security/pallet/src/lib.rs rename to substrate/economic-security/src/lib.rs diff --git a/substrate/economic-security/pallet/src/mock.rs b/substrate/economic-security/src/mock.rs similarity index 100% rename from substrate/economic-security/pallet/src/mock.rs rename to substrate/economic-security/src/mock.rs diff --git a/substrate/economic-security/pallet/src/tests.rs b/substrate/economic-security/src/tests.rs similarity index 100% rename from substrate/economic-security/pallet/src/tests.rs rename to substrate/economic-security/src/tests.rs diff --git a/substrate/emissions/pallet/Cargo.toml b/substrate/emissions/Cargo.toml similarity index 66% rename from substrate/emissions/pallet/Cargo.toml rename to substrate/emissions/Cargo.toml index 17ffe36b..c15ba6e0 100644 --- a/substrate/emissions/pallet/Cargo.toml +++ b/substrate/emissions/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-emissions-pallet" version = "0.1.0" description = "Emissions pallet for Serai" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/emissions/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/emissions" authors = ["Akil Demir "] edition = "2021" rust-version = "1.85" @@ -28,16 +28,14 @@ frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "s sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } -validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../../validator-sets/pallet", default-features = false } -dex-pallet = { package = "serai-dex-pallet", path = "../../dex/pallet", default-features = false } -genesis-liquidity-pallet = { package = "serai-genesis-liquidity-pallet", path = "../../genesis-liquidity/pallet", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } +validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } +dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } +genesis-liquidity-pallet = { package = "serai-genesis-liquidity-pallet", path = "../genesis-liquidity", default-features = false } -economic-security-pallet = { package = "serai-economic-security-pallet", path = "../../economic-security/pallet", default-features = false } +economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } -validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../validator-sets/primitives", default-features = false } -emissions-primitives = { package = "serai-emissions-primitives", path = "../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } [features] std = [ @@ -58,8 +56,6 @@ std = [ "economic-security-pallet/std", "serai-primitives/std", - "emissions-primitives/std", ] -fast-epoch = [] try-runtime = [] # TODO default = ["std"] diff --git a/substrate/emissions/pallet/LICENSE b/substrate/emissions/LICENSE similarity index 100% rename from substrate/emissions/pallet/LICENSE rename to substrate/emissions/LICENSE diff --git a/substrate/emissions/primitives/Cargo.toml b/substrate/emissions/primitives/Cargo.toml deleted file mode 100644 index 95a1222a..00000000 --- a/substrate/emissions/primitives/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "serai-emissions-primitives" -version = "0.1.0" -description = "Serai emissions primitives" -license = "MIT" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/emissions/primitives" -authors = ["Akil Demir "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -serai-primitives = { path = "../../primitives", default-features = false } - -[features] -std = ["serai-primitives/std"] -default = ["std"] diff --git a/substrate/emissions/primitives/LICENSE b/substrate/emissions/primitives/LICENSE deleted file mode 100644 index 4f2fcbf8..00000000 --- a/substrate/emissions/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/emissions/primitives/src/lib.rs b/substrate/emissions/primitives/src/lib.rs deleted file mode 100644 index 38aa8ca2..00000000 --- a/substrate/emissions/primitives/src/lib.rs +++ /dev/null @@ -1,26 +0,0 @@ -#![cfg_attr(docsrs, feature(doc_cfg))] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] -#![cfg_attr(not(feature = "std"), no_std)] - -use serai_primitives::{DAYS, YEARS, SeraiAddress, system_address}; - -// Protocol owned liquidity account. -pub const POL_ACCOUNT: SeraiAddress = system_address(b"Serai-protocol_owned_liquidity"); - -/// INITIAL_REWARD = 100,000 SRI / BLOCKS_PER_DAY for 60 days -pub const INITIAL_REWARD_PER_BLOCK: u64 = (100_000 * 10u64.pow(8)) / DAYS; - -/// REWARD = 20M SRI / BLOCKS_PER_YEAR -pub const REWARD_PER_BLOCK: u64 = (20_000_000 * 10u64.pow(8)) / YEARS; - -/// 20% of all stake desired to be for Serai network -pub const SERAI_VALIDATORS_DESIRED_PERCENTAGE: u64 = 20; - -/// Desired unused capacity ratio for a network assuming capacity is 10,000. -pub const DESIRED_DISTRIBUTION: u64 = 1_000; - -/// Percentage scale for the validator vs. pool reward distribution. -pub const ACCURACY_MULTIPLIER: u64 = 10_000; - -/// The block to target for economic security -pub const SECURE_BY: u64 = YEARS; diff --git a/substrate/emissions/pallet/src/lib.rs b/substrate/emissions/src/lib.rs similarity index 100% rename from substrate/emissions/pallet/src/lib.rs rename to substrate/emissions/src/lib.rs diff --git a/substrate/genesis-liquidity/pallet/Cargo.toml b/substrate/genesis-liquidity/Cargo.toml similarity index 67% rename from substrate/genesis-liquidity/pallet/Cargo.toml rename to substrate/genesis-liquidity/Cargo.toml index 6104c73c..1e7ed6cf 100644 --- a/substrate/genesis-liquidity/pallet/Cargo.toml +++ b/substrate/genesis-liquidity/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-genesis-liquidity-pallet" version = "0.1.0" description = "Genesis liquidity pallet for Serai" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/genesis-liquidity/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/genesis-liquidity" authors = ["Akil Demir "] edition = "2021" rust-version = "1.85" @@ -29,15 +29,13 @@ sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-ne sp-core = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } sp-application-crypto = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -dex-pallet = { package = "serai-dex-pallet", path = "../../dex/pallet", default-features = false } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } -validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../../validator-sets/pallet", default-features = false } +dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } +validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } -economic-security-pallet = { package = "serai-economic-security-pallet", path = "../../economic-security/pallet", default-features = false } +economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } -genesis-liquidity-primitives = { package = "serai-genesis-liquidity-primitives", path = "../primitives", default-features = false } -validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../validator-sets/primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } [features] std = [ @@ -58,10 +56,7 @@ std = [ "economic-security-pallet/std", "serai-primitives/std", - "genesis-liquidity-primitives/std", - "validator-sets-primitives/std", ] try-runtime = [] # TODO -fast-epoch = [] default = ["std"] diff --git a/substrate/genesis-liquidity/pallet/LICENSE b/substrate/genesis-liquidity/LICENSE similarity index 100% rename from substrate/genesis-liquidity/pallet/LICENSE rename to substrate/genesis-liquidity/LICENSE diff --git a/substrate/genesis-liquidity/primitives/Cargo.toml b/substrate/genesis-liquidity/primitives/Cargo.toml deleted file mode 100644 index 7a9cdf3a..00000000 --- a/substrate/genesis-liquidity/primitives/Cargo.toml +++ /dev/null @@ -1,45 +0,0 @@ -[package] -name = "serai-genesis-liquidity-primitives" -version = "0.1.0" -description = "Serai genesis liquidity primitives" -license = "MIT" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/genesis-liquidity/primitives" -authors = ["Akil Demir "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -zeroize = { version = "^1.5", features = ["derive"], optional = true } - -borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } -serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2", default-features = false, features = ["derive"] } - -sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } - -serai-primitives = { path = "../../primitives", default-features = false } -validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../validator-sets/primitives", default-features = false } - -[features] -std = [ - "zeroize", - "scale/std", - "borsh?/std", - "serde?/std", - "scale-info/std", - - "serai-primitives/std", - "validator-sets-primitives/std", - - "sp-std/std" -] -default = ["std"] diff --git a/substrate/genesis-liquidity/primitives/LICENSE b/substrate/genesis-liquidity/primitives/LICENSE deleted file mode 100644 index 4f2fcbf8..00000000 --- a/substrate/genesis-liquidity/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/genesis-liquidity/primitives/src/lib.rs b/substrate/genesis-liquidity/primitives/src/lib.rs deleted file mode 100644 index 8b137891..00000000 --- a/substrate/genesis-liquidity/primitives/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/substrate/genesis-liquidity/pallet/src/lib.rs b/substrate/genesis-liquidity/src/lib.rs similarity index 100% rename from substrate/genesis-liquidity/pallet/src/lib.rs rename to substrate/genesis-liquidity/src/lib.rs diff --git a/substrate/in-instructions/pallet/Cargo.toml b/substrate/in-instructions/Cargo.toml similarity index 79% rename from substrate/in-instructions/pallet/Cargo.toml rename to substrate/in-instructions/Cargo.toml index daab6aec..07c155bb 100644 --- a/substrate/in-instructions/pallet/Cargo.toml +++ b/substrate/in-instructions/Cargo.toml @@ -3,6 +3,7 @@ name = "serai-in-instructions-pallet" version = "0.1.0" description = "Execute calls via In Instructions from unsigned transactions" license = "AGPL-3.0-only" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/genesis-liquidity" authors = ["Luke Parker "] edition = "2021" publish = false @@ -33,21 +34,20 @@ sp-core = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-n frame-system = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } -in-instructions-primitives = { package = "serai-in-instructions-primitives", path = "../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } -dex-pallet = { package = "serai-dex-pallet", path = "../../dex/pallet", default-features = false } -validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../../validator-sets/pallet", default-features = false } -genesis-liquidity-pallet = { package = "serai-genesis-liquidity-pallet", path = "../../genesis-liquidity/pallet", default-features = false } -emissions-pallet = { package = "serai-emissions-pallet", path = "../../emissions/pallet", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } +dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } +validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } +genesis-liquidity-pallet = { package = "serai-genesis-liquidity-pallet", path = "../genesis-liquidity", default-features = false } +emissions-pallet = { package = "serai-emissions-pallet", path = "../emissions", default-features = false } [dev-dependencies] pallet-babe = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } pallet-grandpa = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } pallet-timestamp = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -economic-security-pallet = { package = "serai-economic-security-pallet", path = "../../economic-security/pallet", default-features = false } +economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false } [features] std = [ @@ -64,7 +64,6 @@ std = [ "frame-support/std", "serai-primitives/std", - "in-instructions-primitives/std", "coins-pallet/std", "dex-pallet/std", diff --git a/substrate/in-instructions/pallet/LICENSE b/substrate/in-instructions/LICENSE similarity index 100% rename from substrate/in-instructions/pallet/LICENSE rename to substrate/in-instructions/LICENSE diff --git a/substrate/in-instructions/primitives/Cargo.toml b/substrate/in-instructions/primitives/Cargo.toml deleted file mode 100644 index 61646fd1..00000000 --- a/substrate/in-instructions/primitives/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -name = "serai-in-instructions-primitives" -version = "0.1.0" -description = "Serai instructions library, enabling encoding and decoding" -license = "MIT" -authors = ["Luke Parker "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -zeroize = { version = "^1.5", features = ["derive"], optional = true } - -borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } -serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2", default-features = false, features = ["derive"] } - -sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -sp-application-crypto = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } - -serai-primitives = { path = "../../primitives", default-features = false } -coins-primitives = { package = "serai-coins-primitives", path = "../../coins/primitives", default-features = false } - -[features] -std = [ - "zeroize", - - "borsh?/std", - "serde?/std", - - "scale/std", - "scale-info/std", - - "sp-std/std", - "sp-application-crypto/std", - "sp-runtime/std", - - "serai-primitives/std", - "coins-primitives/std", -] -borsh = ["dep:borsh", "serai-primitives/borsh", "coins-primitives/borsh"] -serde = ["dep:serde", "serai-primitives/serde", "coins-primitives/serde"] -default = ["std"] diff --git a/substrate/in-instructions/primitives/LICENSE b/substrate/in-instructions/primitives/LICENSE deleted file mode 100644 index 32ff304a..00000000 --- a/substrate/in-instructions/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/in-instructions/primitives/src/lib.rs b/substrate/in-instructions/primitives/src/lib.rs deleted file mode 100644 index 8b137891..00000000 --- a/substrate/in-instructions/primitives/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/substrate/in-instructions/pallet/src/lib.rs b/substrate/in-instructions/src/lib.rs similarity index 100% rename from substrate/in-instructions/pallet/src/lib.rs rename to substrate/in-instructions/src/lib.rs diff --git a/substrate/in-instructions/pallet/src/mock.rs b/substrate/in-instructions/src/mock.rs similarity index 100% rename from substrate/in-instructions/pallet/src/mock.rs rename to substrate/in-instructions/src/mock.rs diff --git a/substrate/in-instructions/pallet/src/tests.rs b/substrate/in-instructions/src/tests.rs similarity index 100% rename from substrate/in-instructions/pallet/src/tests.rs rename to substrate/in-instructions/src/tests.rs diff --git a/substrate/node/Cargo.toml b/substrate/node/Cargo.toml index b6e98a5d..a77152f0 100644 --- a/substrate/node/Cargo.toml +++ b/substrate/node/Cargo.toml @@ -89,7 +89,6 @@ substrate-build-script-utils = { git = "https://github.com/serai-dex/polkadot-sd [features] default = [] -fast-epoch = ["serai-runtime/fast-epoch"] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/primitives/Cargo.toml b/substrate/primitives/Cargo.toml index e6d31c52..b7535322 100644 --- a/substrate/primitives/Cargo.toml +++ b/substrate/primitives/Cargo.toml @@ -31,5 +31,3 @@ bech32 = { version = "0.11", default-features = false } [features] std = ["zeroize/std", "borsh/std", "ciphersuite/std", "dkg/std", "sp-core/std", "bech32/std"] default = ["std"] -borsh = [] # TODO -serde = [] # TODO diff --git a/substrate/runtime/Cargo.toml b/substrate/runtime/Cargo.toml index 13a03bdb..00bdec8b 100644 --- a/substrate/runtime/Cargo.toml +++ b/substrate/runtime/Cargo.toml @@ -26,12 +26,12 @@ sp-version = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "sera sp-runtime = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } sp-api = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } +serai-abi = { path = "../abi", default-features = false, features = ["substrate"] } + frame-system = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-executive = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -serai-abi = { path = "../abi", default-features = false, features = ["substrate"] } - [build-dependencies] substrate-wasm-builder = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next" } @@ -52,9 +52,7 @@ std = [ "serai-abi/std", ] -fast-epoch = [] # TODO - -try-runtime = ["sp-runtime/try-runtime", "frame-system/try-runtime", "frame-support/try-runtime", "frame-executive/try-runtime"] +try-runtime = ["sp-runtime/try-runtime", "serai-abi/try-runtime", "frame-system/try-runtime", "frame-support/try-runtime", "frame-executive/try-runtime"] runtime-benchmarks = ["sp-runtime/runtime-benchmarks", "frame-system/runtime-benchmarks", "frame-support/runtime-benchmarks"] default = ["std"] diff --git a/substrate/runtime/src/core_pallet.rs b/substrate/runtime/src/core_pallet.rs index e1febb30..6a311fc9 100644 --- a/substrate/runtime/src/core_pallet.rs +++ b/substrate/runtime/src/core_pallet.rs @@ -1,7 +1,6 @@ #[frame_support::pallet] mod core_pallet { use ::alloc::*; - use frame_system::pallet_prelude::*; use frame_support::pallet_prelude::*; #[pallet::storage] diff --git a/substrate/runtime/src/lib.rs b/substrate/runtime/src/lib.rs index 542f7eac..c2376018 100644 --- a/substrate/runtime/src/lib.rs +++ b/substrate/runtime/src/lib.rs @@ -6,7 +6,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); extern crate alloc; -use ::alloc::{borrow::Cow, vec::Vec}; +use alloc::borrow::Cow; use sp_core::sr25519::Public; use sp_runtime::{Perbill, Weight, traits::Header as _}; @@ -255,7 +255,7 @@ impl serai_abi::TransactionContext for Context { } } -/* +/* TODO use core::marker::PhantomData; // Re-export all components diff --git a/substrate/signals/pallet/Cargo.toml b/substrate/signals/Cargo.toml similarity index 82% rename from substrate/signals/pallet/Cargo.toml rename to substrate/signals/Cargo.toml index 06d6659f..03166cef 100644 --- a/substrate/signals/pallet/Cargo.toml +++ b/substrate/signals/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-signals-pallet" version = "0.1.0" description = "Signals pallet" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/signals/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/signals" authors = ["Luke Parker "] edition = "2021" rust-version = "1.85" @@ -28,11 +28,10 @@ sp-io = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-nex frame-system = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } -serai-signals-primitives = { path = "../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } -validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../../validator-sets/pallet", default-features = false } -in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../../in-instructions/pallet", default-features = false } +validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } +in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../in-instructions", default-features = false } [features] std = [ @@ -46,7 +45,6 @@ std = [ "frame-support/std", "serai-primitives/std", - "serai-signals-primitives/std", "validator-sets-pallet/std", "in-instructions-pallet/std", diff --git a/substrate/signals/pallet/LICENSE b/substrate/signals/LICENSE similarity index 100% rename from substrate/signals/pallet/LICENSE rename to substrate/signals/LICENSE diff --git a/substrate/signals/primitives/Cargo.toml b/substrate/signals/primitives/Cargo.toml deleted file mode 100644 index 629606d9..00000000 --- a/substrate/signals/primitives/Cargo.toml +++ /dev/null @@ -1,45 +0,0 @@ -[package] -name = "serai-signals-primitives" -version = "0.1.0" -description = "Signals primitives" -license = "MIT" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/signals/primitives" -authors = ["Luke Parker "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -zeroize = { version = "^1.5", features = ["derive"], optional = true } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2", default-features = false, features = ["derive"] } - -borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } -serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true } - -serai-primitives = { path = "../../primitives", version = "0.1", default-features = false } - -[features] -std = [ - "zeroize", - - "scale/std", - "scale-info/std", - - "borsh?/std", - "serde?/std", - - "serai-primitives/std", -] - -borsh = ["dep:borsh"] -serde = ["dep:serde"] - -default = ["std"] diff --git a/substrate/signals/primitives/LICENSE b/substrate/signals/primitives/LICENSE deleted file mode 100644 index 68206b77..00000000 --- a/substrate/signals/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/signals/primitives/src/lib.rs b/substrate/signals/primitives/src/lib.rs deleted file mode 100644 index 8b137891..00000000 --- a/substrate/signals/primitives/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/substrate/signals/pallet/src/lib.rs b/substrate/signals/src/lib.rs similarity index 100% rename from substrate/signals/pallet/src/lib.rs rename to substrate/signals/src/lib.rs diff --git a/substrate/validator-sets/pallet/Cargo.toml b/substrate/validator-sets/Cargo.toml similarity index 88% rename from substrate/validator-sets/pallet/Cargo.toml rename to substrate/validator-sets/Cargo.toml index fd5753fc..787cf928 100644 --- a/substrate/validator-sets/pallet/Cargo.toml +++ b/substrate/validator-sets/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-validator-sets-pallet" version = "0.1.0" description = "Validator sets pallet" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/validator-sets/pallet" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/validator-sets" authors = ["Luke Parker "] edition = "2021" rust-version = "1.85" @@ -38,11 +38,10 @@ frame-support = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "s pallet-babe = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } pallet-grandpa = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -serai-primitives = { path = "../../primitives", default-features = false } -validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../primitives", default-features = false } +serai-primitives = { path = "../primitives", default-features = false } -coins-pallet = { package = "serai-coins-pallet", path = "../../coins/pallet", default-features = false } -dex-pallet = { package = "serai-dex-pallet", path = "../../dex/pallet", default-features = false } +coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } +dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } [dev-dependencies] pallet-timestamp = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } @@ -84,7 +83,6 @@ std = [ "pallet-timestamp/std", "serai-primitives/std", - "validator-sets-primitives/std", "coins-pallet/std", "dex-pallet/std", diff --git a/substrate/validator-sets/pallet/LICENSE b/substrate/validator-sets/LICENSE similarity index 100% rename from substrate/validator-sets/pallet/LICENSE rename to substrate/validator-sets/LICENSE diff --git a/substrate/validator-sets/primitives/Cargo.toml b/substrate/validator-sets/primitives/Cargo.toml deleted file mode 100644 index 68008b81..00000000 --- a/substrate/validator-sets/primitives/Cargo.toml +++ /dev/null @@ -1,40 +0,0 @@ -[package] -name = "serai-validator-sets-primitives" -version = "0.1.0" -description = "Primitives for validator sets" -license = "MIT" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/validator-sets/primitives" -authors = ["Luke Parker "] -edition = "2021" -rust-version = "1.85" - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[lints] -workspace = true - -[dependencies] -zeroize = { version = "^1.5", features = ["derive"], optional = true } - -dalek-ff-group = { path = "../../../crypto/dalek-ff-group", default-features = false, features = ["alloc"] } -ciphersuite = { path = "../../../crypto/ciphersuite", version = "0.4", default-features = false, features = ["alloc"] } -dkg-musig = { path = "../../../crypto/dkg/musig", default-features = false } - -borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } -serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2", default-features = false, features = ["derive"] } - -sp-core = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } -sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "serai-next", default-features = false } - -serai-primitives = { path = "../../primitives", default-features = false } - -[features] -std = ["zeroize", "ciphersuite/std", "dkg-musig/std", "borsh?/std", "serde?/std", "scale/std", "scale-info/std", "sp-core/std", "sp-std/std", "serai-primitives/std"] -borsh = ["dep:borsh", "serai-primitives/borsh"] -serde = ["dep:serde", "serai-primitives/serde"] -default = ["std"] diff --git a/substrate/validator-sets/primitives/LICENSE b/substrate/validator-sets/primitives/LICENSE deleted file mode 100644 index 32ff304a..00000000 --- a/substrate/validator-sets/primitives/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022-2025 Luke Parker - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/substrate/validator-sets/primitives/src/lib.rs b/substrate/validator-sets/primitives/src/lib.rs deleted file mode 100644 index 8b137891..00000000 --- a/substrate/validator-sets/primitives/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/substrate/validator-sets/pallet/src/lib.rs b/substrate/validator-sets/src/lib.rs similarity index 100% rename from substrate/validator-sets/pallet/src/lib.rs rename to substrate/validator-sets/src/lib.rs diff --git a/substrate/validator-sets/pallet/src/mock.rs b/substrate/validator-sets/src/mock.rs similarity index 100% rename from substrate/validator-sets/pallet/src/mock.rs rename to substrate/validator-sets/src/mock.rs diff --git a/substrate/validator-sets/pallet/src/tests.rs b/substrate/validator-sets/src/tests.rs similarity index 100% rename from substrate/validator-sets/pallet/src/tests.rs rename to substrate/validator-sets/src/tests.rs