Skip to content

Commit

Permalink
update to 0.9.23 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj authored Jun 9, 2022
1 parent 831117d commit 6b039fb
Show file tree
Hide file tree
Showing 46 changed files with 1,259 additions and 1,336 deletions.
1,877 changes: 878 additions & 999 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ codec = { package = "parity-scale-codec", version = "3", default-features = fals
[dev-dependencies]
hex = "0.4"
serde = { version = "1.0.119" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-keyring = { default-features = false, version = "6.0.0" }
tokio = { version = "1.17.0", features = ["full"] }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }

# arkworks related deps
Expand Down
26 changes: 13 additions & 13 deletions pallets/anchor-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ codec = { package = "parity-scale-codec", version = "3", default-features = fals

# frame dependencies
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-mt = { path = "../mt", default-features = false }
pallet-linkable-tree = { path = "../linkable-tree", default-features = false }
pallet-anchor = { path = "../anchor", default-features = false }
Expand All @@ -34,17 +34,17 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li
webb-primitives = { path = "../../primitives", default-features = false }
pallet-asset-registry = { path = "../asset-registry", default-features = false }

frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }

hex-literal = "0.3.4"

[dev-dependencies]
serde = { version = "1.0.119" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-hasher = { path = "../hasher", default-features = false }
pallet-mixer = { path = "../mixer", default-features = false }
pallet-mt = { path = "../mt", default-features = false }
Expand Down
4 changes: 3 additions & 1 deletion pallets/anchor-handler/src/mock_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ impl orml_tokens::Config for Test {
type WeightInfo = ();
type MaxLocks = ();
type MaxReserves = ();
type OnNewTokenAccount = ();
type OnKilledTokenAccount = ();
type ReserveIdentifier = [u8; 8];
}

Expand Down Expand Up @@ -285,7 +287,7 @@ pub const RELAYER_C: u64 = 0x4;
pub const ENDOWED_BALANCE: u128 = 100_000_000;

pub fn new_test_ext() -> sp_io::TestExternalities {
let bridge_id = PalletId(*b"dw/bridg").into_account();
let bridge_id = PalletId(*b"dw/bridg").into_account_truncating();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
pallet_balances::GenesisConfig::<Test> {
balances: vec![(bridge_id, ENDOWED_BALANCE), (RELAYER_A, ENDOWED_BALANCE)],
Expand Down
4 changes: 3 additions & 1 deletion pallets/anchor-handler/src/mock_signature_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ impl orml_tokens::Config for Test {
type WeightInfo = ();
type MaxLocks = ();
type MaxReserves = ();
type OnNewTokenAccount = ();
type OnKilledTokenAccount = ();
type ReserveIdentifier = [u8; 8];
}

Expand Down Expand Up @@ -291,7 +293,7 @@ pub const RELAYER_C: u64 = 0x4;
pub const ENDOWED_BALANCE: u128 = 100_000_000;

pub fn new_test_ext() -> sp_io::TestExternalities {
let bridge_id = PalletId(*b"dw/bridg").into_account();
let bridge_id = PalletId(*b"dw/bridg").into_account_truncating();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
pallet_balances::GenesisConfig::<Test> {
balances: vec![(bridge_id, ENDOWED_BALANCE), (RELAYER_A, ENDOWED_BALANCE)],
Expand Down
24 changes: 12 additions & 12 deletions pallets/anchor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }

frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-hasher = { path = "../hasher", default-features = false }
pallet-linkable-tree = { path = "../linkable-tree", default-features = false }
pallet-mt = { path = "../mt", default-features = false }
Expand All @@ -26,17 +26,17 @@ webb-primitives = { path = "../../primitives", default-features = false, feature
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false }
pallet-asset-registry = { path = "../asset-registry", default-features = false }

frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }


[dev-dependencies]
serde = { version = "1.0.119" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-token-wrapper = { path = "../token-wrapper" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion pallets/anchor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ impl<T: Config<I>, I: 'static> AnchorInspector<AnchorConfigration<T, I>> for Pal

impl<T: Config<I>, I: 'static> Pallet<T, I> {
pub fn account_id() -> T::AccountId {
T::PalletId::get().into_account()
T::PalletId::get().into_account_truncating()
}

pub fn get_anchor(
Expand Down
2 changes: 2 additions & 0 deletions pallets/anchor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ impl orml_tokens::Config for Test {
type WeightInfo = ();
type MaxLocks = ();
type MaxReserves = ();
type OnNewTokenAccount = ();
type OnKilledTokenAccount = ();
type ReserveIdentifier = [u8; 8];
}

Expand Down
22 changes: 11 additions & 11 deletions pallets/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ webb-primitives = { path = "../../primitives", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false }

# Substrate dependencies
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }

frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }
frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }

[dev-dependencies]
polkadot-xcm = { package = "xcm", git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22", default-features = false }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
polkadot-xcm = { package = "xcm", git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.23", default-features = false }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }

[features]
default = ["std"]
Expand Down
18 changes: 9 additions & 9 deletions pallets/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }

sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
# frame dependencies
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23" }

frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22", optional = true }
frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.23", optional = true }

webb-primitives = { path = "../../primitives", default-features = false }
[features]
Expand Down
8 changes: 5 additions & 3 deletions pallets/bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
/// Provides an AccountId for the pallet.
/// This is used both as an origin check and deposit/withdrawal account.
pub fn account_id() -> T::AccountId {
T::BridgeAccountId::get().into_account()
T::BridgeAccountId::get().into_account_truncating()
}

/// Asserts if a resource is registered
Expand Down Expand Up @@ -603,7 +603,7 @@ impl<T: Config<I>, I: 'static> EnsureOrigin<T::Origin> for EnsureBridge<T, I> {
type Success = T::AccountId;

fn try_origin(o: T::Origin) -> Result<Self::Success, T::Origin> {
let bridge_id = T::BridgeAccountId::get().into_account();
let bridge_id = T::BridgeAccountId::get().into_account_truncating();
o.into().and_then(|o| match o {
system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id),
r => Err(T::Origin::from(r)),
Expand All @@ -615,6 +615,8 @@ impl<T: Config<I>, I: 'static> EnsureOrigin<T::Origin> for EnsureBridge<T, I> {
/// ** Should be used for benchmarking only!!! **
#[cfg(feature = "runtime-benchmarks")]
fn successful_origin() -> T::Origin {
T::Origin::from(frame_system::RawOrigin::Signed(T::BridgeAccountId::get().into_account()))
T::Origin::from(frame_system::RawOrigin::Signed(
T::BridgeAccountId::get().into_account_truncating(),
))
}
}
2 changes: 1 addition & 1 deletion pallets/bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub const ENDOWED_BALANCE: u64 = 100_000_000;
pub const TEST_THRESHOLD: u32 = 2;

pub fn new_test_ext() -> sp_io::TestExternalities {
let bridge_id = PalletId(*b"dw/bridg").into_account();
let bridge_id = PalletId(*b"dw/bridg").into_account_truncating();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
pallet_balances::GenesisConfig::<Test> { balances: vec![(bridge_id, ENDOWED_BALANCE)] }
.assimilate_storage(&mut t)
Expand Down
Loading

0 comments on commit 6b039fb

Please sign in to comment.