Skip to content

Commit

Permalink
migrate pallet-statement to use umbrella crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathy-bajo committed Jan 10, 2025
1 parent 0122761 commit cdfa961
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions substrate/frame/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion substrate/frame/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
14 changes: 5 additions & 9 deletions substrate/frame/statement/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -53,7 +49,7 @@ pub use pallet::*;

const LOG_TARGET: &str = "runtime::statement";

#[frame_support::pallet]
#[frame::pallet]
pub mod pallet {
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/statement/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Test>;

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/statement/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(|| {
Expand Down

0 comments on commit cdfa961

Please sign in to comment.