diff --git a/Cargo.lock b/Cargo.lock index 9d55348435a4..f741d6bfc766 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19270,6 +19270,7 @@ dependencies = [ "sp-offchain 26.0.0", "sp-runtime 31.0.1", "sp-session 27.0.0", + "sp-statement-store 10.0.0", "sp-storage 19.0.0", "sp-transaction-pool 26.0.0", "sp-version 29.0.0", diff --git a/substrate/frame/Cargo.toml b/substrate/frame/Cargo.toml index 8fc0d8468430..ad0a9a2221a9 100644 --- a/substrate/frame/Cargo.toml +++ b/substrate/frame/Cargo.toml @@ -30,6 +30,8 @@ sp-arithmetic = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } +sp-statement-store = { workspace = true } + # frame deps, for developing FRAME pallets. frame-support = { workspace = true } diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 23d22683be2d..de2ec71b4fca 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -569,7 +569,8 @@ pub mod deps { pub use sp_core; pub use sp_io; pub use sp_runtime; - + pub use sp_statement_store; + pub use codec; pub use scale_info; diff --git a/substrate/frame/statement/src/lib.rs b/substrate/frame/statement/src/lib.rs index 6a7f577ab086..5434271cdeb9 100644 --- a/substrate/frame/statement/src/lib.rs +++ b/substrate/frame/statement/src/lib.rs @@ -33,16 +33,12 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::{ - pallet_prelude::*, - sp_runtime::{traits::CheckedDiv, SaturatedConversion}, - traits::fungible::Inspect, -}; -use frame_system::pallet_prelude::*; -use sp_statement_store::{ +use frame::prelude::*; +use frame::deps::{sp_io, sp_statement_store::{ runtime_api::{InvalidStatement, StatementSource, ValidStatement}, Proof, SignatureVerificationResult, Statement, -}; +}}; +use frame::traits::fungible::Inspect; #[cfg(test)] mod mock; @@ -53,7 +49,7 @@ pub use pallet::*; const LOG_TARGET: &str = "runtime::statement"; -#[frame_support::pallet] +#[frame::pallet] pub mod pallet { use super::*; diff --git a/substrate/frame/statement/src/mock.rs b/substrate/frame/statement/src/mock.rs index e552fca4ef3c..0d3b38036b1b 100644 --- a/substrate/frame/statement/src/mock.rs +++ b/substrate/frame/statement/src/mock.rs @@ -21,7 +21,7 @@ use super::*; use crate as pallet_statement; use frame::testing_prelude::*; -use frame::deps::{sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}, sp_core::Pair}; +use frame::deps::{sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}, sp_core::sr25519::Pair}; type Block = frame_system::mocking::MockBlock; diff --git a/substrate/frame/statement/src/tests.rs b/substrate/frame/statement/src/tests.rs index 3185b351f286..ba88044920e6 100644 --- a/substrate/frame/statement/src/tests.rs +++ b/substrate/frame/statement/src/tests.rs @@ -21,12 +21,12 @@ use super::*; use crate::mock::*; -use sp_statement_store::{ +use frame::deps::{sp_runtime::AccountId32, sp_core::sr25519::Pair, sp_statement_store::{ runtime_api::{InvalidStatement, StatementSource, ValidStatement}, Proof, Statement, -}; -use frame::{deps::{sp_runtime::AccountId32}, sp_core::Pair}; +}}; use frame::testing_prelude::*; + #[test] fn sign_and_validate_no_balance() { new_test_ext().execute_with(|| {