Skip to content

Commit

Permalink
fixed compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmishra2005 committed Jan 3, 2025
1 parent 5407fdf commit ef3ce05
Show file tree
Hide file tree
Showing 19 changed files with 1,528 additions and 2,365 deletions.
3,309 changes: 1,163 additions & 2,146 deletions Cargo.lock

Large diffs are not rendered by default.

252 changes: 128 additions & 124 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ futures = { workspace = true }
frame-benchmarking = { workspace = true, default-features = true }
frame-system = { workspace = true, default-features = true }
frame-system-rpc-runtime-api = { workspace = true, default-features = true }
node-primitives = { workspace = true, default-features = true }
ddc-primitives = { workspace = true, default-features = true }
pallet-transaction-payment = { workspace = true, default-features = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
Expand Down
4 changes: 2 additions & 2 deletions node/client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::sync::Arc;

use node_primitives::Nonce;
pub use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Signature};
use ddc_primitives::Nonce;
pub use ddc_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Signature};
use sc_client_api::{
AuxStore, Backend as BackendT, BlockchainEvents, KeysIter, MerkleValue, PairsIter,
UsageProvider,
Expand Down
2 changes: 1 addition & 1 deletion node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository.workspace = true
jsonrpsee = { workspace = true, default-features = true }

# Substrate dependencies
node-primitives = { workspace = true, default-features = true }
ddc-primitives = { workspace = true, default-features = true }
pallet-transaction-payment-rpc = { workspace = true, default-features = true }
sc-chain-spec = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use std::sync::Arc;

use jsonrpsee::RpcModule;
use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce};
use ddc_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce};
use sc_client_api::AuxStore;
use sc_consensus_grandpa::{
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
Expand Down
2 changes: 1 addition & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rand = { workspace = true, default-features = true }
serde = { workspace = true, default-features = true }

# Substrate dependencies
node-primitives = { workspace = true }
ddc-primitives = { workspace = true }
pallet-im-online = { workspace = true }
sc-authority-discovery = { workspace = true }
sc-basic-authorship = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use cere_dev_runtime as cere_dev;
#[cfg(feature = "cere-dev-native")]
use cere_runtime_common::constants::currency::DOLLARS as TEST_UNITS;
use jsonrpsee::core::__reexports::serde_json;
pub use node_primitives::{AccountId, Balance, Block, Signature};
pub use ddc_primitives::{AccountId, Balance, Block, Signature};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sc_chain_spec::ChainSpecExtension;
use sc_service::ChainType;
Expand Down
2 changes: 1 addition & 1 deletion node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub use cere_client::{
RuntimeApiCollection,
};
pub use chain_spec::{CereChainSpec, CereDevChainSpec};
pub use node_primitives::{Block, BlockNumber};
pub use ddc_primitives::{Block, BlockNumber};
#[allow(deprecated)]
use sc_executor::{
HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY,
Expand Down
44 changes: 44 additions & 0 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,50 @@ use sp_runtime::{AccountId32, Perquintill, RuntimeDebug};

pub mod traits;

use sp_runtime::{
generic,
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiSignature, OpaqueExtrinsic,
};

/// An index to a block.
pub type BlockNumber = u32;

/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = MultiSignature;

/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;

/// The type for looking up accounts. We don't expect more than 4 billion of them.
pub type AccountIndex = u32;

/// Balance of an account.
pub type Balance = u128;

/// Type used for expressing timestamp.
pub type Moment = u64;

/// Index of a transaction in the chain.
pub type Nonce = u32;

/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;

/// A timestamp: milliseconds since the unix epoch.
/// `u64` is enough to represent a duration of half a billion years, when the
/// time scale is milliseconds.
pub type Timestamp = u64;

/// Digest item type.
pub type DigestItem = generic::DigestItem;
/// Header type.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// Block type.
pub type Block = generic::Block<Header, OpaqueExtrinsic>;
/// Block ID.
pub type BlockId = generic::BlockId<Block>;
pub const MILLICENTS: u128 = 100_000;
pub const CENTS: u128 = 1_000 * MILLICENTS; // assume this is worth about a cent.
pub const DOLLARS: u128 = 100 * CENTS;
Expand Down
18 changes: 10 additions & 8 deletions runtime/cere-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ frame-system = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
frame-system-rpc-runtime-api = { workspace = true }
frame-try-runtime = { workspace = true, optional = true }
node-primitives = { workspace = true }
#node-primitives = { workspace = true }
pallet-authority-discovery = { workspace = true }
pallet-authorship = { workspace = true }
pallet-babe = { workspace = true }
Expand Down Expand Up @@ -93,12 +93,13 @@ sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }

# Hyperbridge Dependencies
pallet-ismp = { workspace = true }
ismp = { workspace = true }
pallet-ismp = { workspace = true, features = [ "unsigned" ]}
pallet-ismp-runtime-api = { workspace = true }
ismp-grandpa = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
pallet-hyperbridge = { workspace = true }
pallet-token-gateway = { workspace = true }

sp-mmr-primitives = { workspace = true }
# cere dependencies
cere-runtime-common = { workspace = true }
ddc-primitives = { workspace = true }
Expand All @@ -112,14 +113,15 @@ pallet-ddc-staking = { workspace = true }
pallet-erc20 = { workspace = true }
pallet-erc721 = { workspace = true }
pallet-origins = { workspace = true }

anyhow = { workspace = true }
[build-dependencies]
substrate-wasm-builder = { workspace = true, default-features = true }

[features]
default = ["std"]
with-tracing = ["frame-executive/with-tracing"]
std = [
"pallet-hyperbridge/std",
"codec/std",
"scale-info/std",
"log/std",
Expand All @@ -129,7 +131,6 @@ std = [
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime/std",
"node-primitives/std",
"pallet-collective/std",
"pallet-contracts/std",
"pallet-democracy/std",
Expand Down Expand Up @@ -200,11 +201,12 @@ std = [
"pallet-ddc-clusters-gov/std",
"sp-arithmetic/std",
"pallet-origins/std",
"ismp/std",
"pallet-ismp/std",
"pallet-ismp-runtime-api/std",
"ismp-grandpa/std",
"pallet-hyperbridge/std",
"pallet-token-gateway/std",
"anyhow/std",
"frame-metadata-hash-extension/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
Expand Down
Loading

0 comments on commit ef3ce05

Please sign in to comment.