Skip to content

Commit

Permalink
core_mods -> dock-core
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Sep 1, 2023
1 parent a8494ed commit 37e6270
Show file tree
Hide file tree
Showing 87 changed files with 118 additions and 118 deletions.
90 changes: 45 additions & 45 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ members = [
"pallets/poa",
"pallets/poa/rpc",
"pallets/token_migration",
"pallets/core_mods",
"pallets/core_mods/rpc",
"pallets/core",
"pallets/core/rpc",
"pallets/staking_rewards",
"pallets/staking_rewards/rpc",
"runtime",
Expand Down
8 changes: 4 additions & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Dock.io"]
build = "build.rs"
edition = "2021"
name = "dock-node"
version = "0.23.0"
version = "0.23.1"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -28,7 +28,7 @@ optional = true

[dependencies.dock-runtime]
path = "../runtime"
version = "0.23.0"
version = "0.23.1"

[dependencies.beefy-primitives]
git = "https://github.com/paritytech/substrate.git"
Expand Down Expand Up @@ -531,8 +531,8 @@ git = "https://github.com/docknetwork/dock-substrate-common.git"
[dependencies.staking_rewards_rpc]
path = "../pallets/staking_rewards/rpc"

[dependencies.core_mods_rpc]
path = "../pallets/core_mods/rpc"
[dependencies.core_rpc]
path = "../pallets/core/rpc"

[dependencies.pallet-staking]
git = "https://github.com/docknetwork/dock-substrate-common.git"
Expand Down
6 changes: 3 additions & 3 deletions node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ where
C::Api: pallet_mmr_rpc::MmrRuntimeApi<Block, <Block as sp_runtime::traits::Block>::Hash>,
C::Api: price_feed_rpc::PriceFeedRuntimeApi<Block, BlockNumber>,
C::Api: staking_rewards_rpc::StakingRewardsRuntimeApi<Block, Balance>,
C::Api: core_mods_rpc::CoreModsRuntimeApi<Block, dock_runtime::Runtime>,
C::Api: core_rpc::CoreModsRuntimeApi<Block, dock_runtime::Runtime>,
C::Api: BlockBuilder<Block>,
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
P: TransactionPool<Block = Block> + 'static,
SC: SelectChain<Block> + 'static,
A: ChainApi<Block = Block> + 'static,
{
use core_mods_rpc::{CoreMods, CoreModsApiServer};
use core_rpc::{CoreMods, CoreModsApiServer};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use poa_rpc::{PoA, PoAApiServer};
use price_feed_rpc::{PriceFeed, PriceFeedApiServer};
Expand Down Expand Up @@ -212,7 +212,7 @@ where
// RPC calls for core mods pallet
io.merge(<CoreMods<_, _> as CoreModsApiServer<
_,
core_mods_rpc::SerializableConfigWrapper<dock_runtime::Runtime>,
core_rpc::SerializableConfigWrapper<dock_runtime::Runtime>,
>>::into_rpc(CoreMods::new(client.clone())))?;

io.merge(
Expand Down
3 changes: 1 addition & 2 deletions pallets/core_mods/Cargo.toml → pallets/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "core_mods"
name = "dock-core"
version = "0.5.0"
authors = ["Dock.io"]
edition = "2021"
Expand All @@ -13,7 +13,6 @@ version = "1.3.2"

[dependencies.arith-utils]
git = "https://github.com/docknetwork/dock-substrate-common.git"

default-features = false

[dependencies.scale-info]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "core_mods_rpc"
name = "core_rpc"
version = "0.1.0"
edition = "2021"

Expand All @@ -15,4 +15,4 @@ sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkad
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29"}
sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" }
sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" }
core_mods = { version = "0.5.0", path = ".." }
dock-core = { version = "0.5.0", path = ".." }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::{fmt::Debug, marker::PhantomData};
use core_mods::{accumulator, offchain_signatures, util::IncId};
pub use core_mods::{
use dock_core::{accumulator, offchain_signatures, util::IncId};
pub use dock_core::{
did::{self, Config},
runtime_api::CoreModsApi as CoreModsRuntimeApi,
};
Expand All @@ -14,6 +14,8 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
use std::{collections::BTreeMap, sync::Arc};

extern crate core as rust_core;

pub trait ConfigWrapper {
type T: Config;
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ pub mod policy;
pub mod signatures;
pub mod state_change;
pub mod storage_version;
pub mod types;

pub use keys::*;
pub use policy::*;
pub use signatures::*;
pub use state_change::*;
pub use storage_version::*;
pub use types::*;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core::{borrow::Borrow, fmt::Debug};
use sp_std::{borrow::Borrow, fmt::Debug};

use super::{SigValue, ToStateChange, ED25519_WEIGHT, SECP256K1_WEIGHT, SR25519_WEIGHT};
use crate::{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions pallets/core_mods/src/lib.rs → pallets/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
#![allow(clippy::unused_unit)]

extern crate alloc;
extern crate core;
extern crate core as rust_core;

pub mod common;
mod modules;
pub mod modules;
pub mod runtime_api;
pub mod types;
pub mod util;

pub use modules::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use crate::{
common::{SigValue, StorageVersion},
common::{SigValue, StorageVersion, CurveType},
did,
did::{Did, DidSignature},
types::CurveType,
util::{Bytes, IncId},
};
pub use actions::*;
use arith_utils::DivCeil;
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;
use frame_support::{
decl_error, decl_event, decl_module, decl_storage,
dispatch::{DispatchResult, Weight},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// --repeat=20
// --steps=50
// --template=node/module-weight-template.hbs
// --output=./pallets/core_mods/src/modules/accumulator/weights.rs
// --output=./pallets/core/src/modules/accumulator/weights.rs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use system::RawOrigin;
const MAX_LEN: u32 = 10_000;

benchmarks! {
where_clause { where T: core::fmt::Debug }
where_clause { where T: sp_std::fmt::Debug }

deploy {
let l in 0 .. MAX_LEN => ();
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// --repeat=20
// --steps=50
// --template=node/module-weight-template.hbs
// --output=./pallets/core_mods/src/modules/anchor/weights.rs
// --output=./pallets/core/src/modules/anchor/weights.rs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
did::{self, Did, DidSignature},
};
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;
use frame_support::{
decl_error, decl_module, decl_storage, dispatch::DispatchResult, ensure, traits::Get,
weights::Weight,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// --repeat=20
// --steps=50
// --template=node/module-weight-template.hbs
// --output=./pallets/core_mods/src/modules/attest/weights.rs
// --output=./pallets/core/src/modules/attest/weights.rs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
util::Bytes,
};
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;

use frame_support::{
decl_error, decl_module, decl_storage, dispatch::DispatchResult, ensure, traits::Get,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// --repeat=20
// --steps=50
// --template=node/module-weight-template.hbs
// --output=./pallets/core_mods/src/modules/blob/weights.rs
// --output=./pallets/core/src/modules/blob/weights.rs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::impl_wrapper;
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;
use sp_std::ops::{Index, RangeFull};

use super::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use crate::common::state_change::ToStateChange;
use alloc::collections::BTreeSet;
use core::iter::once;
use sp_std::iter::once;
use frame_benchmarking::{benchmarks, whitelisted_caller};
use sp_application_crypto::Pair;
use sp_core::{ed25519, U256};
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{

use arith_utils::DivCeil;
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;
use frame_support::{
decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, fail,
traits::Get, weights::Weight,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use crate::{deposit_indexed_event, impl_bits_conversion, impl_wrapper_type_info, util::Bytes};
use codec::{Decode, Encode};
use core::fmt::Debug;
use sp_std::fmt::Debug;

/// DID service endpoint.
#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// --repeat=20
// --steps=50
// --template=node/module-weight-template.hbs
// --output=./pallets/core_mods/src/modules/did/weights.rs
// --output=./pallets/core/src/modules/did/weights.rs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 37e6270

Please sign in to comment.