From 7abc8f19cd5e0b00d411d5ced5fad8d0cf0933de Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 8 Apr 2023 03:00:35 -0400 Subject: [PATCH] Move substrate/serai/* to substrate/* --- Cargo.toml | 4 ++-- processor/Cargo.toml | 2 +- processor/messages/Cargo.toml | 2 +- substrate/{serai => }/client/Cargo.toml | 8 ++++---- substrate/{serai => }/client/LICENSE | 0 substrate/{serai => }/client/metadata.json | 0 substrate/{serai => }/client/src/coins/bitcoin.rs | 0 substrate/{serai => }/client/src/coins/mod.rs | 0 substrate/{serai => }/client/src/coins/monero.rs | 0 substrate/{serai => }/client/src/lib.rs | 0 substrate/{serai => }/client/src/serai/in_instructions.rs | 0 substrate/{serai => }/client/src/serai/mod.rs | 2 +- substrate/{serai => }/client/src/serai/scale_value.rs | 0 substrate/{serai => }/client/src/serai/tokens.rs | 0 substrate/{serai => }/client/src/serai/validator_sets.rs | 0 substrate/{serai => }/client/src/tests/coins/bitcoin.rs | 0 substrate/{serai => }/client/src/tests/coins/mod.rs | 0 substrate/{serai => }/client/src/tests/coins/monero.rs | 0 substrate/{serai => }/client/src/tests/mod.rs | 0 substrate/{serai => }/client/tests/batch.rs | 0 substrate/{serai => }/client/tests/burn.rs | 0 .../{serai => }/client/tests/common/in_instructions.rs | 0 substrate/{serai => }/client/tests/common/mod.rs | 0 substrate/{serai => }/client/tests/common/tx.rs | 0 .../{serai => }/client/tests/common/validator_sets.rs | 0 substrate/{serai => }/client/tests/validator_sets.rs | 0 substrate/in-instructions/pallet/Cargo.toml | 2 +- substrate/in-instructions/primitives/Cargo.toml | 2 +- substrate/{serai => }/primitives/Cargo.toml | 2 +- substrate/{serai => }/primitives/LICENSE | 0 substrate/{serai => }/primitives/src/account.rs | 0 substrate/{serai => }/primitives/src/amount.rs | 0 substrate/{serai => }/primitives/src/balance.rs | 0 substrate/{serai => }/primitives/src/block.rs | 0 substrate/{serai => }/primitives/src/coins.rs | 0 substrate/{serai => }/primitives/src/lib.rs | 0 substrate/runtime/Cargo.toml | 2 +- substrate/tokens/pallet/Cargo.toml | 2 +- substrate/tokens/primitives/Cargo.toml | 2 +- substrate/validator-sets/pallet/Cargo.toml | 2 +- substrate/validator-sets/primitives/Cargo.toml | 2 +- 41 files changed, 17 insertions(+), 17 deletions(-) rename substrate/{serai => }/client/Cargo.toml (77%) rename substrate/{serai => }/client/LICENSE (100%) rename substrate/{serai => }/client/metadata.json (100%) rename substrate/{serai => }/client/src/coins/bitcoin.rs (100%) rename substrate/{serai => }/client/src/coins/mod.rs (100%) rename substrate/{serai => }/client/src/coins/monero.rs (100%) rename substrate/{serai => }/client/src/lib.rs (100%) rename substrate/{serai => }/client/src/serai/in_instructions.rs (100%) rename substrate/{serai => }/client/src/serai/mod.rs (99%) rename substrate/{serai => }/client/src/serai/scale_value.rs (100%) rename substrate/{serai => }/client/src/serai/tokens.rs (100%) rename substrate/{serai => }/client/src/serai/validator_sets.rs (100%) rename substrate/{serai => }/client/src/tests/coins/bitcoin.rs (100%) rename substrate/{serai => }/client/src/tests/coins/mod.rs (100%) rename substrate/{serai => }/client/src/tests/coins/monero.rs (100%) rename substrate/{serai => }/client/src/tests/mod.rs (100%) rename substrate/{serai => }/client/tests/batch.rs (100%) rename substrate/{serai => }/client/tests/burn.rs (100%) rename substrate/{serai => }/client/tests/common/in_instructions.rs (100%) rename substrate/{serai => }/client/tests/common/mod.rs (100%) rename substrate/{serai => }/client/tests/common/tx.rs (100%) rename substrate/{serai => }/client/tests/common/validator_sets.rs (100%) rename substrate/{serai => }/client/tests/validator_sets.rs (100%) rename substrate/{serai => }/primitives/Cargo.toml (97%) rename substrate/{serai => }/primitives/LICENSE (100%) rename substrate/{serai => }/primitives/src/account.rs (100%) rename substrate/{serai => }/primitives/src/amount.rs (100%) rename substrate/{serai => }/primitives/src/balance.rs (100%) rename substrate/{serai => }/primitives/src/block.rs (100%) rename substrate/{serai => }/primitives/src/coins.rs (100%) rename substrate/{serai => }/primitives/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 8b21bb09..d9ca88a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,8 +25,8 @@ members = [ "tendermint", - "substrate/serai/primitives", - "substrate/serai/client", + "substrate/primitives", + "substrate/client", "substrate/tokens/primitives", "substrate/tokens/pallet", diff --git a/processor/Cargo.toml b/processor/Cargo.toml index 9bad24b8..66fbdf90 100644 --- a/processor/Cargo.toml +++ b/processor/Cargo.toml @@ -50,7 +50,7 @@ monero-serai = { path = "../coins/monero", features = ["multisig"], optional = t log = "0.4" tokio = { version = "1", features = ["full"] } -serai-client = { path = "../substrate/serai/client", default-features = false } +serai-client = { path = "../substrate//client", default-features = false } messages = { package = "processor-messages", path = "./messages" } diff --git a/processor/messages/Cargo.toml b/processor/messages/Cargo.toml index 524384b4..90ac81e0 100644 --- a/processor/messages/Cargo.toml +++ b/processor/messages/Cargo.toml @@ -24,7 +24,7 @@ serde = { version = "1", features = ["derive"] } dkg = { path = "../../crypto/dkg", features = ["serde"] } -serai-primitives = { path = "../../substrate/serai/primitives" } +serai-primitives = { path = "../../substrate/primitives" } in-instructions-primitives = { path = "../../substrate/in-instructions/primitives" } tokens-primitives = { path = "../../substrate/tokens/primitives" } validator-sets-primitives = { path = "../../substrate/validator-sets/primitives" } diff --git a/substrate/serai/client/Cargo.toml b/substrate/client/Cargo.toml similarity index 77% rename from substrate/serai/client/Cargo.toml rename to substrate/client/Cargo.toml index d6e53e3d..4b2a3e4c 100644 --- a/substrate/serai/client/Cargo.toml +++ b/substrate/client/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-client" version = "0.1.0" description = "Client library for the Serai network" license = "AGPL-3.0-only" -repository = "https://github.com/serai-dex/serai/tree/develop/client" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/client" authors = ["Luke Parker "] keywords = ["serai"] edition = "2021" @@ -18,15 +18,15 @@ thiserror = { version = "1", optional = true } scale = { package = "parity-scale-codec", version = "3" } scale-info = { version = "2", optional = true } -serai-runtime = { path = "../../runtime", version = "0.1" } +serai-runtime = { path = "../runtime", version = "0.1" } sp-core = { git = "https://github.com/serai-dex/substrate" } subxt = { version = "0.27", default-features = false, features = ["jsonrpsee-ws"], optional = true } bitcoin = { version = "0.29", optional = true } -ciphersuite = { path = "../../../crypto/ciphersuite", version = "0.3", optional = true } -monero-serai = { path = "../../../coins/monero", version = "0.1.4-alpha", optional = true } +ciphersuite = { path = "../../crypto/ciphersuite", version = "0.3", optional = true } +monero-serai = { path = "../../coins/monero", version = "0.1.4-alpha", optional = true } [features] serai = ["thiserror", "scale-info", "subxt"] diff --git a/substrate/serai/client/LICENSE b/substrate/client/LICENSE similarity index 100% rename from substrate/serai/client/LICENSE rename to substrate/client/LICENSE diff --git a/substrate/serai/client/metadata.json b/substrate/client/metadata.json similarity index 100% rename from substrate/serai/client/metadata.json rename to substrate/client/metadata.json diff --git a/substrate/serai/client/src/coins/bitcoin.rs b/substrate/client/src/coins/bitcoin.rs similarity index 100% rename from substrate/serai/client/src/coins/bitcoin.rs rename to substrate/client/src/coins/bitcoin.rs diff --git a/substrate/serai/client/src/coins/mod.rs b/substrate/client/src/coins/mod.rs similarity index 100% rename from substrate/serai/client/src/coins/mod.rs rename to substrate/client/src/coins/mod.rs diff --git a/substrate/serai/client/src/coins/monero.rs b/substrate/client/src/coins/monero.rs similarity index 100% rename from substrate/serai/client/src/coins/monero.rs rename to substrate/client/src/coins/monero.rs diff --git a/substrate/serai/client/src/lib.rs b/substrate/client/src/lib.rs similarity index 100% rename from substrate/serai/client/src/lib.rs rename to substrate/client/src/lib.rs diff --git a/substrate/serai/client/src/serai/in_instructions.rs b/substrate/client/src/serai/in_instructions.rs similarity index 100% rename from substrate/serai/client/src/serai/in_instructions.rs rename to substrate/client/src/serai/in_instructions.rs diff --git a/substrate/serai/client/src/serai/mod.rs b/substrate/client/src/serai/mod.rs similarity index 99% rename from substrate/serai/client/src/serai/mod.rs rename to substrate/client/src/serai/mod.rs index aa31c653..8962a2b6 100644 --- a/substrate/serai/client/src/serai/mod.rs +++ b/substrate/client/src/serai/mod.rs @@ -156,7 +156,7 @@ impl Serai { .await .map_err(SeraiError::RpcError)? else { // This is an error since there is a block at this index - return Err(SeraiError::InvalidNode); + Err(SeraiError::InvalidNode)? }; Ok(Some(header.hash() == hash)) diff --git a/substrate/serai/client/src/serai/scale_value.rs b/substrate/client/src/serai/scale_value.rs similarity index 100% rename from substrate/serai/client/src/serai/scale_value.rs rename to substrate/client/src/serai/scale_value.rs diff --git a/substrate/serai/client/src/serai/tokens.rs b/substrate/client/src/serai/tokens.rs similarity index 100% rename from substrate/serai/client/src/serai/tokens.rs rename to substrate/client/src/serai/tokens.rs diff --git a/substrate/serai/client/src/serai/validator_sets.rs b/substrate/client/src/serai/validator_sets.rs similarity index 100% rename from substrate/serai/client/src/serai/validator_sets.rs rename to substrate/client/src/serai/validator_sets.rs diff --git a/substrate/serai/client/src/tests/coins/bitcoin.rs b/substrate/client/src/tests/coins/bitcoin.rs similarity index 100% rename from substrate/serai/client/src/tests/coins/bitcoin.rs rename to substrate/client/src/tests/coins/bitcoin.rs diff --git a/substrate/serai/client/src/tests/coins/mod.rs b/substrate/client/src/tests/coins/mod.rs similarity index 100% rename from substrate/serai/client/src/tests/coins/mod.rs rename to substrate/client/src/tests/coins/mod.rs diff --git a/substrate/serai/client/src/tests/coins/monero.rs b/substrate/client/src/tests/coins/monero.rs similarity index 100% rename from substrate/serai/client/src/tests/coins/monero.rs rename to substrate/client/src/tests/coins/monero.rs diff --git a/substrate/serai/client/src/tests/mod.rs b/substrate/client/src/tests/mod.rs similarity index 100% rename from substrate/serai/client/src/tests/mod.rs rename to substrate/client/src/tests/mod.rs diff --git a/substrate/serai/client/tests/batch.rs b/substrate/client/tests/batch.rs similarity index 100% rename from substrate/serai/client/tests/batch.rs rename to substrate/client/tests/batch.rs diff --git a/substrate/serai/client/tests/burn.rs b/substrate/client/tests/burn.rs similarity index 100% rename from substrate/serai/client/tests/burn.rs rename to substrate/client/tests/burn.rs diff --git a/substrate/serai/client/tests/common/in_instructions.rs b/substrate/client/tests/common/in_instructions.rs similarity index 100% rename from substrate/serai/client/tests/common/in_instructions.rs rename to substrate/client/tests/common/in_instructions.rs diff --git a/substrate/serai/client/tests/common/mod.rs b/substrate/client/tests/common/mod.rs similarity index 100% rename from substrate/serai/client/tests/common/mod.rs rename to substrate/client/tests/common/mod.rs diff --git a/substrate/serai/client/tests/common/tx.rs b/substrate/client/tests/common/tx.rs similarity index 100% rename from substrate/serai/client/tests/common/tx.rs rename to substrate/client/tests/common/tx.rs diff --git a/substrate/serai/client/tests/common/validator_sets.rs b/substrate/client/tests/common/validator_sets.rs similarity index 100% rename from substrate/serai/client/tests/common/validator_sets.rs rename to substrate/client/tests/common/validator_sets.rs diff --git a/substrate/serai/client/tests/validator_sets.rs b/substrate/client/tests/validator_sets.rs similarity index 100% rename from substrate/serai/client/tests/validator_sets.rs rename to substrate/client/tests/validator_sets.rs diff --git a/substrate/in-instructions/pallet/Cargo.toml b/substrate/in-instructions/pallet/Cargo.toml index 1b7d3c4a..3913b90b 100644 --- a/substrate/in-instructions/pallet/Cargo.toml +++ b/substrate/in-instructions/pallet/Cargo.toml @@ -23,7 +23,7 @@ sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false } frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } in-instructions-primitives = { path = "../primitives", default-features = false } tokens-pallet = { path = "../../tokens/pallet", default-features = false } diff --git a/substrate/in-instructions/primitives/Cargo.toml b/substrate/in-instructions/primitives/Cargo.toml index 479b3b84..680dfadd 100644 --- a/substrate/in-instructions/primitives/Cargo.toml +++ b/substrate/in-instructions/primitives/Cargo.toml @@ -22,7 +22,7 @@ sp-application-crypto = { git = "https://github.com/serai-dex/substrate", defaul sp-std = { git = "https://github.com/serai-dex/substrate", default-features = false } sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } tokens-primitives = { path = "../../tokens/primitives", default-features = false } [features] diff --git a/substrate/serai/primitives/Cargo.toml b/substrate/primitives/Cargo.toml similarity index 97% rename from substrate/serai/primitives/Cargo.toml rename to substrate/primitives/Cargo.toml index f7f6131e..c27bdc31 100644 --- a/substrate/serai/primitives/Cargo.toml +++ b/substrate/primitives/Cargo.toml @@ -3,7 +3,7 @@ name = "serai-primitives" version = "0.1.0" description = "Primitives for the Serai blockchain" license = "MIT" -repository = "https://github.com/serai-dex/serai/tree/develop/substrate/serai/primitives" +repository = "https://github.com/serai-dex/serai/tree/develop/substrate/primitives" authors = ["Luke Parker "] edition = "2021" diff --git a/substrate/serai/primitives/LICENSE b/substrate/primitives/LICENSE similarity index 100% rename from substrate/serai/primitives/LICENSE rename to substrate/primitives/LICENSE diff --git a/substrate/serai/primitives/src/account.rs b/substrate/primitives/src/account.rs similarity index 100% rename from substrate/serai/primitives/src/account.rs rename to substrate/primitives/src/account.rs diff --git a/substrate/serai/primitives/src/amount.rs b/substrate/primitives/src/amount.rs similarity index 100% rename from substrate/serai/primitives/src/amount.rs rename to substrate/primitives/src/amount.rs diff --git a/substrate/serai/primitives/src/balance.rs b/substrate/primitives/src/balance.rs similarity index 100% rename from substrate/serai/primitives/src/balance.rs rename to substrate/primitives/src/balance.rs diff --git a/substrate/serai/primitives/src/block.rs b/substrate/primitives/src/block.rs similarity index 100% rename from substrate/serai/primitives/src/block.rs rename to substrate/primitives/src/block.rs diff --git a/substrate/serai/primitives/src/coins.rs b/substrate/primitives/src/coins.rs similarity index 100% rename from substrate/serai/primitives/src/coins.rs rename to substrate/primitives/src/coins.rs diff --git a/substrate/serai/primitives/src/lib.rs b/substrate/primitives/src/lib.rs similarity index 100% rename from substrate/serai/primitives/src/lib.rs rename to substrate/primitives/src/lib.rs diff --git a/substrate/runtime/Cargo.toml b/substrate/runtime/Cargo.toml index b623223e..1c21d84d 100644 --- a/substrate/runtime/Cargo.toml +++ b/substrate/runtime/Cargo.toml @@ -39,7 +39,7 @@ frame-support = { git = "https://github.com/serai-dex/substrate", default-featur frame-executive = { git = "https://github.com/serai-dex/substrate", default-features = false } frame-benchmarking = { git = "https://github.com/serai-dex/substrate", default-features = false, optional = true } -serai-primitives = { path = "../serai/primitives", default-features = false } +serai-primitives = { path = "..//primitives", default-features = false } pallet-timestamp = { git = "https://github.com/serai-dex/substrate", default-features = false } diff --git a/substrate/tokens/pallet/Cargo.toml b/substrate/tokens/pallet/Cargo.toml index 4f7bb8b7..3f3b1842 100644 --- a/substrate/tokens/pallet/Cargo.toml +++ b/substrate/tokens/pallet/Cargo.toml @@ -20,7 +20,7 @@ frame-support = { git = "https://github.com/serai-dex/substrate", default-featur pallet-assets = { git = "https://github.com/serai-dex/substrate", default-features = false } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } tokens-primitives = { path = "../primitives", default-features = false } [features] diff --git a/substrate/tokens/primitives/Cargo.toml b/substrate/tokens/primitives/Cargo.toml index 25daffaf..c33e276a 100644 --- a/substrate/tokens/primitives/Cargo.toml +++ b/substrate/tokens/primitives/Cargo.toml @@ -18,7 +18,7 @@ scale-info = { version = "2", default-features = false, features = ["derive"] } serde = { version = "1", features = ["derive"], optional = true } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } [dev-dependencies] sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false } diff --git a/substrate/validator-sets/pallet/Cargo.toml b/substrate/validator-sets/pallet/Cargo.toml index d9118ae3..8b29cdfc 100644 --- a/substrate/validator-sets/pallet/Cargo.toml +++ b/substrate/validator-sets/pallet/Cargo.toml @@ -20,7 +20,7 @@ sp-core = { git = "https://github.com/serai-dex/substrate", default-features = f frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false } frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } validator-sets-primitives = { path = "../primitives", default-features = false } [features] diff --git a/substrate/validator-sets/primitives/Cargo.toml b/substrate/validator-sets/primitives/Cargo.toml index f880e3fd..30510ee1 100644 --- a/substrate/validator-sets/primitives/Cargo.toml +++ b/substrate/validator-sets/primitives/Cargo.toml @@ -21,7 +21,7 @@ serde = { version = "1", features = ["derive"], optional = true } sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false } -serai-primitives = { path = "../../serai/primitives", default-features = false } +serai-primitives = { path = "../..//primitives", default-features = false } [features] std = ["zeroize", "scale/std", "scale-info/std", "serde", "sp-core/std", "serai-primitives/std"]