From 67fc849b9216dfb0bb8f2a036bf9cede78f9a258 Mon Sep 17 00:00:00 2001 From: eNDdy Date: Fri, 2 May 2025 18:34:35 -0600 Subject: [PATCH 1/4] first xcm test change change change --- Cargo.lock | 2799 ++++++++++++++--- Cargo.toml | 21 + .../chains/frequency-westend/Cargo.toml | 23 + .../chains/frequency-westend/src/genesis.rs | 68 + .../chains/frequency-westend/src/lib.rs | 37 + emulated-test/networks/westend/Cargo.toml | 14 + emulated-test/networks/westend/src/lib.rs | 30 + .../test/frequency-westend/.cargo/config.toml | 2 + .../test/frequency-westend/Cargo.toml | 26 + .../test/frequency-westend/src/lib.rs | 55 + .../test/frequency-westend/src/tests/mod.rs | 23 + ...ransfer_dot_from_asset_hub_to_frequency.rs | 170 + ...ransfer_dot_from_frequency_to_asset_hub.rs | 204 ++ .../frequency-westend/src/tests/teleport.rs | 17 + runtime/frequency/src/lib.rs | 6 +- runtime/frequency/src/xcm_config.rs | 4 +- 16 files changed, 3035 insertions(+), 464 deletions(-) create mode 100644 emulated-test/chains/frequency-westend/Cargo.toml create mode 100644 emulated-test/chains/frequency-westend/src/genesis.rs create mode 100644 emulated-test/chains/frequency-westend/src/lib.rs create mode 100644 emulated-test/networks/westend/Cargo.toml create mode 100644 emulated-test/networks/westend/src/lib.rs create mode 100644 emulated-test/test/frequency-westend/.cargo/config.toml create mode 100644 emulated-test/test/frequency-westend/Cargo.toml create mode 100644 emulated-test/test/frequency-westend/src/lib.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/mod.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/teleport.rs diff --git a/Cargo.lock b/Cargo.lock index 893bdfeb2f..14c6a5488c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,6 +105,156 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "alloy-core" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6beff64ad0aa6ad1019a3db26fef565aefeb011736150ab73ed3366c3cfd1b" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c77490fe91a0ce933a1f219029521f20fc28c2c0ca95d53fa4da9c00b8d9d4e" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.3", + "indexmap 2.9.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.1.1", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" +dependencies = [ + "arrayvec 0.7.6", + "bytes", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10ae8e9a91d328ae954c22542415303919aabe976fe7a92eb06db1b68fd59f2" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83ad5da86c127751bc607c174d6c9fe9b85ef0889a9ca0c641735d77d4f98f26" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.9.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3d30f0d3f9ba3b7686f3ff1de9ee312647aac705604417a2f40c604f409a9e" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.101", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d162f8524adfdfb0e4bd0505c734c985f3e2474eb022af32eef0d52a4f3935c" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43d5e60466a440230c07761aa67671d4719d46f43be8ea6e7ed334d8db4a9ab" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "always-assert" version = "0.1.3" @@ -167,12 +317,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "6680de5231bd6ee4c6191b8a1325daa282b415391ec9d3a37bd34f2060dc73fa" dependencies = [ "anstyle", - "once_cell", + "once_cell_polyfill", "windows-sys 0.59.0", ] @@ -316,6 +466,24 @@ dependencies = [ "ark-std 0.5.0", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -332,7 +500,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.1", "zeroize", ] @@ -356,6 +524,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -376,6 +554,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -430,6 +620,16 @@ dependencies = [ "hashbrown 0.15.3", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -477,6 +677,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -630,6 +840,170 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-hub-westend-emulated-chain" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "asset-hub-westend-runtime", + "bp-bridge-hub-westend", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "sp-core", + "sp-keyring", + "staging-xcm", + "staging-xcm-builder", + "testnet-parachains-constants", + "westend-emulated-chain", +] + +[[package]] +name = "asset-hub-westend-runtime" +version = "0.30.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "assets-common", + "bp-asset-hub-rococo", + "bp-asset-hub-westend", + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-weight-reclaim", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-conversion", + "pallet-asset-conversion-ops", + "pallet-asset-conversion-tx-payment", + "pallet-asset-rewards", + "pallet-assets", + "pallet-assets-freezer", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-migrations", + "pallet-multisig", + "pallet-nft-fractionalization", + "pallet-nfts", + "pallet-nfts-runtime-api", + "pallet-proxy", + "pallet-revive", + "pallet-session", + "pallet-state-trie-migration", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-uniques", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub-router", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "primitive-types 0.13.1", + "scale-info", + "serde_json", + "snowbridge-inbound-queue-primitives", + "snowbridge-outbound-queue-primitives", + "snowbridge-pallet-system-frontend", + "snowbridge-runtime-common", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "testnet-parachains-constants", + "westend-runtime-constants", + "xcm-runtime-apis", +] + +[[package]] +name = "asset-test-utils" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-timestamp", + "pallet-xcm", + "pallet-xcm-bridge-hub-router", + "parachains-common", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "sp-io", + "sp-runtime", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "xcm-runtime-apis", +] + +[[package]] +name = "assets-common" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "impl-trait-for-tuples", + "pallet-asset-conversion", + "pallet-assets", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "tracing", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -712,9 +1086,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" dependencies = [ "async-lock 3.4.0", "cfg-if", @@ -722,8 +1096,8 @@ dependencies = [ "futures-io", "futures-lite 2.6.0", "parking", - "polling 3.7.4", - "rustix 0.38.44", + "polling 3.8.0", + "rustix 1.0.7", "slab", "tracing", "windows-sys 0.59.0", @@ -766,7 +1140,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "async-io 2.4.0", + "async-io 2.4.1", "blocking", "futures-lite 2.6.0", ] @@ -790,12 +1164,12 @@ dependencies = [ [[package]] name = "async-process" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" +checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc" dependencies = [ "async-channel 2.3.1", - "async-io 2.4.0", + "async-io 2.4.1", "async-lock 3.4.0", "async-signal", "async-task", @@ -803,23 +1177,23 @@ dependencies = [ "cfg-if", "event-listener 5.4.0", "futures-lite 2.6.0", - "rustix 0.38.44", + "rustix 1.0.7", "tracing", ] [[package]] name = "async-signal" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d" dependencies = [ - "async-io 2.4.0", + "async-io 2.4.1", "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.44", + "rustix 1.0.7", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -891,6 +1265,17 @@ dependencies = [ "url", ] +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -980,7 +1365,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "hash-db", "log", @@ -1040,11 +1425,26 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" dependencies = [ - "bitcoin_hashes 0.13.0", - "serde", - "unicode-normalization", + "bitcoin_hashes 0.13.0", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", ] +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitcoin-internals" version = "0.2.0" @@ -1220,10 +1620,216 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "bp-asset-hub-rococo" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-core", + "staging-xcm", + "testnet-parachains-constants", +] + +[[package]] +name = "bp-asset-hub-westend" +version = "0.16.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-core", + "staging-xcm", + "testnet-parachains-constants", +] + +[[package]] +name = "bp-bridge-hub-cumulus" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-messages", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "frame-system", + "polkadot-primitives", + "sp-api", + "sp-std", +] + +[[package]] +name = "bp-bridge-hub-rococo" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-bridge-hub-westend" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-header-chain" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-runtime", + "finality-grandpa", + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-messages" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-header-chain", + "bp-runtime", + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "bp-parachains" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-polkadot-core" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-messages", + "bp-runtime", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-relayers" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-runtime", + "frame-support", + "frame-system", + "pallet-utility", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-runtime" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-support", + "frame-system", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "trie-db", +] + +[[package]] +name = "bp-xcm-bridge-hub" +version = "0.6.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-messages", + "bp-runtime", + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-std", + "staging-xcm", +] + [[package]] name = "bp-xcm-bridge-hub-router" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -1286,6 +1892,9 @@ name = "bytes" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] [[package]] name = "bzip2-sys" @@ -1341,9 +1950,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.23" +version = "1.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4ac86a9e5bc1e2b3449ab9d7d3a6a405e3d1bb28d7b9be8614f55846ae3766" +checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" dependencies = [ "jobserver", "libc", @@ -1498,9 +2107,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" dependencies = [ "clap_builder", "clap_derive", @@ -1508,9 +2117,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" dependencies = [ "anstream", "anstyle", @@ -1778,9 +2387,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -1936,6 +2545,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -2046,7 +2670,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "clap", "parity-scale-codec", @@ -2063,7 +2687,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -2086,7 +2710,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-client-collator", @@ -2133,7 +2757,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -2163,7 +2787,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "anyhow", "async-trait", @@ -2178,7 +2802,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -2204,7 +2828,7 @@ dependencies = [ [[package]] name = "cumulus-client-parachain-inherent" version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2224,7 +2848,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2250,7 +2874,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.23.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2287,7 +2911,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -2304,7 +2928,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2339,7 +2963,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -2350,7 +2974,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -2363,7 +2987,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-weight-reclaim" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "derive-where", @@ -2382,7 +3006,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.19.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2397,7 +3021,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -2422,7 +3046,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-api", "sp-consensus-aura", @@ -2431,7 +3055,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2447,7 +3071,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2461,7 +3085,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-externalities", "sp-runtime-interface", @@ -2471,7 +3095,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-storage-weight-reclaim" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-proof-size-hostfunction", @@ -2488,7 +3112,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "sp-inherents", @@ -2498,7 +3122,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2515,7 +3139,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.23.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2539,7 +3163,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2558,7 +3182,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.23.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "async-trait", @@ -2592,7 +3216,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2632,7 +3256,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2653,7 +3277,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "rustc_version", + "rustc_version 0.4.1", "subtle 2.6.1", "zeroize", ] @@ -2818,7 +3442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 1.0.109", + "syn 2.0.101", ] [[package]] @@ -2910,7 +3534,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.1", "syn 2.0.101", ] @@ -2920,7 +3544,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl", + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", ] [[package]] @@ -2935,6 +3568,18 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "unicode-xid", +] + [[package]] name = "diff" version = "0.1.13" @@ -3078,6 +3723,12 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clonable" version = "0.9.2" @@ -3198,6 +3849,43 @@ dependencies = [ "zeroize", ] +[[package]] +name = "emulated-integration-tests-common" +version = "20.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "asset-test-utils", + "bp-messages", + "bp-xcm-bridge-hub", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "hex-literal", + "pallet-assets", + "pallet-balances", + "pallet-bridge-messages", + "pallet-message-queue", + "pallet-xcm", + "pallet-xcm-bridge-hub", + "parachains-common", + "parity-scale-codec", + "paste", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sc-consensus-grandpa", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-keyring", + "sp-runtime", + "staging-xcm", + "xcm-emulator", + "xcm-simulator", +] + [[package]] name = "encode_unicode" version = "1.0.0" @@ -3322,7 +4010,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "ethabi-decode" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52029c4087f9f01108f851d0d02df9c21feb5660a19713466724b7f95bd2d773" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + +[[package]] +name = "ethbloom" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c321610643004cf908ec0f5f2aa0d8f1f8e14b540562a2887a1111ff1ecbf7b" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec 0.7.1", + "impl-rlp", + "impl-serde 0.5.0", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab15ed80916029f878e0267c3a9f92b67df55e79af370bf66199059ae2b4ee3" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec 0.7.1", + "impl-rlp", + "impl-serde 0.5.0", + "primitive-types 0.13.1", + "scale-info", + "uint 0.10.0", ] [[package]] @@ -3412,7 +4141,29 @@ dependencies = [ name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] [[package]] name = "fatality" @@ -3551,7 +4302,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "fork-tree" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", ] @@ -3583,8 +4334,8 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "frame-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "40.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-support-procedural", @@ -3607,8 +4358,8 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "47.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "47.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "Inflector", "array-bytes", @@ -3681,8 +4432,8 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "16.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3692,8 +4443,8 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "40.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3708,8 +4459,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "40.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "aquamarine", "frame-support", @@ -3751,7 +4502,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "const-hex", @@ -3767,7 +4518,7 @@ dependencies = [ [[package]] name = "frame-support" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "aquamarine", "array-bytes", @@ -3807,8 +4558,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "33.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "33.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "Inflector", "cfg-expr", @@ -3828,7 +4579,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -3840,7 +4591,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro2", "quote", @@ -3850,7 +4601,7 @@ dependencies = [ [[package]] name = "frame-system" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cfg-if", "docify", @@ -3869,7 +4620,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -3883,7 +4634,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "parity-scale-codec", @@ -3893,7 +4644,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "parity-scale-codec", @@ -3963,6 +4714,23 @@ dependencies = [ "substrate-build-script-utils", ] +[[package]] +name = "frequency-emulated-chain" +version = "0.0.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "frequency-runtime", + "parachains-common", + "polkadot-primitives", + "sp-core", + "sp-keyring", + "sp-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "frequency-runtime" version = "0.0.0" @@ -4149,6 +4917,26 @@ dependencies = [ "tokio", ] +[[package]] +name = "frequency-westend-integration-tests" +version = "0.0.0" +dependencies = [ + "asset-test-utils", + "emulated-integration-tests-common", + "frame-support", + "pallet-assets", + "pallet-balances", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "sp-io", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", + "westend-runtime", + "westend-system-emulated-network", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -4338,6 +5126,20 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generator" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows 0.61.1", +] + [[package]] name = "generic-array" version = "0.12.4" @@ -4585,6 +5387,7 @@ dependencies = [ "allocator-api2", "equivalent", "foldhash", + "serde", ] [[package]] @@ -4614,12 +5417,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hermit-abi" version = "0.5.1" @@ -4631,6 +5428,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hex-conservative" @@ -4670,7 +5470,7 @@ dependencies = [ "ipnet", "once_cell", "rand 0.8.5", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 1.0.69", "tinyvec", "tokio", @@ -4678,6 +5478,31 @@ dependencies = [ "url", ] +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.9.1", + "ring 0.17.14", + "thiserror 2.0.12", + "tinyvec", + "tokio", + "tracing", + "url", +] + [[package]] name = "hickory-resolver" version = "0.24.4" @@ -4686,7 +5511,7 @@ checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.4", "ipconfig", "lru-cache", "once_cell", @@ -4699,6 +5524,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "hickory-resolver" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.25.2", + "ipconfig", + "moka", + "once_cell", + "parking_lot 0.12.3", + "rand 0.9.1", + "resolv-conf", + "smallvec", + "thiserror 2.0.12", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -4812,6 +5658,16 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" +[[package]] +name = "humantime-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" +dependencies = [ + "humantime", + "serde", +] + [[package]] name = "hyper" version = "0.14.32" @@ -4829,7 +5685,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -4859,11 +5715,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" dependencies = [ - "futures-util", "http 1.3.1", "hyper 1.6.0", "hyper-util", @@ -4878,19 +5733,20 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710" +checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" dependencies = [ "bytes", "futures-channel", + "futures-core", "futures-util", "http 1.3.1", "http-body 1.0.1", "hyper 1.6.0", "libc", "pin-project-lite", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -5049,7 +5905,7 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdf9d64cfcf380606e64f9a0bcf493616b65331199f984151a6fa11a7b3cde38" dependencies = [ - "async-io 2.4.0", + "async-io 2.4.1", "core-foundation 0.9.4", "fnv", "futures", @@ -5063,7 +5919,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.53.0", ] [[package]] @@ -5085,6 +5941,15 @@ dependencies = [ "xmltree", ] +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "impl-codec" version = "0.7.1" @@ -5105,6 +5970,15 @@ dependencies = [ "uint 0.10.0", ] +[[package]] +name = "impl-rlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ed8ad1f3877f7e775b8cbf30ed1bd3209a95401817f19a0eb4402d13f8cf90" +dependencies = [ + "rlp 0.6.1", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -5172,6 +6046,7 @@ checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.3", + "serde", ] [[package]] @@ -5230,7 +6105,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.9", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg", @@ -5250,7 +6125,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.1", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5321,9 +6196,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jiff" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02000660d30638906021176af16b17498bd0d12813dbfe7b276d8bc7f3c0806" +checksum = "a194df1107f33c79f4f93d02c80798520551949d59dfad22b6157048a88cca93" dependencies = [ "jiff-static", "log", @@ -5334,9 +6209,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c30758ddd7188629c6713fc45d1188af4f44c90582311d0c8d8c9907f60c48" +checksum = "6c6e1db7ed32c6c71b759497fae34bf7933636f75a251b9e736555da426f6442" dependencies = [ "proc-macro2", "quote", @@ -5538,13 +6413,23 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + [[package]] name = "keccak-hash" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" dependencies = [ - "primitive-types", + "primitive-types 0.13.1", "tiny-keccak", ] @@ -5603,6 +6488,9 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.8", +] [[package]] name = "lazycell" @@ -5642,9 +6530,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", "windows-targets 0.53.0", @@ -5751,7 +6639,7 @@ checksum = "97f37f30d5c7275db282ecd86e54f29dd2176bd3ac656f06abf43bedb21eb8bd" dependencies = [ "async-trait", "futures", - "hickory-resolver", + "hickory-resolver 0.24.4", "libp2p-core", "libp2p-identity", "parking_lot 0.12.3", @@ -5837,14 +6725,14 @@ checksum = "14b8546b6644032565eb29046b42744aee1e9f261ed99671b2c93fb140dba417" dependencies = [ "data-encoding", "futures", - "hickory-proto", + "hickory-proto 0.24.4", "if-watch", "libp2p-core", "libp2p-identity", "libp2p-swarm", "rand 0.8.5", "smallvec", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tracing", "void", @@ -5930,7 +6818,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.14", "rustls", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 1.0.69", "tokio", "tracing", @@ -6004,7 +6892,7 @@ dependencies = [ "libc", "libp2p-core", "libp2p-identity", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tracing", ] @@ -6242,9 +7130,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "litep2p" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71056c23c896bb0e18113b2d2f1989be95135e6bdeedb0b757422ee21a073eb" +checksum = "14fb10e63363204b89d91e1292df83322fd9de5d7fa76c3d5c78ddc2f8f3efa9" dependencies = [ "async-trait", "bs58", @@ -6253,7 +7141,7 @@ dependencies = [ "ed25519-dalek", "futures", "futures-timer", - "hickory-resolver", + "hickory-resolver 0.25.2", "indexmap 2.9.0", "libc", "mockall", @@ -6270,7 +7158,7 @@ dependencies = [ "simple-dns", "smallvec", "snow", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tokio-stream", @@ -6303,6 +7191,19 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + [[package]] name = "lru" version = "0.11.1" @@ -6361,6 +7262,17 @@ dependencies = [ "libc", ] +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "macro_magic" version = "0.5.1" @@ -6522,13 +7434,13 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6559,7 +7471,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "log", @@ -6578,7 +7490,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -6616,6 +7528,25 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "moka" +version = "0.12.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "loom", + "parking_lot 0.12.3", + "portable-atomic", + "rustc_version 0.4.1", + "smallvec", + "tagptr", + "thiserror 1.0.69", + "uuid", +] + [[package]] name = "multi-stash" version = "0.2.0" @@ -7054,6 +7985,16 @@ name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "oorandom" @@ -7139,7 +8080,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7154,24 +8095,75 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-asset-conversion-ops" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-asset-conversion", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-asset-conversion-tx-payment" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-asset-conversion", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + [[package]] name = "pallet-asset-rate" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "pallet-asset-rewards" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-api", + "sp-arithmetic", "sp-core", + "sp-io", "sp-runtime", + "sp-std", ] [[package]] name = "pallet-asset-tx-payment" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7188,7 +8180,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7201,10 +8193,22 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-assets-freezer" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "log", + "pallet-assets", + "parity-scale-codec", + "polkadot-sdk-frame", + "scale-info", +] + [[package]] name = "pallet-aura" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7220,7 +8224,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7235,7 +8239,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7248,7 +8252,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7271,7 +8275,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "aquamarine", "docify", @@ -7292,7 +8296,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -7308,7 +8312,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "41.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7327,7 +8331,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -7350,26 +8354,45 @@ dependencies = [ ] [[package]] -name = "pallet-bounties" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +name = "pallet-bounties" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury 39.0.0", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-bridge-messages" +version = "0.20.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ + "bp-header-chain", + "bp-messages", + "bp-runtime", "frame-benchmarking", "frame-support", "frame-system", "log", - "pallet-treasury 39.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] name = "pallet-broker" version = "0.19.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "frame-benchmarking", @@ -7416,7 +8439,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7434,7 +8457,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7453,7 +8476,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -7470,7 +8493,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7486,7 +8509,7 @@ dependencies = [ [[package]] name = "pallet-delegated-staking" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7501,7 +8524,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7517,8 +8540,8 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "39.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7540,7 +8563,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7553,7 +8576,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7571,7 +8594,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -7642,7 +8665,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7712,7 +8735,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "enumflags2", "frame-benchmarking", @@ -7728,7 +8751,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7747,7 +8770,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7762,7 +8785,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -7778,7 +8801,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "43.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "environmental", "frame-benchmarking", @@ -7845,7 +8868,7 @@ dependencies = [ [[package]] name = "pallet-meta-tx" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -7863,7 +8886,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "10.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -7882,7 +8905,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "parity-scale-codec", @@ -7952,7 +8975,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "parity-scale-codec", @@ -7960,10 +8983,52 @@ dependencies = [ "scale-info", ] +[[package]] +name = "pallet-nft-fractionalization" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-assets", + "pallet-nfts", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + +[[package]] +name = "pallet-nfts" +version = "34.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-nfts-runtime-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + [[package]] name = "pallet-nis" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -7973,7 +9038,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -7991,7 +9056,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8011,7 +9076,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8021,7 +9086,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -8036,7 +9101,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8059,7 +9124,7 @@ dependencies = [ [[package]] name = "pallet-parameters" version = "0.11.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -8100,7 +9165,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8116,7 +9181,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -8126,7 +9191,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8144,7 +9209,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8158,7 +9223,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8173,10 +9238,93 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-revive" +version = "0.6.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "alloy-core", + "derive_more 0.99.20", + "environmental", + "ethabi-decode", + "ethereum-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "humantime-serde", + "impl-trait-for-tuples", + "log", + "num-bigint", + "num-integer", + "num-traits", + "pallet-revive-fixtures", + "pallet-revive-proc-macro", + "pallet-revive-uapi", + "pallet-transaction-payment", + "parity-scale-codec", + "paste", + "polkavm 0.21.0", + "polkavm-common 0.21.0", + "rand 0.8.5", + "ripemd", + "rlp 0.6.1", + "scale-info", + "serde", + "sp-api", + "sp-arithmetic", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", + "sp-io", + "sp-runtime", + "staging-xcm", + "staging-xcm-builder", + "substrate-bn", + "subxt-signer", +] + +[[package]] +name = "pallet-revive-fixtures" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "anyhow", + "cargo_metadata", + "pallet-revive-uapi", + "polkavm-linker 0.21.0", + "sp-core", + "sp-io", + "toml 0.8.22", +] + +[[package]] +name = "pallet-revive-proc-macro" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "pallet-revive-uapi" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bitflags 1.3.2", + "pallet-revive-proc-macro", + "parity-scale-codec", + "polkavm-derive 0.21.0", + "scale-info", +] + [[package]] name = "pallet-root-testing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -8189,8 +9337,8 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "41.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -8260,7 +9408,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "frame-system", @@ -8281,7 +9429,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8297,7 +9445,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8313,8 +9461,8 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "40.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8336,7 +9484,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "sp-arithmetic", @@ -8345,7 +9493,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "sp-api", @@ -8355,7 +9503,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "44.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8421,7 +9569,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -8457,7 +9605,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -8476,7 +9624,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8494,7 +9642,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8510,7 +9658,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "43.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8526,7 +9674,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8559,7 +9707,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -8575,10 +9723,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-uniques" +version = "40.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + [[package]] name = "pallet-utility" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8593,7 +9755,7 @@ dependencies = [ [[package]] name = "pallet-verify-signature" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8609,7 +9771,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8623,7 +9785,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -8632,8 +9794,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "19.1.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -8656,7 +9818,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-benchmarking", "frame-support", @@ -8670,10 +9832,51 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "pallet-xcm-bridge-hub" +version = "0.16.3" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "frame-support", + "frame-system", + "log", + "pallet-bridge-messages", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "pallet-xcm-bridge-hub-router" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "parachains-common" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -8699,6 +9902,37 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "parachains-runtimes-test-utils" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-timestamp", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", + "sp-tracing", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "xcm-runtime-apis", +] + [[package]] name = "parity-bip39" version = "2.0.1" @@ -8712,6 +9946,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -8735,9 +9975,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fde3d0718baf5bc92f577d652001da0f8d54cd03a7974e118d04fc888dc23d" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" dependencies = [ "arrayvec 0.7.6", "bitvec", @@ -8752,9 +9992,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581c837bb6b9541ce7faa9377c20616e4fb7650f6b0f68bc93c827ee504fb7b3" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -9047,7 +10287,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polkadot-approval-distribution" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "futures-timer", @@ -9065,7 +10305,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "futures-timer", @@ -9080,7 +10320,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fatality", "futures", @@ -9103,7 +10343,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "fatality", @@ -9136,7 +10376,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "clap", "frame-benchmarking-cli", @@ -9160,7 +10400,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "fatality", @@ -9183,7 +10423,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -9194,7 +10434,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fatality", "futures", @@ -9216,7 +10456,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -9230,7 +10470,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "futures-timer", @@ -9251,7 +10491,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "always-assert", "async-trait", @@ -9274,7 +10514,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "parity-scale-codec", @@ -9292,7 +10532,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "bitvec", @@ -9324,7 +10564,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting-parallel" version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -9348,7 +10588,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "futures", @@ -9367,7 +10607,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "fatality", @@ -9388,7 +10628,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "polkadot-node-subsystem", @@ -9403,7 +10643,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -9425,7 +10665,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "polkadot-node-metrics", @@ -9439,7 +10679,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "futures-timer", @@ -9455,7 +10695,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fatality", "futures", @@ -9473,7 +10713,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -9490,7 +10730,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fatality", "futures", @@ -9504,7 +10744,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "fatality", @@ -9521,7 +10761,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "always-assert", "array-bytes", @@ -9549,7 +10789,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "polkadot-node-subsystem", @@ -9562,7 +10802,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cpu-time", "futures", @@ -9588,7 +10828,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "polkadot-node-metrics", @@ -9603,7 +10843,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bs58", "futures", @@ -9620,7 +10860,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -9645,7 +10885,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "bounded-vec", @@ -9669,7 +10909,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "polkadot-node-subsystem-types", "polkadot-overseer", @@ -9678,7 +10918,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "derive_more 0.99.20", @@ -9706,7 +10946,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fatality", "futures", @@ -9737,7 +10977,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -9757,7 +10997,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bounded-collections", "derive_more 0.99.20", @@ -9773,7 +11013,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "18.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "hex-literal", @@ -9801,7 +11041,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -9834,7 +11074,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitvec", "frame-benchmarking", @@ -9884,7 +11124,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bs58", "frame-benchmarking", @@ -9896,7 +11136,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -9952,7 +11192,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-frame" version = "0.9.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-benchmarking", @@ -9987,7 +11227,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "frame-benchmarking", @@ -10095,7 +11335,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "arrayvec 0.7.6", "bitvec", @@ -10118,7 +11358,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -10133,9 +11373,22 @@ checksum = "dd044ab1d3b11567ab6b98ca71259a992b4034220d5972988a0e96518e5d343d" dependencies = [ "libc", "log", - "polkavm-assembler", - "polkavm-common", - "polkavm-linux-raw", + "polkavm-assembler 0.18.0", + "polkavm-common 0.18.0", + "polkavm-linux-raw 0.18.0", +] + +[[package]] +name = "polkavm" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd34e2f74206fff33482ae1718e275f11365ef8c4de7f0e69217f8845303867" +dependencies = [ + "libc", + "log", + "polkavm-assembler 0.21.0", + "polkavm-common 0.21.0", + "polkavm-linux-raw 0.21.0", ] [[package]] @@ -10147,6 +11400,15 @@ dependencies = [ "log", ] +[[package]] +name = "polkavm-assembler" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f512bc80cb10439391a7c13a9eb2d37cf66b7305e7df0a06d662eff4f5b07625" +dependencies = [ + "log", +] + [[package]] name = "polkavm-common" version = "0.18.0" @@ -10154,7 +11416,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" dependencies = [ "log", - "polkavm-assembler", + "polkavm-assembler 0.18.0", +] + +[[package]] +name = "polkavm-common" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c16b809cfd398f861261c045a8745e6c78b71ea7e0d3ef6f7cc553eb27bc17e" +dependencies = [ + "blake3", + "log", + "polkavm-assembler 0.21.0", ] [[package]] @@ -10163,7 +11436,16 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" dependencies = [ - "polkavm-derive-impl-macro", + "polkavm-derive-impl-macro 0.18.0", +] + +[[package]] +name = "polkavm-derive" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47239245f87329541932c0d7fec750a66a75b13aa87dfe4fbfd637bab86ad387" +dependencies = [ + "polkavm-derive-impl-macro 0.21.0", ] [[package]] @@ -10172,7 +11454,19 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" dependencies = [ - "polkavm-common", + "polkavm-common 0.18.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24fd6c6215450c3e57511df5c38a82eb4bde208de15ee15046ac33852f3c3eaa" +dependencies = [ + "polkavm-common 0.21.0", "proc-macro2", "quote", "syn 2.0.101", @@ -10184,7 +11478,17 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" dependencies = [ - "polkavm-derive-impl", + "polkavm-derive-impl 0.18.1", + "syn 2.0.101", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36837f6b7edfd6f4498f8d25d81da16cf03bd6992c3e56f3d477dfc90f4fefca" +dependencies = [ + "polkavm-derive-impl 0.21.0", "syn 2.0.101", ] @@ -10199,7 +11503,23 @@ dependencies = [ "hashbrown 0.14.5", "log", "object 0.36.7", - "polkavm-common", + "polkavm-common 0.18.0", + "regalloc2 0.9.3", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linker" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bc764986c4a63f9ab9890c3f4eb9b4c13b6ff80d79685bd48ade147234aab4" +dependencies = [ + "dirs", + "gimli 0.31.1", + "hashbrown 0.14.5", + "log", + "object 0.36.7", + "polkavm-common 0.21.0", "regalloc2 0.9.3", "rustc-demangle", ] @@ -10210,6 +11530,12 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23eff02c070c70f31878a3d915e88a914ecf3e153741e2fb572dde28cce20fde" +[[package]] +name = "polkavm-linux-raw" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" + [[package]] name = "polling" version = "2.8.0" @@ -10228,15 +11554,15 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.4" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi 0.5.1", "pin-project-lite", - "rustix 0.38.44", + "rustix 1.0.7", "tracing", "windows-sys 0.59.0", ] @@ -10358,6 +11684,17 @@ dependencies = [ "elliptic-curve", ] +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec 0.6.0", + "uint 0.9.5", +] + [[package]] name = "primitive-types" version = "0.13.1" @@ -10365,8 +11702,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.7.1", "impl-num-traits", + "impl-rlp", "impl-serde 0.5.0", "scale-info", "uint 0.10.0", @@ -10516,6 +11854,8 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ + "bit-set", + "bit-vec", "bitflags 2.9.1", "lazy_static", "num-traits", @@ -10523,6 +11863,8 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", "unarray", ] @@ -10631,6 +11973,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quick-protobuf" version = "0.8.1" @@ -10667,7 +12015,7 @@ dependencies = [ "quinn-udp", "rustc-hash 2.1.1", "rustls", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -10704,9 +12052,9 @@ dependencies = [ "cfg_aliases 0.2.1", "libc", "once_cell", - "socket2 0.5.9", + "socket2 0.5.10", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -10739,6 +12087,7 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] @@ -11060,6 +12409,26 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rlp" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa24e92bb2a83198bb76d661a71df9f7076b8c420b8696e4d3d97d50d94479e3" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -11073,7 +12442,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "binary-merkle-tree", "bitvec", @@ -11171,7 +12540,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "polkadot-primitives", @@ -11229,6 +12598,39 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ruint" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types 0.12.2", + "proptest", + "rand 0.8.5", + "rand 0.9.1", + "rlp 0.5.2", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rustc-demangle" version = "0.1.24" @@ -11253,6 +12655,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.1" @@ -11309,7 +12720,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11322,7 +12733,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11368,7 +12779,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19787cda76408ec5404443dc8b31795c87cd8fec49762dc75fa727740d34acc1" dependencies = [ - "core-foundation 0.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "jni", "log", @@ -11380,7 +12791,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11412,9 +12823,21 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] [[package]] name = "ruzstd" @@ -11484,7 +12907,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "sp-core", @@ -11495,7 +12918,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -11523,7 +12946,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "log", @@ -11544,7 +12967,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "sp-api", @@ -11559,7 +12982,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "docify", @@ -11585,7 +13008,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -11596,7 +13019,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "chrono", @@ -11638,7 +13061,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fnv", "futures", @@ -11664,7 +13087,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "hash-db", "kvdb", @@ -11690,7 +13113,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -11713,7 +13136,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -11742,7 +13165,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "fork-tree", @@ -11778,7 +13201,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "jsonrpsee", @@ -11800,7 +13223,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -11834,7 +13257,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "jsonrpsee", @@ -11854,7 +13277,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "fork-tree", "parity-scale-codec", @@ -11867,7 +13290,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "ahash", "array-bytes", @@ -11911,7 +13334,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "finality-grandpa", "futures", @@ -11931,7 +13354,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "assert_matches", "async-trait", @@ -11966,7 +13389,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -11989,7 +13412,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -12012,9 +13435,9 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ - "polkavm", + "polkavm 0.18.0", "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", @@ -12025,10 +13448,10 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", - "polkavm", + "polkavm 0.18.0", "sc-executor-common", "sp-wasm-interface", ] @@ -12036,7 +13459,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "anyhow", "log", @@ -12052,7 +13475,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "console", "futures", @@ -12068,7 +13491,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "parking_lot 0.12.3", @@ -12082,7 +13505,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "arrayvec 0.7.6", @@ -12110,7 +13533,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.49.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12160,7 +13583,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -12170,7 +13593,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "ahash", "futures", @@ -12189,7 +13612,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12210,7 +13633,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12245,7 +13668,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "futures", @@ -12264,7 +13687,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.15.3" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bs58", "bytes", @@ -12283,7 +13706,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bytes", "fnv", @@ -12317,7 +13740,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12326,7 +13749,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "jsonrpsee", @@ -12358,7 +13781,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12378,7 +13801,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -12402,7 +13825,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.49.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "futures", @@ -12434,7 +13857,7 @@ dependencies = [ [[package]] name = "sc-runtime-utilities" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "sc-executor", @@ -12449,7 +13872,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "directories", @@ -12513,7 +13936,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "parity-scale-codec", @@ -12524,7 +13947,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.24.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "clap", "fs4", @@ -12537,7 +13960,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12556,7 +13979,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "derive_more 0.99.20", "futures", @@ -12576,7 +13999,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "28.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "chrono", "futures", @@ -12595,7 +14018,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "chrono", "console", @@ -12623,7 +14046,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -12634,7 +14057,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -12666,7 +14089,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -12683,7 +14106,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "18.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-channel 1.9.0", "futures", @@ -12727,7 +14150,7 @@ checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" dependencies = [ "derive_more 1.0.0", "parity-scale-codec", - "primitive-types", + "primitive-types 0.13.1", "scale-bits", "scale-decode-derive", "scale-type-resolver", @@ -12754,7 +14177,7 @@ checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" dependencies = [ "derive_more 1.0.0", "parity-scale-codec", - "primitive-types", + "primitive-types 0.13.1", "scale-bits", "scale-encode-derive", "scale-type-resolver", @@ -12898,6 +14321,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -13027,7 +14456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ "bitflags 2.9.1", - "core-foundation 0.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -13049,7 +14478,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.3", ] [[package]] @@ -13067,6 +14505,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + [[package]] name = "serde" version = "1.0.219" @@ -13076,6 +14523,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.17" @@ -13208,6 +14664,16 @@ dependencies = [ "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -13300,7 +14766,7 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "enumn", "parity-scale-codec", @@ -13349,10 +14815,10 @@ dependencies = [ "async-channel 2.3.1", "async-executor", "async-fs 2.1.2", - "async-io 2.4.0", + "async-io 2.4.1", "async-lock 3.4.0", "async-net 2.0.0", - "async-process 2.3.0", + "async-process 2.3.1", "blocking", "futures-lite 2.6.0", ] @@ -13523,41 +14989,237 @@ dependencies = [ "hex", "itertools 0.13.0", "log", - "lru 0.12.5", - "parking_lot 0.12.3", - "pin-project", - "rand 0.8.5", - "rand_chacha 0.3.1", - "serde", - "serde_json", - "siphasher 1.0.1", - "slab", - "smol 2.0.2", - "smoldot 0.18.0", - "zeroize", + "lru 0.12.5", + "parking_lot 0.12.3", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher 1.0.1", + "slab", + "smol 2.0.2", + "smoldot 0.18.0", + "zeroize", +] + +[[package]] +name = "snap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" + +[[package]] +name = "snow" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +dependencies = [ + "aes-gcm", + "blake2 0.10.6", + "chacha20poly1305", + "curve25519-dalek", + "rand_core 0.6.4", + "ring 0.17.14", + "rustc_version 0.4.1", + "sha2 0.10.9", + "subtle 2.6.1", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.13.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "byte-slice-cast", + "frame-support", + "hex", + "parity-scale-codec", + "rlp 0.6.1", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "ssz_rs", + "ssz_rs_derive", +] + +[[package]] +name = "snowbridge-core" +version = "0.13.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "bp-relayers", + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.12.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp 0.6.1", + "scale-info", + "serde", + "serde-big-array", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "snowbridge-inbound-queue-primitives" +version = "0.2.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "alloy-core", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-verification-primitives", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-primitives" +version = "0.2.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "alloy-core", + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "snowbridge-core", + "snowbridge-verification-primitives", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-pallet-system-frontend" +version = "0.2.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-xcm", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-executor", + "tracing", ] [[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" +name = "snowbridge-runtime-common" +version = "0.13.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-xcm", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-primitives", + "sp-arithmetic", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] [[package]] -name = "snow" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +name = "snowbridge-verification-primitives" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ - "aes-gcm", - "blake2 0.10.6", - "chacha20poly1305", - "curve25519-dalek", - "rand_core 0.6.4", - "ring 0.17.14", - "rustc_version", - "sha2 0.10.9", - "subtle 2.6.1", + "frame-support", + "parity-scale-codec", + "scale-info", + "snowbridge-beacon-primitives", + "sp-core", + "sp-std", ] [[package]] @@ -13572,9 +15234,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -13614,7 +15276,7 @@ dependencies = [ [[package]] name = "sp-api" version = "36.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "hash-db", @@ -13635,8 +15297,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "22.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "Inflector", "blake2 0.10.6", @@ -13650,7 +15312,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -13662,7 +15324,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "integer-sqrt", @@ -13676,7 +15338,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -13688,7 +15350,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-api", "sp-inherents", @@ -13698,7 +15360,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "futures", "parity-scale-codec", @@ -13717,7 +15379,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "futures", @@ -13731,7 +15393,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "parity-scale-codec", @@ -13747,7 +15409,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "parity-scale-codec", @@ -13765,7 +15427,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "24.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -13785,7 +15447,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "23.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "finality-grandpa", "log", @@ -13802,7 +15464,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -13813,7 +15475,7 @@ dependencies = [ [[package]] name = "sp-core" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "ark-vrf", "array-bytes", @@ -13836,7 +15498,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types", + "primitive-types 0.13.1", "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", @@ -13874,7 +15536,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "blake2b_simd", "byteorder", @@ -13887,7 +15549,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2503)", @@ -13897,7 +15559,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -13906,7 +15568,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "proc-macro2", "quote", @@ -13916,7 +15578,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "environmental", "parity-scale-codec", @@ -13926,7 +15588,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -13938,7 +15600,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -13951,7 +15613,7 @@ dependencies = [ [[package]] name = "sp-io" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bytes", "docify", @@ -13959,7 +15621,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive", + "polkavm-derive 0.18.0", "rustversion", "secp256k1 0.28.2", "sp-core", @@ -13977,7 +15639,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-core", "sp-runtime", @@ -13987,7 +15649,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -13998,7 +15660,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", @@ -14007,7 +15669,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-metadata 20.0.0", "parity-scale-codec", @@ -14017,7 +15679,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.14.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -14028,7 +15690,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "log", "parity-scale-codec", @@ -14044,8 +15706,8 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "36.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -14058,7 +15720,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-api", "sp-core", @@ -14068,7 +15730,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "backtrace", "regex", @@ -14077,7 +15739,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -14087,7 +15749,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "binary-merkle-tree", "docify", @@ -14116,13 +15778,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "29.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive", - "primitive-types", + "polkavm-derive 0.18.0", + "primitive-types 0.13.1", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", @@ -14135,7 +15797,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "Inflector", "expander", @@ -14148,7 +15810,7 @@ dependencies = [ [[package]] name = "sp-session" version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "scale-info", @@ -14162,7 +15824,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -14175,7 +15837,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "hash-db", "log", @@ -14195,7 +15857,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -14219,12 +15881,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" [[package]] name = "sp-storage" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -14236,7 +15898,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "parity-scale-codec", @@ -14248,7 +15910,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "tracing", @@ -14259,7 +15921,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "sp-api", "sp-runtime", @@ -14268,7 +15930,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "async-trait", "parity-scale-codec", @@ -14282,7 +15944,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "ahash", "hash-db", @@ -14304,7 +15966,7 @@ dependencies = [ [[package]] name = "sp-version" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -14321,7 +15983,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -14333,7 +15995,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "21.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -14345,7 +16007,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "31.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -14402,6 +16064,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -14411,7 +16096,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-parachain-info" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -14423,8 +16108,8 @@ dependencies = [ [[package]] name = "staging-xcm" -version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "16.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "bounded-collections", @@ -14444,8 +16129,8 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "20.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "environmental", "frame-support", @@ -14468,8 +16153,8 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "19.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "19.1.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "environmental", "frame-benchmarking", @@ -14494,15 +16179,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "static_init" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" dependencies = [ "bitflags 1.3.2", - "cfg_aliases 0.1.1", + "cfg_aliases 0.2.1", "libc", - "parking_lot 0.11.2", - "parking_lot_core 0.8.6", + "parking_lot 0.12.3", + "parking_lot_core 0.9.10", "static_init_macro", "winapi", ] @@ -14580,7 +16265,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -14589,15 +16274,28 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" +dependencies = [ + "byteorder", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", +] + [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" [[package]] name = "substrate-frame-rpc-system" version = "43.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "docify", "frame-system-rpc-runtime-api", @@ -14617,7 +16315,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -14631,7 +16329,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -14648,7 +16346,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "26.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "array-bytes", "build-helper", @@ -14660,7 +16358,7 @@ dependencies = [ "merkleized-metadata", "parity-scale-codec", "parity-wasm", - "polkavm-linker", + "polkavm-linker 0.18.0", "sc-executor", "shlex", "sp-core", @@ -14709,7 +16407,7 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "polkadot-sdk", - "primitive-types", + "primitive-types 0.13.1", "scale-bits", "scale-decode 0.14.0", "scale-encode", @@ -14763,7 +16461,7 @@ dependencies = [ "keccak-hash", "parity-scale-codec", "polkadot-sdk", - "primitive-types", + "primitive-types 0.13.1", "scale-bits", "scale-decode 0.14.0", "scale-encode", @@ -14884,6 +16582,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4560533fbd6914b94a8fb5cc803ed6801c3455668db3b810702c57612bac9412" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -14940,6 +16650,12 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + [[package]] name = "tap" version = "1.0.1" @@ -14962,7 +16678,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix 1.0.7", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -14990,6 +16706,21 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" +[[package]] +name = "testnet-parachains-constants" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "polkadot-core-primitives", + "rococo-runtime-constants", + "smallvec", + "sp-runtime", + "staging-xcm", + "westend-runtime-constants", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -15163,9 +16894,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.0" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", @@ -15174,7 +16905,7 @@ dependencies = [ "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.9", + "socket2 0.5.10", "tokio-macros", "windows-sys 0.52.0", ] @@ -15381,7 +17112,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "coarsetime", "polkadot-primitives", @@ -15392,7 +17123,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "expander", "proc-macro-crate 3.3.0", @@ -15673,11 +17404,14 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ + "getrandom 0.3.3", + "js-sys", "serde", + "wasm-bindgen", ] [[package]] @@ -15772,6 +17506,15 @@ dependencies = [ "w3f-plonk-common", ] +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + [[package]] name = "waker-fn" version = "1.2.0" @@ -16285,10 +18028,29 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "westend-emulated-chain" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "emulated-integration-tests-common", + "pallet-staking", + "parachains-common", + "polkadot-primitives", + "sc-consensus-grandpa", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "westend-runtime", + "westend-runtime-constants", +] + [[package]] name = "westend-runtime" -version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "22.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "binary-merkle-tree", "bitvec", @@ -16397,7 +18159,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "polkadot-primitives", @@ -16410,6 +18172,16 @@ dependencies = [ "staging-xcm-builder", ] +[[package]] +name = "westend-system-emulated-network" +version = "0.0.0" +dependencies = [ + "asset-hub-westend-emulated-chain", + "emulated-integration-tests-common", + "frequency-emulated-chain", + "westend-emulated-chain", +] + [[package]] name = "wide" version = "0.7.32" @@ -16448,7 +18220,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -16467,6 +18239,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + [[package]] name = "windows-core" version = "0.53.0" @@ -16490,6 +18284,17 @@ dependencies = [ "windows-strings", ] +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.60.0" @@ -16518,6 +18323,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link", +] + [[package]] name = "windows-result" version = "0.1.2" @@ -16643,6 +18458,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -16912,10 +18736,44 @@ dependencies = [ "time", ] +[[package]] +name = "xcm-emulator" +version = "0.19.3" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "array-bytes", + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-balances", + "pallet-message-queue", + "pallet-timestamp", + "parachains-common", + "parity-scale-codec", + "paste", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-arithmetic", + "sp-core", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2503)", + "sp-io", + "sp-runtime", + "sp-tracing", + "staging-xcm", + "staging-xcm-executor", + "xcm-simulator", +] + [[package]] name = "xcm-procedural" version = "11.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "Inflector", "proc-macro2", @@ -16925,8 +18783,8 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#a25aa7070f077ad08a4f1c9e4381434b58cb69d9" +version = "0.7.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" dependencies = [ "frame-support", "parity-scale-codec", @@ -16937,6 +18795,27 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "xcm-simulator" +version = "20.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2503#f4dba53bfac614b054735aa725d2b0c44efda414" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "paste", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "scale-info", + "sp-io", + "sp-runtime", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + [[package]] name = "xml-rs" version = "0.8.26" diff --git a/Cargo.toml b/Cargo.toml index a2a80f96ae..ac892fd1e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,9 @@ members = [ "node", "node/cli", + "emulated-test/networks/westend", + "emulated-test/chains/frequency-westend", + "emulated-test/test/frequency-westend", "node/service", "pallets/*", "runtime/*", @@ -125,6 +128,24 @@ xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", branch cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false } + +# xcm-test emulator +xcm-emulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false } +tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false } +tracing-subscriber = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503", default-features = false } + +emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +asset-hub-westend-emulated-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +westend-emulated-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } +asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2503" } + # client derive_more = "0.99.17" futures = "0.3.25" diff --git a/emulated-test/chains/frequency-westend/Cargo.toml b/emulated-test/chains/frequency-westend/Cargo.toml new file mode 100644 index 0000000000..26b640d5ed --- /dev/null +++ b/emulated-test/chains/frequency-westend/Cargo.toml @@ -0,0 +1,23 @@ +[package] +authors = ["Frequency"] +edition = '2021' +homepage = "https://frequency.xyz" +license = "Apache-2.0" +name = 'frequency-emulated-chain' +publish = false +version = "0.0.0" + +[dependencies] +xcm-emulator = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +parachains-common = { workspace = true } +polkadot-primitives = { workspace = true } + +emulated-integration-tests-common = { workspace = true } +frequency-runtime = { path = "../../../runtime/frequency", features = ["frequency-westend", "frequency-bridging"] } +cumulus-primitives-core = { workspace = true } +sp-keyring = { workspace = true } +frame-support = { workspace = true } +staging-xcm = { workspace = true } + diff --git a/emulated-test/chains/frequency-westend/src/genesis.rs b/emulated-test/chains/frequency-westend/src/genesis.rs new file mode 100644 index 0000000000..a929fe8cd5 --- /dev/null +++ b/emulated-test/chains/frequency-westend/src/genesis.rs @@ -0,0 +1,68 @@ +use frame_support::parameter_types; +use sp_core::storage::Storage; +use sp_keyring::Sr25519Keyring as Keyring; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, +}; +use parachains_common::{AccountId, Balance}; +// use frequency_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub}; + +pub const PARA_ID: u32 = 2000; +pub const ED: Balance = frequency_runtime::EXISTENTIAL_DEPOSIT; + +parameter_types! { + pub FrequencySudoAccount: AccountId = Keyring::Alice.to_account_id(); + pub FrequencyAssetOwner: AccountId = FrequencySudoAccount::get(); +} + +pub fn genesis(para_id: u32) -> Storage { + let genesis_config = frequency_runtime::RuntimeGenesisConfig { + system: frequency_runtime::SystemConfig::default(), + balances: frequency_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + ..Default::default() + }, + parachain_info: frequency_runtime::ParachainInfoConfig { + parachain_id: para_id.into(), + ..Default::default() + }, + collator_selection: frequency_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: frequency_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + frequency_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + ..Default::default() + }, + // polkadot_xcm: frequency_runtime::PolkadotXcmConfig { + // safe_xcm_version: Some(SAFE_XCM_VERSION), + // ..Default::default() + // }, + sudo: frequency_runtime::SudoConfig { key: Some(FrequencySudoAccount::get()) }, + // foreign_assets: frequency_runtime::ForeignAssetsConfig { + // assets: vec![ + // // Relay Native asset representation + // (RelayLocation::get(), FrequencyAssetOwner::get(), true, ED), + // ], + // ..Default::default() + // }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + frequency_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), + ) +} diff --git a/emulated-test/chains/frequency-westend/src/lib.rs b/emulated-test/chains/frequency-westend/src/lib.rs new file mode 100644 index 0000000000..8bfcd58110 --- /dev/null +++ b/emulated-test/chains/frequency-westend/src/lib.rs @@ -0,0 +1,37 @@ +pub use frequency_runtime::{self, xcm_config::RelayNetwork as FrequencyRelayNetworkId}; + +mod genesis; +pub use genesis::{genesis, FrequencySudoAccount, ED, PARA_ID}; + +use frame_support::traits::OnInitialize; + +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +decl_test_parachains! { + pub struct FrequencyWestend { + genesis = genesis(PARA_ID), + on_init = { + frequency_runtime::AuraExt::on_initialize(1); + }, + runtime = frequency_runtime, + core = { + XcmpMessageHandler: frequency_runtime::XcmpQueue, + LocationToAccountId: frequency_runtime::xcm_config::LocationToAccountId, + ParachainInfo: frequency_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: frequency_runtime::PolkadotXcm, + ForeignAssets: frequency_runtime::ForeignAssets, + Balances: frequency_runtime::Balances, + } + }, +} + +impl_accounts_helpers_for_parachain!(FrequencyWestend); +impl_assert_events_helpers_for_parachain!(FrequencyWestend); +impl_xcm_helpers_for_parachain!(FrequencyWestend); +// impl_foreign_assets_helpers_for_parachain!(FrequencyWestend, staging_xcm::latest::Location); diff --git a/emulated-test/networks/westend/Cargo.toml b/emulated-test/networks/westend/Cargo.toml new file mode 100644 index 0000000000..0007f704e0 --- /dev/null +++ b/emulated-test/networks/westend/Cargo.toml @@ -0,0 +1,14 @@ +[package] +authors = ["Frequency"] +edition = '2021' +homepage = "https://frequency.xyz" +license = "Apache-2.0" +name = 'westend-system-emulated-network' +publish = false +version = "0.0.0" + +[dependencies] +asset-hub-westend-emulated-chain = { workspace = true } +emulated-integration-tests-common = { workspace = true } +frequency-emulated-chain = { path = "../../chains/frequency-westend"} +westend-emulated-chain = { workspace = true } diff --git a/emulated-test/networks/westend/src/lib.rs b/emulated-test/networks/westend/src/lib.rs new file mode 100644 index 0000000000..45a83a2fcc --- /dev/null +++ b/emulated-test/networks/westend/src/lib.rs @@ -0,0 +1,30 @@ +pub use asset_hub_westend_emulated_chain; +pub use frequency_emulated_chain; +pub use westend_emulated_chain; + +pub use asset_hub_westend_emulated_chain::AssetHubWestend; +use frequency_emulated_chain::FrequencyWestend; +use westend_emulated_chain::Westend; + +// Cumulus +use emulated_integration_tests_common::{ + accounts::{ALICE, BOB}, + xcm_emulator::{decl_test_networks, decl_test_sender_receiver_accounts_parameter_types}, +}; + +decl_test_networks! { + pub struct WestendMockNet { + relay_chain = Westend, + parachains = vec![ + AssetHubWestend, + FrequencyWestend, + ], + bridge = () + }, +} + +decl_test_sender_receiver_accounts_parameter_types! { + WestendRelay { sender: ALICE, receiver: BOB }, + AssetHubWestendPara { sender: ALICE, receiver: BOB }, + FrequencyWestendPara { sender: ALICE, receiver: BOB } +} diff --git a/emulated-test/test/frequency-westend/.cargo/config.toml b/emulated-test/test/frequency-westend/.cargo/config.toml new file mode 100644 index 0000000000..6cc1b4ec44 --- /dev/null +++ b/emulated-test/test/frequency-westend/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target-dir = "target/tests" \ No newline at end of file diff --git a/emulated-test/test/frequency-westend/Cargo.toml b/emulated-test/test/frequency-westend/Cargo.toml new file mode 100644 index 0000000000..ae7aa5c13e --- /dev/null +++ b/emulated-test/test/frequency-westend/Cargo.toml @@ -0,0 +1,26 @@ +[package] +authors = ["Frequency"] +edition = '2021' +homepage = "https://frequency.xyz" +license = "Apache-2.0" +name = "frequency-westend-integration-tests" +publish = false +version = "0.0.0" + + +[dependencies] +# codec = { workspace = true } +asset-test-utils = { workspace = true } +emulated-integration-tests-common = { workspace = true } +frame-support = { workspace = true } +pallet-balances = { workspace = true } +pallet-message-queue = { workspace = true } +pallet-xcm = { workspace = true } +parachains-common = { workspace = true, default-features = true } +sp-runtime = { workspace = true } +westend-runtime = { workspace = true } +westend-system-emulated-network = { path = "../../networks/westend"} +xcm-executor = { workspace = true } +staging-xcm = { workspace = true } +pallet-assets = { workspace = true } +sp-io = { workspace = true } \ No newline at end of file diff --git a/emulated-test/test/frequency-westend/src/lib.rs b/emulated-test/test/frequency-westend/src/lib.rs new file mode 100644 index 0000000000..74aced259d --- /dev/null +++ b/emulated-test/test/frequency-westend/src/lib.rs @@ -0,0 +1,55 @@ +#[cfg(test)] +mod imports { + pub use frame_support::{ + assert_ok, + sp_runtime::DispatchResult, + traits::fungible::Inspect, + traits::fungibles::{ + Create as FungiblesCreate, Inspect as FungiblesInspect, Mutate as FungiblesMutate, + }, + }; + + // Polkadot + pub use staging_xcm::{latest::WESTEND_GENESIS_HASH, prelude::*}; + + // Cumulus + pub use asset_test_utils::xcm_helpers; + pub use emulated_integration_tests_common::xcm_emulator::{ + assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, + TestContext, TestExt, + }; + pub use parachains_common::Balance; + pub use westend_system_emulated_network::{ + self, + asset_hub_westend_emulated_chain::{ + asset_hub_westend_runtime::{ + xcm_config::WestendLocation, ExistentialDeposit as AssetHubExistentialDeposit, + }, + AssetHubWestendParaPallet as AssetHubWestendPallet, + }, + frequency_emulated_chain::{ + frequency_runtime::{ + self, xcm_config::XcmConfig as FrequencyWestendXcmConfig, + ExistentialDeposit as FrequencyExistentialDeposit, + }, + FrequencyWestendParaPallet as FrequencyWestendPallet, + }, + westend_emulated_chain::{ + genesis::ED as WESTEND_ED, westend_runtime::xcm_config::XcmConfig as WestendXcmConfig, + WestendRelayPallet as WestendPallet, + }, + AssetHubWestendPara as AssetHubWestend, + AssetHubWestendParaReceiver as AssetHubWestendReceiver, + AssetHubWestendParaSender as AssetHubWestendSender, + FrequencyWestendPara as FrequencyWestend, + FrequencyWestendParaReceiver as FrequencyWestendReceiver, + FrequencyWestendParaSender as FrequencyWestendSender, WestendRelay as Westend, + WestendRelayReceiver as WestendReceiver, WestendRelaySender as WestendSender, + }; + + pub type AssetHubToFrequencyTest = Test; + pub type FrequencyToAssetHubTest = Test; +} + +#[cfg(test)] +mod tests; diff --git a/emulated-test/test/frequency-westend/src/tests/mod.rs b/emulated-test/test/frequency-westend/src/tests/mod.rs new file mode 100644 index 0000000000..320c9f5c22 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/mod.rs @@ -0,0 +1,23 @@ +// mod teleport; + +mod reserve_transfer_dot_from_asset_hub_to_frequency; +mod reserve_transfer_dot_from_frequency_to_asset_hub; + +#[macro_export] +macro_rules! foreign_balance_on { + ( $chain:ident, $id:expr, $who:expr ) => { + emulated_integration_tests_common::impls::paste::paste! { + <$chain>::execute_with(|| { + type ForeignAssets = <$chain as [<$chain Pallet>]>::ForeignAssets; + >::balance($id, $who) + }) + } + }; +} + +// fn foreign_balance_on_frequency_westend(id: v5::Location, who: &AccountId) -> u128 { +// FrequencyWestend::execute_with(|| { +// type ForeignAssets = ::ForeignAssets; +// >::balance($id, $who) +// }) +// } diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs new file mode 100644 index 0000000000..da7cfc1888 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs @@ -0,0 +1,170 @@ +use crate::foreign_balance_on; +use crate::imports::*; + +fn system_para_to_para_reserve_transfer_assets(t: AssetHubToFrequencyTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +pub fn system_para_to_para_receiver_assertions(t: AssetHubToFrequencyTest) { + type RuntimeEvent = ::RuntimeEvent; + + FrequencyWestend::assert_xcmp_queue_success(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0.try_into().unwrap(); + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } +} + +pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { + use pallet_assets::Event as AssetsEvent; + use pallet_assets::Event as ForeignAssetsEvent; + use pallet_balances::Event as BalancesEvent; + use pallet_xcm::Event as XcmEvent; + use AssetId as AID; + + type RuntimeEvent = ::RuntimeEvent; + + AssetHubWestend::assert_xcm_pallet_attempted_complete(None); + + let sov_acc_of_dest = AssetHubWestend::sovereign_account_id_of(t.args.dest.clone()); + + for asset in t.args.assets.into_inner() { + let expected_id = asset.id.0.clone().try_into().unwrap(); + let asset_amount = match asset.fun { + Fungible(amount) => amount, + _ => panic!("Non-fungible assets are not supported in this test."), + }; + + match asset.id.0.unpack() { + // Native asset (e.g., DOT) + (1, []) => { + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::Balances(BalancesEvent::Transfer { from, to, amount }) => { + from: *from == t.sender.account_id, + to: *to == sov_acc_of_dest, + amount: *amount == asset_amount, + }, + ] + ); + }, + + // Foreign asset from pallet-foreign-assets + _ => { + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::ForeignAssets(ForeignAssetsEvent::Transferred { asset_id, from, to, amount }) => { + asset_id: *asset_id == expected_id, + from: *from == t.sender.account_id, + to: *to == sov_acc_of_dest, + amount: *amount == asset_amount, + }, + ] + ); + }, + } + } + + // Assert delivery fees were paid + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::PolkadotXcm(XcmEvent::FeesPaid { .. }) => {}, + ] + ); + + AssetHubWestend::assert_xcm_pallet_sent(); +} + +fn setup_foreign_asset_on_frequency() { + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::create( + Parent.into(), + FrequencyWestendSender::get(), + false, + 1u32.into(), + ); + assert!(>::asset_exists(Parent.into())); + }); +} + +// ========================================================================= +// ======= Reserve Transfers - WSND Native Asset - AssetHub<>Frequency========== +// ========================================================================= +/// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work +// RUST_BACKTRACE=1 RUST_LOG="runtime::system=trace,xcm=trace" cargo test tests::reserve::reserve_transfer_native_asset_from_asset_hub_to_para -p frequency-westend-integration-tests -- --nocapture +#[test] +fn reserve_transfer_dot_from_asset_hub_to_frequency() { + setup_foreign_asset_on_frequency(); + + let destination = AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + let sender = AssetHubWestendSender::get(); + let amount_to_send: Balance = AssetHubExistentialDeposit::get() * 2000; + let assets: Assets = (Parent, amount_to_send).into(); + + // Init values for Parachain + let system_para_native_asset_location = WestendLocation::get(); + let receiver = FrequencyWestendReceiver::get(); + + let test_args = TestContext { + sender, + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_to_send, + assets.clone(), + None, + 0, + ), + }; + let mut test = AssetHubToFrequencyTest::new(test_args); + + // Query initial balances + let sender_balance_before = test.sender.balance; + + let receiver_assets_before = + foreign_balance_on!(FrequencyWestend, system_para_native_asset_location.clone(), &receiver); + + assert!(receiver_assets_before == 0u128); + + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(system_para_to_para_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + + let receiver_assets_after = + foreign_balance_on!(FrequencyWestend, system_para_native_asset_location.clone(), &receiver); + + assert!( + sender_balance_after < sender_balance_before - amount_to_send, + "Sender's balance was NOT reduced by amount sent plus delivery fees" + ); + + assert!(receiver_assets_after > receiver_assets_before, "Receiver's assets did NOT increased"); + + // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); +} diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs new file mode 100644 index 0000000000..664be282e1 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs @@ -0,0 +1,204 @@ +use crate::foreign_balance_on; +use crate::imports::*; + +fn frequency_to_asset_hub_reserve_transfer_assets(t: FrequencyToAssetHubTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +pub fn frequency_to_asset_hub_sender_assertions(t: FrequencyToAssetHubTest) { + type RuntimeEvent = ::RuntimeEvent; + FrequencyWestend::assert_xcm_pallet_attempted_complete(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.clone().id.0; + let asset_amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance } + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.sender.account_id, + balance: *balance == asset_amount, + }, + ] + ); + } +} + +pub fn frequency_to_asset_hub_receiver_assertions(t: FrequencyToAssetHubTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubWestend::assert_xcmp_queue_success(None); + + let sov_acc_of_frequency = AssetHubWestend::sovereign_account_id_of(t.args.dest.clone()); + for (idx, asset) in t.args.assets.into_inner().into_iter().enumerate() { + let expected_id = asset.id.0.clone().try_into().unwrap(); + let asset_amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + if idx == t.args.fee_asset_item as usize { + assert_expected_events!( + AssetHubWestend, + vec![ + // Amount of native is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_acc_of_frequency.clone().into(), + amount: *amount == asset_amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); + } else { + assert_expected_events!( + AssetHubWestend, + vec![ + // Amount of foreign asset is transferred from Parachain's Sovereign account + // to Receiver's account + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance }, + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == sov_acc_of_frequency, + balance: *balance == asset_amount, + }, + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount }, + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + amount: *amount == asset_amount, + }, + ] + ); + } + } + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { + // Create and mint DOT-derived asset on Frequency + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + let sender = FrequencyWestendSender::get(); + + let _ = >::create( + Parent.into(), + sender.clone(), + false, + 1u32.into(), + ); + + let _ = >::mint_into( + Parent.into(), + &sender.clone(), + amount_to_send * 2, + ); + + assert!(>::asset_exists(Parent.into())); + }); + + // Fund Frequency sovereign account on AssetHub + let frequency_location_as_seen_by_ahr = + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + let sov_frequency_on_ahr = + AssetHubWestend::sovereign_account_id_of(frequency_location_as_seen_by_ahr); + + AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount_to_send * 2)]); +} + +const DOT_DOLLAR: u128 = 1_000_000_000_000; +const DOT_CENT: u128 = DOT_DOLLAR / 100; + +// ========================================================================= +// ======= Reserve Transfers - WSND Native Asset - Frequency<>AssetHub========== +// ========================================================================= +/// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_frequency_to_asset_hub -p frequency-westend-integration-tests -- --nocapture +#[test] +fn reserve_transfer_dot_from_frequency_to_asset_hub() { + let amount_dot_to_send: Balance = AssetHubExistentialDeposit::get() * 1000; + // assert_eq!(amount_to_send, 10_000 * DOLLAR); + setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_dot_to_send); + + /// 20K dollars + let sender = FrequencyWestendSender::get(); + let receiver = AssetHubWestendReceiver::get(); + let destination = FrequencyWestend::sibling_location_of(AssetHubWestend::para_id()); + let assets: Assets = (Parent, amount_dot_to_send).into(); + let asset_hub_native_asset_location = WestendLocation::get(); + + let sender_dot_assets_before = foreign_balance_on!(FrequencyWestend, Parent.into(), &sender); + + assert_eq!(sender_dot_assets_before, 2_000_000_000_000u128); + + let frequency_sender_native_before = FrequencyWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(&FrequencyWestendSender::get()) + }); + + assert_eq!(frequency_sender_native_before, 4_096_000_000u128); + + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_dot_to_send, + assets.clone(), + None, + 0, + ), + }; + + let mut test = FrequencyToAssetHubTest::new(test_args); + + // Query initial balances + + let receiver_balance_before = test.receiver.balance; + + // Set assertions and dispatchables + test.set_assertion::(frequency_to_asset_hub_sender_assertions); + // test.set_assertion::(frequency_to_asset_hub_receiver_assertions); + test.set_dispatchable::(frequency_to_asset_hub_reserve_transfer_assets); + test.assert(); + + // Query final balances + let sender_dot_assets_after = + foreign_balance_on!(FrequencyWestend, asset_hub_native_asset_location, &sender); + + let receiver_balance_after = test.receiver.balance; + + let frequency_sender_native_after = FrequencyWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(&FrequencyWestendSender::get()) + }); + + println!("--------frequency_sender_native_before: {:?}", frequency_sender_native_before); + println!("---------frequency_sender_native_after: {:?}", frequency_sender_native_after); + + // Sender's balance is reduced by amount sent + assert_eq!(sender_dot_assets_after, sender_dot_assets_before - amount_dot_to_send); + // // Receiver's balance is increased + // assert!(receiver_balance_after > receiver_balance_before); + // // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // // should be non-zero + // assert!(receiver_balance_after < receiver_balance_before + amount_to_send); +} diff --git a/emulated-test/test/frequency-westend/src/tests/teleport.rs b/emulated-test/test/frequency-westend/src/tests/teleport.rs new file mode 100644 index 0000000000..2041a8fd75 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/teleport.rs @@ -0,0 +1,17 @@ +use crate::imports::*; +use emulated_integration_tests_common::{ + test_parachain_is_trusted_teleporter_for_relay, test_parachain_is_trusted_teleporter, test_relay_is_trusted_teleporter, +}; + +#[test] +fn teleport_from_and_to_asset_hub() { + let amount = WESTEND_ED * 100; + let native_asset: Assets = (Here, amount).into(); + + test_parachain_is_trusted_teleporter!( + FrequencyWestend, + FrequencyWestendXcmConfig, + vec![AssetHubWestend], + (native_asset, amount) + ); +} diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index 0f86ca8b0f..36cf675362 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -18,13 +18,13 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { } #[cfg(feature = "frequency-bridging")] -mod xcm_config; +pub mod xcm_config; // use pallet_assets::BenchmarkHelper; #[cfg(feature = "frequency-bridging")] use xcm_config::ForeignAssetsAssetId; #[cfg(feature = "frequency-bridging")] -mod xcm_queue; +pub mod xcm_queue; #[cfg(feature = "frequency-bridging")] pub mod xcm_commons; @@ -1534,7 +1534,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 71, #[cfg(feature = "frequency-bridging")] - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 72, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin } = 72, #[cfg(feature = "frequency-bridging")] CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 73, diff --git a/runtime/frequency/src/xcm_config.rs b/runtime/frequency/src/xcm_config.rs index 164be52a10..b35c2e5366 100644 --- a/runtime/frequency/src/xcm_config.rs +++ b/runtime/frequency/src/xcm_config.rs @@ -11,7 +11,9 @@ use staging_xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, }; -use crate::xcm_commons::{LocationToAccountId, RelayNetwork, XcmOriginToTransactDispatchOrigin}; +pub use crate::xcm_commons::{ + LocationToAccountId, RelayNetwork, XcmOriginToTransactDispatchOrigin, +}; use frame_support::{ pallet_prelude::Get, From 6d5f5a3e0785f0fd7219504d8e106e9e0588d84b Mon Sep 17 00:00:00 2001 From: eNDdy Date: Mon, 12 May 2025 17:36:33 -0600 Subject: [PATCH 2/4] test vs code stuff --- .vscode/launch.json | 27 ++ .vscode/settings.json | 6 +- .../chains/frequency-westend/Cargo.toml | 9 +- .../chains/frequency-westend/src/genesis.rs | 16 +- .../chains/frequency-westend/src/lib.rs | 9 +- emulated-test/networks/westend/Cargo.toml | 4 +- .../test/frequency-westend/.cargo/config.toml | 5 +- .../test/frequency-westend/src/lib.rs | 47 ++- .../test/frequency-westend/src/tests/mod.rs | 17 +- ...=> reserve_transfer_dot_from_asset_hub.rs} | 31 +- .../tests/reserve_transfer_dot_from_relay.rs | 134 +++++++ ...rs => reserve_transfer_dot_to_assethub.rs} | 142 +++----- .../tests/reserve_transfer_dot_to_relay.rs | 154 ++++++++ .../frequency-westend/src/tests/teleport.rs | 17 - ...eleport_xfrqcy_to_assethub_with_dot_fee.rs | 328 ++++++++++++++++++ ...eport_xfrqcy_with_dot_fee_from_assethub.rs | 303 ++++++++++++++++ runtime/frequency/src/lib.rs | 61 ++-- runtime/frequency/src/xcm/asset_transactor.rs | 58 ++++ runtime/frequency/src/xcm/barrier.rs | 38 ++ .../location_converter.rs} | 26 +- runtime/frequency/src/xcm/mod.rs | 30 ++ runtime/frequency/src/xcm/parameters.rs | 42 +++ .../src/{xcm_queue.rs => xcm/queue.rs} | 43 ++- runtime/frequency/src/xcm/reserve.rs | 22 ++ runtime/frequency/src/xcm/teleporter.rs | 27 ++ runtime/frequency/src/xcm/trader.rs | 12 + runtime/frequency/src/xcm/weigher.rs | 14 + runtime/frequency/src/xcm/xcm_config.rs | 116 +++++++ runtime/frequency/src/xcm_config.rs | 238 ------------- 29 files changed, 1520 insertions(+), 456 deletions(-) rename emulated-test/test/frequency-westend/src/tests/{reserve_transfer_dot_from_asset_hub_to_frequency.rs => reserve_transfer_dot_from_asset_hub.rs} (87%) create mode 100644 emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs rename emulated-test/test/frequency-westend/src/tests/{reserve_transfer_dot_from_frequency_to_asset_hub.rs => reserve_transfer_dot_to_assethub.rs} (56%) create mode 100644 emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs delete mode 100644 emulated-test/test/frequency-westend/src/tests/teleport.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs create mode 100644 emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs create mode 100644 runtime/frequency/src/xcm/asset_transactor.rs create mode 100644 runtime/frequency/src/xcm/barrier.rs rename runtime/frequency/src/{xcm_commons.rs => xcm/location_converter.rs} (76%) create mode 100644 runtime/frequency/src/xcm/parameters.rs rename runtime/frequency/src/{xcm_queue.rs => xcm/queue.rs} (61%) create mode 100644 runtime/frequency/src/xcm/reserve.rs create mode 100644 runtime/frequency/src/xcm/teleporter.rs create mode 100644 runtime/frequency/src/xcm/trader.rs create mode 100644 runtime/frequency/src/xcm/weigher.rs create mode 100644 runtime/frequency/src/xcm/xcm_config.rs delete mode 100644 runtime/frequency/src/xcm_config.rs diff --git a/.vscode/launch.json b/.vscode/launch.json index 86546c6b19..b81bafe817 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -49,6 +49,33 @@ "name": "Attach to Frequency", "program": "${workspaceFolder}/target/debug/frequency", }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'Emulated test'", + "cargo": { + "args": [ + "test", + "--no-run", + "--package=frequency-westend-integration-tests" + ], + // "filter": { + // "name": "frequency-westend-integration-tests", + // "kind": "test" + // } + }, + // "program": "${workspaceFolder}/emulated-test/test/frequency-westend/target/tests/debug/deps/frequency_westend_integration_tests-b4edad4aeb26ecb5", + "args": [ + "--", + "--nocapture" + ], + "env": { + "RUST_BACKTRACE": "1", + "RUST_LOG": "events,runtime::system=trace,xcm=trace" + }, + "cwd": "${workspaceFolder}", + "stopOnEntry": true + }, { "type": "lldb", "request": "launch", diff --git a/.vscode/settings.json b/.vscode/settings.json index d3f00d87e7..ac2cbe6712 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,9 +15,11 @@ ], // Set the features to use for cargo commands "rust-analyzer.cargo.features": [ - "runtime-benchmarks", + // "runtime-benchmarks", "frequency-bridging", - "frequency-lint-check" + "frequency-lint-check", + "frequency", + "frequency-westend" ], "lldb.launch.preRunCommands": [ "script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))" diff --git a/emulated-test/chains/frequency-westend/Cargo.toml b/emulated-test/chains/frequency-westend/Cargo.toml index 26b640d5ed..a0f93cda47 100644 --- a/emulated-test/chains/frequency-westend/Cargo.toml +++ b/emulated-test/chains/frequency-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Frequency"] -edition = '2021' +edition = '2021' homepage = "https://frequency.xyz" license = "Apache-2.0" name = 'frequency-emulated-chain' @@ -15,9 +15,12 @@ parachains-common = { workspace = true } polkadot-primitives = { workspace = true } emulated-integration-tests-common = { workspace = true } -frequency-runtime = { path = "../../../runtime/frequency", features = ["frequency-westend", "frequency-bridging"] } +frequency-runtime = { path = "../../../runtime/frequency", features = [ + "frequency-westend", + "frequency-bridging", + "frequency-local", +] } cumulus-primitives-core = { workspace = true } sp-keyring = { workspace = true } frame-support = { workspace = true } staging-xcm = { workspace = true } - diff --git a/emulated-test/chains/frequency-westend/src/genesis.rs b/emulated-test/chains/frequency-westend/src/genesis.rs index a929fe8cd5..9edcd19b5b 100644 --- a/emulated-test/chains/frequency-westend/src/genesis.rs +++ b/emulated-test/chains/frequency-westend/src/genesis.rs @@ -3,11 +3,8 @@ use sp_core::storage::Storage; use sp_keyring::Sr25519Keyring as Keyring; // Cumulus -use emulated_integration_tests_common::{ - accounts, build_genesis_storage, collators, -}; +use emulated_integration_tests_common::{accounts, build_genesis_storage, collators}; use parachains_common::{AccountId, Balance}; -// use frequency_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub}; pub const PARA_ID: u32 = 2000; pub const ED: Balance = frequency_runtime::EXISTENTIAL_DEPOSIT; @@ -46,18 +43,7 @@ pub fn genesis(para_id: u32) -> Storage { .collect(), ..Default::default() }, - // polkadot_xcm: frequency_runtime::PolkadotXcmConfig { - // safe_xcm_version: Some(SAFE_XCM_VERSION), - // ..Default::default() - // }, sudo: frequency_runtime::SudoConfig { key: Some(FrequencySudoAccount::get()) }, - // foreign_assets: frequency_runtime::ForeignAssetsConfig { - // assets: vec![ - // // Relay Native asset representation - // (RelayLocation::get(), FrequencyAssetOwner::get(), true, ED), - // ], - // ..Default::default() - // }, ..Default::default() }; diff --git a/emulated-test/chains/frequency-westend/src/lib.rs b/emulated-test/chains/frequency-westend/src/lib.rs index 8bfcd58110..13f44606b7 100644 --- a/emulated-test/chains/frequency-westend/src/lib.rs +++ b/emulated-test/chains/frequency-westend/src/lib.rs @@ -1,7 +1,7 @@ -pub use frequency_runtime::{self, xcm_config::RelayNetwork as FrequencyRelayNetworkId}; +pub use frequency_runtime::{self, xcm::RelayNetwork as FrequencyRelayNetworkId}; mod genesis; -pub use genesis::{genesis, FrequencySudoAccount, ED, PARA_ID}; +pub use genesis::{genesis, FrequencyAssetOwner, FrequencySudoAccount, ED, PARA_ID}; use frame_support::traits::OnInitialize; @@ -19,7 +19,7 @@ decl_test_parachains! { runtime = frequency_runtime, core = { XcmpMessageHandler: frequency_runtime::XcmpQueue, - LocationToAccountId: frequency_runtime::xcm_config::LocationToAccountId, + LocationToAccountId: frequency_runtime::xcm::LocationToAccountId, ParachainInfo: frequency_runtime::ParachainInfo, MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, @@ -32,6 +32,5 @@ decl_test_parachains! { } impl_accounts_helpers_for_parachain!(FrequencyWestend); -impl_assert_events_helpers_for_parachain!(FrequencyWestend); impl_xcm_helpers_for_parachain!(FrequencyWestend); -// impl_foreign_assets_helpers_for_parachain!(FrequencyWestend, staging_xcm::latest::Location); +impl_assert_events_helpers_for_parachain!(FrequencyWestend); diff --git a/emulated-test/networks/westend/Cargo.toml b/emulated-test/networks/westend/Cargo.toml index 0007f704e0..760173c0b7 100644 --- a/emulated-test/networks/westend/Cargo.toml +++ b/emulated-test/networks/westend/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Frequency"] -edition = '2021' +edition = '2021' homepage = "https://frequency.xyz" license = "Apache-2.0" name = 'westend-system-emulated-network' @@ -10,5 +10,5 @@ version = "0.0.0" [dependencies] asset-hub-westend-emulated-chain = { workspace = true } emulated-integration-tests-common = { workspace = true } -frequency-emulated-chain = { path = "../../chains/frequency-westend"} +frequency-emulated-chain = { path = "../../chains/frequency-westend" } westend-emulated-chain = { workspace = true } diff --git a/emulated-test/test/frequency-westend/.cargo/config.toml b/emulated-test/test/frequency-westend/.cargo/config.toml index 6cc1b4ec44..439b9586f2 100644 --- a/emulated-test/test/frequency-westend/.cargo/config.toml +++ b/emulated-test/test/frequency-westend/.cargo/config.toml @@ -1,2 +1,5 @@ [build] -target-dir = "target/tests" \ No newline at end of file +target-dir = "target/tests" + +[profile.dev] +debug = true diff --git a/emulated-test/test/frequency-westend/src/lib.rs b/emulated-test/test/frequency-westend/src/lib.rs index 74aced259d..d299bb3a91 100644 --- a/emulated-test/test/frequency-westend/src/lib.rs +++ b/emulated-test/test/frequency-westend/src/lib.rs @@ -7,16 +7,23 @@ mod imports { traits::fungibles::{ Create as FungiblesCreate, Inspect as FungiblesInspect, Mutate as FungiblesMutate, }, + BoundedVec, }; // Polkadot - pub use staging_xcm::{latest::WESTEND_GENESIS_HASH, prelude::*}; + pub use staging_xcm::{ + latest::{AssetTransferFilter, ROCOCO_GENESIS_HASH, WESTEND_GENESIS_HASH}, + prelude::{AccountId32 as AccountId32Junction, *}, + }; // Cumulus - pub use asset_test_utils::xcm_helpers; - pub use emulated_integration_tests_common::xcm_emulator::{ - assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, - TestContext, TestExt, + pub use emulated_integration_tests_common::{ + xcm_emulator::{ + assert_expected_events, bx, AccountIdOf, Chain, Parachain as Para, RelayChain as Relay, + Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{fee_asset, non_fee_asset}, + RESERVABLE_ASSET_ID, }; pub use parachains_common::Balance; pub use westend_system_emulated_network::{ @@ -28,16 +35,10 @@ mod imports { AssetHubWestendParaPallet as AssetHubWestendPallet, }, frequency_emulated_chain::{ - frequency_runtime::{ - self, xcm_config::XcmConfig as FrequencyWestendXcmConfig, - ExistentialDeposit as FrequencyExistentialDeposit, - }, - FrequencyWestendParaPallet as FrequencyWestendPallet, - }, - westend_emulated_chain::{ - genesis::ED as WESTEND_ED, westend_runtime::xcm_config::XcmConfig as WestendXcmConfig, - WestendRelayPallet as WestendPallet, + frequency_runtime::ExistentialDeposit as FrequencyExistentialDeposit, + FrequencyAssetOwner, FrequencyWestendParaPallet as FrequencyWestendPallet, }, + westend_emulated_chain::{genesis::ED as WESTEND_ED, WestendRelayPallet as WestendPallet}, AssetHubWestendPara as AssetHubWestend, AssetHubWestendParaReceiver as AssetHubWestendReceiver, AssetHubWestendParaSender as AssetHubWestendSender, @@ -49,6 +50,24 @@ mod imports { pub type AssetHubToFrequencyTest = Test; pub type FrequencyToAssetHubTest = Test; + pub type RelayToFrequencyTest = Test; + pub type FrequencyToRelayTest = Test; + + pub fn frequency_balance_of( + who: &AccountIdOf<::Runtime>, + ) -> Balance { + FrequencyWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(who) + }) + } + + pub fn assethub_balance_of(who: &AccountIdOf<::Runtime>) -> Balance { + AssetHubWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(who) + }) + } } #[cfg(test)] diff --git a/emulated-test/test/frequency-westend/src/tests/mod.rs b/emulated-test/test/frequency-westend/src/tests/mod.rs index 320c9f5c22..577e04dbc3 100644 --- a/emulated-test/test/frequency-westend/src/tests/mod.rs +++ b/emulated-test/test/frequency-westend/src/tests/mod.rs @@ -1,7 +1,13 @@ // mod teleport; -mod reserve_transfer_dot_from_asset_hub_to_frequency; -mod reserve_transfer_dot_from_frequency_to_asset_hub; +mod reserve_transfer_dot_from_asset_hub; +mod reserve_transfer_dot_from_relay; +mod reserve_transfer_dot_to_assethub; +mod reserve_transfer_dot_to_relay; + +mod teleport_xfrqcy_to_assethub_with_dot_fee; + +mod teleport_xfrqcy_with_dot_fee_from_assethub; #[macro_export] macro_rules! foreign_balance_on { @@ -14,10 +20,3 @@ macro_rules! foreign_balance_on { } }; } - -// fn foreign_balance_on_frequency_westend(id: v5::Location, who: &AccountId) -> u128 { -// FrequencyWestend::execute_with(|| { -// type ForeignAssets = ::ForeignAssets; -// >::balance($id, $who) -// }) -// } diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs similarity index 87% rename from emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs rename to emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs index da7cfc1888..b9145c2fd7 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub_to_frequency.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs @@ -31,11 +31,9 @@ pub fn system_para_to_para_receiver_assertions(t: AssetHubToFrequencyTest) { } pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { - use pallet_assets::Event as AssetsEvent; use pallet_assets::Event as ForeignAssetsEvent; use pallet_balances::Event as BalancesEvent; use pallet_xcm::Event as XcmEvent; - use AssetId as AID; type RuntimeEvent = ::RuntimeEvent; @@ -93,15 +91,32 @@ pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { AssetHubWestend::assert_xcm_pallet_sent(); } -fn setup_foreign_asset_on_frequency() { + +fn create_dot_asset_on_frequency() { FrequencyWestend::execute_with(|| { type ForeignAssets = ::ForeignAssets; - >::create( + type RuntimeEvent = ::RuntimeEvent; + let sudo_origin = ::RuntimeOrigin::root(); + + let _ = ForeignAssets::force_create( + sudo_origin, Parent.into(), - FrequencyWestendSender::get(), + FrequencyAssetOwner::get().into(), false, - 1u32.into(), + 1u128.into(), + ); + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::ForceCreated { asset_id, .. } + ) => { + asset_id: *asset_id == Parent.into(), + }, + ] ); + assert!(>::asset_exists(Parent.into())); }); } @@ -110,10 +125,10 @@ fn setup_foreign_asset_on_frequency() { // ======= Reserve Transfers - WSND Native Asset - AssetHub<>Frequency========== // ========================================================================= /// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work -// RUST_BACKTRACE=1 RUST_LOG="runtime::system=trace,xcm=trace" cargo test tests::reserve::reserve_transfer_native_asset_from_asset_hub_to_para -p frequency-westend-integration-tests -- --nocapture +//RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_asset_hub_to_frequency -p frequency-westend-integration-tests -- --nocapture #[test] fn reserve_transfer_dot_from_asset_hub_to_frequency() { - setup_foreign_asset_on_frequency(); + create_dot_asset_on_frequency(); let destination = AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); let sender = AssetHubWestendSender::get(); diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs new file mode 100644 index 0000000000..df7434a691 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs @@ -0,0 +1,134 @@ +use crate::foreign_balance_on; +use crate::imports::*; +use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp; + +fn relay_to_frequency_receiver_assertions(t: RelayToFrequencyTest) { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == WestendLocation::get(), + owner: *owner == t.receiver.account_id, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn relay_to_frequency_reserve_transfer_assets(t: RelayToFrequencyTest) -> DispatchResult { + let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else { + unimplemented!("Destination is not a parachain?") + }; + + Dmp::make_parachain_reachable(para_id); + ::XcmPallet::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn relay_to_frequency_sender_assertions(t: RelayToFrequencyTest) { + type RuntimeEvent = ::RuntimeEvent; + + Westend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(297_174_000, 6_196))); + + assert_expected_events!( + Westend, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == Westend::sovereign_account_id_of( + t.args.dest.clone() + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn create_dot_asset_on_frequency() { + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + let sudo_origin = ::RuntimeOrigin::root(); + + let _ = ForeignAssets::force_create( + sudo_origin, + Parent.into(), + FrequencyAssetOwner::get().into(), + false, + 1u128.into(), + ); + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::ForceCreated { asset_id, .. } + ) => { + asset_id: *asset_id == Parent.into(), + }, + ] + ); + + assert!(>::asset_exists(Parent.into())); + }); +} + +// ========================================================================= +// ========= Reserve Transfers - DOT Asset - Relay<>Frequency =========== +// ========================================================================= +/// Reserve Transfers of DOT from Relay to Parachain should work +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_relay_to_frequency -p frequency-westend-integration-tests -- --nocapture +// transfer_type=DestinationReserve +#[test] +fn reserve_transfer_dot_from_relay_to_frequency() { + create_dot_asset_on_frequency(); + let destination = Westend::child_location_of(FrequencyWestend::para_id()); + let sender = WestendSender::get(); + let amount_to_send: Balance = WESTEND_ED * 1000; + + let relay_native_asset_location = WestendLocation::get(); + let receiver = FrequencyWestendReceiver::get(); + + let test_args = TestContext { + sender, + receiver: receiver.clone(), + args: TestArgs::new_relay(destination.clone(), receiver.clone(), amount_to_send), + }; + + let mut test = RelayToFrequencyTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_assets_before = + foreign_balance_on!(FrequencyWestend, relay_native_asset_location.clone(), &receiver); + + test.set_assertion::(relay_to_frequency_sender_assertions); + test.set_assertion::(relay_to_frequency_receiver_assertions); + test.set_dispatchable::(relay_to_frequency_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_assets_after = + foreign_balance_on!(FrequencyWestend, relay_native_asset_location, &receiver); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // Receiver's asset balance is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); +} diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs similarity index 56% rename from emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs rename to emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs index 664be282e1..3f84244498 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_frequency_to_asset_hub.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs @@ -1,7 +1,7 @@ use crate::foreign_balance_on; use crate::imports::*; -fn frequency_to_asset_hub_reserve_transfer_assets(t: FrequencyToAssetHubTest) -> DispatchResult { +fn dispatch_reserve_transfer_dot(t: FrequencyToAssetHubTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -12,7 +12,7 @@ fn frequency_to_asset_hub_reserve_transfer_assets(t: FrequencyToAssetHubTest) -> ) } -pub fn frequency_to_asset_hub_sender_assertions(t: FrequencyToAssetHubTest) { +pub fn assert_sender_burns_dot_correctly(t: FrequencyToAssetHubTest) { type RuntimeEvent = ::RuntimeEvent; FrequencyWestend::assert_xcm_pallet_attempted_complete(None); for asset in t.args.assets.into_inner().into_iter() { @@ -33,64 +33,54 @@ pub fn frequency_to_asset_hub_sender_assertions(t: FrequencyToAssetHubTest) { } } -pub fn frequency_to_asset_hub_receiver_assertions(t: FrequencyToAssetHubTest) { +fn assert_receiver_receives_dot_correctly(t: FrequencyToAssetHubTest) { type RuntimeEvent = ::RuntimeEvent; + let sov_frequency_on_ahr = AssetHubWestend::sovereign_account_id_of( + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()), + ); AssetHubWestend::assert_xcmp_queue_success(None); - - let sov_acc_of_frequency = AssetHubWestend::sovereign_account_id_of(t.args.dest.clone()); - for (idx, asset) in t.args.assets.into_inner().into_iter().enumerate() { - let expected_id = asset.id.0.clone().try_into().unwrap(); - let asset_amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); - if idx == t.args.fee_asset_item as usize { - assert_expected_events!( - AssetHubWestend, - vec![ - // Amount of native is withdrawn from Parachain's Sovereign account - RuntimeEvent::Balances( - pallet_balances::Event::Burned { who, amount } - ) => { - who: *who == sov_acc_of_frequency.clone().into(), - amount: *amount == asset_amount, - }, - RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { - who: *who == t.receiver.account_id, - }, - ] - ); - } else { - assert_expected_events!( - AssetHubWestend, - vec![ - // Amount of foreign asset is transferred from Parachain's Sovereign account - // to Receiver's account - RuntimeEvent::ForeignAssets( - pallet_assets::Event::Burned { asset_id, owner, balance }, - ) => { - asset_id: *asset_id == expected_id, - owner: *owner == sov_acc_of_frequency, - balance: *balance == asset_amount, - }, - RuntimeEvent::ForeignAssets( - pallet_assets::Event::Issued { asset_id, owner, amount }, - ) => { - asset_id: *asset_id == expected_id, - owner: *owner == t.receiver.account_id, - amount: *amount == asset_amount, - }, - ] - ); - } - } assert_expected_events!( AssetHubWestend, vec![ - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, + // Amount to reserve transfer is burned from Parachain's Sovereign account + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == RESERVABLE_ASSET_ID, + owner: *owner == sov_frequency_on_ahr, + balance: *balance == t.args.amount, + }, + // Fee amount is burned from Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, .. }) => { + who: *who == sov_frequency_on_ahr, + }, + // Amount to reserve transfer is issued for beneficiary + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == RESERVABLE_ASSET_ID, + owner: *owner == t.receiver.account_id, + amount: *amount == t.args.amount, + }, + // Remaining fee amount is minted for for beneficiary + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == t.receiver.account_id, + }, ] ); } +fn build_reserve_transfer_test( + sender: AccountIdOf<::Runtime>, + receiver: AccountIdOf<::Runtime>, + destination: Location, + amount: Balance, + assets: Assets, +) -> FrequencyToAssetHubTest { + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para(destination, receiver.clone(), amount, assets, None, 0), + }; + FrequencyToAssetHubTest::new(test_args) +} + fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { // Create and mint DOT-derived asset on Frequency FrequencyWestend::execute_with(|| { @@ -122,21 +112,16 @@ fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount_to_send * 2)]); } -const DOT_DOLLAR: u128 = 1_000_000_000_000; -const DOT_CENT: u128 = DOT_DOLLAR / 100; - // ========================================================================= // ======= Reserve Transfers - WSND Native Asset - Frequency<>AssetHub========== // ========================================================================= /// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work // RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_frequency_to_asset_hub -p frequency-westend-integration-tests -- --nocapture #[test] -fn reserve_transfer_dot_from_frequency_to_asset_hub() { +fn reserve_transfer_dot_from_frequency_to_assethub() { let amount_dot_to_send: Balance = AssetHubExistentialDeposit::get() * 1000; - // assert_eq!(amount_to_send, 10_000 * DOLLAR); setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_dot_to_send); - /// 20K dollars let sender = FrequencyWestendSender::get(); let receiver = AssetHubWestendReceiver::get(); let destination = FrequencyWestend::sibling_location_of(AssetHubWestend::para_id()); @@ -154,29 +139,22 @@ fn reserve_transfer_dot_from_frequency_to_asset_hub() { assert_eq!(frequency_sender_native_before, 4_096_000_000u128); - let test_args = TestContext { - sender: sender.clone(), - receiver: receiver.clone(), - args: TestArgs::new_para( - destination.clone(), - receiver.clone(), - amount_dot_to_send, - assets.clone(), - None, - 0, - ), - }; - - let mut test = FrequencyToAssetHubTest::new(test_args); + let mut test = build_reserve_transfer_test( + sender.clone(), + receiver.clone(), + destination.clone(), + amount_dot_to_send, + assets.clone(), + ); // Query initial balances let receiver_balance_before = test.receiver.balance; // Set assertions and dispatchables - test.set_assertion::(frequency_to_asset_hub_sender_assertions); - // test.set_assertion::(frequency_to_asset_hub_receiver_assertions); - test.set_dispatchable::(frequency_to_asset_hub_reserve_transfer_assets); + test.set_assertion::(assert_sender_burns_dot_correctly); + test.set_assertion::(assert_receiver_receives_dot_correctly); + test.set_dispatchable::(dispatch_reserve_transfer_dot); test.assert(); // Query final balances @@ -185,20 +163,12 @@ fn reserve_transfer_dot_from_frequency_to_asset_hub() { let receiver_balance_after = test.receiver.balance; - let frequency_sender_native_after = FrequencyWestend::execute_with(|| { - type Balances = ::Balances; - >::balance(&FrequencyWestendSender::get()) - }); - - println!("--------frequency_sender_native_before: {:?}", frequency_sender_native_before); - println!("---------frequency_sender_native_after: {:?}", frequency_sender_native_after); - - // Sender's balance is reduced by amount sent - assert_eq!(sender_dot_assets_after, sender_dot_assets_before - amount_dot_to_send); + // Sender's balance is reduced by amount sent + assert!(sender_dot_assets_after < sender_dot_assets_before - amount_dot_to_send); // // Receiver's balance is increased - // assert!(receiver_balance_after > receiver_balance_before); + assert!(receiver_balance_after > receiver_balance_before); // // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; // // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // // should be non-zero - // assert!(receiver_balance_after < receiver_balance_before + amount_to_send); + assert!(receiver_balance_after < receiver_balance_before + amount_dot_to_send); } diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs new file mode 100644 index 0000000000..ec1dbcee51 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs @@ -0,0 +1,154 @@ +use crate::foreign_balance_on; +use crate::imports::*; + +fn frequency_to_relay_reserve_transfer_assets(t: FrequencyToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn frequency_to_relay_receiver_assertions(t: FrequencyToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_relay = + Westend::sovereign_account_id_of(Westend::child_location_of(FrequencyWestend::para_id())); + + Westend::assert_ump_queue_processed( + true, + Some(FrequencyWestend::para_id()), + Some(Weight::from_parts(306305000, 7_186)), + ); + + assert_expected_events!( + Westend, + vec![ + // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_penpal_on_relay.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn frequency_to_relay_sender_assertions(t: FrequencyToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + // FrequencyWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + // 864_610_000, + // 8_799, + // ))); + assert_expected_events!( + FrequencyWestend, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance, .. } + ) => { + asset_id: *asset_id == WestendLocation::get(), + owner: *owner == t.sender.account_id, + balance: *balance == t.args.amount, + }, + ] + ); +} + +fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { + // Create and mint DOT-derived asset on Frequency + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + let owner = FrequencyAssetOwner::get(); + let sender = FrequencyWestendSender::get(); + + let _ = >::create( + Parent.into(), + owner.clone(), + false, + 1u32.into(), + ); + + let _ = >::mint_into( + Parent.into(), + &sender.clone(), + amount_to_send * 2, + ); + + assert!(>::asset_exists(Parent.into())); + }); + + // Fund Frequency sovereign account on AssetHub + let frequency_location_as_seen_by_relay = + Westend::child_location_of(FrequencyWestend::para_id()); + let sov_frequency_on_westend = + Westend::sovereign_account_id_of(frequency_location_as_seen_by_relay); + + Westend::fund_accounts(vec![(sov_frequency_on_westend.into(), amount_to_send * 2)]); +} + +// ========================================================================= +// ========= Reserve Transfers - DOT Asset - Frequency<>Relay =========== +// ========================================================================= +/// Reserve Transfers of DOT from Relay to Parachain should work +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_frequency_to_relay -p frequency-westend-integration-tests -- --nocapture +#[test] +fn reserve_transfer_dot_from_frequency_to_relay() { + let destination = FrequencyWestend::parent_location(); + let sender = FrequencyWestendSender::get(); + let amount_to_send: Balance = WESTEND_ED * 1000; + let assets: Assets = (Parent, amount_to_send).into(); + // let asset_owner = FrequencyAssetOwner::get(); + let relay_native_asset_location = WestendLocation::get(); + + setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send); + + let receiver = WestendReceiver::get(); + + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver, + amount_to_send, + assets.clone(), + None, + 0, + ), + }; + + let mut test = FrequencyToRelayTest::new(test_args); + + let sender_assets_before = + foreign_balance_on!(FrequencyWestend, relay_native_asset_location.clone(), &sender); + + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(frequency_to_relay_sender_assertions); + test.set_assertion::(frequency_to_relay_receiver_assertions); + test.set_dispatchable::(frequency_to_relay_reserve_transfer_assets); + test.assert(); + + let sender_assets_after = + foreign_balance_on!(FrequencyWestend, relay_native_asset_location, &sender); + + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_assets_after < sender_assets_before - amount_to_send); + + assert!(receiver_balance_after > receiver_balance_before); + + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); +} diff --git a/emulated-test/test/frequency-westend/src/tests/teleport.rs b/emulated-test/test/frequency-westend/src/tests/teleport.rs deleted file mode 100644 index 2041a8fd75..0000000000 --- a/emulated-test/test/frequency-westend/src/tests/teleport.rs +++ /dev/null @@ -1,17 +0,0 @@ -use crate::imports::*; -use emulated_integration_tests_common::{ - test_parachain_is_trusted_teleporter_for_relay, test_parachain_is_trusted_teleporter, test_relay_is_trusted_teleporter, -}; - -#[test] -fn teleport_from_and_to_asset_hub() { - let amount = WESTEND_ED * 100; - let native_asset: Assets = (Here, amount).into(); - - test_parachain_is_trusted_teleporter!( - FrequencyWestend, - FrequencyWestendXcmConfig, - vec![AssetHubWestend], - (native_asset, amount) - ); -} diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs new file mode 100644 index 0000000000..a3bf2e68fe --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs @@ -0,0 +1,328 @@ +use crate::foreign_balance_on; +use crate::imports::*; + +pub const ASSET_MIN_BALANCE: u128 = 1; + + + +fn frequency_location_as_seen_by_asset_hub() -> Location { + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()) +} + +fn find_fee_asset_item(assets: Assets, fee_asset_id: AssetId) -> u32 { + assets + .into_inner() + .iter() + .position(|a| a.id == fee_asset_id) + .expect("Fee asset not found in asset list") as u32 +} + +fn setup_frequency_to_asset_hub_test_env(dot_to_send: Balance) { + setup_foreign_dot_on_frequency_and_fund_sov_on_ah(dot_to_send); + create_frequency_asset_on_ah(); +} + +fn build_fee_and_value_assets(fee_dot: Balance, native_token: Balance) -> Vec { + vec![ + (Parent, fee_dot).into(), // DOT - used as fee + (Here, native_token).into(), // XRQCY used as main transfer asset + ] +} + +fn build_frequency_to_asset_hub_test( + sender: AccountIdOf<::Runtime>, + receiver: AccountIdOf<::Runtime>, + destination: Location, + frqcy_amount: Balance, + assets: Assets, + fee_asset_item: u32, +) -> FrequencyToAssetHubTest { + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para(destination, receiver, frqcy_amount, assets, None, fee_asset_item), + }; + + FrequencyToAssetHubTest::new(test_args) +} + +fn mint_dot_on_frequency( + beneficiary: AccountIdOf<::Runtime>, + amount_to_mint: Balance, +) { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + + FrequencyWestend::execute_with(|| { + let signed_origin = + ::RuntimeOrigin::signed(FrequencyAssetOwner::get()); + + assert_ok!(ForeignAssets::mint( + signed_origin, + Parent.into(), + beneficiary.clone().into(), + amount_to_mint + )); + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == Parent.into(), + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); +} + +fn setup_foreign_dot_on_frequency_and_fund_sov_on_ah(amount_to_send: Balance) { + // Create and mint DOT-derived asset on Frequency + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + let sender = FrequencyWestendSender::get(); + + let _ = >::create( + Parent.into(), + sender.clone(), + false, + 1u32.into(), + ); + + let _ = >::mint_into( + Parent.into(), + &sender.clone(), + amount_to_send * 2, + ); + + assert!(>::asset_exists(Parent.into())); + }); + + // Fund Frequency sovereign account on AssetHub + let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); + let sov_frequency_on_ahr = AssetHubWestend::sovereign_account_id_of(frequency_location_on_ah); + + AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount_to_send * 2)]); +} + +fn create_frequency_asset_on_ah() { + let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); + + AssetHubWestend::force_create_foreign_asset( + frequency_location_on_ah.clone().try_into().unwrap(), + FrequencyAssetOwner::get(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + AssetHubWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + + assert!(>::asset_exists(frequency_location_on_ah)); + }); +} + +fn execute_xcm_frequency_to_asset_hub(t: FrequencyToAssetHubTest) -> DispatchResult { + let assets: Assets = t.args.assets.clone(); + + let local_teleportable_asset: Asset = + non_fee_asset(&assets, t.args.fee_asset_item as usize).unwrap().into(); + // TODO(https://github.com/paritytech/polkadot-sdk/issues/6197): dry-run to get exact fees. + // For now )just use half the fees locally, half on dest + + // Use half of the fees to cover remote execution and the + // remainding to cover delivery fees + let mut remote_execution_fee_asset: Asset = + fee_asset(&assets, t.args.fee_asset_item as usize).unwrap().into(); + if let Fungible(fees_amount) = remote_execution_fee_asset.fun { + remote_execution_fee_asset.fun = Fungible(fees_amount / 2); + } + + let xcm_on_dest = Xcm(vec![ + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: t.args.beneficiary }, + ]); + + let xcm = Xcm::<()>(vec![ + WithdrawAsset(assets), + // PayFees { asset: remote_fees.clone() }, + InitiateTransfer { + destination: t.args.dest, + remote_fees: Some(AssetTransferFilter::ReserveWithdraw( + remote_execution_fee_asset.into(), + )), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::Teleport( + local_teleportable_asset.into(), + )]), + remote_xcm: xcm_on_dest, + }, + RefundSurplus, + DepositAsset { + assets: Wild(All), + beneficiary: AccountId32Junction { + network: None, + id: FrequencyWestendSender::get().into(), + } + .into(), + }, + ]); + + ::PolkadotXcm::execute( + t.signed_origin, + bx!(staging_xcm::VersionedXcm::from(xcm.into())), + Weight::MAX, + ) + .unwrap(); + Ok(()) +} + +fn assert_sender_assets_burned_correctly(t: FrequencyToAssetHubTest) { + type RuntimeEvent = ::RuntimeEvent; + let system_para_native_asset_location = WestendLocation::get(); + let (_, xrqcy_teleport_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + FrequencyWestend::assert_xcm_pallet_attempted_complete(None); + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, .. } + ) => { + asset_id: *asset_id == system_para_native_asset_location, + owner: *owner == t.sender.account_id, + }, + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == xrqcy_teleport_amount, + }, + ] + ); +} + +fn assert_receiver_fee_burned_and_asset_minted(t: FrequencyToAssetHubTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubWestend::assert_xcmp_queue_success(None); + let sovereign_account_of_frequency = + AssetHubWestend::sovereign_account_id_of(frequency_location_as_seen_by_asset_hub()); + + let frequency_location = frequency_location_as_seen_by_asset_hub(); + + let (_, total_fee) = fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let remote_execution_fee: u128 = total_fee / 2; + + let (_, xrqcy_teleport_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + assert_expected_events!( + AssetHubWestend, + vec![ + // Withdraw the fee amount from sov account and burn it + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sovereign_account_of_frequency, + amount: *amount == remote_execution_fee, + }, + // Issue the xFRQCY amount + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == frequency_location, + owner: *owner == AssetHubWestendReceiver::get(), + amount: *amount == xrqcy_teleport_amount, + }, + // Mint remaining fees and deposit them into receiver otherwise + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, .. } + ) => { + who: *who == AssetHubWestendReceiver::get(), + }, + ] + ); +} + +// =========================================================================== +// ======= DOT (fee) + xFRQCY (value) Transfer: Frequency → AssetHub ========= +// =========================================================================== +/// This test transfers xFRQCY from the Frequency parachain to AssetHub, +/// using DOT as the fee asset for both delivery and remote execution. +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::teleport_xfrqcy_to_assethub_with_dot_fee -p frequency-westend-integration-tests -- --nocapture +#[test] +fn teleport_xfrqcy_to_assethub_with_dot_fee() { + // ──────────────── + // Test Setup + // ──────────────── + let dot_fee_amount: Balance = AssetHubExistentialDeposit::get() * 1000; + let xrqcy_transfer_amount = FrequencyExistentialDeposit::get() * 1000; + + setup_frequency_to_asset_hub_test_env(dot_fee_amount); + + let sender = FrequencyWestendSender::get(); + let receiver = AssetHubWestendReceiver::get(); + let destination = FrequencyWestend::sibling_location_of(AssetHubWestend::para_id()); + let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); + + // Local fee amount(in DOT) should cover + // 1. delivery cost to AH + // 2. execution cost on AH + let assets: Assets = build_fee_and_value_assets(dot_fee_amount, xrqcy_transfer_amount).into(); + let fee_asset_item = find_fee_asset_item(assets.clone(), AssetId(Parent.into())); + + // ──────────────────────────────── + // Pre-dispatch State Snapshot + // ──────────────────────────────── + let sender_balance_of_dot_on_frequency_before = + foreign_balance_on!(FrequencyWestend, Parent.into(), &sender); + assert_eq!(sender_balance_of_dot_on_frequency_before, 2_000_000_000_000u128); + + + let frequency_sender_native_before = frequency_balance_of(&sender); + assert_eq!(frequency_sender_native_before, 4_096_000_000u128); + + let receiver_frequency_before = + foreign_balance_on!(AssetHubWestend, frequency_location_on_ah.clone(), &sender); + + assert_eq!(receiver_frequency_before, 0u128); + + // ───────────────────────────── + // Build Test Context + // ───────────────────────────── + let mut test = build_frequency_to_asset_hub_test( + sender.clone(), + receiver.clone(), + destination.clone(), + xrqcy_transfer_amount, + assets, + fee_asset_item, + ); + + // ───────────────────────────── + // Execute + Assert + // ───────────────────────────── + test.set_assertion::(assert_sender_assets_burned_correctly); + test.set_assertion::(assert_receiver_fee_burned_and_asset_minted); + test.set_dispatchable::(execute_xcm_frequency_to_asset_hub); + test.assert(); + + let sender_balance_of_dot_on_frequency_after = + foreign_balance_on!(FrequencyWestend, Parent.into(), &sender); + + let receiver_balance_of_xfrqcy_on_ah_after = + foreign_balance_on!(AssetHubWestend, frequency_location_on_ah.clone(), &receiver); + + assert!( + sender_balance_of_dot_on_frequency_after + < sender_balance_of_dot_on_frequency_before + dot_fee_amount + ); + + assert_eq!( + receiver_balance_of_xfrqcy_on_ah_after, xrqcy_transfer_amount, + "Sender's balance on AH does not equal the transfer amount" + ); +} diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs new file mode 100644 index 0000000000..aed6636f55 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs @@ -0,0 +1,303 @@ +use crate::foreign_balance_on; +use crate::imports::*; + +pub const ASSET_MIN_BALANCE: u128 = 1; + +fn frequency_location_as_seen_by_asset_hub() -> Location { + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()) +} + +fn find_fee_asset_item(assets: Assets, fee_asset_id: AssetId) -> u32 { + assets + .into_inner() + .iter() + .position(|a| a.id == fee_asset_id) + .expect("Fee asset not found in asset list") as u32 +} + +fn build_fee_and_value_assets(fee_dot: Balance, xrqcy_teleport_amount: Balance) -> Vec { + vec![ + (Parent, fee_dot).into(), // DOT - used as fee + (frequency_location_as_seen_by_asset_hub(), xrqcy_teleport_amount).into(), // XRQCY used as main transfer asset + ] +} + +fn build_asset_hub_to_frequency_test( + sender: AccountIdOf<::Runtime>, + receiver: AccountIdOf<::Runtime>, + destination: Location, + frqcy_amount: Balance, + assets: Assets, + fee_asset_item: u32, +) -> AssetHubToFrequencyTest { + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination, + receiver, + frqcy_amount, + assets.clone(), + None, + fee_asset_item, + ), + }; + + AssetHubToFrequencyTest::new(test_args) +} + +fn assert_sender_assets_burned_correctly(t: AssetHubToFrequencyTest) { + type RuntimeEvent = ::RuntimeEvent; + let frequency_location = frequency_location_as_seen_by_asset_hub(); + let (_, xrqcy_teleport_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + let frequency_sibling_account = + AssetHubWestend::sovereign_account_id_of(frequency_location.clone()); + + let (_, total_fee) = fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let remote_execution_fee: u128 = total_fee / 2; + + AssetHubWestend::assert_xcm_pallet_attempted_complete(None); + assert_expected_events!( + AssetHubWestend, + vec![ + // Frequency burned for teleportation + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance } + ) => { + asset_id: *asset_id == frequency_location, + owner: *owner == t.sender.account_id, + balance: *balance == xrqcy_teleport_amount, + }, + // Remote fee burned + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == total_fee, + }, + // Sovereign account funded for remote fee + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { + who: *who == frequency_sibling_account, + amount: *amount == remote_execution_fee, + }, + ] + ); +} + +fn assert_receiver_fee_burned_and_asset_minted(t: AssetHubToFrequencyTest) { + type RuntimeEvent = ::RuntimeEvent; + FrequencyWestend::assert_xcmp_queue_success(None); + + let (_, total_fee) = fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let remote_execution_fee: u128 = total_fee / 2; + + let (_, xrqcy_teleport_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + assert_expected_events!( + AssetHubWestend, + vec![ + // Mint remaining fees and deposit them into receiver otherwise + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, amount } + ) => { + who: *who == FrequencyWestendReceiver::get(), + amount: *amount == xrqcy_teleport_amount, + }, + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount }, + ) => { + asset_id: *asset_id == Parent.into(), + owner: *owner == t.receiver.account_id, + amount: *amount < remote_execution_fee, + }, + ] + ); +} + +fn mint_xrqcy_on_asset_hub( + beneficiary: AccountIdOf<::Runtime>, + amount_to_mint: Balance, +) { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + + AssetHubWestend::execute_with(|| { + let signed_origin = + ::RuntimeOrigin::signed(FrequencyAssetOwner::get()); + + assert_ok!(ForeignAssets::mint( + signed_origin, + frequency_location_as_seen_by_asset_hub().into(), + beneficiary.clone().into(), + amount_to_mint + )); + + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == frequency_location_as_seen_by_asset_hub().into(), + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); +} + +fn create_dot_asset_on_frequency() { + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + let sudo_origin = ::RuntimeOrigin::root(); + + let _ = ForeignAssets::force_create( + sudo_origin, + Parent.into(), + FrequencyAssetOwner::get().into(), + false, + 1u128.into(), + ); + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::ForceCreated { asset_id, .. } + ) => { + asset_id: *asset_id == Parent.into(), + }, + ] + ); + + assert!(>::asset_exists(Parent.into())); + }); +} + +fn create_frequency_asset_on_ah() { + let frequency_location_on_asset_hub = frequency_location_as_seen_by_asset_hub(); + + AssetHubWestend::force_create_foreign_asset( + frequency_location_on_asset_hub.clone().try_into().unwrap(), + FrequencyAssetOwner::get(), + false, + ASSET_MIN_BALANCE, + vec![], + ); +} + +fn execute_xcm_asset_hub_to_frequency(t: AssetHubToFrequencyTest) -> DispatchResult { + let all_assets = t.args.assets.clone().into_inner(); + let mut assets = all_assets.clone(); + + let mut fees = assets.remove(t.args.fee_asset_item as usize); + + if let Fungible(fees_amount) = fees.fun { + fees.fun = Fungible(fees_amount / 2); + } + // xcm to be executed at dest + let xcm_on_dest = Xcm(vec![ + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: t.args.beneficiary }, + ]); + let xcm = Xcm::<()>(vec![ + WithdrawAsset(all_assets.into()), + PayFees { asset: fees.clone() }, + InitiateTransfer { + destination: t.args.dest, + remote_fees: Some(AssetTransferFilter::ReserveDeposit(fees.into())), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::Teleport(assets.into())]), + remote_xcm: xcm_on_dest, + }, + ]); + + ::PolkadotXcm::execute( + t.signed_origin, + bx!(staging_xcm::VersionedXcm::from(xcm.into())), + Weight::MAX, + ) + .unwrap(); + Ok(()) +} + +// =========================================================================== +// ======= DOT (fee) + xFRQCY (value) Transfer: AssetHub → Frequency ========= +// =========================================================================== +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::teleport_xfrqcy_with_dot_fee_from_assethub -p frequency-westend-integration-tests -- --nocapture +#[test] +fn teleport_xfrqcy_with_dot_fee_from_assethub() { + // ──────────────── + // Test Setup + // ──────────────── + let dot_fee_amount: Balance = AssetHubExistentialDeposit::get() * 1000; // ONE_DOT = 1_000_000_000_000 + let xrqcy_teleport_amount = FrequencyExistentialDeposit::get() * 100; // ONE_XRQCY = 100_000_000 + let frequency_location_on_asset_hub = frequency_location_as_seen_by_asset_hub(); + + AssetHubWestend::fund_accounts(vec![( + AssetHubWestendSender::get(), + AssetHubExistentialDeposit::get() * 100, + )]); + + create_dot_asset_on_frequency(); + create_frequency_asset_on_ah(); + mint_xrqcy_on_asset_hub( + AssetHubWestendSender::get().clone(), + (xrqcy_teleport_amount * 2).clone(), + ); + + let sender = AssetHubWestendSender::get(); + let receiver = FrequencyWestendReceiver::get(); + let destination = AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + + let assets: Assets = build_fee_and_value_assets(dot_fee_amount, xrqcy_teleport_amount).into(); + let fee_asset_item = find_fee_asset_item(assets.clone(), AssetId(Parent.into())); + + // ──────────────────────────────── + // Pre-dispatch State Snapshot + // ──────────────────────────────── + let sender_dot_on_frequency_before = + foreign_balance_on!(FrequencyWestend, Parent.into(), &sender); + assert_eq!(sender_dot_on_frequency_before, 0u128); + + let sender_xrqcy_on_assethub_before = foreign_balance_on!( + AssetHubWestend, + frequency_location_on_asset_hub.clone(), + &sender.clone() + ); + + assert_eq!(sender_xrqcy_on_assethub_before, 200_000_000u128); + + let sender_dot_on_assethub_before = AssetHubWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(&sender) + }); + assert_eq!(sender_dot_on_assethub_before, 4_196_000_000_000u128); + + let receiver_xrqcy_on_frequency_before = FrequencyWestend::execute_with(|| { + type Balances = ::Balances; + >::balance(&receiver) + }); + + assert_eq!(receiver_xrqcy_on_frequency_before, 4_096_000_000u128); + + // ───────────────────────────── + // Build Test Context + // ───────────────────────────── + let mut test = build_asset_hub_to_frequency_test( + sender.clone(), + receiver.clone(), + destination.clone(), + xrqcy_teleport_amount, + assets, + fee_asset_item, + ); + + test.set_assertion::(assert_sender_assets_burned_correctly); + test.set_assertion::(assert_receiver_fee_burned_and_asset_minted); + test.set_dispatchable::(execute_xcm_asset_hub_to_frequency); + test.assert(); +} diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index 36cf675362..c262c41c0e 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -18,18 +18,13 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { } #[cfg(feature = "frequency-bridging")] -pub mod xcm_config; +pub mod xcm; // use pallet_assets::BenchmarkHelper; #[cfg(feature = "frequency-bridging")] -use xcm_config::ForeignAssetsAssetId; - -#[cfg(feature = "frequency-bridging")] -pub mod xcm_queue; - -#[cfg(feature = "frequency-bridging")] -pub mod xcm_commons; -#[cfg(feature = "frequency-bridging")] -use xcm_commons::{RelayOrigin, ReservedDmpWeight, ReservedXcmpWeight}; +use xcm::{ + parameters::{RelayOrigin, ReservedDmpWeight, ReservedXcmpWeight, ForeignAssetsAssetId}, + queue as xcm_queue, +}; #[cfg(feature = "frequency-bridging")] mod xcm; // Tests are contained the xcm directory @@ -249,16 +244,18 @@ impl Contains for BaseCallFilter { #[cfg(not(feature = "frequency"))] { match call { - RuntimeCall::Utility(pallet_utility_call) => - Self::is_utility_call_allowed(pallet_utility_call), + RuntimeCall::Utility(pallet_utility_call) => { + Self::is_utility_call_allowed(pallet_utility_call) + }, _ => true, } } #[cfg(feature = "frequency")] { match call { - RuntimeCall::Utility(pallet_utility_call) => - Self::is_utility_call_allowed(pallet_utility_call), + RuntimeCall::Utility(pallet_utility_call) => { + Self::is_utility_call_allowed(pallet_utility_call) + }, // Create provider and create schema are not allowed in mainnet for now. See propose functions. RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) => false, RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, @@ -272,9 +269,11 @@ impl Contains for BaseCallFilter { impl BaseCallFilter { fn is_utility_call_allowed(call: &pallet_utility::Call) -> bool { match call { - pallet_utility::Call::batch { calls, .. } | - pallet_utility::Call::batch_all { calls, .. } | - pallet_utility::Call::force_batch { calls, .. } => calls.iter().any(Self::is_batch_call_allowed), + pallet_utility::Call::batch { calls, .. } + | pallet_utility::Call::batch_all { calls, .. } + | pallet_utility::Call::force_batch { calls, .. } => { + calls.iter().any(Self::is_batch_call_allowed) + }, _ => true, } } @@ -282,16 +281,16 @@ impl BaseCallFilter { fn is_batch_call_allowed(call: &RuntimeCall) -> bool { match call { // Block all nested `batch` calls from utility batch - RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | - RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | - RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) => false, + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) + | RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) + | RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) => false, // Block all `FrequencyTxPayment` calls from utility batch RuntimeCall::FrequencyTxPayment(..) => false, // Block `create_provider` and `create_schema` calls from utility batch - RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) | - RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, + RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) + | RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, // Block `Pays::No` calls from utility batch _ if Self::is_pays_no_call(call) => false, @@ -342,17 +341,17 @@ impl InstanceFilter for ProxyType { ), ProxyType::Governance => matches!( c, - RuntimeCall::Treasury(..) | - RuntimeCall::Democracy(..) | - RuntimeCall::TechnicalCommittee(..) | - RuntimeCall::Council(..) | - RuntimeCall::Utility(..) // Calls inside a batch are also run through filters + RuntimeCall::Treasury(..) + | RuntimeCall::Democracy(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::Council(..) + | RuntimeCall::Utility(..) // Calls inside a batch are also run through filters ), ProxyType::Staking => { matches!( c, - RuntimeCall::Capacity(pallet_capacity::Call::stake { .. }) | - RuntimeCall::CollatorSelection( + RuntimeCall::Capacity(pallet_capacity::Call::stake { .. }) + | RuntimeCall::CollatorSelection( pallet_collator_selection::Call::set_candidacy_bond { .. } ) ) @@ -441,8 +440,8 @@ impl OnRuntimeUpgrade for MigratePalletsCu fn on_runtime_upgrade() -> Weight { use sp_core::Get; - if pallet_collator_selection::Pallet::::on_chain_storage_version() != - pallet_collator_selection::Pallet::::in_code_storage_version() + if pallet_collator_selection::Pallet::::on_chain_storage_version() + != pallet_collator_selection::Pallet::::in_code_storage_version() { pallet_collator_selection::Pallet::::in_code_storage_version() .put::>(); diff --git a/runtime/frequency/src/xcm/asset_transactor.rs b/runtime/frequency/src/xcm/asset_transactor.rs new file mode 100644 index 0000000000..35774ab27e --- /dev/null +++ b/runtime/frequency/src/xcm/asset_transactor.rs @@ -0,0 +1,58 @@ +use crate::{AccountId, Balances, ForeignAssets, PolkadotXcm}; +use staging_xcm::latest::prelude::*; +use staging_xcm_builder::{ + FungibleAdapter, FungiblesAdapter, IsConcrete, IsParentsOnly, MatchedConvertedConcreteId, + NoChecking, +}; + +use crate::xcm::{location_converter::LocationToAccountId, }; + +use frame_support::{parameter_types, traits::ConstU8}; + +parameter_types! { + /// A placeholder account used to hold reserved balances temporarily during checking. + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + pub HereLocation: Location = Location::here(); +} + +/// Adapter for transacting native assets (like balances) +/// Means for transacting assets on this chain. +/// How xcm deals with assets on this chain +pub type LocalAssetTransactor = FungibleAdapter< + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // Do a simple punn to convert an AccountId32 Location into a native chain account ID: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports. + (), +>; + +/// Adapter for transacting foreign assets (like DOT) +/// Type for specifying how a `Location` can be converted into an `AccountId`. +///// Transactors /////// +pub type ForeignAssetsAdapter = FungiblesAdapter< + ForeignAssets, + // Use this currency when it is a fungible asset matching the given location or name: + MatchedConvertedConcreteId< + Location, + u128, + IsParentsOnly>, + xcm_executor::traits::JustTry, + xcm_executor::traits::JustTry, + >, + // Convert an XCM Location into a local account id: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We do not allow teleportation of foreign assets. We only allow the reserve-based + // transfer of USDT, USDC and DOT. + NoChecking, + CheckingAccount, +>; + +/// The complete set of transactors +pub type AssetTransactors = (LocalAssetTransactor, ForeignAssetsAdapter); diff --git a/runtime/frequency/src/xcm/barrier.rs b/runtime/frequency/src/xcm/barrier.rs new file mode 100644 index 0000000000..6549faa798 --- /dev/null +++ b/runtime/frequency/src/xcm/barrier.rs @@ -0,0 +1,38 @@ +use frame_support::traits::{ConstU32, Contains, Everything}; + +use staging_xcm::latest::prelude::*; +use staging_xcm_builder::{ + AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, DenyRecursively, + DenyReserveTransferToRelayChain, DenyThenTry, TakeWeightCredit, TrailingSetTopicAsId, + WithComputedOrigin, +}; + +use crate::xcm::parameters::UniversalLocation; + +pub struct ParentOrParentsExecutivePlurality; +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }])) + } +} + +pub type Barrier = TrailingSetTopicAsId< + DenyThenTry< + DenyRecursively, + ( + TakeWeightCredit, + WithComputedOrigin< + ( + // we constraint this one so that we limit who can execute instructions + AllowTopLevelPaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, + // ^^^ Parent and its exec plurality get free execution + // Subscriptions for version tracking are OK. + // AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, + ), + >, +>; diff --git a/runtime/frequency/src/xcm_commons.rs b/runtime/frequency/src/xcm/location_converter.rs similarity index 76% rename from runtime/frequency/src/xcm_commons.rs rename to runtime/frequency/src/xcm/location_converter.rs index 6dfbd33539..73068f69c9 100644 --- a/runtime/frequency/src/xcm_commons.rs +++ b/runtime/frequency/src/xcm/location_converter.rs @@ -1,29 +1,12 @@ use crate::{AccountId, RuntimeOrigin}; - -use crate::MAXIMUM_BLOCK_WEIGHT; -use cumulus_primitives_core::AggregateMessageOrigin; -use frame_support::parameter_types; use pallet_xcm::XcmPassthrough; use polkadot_parachain_primitives::primitives::Sibling; -use staging_xcm::latest::{prelude::*, WESTEND_GENESIS_HASH}; use staging_xcm_builder::{ AccountId32Aliases, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignSignedViaLocation, }; -/// Shared Relay Network -pub const RELAY_GENESIS: [u8; 32] = WESTEND_GENESIS_HASH; - -parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; -} - -parameter_types! { - pub const RelayNetwork: Option = Some(NetworkId::ByGenesis(RELAY_GENESIS)); - pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); -} +use super::parameters::{RelayChainOrigin, RelayNetwork}; /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM @@ -42,6 +25,7 @@ pub type LocationToAccountId = ( /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. +/// Converts an incoming XCM origin into a local `RuntimeOrigin` for `Transact` dispatch. pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for @@ -59,3 +43,9 @@ pub type XcmOriginToTransactDispatchOrigin = ( // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. XcmPassthrough, ); + +/// Converts a local signed origin into an XCM location. Forms the basis for local origins +/// sending/executing XCMs. +/// Converts a local signed origin into a `MultiLocation` for outbound XCMs. +pub type LocalOriginToLocation = + staging_xcm_builder::SignedToAccountId32; diff --git a/runtime/frequency/src/xcm/mod.rs b/runtime/frequency/src/xcm/mod.rs index 192cb697cc..fb58c4147a 100644 --- a/runtime/frequency/src/xcm/mod.rs +++ b/runtime/frequency/src/xcm/mod.rs @@ -1,2 +1,32 @@ #[cfg(test)] pub mod tests; +// pub mod xcm_commons; +pub mod queue; +pub mod xcm_config; + +pub mod asset_transactor; +pub mod barrier; +pub mod location_converter; +pub mod parameters; +pub mod reserve; +pub mod teleporter; +pub mod trader; +pub mod weigher; + +pub use xcm_config::*; + +pub use asset_transactor::AssetTransactors; +pub use barrier::Barrier; +pub use location_converter::{ + LocalOriginToLocation, LocationToAccountId, XcmOriginToTransactDispatchOrigin, +}; +pub use parameters::{ + BaseDeliveryFee, FeeAssetId, ForeignAssetsAssetId, MaxAssetsIntoHolding, RelayNetwork, + TransactionByteFee, UniversalLocation, +}; +pub use queue::XcmRouter; +pub use reserve::TrustedReserves; +pub use teleporter::TrustedTeleporters; +pub use trader::Trader; +pub use weigher::Weigher; + diff --git a/runtime/frequency/src/xcm/parameters.rs b/runtime/frequency/src/xcm/parameters.rs new file mode 100644 index 0000000000..07c580f4ec --- /dev/null +++ b/runtime/frequency/src/xcm/parameters.rs @@ -0,0 +1,42 @@ +use crate::{ + polkadot_xcm_fee::default_fee_per_second, Balance, ParachainInfo, RuntimeOrigin, + MAXIMUM_BLOCK_WEIGHT, +}; +use cumulus_primitives_core::AggregateMessageOrigin; +use frame_support::parameter_types; +use staging_xcm::latest::{prelude::*, WESTEND_GENESIS_HASH}; + +pub const MICROUNIT: Balance = 1_000_000; +pub const RELAY_GENESIS: [u8; 32] = WESTEND_GENESIS_HASH; +const ASSET_HUB_ID: u32 = 1000; + +pub type ForeignAssetsAssetId = Location; + +parameter_types! { + pub const RelayLocation: Location = Location::parent(); + pub FeeAssetId: AssetId = AssetId(RelayLocation::get()); + pub const BaseDeliveryFee: u128 = (1_000_000_000_000u128 / 100).saturating_mul(3); + pub const TransactionByteFee: Balance = 10 * MICROUNIT; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; + pub const RelayNetwork: Option = Some(NetworkId::ByGenesis(RELAY_GENESIS)); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); + + pub RelayPerSecondAndByte: (AssetId, u128,u128) = (Location::new(1,Here).into(), default_fee_per_second(), 1024); + pub HereLocation: Location = Location::here(); + + pub NativeToken: AssetId = AssetId(Location::here()); + pub NativeTokenFilter: AssetFilter = Wild(AllOf { fun: WildFungible, id: NativeToken::get() }); + pub AssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]); + pub NativeForAssetHub: (AssetFilter, Location) = (NativeTokenFilter::get(), AssetHubLocation::get()); +} + +parameter_types! { + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + // XCM instruction weight cost + // pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); + // pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; +} diff --git a/runtime/frequency/src/xcm_queue.rs b/runtime/frequency/src/xcm/queue.rs similarity index 61% rename from runtime/frequency/src/xcm_queue.rs rename to runtime/frequency/src/xcm/queue.rs index 5339786f3d..0cb8a2f89f 100644 --- a/runtime/frequency/src/xcm_queue.rs +++ b/runtime/frequency/src/xcm/queue.rs @@ -11,9 +11,12 @@ use frame_support::{ weights::Weight, }; -use crate::xcm_commons::XcmOriginToTransactDispatchOrigin; +use crate::xcm::location_converter::XcmOriginToTransactDispatchOrigin; +use crate::xcm::parameters::{BaseDeliveryFee, FeeAssetId, TransactionByteFee}; +use crate::xcm::XcmConfig; use frame_system::EnsureRoot; +use staging_xcm_builder::WithUniqueTopic; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -21,19 +24,44 @@ use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; // use xcm_config; #[cfg(not(feature = "runtime-benchmarks"))] -use crate::xcm_config; +use super::xcm_config; -use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; - -pub use sp_runtime::Perbill; +pub use sp_runtime::{Perbill, Saturating}; #[cfg(not(feature = "runtime-benchmarks"))] use xcm_executor; +/// Pricing logic for sibling parachain message delivery +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; + +/// Pricing logic for relay message delivery +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + parameter_types! { + /// How much weight to allocate to the background message queue service pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; } +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = WithUniqueTopic<( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +)>; + +/// Configures the queue that handles incoming XCMP messages impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ChannelInfo = ParachainSystem; @@ -46,9 +74,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = (); - type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +/// Configures the local message queue service impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = (); @@ -59,7 +88,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< AggregateMessageOrigin, - xcm_executor::XcmExecutor, + xcm_executor::XcmExecutor, RuntimeCall, >; type Size = u32; diff --git a/runtime/frequency/src/xcm/reserve.rs b/runtime/frequency/src/xcm/reserve.rs new file mode 100644 index 0000000000..fd43c2d404 --- /dev/null +++ b/runtime/frequency/src/xcm/reserve.rs @@ -0,0 +1,22 @@ +use crate::xcm::parameters::{AssetHubLocation, RelayLocation}; + +use frame_support::traits::ContainsPair; +use parachains_common::xcm_config::ConcreteAssetFromSystem; +use staging_xcm::latest::prelude::*; +use staging_xcm_builder::NativeAsset; + +/// Checks whether the asset originates from a given prefix location +pub struct AssetFrom(core::marker::PhantomData); + +impl> ContainsPair + for AssetFrom +{ + fn contains(_asset: &Asset, location: &Location) -> bool { + let prefix = T::get(); + location == &prefix + } +} + +/// Assets considered as reserve-based (e.g. DOT, native, system-registered) +pub type TrustedReserves = + (NativeAsset, ConcreteAssetFromSystem, AssetFrom); diff --git a/runtime/frequency/src/xcm/teleporter.rs b/runtime/frequency/src/xcm/teleporter.rs new file mode 100644 index 0000000000..4eea624e25 --- /dev/null +++ b/runtime/frequency/src/xcm/teleporter.rs @@ -0,0 +1,27 @@ +use frame_support::parameter_types; +use staging_xcm::latest::prelude::*; +use staging_xcm_builder::Case; + +/// The location of AssetHub on the relay network. +pub const ASSET_HUB_ID: u32 = 1000; + +parameter_types! { + /// The location we use to represent native assets (e.g. XRQCY). + pub NativeTokenLocation: Location = Location::here(); + /// A filter matching the native token only. + pub NativeTokenFilter: AssetFilter = Wild(AllOf { + fun: WildFungible, + id: AssetId(NativeTokenLocation::get()), + }); + + pub AssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]); + + /// The specific (asset, destination) combination allowed for teleport. + pub NativeForAssetHub: (AssetFilter, Location) = ( + NativeTokenFilter::get(), + AssetHubLocation::get(), + ); +} + +/// Assets allowed to teleport (e.g. native token to AssetHub) +pub type TrustedTeleporters = Case; diff --git a/runtime/frequency/src/xcm/trader.rs b/runtime/frequency/src/xcm/trader.rs new file mode 100644 index 0000000000..daa9129c99 --- /dev/null +++ b/runtime/frequency/src/xcm/trader.rs @@ -0,0 +1,12 @@ +use crate::{AccountId, Balances, Runtime}; +use polkadot_runtime_common::impls::ToAuthor; +use staging_xcm_builder::{FixedRateOfFungible, UsingComponents}; + +use crate::xcm::parameters::{HereLocation, RelayPerSecondAndByte}; +use common_runtime::fee::WeightToFee; + +/// The full Trader used for pricing XCM execution and delivery +pub type Trader = ( + FixedRateOfFungible, + UsingComponents>, +); diff --git a/runtime/frequency/src/xcm/weigher.rs b/runtime/frequency/src/xcm/weigher.rs new file mode 100644 index 0000000000..64dae479e7 --- /dev/null +++ b/runtime/frequency/src/xcm/weigher.rs @@ -0,0 +1,14 @@ +use frame_support::parameter_types; +use staging_xcm::latest::prelude::*; +use staging_xcm_builder::FixedWeightBounds; + +use crate::RuntimeCall; + +parameter_types! { + /// The cost of executing a single XCM instruction + pub const UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); + pub const MaxInstructions: u32 = 100; +} + +/// The XCM weigher used to estimate total weight for execution +pub type Weigher = FixedWeightBounds; diff --git a/runtime/frequency/src/xcm/xcm_config.rs b/runtime/frequency/src/xcm/xcm_config.rs new file mode 100644 index 0000000000..a8864f6ff2 --- /dev/null +++ b/runtime/frequency/src/xcm/xcm_config.rs @@ -0,0 +1,116 @@ +use crate::{ + AccountId, AllPalletsWithSystem, Balances, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, +}; + +use staging_xcm_builder::{EnsureXcmOrigin, FrameTransactionalProcessor}; + +use crate::xcm::{ + AssetTransactors, Barrier, LocalOriginToLocation, LocationToAccountId, MaxAssetsIntoHolding, + Trader, TrustedReserves, TrustedTeleporters, UniversalLocation, Weigher, + XcmOriginToTransactDispatchOrigin, XcmRouter, +}; + +use frame_support::{ + parameter_types, + traits::{ConstU32, Disabled, Everything, Nothing}, +}; + +pub use common_runtime::fee::WeightToFee; + +use frame_system::EnsureRoot; + +use xcm_executor::XcmExecutor; + +parameter_types! { + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); +} + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type XcmEventEmitter = PolkadotXcm; + // How to withdraw and deposit an asset. + type AssetTransactor = AssetTransactors; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + type IsReserve = TrustedReserves; + // in order to register our asset in asset hub + // once the asset is registered we can teleport our native asset to asset hub + type IsTeleporter = TrustedTeleporters; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = Weigher; + type Trader = Trader; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); + type XcmRecorder = PolkadotXcm; +} + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + type ExecuteXcmOrigin = EnsureXcmOrigin; + // update to Nothing and create extrinsic + type XcmExecuteFilter = Everything; + // ^ Disable dispatchable execute on the XCM pallet. + // Needs to be `Everything` for local testing. + type XcmExecutor = XcmExecutor; + // update to only allow to teleport native + type XcmTeleportFilter = Everything; + // Lets only allow reserve transfers of DOT + type XcmReserveTransferFilter = Everything; + type Weigher = Weigher; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + // ^ Override for AdvertisedXcmVersion default + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + // I do not thingk we need this + type SovereignAccountOf = LocationToAccountId; + /// Not sure what this is for? + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + // Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`. + type AuthorizedAliasConsideration = Disabled; +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +/// Simple conversion of `u32` into an `AssetId` for use in benchmarking. +#[cfg(feature = "runtime-benchmarks")] +pub struct XcmBenchmarkHelper; +#[cfg(feature = "runtime-benchmarks")] +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> ForeignAssetsAssetId { + Location::new(1, [Parachain(id)]) + } +} diff --git a/runtime/frequency/src/xcm_config.rs b/runtime/frequency/src/xcm_config.rs deleted file mode 100644 index b35c2e5366..0000000000 --- a/runtime/frequency/src/xcm_config.rs +++ /dev/null @@ -1,238 +0,0 @@ -use crate::{ - AccountId, AllPalletsWithSystem, Balances, ForeignAssets, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue, -}; - -use staging_xcm_builder::{ - AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, DenyRecursively, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, - FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsConcrete, IsParentsOnly, - MatchedConvertedConcreteId, NativeAsset, NoChecking, SignedToAccountId32, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, -}; - -pub use crate::xcm_commons::{ - LocationToAccountId, RelayNetwork, XcmOriginToTransactDispatchOrigin, -}; - -use frame_support::{ - pallet_prelude::Get, - parameter_types, - traits::{ConstU32, ConstU8, Contains, ContainsPair, Disabled, Everything, Nothing}, - weights::Weight, -}; - -pub use common_runtime::fee::WeightToFee; - -use staging_xcm::latest::prelude::*; - -use frame_system::EnsureRoot; - -use xcm_executor::XcmExecutor; - -use polkadot_runtime_common::impls::ToAuthor; - -pub type ForeignAssetsAssetId = Location; - -parameter_types! { - pub CheckingAccount: AccountId = PolkadotXcm::check_account(); -} - -parameter_types! { - // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - // XCM instruction weight cost - pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); - pub const MaxInstructions: u32 = 100; - pub const MaxAssetsIntoHolding: u32 = 64; -} - -parameter_types! { - pub const RelayLocation: Location = Location::parent(); - pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); - pub HereLocation: Location = Location::here(); -} - -const ASSET_HUB_ID: u32 = 1000; - -parameter_types! { - pub NativeToken: AssetId = AssetId(Location::here()); - pub NativeTokenFilter: AssetFilter = Wild(AllOf { fun: WildFungible, id: NativeToken::get() }); - pub AssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]); - pub NativeForAssetHub: (AssetFilter, Location) = (NativeTokenFilter::get(), AssetHubLocation::get()); -} - -pub type TrustedTeleporter = staging_xcm_builder::Case; - -pub struct ParentOrParentsExecutivePlurality; -impl Contains for ParentOrParentsExecutivePlurality { - fn contains(location: &Location) -> bool { - matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }])) - } -} - -/// Type for specifying how a `Location` can be converted into an `AccountId`. -///// Transactors /////// -pub type ForeignAssetsAdapter = FungiblesAdapter< - ForeignAssets, - // Use this currency when it is a fungible asset matching the given location or name: - MatchedConvertedConcreteId< - Location, - u128, - IsParentsOnly>, - xcm_executor::traits::JustTry, - xcm_executor::traits::JustTry, - >, - // Convert an XCM Location into a local account id: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We do not allow teleportation of foreign assets. We only allow the reserve-based - // transfer of USDT, USDC and DOT. - NoChecking, - CheckingAccount, ->; - -/// Means for transacting assets on this chain. -/// How xcm deals with assets on this chain -pub type LocalAssetTransactor = FungibleAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // Do a simple punn to convert an AccountId32 Location into a native chain account ID: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We don't track any teleports. - (), ->; - -pub type AssetTransactors = (LocalAssetTransactor, ForeignAssetsAdapter); - -pub type Barrier = TrailingSetTopicAsId< - DenyThenTry< - DenyRecursively, - ( - TakeWeightCredit, - WithComputedOrigin< - ( - // we constraint this one so that we limit who can execute instructions - AllowTopLevelPaidExecutionFrom, - AllowExplicitUnpaidExecutionFrom, - // ^^^ Parent and its exec plurality get free execution - ), - UniversalLocation, - ConstU32<8>, - >, - ), - >, ->; - -pub struct AssetFrom(core::marker::PhantomData); - -impl> ContainsPair for AssetFrom { - fn contains(_asset: &Asset, location: &Location) -> bool { - let prefix = T::get(); - location == &prefix - } -} - -pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - type XcmEventEmitter = PolkadotXcm; - // How to withdraw and deposit an asset. - type AssetTransactor = AssetTransactors; - type OriginConverter = XcmOriginToTransactDispatchOrigin; - type IsReserve = (NativeAsset, AssetFrom); - // in order to register our asset in asset hub - // once the asset is registered we can teleport our native asset to asset hub - type IsTeleporter = TrustedTeleporter; - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; - type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; - type AssetClaims = PolkadotXcm; - type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); - type FeeManager = (); - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; - type HrmpNewChannelOpenRequestHandler = (); - type HrmpChannelAcceptedHandler = (); - type HrmpChannelClosingHandler = (); - type XcmRecorder = PolkadotXcm; -} - -/// Converts a local signed origin into an XCM location. Forms the basis for local origins -/// sending/executing XCMs. -pub type LocalOriginToLocation = SignedToAccountId32; - -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = WithUniqueTopic<( - // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, - // ..and XCMP to communicate with the sibling chains. - XcmpQueue, -)>; - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; - // update to Nothing and create extrinsic - type XcmExecuteFilter = Everything; - // ^ Disable dispatchable execute on the XCM pallet. - // Needs to be `Everything` for local testing. - type XcmExecutor = XcmExecutor; - // update to only allow to teleport native - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - // ^ Override for AdvertisedXcmVersion default - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); - // Aliasing is disabled: xcm_executor::Config::Aliasers is set to `Nothing`. - type AuthorizedAliasConsideration = Disabled; -} - -impl cumulus_pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - -/// Simple conversion of `u32` into an `AssetId` for use in benchmarking. -#[cfg(feature = "runtime-benchmarks")] -pub struct XcmBenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> ForeignAssetsAssetId { - Location::new(1, [Parachain(id)]) - } -} From 326718d6b73cf385536f94b2091890616b7c70fe Mon Sep 17 00:00:00 2001 From: eNDdy Date: Wed, 28 May 2025 11:24:52 -0600 Subject: [PATCH 3/4] rebase changes --- .../test/frequency-westend/Cargo.toml | 8 +- .../test/frequency-westend/src/lib.rs | 3 +- .../test/frequency-westend/src/tests/mod.rs | 2 + .../reserve_transfer_dot_from_asset_hub.rs | 81 ++++---------- .../tests/reserve_transfer_dot_from_relay.rs | 52 +++------ .../tests/reserve_transfer_dot_to_assethub.rs | 57 +++------- .../tests/reserve_transfer_dot_to_relay.rs | 77 ++++++------- ...eleport_xfrqcy_to_assethub_with_dot_fee.rs | 101 ++---------------- ...eport_xfrqcy_with_dot_fee_from_assethub.rs | 91 ++-------------- .../test/frequency-westend/src/tests/utils.rs | 98 +++++++++++++++++ runtime/frequency/src/lib.rs | 24 ++--- runtime/frequency/src/xcm/mod.rs | 5 +- runtime/frequency/src/xcm/queue.rs | 4 - 13 files changed, 217 insertions(+), 386 deletions(-) create mode 100644 emulated-test/test/frequency-westend/src/tests/utils.rs diff --git a/emulated-test/test/frequency-westend/Cargo.toml b/emulated-test/test/frequency-westend/Cargo.toml index ae7aa5c13e..3e70a86ca5 100644 --- a/emulated-test/test/frequency-westend/Cargo.toml +++ b/emulated-test/test/frequency-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Frequency"] -edition = '2021' +edition = '2021' homepage = "https://frequency.xyz" license = "Apache-2.0" name = "frequency-westend-integration-tests" @@ -19,8 +19,8 @@ pallet-xcm = { workspace = true } parachains-common = { workspace = true, default-features = true } sp-runtime = { workspace = true } westend-runtime = { workspace = true } -westend-system-emulated-network = { path = "../../networks/westend"} +westend-system-emulated-network = { path = "../../networks/westend" } xcm-executor = { workspace = true } -staging-xcm = { workspace = true } +staging-xcm = { workspace = true } pallet-assets = { workspace = true } -sp-io = { workspace = true } \ No newline at end of file +sp-io = { workspace = true } diff --git a/emulated-test/test/frequency-westend/src/lib.rs b/emulated-test/test/frequency-westend/src/lib.rs index d299bb3a91..30877a0484 100644 --- a/emulated-test/test/frequency-westend/src/lib.rs +++ b/emulated-test/test/frequency-westend/src/lib.rs @@ -12,7 +12,7 @@ mod imports { // Polkadot pub use staging_xcm::{ - latest::{AssetTransferFilter, ROCOCO_GENESIS_HASH, WESTEND_GENESIS_HASH}, + latest::AssetTransferFilter, prelude::{AccountId32 as AccountId32Junction, *}, }; @@ -23,7 +23,6 @@ mod imports { Test, TestArgs, TestContext, TestExt, }, xcm_helpers::{fee_asset, non_fee_asset}, - RESERVABLE_ASSET_ID, }; pub use parachains_common::Balance; pub use westend_system_emulated_network::{ diff --git a/emulated-test/test/frequency-westend/src/tests/mod.rs b/emulated-test/test/frequency-westend/src/tests/mod.rs index 577e04dbc3..6916d6c527 100644 --- a/emulated-test/test/frequency-westend/src/tests/mod.rs +++ b/emulated-test/test/frequency-westend/src/tests/mod.rs @@ -9,6 +9,8 @@ mod teleport_xfrqcy_to_assethub_with_dot_fee; mod teleport_xfrqcy_with_dot_fee_from_assethub; +mod utils; + #[macro_export] macro_rules! foreign_balance_on { ( $chain:ident, $id:expr, $who:expr ) => { diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs index b9145c2fd7..66c7558a3f 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs @@ -1,7 +1,8 @@ use crate::foreign_balance_on; use crate::imports::*; +use crate::tests::utils::ensure_dot_asset_exists_on_frequency; -fn system_para_to_para_reserve_transfer_assets(t: AssetHubToFrequencyTest) -> DispatchResult { +fn dispatch_asset_hub_to_frequency(t: AssetHubToFrequencyTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -12,7 +13,7 @@ fn system_para_to_para_reserve_transfer_assets(t: AssetHubToFrequencyTest) -> Di ) } -pub fn system_para_to_para_receiver_assertions(t: AssetHubToFrequencyTest) { +pub fn assert_receiver_on_frequency(t: AssetHubToFrequencyTest) { type RuntimeEvent = ::RuntimeEvent; FrequencyWestend::assert_xcmp_queue_success(None); @@ -30,8 +31,7 @@ pub fn system_para_to_para_receiver_assertions(t: AssetHubToFrequencyTest) { } } -pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { - use pallet_assets::Event as ForeignAssetsEvent; +pub fn assert_sender_from_asset_hub(t: AssetHubToFrequencyTest) { use pallet_balances::Event as BalancesEvent; use pallet_xcm::Event as XcmEvent; @@ -42,7 +42,6 @@ pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { let sov_acc_of_dest = AssetHubWestend::sovereign_account_id_of(t.args.dest.clone()); for asset in t.args.assets.into_inner() { - let expected_id = asset.id.0.clone().try_into().unwrap(); let asset_amount = match asset.fun { Fungible(amount) => amount, _ => panic!("Non-fungible assets are not supported in this test."), @@ -63,19 +62,8 @@ pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { ); }, - // Foreign asset from pallet-foreign-assets _ => { - assert_expected_events!( - AssetHubWestend, - vec![ - RuntimeEvent::ForeignAssets(ForeignAssetsEvent::Transferred { asset_id, from, to, amount }) => { - asset_id: *asset_id == expected_id, - from: *from == t.sender.account_id, - to: *to == sov_acc_of_dest, - amount: *amount == asset_amount, - }, - ] - ); + panic!("Only DOT transfers are supported in this test.") }, } } @@ -91,52 +79,22 @@ pub fn system_para_to_para_sender_assertions(t: AssetHubToFrequencyTest) { AssetHubWestend::assert_xcm_pallet_sent(); } - -fn create_dot_asset_on_frequency() { - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - type RuntimeEvent = ::RuntimeEvent; - let sudo_origin = ::RuntimeOrigin::root(); - - let _ = ForeignAssets::force_create( - sudo_origin, - Parent.into(), - FrequencyAssetOwner::get().into(), - false, - 1u128.into(), - ); - - assert_expected_events!( - FrequencyWestend, - vec![ - RuntimeEvent::ForeignAssets( - pallet_assets::Event::ForceCreated { asset_id, .. } - ) => { - asset_id: *asset_id == Parent.into(), - }, - ] - ); - - assert!(>::asset_exists(Parent.into())); - }); -} - // ========================================================================= // ======= Reserve Transfers - WSND Native Asset - AssetHub<>Frequency========== // ========================================================================= /// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work -//RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_asset_hub_to_frequency -p frequency-westend-integration-tests -- --nocapture +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_asset_hub -- --nocapture #[test] -fn reserve_transfer_dot_from_asset_hub_to_frequency() { - create_dot_asset_on_frequency(); +fn reserve_transfer_dot_from_asset_hub() { + ensure_dot_asset_exists_on_frequency(); let destination = AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); let sender = AssetHubWestendSender::get(); let amount_to_send: Balance = AssetHubExistentialDeposit::get() * 2000; - let assets: Assets = (Parent, amount_to_send).into(); + let assets_to_send: Assets = (Parent, amount_to_send).into(); // Init values for Parachain - let system_para_native_asset_location = WestendLocation::get(); + let dot_asset_location = WestendLocation::get(); let receiver = FrequencyWestendReceiver::get(); let test_args = TestContext { @@ -146,7 +104,7 @@ fn reserve_transfer_dot_from_asset_hub_to_frequency() { destination.clone(), receiver.clone(), amount_to_send, - assets.clone(), + assets_to_send.clone(), None, 0, ), @@ -157,19 +115,22 @@ fn reserve_transfer_dot_from_asset_hub_to_frequency() { let sender_balance_before = test.sender.balance; let receiver_assets_before = - foreign_balance_on!(FrequencyWestend, system_para_native_asset_location.clone(), &receiver); + foreign_balance_on!(FrequencyWestend, dot_asset_location.clone(), &receiver); - assert!(receiver_assets_before == 0u128); + assert!( + receiver_assets_before == 0u128, + "Expected receiver to start with zero DOT on Frequency" + ); - test.set_assertion::(system_para_to_para_sender_assertions); - test.set_assertion::(system_para_to_para_receiver_assertions); - test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.set_assertion::(assert_sender_from_asset_hub); + test.set_assertion::(assert_receiver_on_frequency); + test.set_dispatchable::(dispatch_asset_hub_to_frequency); test.assert(); let sender_balance_after = test.sender.balance; let receiver_assets_after = - foreign_balance_on!(FrequencyWestend, system_para_native_asset_location.clone(), &receiver); + foreign_balance_on!(FrequencyWestend, dot_asset_location, &receiver); assert!( sender_balance_after < sender_balance_before - amount_to_send, @@ -181,5 +142,5 @@ fn reserve_transfer_dot_from_asset_hub_to_frequency() { // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // should be non-zero - assert!(receiver_assets_after < receiver_assets_before + amount_to_send); + assert!(receiver_assets_after < receiver_assets_before + amount_to_send, "Receiver's assets increased more than expected (delivery or execution fees may be missing)"); } diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs index df7434a691..e51d0b6c1f 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs @@ -1,8 +1,9 @@ use crate::foreign_balance_on; use crate::imports::*; +use crate::tests::utils::ensure_dot_asset_exists_on_frequency; use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp; -fn relay_to_frequency_receiver_assertions(t: RelayToFrequencyTest) { +fn assert_receiver_on_frequency(t: RelayToFrequencyTest) { type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( @@ -19,7 +20,7 @@ fn relay_to_frequency_receiver_assertions(t: RelayToFrequencyTest) { ); } -fn relay_to_frequency_reserve_transfer_assets(t: RelayToFrequencyTest) -> DispatchResult { +fn dispatch_relay_to_frequency(t: RelayToFrequencyTest) -> DispatchResult { let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else { unimplemented!("Destination is not a parachain?") }; @@ -35,7 +36,7 @@ fn relay_to_frequency_reserve_transfer_assets(t: RelayToFrequencyTest) -> Dispat ) } -fn relay_to_frequency_sender_assertions(t: RelayToFrequencyTest) { +fn assert_sender_from_relay(t: RelayToFrequencyTest) { type RuntimeEvent = ::RuntimeEvent; Westend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(297_174_000, 6_196))); @@ -57,49 +58,20 @@ fn relay_to_frequency_sender_assertions(t: RelayToFrequencyTest) { ); } -fn create_dot_asset_on_frequency() { - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - type RuntimeEvent = ::RuntimeEvent; - let sudo_origin = ::RuntimeOrigin::root(); - - let _ = ForeignAssets::force_create( - sudo_origin, - Parent.into(), - FrequencyAssetOwner::get().into(), - false, - 1u128.into(), - ); - - assert_expected_events!( - FrequencyWestend, - vec![ - RuntimeEvent::ForeignAssets( - pallet_assets::Event::ForceCreated { asset_id, .. } - ) => { - asset_id: *asset_id == Parent.into(), - }, - ] - ); - - assert!(>::asset_exists(Parent.into())); - }); -} - // ========================================================================= // ========= Reserve Transfers - DOT Asset - Relay<>Frequency =========== // ========================================================================= /// Reserve Transfers of DOT from Relay to Parachain should work -// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_relay_to_frequency -p frequency-westend-integration-tests -- --nocapture +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_relay_to_frequency -- --nocapture // transfer_type=DestinationReserve #[test] fn reserve_transfer_dot_from_relay_to_frequency() { - create_dot_asset_on_frequency(); + ensure_dot_asset_exists_on_frequency(); let destination = Westend::child_location_of(FrequencyWestend::para_id()); let sender = WestendSender::get(); let amount_to_send: Balance = WESTEND_ED * 1000; - let relay_native_asset_location = WestendLocation::get(); + let dot_asset_location = WestendLocation::get(); let receiver = FrequencyWestendReceiver::get(); let test_args = TestContext { @@ -112,16 +84,16 @@ fn reserve_transfer_dot_from_relay_to_frequency() { let sender_balance_before = test.sender.balance; let receiver_assets_before = - foreign_balance_on!(FrequencyWestend, relay_native_asset_location.clone(), &receiver); + foreign_balance_on!(FrequencyWestend, dot_asset_location.clone(), &receiver); - test.set_assertion::(relay_to_frequency_sender_assertions); - test.set_assertion::(relay_to_frequency_receiver_assertions); - test.set_dispatchable::(relay_to_frequency_reserve_transfer_assets); + test.set_assertion::(assert_sender_from_relay); + test.set_assertion::(assert_receiver_on_frequency); + test.set_dispatchable::(dispatch_relay_to_frequency); test.assert(); let sender_balance_after = test.sender.balance; let receiver_assets_after = - foreign_balance_on!(FrequencyWestend, relay_native_asset_location, &receiver); + foreign_balance_on!(FrequencyWestend, dot_asset_location, &receiver); // Sender's balance is reduced by amount sent plus delivery fees assert!(sender_balance_after < sender_balance_before - amount_to_send); diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs index 3f84244498..8c8aacb851 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs @@ -1,5 +1,6 @@ use crate::foreign_balance_on; use crate::imports::*; +use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}; fn dispatch_reserve_transfer_dot(t: FrequencyToAssetHubTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( @@ -42,25 +43,15 @@ fn assert_receiver_receives_dot_correctly(t: FrequencyToAssetHubTest) { assert_expected_events!( AssetHubWestend, vec![ - // Amount to reserve transfer is burned from Parachain's Sovereign account - RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { - asset_id: *asset_id == RESERVABLE_ASSET_ID, - owner: *owner == sov_frequency_on_ahr, - balance: *balance == t.args.amount, - }, - // Fee amount is burned from Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Burned { who, .. }) => { + // Amount to reserve transfer is burned from Frequency's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount, .. }) => { who: *who == sov_frequency_on_ahr, - }, - // Amount to reserve transfer is issued for beneficiary - RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { - asset_id: *asset_id == RESERVABLE_ASSET_ID, - owner: *owner == t.receiver.account_id, amount: *amount == t.args.amount, }, - // Remaining fee amount is minted for for beneficiary - RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + // Remaining amount, minus fee, is minted for for beneficiary + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { who: *who == t.receiver.account_id, + amount: *amount < t.args.amount, }, ] ); @@ -81,48 +72,30 @@ fn build_reserve_transfer_test( FrequencyToAssetHubTest::new(test_args) } -fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { - // Create and mint DOT-derived asset on Frequency - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - let sender = FrequencyWestendSender::get(); - - let _ = >::create( - Parent.into(), - sender.clone(), - false, - 1u32.into(), - ); - - let _ = >::mint_into( - Parent.into(), - &sender.clone(), - amount_to_send * 2, - ); - - assert!(>::asset_exists(Parent.into())); - }); - +fn fund_sov_frequency_account_on_ah(amount: Balance) { // Fund Frequency sovereign account on AssetHub let frequency_location_as_seen_by_ahr = AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); let sov_frequency_on_ahr = AssetHubWestend::sovereign_account_id_of(frequency_location_as_seen_by_ahr); - AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount_to_send * 2)]); + AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount * 2)]); } // ========================================================================= // ======= Reserve Transfers - WSND Native Asset - Frequency<>AssetHub========== // ========================================================================= /// Reserve Transfers of Frequency Native from Asset Hub to Frequency should work -// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_frequency_to_asset_hub -p frequency-westend-integration-tests -- --nocapture +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_to_assethub -p frequency-westend-integration-tests -- --nocapture #[test] -fn reserve_transfer_dot_from_frequency_to_assethub() { +fn reserve_transfer_dot_to_assethub() { + let sender = FrequencyWestendSender::get(); let amount_dot_to_send: Balance = AssetHubExistentialDeposit::get() * 1000; - setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_dot_to_send); - let sender = FrequencyWestendSender::get(); + ensure_dot_asset_exists_on_frequency(); + mint_dot_on_frequency(sender.clone(), amount_dot_to_send * 2); + fund_sov_frequency_account_on_ah(amount_dot_to_send); + let receiver = AssetHubWestendReceiver::get(); let destination = FrequencyWestend::sibling_location_of(AssetHubWestend::para_id()); let assets: Assets = (Parent, amount_dot_to_send).into(); diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs index ec1dbcee51..7c970c8033 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs @@ -1,5 +1,6 @@ use crate::foreign_balance_on; use crate::imports::*; +use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}; fn frequency_to_relay_reserve_transfer_assets(t: FrequencyToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( @@ -12,9 +13,9 @@ fn frequency_to_relay_reserve_transfer_assets(t: FrequencyToRelayTest) -> Dispat ) } -fn frequency_to_relay_receiver_assertions(t: FrequencyToRelayTest) { +fn assert_receiver_minted_on_relay(t: FrequencyToRelayTest) { type RuntimeEvent = ::RuntimeEvent; - let sov_penpal_on_relay = + let sov_frequency_on_relay = Westend::sovereign_account_id_of(Westend::child_location_of(FrequencyWestend::para_id())); Westend::assert_ump_queue_processed( @@ -30,7 +31,7 @@ fn frequency_to_relay_receiver_assertions(t: FrequencyToRelayTest) { RuntimeEvent::Balances( pallet_balances::Event::Burned { who, amount } ) => { - who: *who == sov_penpal_on_relay.clone().into(), + who: *who == sov_frequency_on_relay.clone().into(), amount: *amount == t.args.amount, }, RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, @@ -41,7 +42,7 @@ fn frequency_to_relay_receiver_assertions(t: FrequencyToRelayTest) { ); } -fn frequency_to_relay_sender_assertions(t: FrequencyToRelayTest) { +fn assert_sender_burned_asset_on_frequency(t: FrequencyToRelayTest) { type RuntimeEvent = ::RuntimeEvent; // FrequencyWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( // 864_610_000, @@ -62,55 +63,37 @@ fn frequency_to_relay_sender_assertions(t: FrequencyToRelayTest) { ); } -fn setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send: Balance) { - // Create and mint DOT-derived asset on Frequency - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - let owner = FrequencyAssetOwner::get(); - let sender = FrequencyWestendSender::get(); - - let _ = >::create( - Parent.into(), - owner.clone(), - false, - 1u32.into(), - ); - - let _ = >::mint_into( - Parent.into(), - &sender.clone(), - amount_to_send * 2, - ); - - assert!(>::asset_exists(Parent.into())); - }); - - // Fund Frequency sovereign account on AssetHub - let frequency_location_as_seen_by_relay = - Westend::child_location_of(FrequencyWestend::para_id()); - let sov_frequency_on_westend = - Westend::sovereign_account_id_of(frequency_location_as_seen_by_relay); - - Westend::fund_accounts(vec![(sov_frequency_on_westend.into(), amount_to_send * 2)]); +pub fn setup_parent_asset_on_frequency( + account: AccountIdOf<::Runtime>, + amount: Balance, +) { + ensure_dot_asset_exists_on_frequency(); + mint_dot_on_frequency(account, amount) +} + +pub fn fund_sov_frequency_on_westend(amount: Balance) { + let freq_location = Westend::child_location_of(FrequencyWestend::para_id()); + let sov_account = Westend::sovereign_account_id_of(freq_location); + Westend::fund_accounts(vec![(sov_account.into(), amount)]); } // ========================================================================= // ========= Reserve Transfers - DOT Asset - Frequency<>Relay =========== // ========================================================================= -/// Reserve Transfers of DOT from Relay to Parachain should work // RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::reserve_transfer_dot_from_frequency_to_relay -p frequency-westend-integration-tests -- --nocapture +/// Tests reserve transfer of DOT from Frequency to Relay (Westend). +/// Ensures sovereign account on relay is debited and receiver is credited. #[test] fn reserve_transfer_dot_from_frequency_to_relay() { - let destination = FrequencyWestend::parent_location(); let sender = FrequencyWestendSender::get(); + let receiver = WestendReceiver::get(); let amount_to_send: Balance = WESTEND_ED * 1000; - let assets: Assets = (Parent, amount_to_send).into(); - // let asset_owner = FrequencyAssetOwner::get(); - let relay_native_asset_location = WestendLocation::get(); - setup_foreign_asset_on_frequency_and_fund_ah_sov(amount_to_send); + setup_parent_asset_on_frequency(sender.clone(), amount_to_send * 2); + fund_sov_frequency_on_westend(amount_to_send * 2); - let receiver = WestendReceiver::get(); + let assets: Assets = (Parent, amount_to_send).into(); + let destination = FrequencyWestend::parent_location(); let test_args = TestContext { sender: sender.clone(), @@ -127,18 +110,18 @@ fn reserve_transfer_dot_from_frequency_to_relay() { let mut test = FrequencyToRelayTest::new(test_args); - let sender_assets_before = - foreign_balance_on!(FrequencyWestend, relay_native_asset_location.clone(), &sender); + let dot_location = WestendLocation::get(); + + let sender_assets_before = foreign_balance_on!(FrequencyWestend, dot_location.clone(), &sender); let receiver_balance_before = test.receiver.balance; - test.set_assertion::(frequency_to_relay_sender_assertions); - test.set_assertion::(frequency_to_relay_receiver_assertions); + test.set_assertion::(assert_sender_burned_asset_on_frequency); + test.set_assertion::(assert_receiver_minted_on_relay); test.set_dispatchable::(frequency_to_relay_reserve_transfer_assets); test.assert(); - let sender_assets_after = - foreign_balance_on!(FrequencyWestend, relay_native_asset_location, &sender); + let sender_assets_after = foreign_balance_on!(FrequencyWestend, dot_location, &sender); let receiver_balance_after = test.receiver.balance; diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs index a3bf2e68fe..b4cc6e67f3 100644 --- a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs @@ -1,9 +1,6 @@ use crate::foreign_balance_on; use crate::imports::*; - -pub const ASSET_MIN_BALANCE: u128 = 1; - - +use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency, create_frequency_asset_on_ah}; fn frequency_location_as_seen_by_asset_hub() -> Location { AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()) @@ -17,11 +14,6 @@ fn find_fee_asset_item(assets: Assets, fee_asset_id: AssetId) -> u32 { .expect("Fee asset not found in asset list") as u32 } -fn setup_frequency_to_asset_hub_test_env(dot_to_send: Balance) { - setup_foreign_dot_on_frequency_and_fund_sov_on_ah(dot_to_send); - create_frequency_asset_on_ah(); -} - fn build_fee_and_value_assets(fee_dot: Balance, native_token: Balance) -> Vec { vec![ (Parent, fee_dot).into(), // DOT - used as fee @@ -46,84 +38,11 @@ fn build_frequency_to_asset_hub_test( FrequencyToAssetHubTest::new(test_args) } -fn mint_dot_on_frequency( - beneficiary: AccountIdOf<::Runtime>, - amount_to_mint: Balance, -) { - type ForeignAssets = ::ForeignAssets; - type RuntimeEvent = ::RuntimeEvent; - - FrequencyWestend::execute_with(|| { - let signed_origin = - ::RuntimeOrigin::signed(FrequencyAssetOwner::get()); - - assert_ok!(ForeignAssets::mint( - signed_origin, - Parent.into(), - beneficiary.clone().into(), - amount_to_mint - )); - - assert_expected_events!( - FrequencyWestend, - vec![ - RuntimeEvent::ForeignAssets( - pallet_assets::Event::Issued { asset_id, owner, amount } - ) => { - asset_id: *asset_id == Parent.into(), - owner: *owner == beneficiary.clone().into(), - amount: *amount == amount_to_mint, - }, - ] - ); - }); -} - -fn setup_foreign_dot_on_frequency_and_fund_sov_on_ah(amount_to_send: Balance) { - // Create and mint DOT-derived asset on Frequency - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - let sender = FrequencyWestendSender::get(); - - let _ = >::create( - Parent.into(), - sender.clone(), - false, - 1u32.into(), - ); - - let _ = >::mint_into( - Parent.into(), - &sender.clone(), - amount_to_send * 2, - ); - - assert!(>::asset_exists(Parent.into())); - }); - - // Fund Frequency sovereign account on AssetHub - let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); - let sov_frequency_on_ahr = AssetHubWestend::sovereign_account_id_of(frequency_location_on_ah); - - AssetHubWestend::fund_accounts(vec![(sov_frequency_on_ahr.into(), amount_to_send * 2)]); -} - -fn create_frequency_asset_on_ah() { - let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); - - AssetHubWestend::force_create_foreign_asset( - frequency_location_on_ah.clone().try_into().unwrap(), - FrequencyAssetOwner::get(), - false, - ASSET_MIN_BALANCE, - vec![], - ); - - AssetHubWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - - assert!(>::asset_exists(frequency_location_on_ah)); - }); +pub fn fund_sov_frequency_on_assethub(amount: Balance) { + let frequency_location_on_ah = + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + let sov_account = AssetHubWestend::sovereign_account_id_of(frequency_location_on_ah); + AssetHubWestend::fund_accounts(vec![(sov_account.into(), amount)]); } fn execute_xcm_frequency_to_asset_hub(t: FrequencyToAssetHubTest) -> DispatchResult { @@ -260,10 +179,13 @@ fn teleport_xfrqcy_to_assethub_with_dot_fee() { // ──────────────── let dot_fee_amount: Balance = AssetHubExistentialDeposit::get() * 1000; let xrqcy_transfer_amount = FrequencyExistentialDeposit::get() * 1000; + let sender = FrequencyWestendSender::get(); - setup_frequency_to_asset_hub_test_env(dot_fee_amount); + ensure_dot_asset_exists_on_frequency(); + mint_dot_on_frequency(sender.clone(), dot_fee_amount * 2); + fund_sov_frequency_on_assethub(dot_fee_amount * 2); + create_frequency_asset_on_ah(); - let sender = FrequencyWestendSender::get(); let receiver = AssetHubWestendReceiver::get(); let destination = FrequencyWestend::sibling_location_of(AssetHubWestend::para_id()); let frequency_location_on_ah = frequency_location_as_seen_by_asset_hub(); @@ -281,7 +203,6 @@ fn teleport_xfrqcy_to_assethub_with_dot_fee() { foreign_balance_on!(FrequencyWestend, Parent.into(), &sender); assert_eq!(sender_balance_of_dot_on_frequency_before, 2_000_000_000_000u128); - let frequency_sender_native_before = frequency_balance_of(&sender); assert_eq!(frequency_sender_native_before, 4_096_000_000u128); diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs index aed6636f55..7a91f81a60 100644 --- a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs @@ -1,7 +1,8 @@ use crate::foreign_balance_on; use crate::imports::*; - -pub const ASSET_MIN_BALANCE: u128 = 1; +use crate::tests::utils::{ + create_frequency_asset_on_ah, ensure_dot_asset_exists_on_frequency, mint_xrqcy_on_asset_hub, +}; fn frequency_location_as_seen_by_asset_hub() -> Location { AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()) @@ -22,7 +23,7 @@ fn build_fee_and_value_assets(fee_dot: Balance, xrqcy_teleport_amount: Balance) ] } -fn build_asset_hub_to_frequency_test( +fn build_assethub_to_frequency_test( sender: AccountIdOf<::Runtime>, receiver: AccountIdOf<::Runtime>, destination: Location, @@ -85,7 +86,7 @@ fn assert_sender_assets_burned_correctly(t: AssetHubToFrequencyTest) { } fn assert_receiver_fee_burned_and_asset_minted(t: AssetHubToFrequencyTest) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; FrequencyWestend::assert_xcmp_queue_success(None); let (_, total_fee) = fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); @@ -95,7 +96,7 @@ fn assert_receiver_fee_burned_and_asset_minted(t: AssetHubToFrequencyTest) { non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); assert_expected_events!( - AssetHubWestend, + FrequencyWestend, vec![ // Mint remaining fees and deposit them into receiver otherwise RuntimeEvent::Balances( @@ -115,80 +116,6 @@ fn assert_receiver_fee_burned_and_asset_minted(t: AssetHubToFrequencyTest) { ); } -fn mint_xrqcy_on_asset_hub( - beneficiary: AccountIdOf<::Runtime>, - amount_to_mint: Balance, -) { - type ForeignAssets = ::ForeignAssets; - type RuntimeEvent = ::RuntimeEvent; - - AssetHubWestend::execute_with(|| { - let signed_origin = - ::RuntimeOrigin::signed(FrequencyAssetOwner::get()); - - assert_ok!(ForeignAssets::mint( - signed_origin, - frequency_location_as_seen_by_asset_hub().into(), - beneficiary.clone().into(), - amount_to_mint - )); - - assert_expected_events!( - AssetHubWestend, - vec![ - RuntimeEvent::ForeignAssets( - pallet_assets::Event::Issued { asset_id, owner, amount } - ) => { - asset_id: *asset_id == frequency_location_as_seen_by_asset_hub().into(), - owner: *owner == beneficiary.clone().into(), - amount: *amount == amount_to_mint, - }, - ] - ); - }); -} - -fn create_dot_asset_on_frequency() { - FrequencyWestend::execute_with(|| { - type ForeignAssets = ::ForeignAssets; - type RuntimeEvent = ::RuntimeEvent; - let sudo_origin = ::RuntimeOrigin::root(); - - let _ = ForeignAssets::force_create( - sudo_origin, - Parent.into(), - FrequencyAssetOwner::get().into(), - false, - 1u128.into(), - ); - - assert_expected_events!( - FrequencyWestend, - vec![ - RuntimeEvent::ForeignAssets( - pallet_assets::Event::ForceCreated { asset_id, .. } - ) => { - asset_id: *asset_id == Parent.into(), - }, - ] - ); - - assert!(>::asset_exists(Parent.into())); - }); -} - -fn create_frequency_asset_on_ah() { - let frequency_location_on_asset_hub = frequency_location_as_seen_by_asset_hub(); - - AssetHubWestend::force_create_foreign_asset( - frequency_location_on_asset_hub.clone().try_into().unwrap(), - FrequencyAssetOwner::get(), - false, - ASSET_MIN_BALANCE, - vec![], - ); -} - fn execute_xcm_asset_hub_to_frequency(t: AssetHubToFrequencyTest) -> DispatchResult { let all_assets = t.args.assets.clone().into_inner(); let mut assets = all_assets.clone(); @@ -227,7 +154,7 @@ fn execute_xcm_asset_hub_to_frequency(t: AssetHubToFrequencyTest) -> DispatchRes // =========================================================================== // ======= DOT (fee) + xFRQCY (value) Transfer: AssetHub → Frequency ========= // =========================================================================== -// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::teleport_xfrqcy_with_dot_fee_from_assethub -p frequency-westend-integration-tests -- --nocapture +// RUST_BACKTRACE=1 RUST_LOG="events,runtime::system=trace,xcm=trace" cargo test tests::teleport_xfrqcy_with_dot_fee_from_assethub -- --nocapture #[test] fn teleport_xfrqcy_with_dot_fee_from_assethub() { // ──────────────── @@ -242,7 +169,7 @@ fn teleport_xfrqcy_with_dot_fee_from_assethub() { AssetHubExistentialDeposit::get() * 100, )]); - create_dot_asset_on_frequency(); + ensure_dot_asset_exists_on_frequency(); create_frequency_asset_on_ah(); mint_xrqcy_on_asset_hub( AssetHubWestendSender::get().clone(), @@ -287,7 +214,7 @@ fn teleport_xfrqcy_with_dot_fee_from_assethub() { // ───────────────────────────── // Build Test Context // ───────────────────────────── - let mut test = build_asset_hub_to_frequency_test( + let mut test = build_assethub_to_frequency_test( sender.clone(), receiver.clone(), destination.clone(), diff --git a/emulated-test/test/frequency-westend/src/tests/utils.rs b/emulated-test/test/frequency-westend/src/tests/utils.rs new file mode 100644 index 0000000000..700dc38343 --- /dev/null +++ b/emulated-test/test/frequency-westend/src/tests/utils.rs @@ -0,0 +1,98 @@ +use crate::imports::*; + +pub fn ensure_dot_asset_exists_on_frequency() { + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + let sudo_origin = ::RuntimeOrigin::root(); + + let _ = ForeignAssets::force_create( + sudo_origin, + Parent.into(), + FrequencyAssetOwner::get().into(), + false, + 1u128.into(), + ); + + assert_expected_events!( + FrequencyWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::ForceCreated { asset_id, .. } + ) => { + asset_id: *asset_id == Parent.into(), + }, + ] + ); + + assert!(>::asset_exists(Parent.into())); + }); +} + +pub const ASSET_MIN_BALANCE: u128 = 1; + +pub fn create_frequency_asset_on_ah() { + let frequency_location_on_ah = + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + + AssetHubWestend::force_create_foreign_asset( + frequency_location_on_ah.clone().try_into().unwrap(), + FrequencyAssetOwner::get(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + AssetHubWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + + assert!(>::asset_exists(frequency_location_on_ah)); + }); +} + +pub fn mint_dot_on_frequency( + account: AccountIdOf<::Runtime>, + amount: Balance, +) { + FrequencyWestend::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + let dot_asset_id = Parent.into(); + + let _ = >::mint_into(dot_asset_id, &account, amount); + }); +} + +pub fn mint_xrqcy_on_asset_hub( + beneficiary: AccountIdOf<::Runtime>, + amount_to_mint: Balance, +) { + type ForeignAssets = ::ForeignAssets; + type RuntimeEvent = ::RuntimeEvent; + let frequency_location_as_seen_by_asset_hub = + AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()); + + AssetHubWestend::execute_with(|| { + let signed_origin = + ::RuntimeOrigin::signed(FrequencyAssetOwner::get()); + + assert_ok!(ForeignAssets::mint( + signed_origin, + frequency_location_as_seen_by_asset_hub.clone().into(), + beneficiary.clone().into(), + amount_to_mint + )); + + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == frequency_location_as_seen_by_asset_hub.clone().into(), + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); +} diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index c262c41c0e..edc9810803 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -22,13 +22,13 @@ pub mod xcm; // use pallet_assets::BenchmarkHelper; #[cfg(feature = "frequency-bridging")] use xcm::{ - parameters::{RelayOrigin, ReservedDmpWeight, ReservedXcmpWeight, ForeignAssetsAssetId}, - queue as xcm_queue, + parameters::{ + ForeignAssetsAssetId, NativeToken, RelayLocation, RelayOrigin, ReservedDmpWeight, + ReservedXcmpWeight, + }, + queue::XcmRouter, LocationToAccountId, XcmConfig, }; -#[cfg(feature = "frequency-bridging")] -mod xcm; // Tests are contained the xcm directory - use alloc::borrow::Cow; use common_runtime::constants::currency::UNITS; @@ -1447,7 +1447,7 @@ impl pallet_assets::Config for Runtime { type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = xcm_config::XcmBenchmarkHelper; + type BenchmarkHelper = xcm::xcm_config::XcmBenchmarkHelper; type Holder = (); } @@ -1957,7 +1957,7 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "frequency-bridging")] impl xcm_runtime_apis::fees::XcmPaymentApi for Runtime { fn query_acceptable_payment_assets(xcm_version: staging_xcm::Version) -> Result, XcmPaymentApiError> { - let acceptable_assets = vec![AssetLocationId(xcm_config::RelayLocation::get())]; + let acceptable_assets = vec![AssetLocationId(RelayLocation::get())]; PolkadotXcm::query_acceptable_payment_assets(xcm_version, acceptable_assets) } @@ -1966,11 +1966,11 @@ sp_api::impl_runtime_apis! { use frame_support::weights::WeightToFee; match asset.try_as::() { - Ok(asset_id) if asset_id.0 == xcm_config::NativeToken::get().0 => { + Ok(asset_id) if asset_id.0 == NativeToken::get().0 => { // FRQCY/XRQCY, native token Ok(common_runtime::fee::WeightToFee::weight_to_fee(&weight)) }, - Ok(asset_id) if asset_id.0 == xcm_config::RelayLocation::get() => { + Ok(asset_id) if asset_id.0 == RelayLocation::get() => { // DOT, WND, or KSM on the relay chain // calculate fee in DOT using Polkadot relay fee schedule let dot_fee = crate::polkadot_xcm_fee::default_fee_per_second() @@ -2001,11 +2001,11 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "frequency-bridging")] impl xcm_runtime_apis::dry_run::DryRunApi for Runtime { fn dry_run_call(origin: OriginCaller, call: RuntimeCall, result_xcms_version: XcmVersion) -> Result, XcmDryRunApiError> { - PolkadotXcm::dry_run_call::(origin, call, result_xcms_version) + PolkadotXcm::dry_run_call::(origin, call, result_xcms_version) } fn dry_run_xcm(origin_location: VersionedLocation, xcm: VersionedXcm) -> Result, XcmDryRunApiError> { - PolkadotXcm::dry_run_xcm::(origin_location, xcm) + PolkadotXcm::dry_run_xcm::(origin_location, xcm) } } @@ -2017,7 +2017,7 @@ sp_api::impl_runtime_apis! { > { xcm_runtime_apis::conversions::LocationToAccountHelper::< AccountId, - xcm_commons::LocationToAccountId, + LocationToAccountId, >::convert_location(location) } } diff --git a/runtime/frequency/src/xcm/mod.rs b/runtime/frequency/src/xcm/mod.rs index fb58c4147a..e2e1b10fc2 100644 --- a/runtime/frequency/src/xcm/mod.rs +++ b/runtime/frequency/src/xcm/mod.rs @@ -21,12 +21,11 @@ pub use location_converter::{ LocalOriginToLocation, LocationToAccountId, XcmOriginToTransactDispatchOrigin, }; pub use parameters::{ - BaseDeliveryFee, FeeAssetId, ForeignAssetsAssetId, MaxAssetsIntoHolding, RelayNetwork, - TransactionByteFee, UniversalLocation, + BaseDeliveryFee, FeeAssetId, ForeignAssetsAssetId, MaxAssetsIntoHolding, NativeToken, + RelayLocation, RelayNetwork, TransactionByteFee, UniversalLocation, }; pub use queue::XcmRouter; pub use reserve::TrustedReserves; pub use teleporter::TrustedTeleporters; pub use trader::Trader; pub use weigher::Weigher; - diff --git a/runtime/frequency/src/xcm/queue.rs b/runtime/frequency/src/xcm/queue.rs index 0cb8a2f89f..0e0626e5ce 100644 --- a/runtime/frequency/src/xcm/queue.rs +++ b/runtime/frequency/src/xcm/queue.rs @@ -22,10 +22,6 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; -// use xcm_config; -#[cfg(not(feature = "runtime-benchmarks"))] -use super::xcm_config; - pub use sp_runtime::{Perbill, Saturating}; #[cfg(not(feature = "runtime-benchmarks"))] From 4ea169fe993ca518d992b1784449870e5f95e4d6 Mon Sep 17 00:00:00 2001 From: eNDdy Date: Wed, 28 May 2025 19:14:37 -0600 Subject: [PATCH 4/4] lint --- .../test/frequency-westend/src/lib.rs | 8 +-- .../reserve_transfer_dot_from_asset_hub.rs | 4 +- .../tests/reserve_transfer_dot_from_relay.rs | 4 +- .../tests/reserve_transfer_dot_to_assethub.rs | 8 +-- .../tests/reserve_transfer_dot_to_relay.rs | 8 +-- ...eleport_xfrqcy_to_assethub_with_dot_fee.rs | 14 ++++-- ...eport_xfrqcy_with_dot_fee_from_assethub.rs | 10 ++-- runtime/frequency/src/lib.rs | 49 +++++++++---------- runtime/frequency/src/xcm/asset_transactor.rs | 2 +- runtime/frequency/src/xcm/queue.rs | 8 +-- 10 files changed, 61 insertions(+), 54 deletions(-) diff --git a/emulated-test/test/frequency-westend/src/lib.rs b/emulated-test/test/frequency-westend/src/lib.rs index 30877a0484..ed5e0ebb5d 100644 --- a/emulated-test/test/frequency-westend/src/lib.rs +++ b/emulated-test/test/frequency-westend/src/lib.rs @@ -3,9 +3,11 @@ mod imports { pub use frame_support::{ assert_ok, sp_runtime::DispatchResult, - traits::fungible::Inspect, - traits::fungibles::{ - Create as FungiblesCreate, Inspect as FungiblesInspect, Mutate as FungiblesMutate, + traits::{ + fungible::Inspect, + fungibles::{ + Create as FungiblesCreate, Inspect as FungiblesInspect, Mutate as FungiblesMutate, + }, }, BoundedVec, }; diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs index 66c7558a3f..f26dbe3d96 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_asset_hub.rs @@ -1,6 +1,4 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::ensure_dot_asset_exists_on_frequency; +use crate::{foreign_balance_on, imports::*, tests::utils::ensure_dot_asset_exists_on_frequency}; fn dispatch_asset_hub_to_frequency(t: AssetHubToFrequencyTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs index e51d0b6c1f..3bf06b6f78 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_from_relay.rs @@ -1,6 +1,4 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::ensure_dot_asset_exists_on_frequency; +use crate::{foreign_balance_on, imports::*, tests::utils::ensure_dot_asset_exists_on_frequency}; use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp; fn assert_receiver_on_frequency(t: RelayToFrequencyTest) { diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs index 8c8aacb851..18c03cfb7a 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_assethub.rs @@ -1,6 +1,8 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}; +use crate::{ + foreign_balance_on, + imports::*, + tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}, +}; fn dispatch_reserve_transfer_dot(t: FrequencyToAssetHubTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( diff --git a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs index 7c970c8033..18e5635ce3 100644 --- a/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs +++ b/emulated-test/test/frequency-westend/src/tests/reserve_transfer_dot_to_relay.rs @@ -1,6 +1,8 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}; +use crate::{ + foreign_balance_on, + imports::*, + tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency}, +}; fn frequency_to_relay_reserve_transfer_assets(t: FrequencyToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs index b4cc6e67f3..33d1d5ede4 100644 --- a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_to_assethub_with_dot_fee.rs @@ -1,6 +1,10 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::{ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency, create_frequency_asset_on_ah}; +use crate::{ + foreign_balance_on, + imports::*, + tests::utils::{ + create_frequency_asset_on_ah, ensure_dot_asset_exists_on_frequency, mint_dot_on_frequency, + }, +}; fn frequency_location_as_seen_by_asset_hub() -> Location { AssetHubWestend::sibling_location_of(FrequencyWestend::para_id()) @@ -238,8 +242,8 @@ fn teleport_xfrqcy_to_assethub_with_dot_fee() { foreign_balance_on!(AssetHubWestend, frequency_location_on_ah.clone(), &receiver); assert!( - sender_balance_of_dot_on_frequency_after - < sender_balance_of_dot_on_frequency_before + dot_fee_amount + sender_balance_of_dot_on_frequency_after < + sender_balance_of_dot_on_frequency_before + dot_fee_amount ); assert_eq!( diff --git a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs index 7a91f81a60..4cc3eea475 100644 --- a/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs +++ b/emulated-test/test/frequency-westend/src/tests/teleport_xfrqcy_with_dot_fee_from_assethub.rs @@ -1,7 +1,9 @@ -use crate::foreign_balance_on; -use crate::imports::*; -use crate::tests::utils::{ - create_frequency_asset_on_ah, ensure_dot_asset_exists_on_frequency, mint_xrqcy_on_asset_hub, +use crate::{ + foreign_balance_on, + imports::*, + tests::utils::{ + create_frequency_asset_on_ah, ensure_dot_asset_exists_on_frequency, mint_xrqcy_on_asset_hub, + }, }; fn frequency_location_as_seen_by_asset_hub() -> Location { diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index edc9810803..fa2915baf2 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -26,7 +26,8 @@ use xcm::{ ForeignAssetsAssetId, NativeToken, RelayLocation, RelayOrigin, ReservedDmpWeight, ReservedXcmpWeight, }, - queue::XcmRouter, LocationToAccountId, XcmConfig, + queue::XcmRouter, + LocationToAccountId, XcmConfig, }; use alloc::borrow::Cow; @@ -244,18 +245,16 @@ impl Contains for BaseCallFilter { #[cfg(not(feature = "frequency"))] { match call { - RuntimeCall::Utility(pallet_utility_call) => { - Self::is_utility_call_allowed(pallet_utility_call) - }, + RuntimeCall::Utility(pallet_utility_call) => + Self::is_utility_call_allowed(pallet_utility_call), _ => true, } } #[cfg(feature = "frequency")] { match call { - RuntimeCall::Utility(pallet_utility_call) => { - Self::is_utility_call_allowed(pallet_utility_call) - }, + RuntimeCall::Utility(pallet_utility_call) => + Self::is_utility_call_allowed(pallet_utility_call), // Create provider and create schema are not allowed in mainnet for now. See propose functions. RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) => false, RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, @@ -269,11 +268,9 @@ impl Contains for BaseCallFilter { impl BaseCallFilter { fn is_utility_call_allowed(call: &pallet_utility::Call) -> bool { match call { - pallet_utility::Call::batch { calls, .. } - | pallet_utility::Call::batch_all { calls, .. } - | pallet_utility::Call::force_batch { calls, .. } => { - calls.iter().any(Self::is_batch_call_allowed) - }, + pallet_utility::Call::batch { calls, .. } | + pallet_utility::Call::batch_all { calls, .. } | + pallet_utility::Call::force_batch { calls, .. } => calls.iter().any(Self::is_batch_call_allowed), _ => true, } } @@ -281,16 +278,16 @@ impl BaseCallFilter { fn is_batch_call_allowed(call: &RuntimeCall) -> bool { match call { // Block all nested `batch` calls from utility batch - RuntimeCall::Utility(pallet_utility::Call::batch { .. }) - | RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) - | RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) => false, + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | + RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) => false, // Block all `FrequencyTxPayment` calls from utility batch RuntimeCall::FrequencyTxPayment(..) => false, // Block `create_provider` and `create_schema` calls from utility batch - RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) - | RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, + RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) | + RuntimeCall::Schemas(pallet_schemas::Call::create_schema_v3 { .. }) => false, // Block `Pays::No` calls from utility batch _ if Self::is_pays_no_call(call) => false, @@ -341,17 +338,17 @@ impl InstanceFilter for ProxyType { ), ProxyType::Governance => matches!( c, - RuntimeCall::Treasury(..) - | RuntimeCall::Democracy(..) - | RuntimeCall::TechnicalCommittee(..) - | RuntimeCall::Council(..) - | RuntimeCall::Utility(..) // Calls inside a batch are also run through filters + RuntimeCall::Treasury(..) | + RuntimeCall::Democracy(..) | + RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::Council(..) | + RuntimeCall::Utility(..) // Calls inside a batch are also run through filters ), ProxyType::Staking => { matches!( c, - RuntimeCall::Capacity(pallet_capacity::Call::stake { .. }) - | RuntimeCall::CollatorSelection( + RuntimeCall::Capacity(pallet_capacity::Call::stake { .. }) | + RuntimeCall::CollatorSelection( pallet_collator_selection::Call::set_candidacy_bond { .. } ) ) @@ -440,8 +437,8 @@ impl OnRuntimeUpgrade for MigratePalletsCu fn on_runtime_upgrade() -> Weight { use sp_core::Get; - if pallet_collator_selection::Pallet::::on_chain_storage_version() - != pallet_collator_selection::Pallet::::in_code_storage_version() + if pallet_collator_selection::Pallet::::on_chain_storage_version() != + pallet_collator_selection::Pallet::::in_code_storage_version() { pallet_collator_selection::Pallet::::in_code_storage_version() .put::>(); diff --git a/runtime/frequency/src/xcm/asset_transactor.rs b/runtime/frequency/src/xcm/asset_transactor.rs index 35774ab27e..69d53b8fba 100644 --- a/runtime/frequency/src/xcm/asset_transactor.rs +++ b/runtime/frequency/src/xcm/asset_transactor.rs @@ -5,7 +5,7 @@ use staging_xcm_builder::{ NoChecking, }; -use crate::xcm::{location_converter::LocationToAccountId, }; +use crate::xcm::location_converter::LocationToAccountId; use frame_support::{parameter_types, traits::ConstU8}; diff --git a/runtime/frequency/src/xcm/queue.rs b/runtime/frequency/src/xcm/queue.rs index 0e0626e5ce..28709eab04 100644 --- a/runtime/frequency/src/xcm/queue.rs +++ b/runtime/frequency/src/xcm/queue.rs @@ -11,9 +11,11 @@ use frame_support::{ weights::Weight, }; -use crate::xcm::location_converter::XcmOriginToTransactDispatchOrigin; -use crate::xcm::parameters::{BaseDeliveryFee, FeeAssetId, TransactionByteFee}; -use crate::xcm::XcmConfig; +use crate::xcm::{ + location_converter::XcmOriginToTransactDispatchOrigin, + parameters::{BaseDeliveryFee, FeeAssetId, TransactionByteFee}, + XcmConfig, +}; use frame_system::EnsureRoot; use staging_xcm_builder::WithUniqueTopic;