Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,996 changes: 2,218 additions & 4,778 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ cumulus-client-consensus-common = "0.15.0"
cumulus-client-consensus-proposer = "0.14.0"
cumulus-client-service = "0.15.0"

# TODO: Paseo (note: using polkadot as stopgap until paseo updated to polkadot sdk v1.14.0)
asset-hub-paseo-runtime = { git = "https://github.com/polkadot-fellows/runtimes", default-features = false, package = "asset-hub-polkadot-runtime" }
paseo-runtime = { git = "https://github.com/polkadot-fellows/runtimes", default-features = false, package = "polkadot-runtime" }
paseo-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", default-features = false, package = "polkadot-runtime-constants" }

# Paseo
asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
# asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
# paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
# paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
7 changes: 6 additions & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ repository.workspace = true

[dev-dependencies]
codec.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt", "std", "tracing-log"] }
tracing-subscriber = { workspace = true, features = [
"env-filter",
"fmt",
"std",
"tracing-log",
] }

# Substrate
frame-support.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions integration-tests/src/chains/asset_hub_paseo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub(crate) mod genesis;

use crate::chains::paseo::Paseo;
use emulated_integration_tests_common::{
impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain,
Expand Down Expand Up @@ -34,6 +33,6 @@ decl_test_parachains! {
// AssetHubPaseo implementation
impl_accounts_helpers_for_parachain!(AssetHubPaseo);
impl_assert_events_helpers_for_parachain!(AssetHubPaseo);
impl_assets_helpers_for_parachain!(AssetHubPaseo, Paseo);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, Paseo);
impl_assets_helpers_for_parachain!(AssetHubPaseo);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, xcm::v3::Location);
impl_xcm_helpers_for_parachain!(AssetHubPaseo);
14 changes: 7 additions & 7 deletions integration-tests/src/chains/paseo/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, get_host_config,
validators,
accounts, build_genesis_storage, get_from_seed, get_host_config, validators,
};
use paseo_runtime_constants::currency::UNITS as PAS;
use polkadot_primitives::{AssignmentId, Balance, ValidatorId};
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_core::{sr25519, storage::Storage};
use sp_core::storage::Storage;

pub(crate) const ED: Balance = paseo_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
const ENDOWMENT: u128 = 1_000_000 * PAS;
Expand Down Expand Up @@ -58,12 +57,13 @@ pub(crate) fn genesis() -> Storage {
},
babe: paseo_runtime::BabeConfig {
authorities: Default::default(),
epoch_config: Some(paseo_runtime::BABE_GENESIS_EPOCH_CONFIG),
epoch_config: paseo_runtime::BABE_GENESIS_EPOCH_CONFIG,
..Default::default()
},
sudo: paseo_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
},
// TODO: sudo pallet is not configured in polkadot runtime
// sudo: runtime::SudoConfig {
// key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
// },
configuration: paseo_runtime::ConfigurationConfig { config: get_host_config() },
registrar: paseo_runtime::RegistrarConfig {
next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID,
Expand Down
5 changes: 3 additions & 2 deletions integration-tests/src/chains/paseo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use emulated_integration_tests_common::{

// Paseo declaration
decl_test_relay_chains! {
#[api_version(10)]
#[api_version(11)]
pub struct Paseo {
genesis = genesis::genesis(),
on_init = (),
Expand All @@ -18,7 +18,8 @@ decl_test_relay_chains! {
},
pallets = {
XcmPallet: paseo_runtime::XcmPallet,
Sudo: paseo_runtime::Sudo,
// TODO: sudo pallet is not configured in polkadot runtime
// Sudo: paseo_runtime::Sudo,
Balances: paseo_runtime::Balances,
Hrmp: paseo_runtime::Hrmp,
}
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/src/chains/pop_network/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub(crate) mod genesis;

use crate::chains::paseo::Paseo;
use emulated_integration_tests_common::{
impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
impl_assets_helpers_for_parachain, impl_xcm_helpers_for_parachain, impls::Parachain,
Expand Down Expand Up @@ -33,5 +32,5 @@ decl_test_parachains! {
// PopNetwork implementation
impl_accounts_helpers_for_parachain!(PopNetwork);
impl_assert_events_helpers_for_parachain!(PopNetwork);
impl_assets_helpers_for_parachain!(PopNetwork, Paseo);
impl_assets_helpers_for_parachain!(PopNetwork);
impl_xcm_helpers_for_parachain!(PopNetwork);
18 changes: 7 additions & 11 deletions integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn para_receiver_assertions<Test>(_: Test) {
assert_expected_events!(
PopNetworkPara,
vec![
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
RuntimeEvent::MessageQueue(
pallet_message_queue::Event::Processed { success: true, .. }
) => {},
Expand All @@ -113,9 +113,7 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) {
PopNetworkPara,
vec![
// Amount to reserve transfer is transferred to Parachain's Sovereign account
RuntimeEvent::Balances(
pallet_balances::Event::Withdraw { who, amount }
) => {
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
who: *who == t.sender.account_id,
amount: *amount == t.args.amount,
},
Expand All @@ -133,9 +131,7 @@ fn para_to_relay_sender_assertions(t: ParaToRelayTest) {
PopNetworkPara,
vec![
// Amount to reserve transfer is transferred to Parachain's Sovereign account
RuntimeEvent::Balances(
pallet_balances::Event::Withdraw { who, amount }
) => {
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
who: *who == t.sender.account_id,
amount: *amount == t.args.amount,
},
Expand Down Expand Up @@ -297,7 +293,7 @@ fn reserve_transfer_native_asset_from_relay_to_para() {
test.assert();

let delivery_fees = PaseoRelay::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PaseoXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down Expand Up @@ -351,7 +347,7 @@ fn reserve_transfer_native_asset_from_para_to_relay() {
let receiver_balance_after = test.receiver.balance;

let delivery_fees = PopNetworkPara::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PopNetworkXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down Expand Up @@ -397,7 +393,7 @@ fn reserve_transfer_native_asset_from_system_para_to_para() {
let receiver_balance_after = test.receiver.balance;

let delivery_fees = AssetHubPaseoPara::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubPaseoXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down Expand Up @@ -460,7 +456,7 @@ fn reserve_transfer_native_asset_from_para_to_system_para() {
let receiver_balance_after = test.receiver.balance;

let delivery_fees = PopNetworkPara::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PopNetworkXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down
2 changes: 1 addition & 1 deletion runtime/devnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ metadata-hash = ["substrate-wasm-builder/metadata-hash"]

# A convenience feature for enabling things when doing a build
# for an on-chain release.
on-chain-release-build = ["metadata-hash"]
on-chain-release-build = ["metadata-hash"]