Skip to content

Commit

Permalink
polkadot-v0.9.42 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored May 30, 2023
1 parent a2859c8 commit 443a461
Show file tree
Hide file tree
Showing 14 changed files with 724 additions and 644 deletions.
1,268 changes: 668 additions & 600 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ members = [
"parachain",
"ismp-assets"
]

[workspace.dependencies]
enum-as-inner = "=0.5.1"
6 changes: 3 additions & 3 deletions ismp-assets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive"
ismp = { git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main", default-features = false }

# substrate
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

# local
pallet-ismp = { path = "../pallet-ismp", default-features = false }
Expand Down
9 changes: 7 additions & 2 deletions ismp-assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub mod pallet {
pallet_prelude::*,
traits::{
fungible::{Inspect, Mutate},
tokens::Balance,
tokens::{Balance, Fortitude, Precision},
},
};
use frame_system::pallet_prelude::*;
Expand Down Expand Up @@ -125,7 +125,12 @@ pub mod pallet {
dispatcher
.dispatch_request(DispatchRequest::Post(post))
.map_err(|_| Error::<T>::TransferFailed)?;
<T::NativeCurrency as Mutate<T::AccountId>>::burn_from(&origin, params.amount.into())?;
<T::NativeCurrency as Mutate<T::AccountId>>::burn_from(
&origin,
params.amount.into(),
Precision::Exact,
Fortitude::Force,
)?;
Self::deposit_event(Event::<T>::BalanceTransferred {
from: payload.from,
to: payload.to,
Expand Down
21 changes: 11 additions & 10 deletions pallet-ismp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ authors = ["Polytope Labs <[email protected]>"]

[dependencies]
# substrate
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false, optional = true }

# polytope labs
ismp-rs = { package = "ismp", git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main", default-features = false }
Expand All @@ -26,13 +26,14 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive"
mmr-lib = { package = "ckb-merkle-mountain-range", version = "0.5.2", default-features = false }
serde = { version = "1.0.136", features = ["derive"], optional = true }
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display"] }
enum-as-inner = "=0.5.1"

# local
ismp-primitives = { path = "./primitives", default-features = false }

[dev-dependencies]
env_logger = "0.10.0"
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
ismp-testsuite = { git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main" }

[features]
Expand Down
6 changes: 4 additions & 2 deletions pallet-ismp/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = ["Polytope Labs <[email protected]>"]

[dependencies]
# substrate
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }

# polytope labs
ismp = { git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main", default-features = false }
Expand All @@ -17,6 +17,7 @@ merkle-mountain-range = { package = "ckb-merkle-mountain-range", version = "0.5.
codec = { package = "parity-scale-codec", version = "3.1.3", default-features = false }
primitive-types = { version = "0.12.1", default-features = false }
serde = { version = "1.0.136", features = ["derive"], optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }

[features]
default = ["std"]
Expand All @@ -27,5 +28,6 @@ std = [
"codec/std",
"sp-runtime/std",
"primitive-types/std",
"scale-info/std",
"serde"
]
2 changes: 1 addition & 1 deletion pallet-ismp/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use ismp::host::StateMachine;
pub mod mmr;

/// Queries a request leaf in the mmr
#[derive(codec::Encode, codec::Decode)]
#[derive(codec::Encode, codec::Decode, scale_info::TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))]
pub struct LeafIndexQuery {
/// The source of the request
Expand Down
12 changes: 6 additions & 6 deletions pallet-ismp/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pallet-ismp = { path = ".." }
ismp-runtime-api = { path = "../runtime-api" }
ismp-primitives = { path = "../primitives" }

frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
4 changes: 2 additions & 2 deletions pallet-ismp/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ authors = ["Polytope Labs <[email protected]>"]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-ismp = { path = "..", default-features = false }
ismp-primitives = { path = "../primitives", default-features = false }
ismp-rs = { package = "ismp", git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion pallet-ismp/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use ismp_rs::{
};

/// Ismp Core Protocol Events
#[derive(Clone, codec::Encode, codec::Decode, Debug)]
#[derive(Clone, codec::Encode, codec::Decode, Debug, scale_info::TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub enum Event {
/// Emitted when a state machine is successfully updated to a new height
Expand Down
2 changes: 1 addition & 1 deletion pallet-ismp/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Proof<Hash> {
}

/// Merkle Mountain Range operation error.
#[derive(RuntimeDebug, codec::Encode, codec::Decode, PartialEq, Eq)]
#[derive(RuntimeDebug, codec::Encode, codec::Decode, PartialEq, Eq, scale_info::TypeInfo)]
#[allow(missing_docs)]
pub enum Error {
InvalidNumericOp,
Expand Down
19 changes: 10 additions & 9 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@ hex-literal = "0.4.1"
merkle-mountain-range = { package = "ckb-merkle-mountain-range", version = "0.5.2", default-features = false }
primitive-types = { version = "0.12.1", default-features = false }
hash-db = { version = "0.16.0", default-features = false }

# polytope labs
ismp = { git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main", default-features = false }

# substrate
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

# cumulus
parachain-system = { package = "cumulus-pallet-parachain-system", git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.400", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.400", default-features = false }
parachain-system = { package = "cumulus-pallet-parachain-system", git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.420", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.420", default-features = false }

# local
ismp-primitives = { path = "../pallet-ismp/primitives", default-features = false }
Expand Down
12 changes: 6 additions & 6 deletions parachain/inherent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "deriv
anyhow = "1.0.57"

# Substrate
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

# Cumulus
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.400" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.400" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.420" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "release-v0.9.420" }

# polytope-labs
ismp = { git = "ssh://[email protected]/polytope-labs/ismp-rs.git", branch = "main" }
Expand Down
2 changes: 1 addition & 1 deletion parachain/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Polytope Labs <[email protected]>"]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }

[features]
default = ["std"]
Expand Down

0 comments on commit 443a461

Please sign in to comment.