mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Merge branch 'develop' into next
This commit is contained in:
@@ -13,20 +13,19 @@ all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.cargo-machete]
|
||||
ignored = ["scale", "scale-info"]
|
||||
ignored = ["scale"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-io = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "da19e1f8ca7a9e2cbf39fbfa493918eeeb45e10b", default-features = false }
|
||||
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "da19e1f8ca7a9e2cbf39fbfa493918eeeb45e10b", default-features = false }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "da19e1f8ca7a9e2cbf39fbfa493918eeeb45e10b", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "da19e1f8ca7a9e2cbf39fbfa493918eeeb45e10b", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
serai-signals-primitives = { path = "../primitives", default-features = false }
|
||||
@@ -37,7 +36,6 @@ in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../
|
||||
[features]
|
||||
std = [
|
||||
"scale/std",
|
||||
"scale-info/std",
|
||||
|
||||
"sp-core/std",
|
||||
"sp-io/std",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
)] // TODO
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
use sp_core::sr25519::Public;
|
||||
use sp_io::hashing::blake2_256;
|
||||
|
||||
@@ -25,17 +23,13 @@ pub mod pallet {
|
||||
use in_instructions_pallet::{Config as IiConfig, Pallet as InInstructions};
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config:
|
||||
frame_system::Config<AccountId = Public> + VsConfig + IiConfig + TypeInfo
|
||||
{
|
||||
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
|
||||
|
||||
pub trait Config: frame_system::Config<AccountId = Public> + VsConfig + IiConfig {
|
||||
type RetirementValidityDuration: Get<u32>;
|
||||
type RetirementLockInDuration: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::genesis_config]
|
||||
#[derive(Debug, Encode, Decode)]
|
||||
#[derive(Debug)]
|
||||
pub struct GenesisConfig<T: Config> {
|
||||
_config: PhantomData<T>,
|
||||
}
|
||||
@@ -56,7 +50,7 @@ pub mod pallet {
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(PhantomData<T>);
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, DecodeWithMemTracking, MaxEncodedLen)]
|
||||
pub struct RegisteredRetirementSignal<T: Config> {
|
||||
in_favor_of: [u8; 32],
|
||||
registrant: T::AccountId,
|
||||
|
||||
@@ -19,7 +19,6 @@ workspace = true
|
||||
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 }
|
||||
@@ -31,7 +30,6 @@ std = [
|
||||
"zeroize",
|
||||
|
||||
"scale/std",
|
||||
"scale-info/std",
|
||||
|
||||
"borsh?/std",
|
||||
"serde?/std",
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![expect(clippy::cast_possible_truncation)]
|
||||
|
||||
use scale::{Encode, Decode, MaxEncodedLen};
|
||||
use scale_info::TypeInfo;
|
||||
use scale::{Encode, Decode, DecodeWithMemTracking, MaxEncodedLen};
|
||||
|
||||
use serai_primitives::ExternalNetworkId;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
|
||||
#[derive(
|
||||
Clone, Copy, PartialEq, Eq, Debug, Encode, Decode, DecodeWithMemTracking, MaxEncodedLen,
|
||||
)]
|
||||
#[cfg_attr(feature = "std", derive(zeroize::Zeroize))]
|
||||
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
|
||||
Reference in New Issue
Block a user