From 1faa072b2791e9ae881f9d2a380c68fd1d805282 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 12:29:35 +0100 Subject: [PATCH 001/284] chore: update to stable2506 --- Cargo.toml | 234 ++++++++++++++++++++++++++--------------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a5038dcb..b9b684af8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,137 +80,137 @@ pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # de # Substrate # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } frame-metadata = { version = "20.0.0", default-features = false } -frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", package = "pallet-nfts", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false, package = "substrate-prometheus-endpoint" } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } +frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "pallet-nfts", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false, package = "substrate-prometheus-endpoint" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } # Polkadot # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", package = "staging-xcm", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", package = "staging-xcm-builder", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", package = "staging-xcm-executor", default-features = false } -xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm-builder", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm-executor", default-features = false } +xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } # Cumulus # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", package = "staging-parachain-info", default-features = false } -parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } +asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-parachain-info", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } # Runtimes # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } +asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4" } -westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2503-4", default-features = false } +westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -ismp-parachain = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -ismp-parachain-inherent = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -ismp-parachain-runtime-api = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -pallet-ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -pallet-ismp-rpc = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } -pallet-ismp-runtime-api = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2503-4", default-features = false } +ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +ismp-parachain = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +ismp-parachain-inherent = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +ismp-parachain-runtime-api = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +pallet-ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +pallet-ismp-rpc = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } +pallet-ismp-runtime-api = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } From 3723ed501256381b5caf5ff463a8f3a597ff4cdd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:17:47 +0100 Subject: [PATCH 002/284] refactor(pallets): remove deprecated runtimeevent config item --- pallets/api/src/fungibles/mod.rs | 2 -- pallets/api/src/messaging/mod.rs | 3 --- pallets/api/src/nonfungibles/mod.rs | 2 -- pallets/motion/src/benchmarking.rs | 2 +- pallets/motion/src/lib.rs | 2 -- pallets/nfts/src/benchmarking.rs | 2 +- pallets/nfts/src/lib.rs | 4 ---- 7 files changed, 2 insertions(+), 15 deletions(-) diff --git a/pallets/api/src/fungibles/mod.rs b/pallets/api/src/fungibles/mod.rs index 7dd06a926..9ce08e2be 100644 --- a/pallets/api/src/fungibles/mod.rs +++ b/pallets/api/src/fungibles/mod.rs @@ -44,8 +44,6 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config + pallet_assets::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The instance of pallet-assets. type AssetsInstance; /// Weight information for dispatchables in this pallet. diff --git a/pallets/api/src/messaging/mod.rs b/pallets/api/src/messaging/mod.rs index afaa696cb..7a902f6aa 100644 --- a/pallets/api/src/messaging/mod.rs +++ b/pallets/api/src/messaging/mod.rs @@ -51,9 +51,6 @@ pub mod pallet { /// Configuration of the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type OriginConverter: TryConvert; #[pallet::constant] diff --git a/pallets/api/src/nonfungibles/mod.rs b/pallets/api/src/nonfungibles/mod.rs index e5e8b2e47..8efe80a08 100644 --- a/pallets/api/src/nonfungibles/mod.rs +++ b/pallets/api/src/nonfungibles/mod.rs @@ -63,8 +63,6 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config + pallet_nfts::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The instance of pallet-nfts. type NftsInstance; /// Weight information for dispatchables in this pallet. diff --git a/pallets/motion/src/benchmarking.rs b/pallets/motion/src/benchmarking.rs index 2bc78cbf0..3f790eebc 100644 --- a/pallets/motion/src/benchmarking.rs +++ b/pallets/motion/src/benchmarking.rs @@ -7,7 +7,7 @@ use super::*; #[allow(unused)] use crate::Pallet as Motion; -fn assert_last_event(generic_event: ::RuntimeEvent) { +fn assert_last_event(generic_event: T::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/motion/src/lib.rs b/pallets/motion/src/lib.rs index 813763fab..8387f2134 100644 --- a/pallets/motion/src/lib.rs +++ b/pallets/motion/src/lib.rs @@ -38,8 +38,6 @@ pub mod pallet { type RuntimeCall: Parameter + UnfilteredDispatchable + GetDispatchInfo; - /// The runtime event type. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Origin that can act as `Root` origin if a collective has achieved a simple majority /// consensus. type SimpleMajorityOrigin: EnsureOrigin; diff --git a/pallets/nfts/src/benchmarking.rs b/pallets/nfts/src/benchmarking.rs index affacdce5..8f7128048 100644 --- a/pallets/nfts/src/benchmarking.rs +++ b/pallets/nfts/src/benchmarking.rs @@ -187,7 +187,7 @@ fn add_collection_attribute, I: 'static>( (key, caller, caller_lookup) } -fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) { +fn assert_last_event, I: 'static>(generic_event: T::RuntimeEvent) { let events = frame_system::Pallet::::events(); let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record diff --git a/pallets/nfts/src/lib.rs b/pallets/nfts/src/lib.rs index 438876d7b..0922f8b89 100644 --- a/pallets/nfts/src/lib.rs +++ b/pallets/nfts/src/lib.rs @@ -138,10 +138,6 @@ pub mod pallet { #[pallet::config] /// The module configuration trait. pub trait Config: frame_system::Config { - /// The overarching event type. - type RuntimeEvent: From> - + IsType<::RuntimeEvent>; - /// Identifier for the collection of item. /// /// SAFETY: The functions in the `Incrementable` trait are fallible. If the functions From a1c4546ececc8896985468c56b4d2fadb64ed17b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 12:31:58 +0100 Subject: [PATCH 003/284] refactor(runtime/common): add missing weights after sdk uplift --- .../src/weights/cumulus_pallet_xcmp_queue.rs | 75 +++++++++++++++++-- runtime/common/src/weights/pallet_assets.rs | 31 ++++++++ runtime/common/src/weights/pallet_revive.rs | 21 ++++++ 3 files changed, 121 insertions(+), 6 deletions(-) diff --git a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs index 30bc13290..256bf8114 100644 --- a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs @@ -65,6 +65,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } + // NOTE: copied from polkadot-sdk until benchmarks can be re-run /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) @@ -75,15 +76,77 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) /// Storage: `MessageQueue::Pages` (r:0 w:1) /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) - fn enqueue_2_empty_xcmp_messages() -> Weight { + /// The range of component `n` is `[0, 1000]`. + fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `151` // Estimated: `5487` - // Minimum execution time: 22_251_000 picoseconds. - Weight::from_parts(22_846_000, 0) - .saturating_add(Weight::from_parts(0, 5487)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_987_577, 5487) + // Standard Error: 313 + .saturating_add(Weight::from_parts(94_980, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 105457]`. + fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `334 + n * (1 ±0)` + // Estimated: `108986` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(11_015_940, 108986) + // Standard Error: 32 + .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:100) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 100]`. + fn enqueue_n_full_pages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `186` + // Estimated: `5487` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 5487) + // Standard Error: 20_150 + .saturating_add(Weight::from_parts(20_690_483, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) + fn enqueue_1000_small_xcmp_messages() -> Weight { + // Proof Size summary in bytes: + // Measured: `53067` + // Estimated: `108986` + // Minimum execution time: 139_000_000 picoseconds. + Weight::from_parts(148_000_000, 108986) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) diff --git a/runtime/common/src/weights/pallet_assets.rs b/runtime/common/src/weights/pallet_assets.rs index 1be48c443..0d38324d7 100644 --- a/runtime/common/src/weights/pallet_assets.rs +++ b/runtime/common/src/weights/pallet_assets.rs @@ -492,4 +492,35 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + // NOTE: copied from polkadot-sdk until benchmarks can be re-run + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `418` + // Estimated: `3675` + // Minimum execution time: 8_792_000 picoseconds. + Weight::from_parts(9_095_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Account` (r:1 w:0) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3599` + // Minimum execution time: 8_924_000 picoseconds. + Weight::from_parts(9_407_000, 3599) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Approvals` (r:1 w:0) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn allowance() -> Weight { + // Proof Size summary in bytes: + // Measured: `350` + // Estimated: `3613` + // Minimum execution time: 11_348_000 picoseconds. + Weight::from_parts(11_882_000, 3613) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } } diff --git a/runtime/common/src/weights/pallet_revive.rs b/runtime/common/src/weights/pallet_revive.rs index f031145bd..3c5b28302 100644 --- a/runtime/common/src/weights/pallet_revive.rs +++ b/runtime/common/src/weights/pallet_revive.rs @@ -994,4 +994,25 @@ impl pallet_revive::WeightInfo for WeightInfo { // Standard Error: 10 .saturating_add(Weight::from_parts(77_239, 0).saturating_mul(r.into())) } + // NOTE: copied from polkadot-sdk until benchmarks can be re-run + /// Storage: `Revive::ContractInfoOf` (r:1 w:1) + /// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(242), added: 2717, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// The range of component `d` is `[0, 1]`. + /// The range of component `i` is `[0, 262144]`. + fn seal_call_precompile(d: u32, i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + d * (453 ±0)` + // Estimated: `1959 + d * (1959 ±0)` + // Minimum execution time: 19_412_000 picoseconds. + Weight::from_parts(3_906_222, 1959) + // Standard Error: 378_943 + .saturating_add(Weight::from_parts(16_405_804, 0).saturating_mul(d.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_205, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(d.into()))) + .saturating_add(Weight::from_parts(0, 1959).saturating_mul(d.into())) + } } From 5e205af271bcae7fe099cdb9d2042f04ead4155d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:18:27 +0100 Subject: [PATCH 004/284] refactor(runtime/common): remove unused import --- runtime/common/src/genesis.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/common/src/genesis.rs b/runtime/common/src/genesis.rs index dd3d327fa..ae2115888 100644 --- a/runtime/common/src/genesis.rs +++ b/runtime/common/src/genesis.rs @@ -1,5 +1,3 @@ -#[cfg(not(feature = "std"))] -use alloc::format; use alloc::vec::Vec; use parachains_common::AccountId; From 2a3e70cce9d050bad37da8eb9eb36914e7767b54 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 12:33:28 +0100 Subject: [PATCH 005/284] refactor(devnet): update revive api implementation --- runtime/devnet/src/lib.rs | 74 ++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index dee597b64..1c86e976a 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -1038,25 +1038,29 @@ impl_runtime_apis! { fn eth_transact(tx: pallet_revive::evm::GenericTransaction) -> Result, pallet_revive::EthTransactError> { - let blockweights: BlockWeights = ::BlockWeights::get(); + use pallet_revive::{ + codec::Encode, evm::runtime::EthExtra, + sp_runtime::traits::{TransactionExtension, Block as BlockT} + }; + + let tx_fee = |pallet_call, mut dispatch_info: pallet_revive::DispatchInfo| { + let call = + ::RuntimeCall::from(pallet_call); + dispatch_info.extension_weight = + EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let tx_fee = |pallet_call, mut dispatch_info: DispatchInfo| { - let call = RuntimeCall::Revive(pallet_call); - dispatch_info.extension_weight = EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let uxt: UncheckedExtrinsic = generic::UncheckedExtrinsic::new_bare(call).into(); + let uxt: ::Extrinsic = + pallet_revive::sp_runtime::generic::UncheckedExtrinsic::new_bare(call).into(); - pallet_transaction_payment::Pallet::::compute_fee( + TransactionPayment::compute_fee( uxt.encoded_size() as u32, &dispatch_info, 0u32.into(), ) }; - Revive::bare_eth_transact( - tx, - blockweights.max_block, - tx_fee, - ) + let blockweights = ::BlockWeights::get(); + Revive::dry_run_eth_transact(tx, blockweights.max_block, tx_fee) } fn call( @@ -1067,6 +1071,7 @@ impl_runtime_apis! { storage_deposit_limit: Option, input_data: Vec, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_call( RuntimeOrigin::signed(origin), dest, @@ -1087,6 +1092,7 @@ impl_runtime_apis! { salt: Option<[u8; 32]>, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_instantiate( RuntimeOrigin::signed(origin), value, @@ -1111,6 +1117,13 @@ impl_runtime_apis! { ) } + fn get_storage_var_key( + address: pallet_revive::H160, + key: Vec + ) -> pallet_revive::GetStorageResult { + Revive::get_storage_var_key(address, key) + } + fn get_storage( address: H160, key: [u8; 32], @@ -1123,20 +1136,21 @@ impl_runtime_apis! { fn trace_block( block: Block, - config: pallet_revive::evm::TracerConfig - ) -> Vec<(u32, pallet_revive::evm::CallTrace)> { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Vec<(u32, pallet_revive::evm::Trace)> { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let mut traces = vec![]; let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); - if let Some(tx_trace) = tracer.collect_traces().pop() { + if let Some(tx_trace) = tracer.collect_trace() { traces.push((index as u32, tx_trace)); } } @@ -1147,16 +1161,17 @@ impl_runtime_apis! { fn trace_tx( block: Block, tx_index: u32, - config: pallet_revive::evm::TracerConfig - ) -> Option { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Option { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { if index as u32 == tx_index { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); break; @@ -1165,24 +1180,25 @@ impl_runtime_apis! { } } - tracer.collect_traces().pop() + tracer.collect_trace() } fn trace_call( tx: pallet_revive::evm::GenericTransaction, - config: pallet_revive::evm::TracerConfig) - -> Result + tracer_type: pallet_revive::evm::TracerType + ) -> Result { use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); - let result = trace(&mut tracer, || Self::eth_transact(tx)); + let mut tracer = Revive::evm_tracer(tracer_type); + let t = tracer.as_tracing(); + let result = trace(t, || Self::eth_transact(tx)); - if let Some(trace) = tracer.collect_traces().pop() { + if let Some(trace) = tracer.collect_trace() { Ok(trace) } else if let Err(err) = result { Err(err) } else { - Ok(Default::default()) + Ok(tracer.empty_trace()) } } } From d24851424f010dbd03cef1ed2beade19808f5f94 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 12:34:06 +0100 Subject: [PATCH 006/284] refactor(devnet): add relayparentoffset config item --- runtime/devnet/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 1c86e976a..b928f4448 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -421,6 +421,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; + type RelayParentOffset = ConstU32<0>; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; From de81d3c65806fe23ba5d281f1f723aad35a1217b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:21:59 +0100 Subject: [PATCH 007/284] refactor(devnet): update assets config --- runtime/devnet/src/config/assets.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/devnet/src/config/assets.rs b/runtime/devnet/src/config/assets.rs index 487f0fe7c..6da67f82c 100644 --- a/runtime/devnet/src/config/assets.rs +++ b/runtime/devnet/src/config/assets.rs @@ -90,7 +90,6 @@ impl pallet_nfts::Config for Runtime { type MetadataDepositBase = NftsMetadataDepositBase; type OffchainPublic = ::Signer; type OffchainSignature = Signature; - type RuntimeEvent = RuntimeEvent; type StringLimit = ConstU32<256>; type ValueLimit = ConstU32<256>; type WeightInfo = pallet_nfts::weights::SubstrateWeight; From 86a9b8cc02e7eb130b86f097268b7381d6756c60 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:22:25 +0100 Subject: [PATCH 008/284] refactor(devnet): update revive config --- runtime/devnet/src/config/contracts.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 576d78051..23dbc8503 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeHoldReason, Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, + Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -90,9 +90,6 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; - type ChainExtension = (); type ChainId = ChainId; type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Currency = Balances; @@ -105,6 +102,7 @@ impl pallet_revive::Config for Runtime { type NativeToEthRatio = NativeToEthRatio; // 512 MB. Used in an integrity test that verifies the runtime has enough memory. type PVFMemory = ConstU32<{ 512 * 1024 * 1024 }>; + type Precompiles = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -116,7 +114,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { From 284e037af36a15542075a2f8e4a7cb1f1449076a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:22:46 +0100 Subject: [PATCH 009/284] refactor(devnet): update api config --- runtime/devnet/src/config/api/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/devnet/src/config/api/mod.rs b/runtime/devnet/src/config/api/mod.rs index e49a4c7d9..a5b2eafa1 100644 --- a/runtime/devnet/src/config/api/mod.rs +++ b/runtime/devnet/src/config/api/mod.rs @@ -12,7 +12,7 @@ use versioning::*; use crate::{ config::assets::{TrustBackedAssetsInstance, TrustBackedNftsInstance}, - fungibles, nonfungibles, Runtime, RuntimeCall, RuntimeEvent, + fungibles, nonfungibles, Runtime, RuntimeCall, }; mod versioning; @@ -83,13 +83,11 @@ impl RuntimeResult { impl fungibles::Config for Runtime { type AssetsInstance = TrustBackedAssetsInstance; - type RuntimeEvent = RuntimeEvent; type WeightInfo = fungibles::weights::SubstrateWeight; } impl nonfungibles::Config for Runtime { type NftsInstance = TrustBackedNftsInstance; - type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } From f2d770b1b583758ed2d9b91ddfae2f82cdc0eda5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:23:05 +0100 Subject: [PATCH 010/284] refactor(devnet): remove unused imports --- runtime/devnet/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index b928f4448..ccb6f27ac 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -22,7 +22,6 @@ use ::ismp::{ host::StateMachine, router::{Request, Response}, }; -use codec::Encode; use config::xcm::{RelayLocation, XcmOriginToTransactDispatchOrigin}; use cumulus_pallet_parachain_system::{RelayChainState, RelayNumberMonotonicallyIncreases}; use cumulus_pallet_weight_reclaim::StorageWeightReclaim; @@ -30,7 +29,7 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_metadata_hash_extension::CheckMetadataHash; use frame_support::{ derive_impl, - dispatch::{DispatchClass, DispatchInfo}, + dispatch::DispatchClass, genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ @@ -75,7 +74,7 @@ use sp_core::{crypto::KeyTypeId, Get, OpaqueMetadata, H256, U256}; pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, impl_opaque_keys, - traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, TransactionExtension, Verify}, + traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; From 45505bc50d882e07607d46a45c2e1add22eeef24 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:23:49 +0100 Subject: [PATCH 011/284] refactor(testnet): add relayparentoffset config item --- runtime/testnet/src/config/system.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/testnet/src/config/system.rs b/runtime/testnet/src/config/system.rs index de3d1eb8e..19492a061 100644 --- a/runtime/testnet/src/config/system.rs +++ b/runtime/testnet/src/config/system.rs @@ -12,8 +12,6 @@ use sp_runtime::{ Perbill, }; -#[cfg(not(feature = "runtime-benchmarks"))] -use crate::Revive; use crate::{ weights::RocksDbWeight, AccountId, AggregateMessageOrigin, Aura, BalancesCall, Block, BlockExecutionWeight, BlockLength, BlockWeights, DispatchClass, ExtrinsicBaseWeight, @@ -149,6 +147,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; + type RelayParentOffset = ConstU32<0>; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; From 84f95d6b858b520630a5f5a91722209639e39fab Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:24:21 +0100 Subject: [PATCH 012/284] refactor(testnet): update api config --- runtime/testnet/src/config/api/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/testnet/src/config/api/mod.rs b/runtime/testnet/src/config/api/mod.rs index 8bf971e02..591494042 100644 --- a/runtime/testnet/src/config/api/mod.rs +++ b/runtime/testnet/src/config/api/mod.rs @@ -21,7 +21,7 @@ use crate::{ assets::TrustBackedAssetsInstance, monetary::TransactionByteFee, xcm::LocalOriginToLocation, }, fungibles, AccountId, Balances, BlockNumber, Contracts, Ismp, PolkadotXcm, Runtime, - RuntimeCall, RuntimeEvent, RuntimeHoldReason, + RuntimeCall, RuntimeHoldReason, }; mod versioning; @@ -106,7 +106,6 @@ impl messaging::Config for Runtime { // TODO: ensure within the contract buffer bounds type MaxResponseLen = ConstU32<1024>; type OriginConverter = LocalOriginToLocation; - type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; type Xcm = QueryHandler; type XcmResponseOrigin = EnsureResponse; @@ -191,7 +190,6 @@ impl NotifyQueryHandler for QueryHandler { impl fungibles::Config for Runtime { type AssetsInstance = TrustBackedAssetsInstance; - type RuntimeEvent = RuntimeEvent; type WeightInfo = fungibles::weights::SubstrateWeight; } From b3daf81dc42be68ff1eb0c9ac3d748a592e108fd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:24:36 +0100 Subject: [PATCH 013/284] refactor(testnet): update revive config --- runtime/testnet/src/config/contracts.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/runtime/testnet/src/config/contracts.rs b/runtime/testnet/src/config/contracts.rs index 85811da27..e5bb2b307 100644 --- a/runtime/testnet/src/config/contracts.rs +++ b/runtime/testnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeHoldReason, Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, + Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -88,9 +88,6 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; - type ChainExtension = (); // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -105,6 +102,7 @@ impl pallet_revive::Config for Runtime { type NativeToEthRatio = NativeToEthRatio; // 512 MB. Used in an integrity test that verifies the runtime has enough memory. type PVFMemory = ConstU32<{ 512 * 1024 * 1024 }>; + type Precompiles = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -116,7 +114,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { From 66f544612b8b45516bb102b4c1234ac61c356f7c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:24:51 +0100 Subject: [PATCH 014/284] refactor(testnet): update governance config --- runtime/testnet/src/config/governance.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/testnet/src/config/governance.rs b/runtime/testnet/src/config/governance.rs index 0ef617e8c..2d481a98d 100644 --- a/runtime/testnet/src/config/governance.rs +++ b/runtime/testnet/src/config/governance.rs @@ -51,7 +51,6 @@ impl pallet_collective::Config for Runtime { impl pallet_motion::Config for Runtime { type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; // Simple majority is disabled. type SimpleMajorityOrigin = NeverEnsureOrigin<()>; // At least 3/4 of the council vote is needed. From 7c1459e06e6ca923ea0083f6f28d8e2723ed0988 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:25:29 +0100 Subject: [PATCH 015/284] refactor(testnet): update revive api implementation --- runtime/testnet/src/lib.rs | 86 ++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index a75865641..7f1b15e64 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -23,13 +23,12 @@ use ::ismp::{ host::StateMachine, router::{Request, Response}, }; -use codec::Encode; use config::system::ConsensusHook; use cumulus_pallet_parachain_system::RelayChainState; use cumulus_primitives_core::AggregateMessageOrigin; use frame_metadata_hash_extension::CheckMetadataHash; use frame_support::{ - dispatch::{DispatchClass, DispatchInfo}, + dispatch::DispatchClass, genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ @@ -51,10 +50,7 @@ use pallet_api::{fungibles, messaging}; use pallet_balances::Call as BalancesCall; use pallet_ismp::offchain::{Leaf, Proof, ProofKeys}; use pallet_nfts_sdk as pallet_nfts; -use pallet_revive::{ - evm::{runtime::EthExtra, H160}, - AddressMapper, -}; +use pallet_revive::{evm::H160, AddressMapper}; use pallet_transaction_payment::ChargeTransactionPayment; // Polkadot imports use polkadot_runtime_common::SlowAdjustingFeeUpdate; @@ -71,7 +67,7 @@ use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256}; pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, impl_opaque_keys, - traits::{BlakeTwo256, Block as BlockT, Get, IdentifyAccount, TransactionExtension, Verify}, + traits::{BlakeTwo256, Block as BlockT, Get, IdentifyAccount, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -83,7 +79,7 @@ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight}; // XCM Imports use xcm::{latest::prelude::BodyId, VersionedAsset, VersionedLocation}; -use crate::config::{assets::TrustBackedAssetsInstance, system::RuntimeBlockWeights}; +use crate::config::system::RuntimeBlockWeights; /// Some way of identifying an account on the chain. We intentionally make it equivalent /// to the public key of our transaction signing scheme. @@ -714,25 +710,29 @@ impl_runtime_apis! { fn eth_transact(tx: pallet_revive::evm::GenericTransaction) -> Result, pallet_revive::EthTransactError> { - let blockweights: BlockWeights = ::BlockWeights::get(); + use pallet_revive::{ + codec::Encode, evm::runtime::EthExtra, + sp_runtime::traits::{TransactionExtension, Block as BlockT} + }; + + let tx_fee = |pallet_call, mut dispatch_info: pallet_revive::DispatchInfo| { + let call = + ::RuntimeCall::from(pallet_call); + dispatch_info.extension_weight = + EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let tx_fee = |pallet_call, mut dispatch_info: DispatchInfo| { - let call = RuntimeCall::Revive(pallet_call); - dispatch_info.extension_weight = EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let uxt: UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic::new_bare(call).into(); + let uxt: ::Extrinsic = + pallet_revive::sp_runtime::generic::UncheckedExtrinsic::new_bare(call).into(); - pallet_transaction_payment::Pallet::::compute_fee( + TransactionPayment::compute_fee( uxt.encoded_size() as u32, &dispatch_info, 0u32.into(), ) }; - Revive::bare_eth_transact( - tx, - blockweights.max_block, - tx_fee, - ) + let blockweights = ::BlockWeights::get(); + Revive::dry_run_eth_transact(tx, blockweights.max_block, tx_fee) } fn call( @@ -743,6 +743,7 @@ impl_runtime_apis! { storage_deposit_limit: Option, input_data: Vec, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_call( RuntimeOrigin::signed(origin), dest, @@ -763,6 +764,7 @@ impl_runtime_apis! { salt: Option<[u8; 32]>, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_instantiate( RuntimeOrigin::signed(origin), value, @@ -787,6 +789,13 @@ impl_runtime_apis! { ) } + fn get_storage_var_key( + address: pallet_revive::H160, + key: Vec + ) -> pallet_revive::GetStorageResult { + Revive::get_storage_var_key(address, key) + } + fn get_storage( address: H160, key: [u8; 32], @@ -799,20 +808,21 @@ impl_runtime_apis! { fn trace_block( block: Block, - config: pallet_revive::evm::TracerConfig - ) -> Vec<(u32, pallet_revive::evm::CallTrace)> { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Vec<(u32, pallet_revive::evm::Trace)> { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let mut traces = vec![]; let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); - if let Some(tx_trace) = tracer.collect_traces().pop() { + if let Some(tx_trace) = tracer.collect_trace() { traces.push((index as u32, tx_trace)); } } @@ -823,16 +833,17 @@ impl_runtime_apis! { fn trace_tx( block: Block, tx_index: u32, - config: pallet_revive::evm::TracerConfig - ) -> Option { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Option { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { if index as u32 == tx_index { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); break; @@ -841,24 +852,25 @@ impl_runtime_apis! { } } - tracer.collect_traces().pop() + tracer.collect_trace() } fn trace_call( tx: pallet_revive::evm::GenericTransaction, - config: pallet_revive::evm::TracerConfig) - -> Result + tracer_type: pallet_revive::evm::TracerType + ) -> Result { use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); - let result = trace(&mut tracer, || Self::eth_transact(tx)); + let mut tracer = Revive::evm_tracer(tracer_type); + let t = tracer.as_tracing(); + let result = trace(t, || Self::eth_transact(tx)); - if let Some(trace) = tracer.collect_traces().pop() { + if let Some(trace) = tracer.collect_trace() { Ok(trace) } else if let Err(err) = result { Err(err) } else { - Ok(Default::default()) + Ok(tracer.empty_trace()) } } } From c3b5173a55e08614b9cd4e1ae7e306a5cd9e2564 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:26:03 +0100 Subject: [PATCH 016/284] refactor(mainnet): update revive api implementation --- runtime/mainnet/src/apis.rs | 88 +++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 37 deletions(-) diff --git a/runtime/mainnet/src/apis.rs b/runtime/mainnet/src/apis.rs index ab1529337..09f9e0d2f 100644 --- a/runtime/mainnet/src/apis.rs +++ b/runtime/mainnet/src/apis.rs @@ -1,18 +1,16 @@ use alloc::{vec, vec::Vec}; -use codec::Encode; use frame_support::{ - dispatch::DispatchInfo, genesis_builder_helper::{build_state, get_preset}, traits::nonfungibles_v2::Inspect, weights::{Weight, WeightToFee as _}, }; -use pallet_revive::{evm::runtime::EthExtra, AddressMapper}; +use pallet_revive::AddressMapper; use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160, U256}; use sp_runtime::{ - traits::{Block as BlockT, TransactionExtension}, + traits::Block as BlockT, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -30,10 +28,10 @@ use xcm_runtime_apis::{ // Local module imports use super::{ config::{monetary::fee::WeightToFee, system::RuntimeBlockWeights, xcm as xcm_config}, - AccountId, Balance, Block, BlockNumber, BlockWeights, EthExtraImpl, Executive, - ExtrinsicInclusionMode, InherentDataExt, Nfts, Nonce, OriginCaller, ParachainSystem, - PolkadotXcm, Revive, Runtime, RuntimeCall, RuntimeEvent, RuntimeGenesisConfig, RuntimeOrigin, - SessionKeys, System, TransactionPayment, UncheckedExtrinsic, VERSION, + AccountId, Balance, Block, BlockNumber, EthExtraImpl, Executive, ExtrinsicInclusionMode, + InherentDataExt, Nfts, Nonce, OriginCaller, ParachainSystem, PolkadotXcm, Revive, Runtime, + RuntimeCall, RuntimeEvent, RuntimeGenesisConfig, RuntimeOrigin, SessionKeys, System, + TransactionPayment, VERSION, }; impl_runtime_apis! { @@ -438,25 +436,29 @@ impl_runtime_apis! { fn eth_transact(tx: pallet_revive::evm::GenericTransaction) -> Result, pallet_revive::EthTransactError> { - let blockweights: BlockWeights = ::BlockWeights::get(); + use pallet_revive::{ + codec::Encode, evm::runtime::EthExtra, + sp_runtime::traits::{TransactionExtension, Block as BlockT} + }; + + let tx_fee = |pallet_call, mut dispatch_info: pallet_revive::DispatchInfo| { + let call = + ::RuntimeCall::from(pallet_call); + dispatch_info.extension_weight = + EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let tx_fee = |pallet_call, mut dispatch_info: DispatchInfo| { - let call = RuntimeCall::Revive(pallet_call); - dispatch_info.extension_weight = EthExtraImpl::get_eth_extension(0, 0u32.into()).weight(&call); - let uxt: UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic::new_bare(call).into(); + let uxt: ::Extrinsic = + pallet_revive::sp_runtime::generic::UncheckedExtrinsic::new_bare(call).into(); - pallet_transaction_payment::Pallet::::compute_fee( + TransactionPayment::compute_fee( uxt.encoded_size() as u32, &dispatch_info, 0u32.into(), ) }; - Revive::bare_eth_transact( - tx, - blockweights.max_block, - tx_fee, - ) + let blockweights = ::BlockWeights::get(); + Revive::dry_run_eth_transact(tx, blockweights.max_block, tx_fee) } fn call( @@ -467,6 +469,7 @@ impl_runtime_apis! { storage_deposit_limit: Option, input_data: Vec, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_call( RuntimeOrigin::signed(origin), dest, @@ -487,6 +490,7 @@ impl_runtime_apis! { salt: Option<[u8; 32]>, ) -> pallet_revive::ContractResult { + Revive::prepare_dry_run(&origin); Revive::bare_instantiate( RuntimeOrigin::signed(origin), value, @@ -511,6 +515,13 @@ impl_runtime_apis! { ) } + fn get_storage_var_key( + address: pallet_revive::H160, + key: Vec + ) -> pallet_revive::GetStorageResult { + Revive::get_storage_var_key(address, key) + } + fn get_storage( address: H160, key: [u8; 32], @@ -523,20 +534,21 @@ impl_runtime_apis! { fn trace_block( block: Block, - config: pallet_revive::evm::TracerConfig - ) -> Vec<(u32, pallet_revive::evm::CallTrace)> { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Vec<(u32, pallet_revive::evm::Trace)> { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let mut traces = vec![]; let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); - if let Some(tx_trace) = tracer.collect_traces().pop() { + if let Some(tx_trace) = tracer.collect_trace() { traces.push((index as u32, tx_trace)); } } @@ -547,16 +559,17 @@ impl_runtime_apis! { fn trace_tx( block: Block, tx_index: u32, - config: pallet_revive::evm::TracerConfig - ) -> Option { - use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); + tracer_type: pallet_revive::evm::TracerType + ) -> Option { + use pallet_revive::{sp_runtime::traits::Block, tracing::trace}; + let mut tracer = Revive::evm_tracer(tracer_type); let (header, extrinsics) = block.deconstruct(); Executive::initialize_block(&header); for (index, ext) in extrinsics.into_iter().enumerate() { if index as u32 == tx_index { - trace(&mut tracer, || { + let t = tracer.as_tracing(); + trace(t, || { let _ = Executive::apply_extrinsic(ext); }); break; @@ -565,24 +578,25 @@ impl_runtime_apis! { } } - tracer.collect_traces().pop() + tracer.collect_trace() } fn trace_call( tx: pallet_revive::evm::GenericTransaction, - config: pallet_revive::evm::TracerConfig) - -> Result + tracer_type: pallet_revive::evm::TracerType + ) -> Result { use pallet_revive::tracing::trace; - let mut tracer = config.build(Revive::evm_gas_from_weight); - let result = trace(&mut tracer, || Self::eth_transact(tx)); + let mut tracer = Revive::evm_tracer(tracer_type); + let t = tracer.as_tracing(); + let result = trace(t, || Self::eth_transact(tx)); - if let Some(trace) = tracer.collect_traces().pop() { + if let Some(trace) = tracer.collect_trace() { Ok(trace) } else if let Err(err) = result { Err(err) } else { - Ok(Default::default()) + Ok(tracer.empty_trace()) } } } From a395e6eeab189ee6f7495dfb1831f5d3ada138e5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:26:36 +0100 Subject: [PATCH 017/284] refactor(mainnet): update governance config --- runtime/mainnet/src/config/governance.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/runtime/mainnet/src/config/governance.rs b/runtime/mainnet/src/config/governance.rs index c9ff16553..03ba8cd20 100644 --- a/runtime/mainnet/src/config/governance.rs +++ b/runtime/mainnet/src/config/governance.rs @@ -1,8 +1,6 @@ -use frame_support::{ - parameter_types, - traits::{EitherOfDiverse, NeverEnsureOrigin}, - weights::Weight, -}; +#[cfg(not(feature = "runtime-benchmarks"))] +use frame_support::traits::NeverEnsureOrigin; +use frame_support::{parameter_types, traits::EitherOfDiverse, weights::Weight}; use frame_system::EnsureRoot; use pallet_collective::EnsureProportionAtLeast; use parachains_common::BlockNumber; @@ -60,7 +58,6 @@ impl pallet_collective::Config for Runtime { impl pallet_motion::Config for Runtime { type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; #[cfg(not(feature = "runtime-benchmarks"))] // Simple majority is disabled. type SimpleMajorityOrigin = NeverEnsureOrigin<()>; From 8b131612c609097dcfa9e7b80a7826115a16dfca Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:26:54 +0100 Subject: [PATCH 018/284] refactor(mainnet): update revive config --- runtime/mainnet/src/config/revive.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/runtime/mainnet/src/config/revive.rs b/runtime/mainnet/src/config/revive.rs index 204de546e..0883c927f 100644 --- a/runtime/mainnet/src/config/revive.rs +++ b/runtime/mainnet/src/config/revive.rs @@ -1,13 +1,13 @@ use frame_support::{ parameter_types, - traits::{ConstBool, ConstU32, ConstU64, Nothing}, + traits::{ConstBool, ConstU32, ConstU64}, }; use frame_system::EnsureSigned; use crate::{ config::monetary::{DepositPerByte, DepositPerItem}, - weights, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, - Timestamp, TransactionPayment, UNIT, + weights, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, + TransactionPayment, UNIT, }; // 18 decimals @@ -20,9 +20,6 @@ parameter_types! { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; - type ChainExtension = (); // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -37,6 +34,7 @@ impl pallet_revive::Config for Runtime { type NativeToEthRatio = NativeToEthRatio; // 512 MB. Used in an integrity test that verifies the runtime has enough memory. type PVFMemory = ConstU32<{ 512 * 1024 * 1024 }>; + type Precompiles = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -48,7 +46,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = weights::pallet_revive::WeightInfo; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { From 2ebd03ac75eebae64a15ee0b099273030652cff2 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:27:13 +0100 Subject: [PATCH 019/284] refactor(mainnet): add relayparentoffset config item --- runtime/mainnet/src/config/system.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/mainnet/src/config/system.rs b/runtime/mainnet/src/config/system.rs index 24aecb5b1..d8a08328d 100644 --- a/runtime/mainnet/src/config/system.rs +++ b/runtime/mainnet/src/config/system.rs @@ -154,6 +154,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type DmpQueue = EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; + type RelayParentOffset = ConstU32<0>; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; From 89ce03d3ad16bf4bebb47005d33558611eeab292 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:27:59 +0100 Subject: [PATCH 020/284] refactor(mainnet): replace fee_asset with worst_case_for_trader --- runtime/mainnet/src/benchmarks.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/mainnet/src/benchmarks.rs b/runtime/mainnet/src/benchmarks.rs index ef1e23adb..f2032556b 100644 --- a/runtime/mainnet/src/benchmarks.rs +++ b/runtime/mainnet/src/benchmarks.rs @@ -6,6 +6,7 @@ use frame_support::parameter_types; pub use pallet_xcm::benchmarking::Pallet as PalletXcmBenchmark; use xcm::prelude::{ Asset, AssetId, Fungible, Here, InteriorLocation, Junction, Location, NetworkId, Response, + WeightLimit, }; use xcm_executor::traits::ConvertLocation; @@ -208,8 +209,11 @@ impl pallet_xcm_benchmarks::generic::Config for Runtime { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { id: AssetId(RelayLocation::get()), fun: Fungible(1_000_000 * UNIT) }) + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok(( + Asset { id: AssetId(RelayLocation::get()), fun: Fungible(1_000_000 * UNIT) }, + WeightLimit::Limited(Weight::from_parts(5000, 5000)), + )) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { From 56b0d857b5fb45610cc1089b3f022bda02f50328 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:29:13 +0100 Subject: [PATCH 021/284] refactor(node): add shared trie cache parameter to storage benchmarking command --- node/src/command.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/command.rs b/node/src/command.rs index b1be951dd..3da2619b7 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -319,7 +319,9 @@ pub fn run() -> Result<()> { construct_benchmark_partials!(config, |partials| { let db = partials.backend.expose_db(); let storage = partials.backend.expose_storage(); - cmd.run(config, partials.client.clone(), db, storage) + let shared_cache = partials.backend.expose_shared_trie_cache(); + + cmd.run(config, partials.client.clone(), db, storage, shared_cache) }) }), BenchmarkCmd::Machine(cmd) => From 10d6d1155f077aba68de219fdd791f6b3b0ff493 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:29:45 +0100 Subject: [PATCH 022/284] refactor(node): silence clippy warning --- node/src/rpc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/node/src/rpc.rs b/node/src/rpc.rs index c44e8d6de..c04aecc96 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -28,6 +28,7 @@ pub struct FullDeps { /// Transaction pool instance. pub pool: Arc

, /// Backend used by the node. + #[allow(dead_code)] pub backend: Arc, } From 7d33e20e0e5074a5224628960c50a8755179c450 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:30:23 +0100 Subject: [PATCH 023/284] refactor(node): address service breaking changes --- node/src/service.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/node/src/service.rs b/node/src/service.rs index 02e55e787..854cc1b9b 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -198,16 +198,17 @@ where let backend = params.backend.clone(); let mut task_manager = params.task_manager; - let (relay_chain_interface, collator_key) = build_relay_chain_interface( - polkadot_config, - ¶chain_config, - telemetry_worker_handle, - &mut task_manager, - collator_options.clone(), - hwbench.clone(), - ) - .await - .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; + let (relay_chain_interface, collator_key, _relay_chain_network, _paranode_rx) = + build_relay_chain_interface( + polkadot_config, + ¶chain_config, + telemetry_worker_handle, + &mut task_manager, + collator_options.clone(), + hwbench.clone(), + ) + .await + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let validator = parachain_config.role.is_authority(); let transaction_pool = params.transaction_pool.clone(); @@ -328,6 +329,7 @@ where relay_chain_slot_duration, recovery_handle: Box::new(overseer_handle.clone()), sync_service: sync_service.clone(), + prometheus_registry: prometheus_registry.as_ref(), })?; if validator { From 85980e689a98ea0cb8a990ce2ef7ee7e4cae1250 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:30:35 +0100 Subject: [PATCH 024/284] chore: update cargo.lock --- Cargo.lock | 8168 +++++++++++++++++++++++++++------------------------- 1 file changed, 4315 insertions(+), 3853 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 132c44913..271054326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-core" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +checksum = "5968f48d7a62587cd874bd84034831da4f7f577ce5de984828e376766efc0f32" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -125,15 +125,14 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +checksum = "f9135eb501feccf7f4cb8a183afd406a65483fdad7bbd7332d0470e5d725c92f" dependencies = [ "alloy-json-abi", "alloy-primitives", "alloy-sol-type-parser", "alloy-sol-types", - "const-hex", "itoa", "serde", "serde_json", @@ -142,9 +141,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6beff64ad0aa6ad1019a3db26fef565aefeb011736150ab73ed3366c3cfd1b" +checksum = "8b26fdd571915bafe857fccba4ee1a4f352965800e46a53e4a5f50187b7776fa" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -154,9 +153,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c77490fe91a0ce933a1f219029521f20fc28c2c0ca95d53fa4da9c00b8d9d4e" +checksum = "a326d47106039f38b811057215a92139f46eef7983a4b77b10930a0ea5685b1e" dependencies = [ "alloy-rlp", "bytes", @@ -171,7 +170,7 @@ dependencies = [ "keccak-asm", "paste", "proptest", - "rand 0.8.5", + "rand 0.9.1", "ruint", "rustc-hash 2.1.1", "serde", @@ -191,9 +190,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10ae8e9a91d328ae954c22542415303919aabe976fe7a92eb06db1b68fd59f2" +checksum = "d4be1ce1274ddd7fdfac86e5ece1b225e9bba1f2327e20fbb30ee6b9cc1423fe" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -205,9 +204,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ad5da86c127751bc607c174d6c9fe9b85ef0889a9ca0c641735d77d4f98f26" +checksum = "01e92f3708ea4e0d9139001c86c051c538af0146944a2a9c7181753bd944bf57" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -223,9 +222,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3d30f0d3f9ba3b7686f3ff1de9ee312647aac705604417a2f40c604f409a9e" +checksum = "9afe1bd348a41f8c9b4b54dfb314886786d6201235b0b3f47198b9d910c86bb2" dependencies = [ "const-hex", "dunce", @@ -239,9 +238,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d162f8524adfdfb0e4bd0505c734c985f3e2474eb022af32eef0d52a4f3935c" +checksum = "d6195df2acd42df92a380a8db6205a5c7b41282d0ce3f4c665ecf7911ac292f1" dependencies = [ "serde", "winnow", @@ -249,14 +248,13 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43d5e60466a440230c07761aa67671d4719d46f43be8ea6e7ed334d8db4a9ab" +checksum = "6185e98a79cf19010722f48a74b5a65d153631d2f038cabd250f4b9e9813b8ad" dependencies = [ "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", - "const-hex", "serde", ] @@ -912,7 +910,7 @@ dependencies = [ "sp-storage 21.0.0", "sp-transaction-pool 34.0.0", "sp-version 37.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-parachain-info 0.17.0", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", @@ -924,125 +922,151 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.29.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.15.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "assets-common 0.21.0", + "assets-common 0.7.0", "bp-asset-hub-rococo", "bp-asset-hub-westend", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", - "cumulus-pallet-aura-ext 0.20.0", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-session-benchmarking 21.0.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-session-benchmarking 9.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.19.1", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-utility 0.20.0", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", - "pallet-asset-conversion 22.0.0", + "pallet-asset-conversion 10.0.0", "pallet-asset-conversion-ops", - "pallet-asset-conversion-tx-payment 22.0.0", + "pallet-asset-conversion-tx-payment 10.0.0", "pallet-asset-rewards", - "pallet-assets 42.0.0", + "pallet-assets 29.1.0", "pallet-assets-freezer", - "pallet-aura 39.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", - "pallet-message-queue 43.1.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", "pallet-migrations", - "pallet-multisig 40.1.0", + "pallet-multisig 28.0.0", "pallet-nft-fractionalization", - "pallet-nfts 34.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "pallet-nfts-runtime-api 26.0.0", - "pallet-proxy 40.1.0", + "pallet-nfts 22.0.0", + "pallet-nfts-runtime-api 14.0.0", + "pallet-proxy 28.0.0", "pallet-revive", - "pallet-session 40.0.0", - "pallet-state-trie-migration 44.1.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-uniques 40.1.0", - "pallet-utility 40.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-benchmarks 20.0.0", - "pallet-xcm-bridge-hub-router 0.18.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-runtime-common 19.1.0", + "pallet-session 28.0.0", + "pallet-state-trie-migration 29.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-uniques 28.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", + "pallet-xcm-bridge-hub-router 0.5.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "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 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "testnet-parachains-constants", "westend-runtime-constants", - "xcm-runtime-apis 0.7.0", + "xcm-runtime-apis 0.1.1", ] [[package]] name = "asset-test-utils" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-asset-conversion 22.0.0", - "pallet-assets 42.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", - "pallet-session 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-bridge-hub-router 0.18.0", - "parachains-common 21.0.0", +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-asset-conversion 10.0.0", + "pallet-assets 29.1.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-bridge-hub-router 0.5.0", + "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "xcm-runtime-apis 0.7.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "xcm-runtime-apis 0.1.1", +] + +[[package]] +name = "assets-common" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-primitives-core 0.7.0", + "ethereum-standards", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "pallet-asset-conversion 10.0.0", + "pallet-assets 29.1.0", + "pallet-revive", + "pallet-revive-uapi", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "tracing", ] [[package]] @@ -1069,28 +1093,6 @@ dependencies = [ "substrate-wasm-builder 24.0.2", ] -[[package]] -name = "assets-common" -version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "impl-trait-for-tuples", - "pallet-asset-conversion 22.0.0", - "pallet-assets 42.0.0", - "pallet-xcm 19.1.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "tracing", -] - [[package]] name = "async-channel" version = "1.9.0" @@ -1428,29 +1430,29 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336bf780dd7526a9a4bc1521720b25c1994dc132cccd59553431923fa4d1a693" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hash-db", "log", + "parity-scale-codec", ] [[package]] name = "binary-merkle-tree" -version = "16.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +checksum = "336bf780dd7526a9a4bc1521720b25c1994dc132cccd59553431923fa4d1a693" dependencies = [ "hash-db", "log", - "parity-scale-codec", ] [[package]] name = "binary-merkle-tree" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" dependencies = [ "hash-db", "log", @@ -1765,38 +1767,56 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-bridge-hub-cumulus 0.21.0", - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "bp-xcm-bridge-hub-router 0.17.0", - "frame-support 40.1.0", + "bp-bridge-hub-cumulus 0.7.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "staging-xcm 7.0.1", "testnet-parachains-constants", ] [[package]] name = "bp-asset-hub-westend" -version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-bridge-hub-cumulus 0.21.0", - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "bp-xcm-bridge-hub-router 0.17.0", - "frame-support 40.1.0", + "bp-bridge-hub-cumulus 0.7.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "staging-xcm 7.0.1", "testnet-parachains-constants", ] +[[package]] +name = "bp-bridge-hub-cumulus" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bp-messages 0.7.0", + "bp-polkadot-core 0.7.0", + "bp-runtime 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parachains-common 7.0.0", + "polkadot-primitives 7.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", +] + [[package]] name = "bp-bridge-hub-cumulus" version = "0.18.0" @@ -1813,21 +1833,6 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "bp-bridge-hub-cumulus" -version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "bp-messages 0.20.1", - "bp-polkadot-core 0.20.1", - "bp-runtime 0.20.1", - "frame-support 40.1.0", - "frame-system 40.1.0", - "polkadot-primitives 18.1.0", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "bp-bridge-hub-kusama" version = "1.0.0" @@ -1891,34 +1896,51 @@ dependencies = [ [[package]] name = "bp-bridge-hub-rococo" -version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-bridge-hub-cumulus 0.21.0", - "bp-messages 0.20.1", - "bp-runtime 0.20.1", + "bp-bridge-hub-cumulus 0.7.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", "bp-xcm-bridge-hub", - "frame-support 40.1.0", + "frame-support 28.0.0", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] name = "bp-bridge-hub-westend" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-bridge-hub-cumulus 0.21.0", - "bp-messages 0.20.1", - "bp-runtime 0.20.1", + "bp-bridge-hub-cumulus 0.7.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", "bp-xcm-bridge-hub", - "frame-support 40.1.0", + "frame-support 28.0.0", + "parity-scale-codec", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", +] + +[[package]] +name = "bp-header-chain" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bp-runtime 0.7.0", + "finality-grandpa", + "frame-support 28.0.0", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "scale-info", + "serde", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] @@ -1940,20 +1962,19 @@ dependencies = [ ] [[package]] -name = "bp-header-chain" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-messages" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-runtime 0.20.1", - "finality-grandpa", - "frame-support 40.1.0", + "bp-header-chain 0.7.0", + "bp-runtime 0.7.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] @@ -1974,36 +1995,37 @@ dependencies = [ ] [[package]] -name = "bp-messages" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-parachains" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-header-chain 0.20.1", - "bp-runtime 0.20.1", - "frame-support 40.1.0", + "bp-header-chain 0.7.0", + "bp-polkadot-core 0.7.0", + "bp-runtime 0.7.0", + "frame-support 28.0.0", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] -name = "bp-parachains" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-polkadot-core" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-header-chain 0.20.1", - "bp-polkadot-core 0.20.1", - "bp-runtime 0.20.1", - "frame-support 40.1.0", - "impl-trait-for-tuples", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] @@ -2026,38 +2048,44 @@ dependencies = [ ] [[package]] -name = "bp-polkadot-core" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-relayers" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "frame-support 40.1.0", - "frame-system 40.1.0", + "bp-header-chain 0.7.0", + "bp-messages 0.7.0", + "bp-parachains", + "bp-runtime 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-utility 28.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] -name = "bp-relayers" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-runtime" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-header-chain 0.20.1", - "bp-messages 0.20.1", - "bp-parachains", - "bp-runtime 0.20.1", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-utility 40.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-trie 29.0.0", + "trie-db 0.30.0", ] [[package]] @@ -2085,43 +2113,32 @@ dependencies = [ ] [[package]] -name = "bp-runtime" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-xcm-bridge-hub" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "hash-db", - "impl-trait-for-tuples", - "log", - "num-traits", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "trie-db 0.30.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", ] [[package]] -name = "bp-xcm-bridge-hub" -version = "0.6.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "bp-xcm-bridge-hub-router" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "frame-support 40.1.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", ] [[package]] @@ -2137,18 +2154,6 @@ dependencies = [ "staging-xcm 14.2.2", ] -[[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", -] - [[package]] name = "bs58" version = "0.5.1" @@ -2906,6 +2911,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" @@ -3038,10 +3058,36 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "cumulus-client-bootnodes" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "array-bytes", + "async-channel 1.9.0", + "cumulus-client-network", + "cumulus-primitives-core 0.7.0", + "cumulus-relay-chain-interface", + "futures", + "hex", + "ip_network", + "log", + "num-traits", + "parachains-common 7.0.0", + "parity-scale-codec", + "prost 0.12.6", + "prost-build", + "sc-network", + "sc-service", + "sp-consensus-babe 0.32.0", + "sp-runtime 31.0.1", + "tokio", +] + [[package]] name = "cumulus-client-cli" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "clap", "parity-scale-codec", @@ -3050,46 +3096,46 @@ dependencies = [ "sc-client-api", "sc-service", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "url", ] [[package]] name = "cumulus-client-collator" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "futures", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-client-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", "cumulus-client-parachain-inherent", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", "futures", "parity-scale-codec", @@ -3098,7 +3144,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -3107,19 +3153,19 @@ dependencies = [ "sc-telemetry", "sc-utils", "schnellru", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-timestamp 26.0.0", + "sp-trie 29.0.0", "substrate-prometheus-endpoint", "tokio", "tracing", @@ -3127,53 +3173,55 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", + "cumulus-relay-chain-streams", "dyn-clone", "futures", "log", "parity-scale-codec", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-client-api", "sc-consensus", "sc-consensus-babe", + "sc-network", "schnellru", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-timestamp 26.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-client-consensus-proposer" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "anyhow", "async-trait", - "cumulus-primitives-parachain-inherent 0.18.1", + "cumulus-primitives-parachain-inherent 0.7.0", "sp-consensus", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "thiserror 1.0.69", ] [[package]] name = "cumulus-client-network" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -3183,82 +3231,89 @@ dependencies = [ "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "sc-client-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-network", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-version 29.0.0", "tracing", ] [[package]] name = "cumulus-client-parachain-inherent" -version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-parachain-inherent 0.18.1", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", "parity-scale-codec", "sc-client-api", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-consensus-babe", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", + "cumulus-relay-chain-streams", "futures", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-network", + "sp-api 26.0.0", "sp-consensus", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-runtime 31.0.1", + "sp-version 29.0.0", "tracing", ] [[package]] name = "cumulus-client-service" -version = "0.23.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "async-channel 1.9.0", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-proof-size-hostfunction 0.12.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-proof-size-hostfunction 0.2.0", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", + "cumulus-relay-chain-streams", "futures", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", + "prometheus", "sc-client-api", "sc-consensus", "sc-network", @@ -3270,13 +3325,30 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-transaction-pool 26.0.0", +] + +[[package]] +name = "cumulus-pallet-aura-ext" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-pallet-parachain-system 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-aura 27.0.0", + "pallet-timestamp 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 30.0.0", + "sp-consensus-aura 0.32.0", + "sp-runtime 31.0.1", ] [[package]] @@ -3298,20 +3370,40 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-aura-ext" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-pallet-parachain-system" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-pallet-parachain-system 0.20.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-aura 39.0.0", - "pallet-timestamp 39.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-aura 0.42.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "bytes", + "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-primitives-proof-size-hostfunction 0.2.0", + "environmental", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "hashbrown 0.15.3", + "impl-trait-for-tuples", + "log", + "pallet-message-queue 31.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-parachains 7.0.0", + "scale-info", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "trie-db 0.30.0", ] [[package]] @@ -3351,41 +3443,6 @@ dependencies = [ "trie-db 0.29.1", ] -[[package]] -name = "cumulus-pallet-parachain-system" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-parachain-inherent 0.18.1", - "cumulus-primitives-proof-size-hostfunction 0.12.0", - "environmental", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", - "log", - "pallet-message-queue 43.1.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-runtime-parachains 19.1.0", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "trie-db 0.30.0", -] - [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" @@ -3401,7 +3458,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3409,6 +3466,19 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "cumulus-pallet-session-benchmarking" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", + "parity-scale-codec", + "sp-runtime 31.0.1", +] + [[package]] name = "cumulus-pallet-session-benchmarking" version = "19.0.0" @@ -3423,36 +3493,38 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "cumulus-pallet-session-benchmarking" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-session 40.0.0", - "parity-scale-codec", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "cumulus-pallet-weight-reclaim" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "derive-where", "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", +] + +[[package]] +name = "cumulus-pallet-xcm" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", ] [[package]] @@ -3472,18 +3544,29 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-xcm" -version = "0.19.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-pallet-xcmp-queue" +version = "0.7.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "frame-system 40.1.0", + "approx", + "bounded-collections", + "bp-xcm-bridge-hub-router 0.6.0", + "cumulus-primitives-core 0.7.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "pallet-message-queue 31.0.0", "parity-scale-codec", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -3513,28 +3596,12 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-xcmp-queue" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-aura" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bounded-collections", - "bp-xcm-bridge-hub-router 0.17.0", - "cumulus-primitives-core 0.18.1", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-message-queue 43.1.0", - "parity-scale-codec", - "polkadot-runtime-common 19.1.0", - "polkadot-runtime-parachains 19.1.0", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-api 26.0.0", + "sp-consensus-aura 0.32.0", ] [[package]] @@ -3552,12 +3619,20 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-aura" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-core" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-aura 0.42.0", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "scale-info", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", + "staging-xcm 7.0.1", + "tracing", ] [[package]] @@ -3578,19 +3653,17 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-core" -version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-parachain-inherent" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "async-trait", + "cumulus-primitives-core 0.7.0", "parity-scale-codec", - "polkadot-core-primitives 17.1.0", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-trie 29.0.0", ] [[package]] @@ -3609,17 +3682,13 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "async-trait", - "cumulus-primitives-core 0.18.1", - "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-trie 29.0.0", ] [[package]] @@ -3634,30 +3703,37 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-proof-size-hostfunction" -version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-storage-weight-reclaim" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-proof-size-hostfunction 0.2.0", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 31.0.1", ] [[package]] -name = "cumulus-primitives-storage-weight-reclaim" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "cumulus-primitives-utility" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-proof-size-hostfunction 0.12.0", - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", "log", + "pallet-asset-conversion 10.0.0", "parity-scale-codec", - "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-runtime-common 7.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -3678,83 +3754,73 @@ dependencies = [ "staging-xcm-executor 17.0.2", ] -[[package]] -name = "cumulus-primitives-utility" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "log", - "pallet-asset-conversion 22.0.0", - "parity-scale-codec", - "polkadot-runtime-common 19.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", -] - [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.23.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "async-channel 1.9.0", "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-client-bootnodes", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", "futures", "futures-timer", "polkadot-cli", + "polkadot-primitives 7.0.0", "polkadot-service", "sc-cli", "sc-client-api", + "sc-network", "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", ] [[package]] name = "cumulus-relay-chain-interface" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "futures", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", "sc-client-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-network", + "sp-api 26.0.0", "sp-blockchain", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-state-machine 0.35.0", + "sp-version 29.0.0", "thiserror 1.0.69", ] [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.23.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", + "async-channel 1.9.0", "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-client-bootnodes", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", - "polkadot-core-primitives 17.1.0", + "polkadot-core-primitives 7.0.0", "polkadot-network-bridge", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "polkadot-service", "sc-authority-discovery", "sc-client-api", @@ -3763,22 +3829,22 @@ dependencies = [ "sc-service", "sc-tracing", "sc-utils", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.42.1", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-babe 0.32.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", "either", "futures", @@ -3790,6 +3856,7 @@ dependencies = [ "prometheus", "rand 0.8.5", "sc-client-api", + "sc-network", "sc-rpc-api", "sc-service", "schnellru", @@ -3797,13 +3864,13 @@ dependencies = [ "serde_json", "smoldot 0.11.0", "smoldot-light 0.9.0", - "sp-authority-discovery 36.0.0", - "sp-consensus-babe 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-version 29.0.0", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -3812,17 +3879,31 @@ dependencies = [ "url", ] +[[package]] +name = "cumulus-relay-chain-streams" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-relay-chain-interface", + "futures", + "polkadot-node-subsystem", + "polkadot-primitives 7.0.0", + "sp-api 26.0.0", + "sp-consensus", + "tracing", +] + [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "parity-scale-codec", - "polkadot-primitives 18.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-primitives 7.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", ] [[package]] @@ -4457,38 +4538,42 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "20.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "asset-test-utils", - "bp-messages 0.20.1", + "bp-messages 0.7.0", "bp-xcm-bridge-hub", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", "hex-literal", - "pallet-assets 42.0.0", - "pallet-balances 41.1.0", + "pallet-asset-conversion 10.0.0", + "pallet-assets 29.1.0", + "pallet-balances 28.0.0", "pallet-bridge-messages", - "pallet-message-queue 43.1.0", - "pallet-xcm 19.1.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", "pallet-xcm-bridge-hub", - "parachains-common 21.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-parachains 19.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", "sc-consensus-grandpa", - "sp-authority-discovery 36.0.0", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-core 28.0.0", + "sp-keyring 31.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", "xcm-emulator", + "xcm-runtime-apis 0.1.1", + "xcm-simulator", ] [[package]] @@ -4694,6 +4779,14 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethereum-standards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "alloy-core", +] + [[package]] name = "ethereum-types" version = "0.14.1" @@ -4973,8 +5066,8 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "fork-tree" -version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", ] @@ -5015,6 +5108,30 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" +[[package]] +name = "frame-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-support 28.0.0", + "frame-support-procedural 23.0.0", + "frame-system 28.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-storage 19.0.0", + "static_assertions", +] + [[package]] name = "frame-benchmarking" version = "38.0.0" @@ -5040,34 +5157,10 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "frame-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "frame-support 40.1.0", - "frame-support-procedural 33.0.0", - "frame-system 40.1.0", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "static_assertions", -] - [[package]] name = "frame-benchmarking-cli" -version = "47.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "array-bytes", @@ -5075,18 +5168,19 @@ dependencies = [ "clap", "comfy-table", "cumulus-client-parachain-inherent", - "cumulus-primitives-proof-size-hostfunction 0.12.0", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "cumulus-primitives-proof-size-hostfunction 0.2.0", + "frame-benchmarking 28.0.0", + "frame-storage-access-test-runtime", + "frame-support 28.0.0", + "frame-system 28.0.0", "gethostname", "handlebars", "itertools 0.11.0", "linked-hash-map", "log", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -5094,30 +5188,32 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-client-db", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", + "sc-executor-common 0.29.0", + "sc-executor-wasmtime 0.29.0", "sc-runtime-utilities", "sc-service", "sc-sysinfo", "serde", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-database", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", - "sp-transaction-pool 36.0.0", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-externalities 0.25.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-timestamp 26.0.0", + "sp-transaction-pool 26.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "sp-wasm-interface 20.0.0", "subxt", "subxt-signer", "thiserror 1.0.69", @@ -5126,13 +5222,13 @@ dependencies = [ [[package]] name = "frame-decode" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6027a409bac4fe95b4d107f965fcdbc252fc89d884a360d076b3070b6128c094" +checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" dependencies = [ - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "parity-scale-codec", - "scale-decode 0.14.0", + "scale-decode 0.16.0", "scale-info", "scale-type-resolver 0.2.0", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5140,9 +5236,8 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "14.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -5152,8 +5247,9 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "14.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -5161,6 +5257,23 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "frame-election-provider-support" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-election-provider-solution-type 13.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", +] + [[package]] name = "frame-election-provider-support" version = "38.0.0" @@ -5172,26 +5285,28 @@ dependencies = [ "frame-system 38.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-npos-elections 34.0.0", "sp-runtime 39.0.5", ] [[package]] -name = "frame-election-provider-support" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "frame-executive" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-election-provider-solution-type 16.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "aquamarine", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-try-runtime 0.34.0", + "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-npos-elections 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", ] [[package]] @@ -5210,25 +5325,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "frame-executive" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "aquamarine", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-try-runtime 0.46.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-tracing 17.1.0", ] [[package]] @@ -5245,9 +5342,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "17.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" dependencies = [ "cfg-if", "parity-scale-codec", @@ -5257,9 +5354,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" dependencies = [ "cfg-if", "parity-scale-codec", @@ -5267,6 +5364,22 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-metadata-hash-extension" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "array-bytes", + "const-hex", + "docify", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 31.0.1", +] + [[package]] name = "frame-metadata-hash-extension" version = "0.6.0" @@ -5284,19 +5397,58 @@ dependencies = [ ] [[package]] -name = "frame-metadata-hash-extension" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "frame-storage-access-test-runtime" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-pallet-parachain-system 0.7.0", + "parity-scale-codec", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "substrate-wasm-builder 17.0.0", +] + +[[package]] +name = "frame-support" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "aquamarine", "array-bytes", - "const-hex", + "binary-merkle-tree 13.0.0", + "bitflags 1.3.2", "docify", - "frame-support 40.1.0", - "frame-system 40.1.0", + "environmental", + "frame-metadata 23.0.0", + "frame-support-procedural 23.0.0", + "impl-trait-for-tuples", + "k256", "log", + "macro_magic", "parity-scale-codec", + "paste", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "serde_json", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "sp-weights 27.0.0", + "tt-call", ] [[package]] @@ -5323,7 +5475,7 @@ dependencies = [ "serde_json", "smallvec", "sp-api 34.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5335,101 +5487,59 @@ dependencies = [ "sp-staking 36.0.0", "sp-state-machine 0.43.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", + "sp-weights 31.1.0", "static_assertions", "tt-call", ] -[[package]] -name = "frame-support" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "aquamarine", - "array-bytes", - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata 20.0.0", - "frame-support-procedural 33.0.0", - "impl-trait-for-tuples", - "k256", - "log", - "macro_magic", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-metadata-ir 0.10.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "tt-call", -] - [[package]] name = "frame-support-procedural" -version = "30.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da784d943f2a945be923ab081a7c0837355b38045c50945d7ec1a138e2f3c52" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools 13.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support-procedural-tools 10.0.0", "itertools 0.11.0", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural" -version = "33.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "30.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da784d943f2a945be923ab081a7c0837355b38045c50945d7ec1a138e2f3c52" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "frame-support-procedural-tools 13.0.1", "itertools 0.11.0", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural-tools" -version = "13.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support-procedural-tools-derive 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support-procedural-tools-derive 11.0.0", "proc-macro-crate 3.3.0", "proc-macro2", "quote", @@ -5439,9 +5549,10 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" dependencies = [ - "frame-support-procedural-tools-derive 12.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "frame-support-procedural-tools-derive 12.0.0", "proc-macro-crate 3.3.0", "proc-macro2", "quote", @@ -5450,9 +5561,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", @@ -5462,13 +5572,33 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] +[[package]] +name = "frame-system" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cfg-if", + "docify", + "frame-support 28.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "sp-weights 27.0.0", +] + [[package]] name = "frame-system" version = "38.0.0" @@ -5487,26 +5617,21 @@ dependencies = [ "sp-runtime 39.0.5", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-version 37.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", ] [[package]] -name = "frame-system" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "frame-system-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cfg-if", - "docify", - "frame-support 40.1.0", - "log", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -5525,17 +5650,13 @@ dependencies = [ ] [[package]] -name = "frame-system-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "frame-system-rpc-runtime-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "docify", "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", ] [[package]] @@ -5550,13 +5671,14 @@ dependencies = [ ] [[package]] -name = "frame-system-rpc-runtime-api" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "frame-try-runtime" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", + "frame-support 28.0.0", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -5571,17 +5693,6 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "frame-try-runtime" -version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "frame-support 40.1.0", - "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "fs-err" version = "2.11.0" @@ -5772,16 +5883,30 @@ dependencies = [ ] [[package]] -name = "generic-array" -version = "0.12.4" +name = "generator" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows 0.61.1", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" @@ -6118,6 +6243,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" @@ -6126,7 +6276,7 @@ checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.4", "ipconfig", "lru-cache", "once_cell", @@ -6139,6 +6289,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" @@ -6252,6 +6423,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" @@ -6533,7 +6714,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.53.0", ] [[package]] @@ -6925,31 +7106,31 @@ dependencies = [ "asset-hub-paseo-runtime", "asset-hub-westend-runtime", "asset-test-utils", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "emulated-integration-tests-common", - "frame-support 40.1.0", - "pallet-assets 42.0.0", - "pallet-balances 41.1.0", - "pallet-message-queue 43.1.0", - "pallet-xcm 19.1.0", + "frame-support 28.0.0", + "pallet-assets 29.1.0", + "pallet-balances 28.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", "parity-scale-codec", "paseo-runtime", "paseo-runtime-constants", - "polkadot-primitives 18.1.0", - "polkadot-runtime-parachains 19.1.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", "pop-runtime-common", "pop-runtime-devnet", "pop-runtime-mainnet", "pop-runtime-testnet", - "sp-authority-discovery 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", "tracing-subscriber", "westend-runtime", "westend-runtime-constants", @@ -7019,7 +7200,7 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "ismp" version = "0.2.2" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "anyhow", "derive_more 1.0.0", @@ -7036,12 +7217,12 @@ dependencies = [ [[package]] name = "ismp-parachain" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "frame-system 40.1.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "hex-literal", "ismp", "log", @@ -7050,22 +7231,22 @@ dependencies = [ "primitive-types 0.13.1", "scale-info", "serde", - "sp-consensus-aura 0.42.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-aura 0.32.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", "substrate-state-machine", ] [[package]] name = "ismp-parachain-inherent" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "anyhow", "async-trait", - "cumulus-primitives-core 0.18.1", + "cumulus-primitives-core 0.7.0", "cumulus-relay-chain-interface", "ismp", "ismp-parachain", @@ -7073,19 +7254,19 @@ dependencies = [ "log", "pallet-ismp-runtime-api", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "ismp-parachain-runtime-api" version = "1.15.1" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ - "cumulus-pallet-parachain-system 0.20.0", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "cumulus-pallet-parachain-system 0.7.0", + "sp-api 26.0.0", ] [[package]] @@ -7399,7 +7580,7 @@ dependencies = [ "sp-core 34.0.0", "sp-runtime 39.0.5", "sp-trie 37.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm-builder 17.0.5", ] @@ -7585,7 +7766,7 @@ checksum = "97f37f30d5c7275db282ecd86e54f29dd2176bd3ac656f06abf43bedb21eb8bd" dependencies = [ "async-trait", "futures", - "hickory-resolver", + "hickory-resolver 0.24.4", "libp2p-core", "libp2p-identity", "parking_lot 0.12.3", @@ -7671,7 +7852,7 @@ checksum = "14b8546b6644032565eb29046b42744aee1e9f261ed99671b2c93fb140dba417" dependencies = [ "data-encoding", "futures", - "hickory-proto", + "hickory-proto 0.24.4", "if-watch", "libp2p-core", "libp2p-identity", @@ -8096,9 +8277,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", @@ -8107,7 +8288,7 @@ dependencies = [ "ed25519-dalek", "futures", "futures-timer", - "hickory-resolver", + "hickory-resolver 0.25.2", "indexmap 2.9.0", "libc", "mockall", @@ -8157,6 +8338,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.8.1" @@ -8353,6 +8547,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory-db" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +dependencies = [ + "hash-db", + "hashbrown 0.15.3", +] + [[package]] name = "merkleized-metadata" version = "0.4.0" @@ -8433,36 +8637,36 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "log", "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-beefy 24.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-beefy 13.0.0", + "sp-core 28.0.0", + "sp-mmr-primitives 26.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "mmr-rpc" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-mmr-primitives 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -8491,6 +8695,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" @@ -8782,6 +9005,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -8931,6 +9163,10 @@ 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 = "opaque-debug" @@ -9010,22 +9246,40 @@ name = "pallet-api" version = "0.1.0" dependencies = [ "anyhow", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "ismp", "log", - "pallet-assets 42.0.0", - "pallet-balances 41.1.0", + "pallet-assets 29.1.0", + "pallet-balances 28.0.0", "pallet-ismp", "pallet-nfts 34.1.0", "parity-scale-codec", "pop-chain-extension", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", +] + +[[package]] +name = "pallet-asset-conversion" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9041,46 +9295,43 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api 34.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", ] [[package]] -name = "pallet-asset-conversion" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-asset-conversion-ops" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-asset-conversion 10.0.0", "parity-scale-codec", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-asset-conversion-ops" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-asset-conversion-tx-payment" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-asset-conversion 22.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-asset-conversion 10.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] @@ -9099,18 +9350,17 @@ dependencies = [ ] [[package]] -name = "pallet-asset-conversion-tx-payment" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-asset-rate" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-asset-conversion 22.0.0", - "pallet-transaction-payment 40.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9129,35 +9379,37 @@ dependencies = [ ] [[package]] -name = "pallet-asset-rate" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-asset-rewards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] -name = "pallet-asset-rewards" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-asset-tx-payment" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9179,20 +9431,21 @@ dependencies = [ ] [[package]] -name = "pallet-asset-tx-payment" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-assets" +version = "29.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-transaction-payment 40.0.0", + "ethereum-standards", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "log", + "pallet-revive", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9213,31 +9466,31 @@ dependencies = [ ] [[package]] -name = "pallet-assets" -version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-assets-freezer" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", "log", + "pallet-assets 29.1.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", ] [[package]] -name = "pallet-assets-freezer" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-aura" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-assets 42.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-application-crypto 30.0.0", + "sp-consensus-aura 0.32.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9258,19 +9511,18 @@ dependencies = [ ] [[package]] -name = "pallet-aura" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-authority-discovery" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-timestamp 39.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-aura 0.42.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-authority-discovery 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9290,18 +9542,16 @@ dependencies = [ ] [[package]] -name = "pallet-authority-discovery" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-authorship" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-session 40.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] @@ -9319,16 +9569,26 @@ dependencies = [ ] [[package]] -name = "pallet-authorship" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-babe" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", ] [[package]] @@ -9356,26 +9616,24 @@ dependencies = [ ] [[package]] -name = "pallet-babe" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-bags-list" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "aquamarine", + "docify", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 40.0.0", - "pallet-session 40.0.0", - "pallet-timestamp 39.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-babe 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", ] [[package]] @@ -9397,28 +9655,23 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", ] [[package]] -name = "pallet-bags-list" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-balances" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "aquamarine", "docify", - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 41.1.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9438,19 +9691,22 @@ dependencies = [ ] [[package]] -name = "pallet-balances" -version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-beefy" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-consensus-beefy 13.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", ] [[package]] @@ -9474,22 +9730,28 @@ dependencies = [ ] [[package]] -name = "pallet-beefy" -version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-beefy-mmr" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", + "array-bytes", + "binary-merkle-tree 13.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 40.0.0", - "pallet-session 40.0.0", + "pallet-beefy 28.0.0", + "pallet-mmr 27.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-beefy 24.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", + "sp-api 26.0.0", + "sp-consensus-beefy 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", ] [[package]] @@ -9519,28 +9781,20 @@ dependencies = [ ] [[package]] -name = "pallet-beefy-mmr" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-bounties" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "array-bytes", - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-beefy 41.1.0", - "pallet-mmr 40.0.0", - "pallet-session 40.0.0", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-beefy 24.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9562,39 +9816,40 @@ dependencies = [ ] [[package]] -name = "pallet-bounties" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-bridge-messages" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "bp-header-chain 0.7.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-treasury 39.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-trie 29.0.0", ] [[package]] -name = "pallet-bridge-messages" -version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-broker" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-header-chain 0.20.1", - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "bitvec", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9611,27 +9866,27 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api 34.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-runtime 39.0.5", ] [[package]] -name = "pallet-broker" -version = "0.19.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-child-bounties" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bitvec", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-bounties 27.0.0", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9654,21 +9909,22 @@ dependencies = [ ] [[package]] -name = "pallet-child-bounties" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-collator-selection" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-bounties 39.0.0", - "pallet-treasury 39.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", + "rand 0.8.5", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -9691,56 +9947,37 @@ dependencies = [ "sp-staking 36.0.0", ] -[[package]] -name = "pallet-collator-selection" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-session 40.0.0", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", -] - [[package]] name = "pallet-collective" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "pallet-contracts" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "environmental", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 41.1.0", + "pallet-balances 28.0.0", "pallet-contracts-proc-macro", - "pallet-contracts-uapi 14.0.0", + "pallet-contracts-uapi 5.0.0", "parity-scale-codec", "paste", "rand 0.8.5", @@ -9748,26 +9985,37 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", "wasm-instrument", "wasmi 0.32.3", ] [[package]] name = "pallet-contracts-proc-macro" -version = "23.0.3" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "18.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] +[[package]] +name = "pallet-contracts-uapi" +version = "5.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bitflags 1.3.2", + "parity-scale-codec", + "paste", + "scale-info", +] + [[package]] name = "pallet-contracts-uapi" version = "9.0.0" @@ -9780,14 +10028,19 @@ dependencies = [ ] [[package]] -name = "pallet-contracts-uapi" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-conviction-voting" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bitflags 1.3.2", + "assert_matches", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", - "paste", "scale-info", + "serde", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9808,19 +10061,18 @@ dependencies = [ ] [[package]] -name = "pallet-conviction-voting" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-delegated-staking" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "assert_matches", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", "scale-info", - "serde", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -9840,35 +10092,41 @@ dependencies = [ ] [[package]] -name = "pallet-delegated-staking" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-democracy" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-democracy" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-election-provider-multi-phase" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", + "rand 0.8.5", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "strum 0.26.3", ] [[package]] @@ -9886,7 +10144,7 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-io 38.0.2", "sp-npos-elections 34.0.0", @@ -9895,25 +10153,16 @@ dependencies = [ ] [[package]] -name = "pallet-election-provider-multi-phase" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-election-provider-support-benchmarking" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-election-provider-support-benchmarking 39.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-npos-elections 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "strum 0.26.3", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -9931,34 +10180,39 @@ dependencies = [ ] [[package]] -name = "pallet-election-provider-support-benchmarking" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-elections-phragmen" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", - "sp-npos-elections 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "scale-info", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] -name = "pallet-elections-phragmen" -version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-fast-unstake" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "docify", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-npos-elections 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -9981,21 +10235,25 @@ dependencies = [ ] [[package]] -name = "pallet-fast-unstake" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-grandpa" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", ] [[package]] @@ -10022,25 +10280,19 @@ dependencies = [ ] [[package]] -name = "pallet-grandpa" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-identity" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "enumflags2", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 40.0.0", - "pallet-session 40.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -10061,19 +10313,22 @@ dependencies = [ ] [[package]] -name = "pallet-identity" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-im-online" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "enumflags2", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-authorship 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -10097,22 +10352,18 @@ dependencies = [ ] [[package]] -name = "pallet-im-online" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-indices" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-authorship 40.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -10132,51 +10383,36 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "pallet-indices" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "pallet-ismp" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "anyhow", "fortuples", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "ismp", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-mmr-primitives 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] name = "pallet-ismp-rpc" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "anyhow", - "frame-system 40.1.0", + "frame-system 28.0.0", "hash-db", "hex", "hex-literal", @@ -10189,13 +10425,13 @@ dependencies = [ "sc-rpc", "serde", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-mmr-primitives 26.0.0", + "sp-runtime 31.0.1", + "sp-storage 19.0.0", + "sp-trie 29.0.0", "tower", "trie-db 0.30.0", ] @@ -10203,31 +10439,34 @@ dependencies = [ [[package]] name = "pallet-ismp-runtime-api" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "ismp", "pallet-ismp", "parity-scale-codec", "primitive-types 0.13.1", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", + "sp-api 26.0.0", + "sp-mmr-primitives 26.0.0", ] [[package]] -name = "pallet-membership" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-message-queue" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "environmental", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] @@ -10243,67 +10482,60 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", ] [[package]] -name = "pallet-message-queue" -version = "43.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-meta-tx" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "environmental", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] -name = "pallet-meta-tx" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-migrations" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "log", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-migrations" -version = "10.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-mmr" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", "log", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-mmr-primitives 26.0.0", ] [[package]] @@ -10325,32 +10557,31 @@ dependencies = [ ] [[package]] -name = "pallet-mmr" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-motion" +version = "4.0.0-dev" dependencies = [ + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-balances 28.0.0", + "pallet-collective", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", - "sp-mmr-primitives 36.1.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-motion" -version = "4.0.0-dev" +name = "pallet-multisig" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", "log", - "pallet-balances 41.1.0", - "pallet-collective", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", ] [[package]] @@ -10370,30 +10601,33 @@ dependencies = [ ] [[package]] -name = "pallet-multisig" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nft-fractionalization" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", + "pallet-assets 29.1.0", + "pallet-nfts 22.0.0", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", ] [[package]] -name = "pallet-nft-fractionalization" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nfts" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "enumflags2", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-assets 42.0.0", - "pallet-nfts 34.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -10419,34 +10653,26 @@ name = "pallet-nfts" version = "34.1.0" dependencies = [ "enumflags2", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 41.1.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-nfts" -version = "34.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nfts-runtime-api" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "enumflags2", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", ] [[package]] @@ -10461,22 +10687,31 @@ dependencies = [ ] [[package]] -name = "pallet-nfts-runtime-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nis" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-sdk-frame", + "scale-info", ] [[package]] -name = "pallet-nis" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nomination-pools" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "pallet-balances 28.0.0", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -10495,25 +10730,27 @@ dependencies = [ "sp-io 38.0.2", "sp-runtime 39.0.5", "sp-staking 36.0.0", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", ] [[package]] -name = "pallet-nomination-pools" -version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nomination-pools-benchmarking" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-balances 41.1.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-bags-list 27.0.0", + "pallet-delegated-staking 1.0.0", + "pallet-nomination-pools 25.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-staking 26.0.0", ] [[package]] @@ -10538,23 +10775,13 @@ dependencies = [ ] [[package]] -name = "pallet-nomination-pools-benchmarking" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-nomination-pools-runtime-api" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-bags-list 39.1.0", - "pallet-delegated-staking 7.0.0", - "pallet-nomination-pools 38.1.0", - "pallet-staking 40.1.0", + "pallet-nomination-pools 25.0.0", "parity-scale-codec", - "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-api 26.0.0", ] [[package]] @@ -10569,13 +10796,18 @@ dependencies = [ ] [[package]] -name = "pallet-nomination-pools-runtime-api" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-offences" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "pallet-nomination-pools 38.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "scale-info", + "serde", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -10596,18 +10828,26 @@ dependencies = [ ] [[package]] -name = "pallet-offences" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-offences-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-grandpa 28.0.0", + "pallet-im-online 27.0.0", + "pallet-offences 27.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -10635,26 +10875,20 @@ dependencies = [ ] [[package]] -name = "pallet-offences-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-parameters" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-babe 40.0.0", - "pallet-balances 41.1.0", - "pallet-grandpa 40.0.0", - "pallet-im-online 39.1.0", - "pallet-offences 39.0.0", - "pallet-session 40.0.0", - "pallet-staking 40.1.0", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", + "paste", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -10676,20 +10910,19 @@ dependencies = [ ] [[package]] -name = "pallet-parameters" -version = "0.11.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-preimage" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", - "paste", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -10710,19 +10943,13 @@ dependencies = [ ] [[package]] -name = "pallet-preimage" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-proxy" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", ] [[package]] @@ -10740,83 +10967,69 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "pallet-proxy" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "parity-scale-codec", - "polkadot-sdk-frame", - "scale-info", -] - [[package]] name = "pallet-ranked-collective" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "pallet-recovery" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", ] [[package]] name = "pallet-referenda" -version = "38.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3008c20531d1730c9b457ae77ecf0e3c9b07aaf8c4f5d798d61ef6f0b9e2d4b" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "assert_matches", - "frame-benchmarking 38.0.0", - "frame-support 38.2.0", - "frame-system 38.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 38.0.2", - "sp-runtime 39.0.5", + "sp-arithmetic 23.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "pallet-referenda" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3008c20531d1730c9b457ae77ecf0e3c9b07aaf8c4f5d798d61ef6f0b9e2d4b" dependencies = [ "assert_matches", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 38.0.0", + "frame-support 38.2.0", + "frame-system 38.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 26.1.0", + "sp-io 38.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -10839,18 +11052,19 @@ dependencies = [ [[package]] name = "pallet-revive" -version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "alloy-core", "derive_more 0.99.20", "environmental", - "ethabi-decode 2.0.0", + "ethereum-standards", "ethereum-types 0.15.1", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "hex-literal", + "humantime-serde", "impl-trait-for-tuples", "log", "num-bigint", @@ -10859,7 +11073,7 @@ dependencies = [ "pallet-revive-fixtures", "pallet-revive-proc-macro", "pallet-revive-uapi", - "pallet-transaction-payment 40.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", "paste", "polkavm 0.21.0", @@ -10870,38 +11084,36 @@ dependencies = [ "rlp 0.6.1", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-aura 0.42.0", - "sp-consensus-babe 0.42.1", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-consensus-aura 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", "substrate-bn", "subxt-signer", ] [[package]] name = "pallet-revive-fixtures" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "anyhow", "cargo_metadata 0.15.4", "pallet-revive-uapi", "polkavm-linker 0.21.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", "toml 0.8.22", ] [[package]] name = "pallet-revive-proc-macro" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", @@ -10910,8 +11122,8 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", @@ -10922,16 +11134,32 @@ dependencies = [ [[package]] name = "pallet-root-testing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "4.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 30.0.0", + "sp-runtime 31.0.1", +] + +[[package]] +name = "pallet-scheduler" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] @@ -10949,24 +11177,28 @@ dependencies = [ "scale-info", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", ] [[package]] -name = "pallet-scheduler" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-session" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", "log", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", ] [[package]] @@ -10992,24 +11224,19 @@ dependencies = [ ] [[package]] -name = "pallet-session" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-session-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", - "log", - "pallet-timestamp 39.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", - "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "rand 0.8.5", + "sp-runtime 31.0.1", + "sp-session 27.0.0", ] [[package]] @@ -11030,36 +11257,42 @@ dependencies = [ ] [[package]] -name = "pallet-session-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-society" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-session 40.0.0", - "pallet-staking 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", - "rand 0.8.5", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", + "rand_chacha 0.3.1", + "scale-info", + "sp-arithmetic 23.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-society" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-staking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-application-crypto 30.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", ] [[package]] @@ -11086,25 +11319,39 @@ dependencies = [ ] [[package]] -name = "pallet-staking" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-staking-async-ah-client" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 40.0.0", - "pallet-session 40.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", + "pallet-staking-async-rc-client", "parity-scale-codec", - "rand_chacha 0.3.1", "scale-info", "serde", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", +] + +[[package]] +name = "pallet-staking-async-rc-client" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "staging-xcm 7.0.1", ] [[package]] @@ -11121,42 +11368,58 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" -version = "22.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b982dbfe9fbc548dc7f9a3078214989ed58cabf521a8313ae1767d6b4b53b9b" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 23.0.0", ] [[package]] name = "pallet-staking-reward-fn" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b982dbfe9fbc548dc7f9a3078214989ed58cabf521a8313ae1767d6b4b53b9b" dependencies = [ "log", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 26.1.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7298559ef3a6b2f5dfbe9a3b8f3d22f2ff9b073c97f4c4853d2b316d973e72d" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", - "sp-api 34.0.0", - "sp-staking 36.0.0", + "sp-api 26.0.0", + "sp-staking 26.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7298559ef3a6b2f5dfbe9a3b8f3d22f2ff9b073c97f4c4853d2b316d973e72d" +dependencies = [ + "parity-scale-codec", + "sp-api 34.0.0", + "sp-staking 36.0.0", +] + +[[package]] +name = "pallet-state-trie-migration" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "scale-info", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -11177,19 +11440,18 @@ dependencies = [ ] [[package]] -name = "pallet-state-trie-migration" -version = "44.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-sudo" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -11209,18 +11471,21 @@ dependencies = [ ] [[package]] -name = "pallet-sudo" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-timestamp" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-storage 19.0.0", + "sp-timestamp 26.0.0", ] [[package]] @@ -11244,40 +11509,36 @@ dependencies = [ ] [[package]] -name = "pallet-timestamp" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-tips" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] -name = "pallet-tips" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-transaction-payment" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-treasury 39.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -11297,35 +11558,31 @@ dependencies = [ ] [[package]] -name = "pallet-transaction-payment" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-transaction-payment-rpc" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", "parity-scale-codec", - "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-blockchain", + "sp-core 28.0.0", + "sp-rpc", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] -name = "pallet-transaction-payment-rpc" -version = "43.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-transaction-payment-rpc-runtime-api" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "jsonrpsee", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-rpc", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] @@ -11338,19 +11595,26 @@ dependencies = [ "parity-scale-codec", "sp-api 34.0.0", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", ] [[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-treasury" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "pallet-transaction-payment 40.0.0", + "docify", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "log", + "pallet-balances 28.0.0", "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -11373,22 +11637,17 @@ dependencies = [ ] [[package]] -name = "pallet-treasury" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-uniques" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 41.1.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] @@ -11407,17 +11666,18 @@ dependencies = [ ] [[package]] -name = "pallet-uniques" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-utility" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -11437,34 +11697,32 @@ dependencies = [ ] [[package]] -name = "pallet-utility" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-verify-signature" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] -name = "pallet-verify-signature" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-vesting" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] @@ -11483,17 +11741,13 @@ dependencies = [ ] [[package]] -name = "pallet-vesting" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-whitelist" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", ] [[package]] @@ -11512,13 +11766,26 @@ dependencies = [ ] [[package]] -name = "pallet-whitelist" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-xcm" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "bounded-collections", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "tracing", + "xcm-runtime-apis 0.1.1", ] [[package]] @@ -11547,26 +11814,20 @@ dependencies = [ ] [[package]] -name = "pallet-xcm" -version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-xcm-benchmarks" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bounded-collections", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-balances 41.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "tracing", - "xcm-runtime-apis 0.7.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -11588,42 +11849,45 @@ dependencies = [ ] [[package]] -name = "pallet-xcm-benchmarks" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-xcm-bridge-hub" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "bp-messages 0.7.0", + "bp-runtime 0.7.0", + "bp-xcm-bridge-hub", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", + "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] -name = "pallet-xcm-bridge-hub" -version = "0.16.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "pallet-xcm-bridge-hub-router" +version = "0.5.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-messages 0.20.1", - "bp-runtime 0.20.1", - "bp-xcm-bridge-hub", - "frame-support 40.1.0", - "frame-system 40.1.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-bridge-messages", "parity-scale-codec", + "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -11647,22 +11911,32 @@ dependencies = [ ] [[package]] -name = "pallet-xcm-bridge-hub-router" -version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "parachains-common" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-xcm-bridge-hub-router 0.17.0", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", + "pallet-asset-tx-payment 28.0.0", + "pallet-assets 29.1.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", "parity-scale-codec", + "polkadot-primitives 7.0.0", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -11696,64 +11970,35 @@ dependencies = [ "substrate-wasm-builder 24.0.2", ] -[[package]] -name = "parachains-common" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-utility 0.20.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "log", - "pallet-asset-tx-payment 40.0.0", - "pallet-assets 42.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", - "pallet-message-queue 43.1.0", - "pallet-xcm 19.1.0", - "parity-scale-codec", - "polkadot-primitives 18.1.0", - "scale-info", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", -] - [[package]] name = "parachains-runtimes-test-utils" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-parachain-inherent 0.18.1", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-test-relay-sproof-builder", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", - "pallet-session 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-xcm 19.1.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", - "xcm-runtime-apis 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", + "xcm-runtime-apis 0.1.1", ] [[package]] @@ -11972,7 +12217,7 @@ dependencies = [ "pallet-session-benchmarking 38.0.0", "pallet-staking 38.0.1", "pallet-staking-reward-curve", - "pallet-staking-reward-fn 22.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-staking-reward-fn 22.0.1", "pallet-staking-runtime-api 24.0.0", "pallet-state-trie-migration 40.0.0", "pallet-sudo 38.0.0", @@ -11996,7 +12241,7 @@ dependencies = [ "serde_json", "sp-api 34.0.0", "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-authority-discovery 34.0.0", "sp-block-builder 34.0.0", "sp-consensus-babe 0.40.0", @@ -12037,7 +12282,7 @@ dependencies = [ "sp-core 34.0.0", "sp-runtime 39.0.5", "sp-trie 37.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm-builder 17.0.5", ] @@ -12217,8 +12462,8 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polkadot-approval-distribution" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "futures-timer", @@ -12228,30 +12473,30 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fatality", "futures", @@ -12261,20 +12506,20 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "sc-network", "schnellru", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "fatality", @@ -12285,7 +12530,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "sc-network", "schnellru", @@ -12316,8 +12561,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "clap", "frame-benchmarking-cli", @@ -12331,17 +12576,17 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keyring 31.0.0", + "sp-runtime 31.0.1", + "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "thiserror 1.0.69", ] [[package]] name = "polkadot-collator-protocol" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitvec", "fatality", @@ -12351,11 +12596,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "schnellru", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", "tokio-util", "tracing-gum", @@ -12363,31 +12608,31 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2900d3b857e34c480101618a950c3a4fbcddc8c0d50573d48553376185908b8" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 34.0.0", - "sp-runtime 39.0.5", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "polkadot-core-primitives" -version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2900d3b857e34c480101618a950c3a4fbcddc8c0d50573d48553376185908b8" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 34.0.0", + "sp-runtime 39.0.5", ] [[package]] name = "polkadot-dispute-distribution" -version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fatality", "futures", @@ -12398,53 +12643,53 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-network", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "reed-solomon-novelpoly", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-trie 29.0.0", "thiserror 1.0.69", ] [[package]] name = "polkadot-gossip-support" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-keystore 0.34.0", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "always-assert", "async-trait", @@ -12457,7 +12702,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-network", "sp-consensus", "thiserror 1.0.69", @@ -12466,8 +12711,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "parity-scale-codec", @@ -12475,17 +12720,17 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "schnellru", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "bitvec", @@ -12499,25 +12744,25 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", "sp-consensus", - "sp-consensus-slots 0.42.1", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-slots 0.32.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting-parallel" -version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -12530,7 +12775,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "rand_core 0.6.4", "sc-keystore", @@ -12540,8 +12785,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitvec", "futures", @@ -12551,7 +12796,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sp-consensus", "thiserror 1.0.69", "tracing-gum", @@ -12559,8 +12804,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitvec", "fatality", @@ -12569,25 +12814,25 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "polkadot-statement-table", "schnellru", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", "wasm-timer", @@ -12595,8 +12840,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -12608,17 +12853,17 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "sp-application-crypto 30.0.0", + "sp-keystore 0.34.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-api" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "polkadot-node-metrics", @@ -12631,8 +12876,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "futures-timer", @@ -12640,15 +12885,15 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fatality", "futures", @@ -12656,7 +12901,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-keystore", "schnellru", "thiserror 1.0.69", @@ -12665,39 +12910,39 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sp-blockchain", - "sp-inherents 36.0.0", + "sp-inherents 26.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-prospective-parachains" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fatality", "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitvec", "fatality", @@ -12706,15 +12951,15 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "always-assert", "array-bytes", @@ -12726,12 +12971,12 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "sc-tracing", "slotmap", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "strum 0.26.3", "tempfile", "thiserror 1.0.69", @@ -12741,21 +12986,21 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-common" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "cpu-time", "futures", @@ -12763,46 +13008,46 @@ dependencies = [ "libc", "nix 0.29.0", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-common 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-wasmtime 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "sc-executor 0.32.0", + "sc-executor-common 0.29.0", + "sc-executor-wasmtime 0.29.0", "seccompiler", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-tracing 16.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "schnellru", - "sp-consensus-babe 0.42.1", + "sp-consensus-babe 0.32.0", "tracing-gum", ] [[package]] name = "polkadot-node-metrics" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bs58", "futures", "futures-timer", "parity-scale-codec", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "prioritized-metered-channel", "sc-cli", "sc-service", @@ -12812,8 +13057,8 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -12824,12 +13069,12 @@ dependencies = [ "hex", "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "rand 0.8.5", "sc-authority-discovery", "sc-network", "sc-network-types", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", "strum 0.26.3", "thiserror 1.0.69", "tracing-gum", @@ -12837,32 +13082,32 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitvec", "bounded-vec", "futures", "futures-timer", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "sc-keystore", "schnorrkel 0.11.4", "serde", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-babe 0.42.1", - "sp-consensus-slots 0.42.1", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-keystore 0.34.0", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "thiserror 1.0.69", "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "polkadot-node-subsystem-types", "polkadot-overseer", @@ -12870,8 +13115,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "derive_more 0.99.20", @@ -12880,26 +13125,26 @@ dependencies = [ "orchestra", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "polkadot-statement-table", "sc-client-api", "sc-network", "sc-network-types", "sc-transaction-pool-api", "smallvec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", "sp-blockchain", - "sp-consensus-babe 0.42.1", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-babe 0.32.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "polkadot-node-subsystem-util" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fatality", "futures", @@ -12915,22 +13160,21 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "prioritized-metered-channel", "rand 0.8.5", - "sc-client-api", "schnellru", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-overseer" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -12940,13 +13184,29 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-client-api", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "tikv-jemalloc-ctl", "tracing-gum", ] +[[package]] +name = "polkadot-parachain-primitives" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bounded-collections", + "derive_more 0.99.20", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", +] + [[package]] name = "polkadot-parachain-primitives" version = "14.0.0" @@ -12961,23 +13221,36 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", ] [[package]] -name = "polkadot-parachain-primitives" -version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "polkadot-primitives" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "bitvec", "bounded-collections", - "derive_more 0.99.20", + "hex-literal", + "log", "parity-scale-codec", - "polkadot-core-primitives 17.1.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "thiserror 1.0.69", ] [[package]] @@ -12996,7 +13269,7 @@ dependencies = [ "serde", "sp-api 34.0.0", "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-authority-discovery 34.0.0", "sp-consensus-slots 0.40.1", "sp-core 34.0.0", @@ -13023,7 +13296,7 @@ dependencies = [ "serde", "sp-api 34.0.0", "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-authority-discovery 34.0.0", "sp-consensus-slots 0.40.1", "sp-core 34.0.0", @@ -13034,43 +13307,15 @@ dependencies = [ "sp-staking 36.0.0", ] -[[package]] -name = "polkadot-primitives" -version = "18.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "bitvec", - "hex-literal", - "log", - "parity-scale-codec", - "polkadot-core-primitives 17.1.0", - "polkadot-parachain-primitives 16.1.0", - "scale-info", - "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "thiserror 1.0.69", -] - [[package]] name = "polkadot-rpc" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -13082,19 +13327,69 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] +[[package]] +name = "polkadot-runtime-common" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bitvec", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 7.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-broker 0.6.0", + "pallet-election-provider-multi-phase 27.0.0", + "pallet-fast-unstake 27.0.0", + "pallet-identity 29.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", + "pallet-staking-reward-fn 19.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-treasury 27.0.0", + "pallet-vesting 28.0.0", + "parity-scale-codec", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", + "rustc-hex", + "scale-info", + "serde", + "slot-range-helper 7.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "static_assertions", +] + [[package]] name = "polkadot-runtime-common" version = "17.0.1" @@ -13119,7 +13414,7 @@ dependencies = [ "pallet-identity 38.0.0", "pallet-session 38.0.0", "pallet-staking 38.0.1", - "pallet-staking-reward-fn 22.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-staking-reward-fn 22.0.1", "pallet-timestamp 37.0.0", "pallet-transaction-payment 38.0.2", "pallet-treasury 37.0.0", @@ -13147,59 +13442,9 @@ dependencies = [ ] [[package]] -name = "polkadot-runtime-common" -version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "bitvec", - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", - "libsecp256k1", - "log", - "pallet-asset-rate 19.0.0", - "pallet-authorship 40.0.0", - "pallet-babe 40.0.0", - "pallet-balances 41.1.0", - "pallet-broker 0.19.1", - "pallet-election-provider-multi-phase 39.1.0", - "pallet-fast-unstake 39.0.0", - "pallet-identity 40.1.0", - "pallet-session 40.0.0", - "pallet-staking 40.1.0", - "pallet-staking-reward-fn 22.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-treasury 39.0.0", - "pallet-vesting 40.1.0", - "parity-scale-codec", - "polkadot-primitives 18.1.0", - "polkadot-runtime-parachains 19.1.0", - "rustc-hex", - "scale-info", - "serde", - "slot-range-helper 17.0.0", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-npos-elections 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "static_assertions", -] - -[[package]] -name = "polkadot-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.4.3#f6cd32d205d82a84c7120b26a3f4ec46f52aabdc" +name = "polkadot-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.4.3#f6cd32d205d82a84c7120b26a3f4ec46f52aabdc" dependencies = [ "frame-support 38.2.0", "pallet-remote-proxy", @@ -13211,10 +13456,22 @@ dependencies = [ "sp-core 34.0.0", "sp-runtime 39.0.5", "sp-trie 37.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm-builder 17.0.5", ] +[[package]] +name = "polkadot-runtime-metrics" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "bs58", + "frame-benchmarking 28.0.0", + "parity-scale-codec", + "polkadot-primitives 7.0.0", + "sp-tracing 16.0.0", +] + [[package]] name = "polkadot-runtime-metrics" version = "17.0.0" @@ -13225,19 +13482,55 @@ dependencies = [ "frame-benchmarking 38.0.0", "parity-scale-codec", "polkadot-primitives 16.0.0", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", ] [[package]] -name = "polkadot-runtime-metrics" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "polkadot-runtime-parachains" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bs58", - "frame-benchmarking 40.0.0", - "parity-scale-codec", - "polkadot-primitives 18.1.0", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "bitflags 1.3.2", + "bitvec", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-broker 0.6.0", + "pallet-message-queue 31.0.0", + "pallet-mmr 27.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", + "pallet-timestamp 27.0.0", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-metrics 7.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "scale-info", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", + "static_assertions", ] [[package]] @@ -13276,7 +13569,7 @@ dependencies = [ "serde", "sp-api 34.0.0", "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-inherents 34.0.0", "sp-io 38.0.2", @@ -13290,115 +13583,59 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "polkadot-runtime-parachains" -version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "bitflags 1.3.2", - "bitvec", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "impl-trait-for-tuples", - "log", - "pallet-authority-discovery 40.0.0", - "pallet-authorship 40.0.0", - "pallet-babe 40.0.0", - "pallet-balances 41.1.0", - "pallet-broker 0.19.1", - "pallet-message-queue 43.1.0", - "pallet-mmr 40.0.0", - "pallet-session 40.0.0", - "pallet-staking 40.1.0", - "pallet-timestamp 39.0.0", - "parity-scale-codec", - "polkadot-core-primitives 17.1.0", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-metrics 20.0.0", - "rand 0.8.5", - "rand_chacha 0.3.1", - "scale-info", - "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", - "static_assertions", -] - -[[package]] -name = "polkadot-sdk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" -dependencies = [ - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "polkadot-sdk-frame" -version = "0.9.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", ] [[package]] name = "polkadot-service" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", - "frame-benchmarking 40.0.0", + "frame-benchmarking 28.0.0", "frame-benchmarking-cli", - "frame-system 40.1.0", - "frame-system-rpc-runtime-api 36.0.0", + "frame-system 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", "futures", "is_executable", "kvdb", "kvdb-rocksdb", "log", "mmr-gadget", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", "parity-db", "parity-scale-codec", "parking_lot 0.12.3", @@ -13407,7 +13644,7 @@ dependencies = [ "polkadot-availability-distribution", "polkadot-availability-recovery", "polkadot-collator-protocol", - "polkadot-core-primitives 17.1.0", + "polkadot-core-primitives 7.0.0", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -13433,9 +13670,9 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "polkadot-rpc", - "polkadot-runtime-parachains 19.1.0", + "polkadot-runtime-parachains 7.0.0", "polkadot-statement-distribution", "rococo-runtime", "sc-authority-discovery", @@ -13447,7 +13684,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-grandpa", "sc-consensus-slots", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", "sc-keystore", "sc-network", "sc-network-sync", @@ -13460,65 +13697,62 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-mmr-primitives 36.1.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-timestamp 36.0.0", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-mmr-primitives 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-timestamp 26.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing-gum", "westend-runtime", - "xcm-runtime-apis 0.7.0", + "xcm-runtime-apis 0.1.1", ] [[package]] name = "polkadot-statement-distribution" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "arrayvec 0.7.6", "bitvec", "fatality", "futures", "futures-timer", - "indexmap 2.9.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 18.1.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "tracing-gum", ] @@ -13548,6 +13782,19 @@ dependencies = [ "polkavm-linux-raw 0.21.0", ] +[[package]] +name = "polkavm" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2a01db119bb3a86572c0641ba6e7c9786fbd2ac89c25b43b688c4e353787526" +dependencies = [ + "libc", + "log", + "polkavm-assembler 0.24.0", + "polkavm-common 0.24.0", + "polkavm-linux-raw 0.24.0", +] + [[package]] name = "polkavm-assembler" version = "0.18.0" @@ -13566,6 +13813,15 @@ dependencies = [ "log", ] +[[package]] +name = "polkavm-assembler" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eea6105f3f344abe0bf0151d67b3de6f5d24353f2393355ecf3f5f6e06d7fd0b" +dependencies = [ + "log", +] + [[package]] name = "polkavm-common" version = "0.9.0" @@ -13593,6 +13849,16 @@ dependencies = [ "polkavm-assembler 0.21.0", ] +[[package]] +name = "polkavm-common" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed9e5af472f729fcf3b3c1cf17508ddbb3505259dd6e2ee0fb5a29e105d22" +dependencies = [ + "log", + "polkavm-assembler 0.24.0", +] + [[package]] name = "polkavm-derive" version = "0.9.1" @@ -13620,6 +13886,15 @@ dependencies = [ "polkavm-derive-impl-macro 0.21.0", ] +[[package]] +name = "polkavm-derive" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "176144f8661117ea95fa7cf868c9a62d6b143e8a2ebcb7582464c3faade8669a" +dependencies = [ + "polkavm-derive-impl-macro 0.24.0", +] + [[package]] name = "polkavm-derive-impl" version = "0.9.0" @@ -13656,6 +13931,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5a21844afdfcc10c92b9ef288ccb926211af27478d1730fcd55e4aec710179d" +dependencies = [ + "polkavm-common 0.24.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "polkavm-derive-impl-macro" version = "0.9.0" @@ -13686,6 +13973,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba0ef0f17ad81413ea1ca5b1b67553aedf5650c88269b673d3ba015c83bc2651" +dependencies = [ + "polkavm-derive-impl 0.24.0", + "syn 2.0.101", +] + [[package]] name = "polkavm-linker" version = "0.9.2" @@ -13733,6 +14030,22 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "polkavm-linker" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c95a521a1331024ebe5823ffdfba9ea6df40b934b0804049d5171887579806" +dependencies = [ + "dirs", + "gimli 0.31.1", + "hashbrown 0.14.5", + "log", + "object 0.36.7", + "polkavm-common 0.24.0", + "regalloc2 0.9.3", + "rustc-demangle", +] + [[package]] name = "polkavm-linux-raw" version = "0.18.0" @@ -13745,6 +14058,12 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" +[[package]] +name = "polkavm-linux-raw" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec0b13e26ec7234dba213ca17118c70c562809bdce0eefe84f92613d5c8da26" + [[package]] name = "polling" version = "2.8.0" @@ -13807,7 +14126,7 @@ dependencies = [ "enumflags2", "ink", "pop-primitives", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 40.0.1", ] [[package]] @@ -13816,26 +14135,26 @@ version = "0.1.0" dependencies = [ "contract-build", "env_logger 0.11.8", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "ismp", "log", "pallet-api", - "pallet-assets 42.0.0", - "pallet-balances 41.1.0", + "pallet-assets 29.1.0", + "pallet-balances 28.0.0", "pallet-contracts", "pallet-ismp", "pallet-nfts 34.1.0", - "pallet-xcm 19.1.0", + "pallet-xcm 7.0.0", "parity-scale-codec", "pop-api", "pop-primitives", "pop-runtime-devnet", "pop-runtime-testnet", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -13844,19 +14163,19 @@ version = "0.1.0" dependencies = [ "contract-build", "env_logger 0.11.8", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 41.1.0", + "pallet-balances 28.0.0", "pallet-contracts", - "pallet-timestamp 39.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -13871,12 +14190,12 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", "cumulus-client-service", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-parachain-inherent 0.18.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-relay-chain-interface", "docify", - "frame-benchmarking 40.0.0", + "frame-benchmarking 28.0.0", "frame-benchmarking-cli", "futures", "ismp-parachain", @@ -13886,11 +14205,11 @@ dependencies = [ "log", "pallet-ismp-rpc", "pallet-ismp-runtime-api", - "pallet-multisig 40.1.0", + "pallet-multisig 28.0.0", "pallet-transaction-payment-rpc", "parity-scale-codec", "polkadot-cli", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "pop-runtime-common", "pop-runtime-devnet", "pop-runtime-mainnet", @@ -13900,7 +14219,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-consensus", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", "sc-network", "sc-network-sync", "sc-offchain", @@ -13913,21 +14232,21 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-timestamp 36.0.0", - "sp-transaction-pool 36.0.0", - "staging-xcm 16.1.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-keystore 0.34.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-timestamp 26.0.0", + "sp-transaction-pool 26.0.0", + "staging-xcm 7.0.1", "substrate-build-script-utils 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", @@ -13946,47 +14265,47 @@ dependencies = [ name = "pop-runtime-common" version = "0.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.20.0", - "cumulus-pallet-parachain-system 0.20.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcmp-queue 0.20.0", + "cumulus-pallet-xcmp-queue 0.7.1", "docify", - "frame-support 40.1.0", - "frame-system 40.1.0", - "pallet-assets 42.0.0", - "pallet-aura 39.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-assets 29.1.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", "pallet-collective", - "pallet-message-queue 43.1.0", + "pallet-message-queue 31.0.0", "pallet-migrations", "pallet-motion", - "pallet-multisig 40.1.0", - "pallet-nfts 34.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-multisig 28.0.0", + "pallet-nfts 22.0.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-revive", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-treasury 39.0.0", - "pallet-utility 40.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-benchmarks 20.0.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "scale-info", "serde_json", - "sp-keyring 41.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-keyring 31.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -13994,26 +14313,26 @@ name = "pop-runtime-devnet" version = "0.1.0" dependencies = [ "anyhow", - "cumulus-pallet-aura-ext 0.20.0", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-session-benchmarking 21.0.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-session-benchmarking 9.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.19.1", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-utility 0.20.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex", "hex-literal", "ismp", @@ -14021,138 +14340,138 @@ dependencies = [ "ismp-parachain-runtime-api", "log", "pallet-api", - "pallet-assets 42.0.0", - "pallet-aura 39.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", + "pallet-assets 29.1.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", "pallet-contracts", "pallet-ismp", "pallet-ismp-runtime-api", - "pallet-message-queue 43.1.0", - "pallet-multisig 40.1.0", + "pallet-message-queue 31.0.0", + "pallet-multisig 28.0.0", "pallet-nft-fractionalization", "pallet-nfts 34.1.0", - "pallet-nfts-runtime-api 26.0.0", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-nfts-runtime-api 14.0.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-revive", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-utility 40.0.0", - "pallet-xcm 19.1.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-runtime-common 19.1.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "pop-chain-extension", "pop-primitives", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xcm-runtime-apis 0.7.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-mmr-primitives 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 26.0.1", + "xcm-runtime-apis 0.1.1", ] [[package]] name = "pop-runtime-mainnet" version = "0.1.0" dependencies = [ - "cumulus-pallet-aura-ext 0.20.0", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-session-benchmarking 21.0.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-session-benchmarking 9.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.19.1", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-utility 0.20.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", "frame-metadata 20.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex", "log", - "pallet-assets 42.0.0", - "pallet-aura 39.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", + "pallet-assets 29.1.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", "pallet-collective", - "pallet-message-queue 43.1.0", + "pallet-message-queue 31.0.0", "pallet-motion", - "pallet-multisig 40.1.0", - "pallet-nfts 34.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "pallet-nfts-runtime-api 26.0.0", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-multisig 28.0.0", + "pallet-nfts 22.0.0", + "pallet-nfts-runtime-api 14.0.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-revive", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-treasury 39.0.0", - "pallet-utility 40.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-benchmarks 20.0.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-runtime-common 19.1.0", - "polkadot-runtime-parachains 19.1.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xcm-runtime-apis 0.7.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 26.0.1", + "xcm-runtime-apis 0.1.1", ] [[package]] @@ -14160,27 +14479,27 @@ name = "pop-runtime-testnet" version = "0.5.4" dependencies = [ "anyhow", - "cumulus-pallet-aura-ext 0.20.0", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-pallet-session-benchmarking 21.0.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-session-benchmarking 9.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.19.1", - "cumulus-pallet-xcmp-queue 0.20.0", - "cumulus-primitives-aura 0.17.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-utility 0.20.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-primitives-aura 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", "frame-metadata 20.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex", "hex-literal", "ismp", @@ -14188,62 +14507,62 @@ dependencies = [ "ismp-parachain-runtime-api", "log", "pallet-api", - "pallet-assets 42.0.0", - "pallet-aura 39.0.0", - "pallet-authorship 40.0.0", - "pallet-balances 41.1.0", - "pallet-collator-selection 21.0.0", + "pallet-assets 29.1.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", "pallet-collective", "pallet-contracts", "pallet-ismp", "pallet-ismp-runtime-api", - "pallet-message-queue 43.1.0", + "pallet-message-queue 31.0.0", "pallet-migrations", "pallet-motion", - "pallet-multisig 40.1.0", + "pallet-multisig 28.0.0", "pallet-nft-fractionalization", - "pallet-nfts 34.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "pallet-nfts-runtime-api 26.0.0", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-nfts 22.0.0", + "pallet-nfts-runtime-api 14.0.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-revive", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-treasury 39.0.0", - "pallet-utility 40.0.0", - "pallet-xcm 19.1.0", - "parachains-common 21.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-runtime-common 19.1.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "pop-chain-extension", "pop-primitives", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", - "sp-consensus-aura 0.42.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-parachain-info 0.20.0", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xcm-runtime-apis 0.7.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-mmr-primitives 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 26.0.1", + "xcm-runtime-apis 0.1.1", ] [[package]] @@ -14722,7 +15041,6 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", - "serde", ] [[package]] @@ -14733,6 +15051,7 @@ checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", + "serde", ] [[package]] @@ -14771,6 +15090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom 0.3.3", + "serde", ] [[package]] @@ -14983,7 +15303,7 @@ name = "relay-common" version = "1.0.0" source = "git+https://github.com/paseo-network/runtimes?tag=v1.4.3#3de47024fc96ff77392684761f21245db80680c0" dependencies = [ - "pallet-staking-reward-fn 22.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-staking-reward-fn 22.0.1", "parity-scale-codec", "polkadot-primitives 16.0.0", "scale-info", @@ -15083,116 +15403,116 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "binary-merkle-tree 13.0.0", "bitvec", - "frame-benchmarking 40.0.0", - "frame-executive 40.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", - "pallet-asset-rate 19.0.0", - "pallet-authority-discovery 40.0.0", - "pallet-authorship 40.0.0", - "pallet-babe 40.0.0", - "pallet-balances 41.1.0", - "pallet-beefy 41.1.0", - "pallet-beefy-mmr 41.0.0", - "pallet-bounties 39.0.0", - "pallet-child-bounties 39.0.0", - "pallet-conviction-voting 40.1.0", + "pallet-asset-rate 7.0.0", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-beefy 28.0.0", + "pallet-beefy-mmr 28.0.0", + "pallet-bounties 27.0.0", + "pallet-child-bounties 27.0.0", + "pallet-conviction-voting 28.0.0", "pallet-democracy", "pallet-elections-phragmen", - "pallet-grandpa 40.0.0", - "pallet-identity 40.1.0", - "pallet-indices 40.0.0", - "pallet-message-queue 43.1.0", + "pallet-grandpa 28.0.0", + "pallet-identity 29.0.0", + "pallet-indices 28.0.0", + "pallet-message-queue 31.0.0", "pallet-migrations", - "pallet-mmr 40.0.0", - "pallet-multisig 40.1.0", + "pallet-mmr 27.0.0", + "pallet-multisig 28.0.0", "pallet-nis", - "pallet-offences 39.0.0", - "pallet-parameters 0.11.0", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-offences 27.0.0", + "pallet-parameters 0.1.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-ranked-collective", "pallet-recovery", - "pallet-referenda 40.1.0", + "pallet-referenda 28.0.0", "pallet-root-testing", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", "pallet-society", - "pallet-staking 40.1.0", - "pallet-state-trie-migration 44.1.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", + "pallet-staking 28.0.0", + "pallet-state-trie-migration 29.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", "pallet-tips", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-treasury 39.0.0", - "pallet-utility 40.0.0", - "pallet-vesting 40.1.0", - "pallet-whitelist 39.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-benchmarks 20.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-common 19.1.0", - "polkadot-runtime-parachains 19.1.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-vesting 28.0.0", + "pallet-whitelist 27.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "rococo-runtime-constants", "scale-info", "serde", "serde_derive", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", - "sp-block-builder 36.0.0", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-mmr-primitives 36.1.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "xcm-runtime-apis 0.7.0", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-mmr-primitives 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", + "xcm-runtime-apis 0.1.1", ] [[package]] name = "rococo-runtime-constants" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-common 19.1.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -15548,31 +15868,31 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c10a9966875fcbde028c73697c6d5faad5f5d24e94b3c949fb1d063c727381d" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-wasm-interface 20.0.0", "thiserror 1.0.69", ] [[package]] name = "sc-allocator" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c10a9966875fcbde028c73697c6d5faad5f5d24e94b3c949fb1d063c727381d" dependencies = [ "log", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-wasm-interface 21.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-authority-discovery" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -15587,20 +15907,20 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-types", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "sc-basic-authorship" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "log", @@ -15609,34 +15929,34 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", ] [[package]] name = "sc-chain-spec" -version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "docify", @@ -15644,25 +15964,25 @@ dependencies = [ "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", "sc-network", "sc-telemetry", "serde", "serde_json", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-genesis-builder 0.8.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-tracing 16.0.0", ] [[package]] name = "sc-chain-spec-derive" -version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -15672,8 +15992,8 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "chrono", @@ -15702,46 +16022,46 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keyring 31.0.0", + "sp-keystore 0.34.0", + "sp-panic-handler 13.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", "thiserror 1.0.69", "tokio", ] [[package]] name = "sc-client-api" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", "sc-transaction-pool-api", "sc-utils", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-database", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-externalities 0.25.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-trie 29.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hash-db", "kvdb", @@ -15755,19 +16075,21 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-database", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "substrate-prometheus-endpoint", + "sysinfo", ] [[package]] name = "sc-consensus" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -15780,17 +16102,17 @@ dependencies = [ "serde", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-aura" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -15801,25 +16123,25 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-aura 0.42.0", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-aura 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-babe" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "fork-tree", @@ -15836,26 +16158,26 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.42.1", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-babe 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-inherents 26.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-babe-rpc" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "jsonrpsee", @@ -15863,21 +16185,21 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-beefy" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -15893,15 +16215,15 @@ dependencies = [ "sc-network-sync", "sc-network-types", "sc-utils", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-beefy 24.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-beefy 13.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -15910,8 +16232,8 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "jsonrpsee", @@ -15921,30 +16243,30 @@ dependencies = [ "sc-consensus-beefy", "sc-rpc", "serde", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-beefy 24.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-consensus-beefy 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-epochs" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "fork-tree", "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] name = "sc-consensus-grandpa" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "ahash 0.8.12", "array-bytes", @@ -15971,24 +16293,24 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "finality-grandpa", "futures", @@ -16000,15 +16322,15 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-slots" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -16018,73 +16340,72 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", ] [[package]] name = "sc-executor" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55c745bf88acb34bd606346c7de6cc06f334f627c1ff40380252a6e52ad9354" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor-common 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-polkavm 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-wasmtime 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-common 0.29.0", + "sc-executor-polkavm 0.29.0", + "sc-executor-wasmtime 0.29.0", "schnellru", - "sp-api 36.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version 39.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-panic-handler 13.0.0", + "sp-runtime-interface 24.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "sp-wasm-interface 20.0.0", "tracing", ] [[package]] name = "sc-executor" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55c745bf88acb34bd606346c7de6cc06f334f627c1ff40380252a6e52ad9354" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor-common 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-polkavm 0.35.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-wasmtime 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor-common 0.38.0", + "sc-executor-polkavm 0.35.0", + "sc-executor-wasmtime 0.38.0", "schnellru", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 36.0.1", + "sp-core 36.1.0", + "sp-externalities 0.30.0", + "sp-io 40.0.1", + "sp-panic-handler 13.0.2", + "sp-runtime-interface 29.0.1", + "sp-trie 39.1.0", + "sp-version 39.0.0", + "sp-wasm-interface 21.0.1", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f84b9aa7664a9b401afbf423bcd3c1845f5adedf4f6030586808238a222df" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "polkavm 0.18.0", - "sc-allocator 31.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm 0.24.0", + "sc-allocator 23.0.0", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-wasm-interface 20.0.0", "thiserror 1.0.69", "wasm-instrument", ] @@ -16092,76 +16413,77 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2f84b9aa7664a9b401afbf423bcd3c1845f5adedf4f6030586808238a222df" dependencies = [ "polkavm 0.18.0", - "sc-allocator 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-allocator 31.0.0", + "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 21.0.1", "thiserror 1.0.69", "wasm-instrument", ] [[package]] name = "sc-executor-polkavm" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb4929b3457077f9b30ad397a724116f43f252a889ec334ec369f6cdad8f76c" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", - "polkavm 0.18.0", - "sc-executor-common 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm 0.24.0", + "sc-executor-common 0.29.0", + "sp-wasm-interface 20.0.0", ] [[package]] name = "sc-executor-polkavm" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb4929b3457077f9b30ad397a724116f43f252a889ec334ec369f6cdad8f76c" dependencies = [ "log", "polkavm 0.18.0", - "sc-executor-common 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor-common 0.38.0", + "sp-wasm-interface 21.0.1", ] [[package]] name = "sc-executor-wasmtime" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5ad79b030a1f91ef0f667e58ac35e1c9fa33a6b8a0ec1ae7fe4890322535ac" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "anyhow", "log", "parking_lot 0.12.3", "rustix 0.36.17", - "sc-allocator 31.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-common 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-allocator 23.0.0", + "sc-executor-common 0.29.0", + "sp-runtime-interface 24.0.0", + "sp-wasm-interface 20.0.0", "wasmtime", ] [[package]] name = "sc-executor-wasmtime" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5ad79b030a1f91ef0f667e58ac35e1c9fa33a6b8a0ec1ae7fe4890322535ac" dependencies = [ "anyhow", "log", "parking_lot 0.12.3", "rustix 0.36.17", - "sc-allocator 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-common 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-allocator 31.0.0", + "sc-executor-common 0.38.0", + "sp-runtime-interface 29.0.1", + "sp-wasm-interface 21.0.1", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "console", "futures", @@ -16171,27 +16493,27 @@ dependencies = [ "sc-network", "sc-network-sync", "sp-blockchain", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] name = "sc-keystore" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "parking_lot 0.12.3", "serde_json", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", "thiserror 1.0.69", ] [[package]] name = "sc-mixnet" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "arrayvec 0.7.6", @@ -16207,19 +16529,19 @@ dependencies = [ "sc-network", "sc-network-types", "sc-transaction-pool-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-keystore 0.34.0", "sp-mixnet", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-network" -version = "0.49.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16252,10 +16574,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -16268,18 +16590,18 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", ] [[package]] name = "sc-network-gossip" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "ahash 0.8.12", "futures", @@ -16290,15 +16612,15 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "sc-network-light" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16311,15 +16633,15 @@ dependencies = [ "sc-network", "sc-network-types", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-network-sync" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16339,12 +16661,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -16353,8 +16675,8 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "futures", @@ -16366,14 +16688,14 @@ dependencies = [ "sc-network-types", "sc-utils", "sp-consensus", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", "substrate-prometheus-endpoint", ] [[package]] name = "sc-network-types" -version = "0.15.3" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bs58", "bytes", @@ -16391,8 +16713,8 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bytes", "fnv", @@ -16413,20 +16735,20 @@ dependencies = [ "sc-network-types", "sc-transaction-pool-api", "sc-utils", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", "threadpool", "tracing", ] [[package]] name = "sc-proposer-metrics" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -16434,8 +16756,8 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "jsonrpsee", @@ -16451,23 +16773,23 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-offchain 36.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-offchain 26.0.0", "sp-rpc", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", "sp-statement-store", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-version 29.0.0", "tokio", ] [[package]] name = "sc-rpc-api" -version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16477,17 +16799,17 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-rpc", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-version 29.0.0", "thiserror 1.0.69", ] [[package]] name = "sc-rpc-server" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -16510,8 +16832,8 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.49.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", "futures", @@ -16529,12 +16851,13 @@ dependencies = [ "sc-transaction-pool-api", "schnellru", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-rpc", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -16542,23 +16865,23 @@ dependencies = [ [[package]] name = "sc-runtime-utilities" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sc-executor-common 0.38.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", + "sc-executor-common 0.29.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-state-machine 0.35.0", + "sp-wasm-interface 20.0.0", "thiserror 1.0.69", ] [[package]] name = "sc-service" -version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "directories", @@ -16575,7 +16898,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sc-executor 0.32.0", "sc-informant", "sc-keystore", "sc-network", @@ -16596,20 +16919,20 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", "sp-transaction-storage-proof", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-trie 29.0.0", + "sp-version 29.0.0", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -16621,32 +16944,32 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", ] [[package]] name = "sc-storage-monitor" -version = "0.24.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.16.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "clap", "fs4", "log", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "thiserror 1.0.69", "tokio", ] [[package]] name = "sc-sync-state-rpc" -version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16658,14 +16981,14 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-sysinfo" -version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "derive_more 0.99.20", "futures", @@ -16677,15 +17000,15 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-io 30.0.0", ] [[package]] name = "sc-telemetry" -version = "28.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "chrono", "futures", @@ -16703,8 +17026,8 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "chrono", "console", @@ -16717,12 +17040,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-rpc", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", "thiserror 1.0.69", "tracing", "tracing-log", @@ -16731,8 +17054,8 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "11.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -16742,8 +17065,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -16751,20 +17074,19 @@ dependencies = [ "indexmap 2.9.0", "itertools 0.11.0", "linked-hash-map", - "log", "parity-scale-codec", "parking_lot 0.12.3", "sc-client-api", "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", + "sp-transaction-pool 26.0.0", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -16774,8 +17096,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", @@ -16784,15 +17106,15 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "thiserror 1.0.69", ] [[package]] name = "sc-utils" -version = "18.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-channel 1.9.0", "futures", @@ -16800,7 +17122,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "prometheus", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", ] [[package]] @@ -16818,6 +17140,16 @@ name = "scale-bits" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver 0.2.0", +] + +[[package]] +name = "scale-bits" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" dependencies = [ "parity-scale-codec", "scale-info", @@ -16854,17 +17186,17 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" +checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" dependencies = [ - "derive_more 1.0.0", "parity-scale-codec", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode-derive 0.14.0", + "scale-bits 0.7.0", + "scale-decode-derive 0.16.0", "scale-type-resolver 0.2.0", "smallvec", + "thiserror 2.0.12", ] [[package]] @@ -16881,9 +17213,9 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" +checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" dependencies = [ "darling 0.20.11", "proc-macro2", @@ -16906,17 +17238,17 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" +checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" dependencies = [ - "derive_more 1.0.0", "parity-scale-codec", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-encode-derive 0.8.0", + "scale-bits 0.7.0", + "scale-encode-derive 0.10.0", "scale-type-resolver 0.2.0", "smallvec", + "thiserror 2.0.12", ] [[package]] @@ -16934,9 +17266,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" +checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" dependencies = [ "darling 0.20.11", "proc-macro-crate 3.3.0", @@ -16993,34 +17325,33 @@ dependencies = [ [[package]] name = "scale-typegen" -version = "0.9.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc4c70c7fea2eef1740f0081d3fe385d8bee1eef11e9272d3bec7dc8e5438e0" +checksum = "05c61b6b706a3eaad63b506ab50a1d2319f817ae01cf753adcc3f055f9f0fcd6" dependencies = [ "proc-macro2", "quote", "scale-info", "syn 2.0.101", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "scale-value" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +checksum = "8ca8b26b451ecb7fd7b62b259fa28add63d12ec49bbcac0e01fcb4b5ae0c09aa" dependencies = [ "base58", "blake2 0.10.6", - "derive_more 1.0.0", "either", "parity-scale-codec", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", - "scale-info", + "scale-bits 0.7.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", "scale-type-resolver 0.2.0", "serde", + "thiserror 2.0.12", "yap", ] @@ -17103,6 +17434,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" @@ -17311,7 +17648,7 @@ dependencies = [ [[package]] name = "serde-hex-utils" version = "0.1.0" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ "anyhow", "hex", @@ -17610,25 +17947,25 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e34f1146a457a5c554dedeae6c7273aa54c3b031f3e9eb0abd037b5511e2ce9" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 39.0.5", + "sp-runtime 31.0.1", ] [[package]] name = "slot-range-helper" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e34f1146a457a5c554dedeae6c7273aa54c3b031f3e9eb0abd037b5511e2ce9" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 39.0.5", ] [[package]] @@ -17893,6 +18230,28 @@ dependencies = [ "scale-info", ] +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "byte-slice-cast", + "frame-support 28.0.0", + "hex", + "parity-scale-codec", + "rlp 0.6.1", + "scale-info", + "serde", + "snowbridge-ethereum 0.3.0", + "snowbridge-milagro-bls", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "ssz_rs", + "ssz_rs_derive", +] + [[package]] name = "snowbridge-beacon-primitives" version = "0.10.1" @@ -17917,25 +18276,27 @@ dependencies = [ ] [[package]] -name = "snowbridge-beacon-primitives" -version = "0.13.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "snowbridge-core" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "byte-slice-cast", - "frame-support 40.1.0", - "hex", + "bp-relayers", + "frame-support 28.0.0", + "frame-system 28.0.0", + "hex-literal", + "log", "parity-scale-codec", - "rlp 0.6.1", + "polkadot-parachain-primitives 6.0.0", "scale-info", "serde", - "snowbridge-ethereum 0.12.0", - "snowbridge-milagro-bls", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "ssz_rs", - "ssz_rs_derive", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -17953,7 +18314,7 @@ dependencies = [ "scale-info", "serde", "snowbridge-beacon-primitives 0.10.1", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", @@ -17963,28 +18324,23 @@ dependencies = [ ] [[package]] -name = "snowbridge-core" -version = "0.13.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "snowbridge-ethereum" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bp-relayers", "ethabi-decode 2.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "ethbloom 0.14.1", + "ethereum-types 0.15.1", "hex-literal", - "log", + "parity-bytes", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", + "rlp 0.6.1", "scale-info", "serde", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "serde-big-array", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] @@ -18008,50 +18364,6 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "snowbridge-ethereum" -version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "ethabi-decode 2.0.0", - "ethbloom 0.14.1", - "ethereum-types 0.15.1", - "hex-literal", - "parity-bytes", - "parity-scale-codec", - "rlp 0.6.1", - "scale-info", - "serde", - "serde-big-array", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - -[[package]] -name = "snowbridge-inbound-queue-primitives" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "alloy-core", - "frame-support 40.1.0", - "frame-system 40.1.0", - "hex-literal", - "log", - "parity-scale-codec", - "scale-info", - "snowbridge-beacon-primitives 0.13.1", - "snowbridge-core 0.13.1", - "snowbridge-verification-primitives", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", -] - [[package]] name = "snowbridge-milagro-bls" version = "1.5.4" @@ -18069,49 +18381,49 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-primitives" -version = "0.2.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "alloy-core", "ethabi-decode 2.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "hex-literal", "log", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", + "polkadot-parachain-primitives 6.0.0", "scale-info", - "snowbridge-core 0.13.1", + "snowbridge-core 0.2.0", "snowbridge-verification-primitives", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] name = "snowbridge-pallet-system-frontend" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-xcm 19.1.0", + "pallet-asset-conversion 10.0.0", "parity-scale-codec", "scale-info", - "snowbridge-core 0.13.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "snowbridge-core 0.2.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", "tracing", ] @@ -18137,34 +18449,34 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" -version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-xcm 19.1.0", + "pallet-xcm 7.0.0", "parity-scale-codec", - "snowbridge-core 0.13.1", + "snowbridge-core 0.2.0", "snowbridge-outbound-queue-primitives", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", + "sp-arithmetic 23.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] name = "snowbridge-verification-primitives" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "snowbridge-beacon-primitives 0.13.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "snowbridge-beacon-primitives 0.2.0", + "sp-core 28.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] @@ -18218,6 +18530,28 @@ dependencies = [ "sha1", ] +[[package]] +name = "sp-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 15.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "thiserror 1.0.69", +] + [[package]] name = "sp-api" version = "34.0.0" @@ -18252,45 +18586,22 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-metadata-ir 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 41.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-state-machine 0.45.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version 39.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.69", -] - -[[package]] -name = "sp-api" -version = "36.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "docify", - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-metadata-ir 0.10.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api-proc-macro 22.0.0", + "sp-core 36.1.0", + "sp-externalities 0.30.0", + "sp-metadata-ir 0.10.0", + "sp-runtime 41.1.0", + "sp-runtime-interface 29.0.1", + "sp-state-machine 0.45.0", + "sp-trie 39.1.0", + "sp-version 39.0.0", "thiserror 1.0.69", ] [[package]] name = "sp-api-proc-macro" -version = "20.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18303,9 +18614,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "22.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36334085c348bb507debd40e604f71194b1fc669eb6fec81aebef08eb3466f6c" +checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18319,7 +18630,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36334085c348bb507debd40e604f71194b1fc669eb6fec81aebef08eb3466f6c" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18330,6 +18642,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-application-crypto" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", +] + [[package]] name = "sp-application-crypto" version = "38.0.0" @@ -18352,20 +18676,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 36.1.0", + "sp-io 40.0.1", ] [[package]] -name = "sp-application-crypto" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-arithmetic" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "docify", + "integer-sqrt", + "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "static_assertions", ] [[package]] @@ -18384,17 +18710,15 @@ dependencies = [ ] [[package]] -name = "sp-arithmetic" -version = "26.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-authority-discovery" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "docify", - "integer-sqrt", - "num-traits", "parity-scale-codec", "scale-info", - "serde", - "static_assertions", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -18411,15 +18735,13 @@ dependencies = [ ] [[package]] -name = "sp-authority-discovery" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-block-builder" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -18433,49 +18755,55 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "sp-block-builder" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "sp-blockchain" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "futures", "parity-scale-codec", "parking_lot 0.12.3", "schnellru", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", "sp-consensus", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-database", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "thiserror 1.0.69", "tracing", ] [[package]] name = "sp-consensus" -version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "futures", "log", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "thiserror 1.0.69", ] +[[package]] +name = "sp-consensus-aura" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-timestamp 26.0.0", +] + [[package]] name = "sp-consensus-aura" version = "0.40.0" @@ -18494,19 +18822,21 @@ dependencies = [ ] [[package]] -name = "sp-consensus-aura" -version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-consensus-babe" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-slots 0.42.1", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-timestamp 26.0.0", ] [[package]] @@ -18529,21 +18859,23 @@ dependencies = [ ] [[package]] -name = "sp-consensus-babe" -version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-consensus-beefy" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-consensus-slots 0.42.1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-timestamp 36.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-mmr-primitives 26.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "strum 0.26.3", ] [[package]] @@ -18564,28 +18896,25 @@ dependencies = [ "sp-keystore 0.40.0", "sp-mmr-primitives 34.1.0", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "strum 0.26.3", ] [[package]] -name = "sp-consensus-beefy" -version = "24.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-consensus-grandpa" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "finality-grandpa", + "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-mmr-primitives 36.1.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "strum 0.26.3", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", ] [[package]] @@ -18607,20 +18936,14 @@ dependencies = [ ] [[package]] -name = "sp-consensus-grandpa" -version = "23.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-consensus-slots" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "finality-grandpa", - "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-timestamp 26.0.0", ] [[package]] @@ -18635,34 +18958,23 @@ dependencies = [ "sp-timestamp 34.0.0", ] -[[package]] -name = "sp-consensus-slots" -version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-timestamp 36.0.0", -] - [[package]] name = "sp-core" -version = "34.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "ark-vrf", "array-bytes", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", "bs58", - "dyn-clonable", + "dyn-clone", "ed25519-zebra", "futures", "hash-db", "hash256-std-hasher", - "impl-serde 0.4.0", + "impl-serde 0.5.0", "itertools 0.11.0", "k256", "libsecp256k1", @@ -18672,21 +18984,22 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.12.2", + "primitive-types 0.13.1", "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.29.0", - "sp-runtime-interface 28.0.0", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 21.0.0", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-storage 19.0.0", "ss58-registry", - "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.4.7", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -18695,11 +19008,10 @@ dependencies = [ [[package]] name = "sp-core" -version = "36.1.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7" dependencies = [ - "ark-vrf", "array-bytes", "bitflags 1.3.2", "blake2 0.10.6", @@ -18710,7 +19022,7 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", - "impl-serde 0.5.0", + "impl-serde 0.4.0", "itertools 0.11.0", "k256", "libsecp256k1", @@ -18720,7 +19032,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.13.1", + "primitive-types 0.12.2", "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", @@ -18729,12 +19041,12 @@ dependencies = [ "serde", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.29.0", + "sp-runtime-interface 28.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 21.0.0", "ss58-registry", - "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.6.0", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -18744,7 +19056,8 @@ dependencies = [ [[package]] name = "sp-core" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" dependencies = [ "ark-vrf", "array-bytes", @@ -18774,14 +19087,14 @@ dependencies = [ "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-runtime-interface 29.0.1", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", "ss58-registry", - "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "substrate-bip39 0.6.0", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -18805,7 +19118,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "blake2b_simd", "byteorder", @@ -18829,17 +19142,17 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "syn 2.0.101", ] [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -18859,7 +19172,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", @@ -18868,34 +19181,46 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a904407d61cb94228c71b55a9d3708e9d6558991f9e83bd42bd91df37a159d30" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 21.0.0", + "sp-storage 19.0.0", ] [[package]] name = "sp-externalities" -version = "0.30.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +checksum = "a904407d61cb94228c71b55a9d3708e9d6558991f9e83bd42bd91df37a159d30" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 21.0.0", ] [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-storage 22.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -18912,15 +19237,16 @@ dependencies = [ ] [[package]] -name = "sp-genesis-builder" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-inherents" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "async-trait", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime 31.0.1", + "thiserror 1.0.69", ] [[package]] @@ -18938,16 +19264,29 @@ dependencies = [ ] [[package]] -name = "sp-inherents" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-io" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "async-trait", - "impl-trait-for-tuples", + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", "parity-scale-codec", - "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "thiserror 1.0.69", + "polkavm-derive 0.24.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "tracing", + "tracing-core", ] [[package]] @@ -18971,7 +19310,7 @@ dependencies = [ "sp-keystore 0.40.0", "sp-runtime-interface 28.0.0", "sp-state-machine 0.43.0", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", "sp-trie 37.0.0", "tracing", "tracing-core", @@ -18992,42 +19331,26 @@ dependencies = [ "polkavm-derive 0.18.0", "rustversion", "secp256k1 0.28.2", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 36.1.0", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-keystore 0.42.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-state-machine 0.45.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-keystore 0.42.0", + "sp-runtime-interface 29.0.1", + "sp-state-machine 0.45.0", + "sp-tracing 17.1.0", + "sp-trie 39.1.0", "tracing", "tracing-core", ] [[package]] -name = "sp-io" -version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-keyring" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "bytes", - "docify", - "ed25519-dalek", - "libsecp256k1", - "log", - "parity-scale-codec", - "polkavm-derive 0.18.0", - "rustversion", - "secp256k1 0.28.2", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "tracing", - "tracing-core", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "strum 0.26.3", ] [[package]] @@ -19042,13 +19365,14 @@ dependencies = [ ] [[package]] -name = "sp-keyring" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-keystore" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "strum 0.26.3", + "parity-scale-codec", + "parking_lot 0.12.3", + "sp-core 28.0.0", + "sp-externalities 0.25.0", ] [[package]] @@ -19071,19 +19395,8 @@ checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sp-keystore" -version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.3", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", ] [[package]] @@ -19099,12 +19412,22 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", ] +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-metadata 23.0.0", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "sp-metadata-ir" version = "0.7.0" @@ -19128,24 +19451,31 @@ dependencies = [ ] [[package]] -name = "sp-metadata-ir" -version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-mixnet" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-metadata 20.0.0", "parity-scale-codec", "scale-info", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", ] [[package]] -name = "sp-mixnet" -version = "0.14.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-mmr-primitives" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "log", "parity-scale-codec", + "polkadot-ckb-merkle-mountain-range 0.8.1", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-runtime 31.0.1", + "thiserror 1.0.69", ] [[package]] @@ -19167,20 +19497,16 @@ dependencies = [ ] [[package]] -name = "sp-mmr-primitives" -version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-npos-elections" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "log", "parity-scale-codec", - "polkadot-ckb-merkle-mountain-range 0.8.1", "scale-info", "serde", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "thiserror 1.0.69", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -19192,22 +19518,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-runtime 39.0.5", ] [[package]] -name = "sp-npos-elections" -version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-offchain" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -19221,21 +19544,10 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "sp-offchain" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "sp-panic-handler" -version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "backtrace", "regex", @@ -19244,7 +19556,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" dependencies = [ "backtrace", "regex", @@ -19252,20 +19565,20 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "rustc-hash 1.1.0", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", ] [[package]] name = "sp-runtime" -version = "39.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e00503b83cf48fffe48746b91b9b832d6785d4e2eeb0941558371eac6baac6" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "binary-merkle-tree 13.0.0", "docify", "either", "hash256-std-hasher", @@ -19278,22 +19591,23 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 34.0.0", - "sp-io 38.0.2", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-trie 29.0.0", + "sp-weights 27.0.0", "tracing", + "tuplex", ] [[package]] name = "sp-runtime" -version = "41.1.0" +version = "39.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +checksum = "b1e00503b83cf48fffe48746b91b9b832d6785d4e2eeb0941558371eac6baac6" dependencies = [ - "binary-merkle-tree 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "docify", "either", "hash256-std-hasher", @@ -19306,23 +19620,22 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 40.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 38.0.0", + "sp-arithmetic 26.1.0", + "sp-core 34.0.0", + "sp-io 38.0.2", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "tracing", - "tuplex", ] [[package]] name = "sp-runtime" version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "binary-merkle-tree 16.0.0", "docify", "either", "hash256-std-hasher", @@ -19335,81 +19648,80 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-application-crypto 40.1.0", + "sp-arithmetic 26.1.0", + "sp-core 36.1.0", + "sp-io 40.0.1", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 39.1.0", + "sp-weights 31.1.0", "tracing", "tuplex", ] [[package]] name = "sp-runtime-interface" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985eb981f40c689c6a0012c937b68ed58dabb4341d06f2dfe4dfd5ed72fa4017" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.9.1", - "primitive-types 0.12.2", - "sp-externalities 0.29.0", - "sp-runtime-interface-proc-macro 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 21.0.0", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-derive 0.24.0", + "primitive-types 0.13.1", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface" -version = "29.0.1" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +checksum = "985eb981f40c689c6a0012c937b68ed58dabb4341d06f2dfe4dfd5ed72fa4017" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.18.0", - "primitive-types 0.13.1", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface-proc-macro 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-derive 0.9.1", + "primitive-types 0.12.2", + "sp-externalities 0.29.0", + "sp-runtime-interface-proc-macro 18.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 21.0.0", + "sp-tracing 17.1.0", + "sp-wasm-interface 21.0.1", "static_assertions", ] [[package]] name = "sp-runtime-interface" version = "29.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive 0.18.0", "primitive-types 0.13.1", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface-proc-macro 18.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-externalities 0.30.0", + "sp-runtime-interface-proc-macro 18.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", + "sp-wasm-interface 21.0.1", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "expander", @@ -19422,7 +19734,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", @@ -19432,6 +19745,20 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-session" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", +] + [[package]] name = "sp-session" version = "36.0.0" @@ -19448,17 +19775,16 @@ dependencies = [ ] [[package]] -name = "sp-session" -version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-staking" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-staking 38.0.0", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -19489,24 +19815,10 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "sp-staking" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "sp-state-machine" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930104d6ae882626e8880d9b1578da9300655d337a3ffb45e130c608b6c89660" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hash-db", "log", @@ -19514,20 +19826,20 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "smallvec", - "sp-core 34.0.0", - "sp-externalities 0.29.0", - "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 37.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-panic-handler 13.0.0", + "sp-trie 29.0.0", "thiserror 1.0.69", "tracing", - "trie-db 0.29.1", + "trie-db 0.30.0", ] [[package]] name = "sp-state-machine" -version = "0.45.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +checksum = "930104d6ae882626e8880d9b1578da9300655d337a3ffb45e130c608b6c89660" dependencies = [ "hash-db", "log", @@ -19535,19 +19847,20 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "smallvec", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 34.0.0", + "sp-externalities 0.29.0", + "sp-panic-handler 13.0.2", + "sp-trie 37.0.0", "thiserror 1.0.69", "tracing", - "trie-db 0.30.0", + "trie-db 0.29.1", ] [[package]] name = "sp-state-machine" version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" dependencies = [ "hash-db", "log", @@ -19555,10 +19868,10 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "smallvec", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", + "sp-panic-handler 13.0.2", + "sp-trie 39.1.0", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -19566,8 +19879,8 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -19577,13 +19890,13 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.9", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", "thiserror 1.0.69", "x25519-dalek", ] @@ -19597,7 +19910,19 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "impl-serde 0.5.0", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", +] [[package]] name = "sp-storage" @@ -19626,15 +19951,15 @@ dependencies = [ ] [[package]] -name = "sp-storage" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-timestamp" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "impl-serde 0.5.0", + "async-trait", "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "thiserror 1.0.69", ] [[package]] @@ -19651,15 +19976,14 @@ dependencies = [ ] [[package]] -name = "sp-timestamp" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "async-trait", "parity-scale-codec", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "thiserror 1.0.69", + "tracing", + "tracing-core", + "tracing-subscriber", ] [[package]] @@ -19675,14 +19999,12 @@ dependencies = [ ] [[package]] -name = "sp-tracing" -version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "sp-transaction-pool" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "parity-scale-codec", - "tracing", - "tracing-core", - "tracing-subscriber", + "sp-api 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -19695,92 +20017,84 @@ dependencies = [ "sp-runtime 39.0.5", ] -[[package]] -name = "sp-transaction-pool" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", -] - [[package]] name = "sp-transaction-storage-proof" -version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-inherents 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", ] [[package]] name = "sp-trie" -version = "37.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "ahash 0.8.12", "hash-db", - "lazy_static", - "memory-db", + "memory-db 0.33.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "scale-info", "schnellru", - "sp-core 34.0.0", - "sp-externalities 0.29.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing", - "trie-db 0.29.1", + "trie-db 0.30.0", "trie-root", ] [[package]] name = "sp-trie" -version = "39.1.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd" dependencies = [ "ahash 0.8.12", "hash-db", - "memory-db", + "lazy_static", + "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "scale-info", "schnellru", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "thiserror 1.0.69", "tracing", - "trie-db 0.30.0", + "trie-db 0.29.1", "trie-root", ] [[package]] name = "sp-trie" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" dependencies = [ "ahash 0.8.12", "hash-db", - "memory-db", + "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "scale-info", "schnellru", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -19789,64 +20103,64 @@ dependencies = [ [[package]] name = "sp-version" -version = "37.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d521a405707b5be561367cd3d442ff67588993de24062ce3adefcf8437ee9fe1" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "impl-serde 0.4.0", + "impl-serde 0.5.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 39.0.5", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version-proc-macro 14.0.0", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-version-proc-macro 13.0.0", "thiserror 1.0.69", ] [[package]] name = "sp-version" -version = "39.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +checksum = "d521a405707b5be561367cd3d442ff67588993de24062ce3adefcf8437ee9fe1" dependencies = [ - "impl-serde 0.5.0", + "impl-serde 0.4.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 41.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 39.0.5", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version-proc-macro 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version-proc-macro 14.0.0", "thiserror 1.0.69", ] [[package]] name = "sp-version" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-version-proc-macro 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 41.1.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version-proc-macro 15.0.0", "thiserror 1.0.69", ] [[package]] name = "sp-version-proc-macro" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", + "proc-macro-warning", "proc-macro2", "quote", "syn 2.0.101", @@ -19854,12 +20168,11 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "15.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7" dependencies = [ "parity-scale-codec", - "proc-macro-warning", "proc-macro2", "quote", "syn 2.0.101", @@ -19868,7 +20181,8 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -19879,9 +20193,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -19893,7 +20206,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "21.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -19904,31 +20218,31 @@ dependencies = [ [[package]] name = "sp-weights" -version = "31.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 23.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] name = "sp-weights" version = "31.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 26.1.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -20006,6 +20320,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "staging-parachain-info" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 31.0.1", +] + [[package]] name = "staging-parachain-info" version = "0.17.0" @@ -20021,16 +20348,24 @@ dependencies = [ ] [[package]] -name = "staging-parachain-info" -version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "staging-xcm" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "frame-system 40.1.0", + "array-bytes", + "bounded-collections", + "derive-where", + "environmental", + "frame-support 28.0.0", + "hex-literal", + "impl-trait-for-tuples", + "log", "parity-scale-codec", "scale-info", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "serde", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "xcm-procedural 7.0.0", ] [[package]] @@ -20048,7 +20383,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "xcm-procedural 8.0.0", ] @@ -20068,29 +20403,32 @@ dependencies = [ "scale-info", "serde", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "xcm-procedural 10.1.0", ] [[package]] -name = "staging-xcm" -version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "staging-xcm-builder" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "array-bytes", - "bounded-collections", - "derive-where", "environmental", - "frame-support 40.1.0", - "hex-literal", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "xcm-procedural 11.0.2", + "pallet-asset-conversion 10.0.0", + "pallet-transaction-payment 28.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "scale-info", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", + "tracing", ] [[package]] @@ -20108,35 +20446,31 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 14.0.0", "scale-info", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm 14.2.2", "staging-xcm-executor 17.0.2", ] [[package]] -name = "staging-xcm-builder" -version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "staging-xcm-executor" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "environmental", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", "impl-trait-for-tuples", - "pallet-asset-conversion 22.0.0", - "pallet-transaction-payment 40.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", "tracing", ] @@ -20152,35 +20486,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 26.1.0", "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm 14.2.2", "tracing", ] -[[package]] -name = "staging-xcm-executor" -version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" -dependencies = [ - "environmental", - "frame-benchmarking 40.0.0", - "frame-support 40.1.0", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "tracing", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -20281,9 +20595,8 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -20295,7 +20608,8 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -20326,32 +20640,32 @@ checksum = "b285e7d183a32732fdc119f3d81b7915790191fad602b7c709ef247073c77a2e" [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" [[package]] name = "substrate-frame-rpc-system" -version = "43.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", - "frame-system-rpc-runtime-api 36.0.0", + "frame-system-rpc-runtime-api 26.0.0", "futures", "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-block-builder 36.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", "sp-blockchain", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -20365,9 +20679,9 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2503-4#97e0ba9e2cb7f7c27a43c66ee9decbbfa5f617f4" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" dependencies = [ - "frame-support 40.1.0", + "frame-support 28.0.0", "hash-db", "ismp", "pallet-ismp", @@ -20375,34 +20689,33 @@ dependencies = [ "primitive-types 0.13.1", "scale-info", "serde", - "sp-consensus-aura 0.42.0", - "sp-consensus-babe 0.42.1", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-consensus-aura 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", ] [[package]] name = "substrate-state-trie-migration-rpc" -version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", "trie-db 0.30.0", ] [[package]] name = "substrate-wasm-builder" -version = "24.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eccd97d503bdd5d14be243fefccc4b712f8740aab2baba3dfd0140e2d08f765" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "build-helper", "cargo_metadata 0.15.4", @@ -20410,8 +20723,9 @@ dependencies = [ "filetime", "jobserver", "parity-wasm", - "polkavm-linker 0.9.2", - "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-linker 0.24.0", + "shlex", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -20421,28 +20735,18 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "26.0.1" +version = "24.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adc17ecd661e16b25708f36f6e6961f809a3ab16c89132a4acd7936c0f31e46" +checksum = "8eccd97d503bdd5d14be243fefccc4b712f8740aab2baba3dfd0140e2d08f765" dependencies = [ - "array-bytes", "build-helper", "cargo_metadata 0.15.4", "console", "filetime", - "frame-metadata 20.0.0", "jobserver", - "merkleized-metadata", - "parity-scale-codec", "parity-wasm", - "polkavm-linker 0.18.0", - "sc-executor 0.42.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shlex", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-linker 0.9.2", "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version 39.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -20453,17 +20757,27 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "26.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adc17ecd661e16b25708f36f6e6961f809a3ab16c89132a4acd7936c0f31e46" dependencies = [ + "array-bytes", "build-helper", "cargo_metadata 0.15.4", "console", "filetime", + "frame-metadata 20.0.0", "jobserver", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", "polkavm-linker 0.18.0", + "sc-executor 0.42.0", "shlex", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-io 40.0.1", + "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0", + "sp-version 39.0.0", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -20491,33 +20805,32 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "subxt" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c17d7ec2359d33133b63c97e28c8b7cd3f0a5bc6ce567ae3aef9d9e85be3433" +checksum = "03459d84546def5e1d0d22b162754609f18e031522b0319b53306f5829de9c09" dependencies = [ "async-trait", "derive-where", "either", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "futures", "hex", - "impl-serde 0.5.0", - "jsonrpsee", "parity-scale-codec", - "polkadot-sdk", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-bits 0.7.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", "scale-info", "scale-value", "serde", "serde_json", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", "subxt-lightclient", "subxt-macro", "subxt-metadata", - "thiserror 1.0.69", + "subxt-rpcs", + "thiserror 2.0.12", "tokio", "tokio-util", "tracing", @@ -20527,9 +20840,9 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6550ef451c77db6e3bc7c56fb6fe1dca9398a2c8fc774b127f6a396a769b9c5b" +checksum = "324c52c09919fec8c22a4b572a466878322e99fe14a9e3d50d6c3700a226ec25" dependencies = [ "heck 0.5.0", "parity-scale-codec", @@ -20539,50 +20852,51 @@ dependencies = [ "scale-typegen", "subxt-metadata", "syn 2.0.101", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "subxt-core" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7a1bc6c9c1724971636a66e3225a7253cdb35bb6efb81524a6c71c04f08c59" +checksum = "66ef00be9d64885ec94e478a58e4e39d222024b20013ae7df4fc6ece545391aa" dependencies = [ "base58", "blake2 0.10.6", "derive-where", "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "hex", "impl-serde 0.5.0", "keccak-hash", "parity-scale-codec", - "polkadot-sdk", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-bits 0.7.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", "scale-info", "scale-value", "serde", "serde_json", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", + "thiserror 2.0.12", "tracing", ] [[package]] name = "subxt-lightclient" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ebc9131da4d0ba1f7814495b8cc79698798ccd52cacd7bcefe451e415bd945" +checksum = "ce07c2515b2e63b85ec3043fe4461b287af0615d4832c2fe6e81ba780b906bc0" dependencies = [ "futures", "futures-util", "serde", "serde_json", "smoldot-light 0.16.2", - "thiserror 1.0.69", + "thiserror 2.0.12", "tokio", "tokio-stream", "tracing", @@ -20590,9 +20904,9 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7819c5e09aae0319981ee853869f2fcd1fac4db8babd0d004c17161297aadc05" +checksum = "7c2c8da275a620dd676381d72395dfea91f0a6cd849665b4f1d0919371850701" dependencies = [ "darling 0.20.11", "parity-scale-codec", @@ -20606,23 +20920,47 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacd4e7484fef58deaa2dcb32d94753a864b208a668c0dd0c28be1d8abeeadb2" +checksum = "fff4591673600c4388e21305788282414d26c791b4dee21b7cb0b19c10076f98" dependencies = [ "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "parity-scale-codec", - "polkadot-sdk", "scale-info", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 2.0.12", +] + +[[package]] +name = "subxt-rpcs" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ba7494d250d65dc3439365ac5e8e0fbb9c3992e6e84b7aa01d69e082249b8b8" +dependencies = [ + "derive-where", + "frame-metadata 20.0.0", + "futures", + "hex", + "impl-serde 0.5.0", + "jsonrpsee", + "parity-scale-codec", + "primitive-types 0.13.1", + "serde", + "serde_json", + "subxt-core", + "subxt-lightclient", + "thiserror 2.0.12", + "tracing", + "url", ] [[package]] name = "subxt-signer" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" +checksum = "4a2370298a210ed1df26152db7209a85e0ed8cfbce035309c3b37f7b61755377" dependencies = [ "base64 0.22.1", "bip32", @@ -20634,7 +20972,6 @@ dependencies = [ "keccak-hash", "parity-scale-codec", "pbkdf2", - "polkadot-sdk", "regex", "schnorrkel 0.11.4", "scrypt", @@ -20643,19 +20980,21 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", + "thiserror 2.0.12", "zeroize", ] [[package]] name = "subxt-utils-fetchmetadata" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c53bc3eeaacc143a2f29ace4082edd2edaccab37b69ad20befba9fb00fdb3d" +checksum = "fc868b55fe2303788dc7703457af390111940c3da4714b510983284501780ed5" dependencies = [ "hex", "parity-scale-codec", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] @@ -20682,9 +21021,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.25" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4560533fbd6914b94a8fb5cc803ed6801c3455668db3b810702c57612bac9412" +checksum = "14c8c8f496c33dc6343dac05b4be8d9e0bca180a4caa81d7b8416b10cc2273cd" dependencies = [ "paste", "proc-macro2", @@ -20715,6 +21054,21 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sysinfo" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "windows 0.52.0", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -20771,6 +21125,12 @@ dependencies = [ "staging-xcm 14.2.2", ] +[[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" @@ -20833,16 +21193,16 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "testnet-parachains-constants" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "cumulus-primitives-core 0.18.1", - "frame-support 40.1.0", - "polkadot-core-primitives 17.1.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "polkadot-core-primitives 7.0.0", "rococo-runtime-constants", "smallvec", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", "westend-runtime-constants", ] @@ -21236,11 +21596,11 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "coarsetime", - "polkadot-primitives 18.1.0", + "polkadot-primitives 7.0.0", "tracing", "tracing-gum-proc-macro", ] @@ -21248,7 +21608,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "expander", "proc-macro-crate 3.3.0", @@ -21520,6 +21880,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +dependencies = [ + "getrandom 0.3.3", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "uzers" version = "0.12.1" @@ -22170,127 +22541,125 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime" -version = "22.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "binary-merkle-tree 13.0.0", "bitvec", - "frame-benchmarking 40.0.0", - "frame-election-provider-support 40.1.0", - "frame-executive 40.0.0", - "frame-metadata-hash-extension 0.8.0", - "frame-support 40.1.0", - "frame-system 40.1.0", - "frame-system-benchmarking 40.0.0", - "frame-system-rpc-runtime-api 36.0.0", - "frame-try-runtime 0.46.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-executive 28.0.0", + "frame-metadata-hash-extension 0.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", - "pallet-asset-rate 19.0.0", - "pallet-authority-discovery 40.0.0", - "pallet-authorship 40.0.0", - "pallet-babe 40.0.0", - "pallet-bags-list 39.1.0", - "pallet-balances 41.1.0", - "pallet-beefy 41.1.0", - "pallet-beefy-mmr 41.0.0", - "pallet-conviction-voting 40.1.0", - "pallet-delegated-staking 7.0.0", - "pallet-election-provider-multi-phase 39.1.0", - "pallet-election-provider-support-benchmarking 39.0.0", - "pallet-elections-phragmen", - "pallet-fast-unstake 39.0.0", - "pallet-grandpa 40.0.0", - "pallet-identity 40.1.0", - "pallet-indices 40.0.0", - "pallet-membership", - "pallet-message-queue 43.1.0", + "pallet-asset-rate 7.0.0", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-bags-list 27.0.0", + "pallet-balances 28.0.0", + "pallet-beefy 28.0.0", + "pallet-beefy-mmr 28.0.0", + "pallet-conviction-voting 28.0.0", + "pallet-delegated-staking 1.0.0", + "pallet-election-provider-multi-phase 27.0.0", + "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-fast-unstake 27.0.0", + "pallet-grandpa 28.0.0", + "pallet-identity 29.0.0", + "pallet-indices 28.0.0", + "pallet-message-queue 31.0.0", "pallet-meta-tx", "pallet-migrations", - "pallet-mmr 40.0.0", - "pallet-multisig 40.1.0", - "pallet-nomination-pools 38.1.0", - "pallet-nomination-pools-benchmarking 38.0.0", - "pallet-nomination-pools-runtime-api 36.0.0", - "pallet-offences 39.0.0", - "pallet-offences-benchmarking 40.0.0", - "pallet-parameters 0.11.0", - "pallet-preimage 40.0.0", - "pallet-proxy 40.1.0", + "pallet-mmr 27.0.0", + "pallet-multisig 28.0.0", + "pallet-nomination-pools 25.0.0", + "pallet-nomination-pools-benchmarking 26.0.0", + "pallet-nomination-pools-runtime-api 23.0.0", + "pallet-offences 27.0.0", + "pallet-offences-benchmarking 28.0.0", + "pallet-parameters 0.1.0", + "pallet-preimage 28.0.0", + "pallet-proxy 28.0.0", "pallet-recovery", - "pallet-referenda 40.1.0", + "pallet-referenda 28.0.0", "pallet-root-testing", - "pallet-scheduler 41.0.0", - "pallet-session 40.0.0", - "pallet-session-benchmarking 40.0.0", - "pallet-society", - "pallet-staking 40.1.0", - "pallet-staking-runtime-api 26.0.0", - "pallet-state-trie-migration 44.1.0", - "pallet-sudo 40.0.0", - "pallet-timestamp 39.0.0", - "pallet-transaction-payment 40.0.0", - "pallet-transaction-payment-rpc-runtime-api 40.0.0", - "pallet-treasury 39.0.0", - "pallet-utility 40.0.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-session-benchmarking 28.0.0", + "pallet-staking 28.0.0", + "pallet-staking-async-ah-client", + "pallet-staking-async-rc-client", + "pallet-staking-runtime-api 14.0.0", + "pallet-sudo 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", "pallet-verify-signature", - "pallet-vesting 40.1.0", - "pallet-whitelist 39.0.0", - "pallet-xcm 19.1.0", - "pallet-xcm-benchmarks 20.0.0", + "pallet-vesting 28.0.0", + "pallet-whitelist 27.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-common 19.1.0", - "polkadot-runtime-parachains 19.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "scale-info", "serde", "serde_derive", "serde_json", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-application-crypto 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-authority-discovery 36.0.0", - "sp-block-builder 36.0.0", - "sp-consensus-babe 0.42.1", - "sp-consensus-beefy 24.1.0", - "sp-consensus-grandpa 23.1.0", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-genesis-builder 0.17.0", - "sp-inherents 36.0.0", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keyring 41.0.0", - "sp-mmr-primitives 36.1.0", - "sp-npos-elections 36.1.0", - "sp-offchain 36.0.0", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-session 38.1.0", - "sp-staking 38.0.0", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-transaction-pool 36.0.0", - "sp-version 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", - "staging-xcm-executor 19.1.0", - "substrate-wasm-builder 26.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy 13.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-mmr-primitives 26.0.0", + "sp-npos-elections 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "westend-runtime-constants", - "xcm-runtime-apis 0.7.0", + "xcm-runtime-apis 0.1.1", ] [[package]] name = "westend-runtime-constants" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-common 19.1.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-builder 20.1.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -22352,6 +22721,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows" version = "0.53.0" @@ -22362,6 +22741,37 @@ 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.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.53.0" @@ -22385,6 +22795,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" @@ -22413,6 +22834,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" @@ -22538,6 +22969,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" @@ -22815,42 +23255,42 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.19.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.5.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "array-bytes", - "cumulus-pallet-parachain-system 0.20.0", - "cumulus-primitives-core 0.18.1", - "cumulus-primitives-parachain-inherent 0.18.1", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-test-relay-sproof-builder", - "frame-support 40.1.0", - "frame-system 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 41.1.0", - "pallet-message-queue 43.1.0", - "pallet-timestamp 39.0.0", - "parachains-common 21.0.0", + "pallet-balances 28.0.0", + "pallet-message-queue 31.0.0", + "pallet-timestamp 27.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 16.1.0", - "polkadot-primitives 18.1.0", - "polkadot-runtime-parachains 19.1.0", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime 41.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", + "xcm-simulator", ] [[package]] name = "xcm-procedural" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "proc-macro2", @@ -22860,9 +23300,9 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "10.1.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fb4f14094d65c500a59bcf540cf42b99ee82c706edd6226a92e769ad60563e" +checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" dependencies = [ "Inflector", "proc-macro2", @@ -22872,8 +23312,9 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "11.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "10.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87fb4f14094d65c500a59bcf540cf42b99ee82c706edd6226a92e769ad60563e" dependencies = [ "Inflector", "proc-macro2", @@ -22881,6 +23322,20 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "xcm-runtime-apis" +version = "0.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "frame-support 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-weights 27.0.0", + "staging-xcm 7.0.1", + "staging-xcm-executor 7.0.0", +] + [[package]] name = "xcm-runtime-apis" version = "0.4.3" @@ -22891,23 +23346,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api 34.0.0", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "staging-xcm 14.2.2", "staging-xcm-executor 17.0.2", ] [[package]] -name = "xcm-runtime-apis" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +name = "xcm-simulator" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ - "frame-support 40.1.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", + "paste", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-api 36.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "staging-xcm 16.1.0", - "staging-xcm-executor 19.1.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -22964,9 +23426,9 @@ dependencies = [ [[package]] name = "yap" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" +checksum = "bfe269e7b803a5e8e20cbd97860e136529cd83bf2c9c6d37b142467e7e1f051f" [[package]] name = "yasna" From 01c58c7ada0f653699741f1c2262dbfa2b411150 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 13:44:40 +0100 Subject: [PATCH 025/284] chore(api): update cargo.lock --- pop-api/Cargo.lock | 668 +++++++++++++++++++++++++++++++-------------- 1 file changed, 459 insertions(+), 209 deletions(-) diff --git a/pop-api/Cargo.lock b/pop-api/Cargo.lock index b00e272fd..74cf208df 100644 --- a/pop-api/Cargo.lock +++ b/pop-api/Cargo.lock @@ -428,6 +428,12 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" @@ -469,8 +475,8 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hash-db", "log", @@ -1163,10 +1169,16 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "frame-benchmarking" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "frame-support", "frame-support-procedural", @@ -1179,19 +1191,19 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", "sp-runtime", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime-interface 24.0.0", + "sp-storage 19.0.0", "static_assertions", ] [[package]] name = "frame-metadata" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1201,8 +1213,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "aquamarine", "array-bytes", @@ -1222,28 +1234,28 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", "sp-crypto-hashing-proc-macro", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "sp-genesis-builder", "sp-inherents", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-io 30.0.0", "sp-metadata-ir", "sp-runtime", "sp-staking", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "sp-weights 27.0.0", "tt-call", ] [[package]] name = "frame-support-procedural" -version = "33.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "cfg-expr", @@ -1256,14 +1268,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural-tools" -version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -1274,8 +1286,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", @@ -1284,8 +1296,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "cfg-if", "docify", @@ -1294,11 +1306,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", "sp-runtime", "sp-version", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-weights 27.0.0", ] [[package]] @@ -1467,6 +1479,25 @@ dependencies = [ "subtle", ] +[[package]] +name = "h2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hash-db" version = "0.16.0" @@ -1508,6 +1539,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1564,6 +1597,87 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2111,6 +2225,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory-db" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +dependencies = [ + "hash-db", + "hashbrown 0.15.3", +] + [[package]] name = "merlin" version = "3.0.0" @@ -2132,6 +2256,17 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + [[package]] name = "nalgebra" version = "0.33.2" @@ -2286,8 +2421,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", "sp-runtime", ] @@ -2423,6 +2558,12 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" +[[package]] +name = "polkavm-common" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed9e5af472f729fcf3b3c1cf17508ddbb3505259dd6e2ee0fb5a29e105d22" + [[package]] name = "polkavm-derive" version = "0.9.1" @@ -2441,6 +2582,15 @@ dependencies = [ "polkavm-derive-impl-macro 0.18.0", ] +[[package]] +name = "polkavm-derive" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "176144f8661117ea95fa7cf868c9a62d6b143e8a2ebcb7582464c3faade8669a" +dependencies = [ + "polkavm-derive-impl-macro 0.24.0", +] + [[package]] name = "polkavm-derive-impl" version = "0.9.0" @@ -2465,6 +2615,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5a21844afdfcc10c92b9ef288ccb926211af27478d1730fcd55e4aec710179d" +dependencies = [ + "polkavm-common 0.24.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "polkavm-derive-impl-macro" version = "0.9.0" @@ -2485,6 +2647,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba0ef0f17ad81413ea1ca5b1b67553aedf5650c88269b673d3ba015c83bc2651" +dependencies = [ + "polkavm-derive-impl 0.24.0", + "syn 2.0.101", +] + [[package]] name = "pop-api" version = "0.0.0" @@ -2495,7 +2667,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "pop-primitives", - "sp-io 40.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 40.0.1", ] [[package]] @@ -2608,6 +2780,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror", +] + [[package]] name = "quote" version = "1.0.40" @@ -3175,10 +3361,20 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "sp-api" -version = "36.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", "hash-db", @@ -3186,21 +3382,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-externalities 0.25.0", "sp-metadata-ir", "sp-runtime", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "blake2", @@ -3213,21 +3409,20 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", + "sp-io 30.0.0", ] [[package]] name = "sp-arithmetic" -version = "26.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "docify", "integer-sqrt", @@ -3241,7 +3436,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" dependencies = [ "docify", "integer-sqrt", @@ -3254,9 +3450,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "36.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "ark-vrf", "array-bytes", @@ -3264,7 +3459,7 @@ dependencies = [ "blake2", "bounded-collections", "bs58", - "dyn-clonable", + "dyn-clone", "ed25519-zebra", "futures", "hash-db", @@ -3286,14 +3481,15 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-storage 19.0.0", "ss58-registry", - "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.4.7", "thiserror", "tracing", "w3f-bls", @@ -3303,7 +3499,8 @@ dependencies = [ [[package]] name = "sp-core" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" dependencies = [ "ark-vrf", "array-bytes", @@ -3333,14 +3530,14 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-runtime-interface 29.0.1", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", "ss58-registry", - "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "substrate-bip39 0.6.0", "thiserror", "tracing", "w3f-bls", @@ -3364,7 +3561,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "blake2b_simd", "byteorder", @@ -3377,10 +3574,10 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "syn 2.0.101", ] @@ -3398,7 +3595,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "proc-macro2", "quote", @@ -3407,29 +3604,29 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 19.0.0", ] [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-storage 22.0.0", ] [[package]] name = "sp-genesis-builder" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "scale-info", @@ -3440,8 +3637,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3453,9 +3650,8 @@ dependencies = [ [[package]] name = "sp-io" -version = "40.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bytes", "docify", @@ -3463,17 +3659,17 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive 0.24.0", "rustversion", "secp256k1", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-keystore 0.42.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 29.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-state-machine 0.45.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", "tracing", "tracing-core", ] @@ -3481,7 +3677,8 @@ dependencies = [ [[package]] name = "sp-io" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" dependencies = [ "bytes", "docify", @@ -3492,45 +3689,45 @@ dependencies = [ "polkavm-derive 0.18.0", "rustversion", "secp256k1", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-keystore 0.42.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-state-machine 0.45.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0", + "sp-keystore 0.42.0", + "sp-runtime-interface 29.0.1", + "sp-state-machine 0.45.0", + "sp-tracing 17.1.0", + "sp-trie 39.1.0", "tracing", "tracing-core", ] [[package]] name = "sp-keystore" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-externalities 0.25.0", ] [[package]] name = "sp-keystore" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", ] [[package]] name = "sp-metadata-ir" -version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -3539,9 +3736,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "backtrace", "regex", @@ -3550,7 +3746,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" dependencies = [ "backtrace", "regex", @@ -3558,8 +3755,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "binary-merkle-tree", "docify", @@ -3575,60 +3772,59 @@ dependencies = [ "serde", "simple-mermaid", "sp-application-crypto", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-io 40.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-weights 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-trie 29.0.0", + "sp-weights 27.0.0", "tracing", "tuplex", ] [[package]] name = "sp-runtime-interface" -version = "29.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive 0.24.0", "primitive-types", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface-proc-macro 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface" version = "29.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive 0.18.0", "primitive-types", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-runtime-interface-proc-macro 18.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-externalities 0.30.0", + "sp-runtime-interface-proc-macro 18.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", + "sp-wasm-interface 21.0.1", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "Inflector", "expander", @@ -3641,7 +3837,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", @@ -3653,22 +3850,21 @@ dependencies = [ [[package]] name = "sp-staking" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 28.0.0", "sp-runtime", ] [[package]] name = "sp-state-machine" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hash-db", "log", @@ -3676,10 +3872,10 @@ dependencies = [ "parking_lot", "rand", "smallvec", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-panic-handler 13.0.0", + "sp-trie 29.0.0", "thiserror", "tracing", "trie-db", @@ -3688,7 +3884,8 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" dependencies = [ "hash-db", "log", @@ -3696,10 +3893,10 @@ dependencies = [ "parking_lot", "rand", "smallvec", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-trie 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", + "sp-panic-handler 13.0.2", + "sp-trie 39.1.0", "thiserror", "tracing", "trie-db", @@ -3714,38 +3911,37 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" [[package]] name = "sp-storage" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] name = "sp-storage" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-tracing" -version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "tracing", @@ -3756,7 +3952,8 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" dependencies = [ "parity-scale-codec", "tracing", @@ -3766,21 +3963,21 @@ dependencies = [ [[package]] name = "sp-trie" -version = "39.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "ahash", "hash-db", - "memory-db", + "memory-db 0.33.0", "nohash-hasher", "parity-scale-codec", "parking_lot", "rand", "scale-info", "schnellru", - "sp-core 36.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "substrate-prometheus-endpoint", "thiserror", "tracing", "trie-db", @@ -3790,19 +3987,20 @@ dependencies = [ [[package]] name = "sp-trie" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" dependencies = [ "ahash", "hash-db", - "memory-db", + "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", "parking_lot", "rand", "scale-info", "schnellru", - "sp-core 36.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-core 36.1.0", + "sp-externalities 0.30.0", "thiserror", "tracing", "trie-db", @@ -3811,8 +4009,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -3821,15 +4019,15 @@ dependencies = [ "serde", "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -3840,9 +4038,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -3853,7 +4050,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "21.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -3863,31 +4061,31 @@ dependencies = [ [[package]] name = "sp-weights" -version = "31.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 23.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", ] [[package]] name = "sp-weights" version = "31.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4)", + "sp-arithmetic 26.1.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3930,7 +4128,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 31.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "xcm-procedural", ] @@ -3948,9 +4146,8 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "substrate-bip39" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -3962,7 +4159,8 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2503-4#0548e837980715584bfdea1fb907c9a6b3186bc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -3971,6 +4169,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror", + "tokio", +] + [[package]] name = "subtle" version = "2.6.1" @@ -4110,6 +4322,35 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "socket2", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.22" @@ -4446,7 +4687,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -4455,6 +4696,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.59.0" From 500ca5661157133c4b0f63f2f10e4e5730d48bb0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 14:23:00 +0100 Subject: [PATCH 026/284] refactor(pallets): remove deprecated runtimeevent config item --- pallets/api/src/mock.rs | 3 --- pallets/motion/src/mock.rs | 1 - pallets/nfts/src/mock.rs | 1 - 3 files changed, 5 deletions(-) diff --git a/pallets/api/src/mock.rs b/pallets/api/src/mock.rs index 48caa6caa..24104d754 100644 --- a/pallets/api/src/mock.rs +++ b/pallets/api/src/mock.rs @@ -113,7 +113,6 @@ impl pallet_assets::Config for Test { impl crate::fungibles::Config for Test { type AssetsInstance = AssetsInstance; - type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } @@ -190,7 +189,6 @@ impl pallet_nfts::Config for Test { type MetadataDepositBase = ConstU128<1>; type OffchainPublic = Noop; type OffchainSignature = Noop; - type RuntimeEvent = RuntimeEvent; type StringLimit = ConstU32<50>; type ValueLimit = ConstU32<50>; type WeightInfo = (); @@ -198,7 +196,6 @@ impl pallet_nfts::Config for Test { impl crate::nonfungibles::Config for Test { type NftsInstance = NftsInstance; - type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } diff --git a/pallets/motion/src/mock.rs b/pallets/motion/src/mock.rs index c562c5d49..4da403b4e 100644 --- a/pallets/motion/src/mock.rs +++ b/pallets/motion/src/mock.rs @@ -74,7 +74,6 @@ impl pallet_collective::Config for Test { impl pallet_motion::Config for Test { type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; type SimpleMajorityOrigin = pallet_collective::EnsureProportionAtLeast; type SuperMajorityOrigin = diff --git a/pallets/nfts/src/mock.rs b/pallets/nfts/src/mock.rs index 1f75fcaf3..20c7159b6 100644 --- a/pallets/nfts/src/mock.rs +++ b/pallets/nfts/src/mock.rs @@ -91,7 +91,6 @@ impl Config for Test { /// Off-chain = signature On-chain - therefore no conversion needed. /// It needs to be From for benchmarking. type OffchainSignature = Signature; - type RuntimeEvent = RuntimeEvent; type StringLimit = ConstU32<50>; type ValueLimit = ConstU32<50>; type WeightInfo = (); From 942bdcfd6a1f818db1a7be388973d58429e11376 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 14:24:05 +0100 Subject: [PATCH 027/284] test(fungibles): disambiguate allowance --- pallets/api/src/fungibles/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api/src/fungibles/tests.rs b/pallets/api/src/fungibles/tests.rs index 43881ac0a..b66f256a3 100644 --- a/pallets/api/src/fungibles/tests.rs +++ b/pallets/api/src/fungibles/tests.rs @@ -713,7 +713,7 @@ mod read_weights { assert_eq!(total_supply, WeightInfo::total_supply()); assert_eq!(balance_of, WeightInfo::balance_of()); - assert_eq!(allowance, WeightInfo::allowance()); + assert_eq!(allowance, ::allowance()); assert_eq!(token_name, WeightInfo::token_name()); assert_eq!(token_symbol, WeightInfo::token_symbol()); assert_eq!(token_decimals, WeightInfo::token_decimals()); From ac0790a681faadb3cf745061fd3621aa003659fd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 14:32:07 +0100 Subject: [PATCH 028/284] test(mainnet): update revive integrity tests --- runtime/mainnet/src/config/revive.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/runtime/mainnet/src/config/revive.rs b/runtime/mainnet/src/config/revive.rs index 0883c927f..88a99511c 100644 --- a/runtime/mainnet/src/config/revive.rs +++ b/runtime/mainnet/src/config/revive.rs @@ -81,13 +81,8 @@ mod tests { } #[test] - fn call_filter_is_nothing() { - assert_eq!(TypeId::of::<::CallFilter>(), TypeId::of::(),); - } - - #[test] - fn chain_extension_is_unset() { - assert_eq!(TypeId::of::<::ChainExtension>(), TypeId::of::<()>(),); + fn precompiles_is_unset() { + assert_eq!(TypeId::of::<::Precompiles>(), TypeId::of::<()>(),); } #[test] @@ -201,12 +196,4 @@ mod tests { TypeId::of::>(), ); } - - #[test] - fn xcm_is_pallet_xcm() { - assert_eq!( - TypeId::of::<::Xcm>(), - TypeId::of::>(), - ); - } } From 9168f9ba811588824a32f5eb37fb1f87095e3a7f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 14:32:49 +0100 Subject: [PATCH 029/284] build(deps): bump frame-metadata to resolve dependency clash --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 271054326..8b068d06e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14412,7 +14412,7 @@ dependencies = [ "env_logger 0.11.8", "frame-benchmarking 28.0.0", "frame-executive 28.0.0", - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "frame-metadata-hash-extension 0.1.0", "frame-support 28.0.0", "frame-system 28.0.0", @@ -14493,7 +14493,7 @@ dependencies = [ "env_logger 0.11.8", "frame-benchmarking 28.0.0", "frame-executive 28.0.0", - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "frame-metadata-hash-extension 0.1.0", "frame-support 28.0.0", "frame-system 28.0.0", diff --git a/Cargo.toml b/Cargo.toml index b9b684af8..1615fe11d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,7 @@ pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # de frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-metadata = { version = "20.0.0", default-features = false } +frame-metadata = { version = "23.0.0", default-features = false } frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } From 4ff7f3cd2765e7315c0f7634a1b7b9eeace2ad63 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 14:33:45 +0100 Subject: [PATCH 030/284] ci: restore runtime-benchmarks checks --- .github/workflows/ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b238bd4e3..cf54f692d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,9 +53,8 @@ jobs: - uses: "./.github/actions/init" - name: Check Build - # TODO: restore runtime-benchmarks once revive benchmarks resolved run: | - cargo check --release --locked --workspace --exclude integration-tests --features=try-runtime + cargo check --release --locked --workspace --exclude integration-tests --features=runtime-benchmarks,try-runtime check-ismp: needs: lint @@ -64,9 +63,8 @@ jobs: - uses: actions/checkout@v4 - uses: "./.github/actions/init" - name: Check Build with ISMP - # TODO: restore runtime-benchmarks once revive benchmarks resolved run: | - cargo check --release --locked --workspace --exclude integration-tests --features=ismp,try-runtime + cargo check --release --locked --workspace --exclude integration-tests --features=ismp,runtime-benchmarks,try-runtime clippy: needs: lint @@ -85,8 +83,7 @@ jobs: uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - # TODO: restore runtime-benchmarks once revive benchmarks resolved - args: --release --locked --workspace --exclude integration-tests + args: --release --locked --workspace --exclude integration-tests --features=runtime-benchmarks clippy-ismp: needs: lint @@ -105,8 +102,7 @@ jobs: uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - # TODO: restore runtime-benchmarks once revive benchmarks resolved - args: --release --locked --workspace --exclude integration-tests --features=ismp + args: --release --locked --workspace --exclude integration-tests --features=runtime-benchmarks,ismp test: needs: lint @@ -117,8 +113,7 @@ jobs: - uses: "./.github/actions/init" - name: Run tests - # TODO: restore runtime-benchmarks once revive benchmarks resolved - run: cargo test --release --locked --workspace --exclude integration-tests --exclude pop-api-integration-tests + run: cargo test --release --locked --workspace --exclude integration-tests --exclude pop-api-integration-tests --features=runtime-benchmarks integration-tests: needs: lint @@ -199,8 +194,7 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - # TODO: restore runtime-benchmarks once revive benchmarks resolved - run: cargo llvm-cov --features=try-runtime,ismp --workspace --exclude integration-tests --exclude pop-api-integration-tests --lib --bins --codecov --output-path codecov.json + run: cargo llvm-cov --features=runtime-benchmarks,try-runtime,ismp --workspace --exclude integration-tests --exclude pop-api-integration-tests --lib --bins --codecov --output-path codecov.json - name: Upload to codecov.io uses: codecov/codecov-action@v4 From 0eda3538632dde829b72fd5ad0c174e508c9d1b9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 15:23:27 +0100 Subject: [PATCH 031/284] test(mainnet): update metadata integrity test after v16 stabilisation --- runtime/mainnet/src/apis.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/runtime/mainnet/src/apis.rs b/runtime/mainnet/src/apis.rs index 09f9e0d2f..c2903d5f7 100644 --- a/runtime/mainnet/src/apis.rs +++ b/runtime/mainnet/src/apis.rs @@ -608,7 +608,6 @@ fn metadata_api_implemented() { use codec::Decode; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; - const V16_UNSTABLE: u32 = u32::MAX; fn assert>() { let opaque_meta: OpaqueMetadata = T::metadata(); @@ -620,7 +619,7 @@ fn metadata_api_implemented() { panic!("Expected metadata V14"); }; - assert_eq!(T::metadata_versions(), vec![14, 15, V16_UNSTABLE]); + assert_eq!(T::metadata_versions(), vec![14, 15, 16]); let version = 15; let opaque_meta = T::metadata_at_version(version).expect("V15 should exist"); @@ -634,8 +633,17 @@ fn metadata_api_implemented() { assert!(!metadata.apis.is_empty()); assert!(!metadata.pallets.is_empty()); - // Ensure metadata v16 is not provided. - assert!(T::metadata_at_version(16).is_none()); + let version = 16; + let opaque_meta = T::metadata_at_version(version).expect("V16 should exist"); + let prefixed_meta_bytes = opaque_meta.deref(); + assert_eq!(prefixed_meta_bytes, Runtime::metadata_at_version(version).unwrap().deref()); + let prefixed_meta = RuntimeMetadataPrefixed::decode(&mut &prefixed_meta_bytes[..]).unwrap(); + // Ensure that we have the V16 variant. + let RuntimeMetadata::V16(metadata) = prefixed_meta.1 else { + panic!("Expected metadata V16"); + }; + assert!(!metadata.apis.is_empty()); + assert!(!metadata.pallets.is_empty()); } sp_io::TestExternalities::new_empty().execute_with(|| assert::()); } From 9dba349308965daf603163fa1816f6387ece7827 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 15:33:02 +0100 Subject: [PATCH 032/284] refactor(runtimes): use max_pov_size constant --- runtime/devnet/src/lib.rs | 8 ++++---- runtime/mainnet/src/config/system.rs | 4 ++-- runtime/testnet/src/config/system.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index ccb6f27ac..6178675e9 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -63,9 +63,9 @@ use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; pub use pop_runtime_common::{ deposit, AuraId, Balance, BlockNumber, Hash, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - BLOCK_PROCESSING_VELOCITY, DAYS, EXISTENTIAL_DEPOSIT, HOURS, MAXIMUM_BLOCK_WEIGHT, MICRO_UNIT, - MILLI_UNIT, MINUTES, NORMAL_DISPATCH_RATIO, RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, - UNINCLUDED_SEGMENT_CAPACITY, UNIT, + BLOCK_PROCESSING_VELOCITY, DAYS, EXISTENTIAL_DEPOSIT, HOURS, MAXIMUM_BLOCK_WEIGHT, + MAX_POV_SIZE, MICRO_UNIT, MILLI_UNIT, MINUTES, NORMAL_DISPATCH_RATIO, + RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, UNIT, }; use smallvec::smallvec; use sp_api::impl_runtime_apis; @@ -262,7 +262,7 @@ parameter_types! { // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize // the lazy contract deletion. pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + BlockLength::max_with_normal_ratio(MAX_POV_SIZE, NORMAL_DISPATCH_RATIO); pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() .base_block(BlockExecutionWeight::get()) .for_class(DispatchClass::all(), |weights| { diff --git a/runtime/mainnet/src/config/system.rs b/runtime/mainnet/src/config/system.rs index d8a08328d..33fb200f3 100644 --- a/runtime/mainnet/src/config/system.rs +++ b/runtime/mainnet/src/config/system.rs @@ -3,7 +3,7 @@ use frame_support::traits::{ConstU32, ConstU64, Contains, EnqueueWithOrigin, Eve use pallet_balances::Call as BalancesCall; use polkadot_runtime_common::BlockHashCount; use pop_runtime_common::{ - Nonce, AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + Nonce, AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, MAX_POV_SIZE, NORMAL_DISPATCH_RATIO, }; use sp_runtime::traits::AccountIdLookup; @@ -30,7 +30,7 @@ parameter_types! { /// Defines the length limit in bytes for a block. // BlockLength is created with max for Operational & Mandatory and normal * max for Normal `DispatchClass`. pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + BlockLength::max_with_normal_ratio(MAX_POV_SIZE, NORMAL_DISPATCH_RATIO); /// Defines the block weight in terms of the different `DispatchClass` limits. pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() diff --git a/runtime/testnet/src/config/system.rs b/runtime/testnet/src/config/system.rs index 19492a061..32a6c70e2 100644 --- a/runtime/testnet/src/config/system.rs +++ b/runtime/testnet/src/config/system.rs @@ -29,7 +29,7 @@ parameter_types! { // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize // the lazy contract deletion. pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + BlockLength::max_with_normal_ratio(pop_runtime_common::MAX_POV_SIZE, NORMAL_DISPATCH_RATIO); pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() .base_block(BlockExecutionWeight::get()) .for_class(DispatchClass::all(), |weights| { From e1ed80846bbb961657ece895f441b04eaa926d6f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 15:51:29 +0100 Subject: [PATCH 033/284] test(integration-tests): updated expected ref_time for xcm attempted event --- integration-tests/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index a6e3fd4d6..1496cbe20 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -73,7 +73,7 @@ fn relay_to_para_sender_assertions(t: RelayToParaTest) { fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubPara::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 578_673_000, + 243_713_000, 6_208, ))); assert_expected_events!( From 488bdd5911215861dff929d6baee5a4dc564565b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 17:47:38 +0100 Subject: [PATCH 034/284] test(testnet): update metadata integrity test after v16 stabilisation --- runtime/testnet/src/lib.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index 7f1b15e64..c0f4362ad 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -1063,7 +1063,6 @@ fn metadata_api_implemented() { use codec::Decode; use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed}; - const V16_UNSTABLE: u32 = u32::MAX; fn assert>() { let opaque_meta: OpaqueMetadata = T::metadata(); @@ -1075,7 +1074,7 @@ fn metadata_api_implemented() { panic!("Expected metadata V14"); }; - assert_eq!(T::metadata_versions(), vec![14, 15, V16_UNSTABLE]); + assert_eq!(T::metadata_versions(), vec![14, 15, 16]); let version = 15; let opaque_meta = T::metadata_at_version(version).expect("V15 should exist"); @@ -1089,8 +1088,17 @@ fn metadata_api_implemented() { assert!(!metadata.apis.is_empty()); assert!(!metadata.pallets.is_empty()); - // Ensure metadata v16 is not provided. - assert!(T::metadata_at_version(16).is_none()); + let version = 16; + let opaque_meta = T::metadata_at_version(version).expect("V16 should exist"); + let prefixed_meta_bytes = opaque_meta.deref(); + assert_eq!(prefixed_meta_bytes, Runtime::metadata_at_version(version).unwrap().deref()); + let prefixed_meta = RuntimeMetadataPrefixed::decode(&mut &prefixed_meta_bytes[..]).unwrap(); + // Ensure that we have the V16 variant. + let RuntimeMetadata::V16(metadata) = prefixed_meta.1 else { + panic!("Expected metadata V16"); + }; + assert!(!metadata.apis.is_empty()); + assert!(!metadata.pallets.is_empty()); } sp_io::TestExternalities::new_empty().execute_with(|| assert::()); } From 034d733faa7807ecb4996853cb2ff88d647a3d73 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 23:11:19 +0100 Subject: [PATCH 035/284] build(deps): update stable2506 revision --- Cargo.toml | 220 ++++++++++++++++++++++++++--------------------------- 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1615fe11d..37c768787 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,132 +80,132 @@ pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # de # Substrate # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } frame-metadata = { version = "23.0.0", default-features = false } -frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "pallet-nfts", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false, package = "substrate-prometheus-endpoint" } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "pallet-nfts", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false, package = "substrate-prometheus-endpoint" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } # Polkadot # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm-builder", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-xcm-executor", default-features = false } -xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm-builder", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm-executor", default-features = false } +xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } # Cumulus # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", package = "staging-parachain-info", default-features = false } -parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-parachain-info", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } # Runtimes # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } ismp-parachain = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } From 88d4feedb59864554a7dde07aa2c8c59e63dbff3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 23:11:33 +0100 Subject: [PATCH 036/284] chore: update cargo.lock --- Cargo.lock | 808 +++++++++++++++++++++++---------------------- pop-api/Cargo.lock | 100 +++--- 2 files changed, 455 insertions(+), 453 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b068d06e..ab8409f2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" version = "0.15.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "assets-common 0.7.0", "bp-asset-hub-rococo", @@ -998,7 +998,7 @@ dependencies = [ "sp-offchain 26.0.0", "sp-runtime 31.0.1", "sp-session 27.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-storage 19.0.0", "sp-transaction-pool 26.0.0", "sp-version 29.0.0", @@ -1015,7 +1015,7 @@ dependencies = [ [[package]] name = "asset-test-utils" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-xcmp-queue 0.7.1", @@ -1045,7 +1045,7 @@ dependencies = [ [[package]] name = "assets-common" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "ethereum-standards", @@ -1431,7 +1431,7 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hash-db", "log", @@ -1768,7 +1768,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-bridge-hub-cumulus 0.7.0", "bp-messages 0.7.0", @@ -1786,7 +1786,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-westend" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-bridge-hub-cumulus 0.7.0", "bp-messages 0.7.0", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-messages 0.7.0", "bp-polkadot-core 0.7.0", @@ -1814,7 +1814,7 @@ dependencies = [ "parachains-common 7.0.0", "polkadot-primitives 7.0.0", "sp-api 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -1897,7 +1897,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-rococo" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-bridge-hub-cumulus 0.7.0", "bp-messages 0.7.0", @@ -1907,13 +1907,13 @@ dependencies = [ "parity-scale-codec", "sp-api 26.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "bp-bridge-hub-westend" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-bridge-hub-cumulus 0.7.0", "bp-messages 0.7.0", @@ -1923,13 +1923,13 @@ dependencies = [ "parity-scale-codec", "sp-api 26.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "bp-header-chain" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-runtime 0.7.0", "finality-grandpa", @@ -1940,7 +1940,7 @@ dependencies = [ "sp-consensus-grandpa 13.0.0", "sp-core 28.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-header-chain 0.7.0", "bp-runtime 0.7.0", @@ -1974,7 +1974,7 @@ dependencies = [ "serde", "sp-core 28.0.0", "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -1997,7 +1997,7 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-header-chain 0.7.0", "bp-polkadot-core 0.7.0", @@ -2008,13 +2008,13 @@ dependencies = [ "scale-info", "sp-core 28.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "bp-polkadot-core" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-messages 0.7.0", "bp-runtime 0.7.0", @@ -2025,7 +2025,7 @@ dependencies = [ "serde", "sp-core 28.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "bp-relayers" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-header-chain 0.7.0", "bp-messages 0.7.0", @@ -2062,13 +2062,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "bp-runtime" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -2083,7 +2083,7 @@ dependencies = [ "sp-io 30.0.0", "sp-runtime 31.0.1", "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-trie 29.0.0", "trie-db 0.30.0", ] @@ -2115,7 +2115,7 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-messages 0.7.0", "bp-runtime 0.7.0", @@ -2125,14 +2125,14 @@ dependencies = [ "serde", "sp-core 28.0.0", "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", ] [[package]] name = "bp-xcm-bridge-hub-router" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -3061,7 +3061,7 @@ dependencies = [ [[package]] name = "cumulus-client-bootnodes" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -3087,7 +3087,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "clap", "parity-scale-codec", @@ -3104,7 +3104,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -3127,7 +3127,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-client-collator", @@ -3174,7 +3174,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -3206,7 +3206,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "anyhow", "async-trait", @@ -3221,7 +3221,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -3248,7 +3248,7 @@ dependencies = [ [[package]] name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-primitives-core 0.7.0", @@ -3258,7 +3258,7 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-consensus-babe", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-inherents 26.0.0", "sp-runtime 31.0.1", "sp-state-machine 0.35.0", @@ -3269,7 +3269,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-primitives-core 0.7.0", @@ -3288,7 +3288,7 @@ dependencies = [ "sc-network", "sp-api 26.0.0", "sp-consensus", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-runtime 31.0.1", "sp-version 29.0.0", "tracing", @@ -3297,7 +3297,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-channel 1.9.0", "cumulus-client-cli", @@ -3337,7 +3337,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "frame-support 28.0.0", @@ -3372,10 +3372,10 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "cumulus-primitives-core 0.7.0", "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-primitives-proof-size-hostfunction 0.2.0", @@ -3398,7 +3398,7 @@ dependencies = [ "sp-io 30.0.0", "sp-runtime 31.0.1", "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-trie 29.0.0", "sp-version 29.0.0", "staging-xcm 7.0.1", @@ -3458,7 +3458,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3469,7 +3469,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -3496,7 +3496,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-weight-reclaim" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "derive-where", @@ -3515,7 +3515,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", @@ -3546,7 +3546,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.7.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "approx", "bounded-collections", @@ -3598,7 +3598,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-api 26.0.0", "sp-consensus-aura 0.32.0", @@ -3621,7 +3621,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-core-primitives 7.0.0", @@ -3655,7 +3655,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-primitives-core 0.7.0", @@ -3684,7 +3684,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-externalities 0.25.0", "sp-runtime-interface 24.0.0", @@ -3705,7 +3705,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-storage-weight-reclaim" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "cumulus-primitives-proof-size-hostfunction 0.2.0", @@ -3722,7 +3722,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", @@ -3757,7 +3757,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -3785,7 +3785,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-primitives-core 0.7.0", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -3841,7 +3841,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "cumulus-primitives-core 0.7.0", @@ -3882,7 +3882,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-streams" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-relay-chain-interface", "futures", @@ -3896,7 +3896,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "parity-scale-codec", @@ -4539,7 +4539,7 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "asset-test-utils", "bp-messages 0.7.0", @@ -4782,7 +4782,7 @@ dependencies = [ [[package]] name = "ethereum-standards" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "alloy-core", ] @@ -5067,7 +5067,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "fork-tree" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", ] @@ -5111,7 +5111,7 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "frame-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-support-procedural 23.0.0", @@ -5160,7 +5160,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "array-bytes", @@ -5237,7 +5237,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -5260,7 +5260,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-election-provider-solution-type 13.0.0", "frame-support 28.0.0", @@ -5271,7 +5271,7 @@ dependencies = [ "sp-core 28.0.0", "sp-npos-elections 26.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -5294,7 +5294,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "aquamarine", "frame-support 28.0.0", @@ -5367,7 +5367,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "const-hex", @@ -5399,7 +5399,7 @@ dependencies = [ [[package]] name = "frame-storage-access-test-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "parity-scale-codec", @@ -5413,7 +5413,7 @@ dependencies = [ [[package]] name = "frame-support" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "aquamarine", "array-bytes", @@ -5435,8 +5435,8 @@ dependencies = [ "sp-api 26.0.0", "sp-arithmetic 23.0.0", "sp-core 28.0.0", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-genesis-builder 0.8.0", "sp-inherents 26.0.0", "sp-io 30.0.0", @@ -5444,7 +5444,7 @@ dependencies = [ "sp-runtime 31.0.1", "sp-staking 26.0.0", "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-tracing 16.0.0", "sp-trie 29.0.0", "sp-weights 27.0.0", @@ -5496,7 +5496,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "cfg-expr", @@ -5509,7 +5509,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "syn 2.0.101", ] @@ -5537,7 +5537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support-procedural-tools-derive 11.0.0", "proc-macro-crate 3.3.0", @@ -5562,7 +5562,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -5583,7 +5583,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cfg-if", "docify", @@ -5623,7 +5623,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -5652,7 +5652,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "parity-scale-codec", @@ -5673,7 +5673,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "parity-scale-codec", @@ -6450,7 +6450,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -7200,7 +7200,7 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "ismp" version = "0.2.2" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "anyhow", "derive_more 1.0.0", @@ -7217,7 +7217,7 @@ dependencies = [ [[package]] name = "ismp-parachain" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "cumulus-primitives-core 0.7.0", @@ -7242,7 +7242,7 @@ dependencies = [ [[package]] name = "ismp-parachain-inherent" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "anyhow", "async-trait", @@ -7263,7 +7263,7 @@ dependencies = [ [[package]] name = "ismp-parachain-runtime-api" version = "1.15.1" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "sp-api 26.0.0", @@ -8638,7 +8638,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "log", @@ -8657,7 +8657,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9267,7 +9267,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9304,7 +9304,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion-ops" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9322,7 +9322,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion-tx-payment" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9352,7 +9352,7 @@ dependencies = [ [[package]] name = "pallet-asset-rate" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9381,7 +9381,7 @@ dependencies = [ [[package]] name = "pallet-asset-rewards" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9393,13 +9393,13 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "pallet-asset-tx-payment" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9433,7 +9433,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "29.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ethereum-standards", "frame-benchmarking 28.0.0", @@ -9468,7 +9468,7 @@ dependencies = [ [[package]] name = "pallet-assets-freezer" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "pallet-assets 29.1.0", @@ -9480,7 +9480,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -9513,7 +9513,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -9544,7 +9544,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -9571,7 +9571,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9618,7 +9618,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "aquamarine", "docify", @@ -9661,7 +9661,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -9693,7 +9693,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -9732,7 +9732,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "binary-merkle-tree 13.0.0", @@ -9783,7 +9783,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9818,7 +9818,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-header-chain 0.7.0", "bp-messages 0.7.0", @@ -9830,14 +9830,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-trie 29.0.0", ] [[package]] name = "pallet-broker" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "frame-benchmarking 28.0.0", @@ -9874,7 +9874,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9911,7 +9911,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9950,7 +9950,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -9967,7 +9967,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "frame-benchmarking 28.0.0", @@ -9998,7 +9998,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -10008,7 +10008,7 @@ dependencies = [ [[package]] name = "pallet-contracts-uapi" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -10030,7 +10030,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "assert_matches", "frame-benchmarking 28.0.0", @@ -10063,7 +10063,7 @@ dependencies = [ [[package]] name = "pallet-delegated-staking" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -10094,7 +10094,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10111,7 +10111,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", @@ -10155,7 +10155,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", @@ -10182,7 +10182,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10200,7 +10200,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -10237,7 +10237,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10282,7 +10282,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "enumflags2", "frame-benchmarking 28.0.0", @@ -10315,7 +10315,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10354,7 +10354,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10386,7 +10386,7 @@ dependencies = [ [[package]] name = "pallet-ismp" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "anyhow", "fortuples", @@ -10403,13 +10403,13 @@ dependencies = [ "sp-io 30.0.0", "sp-mmr-primitives 26.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "pallet-ismp-rpc" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "anyhow", "frame-system 28.0.0", @@ -10439,7 +10439,7 @@ dependencies = [ [[package]] name = "pallet-ismp-runtime-api" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "ismp", "pallet-ismp", @@ -10453,7 +10453,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "frame-benchmarking 28.0.0", @@ -10492,7 +10492,7 @@ dependencies = [ [[package]] name = "pallet-meta-tx" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -10504,13 +10504,13 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] name = "pallet-migrations" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -10529,7 +10529,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "parity-scale-codec", @@ -10576,7 +10576,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "parity-scale-codec", @@ -10603,7 +10603,7 @@ dependencies = [ [[package]] name = "pallet-nft-fractionalization" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "pallet-assets 29.1.0", @@ -10616,7 +10616,7 @@ dependencies = [ [[package]] name = "pallet-nfts" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "enumflags2", "frame-benchmarking 28.0.0", @@ -10669,7 +10669,7 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "sp-api 26.0.0", @@ -10689,7 +10689,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -10699,7 +10699,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -10736,7 +10736,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", @@ -10777,7 +10777,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "pallet-nomination-pools 25.0.0", "parity-scale-codec", @@ -10798,7 +10798,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -10830,7 +10830,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", @@ -10877,7 +10877,7 @@ dependencies = [ [[package]] name = "pallet-parameters" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -10912,7 +10912,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10945,7 +10945,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -10970,7 +10970,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -10988,7 +10988,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -10998,7 +10998,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "assert_matches", "frame-benchmarking 28.0.0", @@ -11053,7 +11053,7 @@ dependencies = [ [[package]] name = "pallet-revive" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "alloy-core", "derive_more 0.99.20", @@ -11092,6 +11092,8 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", + "staging-xcm 7.0.1", + "staging-xcm-builder 7.0.0", "substrate-bn", "subxt-signer", ] @@ -11099,7 +11101,7 @@ dependencies = [ [[package]] name = "pallet-revive-fixtures" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "anyhow", "cargo_metadata 0.15.4", @@ -11113,7 +11115,7 @@ dependencies = [ [[package]] name = "pallet-revive-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -11123,7 +11125,7 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", @@ -11135,7 +11137,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "4.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -11148,7 +11150,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -11183,7 +11185,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -11226,7 +11228,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11259,7 +11261,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11276,7 +11278,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", @@ -11321,7 +11323,7 @@ dependencies = [ [[package]] name = "pallet-staking-async-ah-client" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -11340,7 +11342,7 @@ dependencies = [ [[package]] name = "pallet-staking-async-rc-client" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -11369,7 +11371,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "sp-arithmetic 23.0.0", @@ -11388,7 +11390,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "sp-api 26.0.0", @@ -11409,7 +11411,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11442,7 +11444,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -11473,7 +11475,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -11511,7 +11513,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11529,7 +11531,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11560,7 +11562,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api 28.0.0", @@ -11576,7 +11578,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "pallet-transaction-payment 28.0.0", "parity-scale-codec", @@ -11601,7 +11603,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -11639,7 +11641,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11668,7 +11670,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11699,7 +11701,7 @@ dependencies = [ [[package]] name = "pallet-verify-signature" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11714,7 +11716,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11743,7 +11745,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -11768,7 +11770,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bounded-collections", "frame-benchmarking 28.0.0", @@ -11816,7 +11818,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -11851,7 +11853,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-messages 0.7.0", "bp-runtime 0.7.0", @@ -11864,7 +11866,7 @@ dependencies = [ "scale-info", "sp-core 28.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-builder 7.0.0", "staging-xcm-executor 7.0.0", @@ -11873,7 +11875,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-xcm-bridge-hub-router 0.6.0", "frame-benchmarking 28.0.0", @@ -11885,7 +11887,7 @@ dependencies = [ "scale-info", "sp-core 28.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-builder 7.0.0", ] @@ -11913,7 +11915,7 @@ dependencies = [ [[package]] name = "parachains-common" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "cumulus-primitives-utility 0.7.0", @@ -11973,7 +11975,7 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-xcmp-queue 0.7.1", @@ -12463,7 +12465,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polkadot-approval-distribution" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "futures-timer", @@ -12481,7 +12483,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "futures-timer", @@ -12496,7 +12498,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fatality", "futures", @@ -12519,7 +12521,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "fatality", @@ -12562,7 +12564,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "clap", "frame-benchmarking-cli", @@ -12579,14 +12581,14 @@ dependencies = [ "sp-core 28.0.0", "sp-keyring 31.0.0", "sp-runtime 31.0.1", - "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "thiserror 1.0.69", ] [[package]] name = "polkadot-collator-protocol" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "fatality", @@ -12609,7 +12611,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -12632,7 +12634,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fatality", "futures", @@ -12654,7 +12656,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -12668,7 +12670,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "futures-timer", @@ -12681,7 +12683,7 @@ dependencies = [ "sc-network", "sp-application-crypto 30.0.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-keystore 0.34.0", "tracing-gum", ] @@ -12689,7 +12691,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "always-assert", "async-trait", @@ -12712,7 +12714,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "parity-scale-codec", @@ -12730,7 +12732,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "bitvec", @@ -12762,7 +12764,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting-parallel" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -12786,7 +12788,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "futures", @@ -12805,7 +12807,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "fatality", @@ -12826,7 +12828,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "polkadot-node-subsystem", @@ -12841,7 +12843,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -12863,7 +12865,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "polkadot-node-metrics", @@ -12877,7 +12879,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "futures-timer", @@ -12893,7 +12895,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fatality", "futures", @@ -12911,7 +12913,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -12928,7 +12930,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fatality", "futures", @@ -12942,7 +12944,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "fatality", @@ -12959,7 +12961,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "always-assert", "array-bytes", @@ -12987,7 +12989,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "polkadot-node-subsystem", @@ -13000,7 +13002,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cpu-time", "futures", @@ -13015,7 +13017,7 @@ dependencies = [ "sc-executor-wasmtime 0.29.0", "seccompiler", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-io 30.0.0", "sp-tracing 16.0.0", @@ -13026,7 +13028,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "polkadot-node-metrics", @@ -13041,7 +13043,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bs58", "futures", @@ -13058,7 +13060,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -13083,7 +13085,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "bounded-vec", @@ -13099,7 +13101,7 @@ dependencies = [ "sp-consensus-babe 0.32.0", "sp-consensus-slots 0.32.0", "sp-keystore 0.34.0", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "thiserror 1.0.69", "zstd 0.12.4", ] @@ -13107,7 +13109,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "polkadot-node-subsystem-types", "polkadot-overseer", @@ -13116,7 +13118,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "derive_more 0.99.20", @@ -13144,7 +13146,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fatality", "futures", @@ -13174,7 +13176,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -13194,7 +13196,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bounded-collections", "derive_more 0.99.20", @@ -13227,7 +13229,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "bounded-collections", @@ -13249,7 +13251,7 @@ dependencies = [ "sp-keystore 0.34.0", "sp-runtime 31.0.1", "sp-staking 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "thiserror 1.0.69", ] @@ -13310,7 +13312,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -13343,7 +13345,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "frame-benchmarking 28.0.0", @@ -13463,7 +13465,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bs58", "frame-benchmarking 28.0.0", @@ -13488,7 +13490,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -13527,7 +13529,7 @@ dependencies = [ "sp-runtime 31.0.1", "sp-session 27.0.0", "sp-staking 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-executor 7.0.0", "static_assertions", @@ -13586,7 +13588,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-frame" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-benchmarking 28.0.0", @@ -13621,7 +13623,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "7.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "frame-benchmarking 28.0.0", @@ -13729,7 +13731,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitvec", "fatality", @@ -13749,7 +13751,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "polkadot-primitives 7.0.0", @@ -14854,7 +14856,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "itertools 0.14.0", "log", "multimap", @@ -15404,7 +15406,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "binary-merkle-tree 13.0.0", "bitvec", @@ -15502,7 +15504,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "polkadot-primitives 7.0.0", @@ -15869,7 +15871,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "sp-core 28.0.0", @@ -15892,7 +15894,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -15920,7 +15922,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "log", @@ -15941,7 +15943,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "sp-api 26.0.0", @@ -15956,7 +15958,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "docify", @@ -15971,7 +15973,7 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-genesis-builder 0.8.0", "sp-io 30.0.0", "sp-runtime 31.0.1", @@ -15982,7 +15984,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -15993,7 +15995,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "chrono", @@ -16035,7 +16037,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fnv", "futures", @@ -16061,7 +16063,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hash-db", "kvdb", @@ -16089,7 +16091,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -16112,7 +16114,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -16141,7 +16143,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "fork-tree", @@ -16166,7 +16168,7 @@ dependencies = [ "sp-consensus-babe 0.32.0", "sp-consensus-slots 0.32.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-inherents 26.0.0", "sp-keystore 0.34.0", "sp-runtime 31.0.1", @@ -16177,7 +16179,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "jsonrpsee", @@ -16199,7 +16201,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16233,7 +16235,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "jsonrpsee", @@ -16253,7 +16255,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "fork-tree", "parity-scale-codec", @@ -16266,7 +16268,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ahash 0.8.12", "array-bytes", @@ -16300,7 +16302,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa 13.0.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-keystore 0.34.0", "sp-runtime 31.0.1", "substrate-prometheus-endpoint", @@ -16310,7 +16312,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "finality-grandpa", "futures", @@ -16330,7 +16332,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -16353,7 +16355,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -16400,11 +16402,11 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "polkavm 0.24.0", "sc-allocator 23.0.0", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-wasm-interface 20.0.0", "thiserror 1.0.69", "wasm-instrument", @@ -16427,7 +16429,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "polkavm 0.24.0", @@ -16450,7 +16452,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "anyhow", "log", @@ -16483,7 +16485,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "console", "futures", @@ -16499,7 +16501,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "parking_lot 0.12.3", @@ -16513,7 +16515,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "arrayvec 0.7.6", @@ -16541,7 +16543,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16591,7 +16593,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -16601,7 +16603,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ahash 0.8.12", "futures", @@ -16620,7 +16622,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16641,7 +16643,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -16676,7 +16678,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "futures", @@ -16695,7 +16697,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bs58", "bytes", @@ -16714,7 +16716,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", "fnv", @@ -16748,7 +16750,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -16757,7 +16759,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "jsonrpsee", @@ -16789,7 +16791,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16809,7 +16811,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -16833,7 +16835,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "futures", @@ -16866,13 +16868,13 @@ dependencies = [ [[package]] name = "sc-runtime-utilities" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "sc-executor 0.32.0", "sc-executor-common 0.29.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-state-machine 0.35.0", "sp-wasm-interface 20.0.0", "thiserror 1.0.69", @@ -16881,7 +16883,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "directories", @@ -16945,7 +16947,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "parity-scale-codec", @@ -16956,7 +16958,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "clap", "fs4", @@ -16969,7 +16971,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16988,7 +16990,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "derive_more 0.99.20", "futures", @@ -17001,14 +17003,14 @@ dependencies = [ "serde", "serde_json", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-io 30.0.0", ] [[package]] name = "sc-telemetry" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "chrono", "futures", @@ -17027,7 +17029,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "chrono", "console", @@ -17055,7 +17057,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -17066,7 +17068,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -17083,7 +17085,7 @@ dependencies = [ "sp-api 26.0.0", "sp-blockchain", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-runtime 31.0.1", "sp-tracing 16.0.0", "sp-transaction-pool 26.0.0", @@ -17097,7 +17099,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -17114,7 +17116,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-channel 1.9.0", "futures", @@ -17648,7 +17650,7 @@ dependencies = [ [[package]] name = "serde-hex-utils" version = "0.1.0" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "anyhow", "hex", @@ -17948,7 +17950,7 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "enumn", "parity-scale-codec", @@ -18233,7 +18235,7 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "byte-slice-cast", "frame-support 28.0.0", @@ -18247,7 +18249,7 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "ssz_rs", "ssz_rs_derive", ] @@ -18278,7 +18280,7 @@ dependencies = [ [[package]] name = "snowbridge-core" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bp-relayers", "frame-support 28.0.0", @@ -18293,7 +18295,7 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-builder 7.0.0", "staging-xcm-executor 7.0.0", @@ -18326,7 +18328,7 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ethabi-decode 2.0.0", "ethbloom 0.14.1", @@ -18340,7 +18342,7 @@ dependencies = [ "serde-big-array", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -18382,7 +18384,7 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-primitives" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "alloy-core", "ethabi-decode 2.0.0", @@ -18399,7 +18401,7 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-builder 7.0.0", "staging-xcm-executor 7.0.0", @@ -18408,7 +18410,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system-frontend" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -18421,7 +18423,7 @@ dependencies = [ "sp-core 28.0.0", "sp-io 30.0.0", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-executor 7.0.0", "tracing", @@ -18450,7 +18452,7 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", @@ -18460,7 +18462,7 @@ dependencies = [ "snowbridge-core 0.2.0", "snowbridge-outbound-queue-primitives", "sp-arithmetic 23.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "staging-xcm 7.0.1", "staging-xcm-builder 7.0.0", "staging-xcm-executor 7.0.0", @@ -18469,14 +18471,14 @@ dependencies = [ [[package]] name = "snowbridge-verification-primitives" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "parity-scale-codec", "scale-info", "snowbridge-beacon-primitives 0.2.0", "sp-core 28.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -18533,7 +18535,7 @@ dependencies = [ [[package]] name = "sp-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "hash-db", @@ -18601,7 +18603,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18645,7 +18647,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -18683,7 +18685,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "integer-sqrt", @@ -18712,7 +18714,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -18737,7 +18739,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-api 26.0.0", "sp-inherents 26.0.0", @@ -18758,7 +18760,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "futures", "parity-scale-codec", @@ -18777,7 +18779,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "futures", @@ -18791,7 +18793,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "parity-scale-codec", @@ -18824,7 +18826,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "parity-scale-codec", @@ -18861,7 +18863,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -18869,7 +18871,7 @@ dependencies = [ "sp-api 26.0.0", "sp-application-crypto 30.0.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-io 30.0.0", "sp-keystore 0.34.0", "sp-mmr-primitives 26.0.0", @@ -18903,7 +18905,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "finality-grandpa", "log", @@ -18938,7 +18940,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -18961,7 +18963,7 @@ dependencies = [ [[package]] name = "sp-core" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ark-vrf", "array-bytes", @@ -18992,11 +18994,11 @@ dependencies = [ "secrecy 0.8.0", "serde", "sha2 0.10.9", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-runtime-interface 24.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-storage 19.0.0", "ss58-registry", "substrate-bip39 0.4.7", @@ -19118,7 +19120,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "blake2b_simd", "byteorder", @@ -19142,17 +19144,17 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "syn 2.0.101", ] [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -19172,7 +19174,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -19182,7 +19184,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "parity-scale-codec", @@ -19214,7 +19216,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -19239,7 +19241,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -19266,7 +19268,7 @@ dependencies = [ [[package]] name = "sp-io" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", "docify", @@ -19278,7 +19280,7 @@ dependencies = [ "rustversion", "secp256k1 0.28.2", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-keystore 0.34.0", "sp-runtime-interface 24.0.0", @@ -19346,7 +19348,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-core 28.0.0", "sp-runtime 31.0.1", @@ -19367,7 +19369,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -19412,7 +19414,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", @@ -19421,7 +19423,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-metadata 23.0.0", "parity-scale-codec", @@ -19453,7 +19455,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -19464,7 +19466,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "log", "parity-scale-codec", @@ -19473,7 +19475,7 @@ dependencies = [ "serde", "sp-api 26.0.0", "sp-core 28.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-runtime 31.0.1", "thiserror 1.0.69", ] @@ -19499,7 +19501,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -19526,7 +19528,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-api 26.0.0", "sp-core 28.0.0", @@ -19547,7 +19549,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "backtrace", "regex", @@ -19566,7 +19568,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -19576,7 +19578,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "binary-merkle-tree 13.0.0", "docify", @@ -19595,7 +19597,7 @@ dependencies = [ "sp-arithmetic 23.0.0", "sp-core 28.0.0", "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-trie 29.0.0", "sp-weights 27.0.0", "tracing", @@ -19662,7 +19664,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -19671,7 +19673,7 @@ dependencies = [ "primitive-types 0.13.1", "sp-externalities 0.25.0", "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-storage 19.0.0", "sp-tracing 16.0.0", "sp-wasm-interface 20.0.0", @@ -19721,7 +19723,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "expander", @@ -19748,7 +19750,7 @@ dependencies = [ [[package]] name = "sp-session" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -19777,7 +19779,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -19818,7 +19820,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hash-db", "log", @@ -19880,7 +19882,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -19893,7 +19895,7 @@ dependencies = [ "sp-api 26.0.0", "sp-application-crypto 30.0.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-runtime 31.0.1", "sp-runtime-interface 24.0.0", @@ -19910,18 +19912,18 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -19953,7 +19955,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "parity-scale-codec", @@ -19978,7 +19980,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "tracing", @@ -20001,7 +20003,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "sp-api 26.0.0", "sp-runtime 31.0.1", @@ -20020,7 +20022,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "parity-scale-codec", @@ -20034,7 +20036,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ahash 0.8.12", "hash-db", @@ -20104,16 +20106,16 @@ dependencies = [ [[package]] name = "sp-version" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-version-proc-macro 13.0.0", "thiserror 1.0.69", ] @@ -20157,7 +20159,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -20194,7 +20196,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -20219,7 +20221,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -20227,7 +20229,7 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic 23.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -20323,7 +20325,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-parachain-info" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", @@ -20350,7 +20352,7 @@ dependencies = [ [[package]] name = "staging-xcm" version = "7.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "bounded-collections", @@ -20410,7 +20412,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "frame-support 28.0.0", @@ -20457,7 +20459,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "frame-benchmarking 28.0.0", @@ -20596,7 +20598,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.4.7" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -20640,12 +20642,12 @@ checksum = "b285e7d183a32732fdc119f3d81b7915790191fad602b7c709ef247073c77a2e" [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" [[package]] name = "substrate-frame-rpc-system" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "frame-system-rpc-runtime-api 26.0.0", @@ -20665,7 +20667,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -20679,7 +20681,7 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#461ac5a30770039359cfd9884d755a53877c3710" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" dependencies = [ "frame-support 28.0.0", "hash-db", @@ -20698,7 +20700,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -20715,7 +20717,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "build-helper", "cargo_metadata 0.15.4", @@ -20725,7 +20727,7 @@ dependencies = [ "parity-wasm", "polkavm-linker 0.24.0", "shlex", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -21194,7 +21196,7 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "testnet-parachains-constants" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", @@ -21597,7 +21599,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "coarsetime", "polkadot-primitives 7.0.0", @@ -21608,7 +21610,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "expander", "proc-macro-crate 3.3.0", @@ -22542,7 +22544,7 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "binary-merkle-tree 13.0.0", "bitvec", @@ -22649,7 +22651,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "polkadot-primitives 7.0.0", @@ -23256,7 +23258,7 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "array-bytes", "cumulus-pallet-parachain-system 0.7.0", @@ -23278,7 +23280,7 @@ dependencies = [ "polkadot-runtime-parachains 7.0.0", "sp-arithmetic 23.0.0", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-io 30.0.0", "sp-runtime 31.0.1", "sp-tracing 16.0.0", @@ -23290,7 +23292,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "proc-macro2", @@ -23325,7 +23327,7 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" version = "0.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "parity-scale-codec", @@ -23354,7 +23356,7 @@ dependencies = [ [[package]] name = "xcm-simulator" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support 28.0.0", "frame-system 28.0.0", diff --git a/pop-api/Cargo.lock b/pop-api/Cargo.lock index 74cf208df..902b42b6f 100644 --- a/pop-api/Cargo.lock +++ b/pop-api/Cargo.lock @@ -476,7 +476,7 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hash-db", "log", @@ -1178,7 +1178,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "frame-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support", "frame-support-procedural", @@ -1214,7 +1214,7 @@ dependencies = [ [[package]] name = "frame-support" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "aquamarine", "array-bytes", @@ -1237,7 +1237,7 @@ dependencies = [ "sp-arithmetic 23.0.0", "sp-core 28.0.0", "sp-crypto-hashing-proc-macro", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-genesis-builder", "sp-inherents", "sp-io 30.0.0", @@ -1245,7 +1245,7 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-tracing 16.0.0", "sp-trie 29.0.0", "sp-weights 27.0.0", @@ -1255,7 +1255,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "cfg-expr", @@ -1268,14 +1268,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural-tools" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -1287,7 +1287,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "cfg-if", "docify", @@ -3374,7 +3374,7 @@ dependencies = [ [[package]] name = "sp-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "hash-db", @@ -3396,7 +3396,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "blake2", @@ -3410,7 +3410,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -3422,7 +3422,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "docify", "integer-sqrt", @@ -3451,7 +3451,7 @@ dependencies = [ [[package]] name = "sp-core" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ark-vrf", "array-bytes", @@ -3482,11 +3482,11 @@ dependencies = [ "secrecy", "serde", "sha2 0.10.9", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-runtime-interface 24.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-storage 19.0.0", "ss58-registry", "substrate-bip39 0.4.7", @@ -3561,7 +3561,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "blake2b_simd", "byteorder", @@ -3574,10 +3574,10 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "syn 2.0.101", ] @@ -3595,7 +3595,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "proc-macro2", "quote", @@ -3605,7 +3605,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "environmental", "parity-scale-codec", @@ -3626,7 +3626,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -3638,7 +3638,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3651,7 +3651,7 @@ dependencies = [ [[package]] name = "sp-io" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", "docify", @@ -3663,7 +3663,7 @@ dependencies = [ "rustversion", "secp256k1", "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-externalities 0.25.0", "sp-keystore 0.34.0", "sp-runtime-interface 24.0.0", @@ -3704,7 +3704,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "parking_lot", @@ -3727,7 +3727,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -3737,7 +3737,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "backtrace", "regex", @@ -3756,7 +3756,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "binary-merkle-tree", "docify", @@ -3775,7 +3775,7 @@ dependencies = [ "sp-arithmetic 23.0.0", "sp-core 28.0.0", "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-trie 29.0.0", "sp-weights 27.0.0", "tracing", @@ -3785,7 +3785,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -3794,7 +3794,7 @@ dependencies = [ "primitive-types", "sp-externalities 0.25.0", "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-storage 19.0.0", "sp-tracing 16.0.0", "sp-wasm-interface 20.0.0", @@ -3824,7 +3824,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "Inflector", "expander", @@ -3851,7 +3851,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3864,7 +3864,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hash-db", "log", @@ -3911,18 +3911,18 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -3941,7 +3941,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "tracing", @@ -3964,7 +3964,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "ahash", "hash-db", @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "sp-version" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -4019,7 +4019,7 @@ dependencies = [ "serde", "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", "sp-version-proc-macro", "thiserror", ] @@ -4027,7 +4027,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -4039,7 +4039,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -4062,7 +4062,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -4070,7 +4070,7 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic 23.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", ] [[package]] @@ -4147,7 +4147,7 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "substrate-bip39" version = "0.4.7" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -4172,7 +4172,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#46dae3e7d3b301fb1744192126b015db622d2fac" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" dependencies = [ "http-body-util", "hyper", From 5f976312127f54fcf8883ba1a066c7752373748c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 23:12:58 +0100 Subject: [PATCH 037/284] refactor(runtime): update revive config after revision change --- runtime/devnet/src/config/contracts.rs | 7 +++++-- runtime/mainnet/src/config/revive.rs | 9 ++++++--- runtime/testnet/src/config/contracts.rs | 7 +++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 23dbc8503..8ae093576 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, - Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, + RuntimeHoldReason, Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -90,6 +90,8 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; + // No runtime dispatchables are callable from contracts. + type CallFilter = Nothing; type ChainId = ChainId; type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Currency = Balances; @@ -114,6 +116,7 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; + type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { diff --git a/runtime/mainnet/src/config/revive.rs b/runtime/mainnet/src/config/revive.rs index 88a99511c..b3dbd7631 100644 --- a/runtime/mainnet/src/config/revive.rs +++ b/runtime/mainnet/src/config/revive.rs @@ -1,13 +1,13 @@ use frame_support::{ parameter_types, - traits::{ConstBool, ConstU32, ConstU64}, + traits::{ConstBool, ConstU32, ConstU64, Nothing}, }; use frame_system::EnsureSigned; use crate::{ config::monetary::{DepositPerByte, DepositPerItem}, - weights, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, - TransactionPayment, UNIT, + weights, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, + Timestamp, TransactionPayment, UNIT, }; // 18 decimals @@ -20,6 +20,8 @@ parameter_types! { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; + // No runtime dispatchables are callable from contracts. + type CallFilter = Nothing; // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -46,6 +48,7 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = weights::pallet_revive::WeightInfo; type WeightPrice = TransactionPayment; + type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { diff --git a/runtime/testnet/src/config/contracts.rs b/runtime/testnet/src/config/contracts.rs index e5bb2b307..4a2e01dbc 100644 --- a/runtime/testnet/src/config/contracts.rs +++ b/runtime/testnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, - Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, + RuntimeHoldReason, Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -88,6 +88,8 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; + // No runtime dispatchables are callable from contracts. + type CallFilter = Nothing; // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -114,6 +116,7 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; + type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { From 67f6d1f71f29605267b56d4f635582c1cd489940 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 25 Jul 2025 15:20:19 +0100 Subject: [PATCH 038/284] chore: update toolchain to stable --- rust-toolchain.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index eb05f02ab..e8e108397 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,6 +1,4 @@ [toolchain] -# Release of Rust 1.87.0 introduced issues on CI making tests involving instantiation of wasm smart contracts fail. -# Pinning version to stable 1.86 until resolved. -channel = "1.86" +channel = "stable" components = [ "clippy", "llvm-tools-preview", "rust-src", "rustfmt" ] targets = [ "wasm32v1-none" ] From 4f33162ddd03746668102d9f1c8443900c8118cc Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 19:36:55 +0100 Subject: [PATCH 039/284] build(deps): update contract-build to branch supporting valid contract builds on rust stable --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 37c768787..ef61c6187 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ codec = { package = "parity-scale-codec", version = "3.7.4", default-features = "derive", ] } color-print = "0.3.4" -contract-build = "5.0.2" +contract-build = { git = "https://github.com/use-ink/cargo-contract", branch = "v5-rust-stable" } docify = "0.2.9" enumflags2 = "0.7.11" env_logger = "0.11.5" From 440c27d0635dd7219ccc438c20f2a0d5e740b2c8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 19:37:29 +0100 Subject: [PATCH 040/284] build(extension): add missing feature flag to contract --- extension/contract/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/contract/Cargo.toml b/extension/contract/Cargo.toml index 286c00707..00afc4ad6 100755 --- a/extension/contract/Cargo.toml +++ b/extension/contract/Cargo.toml @@ -13,4 +13,5 @@ path = "lib.rs" [features] default = [ "std" ] +ink-as-dependency = [ ] std = [ "ink/std" ] From bafbd1f2c9eb333561c685b9266aefa0e2aa3a4e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 19:56:30 +0100 Subject: [PATCH 041/284] chore: update cargo.lock --- Cargo.lock | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab8409f2c..e0ba165ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2683,8 +2683,7 @@ checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "contract-build" version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e661897ab30bc0290628b2ea3ce18463c766a1264687a76aa8f5a36b6e75e78" +source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" dependencies = [ "anyhow", "blake2 0.10.6", @@ -2724,8 +2723,7 @@ dependencies = [ [[package]] name = "contract-metadata" version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ce11bf540c9b154aca38e9d828ae7ea93ec7b4486c5dea87d553016b28af175" +source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" dependencies = [ "anyhow", "impl-serde 0.5.0", From 2dc74af4a06b43302fedad3f09df8370d78e55f2 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 20:21:07 +0100 Subject: [PATCH 042/284] build(deps): update to stable2506 release Also bumps other deps in line with versions defined within the stable2506 release. --- Cargo.toml | 230 ++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef61c6187..25928597c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ resolver = "2" [workspace.dependencies] anyhow = { version = "1.0.81", default-features = false } clap = { version = "4.5.13", features = [ "derive" ] } -codec = { package = "parity-scale-codec", version = "3.7.4", default-features = false, features = [ +codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [ "derive", ] } color-print = "0.3.4" @@ -57,14 +57,14 @@ scale-info = { version = "2.11.6", default-features = false, features = [ serde = "1.0.214" serde_json = { version = "1.0.132", default-features = false } smallvec = "1.11.2" -subxt = "0.38.1" -subxt-signer = "0.38.0" -tokio = { version = "1.40.0", features = [ "macros", "rt-multi-thread", "time" ] } +subxt = "0.41.0" +subxt-signer = "0.41.0" +tokio = { version = "1.45.0", features = [ "macros", "rt-multi-thread", "time" ] } tracing-subscriber = { version = "0.3.18", default-features = false } # Build substrate-build-script-utils = { version = "11.0.0" } -substrate-wasm-builder = { version = "26.0.1" } +substrate-wasm-builder = { version = "27.0.0" } # Local pallet-api = { path = "pallets/api", default-features = false } @@ -80,132 +80,132 @@ pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # de # Substrate # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } frame-metadata = { version = "23.0.0", default-features = false } -frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "pallet-nfts", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false, package = "substrate-prometheus-endpoint" } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-migrations = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-nft-fractionalization = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-nfts-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-nfts-sdk = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", package = "pallet-nfts", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-revive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false, package = "substrate-prometheus-endpoint" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sp-mmr-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } # Polkadot # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm-builder", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-xcm-executor", default-features = false } -xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", package = "staging-xcm", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", package = "staging-xcm-builder", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", package = "staging-xcm-executor", default-features = false } +xcm-runtime-apis = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } # Cumulus # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 -asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", package = "staging-parachain-info", default-features = false } -parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +asset-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +emulated-integration-tests-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", package = "staging-parachain-info", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } # Runtimes # Dependencies changed to point to the tag for stable 2503-4 release as we needed a patch in pallet-session # that wasn't released in crates.io for testnet runtime v0.5.3 asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } +asset-hub-westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } paseo-runtime = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes", default-features = false, tag = "v1.4.3" } -westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77" } -westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", rev = "a251f77", default-features = false } +westend-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506" } +westend-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2506", default-features = false } ismp = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } ismp-parachain = { git = "https://github.com/r0gue-io/ismp", branch = "polkadot-stable2506", default-features = false } From 54d5eb6d7fae410af71aba26b13aa6b2a1f79ce5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 20:21:50 +0100 Subject: [PATCH 043/284] refactor(runtime): address breaking changes --- runtime/devnet/src/config/contracts.rs | 7 ++----- runtime/mainnet/src/config/revive.rs | 9 +++------ runtime/testnet/src/config/contracts.rs | 7 ++----- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 8ae093576..23dbc8503 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeHoldReason, Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, + Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -90,8 +90,6 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; type ChainId = ChainId; type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Currency = Balances; @@ -116,7 +114,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { diff --git a/runtime/mainnet/src/config/revive.rs b/runtime/mainnet/src/config/revive.rs index b3dbd7631..88a99511c 100644 --- a/runtime/mainnet/src/config/revive.rs +++ b/runtime/mainnet/src/config/revive.rs @@ -1,13 +1,13 @@ use frame_support::{ parameter_types, - traits::{ConstBool, ConstU32, ConstU64, Nothing}, + traits::{ConstBool, ConstU32, ConstU64}, }; use frame_system::EnsureSigned; use crate::{ config::monetary::{DepositPerByte, DepositPerItem}, - weights, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, - Timestamp, TransactionPayment, UNIT, + weights, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, + TransactionPayment, UNIT, }; // 18 decimals @@ -20,8 +20,6 @@ parameter_types! { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -48,7 +46,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = weights::pallet_revive::WeightInfo; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { diff --git a/runtime/testnet/src/config/contracts.rs b/runtime/testnet/src/config/contracts.rs index 4a2e01dbc..e5bb2b307 100644 --- a/runtime/testnet/src/config/contracts.rs +++ b/runtime/testnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeHoldReason, Timestamp, TransactionPayment, + deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, + Timestamp, TransactionPayment, }; fn schedule() -> pallet_contracts::Schedule { @@ -88,8 +88,6 @@ impl pallet_contracts::Config for Runtime { impl pallet_revive::Config for Runtime { type AddressMapper = pallet_revive::AccountId32Mapper; - // No runtime dispatchables are callable from contracts. - type CallFilter = Nothing; // EVM chain id. 3,395 is a unique ID still. type ChainId = ConstU64<3_395>; // 30 percent of storage deposit held for using a code hash. @@ -116,7 +114,6 @@ impl pallet_revive::Config for Runtime { type UploadOrigin = EnsureSigned; type WeightInfo = pallet_revive::weights::SubstrateWeight; type WeightPrice = TransactionPayment; - type Xcm = PolkadotXcm; } impl TryFrom for pallet_revive::Call { From 82e64e8c9113e8797669ead3ed4cb91632398de0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 20:22:51 +0100 Subject: [PATCH 044/284] refactor(node): add notification metrics to service --- node/src/service.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node/src/service.rs b/node/src/service.rs index 854cc1b9b..284d55900 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -28,7 +28,7 @@ use prometheus_endpoint::Registry; use sc_client_api::Backend; use sc_consensus::ImportQueue; use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; -use sc_network::NetworkBlock; +use sc_network::{NetworkBackend, NetworkBlock}; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; @@ -225,6 +225,9 @@ where relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura + metrics: sc_network::NetworkWorker::::register_notification_metrics( + parachain_config.prometheus_config.as_ref().map(|config| &config.registry), + ), }) .await?; From f53f5607bad75c3038e9f2edc92632ccc082d9a7 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 20:23:02 +0100 Subject: [PATCH 045/284] chore: update cargo.lock --- Cargo.lock | 7944 +++++++++++++++++++++++++++------------------------- 1 file changed, 4067 insertions(+), 3877 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0ba165ff..f18afc53d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -732,6 +732,16 @@ version = "6.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" +[[package]] +name = "array-bytes" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d55334c98d756b32dcceb60248647ab34f027690f87f9a362fd292676ee927" +dependencies = [ + "smallvec", + "thiserror 2.0.12", +] + [[package]] name = "array-init" version = "2.1.0" @@ -922,151 +932,124 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.15.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "assets-common 0.7.0", + "assets-common 0.22.0", "bp-asset-hub-rococo", "bp-asset-hub-westend", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-session-benchmarking 9.0.0", + "cumulus-pallet-aura-ext 0.21.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-session-benchmarking 22.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.0", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.20.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-utility 0.21.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex-literal", "log", - "pallet-asset-conversion 10.0.0", + "pallet-asset-conversion 23.0.0", "pallet-asset-conversion-ops", - "pallet-asset-conversion-tx-payment 10.0.0", + "pallet-asset-conversion-tx-payment 23.0.0", "pallet-asset-rewards", - "pallet-assets 29.1.0", + "pallet-assets 43.0.0", "pallet-assets-freezer", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-aura 40.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", + "pallet-message-queue 44.0.0", "pallet-migrations", - "pallet-multisig 28.0.0", + "pallet-multisig 41.0.0", "pallet-nft-fractionalization", - "pallet-nfts 22.0.0", - "pallet-nfts-runtime-api 14.0.0", - "pallet-proxy 28.0.0", + "pallet-nfts 35.0.0", + "pallet-nfts-runtime-api 27.0.0", + "pallet-proxy 41.0.0", "pallet-revive", - "pallet-session 28.0.0", - "pallet-state-trie-migration 29.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-uniques 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.0", - "pallet-xcm-bridge-hub-router 0.5.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-session 41.0.0", + "pallet-state-trie-migration 46.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-uniques 41.0.0", + "pallet-utility 41.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-benchmarks 21.0.0", + "pallet-xcm-bridge-hub-router 0.19.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-runtime-common 20.0.0", "primitive-types 0.13.1", "scale-info", "serde_json", "snowbridge-outbound-queue-primitives", "snowbridge-pallet-system-frontend", "snowbridge-runtime-common", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 17.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "testnet-parachains-constants", "westend-runtime-constants", - "xcm-runtime-apis 0.1.1", + "xcm-runtime-apis 0.8.0", ] [[package]] name = "asset-test-utils" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-asset-conversion 10.0.0", - "pallet-assets 29.1.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-bridge-hub-router 0.5.0", - "parachains-common 7.0.0", +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-asset-conversion 23.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", + "pallet-session 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-bridge-hub-router 0.19.0", + "parachains-common 22.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "xcm-runtime-apis 0.1.1", -] - -[[package]] -name = "assets-common" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "ethereum-standards", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "pallet-asset-conversion 10.0.0", - "pallet-assets 29.1.0", - "pallet-revive", - "pallet-revive-uapi", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "tracing", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "xcm-runtime-apis 0.8.0", ] [[package]] @@ -1093,6 +1076,33 @@ dependencies = [ "substrate-wasm-builder 24.0.2", ] +[[package]] +name = "assets-common" +version = "0.22.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "cumulus-primitives-core 0.19.0", + "ethereum-standards", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", + "pallet-asset-conversion 23.0.0", + "pallet-assets 43.0.0", + "pallet-revive", + "pallet-revive-uapi", + "pallet-xcm 20.1.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "tracing", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -1430,29 +1440,29 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "336bf780dd7526a9a4bc1521720b25c1994dc132cccd59553431923fa4d1a693" dependencies = [ "hash-db", "log", - "parity-scale-codec", ] [[package]] name = "binary-merkle-tree" -version = "15.0.1" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336bf780dd7526a9a4bc1521720b25c1994dc132cccd59553431923fa4d1a693" +checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" dependencies = [ "hash-db", "log", + "parity-scale-codec", ] [[package]] name = "binary-merkle-tree" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hash-db", "log", @@ -1767,56 +1777,40 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-bridge-hub-cumulus 0.7.0", - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-bridge-hub-cumulus 0.22.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "bp-xcm-bridge-hub-router 0.18.0", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "staging-xcm 7.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", "testnet-parachains-constants", ] [[package]] name = "bp-asset-hub-westend" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-bridge-hub-cumulus 0.7.0", - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-bridge-hub-cumulus 0.22.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "bp-xcm-bridge-hub-router 0.18.0", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "staging-xcm 7.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", "testnet-parachains-constants", ] -[[package]] -name = "bp-bridge-hub-cumulus" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bp-messages 0.7.0", - "bp-polkadot-core 0.7.0", - "bp-runtime 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parachains-common 7.0.0", - "polkadot-primitives 7.0.0", - "sp-api 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", -] - [[package]] name = "bp-bridge-hub-cumulus" version = "0.18.0" @@ -1833,6 +1827,22 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bp-bridge-hub-cumulus" +version = "0.22.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bp-messages 0.21.0", + "bp-polkadot-core 0.21.0", + "bp-runtime 0.21.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "parachains-common 22.0.0", + "polkadot-primitives 19.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "bp-bridge-hub-kusama" version = "1.0.0" @@ -1896,51 +1906,34 @@ dependencies = [ [[package]] name = "bp-bridge-hub-rococo" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.22.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-bridge-hub-cumulus 0.7.0", - "bp-messages 0.7.0", - "bp-runtime 0.7.0", + "bp-bridge-hub-cumulus 0.22.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", "bp-xcm-bridge-hub", - "frame-support 28.0.0", + "frame-support 41.0.0", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "bp-bridge-hub-westend" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-bridge-hub-cumulus 0.7.0", - "bp-messages 0.7.0", - "bp-runtime 0.7.0", + "bp-bridge-hub-cumulus 0.22.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", "bp-xcm-bridge-hub", - "frame-support 28.0.0", - "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", -] - -[[package]] -name = "bp-header-chain" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bp-runtime 0.7.0", - "finality-grandpa", - "frame-support 28.0.0", + "frame-support 41.0.0", "parity-scale-codec", - "scale-info", - "serde", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -1962,19 +1955,20 @@ dependencies = [ ] [[package]] -name = "bp-messages" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-header-chain" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-header-chain 0.7.0", - "bp-runtime 0.7.0", - "frame-support 28.0.0", + "bp-runtime 0.21.0", + "finality-grandpa", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -1995,37 +1989,36 @@ dependencies = [ ] [[package]] -name = "bp-parachains" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-messages" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-header-chain 0.7.0", - "bp-polkadot-core 0.7.0", - "bp-runtime 0.7.0", - "frame-support 28.0.0", - "impl-trait-for-tuples", + "bp-header-chain 0.21.0", + "bp-runtime 0.21.0", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "bp-polkadot-core" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-parachains" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-header-chain 0.21.0", + "bp-polkadot-core 0.21.0", + "bp-runtime 0.21.0", + "frame-support 41.0.0", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -2048,44 +2041,38 @@ dependencies = [ ] [[package]] -name = "bp-relayers" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-polkadot-core" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-header-chain 0.7.0", - "bp-messages 0.7.0", - "bp-parachains", - "bp-runtime 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-utility 28.0.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "bp-runtime" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-relayers" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "hash-db", - "impl-trait-for-tuples", - "log", - "num-traits", + "bp-header-chain 0.21.0", + "bp-messages 0.21.0", + "bp-parachains", + "bp-runtime 0.21.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-utility 41.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-trie 29.0.0", - "trie-db 0.30.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -2113,32 +2100,43 @@ dependencies = [ ] [[package]] -name = "bp-xcm-bridge-hub" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-runtime" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "frame-support 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "trie-db 0.30.0", ] [[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "bp-xcm-bridge-hub" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", ] [[package]] @@ -2154,6 +2152,18 @@ dependencies = [ "staging-xcm 14.2.2", ] +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", +] + [[package]] name = "bs58" version = "0.5.1" @@ -3058,34 +3068,34 @@ dependencies = [ [[package]] name = "cumulus-client-bootnodes" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "cumulus-client-network", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "futures", "hex", "ip_network", "log", "num-traits", - "parachains-common 7.0.0", + "parachains-common 22.0.0", "parity-scale-codec", "prost 0.12.6", "prost-build", "sc-network", "sc-service", - "sp-consensus-babe 0.32.0", - "sp-runtime 31.0.1", + "sp-consensus-babe 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tokio", ] [[package]] name = "cumulus-client-cli" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "clap", "parity-scale-codec", @@ -3094,46 +3104,46 @@ dependencies = [ "sc-client-api", "sc-service", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "url", ] [[package]] name = "cumulus-client-collator" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "futures", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-client-api", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", "cumulus-client-parachain-inherent", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "futures", "parity-scale-codec", @@ -3142,7 +3152,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -3151,39 +3161,39 @@ dependencies = [ "sc-telemetry", "sc-utils", "schnellru", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-timestamp 26.0.0", - "sp-trie 29.0.0", - "substrate-prometheus-endpoint", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tokio", "tracing", ] [[package]] name = "cumulus-client-consensus-common" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "cumulus-relay-chain-streams", "dyn-clone", "futures", "log", "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-client-api", "sc-consensus", "sc-consensus-babe", @@ -3191,35 +3201,35 @@ dependencies = [ "schnellru", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-timestamp 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "substrate-prometheus-endpoint", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-client-consensus-proposer" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "anyhow", "async-trait", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-primitives-parachain-inherent 0.19.0", "sp-consensus", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "cumulus-client-network" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -3229,48 +3239,48 @@ dependencies = [ "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "sc-client-api", "sc-network", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-client-parachain-inherent" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-parachain-inherent 0.19.0", "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", "parity-scale-codec", "sc-client-api", "sc-consensus-babe", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "cumulus-relay-chain-streams", "futures", @@ -3279,23 +3289,23 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "sc-client-api", "sc-consensus", "sc-network", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-client-service" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-channel 1.9.0", "cumulus-client-cli", @@ -3303,14 +3313,14 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-proof-size-hostfunction 0.2.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-proof-size-hostfunction 0.13.0", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", "cumulus-relay-chain-streams", "futures", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "prometheus", "sc-client-api", "sc-consensus", @@ -3323,30 +3333,13 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-transaction-pool 26.0.0", -] - -[[package]] -name = "cumulus-pallet-aura-ext" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-aura 27.0.0", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", ] [[package]] @@ -3368,40 +3361,20 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-parachain-system" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-pallet-aura-ext" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-primitives-proof-size-hostfunction 0.2.0", - "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "hashbrown 0.15.3", - "impl-trait-for-tuples", - "log", - "pallet-message-queue 31.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-parachains 7.0.0", - "scale-info", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "trie-db 0.30.0", + "cumulus-pallet-parachain-system 0.21.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-aura 40.0.0", + "pallet-timestamp 40.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-aura 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -3441,6 +3414,43 @@ dependencies = [ "trie-db 0.29.1", ] +[[package]] +name = "cumulus-pallet-parachain-system" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bytes", + "cumulus-pallet-parachain-system-proc-macro 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-parachain-inherent 0.19.0", + "cumulus-primitives-proof-size-hostfunction 0.13.0", + "environmental", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "hashbrown 0.15.3", + "impl-trait-for-tuples", + "log", + "pallet-message-queue 44.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-runtime-parachains 20.0.1", + "scale-info", + "sp-consensus-babe 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "trie-db 0.30.0", +] + [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" @@ -3456,7 +3466,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3464,19 +3474,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "cumulus-pallet-session-benchmarking" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", - "parity-scale-codec", - "sp-runtime 31.0.1", -] - [[package]] name = "cumulus-pallet-session-benchmarking" version = "19.0.0" @@ -3492,37 +3489,35 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-weight-reclaim" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-pallet-session-benchmarking" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-storage-weight-reclaim", - "derive-where", - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-session 41.0.0", "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "cumulus-pallet-xcm" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-pallet-weight-reclaim" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-storage-weight-reclaim", + "derive-where", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -3542,29 +3537,18 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-xcmp-queue" -version = "0.7.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-pallet-xcm" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "approx", - "bounded-collections", - "bp-xcm-bridge-hub-router 0.6.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-message-queue 31.0.0", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", ] [[package]] @@ -3594,12 +3578,29 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-aura" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-pallet-xcmp-queue" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "sp-api 26.0.0", - "sp-consensus-aura 0.32.0", + "approx", + "bounded-collections", + "bp-xcm-bridge-hub-router 0.18.0", + "cumulus-primitives-core 0.19.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-message-queue 44.0.0", + "parity-scale-codec", + "polkadot-runtime-common 20.0.0", + "polkadot-runtime-parachains 20.0.1", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] @@ -3617,20 +3618,12 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-core" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-aura" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", - "staging-xcm 7.0.1", - "tracing", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-aura 0.43.0", ] [[package]] @@ -3651,17 +3644,20 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-core" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "async-trait", - "cumulus-primitives-core 0.7.0", "parity-scale-codec", + "polkadot-core-primitives 18.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "scale-info", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-trie 29.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "tracing", ] [[package]] @@ -3680,13 +3676,17 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-proof-size-hostfunction" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-parachain-inherent" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", + "async-trait", + "cumulus-primitives-core 0.19.0", + "parity-scale-codec", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -3701,37 +3701,30 @@ dependencies = [ ] [[package]] -name = "cumulus-primitives-storage-weight-reclaim" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.13.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-proof-size-hostfunction 0.2.0", - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "cumulus-primitives-utility" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-storage-weight-reclaim" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-proof-size-hostfunction 0.13.0", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-asset-conversion 10.0.0", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -3753,19 +3746,36 @@ dependencies = [ ] [[package]] -name = "cumulus-relay-chain-inprocess-interface" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "cumulus-primitives-utility" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "log", + "pallet-asset-conversion 23.0.0", + "parity-scale-codec", + "polkadot-runtime-common 20.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", +] + +[[package]] +name = "cumulus-relay-chain-inprocess-interface" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-channel 1.9.0", "async-trait", "cumulus-client-bootnodes", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "futures", "futures-timer", "polkadot-cli", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "polkadot-service", "sc-cli", "sc-client-api", @@ -3773,52 +3783,52 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "cumulus-relay-chain-interface" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "futures", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", "sc-client-api", "sc-network", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "cumulus-client-bootnodes", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", - "polkadot-core-primitives 7.0.0", + "polkadot-core-primitives 18.0.0", "polkadot-network-bridge", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "polkadot-service", "sc-authority-discovery", "sc-client-api", @@ -3827,22 +3837,22 @@ dependencies = [ "sc-service", "sc-tracing", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.32.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-babe 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.24.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "either", "futures", @@ -3862,14 +3872,14 @@ dependencies = [ "serde_json", "smoldot 0.11.0", "smoldot-light 0.9.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-version 29.0.0", - "substrate-prometheus-endpoint", + "sp-authority-discovery 37.0.0", + "sp-consensus-babe 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "tokio-util", @@ -3879,29 +3889,29 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-streams" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "cumulus-relay-chain-interface", "futures", "polkadot-node-subsystem", - "polkadot-primitives 7.0.0", - "sp-api 26.0.0", + "polkadot-primitives 19.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", "tracing", ] [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "polkadot-primitives 19.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -4536,41 +4546,43 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "22.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "asset-test-utils", - "bp-messages 0.7.0", + "bp-messages 0.21.0", "bp-xcm-bridge-hub", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "hex-literal", - "pallet-asset-conversion 10.0.0", - "pallet-assets 29.1.0", - "pallet-balances 28.0.0", + "pallet-asset-conversion 23.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", "pallet-bridge-messages", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", + "pallet-message-queue 44.0.0", + "pallet-whitelist 40.0.0", + "pallet-xcm 20.1.0", "pallet-xcm-bridge-hub", - "parachains-common 7.0.0", + "parachains-common 22.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-parachains 20.0.1", "sc-consensus-grandpa", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-core 28.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "sp-authority-discovery 37.0.0", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", "xcm-emulator", - "xcm-runtime-apis 0.1.1", + "xcm-runtime-apis 0.8.0", "xcm-simulator", ] @@ -4779,8 +4791,8 @@ dependencies = [ [[package]] name = "ethereum-standards" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "alloy-core", ] @@ -5064,8 +5076,8 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "fork-tree" -version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "13.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", ] @@ -5106,30 +5118,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" -[[package]] -name = "frame-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-support 28.0.0", - "frame-support-procedural 23.0.0", - "frame-system 28.0.0", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-storage 19.0.0", - "static_assertions", -] - [[package]] name = "frame-benchmarking" version = "38.0.0" @@ -5155,30 +5143,54 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-benchmarking" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-support 41.0.0", + "frame-support-procedural 34.0.0", + "frame-system 41.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "static_assertions", +] + [[package]] name = "frame-benchmarking-cli" -version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "49.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.3", "chrono", "clap", "comfy-table", "cumulus-client-parachain-inherent", - "cumulus-primitives-proof-size-hostfunction 0.2.0", - "frame-benchmarking 28.0.0", + "cumulus-primitives-proof-size-hostfunction 0.13.0", + "frame-benchmarking 41.0.0", "frame-storage-access-test-runtime", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "gethostname", "handlebars", "itertools 0.11.0", "linked-hash-map", "log", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -5186,32 +5198,32 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-client-db", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-wasmtime 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-runtime-utilities", "sc-service", "sc-sysinfo", "serde", "serde_json", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-database", - "sp-externalities 0.25.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-timestamp 26.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "sp-wasm-interface 20.0.0", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", + "sp-transaction-pool 37.0.0", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "subxt", "subxt-signer", "thiserror 1.0.69", @@ -5234,8 +5246,9 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "14.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -5245,9 +5258,8 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "14.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" +version = "16.1.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -5255,23 +5267,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "frame-election-provider-support" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-election-provider-solution-type 13.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", -] - [[package]] name = "frame-election-provider-support" version = "38.0.0" @@ -5290,21 +5285,20 @@ dependencies = [ ] [[package]] -name = "frame-executive" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-election-provider-support" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "aquamarine", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-try-runtime 0.34.0", - "log", + "frame-election-provider-solution-type 16.1.1", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-npos-elections 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5323,7 +5317,25 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "frame-executive" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "aquamarine", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-try-runtime 0.47.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5362,29 +5374,13 @@ dependencies = [ "serde", ] -[[package]] -name = "frame-metadata-hash-extension" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "array-bytes", - "const-hex", - "docify", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", -] - [[package]] name = "frame-metadata-hash-extension" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ac71dbd97039c49fdd69f416a4dd5d8da3652fdcafc3738b45772ad79eb4ec" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "docify", "frame-support 38.2.0", "frame-system 38.0.0", @@ -5395,58 +5391,33 @@ dependencies = [ ] [[package]] -name = "frame-storage-access-test-runtime" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-metadata-hash-extension" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", + "array-bytes 6.2.3", + "const-hex", + "docify", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", - "substrate-wasm-builder 17.0.0", + "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "frame-support" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-storage-access-test-runtime" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "aquamarine", - "array-bytes", - "binary-merkle-tree 13.0.0", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata 23.0.0", - "frame-support-procedural 23.0.0", - "impl-trait-for-tuples", - "k256", - "log", - "macro_magic", + "cumulus-pallet-parachain-system 0.21.0", "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-weights 27.0.0", - "tt-call", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-wasm-builder 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5456,7 +5427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7dd8b9f161a8289e3b9fe6c1068519358dbff2270d38097a923d3d1b4459dca" dependencies = [ "aquamarine", - "array-bytes", + "array-bytes 6.2.3", "bitflags 1.3.2", "docify", "environmental", @@ -5485,59 +5456,101 @@ dependencies = [ "sp-staking 36.0.0", "sp-state-machine 0.43.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-weights 31.1.0", "static_assertions", "tt-call", ] +[[package]] +name = "frame-support" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "aquamarine", + "array-bytes 6.2.3", + "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 23.0.0", + "frame-support-procedural 34.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-metadata-ir 0.11.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "tt-call", +] + [[package]] name = "frame-support-procedural" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "30.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da784d943f2a945be923ab081a7c0837355b38045c50945d7ec1a138e2f3c52" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools 10.0.0", + "frame-support-procedural-tools 13.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.11.0", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural" -version = "30.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da784d943f2a945be923ab081a7c0837355b38045c50945d7ec1a138e2f3c52" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools 13.0.1", + "frame-support-procedural-tools 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "itertools 0.11.0", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural-tools" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "13.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" dependencies = [ - "frame-support-procedural-tools-derive 11.0.0", + "frame-support-procedural-tools-derive 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 3.3.0", "proc-macro2", "quote", @@ -5547,10 +5560,9 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support-procedural-tools-derive 12.0.0", + "frame-support-procedural-tools-derive 12.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "proc-macro-crate 3.3.0", "proc-macro2", "quote", @@ -5559,8 +5571,9 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" dependencies = [ "proc-macro2", "quote", @@ -5570,33 +5583,13 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] -[[package]] -name = "frame-system" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "cfg-if", - "docify", - "frame-support 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", - "sp-weights 27.0.0", -] - [[package]] name = "frame-system" version = "38.0.0" @@ -5619,17 +5612,22 @@ dependencies = [ ] [[package]] -name = "frame-system-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-system" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cfg-if", + "docify", + "frame-support 41.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5648,13 +5646,17 @@ dependencies = [ ] [[package]] -name = "frame-system-rpc-runtime-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-system-benchmarking" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", - "sp-api 26.0.0", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5669,14 +5671,13 @@ dependencies = [ ] [[package]] -name = "frame-try-runtime" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "frame-system-rpc-runtime-api" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", + "docify", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -5691,6 +5692,17 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "frame-try-runtime" +version = "0.47.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-support 41.0.0", + "parity-scale-codec", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -6448,7 +6460,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.9", "tokio", "tower-service", "tracing", @@ -7104,31 +7116,31 @@ dependencies = [ "asset-hub-paseo-runtime", "asset-hub-westend-runtime", "asset-test-utils", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "emulated-integration-tests-common", - "frame-support 28.0.0", - "pallet-assets 29.1.0", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", + "frame-support 41.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", + "pallet-message-queue 44.0.0", + "pallet-xcm 20.1.0", "parity-scale-codec", "paseo-runtime", "paseo-runtime-constants", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-parachains 20.0.1", "pop-runtime-common", "pop-runtime-devnet", "pop-runtime-mainnet", "pop-runtime-testnet", - "sp-authority-discovery 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "sp-authority-discovery 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", "tracing-subscriber", "westend-runtime", "westend-runtime-constants", @@ -7198,7 +7210,7 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "ismp" version = "0.2.2" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "anyhow", "derive_more 1.0.0", @@ -7215,12 +7227,12 @@ dependencies = [ [[package]] name = "ismp-parachain" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "hex-literal", "ismp", "log", @@ -7229,22 +7241,22 @@ dependencies = [ "primitive-types 0.13.1", "scale-info", "serde", - "sp-consensus-aura 0.32.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-consensus-aura 0.43.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "substrate-state-machine", ] [[package]] name = "ismp-parachain-inherent" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "anyhow", "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.19.0", "cumulus-relay-chain-interface", "ismp", "ismp-parachain", @@ -7252,19 +7264,19 @@ dependencies = [ "log", "pallet-ismp-runtime-api", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "ismp-parachain-runtime-api" version = "1.15.1" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "sp-api 26.0.0", + "cumulus-pallet-parachain-system 0.21.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -8547,25 +8559,26 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" dependencies = [ + "foldhash", "hash-db", "hashbrown 0.15.3", ] [[package]] name = "merkleized-metadata" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9b7ac0ce054412d9a85ff39bac27aec27483b06cef8756b57d9c29d448d081" +checksum = "b3e3e3f549d27d2dc054372f320ddf68045a833fab490563ff70d4cf1b9d91ea" dependencies = [ - "array-bytes", + "array-bytes 9.3.0", "blake3", - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "parity-scale-codec", - "scale-decode 0.13.1", + "scale-decode 0.16.0", "scale-info", ] @@ -8635,36 +8648,36 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "46.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "log", "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-beefy 13.0.0", - "sp-core 28.0.0", - "sp-mmr-primitives 26.0.0", - "sp-runtime 31.0.1", + "sp-consensus-beefy 25.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "mmr-rpc" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", - "sp-mmr-primitives 26.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9192,9 +9205,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f6bbacc8c189a3f2e45e0fd0436e5d97f194db888e721bdbc3973e7dbed4c2" +checksum = "19051f0b0512402f5d52d6776999f55996f01887396278aeeccbbdfbc83eef2d" dependencies = [ "async-trait", "dyn-clonable", @@ -9209,9 +9222,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b1d40dd8f367db3c65bec8d3dd47d4a604ee8874480738f93191bddab4e0e0" +checksum = "43dfaf083aef571385fccfdc3a2f8ede8d0a1863160455d4f2b014d8f7d04a3f" dependencies = [ "expander", "indexmap 2.9.0", @@ -9244,40 +9257,22 @@ name = "pallet-api" version = "0.1.0" dependencies = [ "anyhow", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "ismp", "log", - "pallet-assets 29.1.0", - "pallet-balances 28.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", "pallet-ismp", "pallet-nfts 34.1.0", "parity-scale-codec", "pop-chain-extension", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", -] - -[[package]] -name = "pallet-asset-conversion" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", ] [[package]] @@ -9300,36 +9295,39 @@ dependencies = [ ] [[package]] -name = "pallet-asset-conversion-ops" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-conversion" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-asset-conversion 10.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-asset-conversion-tx-payment" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-conversion-ops" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-asset-conversion 10.0.0", - "pallet-transaction-payment 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-asset-conversion 23.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9348,17 +9346,18 @@ dependencies = [ ] [[package]] -name = "pallet-asset-rate" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-conversion-tx-payment" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-asset-conversion 23.0.0", + "pallet-transaction-payment 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9377,37 +9376,35 @@ dependencies = [ ] [[package]] -name = "pallet-asset-rewards" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-rate" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-asset-tx-payment" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-rewards" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-transaction-payment 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9429,21 +9426,19 @@ dependencies = [ ] [[package]] -name = "pallet-assets" -version = "29.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-asset-tx-payment" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "ethereum-standards", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-revive", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-transaction-payment 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "serde", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9464,31 +9459,33 @@ dependencies = [ ] [[package]] -name = "pallet-assets-freezer" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-assets" +version = "43.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "ethereum-standards", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", "log", - "pallet-assets 29.1.0", + "pallet-revive", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-aura" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-assets-freezer" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", "log", - "pallet-timestamp 27.0.0", + "pallet-assets 43.0.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", ] [[package]] @@ -9509,18 +9506,19 @@ dependencies = [ ] [[package]] -name = "pallet-authority-discovery" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-aura" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-timestamp 40.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-authority-discovery 26.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-aura 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9540,16 +9538,18 @@ dependencies = [ ] [[package]] -name = "pallet-authorship" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-authority-discovery" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-session 41.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9567,26 +9567,16 @@ dependencies = [ ] [[package]] -name = "pallet-babe" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-authorship" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9614,24 +9604,26 @@ dependencies = [ ] [[package]] -name = "pallet-bags-list" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-babe" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "aquamarine", - "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-balances 28.0.0", + "pallet-authorship 41.0.0", + "pallet-session 41.0.0", + "pallet-timestamp 40.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-babe 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", ] [[package]] @@ -9653,23 +9645,28 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.2", "sp-runtime 39.0.5", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "pallet-balances" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-bags-list" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "aquamarine", "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", + "pallet-balances 42.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9689,22 +9686,19 @@ dependencies = [ ] [[package]] -name = "pallet-beefy" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-balances" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-consensus-beefy 13.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9728,28 +9722,22 @@ dependencies = [ ] [[package]] -name = "pallet-beefy-mmr" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-beefy" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", - "binary-merkle-tree 13.0.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-beefy 28.0.0", - "pallet-mmr 27.0.0", - "pallet-session 28.0.0", + "pallet-authorship 41.0.0", + "pallet-session 41.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-consensus-beefy 13.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-consensus-beefy 25.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", ] [[package]] @@ -9758,7 +9746,7 @@ version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c64f536e7f04cf3a0a17fdf20870ddb3d63a7690419c40f75cfd2f72b6e6d22" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "binary-merkle-tree 15.0.1", "frame-benchmarking 38.0.0", "frame-support 38.2.0", @@ -9779,20 +9767,28 @@ dependencies = [ ] [[package]] -name = "pallet-bounties" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-beefy-mmr" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "array-bytes 6.2.3", + "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-treasury 27.0.0", + "pallet-beefy 42.0.0", + "pallet-mmr 41.0.0", + "pallet-session 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "serde", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-beefy 25.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9814,40 +9810,39 @@ dependencies = [ ] [[package]] -name = "pallet-bridge-messages" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-bounties" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-header-chain 0.7.0", - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", + "pallet-treasury 40.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-broker" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-bridge-messages" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bitvec", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-header-chain 0.21.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9870,21 +9865,21 @@ dependencies = [ ] [[package]] -name = "pallet-child-bounties" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-broker" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bitvec", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-bounties 27.0.0", - "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9907,22 +9902,21 @@ dependencies = [ ] [[package]] -name = "pallet-collator-selection" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-child-bounties" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-session 28.0.0", + "pallet-bounties 40.0.0", + "pallet-treasury 40.0.0", "parity-scale-codec", - "rand 0.8.5", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -9945,37 +9939,56 @@ dependencies = [ "sp-staking 36.0.0", ] +[[package]] +name = "pallet-collator-selection" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-session 41.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", +] + [[package]] name = "pallet-collective" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "pallet-contracts" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 28.0.0", + "pallet-balances 42.0.0", "pallet-contracts-proc-macro", - "pallet-contracts-uapi 5.0.0", + "pallet-contracts-uapi 14.0.0", "parity-scale-codec", "paste", "rand 0.8.5", @@ -9983,37 +9996,26 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", "wasm-instrument", "wasmi 0.32.3", ] [[package]] name = "pallet-contracts-proc-macro" -version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "23.0.3" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] -[[package]] -name = "pallet-contracts-uapi" -version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bitflags 1.3.2", - "parity-scale-codec", - "paste", - "scale-info", -] - [[package]] name = "pallet-contracts-uapi" version = "9.0.0" @@ -10026,19 +10028,14 @@ dependencies = [ ] [[package]] -name = "pallet-conviction-voting" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-contracts-uapi" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bitflags 1.3.2", "parity-scale-codec", + "paste", "scale-info", - "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", ] [[package]] @@ -10059,18 +10056,19 @@ dependencies = [ ] [[package]] -name = "pallet-delegated-staking" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-conviction-voting" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "assert_matches", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "serde", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10090,41 +10088,35 @@ dependencies = [ ] [[package]] -name = "pallet-democracy" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-delegated-staking" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] -name = "pallet-election-provider-multi-phase" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-democracy" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", "parity-scale-codec", - "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "strum 0.26.3", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10151,16 +10143,24 @@ dependencies = [ ] [[package]] -name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-election-provider-multi-phase" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "rand 0.8.5", + "scale-info", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-npos-elections 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "strum 0.26.3", ] [[package]] @@ -10178,39 +10178,34 @@ dependencies = [ ] [[package]] -name = "pallet-elections-phragmen" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-election-provider-support-benchmarking" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-npos-elections 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-fast-unstake" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-elections-phragmen" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-npos-elections 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10233,25 +10228,21 @@ dependencies = [ ] [[package]] -name = "pallet-grandpa" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-fast-unstake" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "docify", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10278,19 +10269,25 @@ dependencies = [ ] [[package]] -name = "pallet-identity" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-grandpa" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", + "pallet-authorship 41.0.0", + "pallet-session 41.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", ] [[package]] @@ -10311,22 +10308,19 @@ dependencies = [ ] [[package]] -name = "pallet-im-online" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-identity" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "enumflags2", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10350,18 +10344,22 @@ dependencies = [ ] [[package]] -name = "pallet-indices" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-im-online" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-authorship 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10381,36 +10379,51 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "pallet-indices" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "pallet-ismp" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "anyhow", "fortuples", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "ismp", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-mmr-primitives 26.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "pallet-ismp-rpc" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "anyhow", - "frame-system 28.0.0", + "frame-system 41.0.0", "hash-db", "hex", "hex-literal", @@ -10423,13 +10436,13 @@ dependencies = [ "sc-rpc", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", - "sp-mmr-primitives 26.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tower", "trie-db 0.30.0", ] @@ -10437,34 +10450,15 @@ dependencies = [ [[package]] name = "pallet-ismp-runtime-api" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "ismp", "pallet-ismp", "parity-scale-codec", "primitive-types 0.13.1", "serde", - "sp-api 26.0.0", - "sp-mmr-primitives 26.0.0", -] - -[[package]] -name = "pallet-message-queue" -version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", ] [[package]] @@ -10488,52 +10482,59 @@ dependencies = [ ] [[package]] -name = "pallet-meta-tx" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-message-queue" +version = "44.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "environmental", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-migrations" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-meta-tx" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-mmr" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-migrations" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", "log", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", - "sp-mmr-primitives 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10555,31 +10556,32 @@ dependencies = [ ] [[package]] -name = "pallet-motion" -version = "4.0.0-dev" +name = "pallet-mmr" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", "log", - "pallet-balances 28.0.0", - "pallet-collective", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-mmr-primitives 37.0.0", ] [[package]] -name = "pallet-multisig" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-motion" +version = "4.0.0-dev" dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", + "pallet-balances 42.0.0", + "pallet-collective", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10599,33 +10601,27 @@ dependencies = [ ] [[package]] -name = "pallet-nft-fractionalization" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-multisig" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", - "pallet-assets 29.1.0", - "pallet-nfts 22.0.0", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", ] [[package]] -name = "pallet-nfts" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nft-fractionalization" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", "log", + "pallet-assets 43.0.0", + "pallet-nfts 35.0.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", ] [[package]] @@ -10651,26 +10647,34 @@ name = "pallet-nfts" version = "34.1.0" dependencies = [ "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-balances 28.0.0", + "pallet-balances 42.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-nfts-runtime-api" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nfts" +version = "35.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "enumflags2", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", - "sp-api 26.0.0", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10685,31 +10689,22 @@ dependencies = [ ] [[package]] -name = "pallet-nis" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nfts-runtime-api" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "polkadot-sdk-frame", - "scale-info", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-nomination-pools" -version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nis" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-balances 28.0.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-tracing 16.0.0", ] [[package]] @@ -10728,27 +10723,25 @@ dependencies = [ "sp-io 38.0.2", "sp-runtime 39.0.5", "sp-staking 36.0.0", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "pallet-nomination-pools-benchmarking" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nomination-pools" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-bags-list 27.0.0", - "pallet-delegated-staking 1.0.0", - "pallet-nomination-pools 25.0.0", - "pallet-staking 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-balances 42.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-staking 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10773,13 +10766,23 @@ dependencies = [ ] [[package]] -name = "pallet-nomination-pools-runtime-api" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nomination-pools-benchmarking" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "pallet-nomination-pools 25.0.0", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-bags-list 40.0.0", + "pallet-delegated-staking 8.0.0", + "pallet-nomination-pools 39.0.0", + "pallet-staking 41.0.0", "parity-scale-codec", - "sp-api 26.0.0", + "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10794,18 +10797,13 @@ dependencies = [ ] [[package]] -name = "pallet-offences" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-nomination-pools-runtime-api" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "pallet-nomination-pools 39.0.0", "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10826,26 +10824,18 @@ dependencies = [ ] [[package]] -name = "pallet-offences-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-offences" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-grandpa 28.0.0", - "pallet-im-online 27.0.0", - "pallet-offences 27.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "serde", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10873,20 +10863,26 @@ dependencies = [ ] [[package]] -name = "pallet-parameters" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-offences-benchmarking" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-babe 41.0.0", + "pallet-balances 42.0.0", + "pallet-grandpa 41.0.0", + "pallet-im-online 40.0.0", + "pallet-offences 40.0.0", + "pallet-session 41.0.0", + "pallet-staking 41.0.0", "parity-scale-codec", - "paste", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -10908,19 +10904,20 @@ dependencies = [ ] [[package]] -name = "pallet-preimage" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-parameters" +version = "0.12.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", + "paste", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10941,13 +10938,19 @@ dependencies = [ ] [[package]] -name = "pallet-proxy" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-preimage" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -10966,49 +10969,41 @@ dependencies = [ ] [[package]] -name = "pallet-ranked-collective" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-proxy" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", ] [[package]] -name = "pallet-recovery" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-ranked-collective" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", + "log", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-referenda" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-recovery" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "serde", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", ] [[package]] @@ -11030,6 +11025,24 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "pallet-referenda" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "assert_matches", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "pallet-remote-proxy" version = "1.0.0" @@ -11050,17 +11063,17 @@ dependencies = [ [[package]] name = "pallet-revive" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "alloy-core", "derive_more 0.99.20", "environmental", "ethereum-standards", "ethereum-types 0.15.1", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "hex-literal", "humantime-serde", "impl-trait-for-tuples", @@ -11071,7 +11084,7 @@ dependencies = [ "pallet-revive-fixtures", "pallet-revive-proc-macro", "pallet-revive-uapi", - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment 41.0.0", "parity-scale-codec", "paste", "polkavm 0.21.0", @@ -11082,38 +11095,36 @@ dependencies = [ "rlp 0.6.1", "scale-info", "serde", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-consensus-aura 0.32.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-aura 0.43.0", + "sp-consensus-babe 0.43.0", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "substrate-bn", "subxt-signer", ] [[package]] name = "pallet-revive-fixtures" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "anyhow", "cargo_metadata 0.15.4", "pallet-revive-uapi", "polkavm-linker 0.21.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "toml 0.8.22", ] [[package]] name = "pallet-revive-proc-macro" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", @@ -11122,8 +11133,8 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.5.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", @@ -11134,32 +11145,15 @@ dependencies = [ [[package]] name = "pallet-root-testing" -version = "4.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", -] - -[[package]] -name = "pallet-scheduler" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11181,24 +11175,20 @@ dependencies = [ ] [[package]] -name = "pallet-session" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-scheduler" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11224,19 +11214,24 @@ dependencies = [ ] [[package]] -name = "pallet-session-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-session" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", + "log", + "pallet-timestamp 40.0.0", "parity-scale-codec", - "rand 0.8.5", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "scale-info", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11257,42 +11252,36 @@ dependencies = [ ] [[package]] -name = "pallet-society" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-session-benchmarking" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-session 41.0.0", + "pallet-staking 41.0.0", "parity-scale-codec", - "rand_chacha 0.3.1", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "rand 0.8.5", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", ] [[package]] -name = "pallet-staking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-society" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", - "serde", - "sp-application-crypto 30.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11318,40 +11307,62 @@ dependencies = [ "sp-staking 36.0.0", ] +[[package]] +name = "pallet-staking" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-authorship 41.0.0", + "pallet-session 41.0.0", + "parity-scale-codec", + "rand_chacha 0.3.1", + "scale-info", + "serde", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", +] + [[package]] name = "pallet-staking-async-ah-client" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship 41.0.0", + "pallet-session 41.0.0", "pallet-staking-async-rc-client", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] name = "pallet-staking-async-rc-client" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "staging-xcm 7.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", + "staging-xcm 17.0.0", ] [[package]] @@ -11366,15 +11377,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "pallet-staking-reward-fn" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "log", - "sp-arithmetic 23.0.0", -] - [[package]] name = "pallet-staking-reward-fn" version = "22.0.1" @@ -11386,13 +11388,12 @@ dependencies = [ ] [[package]] -name = "pallet-staking-runtime-api" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-staking-reward-fn" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "parity-scale-codec", - "sp-api 26.0.0", - "sp-staking 26.0.0", + "log", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11407,19 +11408,13 @@ dependencies = [ ] [[package]] -name = "pallet-state-trie-migration" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-staking-runtime-api" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -11440,18 +11435,19 @@ dependencies = [ ] [[package]] -name = "pallet-sudo" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-state-trie-migration" +version = "46.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11471,21 +11467,18 @@ dependencies = [ ] [[package]] -name = "pallet-timestamp" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-sudo" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", - "sp-timestamp 26.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11509,36 +11502,39 @@ dependencies = [ ] [[package]] -name = "pallet-tips" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-timestamp" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", ] [[package]] -name = "pallet-transaction-payment" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-tips" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-treasury 40.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11558,31 +11554,34 @@ dependencies = [ ] [[package]] -name = "pallet-transaction-payment-rpc" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-transaction-payment" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "jsonrpsee", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", - "sp-api 26.0.0", - "sp-blockchain", - "sp-core 28.0.0", - "sp-rpc", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "scale-info", + "serde", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-transaction-payment-rpc" +version = "44.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "pallet-transaction-payment 28.0.0", + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-blockchain", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-rpc", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11599,22 +11598,15 @@ dependencies = [ ] [[package]] -name = "pallet-treasury" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-transaction-payment-rpc-runtime-api" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-balances 28.0.0", + "pallet-transaction-payment 41.0.0", "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11637,17 +11629,22 @@ dependencies = [ ] [[package]] -name = "pallet-uniques" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-treasury" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "docify", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", "log", + "pallet-balances 42.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11666,18 +11663,17 @@ dependencies = [ ] [[package]] -name = "pallet-utility" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-uniques" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11697,32 +11693,33 @@ dependencies = [ ] [[package]] -name = "pallet-verify-signature" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-utility" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] -name = "pallet-vesting" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-verify-signature" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11741,13 +11738,17 @@ dependencies = [ ] [[package]] -name = "pallet-whitelist" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-vesting" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", "parity-scale-codec", - "polkadot-sdk-frame", "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -11766,26 +11767,13 @@ dependencies = [ ] [[package]] -name = "pallet-xcm" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-whitelist" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bounded-collections", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-balances 28.0.0", "parity-scale-codec", + "polkadot-sdk-frame", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "tracing", - "xcm-runtime-apis 0.1.1", ] [[package]] @@ -11814,20 +11802,29 @@ dependencies = [ ] [[package]] -name = "pallet-xcm-benchmarks" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-xcm" +version = "20.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bounded-collections", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "hex-literal", + "pallet-balances 42.0.0", + "pallet-revive", + "pallet-timestamp 40.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "tracing", + "xcm-runtime-apis 0.8.0", ] [[package]] @@ -11849,45 +11846,42 @@ dependencies = [ ] [[package]] -name = "pallet-xcm-bridge-hub" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-xcm-benchmarks" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-messages 0.7.0", - "bp-runtime 0.7.0", - "bp-xcm-bridge-hub", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-bridge-messages", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] -name = "pallet-xcm-bridge-hub-router" -version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-xcm-bridge-hub" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-messages 0.21.0", + "bp-runtime 0.21.0", + "bp-xcm-bridge-hub", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", + "pallet-bridge-messages", "parity-scale-codec", - "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] @@ -11911,32 +11905,23 @@ dependencies = [ ] [[package]] -name = "parachains-common" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "pallet-xcm-bridge-hub-router" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router 0.18.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.1.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 20.0.1", "scale-info", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", ] [[package]] @@ -11970,35 +11955,64 @@ dependencies = [ "substrate-wasm-builder 24.0.2", ] +[[package]] +name = "parachains-common" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-utility 0.21.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "log", + "pallet-asset-tx-payment 41.0.0", + "pallet-assets 43.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", + "pallet-message-queue 44.0.0", + "pallet-xcm 20.1.0", + "parity-scale-codec", + "polkadot-primitives 19.0.0", + "scale-info", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", +] + [[package]] name = "parachains-runtimes-test-utils" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-parachain-inherent 0.19.0", "cumulus-test-relay-sproof-builder", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", - "xcm-runtime-apis 0.1.1", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", + "pallet-session 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-xcm 20.1.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", + "xcm-runtime-apis 0.8.0", ] [[package]] @@ -12462,8 +12476,8 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polkadot-approval-distribution" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "futures-timer", @@ -12473,30 +12487,30 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fatality", "futures", @@ -12506,20 +12520,20 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "sc-network", "schnellru", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "fatality", @@ -12530,7 +12544,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "sc-network", "schnellru", @@ -12561,8 +12575,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "clap", "frame-benchmarking-cli", @@ -12576,17 +12590,17 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 28.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", - "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-build-script-utils 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "polkadot-collator-protocol" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "fatality", @@ -12596,11 +12610,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "schnellru", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio-util", "tracing-gum", @@ -12608,31 +12622,31 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2900d3b857e34c480101618a950c3a4fbcddc8c0d50573d48553376185908b8" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 34.0.0", + "sp-runtime 39.0.5", ] [[package]] name = "polkadot-core-primitives" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2900d3b857e34c480101618a950c3a4fbcddc8c0d50573d48553376185908b8" +version = "18.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 34.0.0", - "sp-runtime 39.0.5", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "polkadot-dispute-distribution" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fatality", "futures", @@ -12643,53 +12657,53 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-network", - "sp-application-crypto 30.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "reed-solomon-novelpoly", - "sp-core 28.0.0", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "polkadot-gossip-support" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "always-assert", "async-trait", @@ -12702,7 +12716,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-network", "sp-consensus", "thiserror 1.0.69", @@ -12711,8 +12725,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "parity-scale-codec", @@ -12720,17 +12734,17 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "schnellru", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "bitvec", @@ -12744,25 +12758,25 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-consensus-slots 0.32.0", - "sp-runtime 31.0.1", + "sp-consensus-slots 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting-parallel" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -12775,7 +12789,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "rand_core 0.6.4", "sc-keystore", @@ -12785,8 +12799,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "futures", @@ -12796,7 +12810,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sp-consensus", "thiserror 1.0.69", "tracing-gum", @@ -12804,8 +12818,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "fatality", @@ -12814,25 +12828,25 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "polkadot-statement-table", "schnellru", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", - "sp-keystore 0.34.0", + "polkadot-primitives 19.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", "wasm-timer", @@ -12840,8 +12854,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -12853,17 +12867,17 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "sp-application-crypto 30.0.0", - "sp-keystore 0.34.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-api" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "polkadot-node-metrics", @@ -12876,8 +12890,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "futures-timer", @@ -12885,15 +12899,15 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fatality", "futures", @@ -12901,7 +12915,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-keystore", "schnellru", "thiserror 1.0.69", @@ -12910,39 +12924,39 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sp-blockchain", - "sp-inherents 26.0.0", + "sp-inherents 37.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-prospective-parachains" -version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fatality", "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "fatality", @@ -12951,18 +12965,18 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "always-assert", - "array-bytes", + "array-bytes 6.2.3", "futures", "futures-timer", "parity-scale-codec", @@ -12971,12 +12985,12 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "sc-tracing", "slotmap", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "strum 0.26.3", "tempfile", "thiserror 1.0.69", @@ -12986,21 +13000,21 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", - "sp-keystore 0.34.0", + "polkadot-primitives 19.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-common" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "cpu-time", "futures", @@ -13008,57 +13022,57 @@ dependencies = [ "libc", "nix 0.29.0", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-wasmtime 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "seccompiler", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "schnellru", - "sp-consensus-babe 0.32.0", + "sp-consensus-babe 0.43.0", "tracing-gum", ] [[package]] name = "polkadot-node-metrics" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bs58", "futures", "futures-timer", "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "prioritized-metered-channel", "sc-cli", "sc-service", "sc-tracing", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "polkadot-node-network-protocol" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -13069,12 +13083,12 @@ dependencies = [ "hex", "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "rand 0.8.5", "sc-authority-discovery", "sc-network", "sc-network-types", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "strum 0.26.3", "thiserror 1.0.69", "tracing-gum", @@ -13082,32 +13096,32 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "bounded-vec", "futures", "futures-timer", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "sc-keystore", "schnorrkel 0.11.4", "serde", - "sp-application-crypto 30.0.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-slots 0.32.0", - "sp-keystore 0.34.0", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-babe 0.43.0", + "sp-consensus-slots 0.43.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "polkadot-node-subsystem-types", "polkadot-overseer", @@ -13115,8 +13129,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "derive_more 0.99.20", @@ -13125,26 +13139,26 @@ dependencies = [ "orchestra", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "polkadot-statement-table", "sc-client-api", "sc-network", "sc-network-types", "sc-transaction-pool-api", "smallvec", - "sp-api 26.0.0", - "sp-authority-discovery 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", "sp-blockchain", - "sp-consensus-babe 0.32.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-babe 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "polkadot-node-subsystem-util" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fatality", "futures", @@ -13160,21 +13174,22 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "prioritized-metered-channel", "rand 0.8.5", + "sc-keystore", "schnellru", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-overseer" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -13184,39 +13199,23 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-client-api", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain-primitives" -version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5648a2e8ce1f9a0f8c41c38def670cefd91932cd793468e1a5b0b0b4e4af1" dependencies = [ "bounded-collections", "derive_more 0.99.20", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b5648a2e8ce1f9a0f8c41c38def670cefd91932cd793468e1a5b0b0b4e4af1" -dependencies = [ - "bounded-collections", - "derive_more 0.99.20", - "parity-scale-codec", - "polkadot-core-primitives 15.0.0", + "polkadot-core-primitives 15.0.0", "scale-info", "serde", "sp-core 34.0.0", @@ -13225,32 +13224,19 @@ dependencies = [ ] [[package]] -name = "polkadot-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "polkadot-parachain-primitives" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bitvec", "bounded-collections", - "hex-literal", - "log", + "derive_more 0.99.20", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", + "polkadot-core-primitives 18.0.0", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "thiserror 1.0.69", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -13307,15 +13293,44 @@ dependencies = [ "sp-staking 36.0.0", ] +[[package]] +name = "polkadot-primitives" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bitvec", + "bounded-collections", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-core-primitives 18.0.0", + "polkadot-parachain-primitives 17.0.0", + "scale-info", + "serde", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", +] + [[package]] name = "polkadot-rpc" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -13327,69 +13342,19 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] -[[package]] -name = "polkadot-runtime-common" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "libsecp256k1", - "log", - "pallet-asset-rate 7.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-broker 0.6.0", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-fast-unstake 27.0.0", - "pallet-identity 29.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-staking-reward-fn 19.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-vesting 28.0.0", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "rustc-hex", - "scale-info", - "serde", - "slot-range-helper 7.0.0", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "static_assertions", -] - [[package]] name = "polkadot-runtime-common" version = "17.0.1" @@ -13441,6 +13406,56 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-common" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bitvec", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 20.0.0", + "pallet-authorship 41.0.0", + "pallet-babe 41.0.0", + "pallet-balances 42.0.0", + "pallet-broker 0.20.0", + "pallet-election-provider-multi-phase 40.0.0", + "pallet-fast-unstake 40.0.0", + "pallet-identity 41.0.0", + "pallet-session 41.0.0", + "pallet-staking 41.0.0", + "pallet-staking-reward-fn 23.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-treasury 40.0.0", + "pallet-vesting 41.0.0", + "parity-scale-codec", + "polkadot-primitives 19.0.0", + "polkadot-runtime-parachains 20.0.1", + "rustc-hex", + "scale-info", + "serde", + "slot-range-helper 18.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-npos-elections 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "static_assertions", +] + [[package]] name = "polkadot-runtime-constants" version = "1.0.0" @@ -13460,18 +13475,6 @@ dependencies = [ "staging-xcm-builder 17.0.5", ] -[[package]] -name = "polkadot-runtime-metrics" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bs58", - "frame-benchmarking 28.0.0", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "sp-tracing 16.0.0", -] - [[package]] name = "polkadot-runtime-metrics" version = "17.0.0" @@ -13482,55 +13485,19 @@ dependencies = [ "frame-benchmarking 38.0.0", "parity-scale-codec", "polkadot-primitives 16.0.0", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "polkadot-runtime-parachains" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "polkadot-runtime-metrics" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bitflags 1.3.2", - "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-broker 0.6.0", - "pallet-message-queue 31.0.0", - "pallet-mmr 27.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-metrics 7.0.0", - "rand 0.8.5", - "rand_chacha 0.3.1", - "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", - "static_assertions", + "bs58", + "frame-benchmarking 41.0.0", + "parity-scale-codec", + "polkadot-primitives 19.0.0", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -13583,59 +13550,107 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-parachains" +version = "20.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 41.0.0", + "pallet-authorship 41.0.0", + "pallet-babe 41.0.0", + "pallet-balances 42.0.0", + "pallet-broker 0.20.0", + "pallet-message-queue 44.0.0", + "pallet-mmr 41.0.0", + "pallet-session 41.0.0", + "pallet-staking 41.0.0", + "pallet-timestamp 40.0.0", + "parity-scale-codec", + "polkadot-core-primitives 18.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-metrics 21.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "scale-info", + "serde", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", + "static_assertions", +] + [[package]] name = "polkadot-sdk-frame" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "polkadot-service" -version = "7.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", - "frame-benchmarking 28.0.0", + "frame-benchmarking 41.0.0", "frame-benchmarking-cli", - "frame-system 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", + "frame-system 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", "futures", "is_executable", "kvdb", "kvdb-rocksdb", "log", "mmr-gadget", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", "parity-db", "parity-scale-codec", "parking_lot 0.12.3", @@ -13644,7 +13659,7 @@ dependencies = [ "polkadot-availability-distribution", "polkadot-availability-recovery", "polkadot-collator-protocol", - "polkadot-core-primitives 7.0.0", + "polkadot-core-primitives 18.0.0", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -13670,9 +13685,9 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "polkadot-rpc", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-parachains 20.0.1", "polkadot-statement-distribution", "rococo-runtime", "sc-authority-discovery", @@ -13684,7 +13699,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-grandpa", "sc-consensus-slots", - "sc-executor 0.32.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-keystore", "sc-network", "sc-network-sync", @@ -13697,39 +13712,39 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 26.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", + "sp-block-builder 37.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-mmr-primitives 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-timestamp 26.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-mmr-primitives 37.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-timestamp 37.0.0", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", "westend-runtime", - "xcm-runtime-apis 0.1.1", + "xcm-runtime-apis 0.8.0", ] [[package]] name = "polkadot-statement-distribution" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", "fatality", @@ -13740,35 +13755,22 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 7.0.0", - "sp-keystore 0.34.0", + "polkadot-primitives 19.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "tracing-gum", ] -[[package]] -name = "polkavm" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd044ab1d3b11567ab6b98ca71259a992b4034220d5972988a0e96518e5d343d" -dependencies = [ - "libc", - "log", - "polkavm-assembler 0.18.0", - "polkavm-common 0.18.0", - "polkavm-linux-raw 0.18.0", -] - [[package]] name = "polkavm" version = "0.21.0" @@ -13795,15 +13797,6 @@ dependencies = [ "polkavm-linux-raw 0.24.0", ] -[[package]] -name = "polkavm-assembler" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaad38dc420bfed79e6f731471c973ce5ff5e47ab403e63cf40358fef8a6368f" -dependencies = [ - "log", -] - [[package]] name = "polkavm-assembler" version = "0.21.0" @@ -13833,10 +13826,6 @@ name = "polkavm-common" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" -dependencies = [ - "log", - "polkavm-assembler 0.18.0", -] [[package]] name = "polkavm-common" @@ -13998,22 +13987,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "polkavm-linker" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9bfe793b094d9ea5c99b7c43ba46e277b0f8f48f4bbfdbabf8d3ebf701a4bd3" -dependencies = [ - "dirs", - "gimli 0.31.1", - "hashbrown 0.14.5", - "log", - "object 0.36.7", - "polkavm-common 0.18.0", - "regalloc2 0.9.3", - "rustc-demangle", -] - [[package]] name = "polkavm-linker" version = "0.21.0" @@ -14046,12 +14019,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "polkavm-linux-raw" -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" @@ -14135,26 +14102,26 @@ version = "0.1.0" dependencies = [ "contract-build", "env_logger 0.11.8", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "ismp", "log", "pallet-api", - "pallet-assets 29.1.0", - "pallet-balances 28.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", "pallet-contracts", "pallet-ismp", "pallet-nfts 34.1.0", - "pallet-xcm 7.0.0", + "pallet-xcm 20.1.0", "parity-scale-codec", "pop-api", "pop-primitives", "pop-runtime-devnet", "pop-runtime-testnet", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] @@ -14163,19 +14130,19 @@ version = "0.1.0" dependencies = [ "contract-build", "env_logger 0.11.8", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 28.0.0", + "pallet-balances 42.0.0", "pallet-contracts", - "pallet-timestamp 27.0.0", + "pallet-timestamp 40.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -14190,12 +14157,12 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", "cumulus-client-service", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-parachain-inherent 0.19.0", "cumulus-relay-chain-interface", "docify", - "frame-benchmarking 28.0.0", + "frame-benchmarking 41.0.0", "frame-benchmarking-cli", "futures", "ismp-parachain", @@ -14205,11 +14172,11 @@ dependencies = [ "log", "pallet-ismp-rpc", "pallet-ismp-runtime-api", - "pallet-multisig 28.0.0", + "pallet-multisig 41.0.0", "pallet-transaction-payment-rpc", "parity-scale-codec", "polkadot-cli", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "pop-runtime-common", "pop-runtime-devnet", "pop-runtime-mainnet", @@ -14219,7 +14186,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-network", "sc-network-sync", "sc-offchain", @@ -14232,24 +14199,24 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-keystore 0.34.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-timestamp 26.0.0", - "sp-transaction-pool 26.0.0", - "staging-xcm 7.0.1", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-timestamp 37.0.0", + "sp-transaction-pool 37.0.0", + "staging-xcm 17.0.0", "substrate-build-script-utils 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-frame-rpc-system", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -14265,47 +14232,47 @@ dependencies = [ name = "pop-runtime-common" version = "0.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.21.0", + "cumulus-pallet-parachain-system 0.21.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcmp-queue 0.7.1", + "cumulus-pallet-xcmp-queue 0.21.0", "docify", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-assets 29.1.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-assets 43.0.0", + "pallet-aura 40.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", "pallet-collective", - "pallet-message-queue 31.0.0", + "pallet-message-queue 44.0.0", "pallet-migrations", "pallet-motion", - "pallet-multisig 28.0.0", - "pallet-nfts 22.0.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-multisig 41.0.0", + "pallet-nfts 35.0.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-revive", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-treasury 40.0.0", + "pallet-utility 41.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-benchmarks 21.0.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", "scale-info", "serde_json", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "sp-keyring 42.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] @@ -14313,26 +14280,26 @@ name = "pop-runtime-devnet" version = "0.1.0" dependencies = [ "anyhow", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-session-benchmarking 9.0.0", + "cumulus-pallet-aura-ext 0.21.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-session-benchmarking 22.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.0", + "cumulus-pallet-xcm 0.20.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-utility 0.21.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex", "hex-literal", "ismp", @@ -14340,138 +14307,138 @@ dependencies = [ "ismp-parachain-runtime-api", "log", "pallet-api", - "pallet-assets 29.1.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", + "pallet-assets 43.0.0", + "pallet-aura 40.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", "pallet-contracts", "pallet-ismp", "pallet-ismp-runtime-api", - "pallet-message-queue 31.0.0", - "pallet-multisig 28.0.0", + "pallet-message-queue 44.0.0", + "pallet-multisig 41.0.0", "pallet-nft-fractionalization", "pallet-nfts 34.1.0", - "pallet-nfts-runtime-api 14.0.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-nfts-runtime-api 27.0.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-revive", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-utility 41.0.0", + "pallet-xcm 20.1.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-runtime-common 20.0.0", "pop-chain-extension", "pop-primitives", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-mmr-primitives 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 26.0.1", - "xcm-runtime-apis 0.1.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xcm-runtime-apis 0.8.0", ] [[package]] name = "pop-runtime-mainnet" version = "0.1.0" dependencies = [ - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-session-benchmarking 9.0.0", + "cumulus-pallet-aura-ext 0.21.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-session-benchmarking 22.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.0", + "cumulus-pallet-xcm 0.20.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-utility 0.21.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", "frame-metadata 23.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex", "log", - "pallet-assets 29.1.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", + "pallet-assets 43.0.0", + "pallet-aura 40.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", "pallet-collective", - "pallet-message-queue 31.0.0", + "pallet-message-queue 44.0.0", "pallet-motion", - "pallet-multisig 28.0.0", - "pallet-nfts 22.0.0", - "pallet-nfts-runtime-api 14.0.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-multisig 41.0.0", + "pallet-nfts 35.0.0", + "pallet-nfts-runtime-api 27.0.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-revive", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-treasury 40.0.0", + "pallet-utility 41.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-benchmarks 21.0.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-runtime-common 20.0.0", + "polkadot-runtime-parachains 20.0.1", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 26.0.1", - "xcm-runtime-apis 0.1.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xcm-runtime-apis 0.8.0", ] [[package]] @@ -14479,27 +14446,27 @@ name = "pop-runtime-testnet" version = "0.5.4" dependencies = [ "anyhow", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-session-benchmarking 9.0.0", + "cumulus-pallet-aura-ext 0.21.0", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-pallet-session-benchmarking 22.0.0", "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.1", - "cumulus-primitives-aura 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.0", + "cumulus-pallet-xcm 0.20.0", + "cumulus-pallet-xcmp-queue 0.21.0", + "cumulus-primitives-aura 0.18.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-utility 0.21.0", "docify", "enumflags2", "env_logger 0.11.8", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", "frame-metadata 23.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex", "hex-literal", "ismp", @@ -14507,62 +14474,62 @@ dependencies = [ "ismp-parachain-runtime-api", "log", "pallet-api", - "pallet-assets 29.1.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", + "pallet-assets 43.0.0", + "pallet-aura 40.0.0", + "pallet-authorship 41.0.0", + "pallet-balances 42.0.0", + "pallet-collator-selection 22.0.0", "pallet-collective", "pallet-contracts", "pallet-ismp", "pallet-ismp-runtime-api", - "pallet-message-queue 31.0.0", + "pallet-message-queue 44.0.0", "pallet-migrations", "pallet-motion", - "pallet-multisig 28.0.0", + "pallet-multisig 41.0.0", "pallet-nft-fractionalization", - "pallet-nfts 22.0.0", - "pallet-nfts-runtime-api 14.0.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-nfts 35.0.0", + "pallet-nfts-runtime-api 27.0.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-revive", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-treasury 40.0.0", + "pallet-utility 41.0.0", + "pallet-xcm 20.1.0", + "parachains-common 22.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-runtime-common 20.0.0", "pop-chain-extension", "pop-primitives", "pop-runtime-common", "scale-info", "smallvec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-mmr-primitives 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 26.0.1", - "xcm-runtime-apis 0.1.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", + "sp-consensus-aura 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xcm-runtime-apis 0.8.0", ] [[package]] @@ -14854,7 +14821,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "itertools 0.14.0", "log", "multimap", @@ -15403,116 +15370,116 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "binary-merkle-tree 13.0.0", + "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "bitvec", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-benchmarking 41.0.0", + "frame-executive 41.0.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex-literal", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-beefy 28.0.0", - "pallet-beefy-mmr 28.0.0", - "pallet-bounties 27.0.0", - "pallet-child-bounties 27.0.0", - "pallet-conviction-voting 28.0.0", + "pallet-asset-rate 20.0.0", + "pallet-authority-discovery 41.0.0", + "pallet-authorship 41.0.0", + "pallet-babe 41.0.0", + "pallet-balances 42.0.0", + "pallet-beefy 42.0.0", + "pallet-beefy-mmr 42.0.0", + "pallet-bounties 40.0.0", + "pallet-child-bounties 40.0.0", + "pallet-conviction-voting 41.0.0", "pallet-democracy", "pallet-elections-phragmen", - "pallet-grandpa 28.0.0", - "pallet-identity 29.0.0", - "pallet-indices 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-grandpa 41.0.0", + "pallet-identity 41.0.0", + "pallet-indices 41.0.0", + "pallet-message-queue 44.0.0", "pallet-migrations", - "pallet-mmr 27.0.0", - "pallet-multisig 28.0.0", + "pallet-mmr 41.0.0", + "pallet-multisig 41.0.0", "pallet-nis", - "pallet-offences 27.0.0", - "pallet-parameters 0.1.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-offences 40.0.0", + "pallet-parameters 0.12.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-ranked-collective", "pallet-recovery", - "pallet-referenda 28.0.0", + "pallet-referenda 41.0.0", "pallet-root-testing", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", "pallet-society", - "pallet-staking 28.0.0", - "pallet-state-trie-migration 29.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", + "pallet-staking 41.0.0", + "pallet-state-trie-migration 46.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", "pallet-tips", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", - "pallet-whitelist 27.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-treasury 40.0.0", + "pallet-utility 41.0.0", + "pallet-vesting 41.0.0", + "pallet-whitelist 40.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-benchmarks 21.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-common 20.0.0", + "polkadot-runtime-parachains 20.0.1", "rococo-runtime-constants", "scale-info", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-mmr-primitives 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 17.0.0", - "xcm-runtime-apis 0.1.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", + "sp-block-builder 37.0.0", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-mmr-primitives 37.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "xcm-runtime-apis 0.8.0", ] [[package]] name = "rococo-runtime-constants" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 41.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-common 20.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", ] [[package]] @@ -15868,31 +15835,31 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60c540da7cc7f00e85905921952da7bf25b9f824a586be2543f7db7bf7f7d4b2" dependencies = [ "log", - "sp-core 28.0.0", - "sp-wasm-interface 20.0.0", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", ] [[package]] name = "sc-allocator" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c10a9966875fcbde028c73697c6d5faad5f5d24e94b3c949fb1d063c727381d" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", - "sp-core 36.1.0", - "sp-wasm-interface 21.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-authority-discovery" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -15907,20 +15874,23 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-types", - "sp-api 26.0.0", - "sp-authority-discovery 26.0.0", + "serde", + "serde_json", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", "sp-blockchain", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", + "tokio", ] [[package]] name = "sc-basic-authorship" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "log", @@ -15929,60 +15899,60 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-block-builder" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-chain-spec" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "44.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "docify", "memmap2 0.9.5", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", - "sc-executor 0.32.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-network", "sc-telemetry", "serde", "serde_json", "sp-blockchain", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-genesis-builder 0.8.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-chain-spec-derive" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -15992,10 +15962,10 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.53.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "chrono", "clap", "fdlimit", @@ -16022,46 +15992,46 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 28.0.0", - "sp-keyring 31.0.0", - "sp-keystore 0.34.0", - "sp-panic-handler 13.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", ] [[package]] name = "sc-client-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor 0.32.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-transaction-pool-api", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-database", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-trie 29.0.0", - "substrate-prometheus-endpoint", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-client-db" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.47.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hash-db", "kvdb", @@ -16075,21 +16045,21 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-database", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", - "substrate-prometheus-endpoint", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sysinfo", ] [[package]] name = "sc-consensus" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -16102,17 +16072,17 @@ dependencies = [ "serde", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "substrate-prometheus-endpoint", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-aura" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -16123,25 +16093,25 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-aura 0.32.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-aura 0.43.0", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-babe" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "fork-tree", @@ -16158,26 +16128,26 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.32.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-inherents 26.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-babe 0.43.0", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-babe-rpc" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "jsonrpsee", @@ -16185,23 +16155,23 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-consensus-babe 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-beefy" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "futures", @@ -16215,16 +16185,16 @@ dependencies = [ "sc-network-sync", "sc-network-types", "sc-utils", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-beefy 13.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-beefy 25.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "wasm-timer", @@ -16232,8 +16202,8 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "jsonrpsee", @@ -16243,33 +16213,33 @@ dependencies = [ "sc-consensus-beefy", "sc-rpc", "serde", - "sp-application-crypto 30.0.0", - "sp-consensus-beefy 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-beefy 25.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-epochs" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "fork-tree", "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-consensus-grandpa" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "ahash 0.8.12", - "array-bytes", + "array-bytes 6.2.3", "async-trait", "dyn-clone", "finality-grandpa", @@ -16293,24 +16263,24 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "finality-grandpa", "futures", @@ -16322,15 +16292,15 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-consensus-slots" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -16340,150 +16310,150 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-executor" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfd7a23eebd1fea90534994440f0ef516cbd8c0ef749e272c6c77fd729bbca71" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor-common 0.29.0", - "sc-executor-polkavm 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor-common 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-polkavm 0.36.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-wasmtime 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", "schnellru", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-panic-handler 13.0.0", - "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "sp-wasm-interface 20.0.0", + "sp-api 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 41.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", ] [[package]] name = "sc-executor" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55c745bf88acb34bd606346c7de6cc06f334f627c1ff40380252a6e52ad9354" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor-common 0.38.0", - "sc-executor-polkavm 0.35.0", - "sc-executor-wasmtime 0.38.0", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-polkavm 0.36.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-wasmtime 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "schnellru", - "sp-api 36.0.1", - "sp-core 36.1.0", - "sp-externalities 0.30.0", - "sp-io 40.0.1", - "sp-panic-handler 13.0.2", - "sp-runtime-interface 29.0.1", - "sp-trie 39.1.0", - "sp-version 39.0.0", - "sp-wasm-interface 21.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c15851cbce9a72d7191fdb9a6e8f5919e17aeaf363df9b52653e92ead4fa1e" dependencies = [ "polkavm 0.24.0", - "sc-allocator 23.0.0", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-wasm-interface 20.0.0", + "sc-allocator 32.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", "wasm-instrument", ] [[package]] name = "sc-executor-common" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f84b9aa7664a9b401afbf423bcd3c1845f5adedf4f6030586808238a222df" +version = "0.39.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "polkavm 0.18.0", - "sc-allocator 31.0.0", - "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 21.0.1", + "polkavm 0.24.0", + "sc-allocator 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "wasm-instrument", ] [[package]] name = "sc-executor-polkavm" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eefb587eb7d0cbb4a2d763fa799eb7fb60a5d2fd42e625accf455c1e9e49a9d4" dependencies = [ "log", "polkavm 0.24.0", - "sc-executor-common 0.29.0", - "sp-wasm-interface 20.0.0", + "sc-executor-common 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-executor-polkavm" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb4929b3457077f9b30ad397a724116f43f252a889ec334ec369f6cdad8f76c" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", - "polkavm 0.18.0", - "sc-executor-common 0.38.0", - "sp-wasm-interface 21.0.1", + "polkavm 0.24.0", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-executor-wasmtime" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5980897e2915ef027560886a2bb52f49a2cea4a9b9f5c75fead841201d03705" dependencies = [ "anyhow", "log", "parking_lot 0.12.3", "rustix 0.36.17", - "sc-allocator 23.0.0", - "sc-executor-common 0.29.0", - "sp-runtime-interface 24.0.0", - "sp-wasm-interface 20.0.0", + "sc-allocator 32.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-common 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmtime", ] [[package]] name = "sc-executor-wasmtime" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5ad79b030a1f91ef0f667e58ac35e1c9fa33a6b8a0ec1ae7fe4890322535ac" +version = "0.39.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "anyhow", "log", "parking_lot 0.12.3", "rustix 0.36.17", - "sc-allocator 31.0.0", - "sc-executor-common 0.38.0", - "sp-runtime-interface 29.0.1", - "sp-wasm-interface 21.0.1", + "sc-allocator 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "console", "futures", @@ -16493,29 +16463,29 @@ dependencies = [ "sc-network", "sc-network-sync", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-keystore" -version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "parking_lot 0.12.3", "serde_json", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-mixnet" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "arrayvec 0.7.6", "blake2 0.10.6", "bytes", @@ -16529,21 +16499,21 @@ dependencies = [ "sc-network", "sc-network-types", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-mixnet", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-network" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "asynchronous-codec 0.6.2", @@ -16574,11 +16544,11 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -16590,18 +16560,18 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.49.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-network-gossip" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "ahash 0.8.12", "futures", @@ -16612,17 +16582,17 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", ] [[package]] name = "sc-network-light" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "futures", "log", @@ -16633,17 +16603,17 @@ dependencies = [ "sc-network", "sc-network-types", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-network-sync" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "fork-tree", @@ -16661,13 +16631,13 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -16675,10 +16645,10 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures", "log", "parity-scale-codec", @@ -16688,14 +16658,14 @@ dependencies = [ "sc-network-types", "sc-utils", "sp-consensus", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-network-types" -version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bs58", "bytes", @@ -16707,14 +16677,16 @@ dependencies = [ "multiaddr 0.18.2", "multihash 0.19.3", "rand 0.8.5", + "serde", + "serde_with", "thiserror 1.0.69", "zeroize", ] [[package]] name = "sc-offchain" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "46.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bytes", "fnv", @@ -16735,29 +16707,29 @@ dependencies = [ "sc-network-types", "sc-transaction-pool-api", "sc-utils", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "threadpool", "tracing", ] [[package]] name = "sc-proposer-metrics" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-rpc" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "46.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "jsonrpsee", @@ -16773,23 +16745,23 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-offchain 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-offchain 37.0.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", "sp-statement-store", - "sp-version 29.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tokio", ] [[package]] name = "sc-rpc-api" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.50.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16799,17 +16771,17 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-rpc", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-rpc-server" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -16824,7 +16796,7 @@ dependencies = [ "sc-rpc-api", "serde", "serde_json", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tokio", "tower", "tower-http", @@ -16832,10 +16804,10 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures", "futures-util", "hex", @@ -16851,13 +16823,13 @@ dependencies = [ "sc-transaction-pool-api", "schnellru", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-rpc", - "sp-runtime 31.0.1", - "sp-version 29.0.0", - "substrate-prometheus-endpoint", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -16865,23 +16837,23 @@ dependencies = [ [[package]] name = "sc-runtime-utilities" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-state-machine 0.35.0", - "sp-wasm-interface 20.0.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-service" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.52.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "directories", @@ -16898,7 +16870,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-informant", "sc-keystore", "sc-network", @@ -16919,22 +16891,22 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", "sp-transaction-storage-proof", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "static_init", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tempfile", "thiserror 1.0.69", "tokio", @@ -16944,32 +16916,32 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.39.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-storage-monitor" -version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "clap", "fs4", "log", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", ] [[package]] name = "sc-sync-state-rpc" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.51.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16981,14 +16953,14 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-sysinfo" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "43.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "derive_more 0.99.20", "futures", @@ -17000,15 +16972,15 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-io 30.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sc-telemetry" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "chrono", "futures", @@ -17026,8 +16998,8 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "chrono", "console", @@ -17040,12 +17012,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-rpc", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing", "tracing-log", @@ -17054,8 +17026,8 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "11.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -17065,8 +17037,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -17080,14 +17052,14 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-blockchain", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "substrate-prometheus-endpoint", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -17096,8 +17068,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", @@ -17106,15 +17078,15 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sc-utils" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-channel 1.9.0", "futures", @@ -17122,7 +17094,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "prometheus", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -17135,16 +17107,6 @@ dependencies = [ "scale-type-resolver 0.1.1", ] -[[package]] -name = "scale-bits" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" -dependencies = [ - "parity-scale-codec", - "scale-type-resolver 0.2.0", -] - [[package]] name = "scale-bits" version = "0.7.0" @@ -17171,19 +17133,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "scale-decode" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" -dependencies = [ - "derive_more 0.99.20", - "parity-scale-codec", - "scale-bits 0.6.0", - "scale-type-resolver 0.2.0", - "smallvec", -] - [[package]] name = "scale-decode" version = "0.16.0" @@ -17648,7 +17597,7 @@ dependencies = [ [[package]] name = "serde-hex-utils" version = "0.1.0" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ "anyhow", "hex", @@ -17744,9 +17693,22 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "serde_with_macros", "time", ] +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "serdect" version = "0.2.0" @@ -17947,25 +17909,25 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e34f1146a457a5c554dedeae6c7273aa54c3b031f3e9eb0abd037b5511e2ce9" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 31.0.1", + "sp-runtime 39.0.5", ] [[package]] name = "slot-range-helper" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e34f1146a457a5c554dedeae6c7273aa54c3b031f3e9eb0abd037b5511e2ce9" +version = "18.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 39.0.5", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -18230,28 +18192,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "snowbridge-beacon-primitives" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "byte-slice-cast", - "frame-support 28.0.0", - "hex", - "parity-scale-codec", - "rlp 0.6.1", - "scale-info", - "serde", - "snowbridge-ethereum 0.3.0", - "snowbridge-milagro-bls", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "ssz_rs", - "ssz_rs_derive", -] - [[package]] name = "snowbridge-beacon-primitives" version = "0.10.1" @@ -18276,27 +18216,25 @@ dependencies = [ ] [[package]] -name = "snowbridge-core" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "snowbridge-beacon-primitives" +version = "0.14.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bp-relayers", - "frame-support 28.0.0", - "frame-system 28.0.0", - "hex-literal", - "log", + "byte-slice-cast", + "frame-support 41.0.0", + "hex", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", + "rlp 0.6.1", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "snowbridge-ethereum 0.13.0", + "snowbridge-milagro-bls", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "ssz_rs", + "ssz_rs_derive", ] [[package]] @@ -18324,23 +18262,27 @@ dependencies = [ ] [[package]] -name = "snowbridge-ethereum" -version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "snowbridge-core" +version = "0.14.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "ethabi-decode 2.0.0", - "ethbloom 0.14.1", - "ethereum-types 0.15.1", + "bp-relayers", + "frame-support 41.0.0", + "frame-system 41.0.0", "hex-literal", - "parity-bytes", + "log", "parity-scale-codec", - "rlp 0.6.1", + "polkadot-parachain-primitives 17.0.0", "scale-info", "serde", - "serde-big-array", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] @@ -18364,6 +18306,26 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "snowbridge-ethereum" +version = "0.13.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "ethabi-decode 2.0.0", + "ethbloom 0.14.1", + "ethereum-types 0.15.1", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp 0.6.1", + "scale-info", + "serde", + "serde-big-array", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "snowbridge-milagro-bls" version = "1.5.4" @@ -18381,49 +18343,49 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-primitives" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "alloy-core", "ethabi-decode 2.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "hex-literal", "log", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", + "polkadot-parachain-primitives 17.0.0", "scale-info", - "snowbridge-core 0.2.0", + "snowbridge-core 0.14.0", "snowbridge-verification-primitives", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] name = "snowbridge-pallet-system-frontend" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-asset-conversion 10.0.0", + "pallet-asset-conversion 23.0.0", "parity-scale-codec", "scale-info", - "snowbridge-core 0.2.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "snowbridge-core 0.14.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", "tracing", ] @@ -18449,34 +18411,34 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.14.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "log", - "pallet-xcm 7.0.0", + "pallet-xcm 20.1.0", "parity-scale-codec", - "snowbridge-core 0.2.0", + "snowbridge-core 0.14.0", "snowbridge-outbound-queue-primitives", - "sp-arithmetic 23.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] name = "snowbridge-verification-primitives" -version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.3.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", + "frame-support 41.0.0", "parity-scale-codec", "scale-info", - "snowbridge-beacon-primitives 0.2.0", - "sp-core 28.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "snowbridge-beacon-primitives 0.14.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -18530,28 +18492,6 @@ dependencies = [ "sha1", ] -[[package]] -name = "sp-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "docify", - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro 15.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "thiserror 1.0.69", -] - [[package]] name = "sp-api" version = "34.0.0" @@ -18577,31 +18517,54 @@ dependencies = [ [[package]] name = "sp-api" -version = "36.0.1" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541da427f47dfb97f3dd0556fa3272bdc5dfa0d4c1ad53a22670a9bae4db63d7" +checksum = "1ee297c1304c6b069784dda4147ef5f478f7aef75b94e0838a38c29de792f1df" dependencies = [ "docify", "hash-db", "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 22.0.0", - "sp-core 36.1.0", - "sp-externalities 0.30.0", - "sp-metadata-ir 0.10.0", - "sp-runtime 41.1.0", - "sp-runtime-interface 29.0.1", - "sp-state-machine 0.45.0", - "sp-trie 39.1.0", - "sp-version 39.0.0", + "sp-api-proc-macro 23.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-metadata-ir 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 42.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-state-machine 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-api" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 23.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-metadata-ir 0.11.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] [[package]] name = "sp-api-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18614,9 +18577,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" +checksum = "74a14a276fde5d6e5a0668494e3dd42739b346a7ac7b6348c74f9c9142f4474a" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18629,9 +18592,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36334085c348bb507debd40e604f71194b1fc669eb6fec81aebef08eb3466f6c" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", "blake2 0.10.6", @@ -18644,46 +18606,47 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8133012faa5f75b2f0b1619d9f720c1424ac477152c143e5f7dbde2fe1a958" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 34.0.0", + "sp-io 38.0.2", ] [[package]] name = "sp-application-crypto" -version = "38.0.0" +version = "41.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8133012faa5f75b2f0b1619d9f720c1424ac477152c143e5f7dbde2fe1a958" +checksum = "28c668f1ce424bc131f40ade33fa4c0bd4dcd2428479e1e291aad66d4b00c74f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 34.0.0", - "sp-io 38.0.2", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 41.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-application-crypto" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba375ab65a76f7413d1bfe48122fd347ce7bd2047e36ecbbd78f12f5adaed121" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 36.1.0", - "sp-io 40.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-arithmetic" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "26.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" dependencies = [ "docify", "integer-sqrt", @@ -18696,9 +18659,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "26.1.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +checksum = "2929fd12ac6ca3cfac7f62885866810ba4e9464814dbaa87592b5b5681b29aee" dependencies = [ "docify", "integer-sqrt", @@ -18710,15 +18673,17 @@ dependencies = [ ] [[package]] -name = "sp-authority-discovery" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-arithmetic" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "docify", + "integer-sqrt", + "num-traits", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-runtime 31.0.1", + "serde", + "static_assertions", ] [[package]] @@ -18735,13 +18700,15 @@ dependencies = [ ] [[package]] -name = "sp-block-builder" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-authority-discovery" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "sp-api 26.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "parity-scale-codec", + "scale-info", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -18755,55 +18722,49 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "sp-block-builder" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "sp-blockchain" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "futures", "parity-scale-codec", "parking_lot 0.12.3", "schnellru", - "sp-api 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-database", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "tracing", ] [[package]] name = "sp-consensus" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "futures", "log", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", ] -[[package]] -name = "sp-consensus-aura" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-timestamp 26.0.0", -] - [[package]] name = "sp-consensus-aura" version = "0.40.0" @@ -18822,21 +18783,19 @@ dependencies = [ ] [[package]] -name = "sp-consensus-babe" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-consensus-aura" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-timestamp 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-slots 0.43.0", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", ] [[package]] @@ -18859,23 +18818,21 @@ dependencies = [ ] [[package]] -name = "sp-consensus-beefy" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-consensus-babe" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-mmr-primitives 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "strum 0.26.3", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-consensus-slots 0.43.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-timestamp 37.0.0", ] [[package]] @@ -18901,20 +18858,23 @@ dependencies = [ ] [[package]] -name = "sp-consensus-grandpa" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-consensus-beefy" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "finality-grandpa", - "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-mmr-primitives 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "strum 0.26.3", ] [[package]] @@ -18936,14 +18896,20 @@ dependencies = [ ] [[package]] -name = "sp-consensus-slots" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-consensus-grandpa" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "finality-grandpa", + "log", "parity-scale-codec", "scale-info", "serde", - "sp-timestamp 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -18959,51 +18925,14 @@ dependencies = [ ] [[package]] -name = "sp-core" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-consensus-slots" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "ark-vrf", - "array-bytes", - "bitflags 1.3.2", - "blake2 0.10.6", - "bounded-collections", - "bs58", - "dyn-clone", - "ed25519-zebra", - "futures", - "hash-db", - "hash256-std-hasher", - "impl-serde 0.5.0", - "itertools 0.11.0", - "k256", - "libsecp256k1", - "log", - "merlin", - "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", - "paste", - "primitive-types 0.13.1", - "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", - "secp256k1 0.28.2", - "secrecy 0.8.0", "serde", - "sha2 0.10.9", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-storage 19.0.0", - "ss58-registry", - "substrate-bip39 0.4.7", - "thiserror 1.0.69", - "tracing", - "w3f-bls", - "zeroize", + "sp-timestamp 37.0.0", ] [[package]] @@ -19012,7 +18941,7 @@ version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -19046,7 +18975,7 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-storage 21.0.0", "ss58-registry", - "substrate-bip39 0.6.0", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -19060,7 +18989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" dependencies = [ "ark-vrf", - "array-bytes", + "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -19089,12 +19018,12 @@ dependencies = [ "serde", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime-interface 29.0.1", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ss58-registry", - "substrate-bip39 0.6.0", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -19102,9 +19031,106 @@ dependencies = [ ] [[package]] -name = "sp-crypto-hashing" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "sp-core" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1a46a6b2323401e4489184846a7fb7d89091b42602a2391cd3ef652ede2850" +dependencies = [ + "ark-vrf", + "array-bytes 6.2.3", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde 0.5.0", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot 0.12.3", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ss58-registry", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "ark-vrf", + "array-bytes 6.2.3", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde 0.5.0", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot 0.12.3", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "ss58-registry", + "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" dependencies = [ "blake2b_simd", @@ -19118,7 +19144,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "blake2b_simd", "byteorder", @@ -19142,17 +19168,17 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "syn 2.0.101", ] [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -19172,23 +19198,13 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] -[[package]] -name = "sp-externalities" -version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-storage 19.0.0", -] - [[package]] name = "sp-externalities" version = "0.29.0" @@ -19208,19 +19224,17 @@ checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "sp-genesis-builder" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-externalities" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "environmental", "parity-scale-codec", - "scale-info", - "serde_json", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19237,16 +19251,15 @@ dependencies = [ ] [[package]] -name = "sp-inherents" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-genesis-builder" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "async-trait", - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "thiserror 1.0.69", + "serde_json", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19264,29 +19277,16 @@ dependencies = [ ] [[package]] -name = "sp-io" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-inherents" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bytes", - "docify", - "ed25519-dalek", - "libsecp256k1", - "log", + "async-trait", + "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.24.0", - "rustversion", - "secp256k1 0.28.2", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "tracing", - "tracing-core", + "scale-info", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", ] [[package]] @@ -19310,7 +19310,7 @@ dependencies = [ "sp-keystore 0.40.0", "sp-runtime-interface 28.0.0", "sp-state-machine 0.43.0", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-trie 37.0.0", "tracing", "tracing-core", @@ -19333,24 +19333,67 @@ dependencies = [ "secp256k1 0.28.2", "sp-core 36.1.0", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-keystore 0.42.0", "sp-runtime-interface 29.0.1", "sp-state-machine 0.45.0", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-trie 39.1.0", "tracing", "tracing-core", ] [[package]] -name = "sp-keyring" -version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-io" +version = "41.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3f244e9a2818d21220ceb0915ac73a462814a92d0c354a124a818abdb7f4f66" dependencies = [ - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "strum 0.26.3", + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-keystore 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-state-machine 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "41.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "tracing", + "tracing-core", ] [[package]] @@ -19365,14 +19408,13 @@ dependencies = [ ] [[package]] -name = "sp-keystore" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-keyring" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.3", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "strum 0.26.3", ] [[package]] @@ -19396,7 +19438,30 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "sp-core 36.1.0", - "sp-externalities 0.30.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-keystore" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "269d0ee360f6d072f9203485afea35583ac151521a525cc48b2a107fc576c2d9" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.3", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-keystore" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.3", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19412,22 +19477,12 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", ] -[[package]] -name = "sp-metadata-ir" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "frame-metadata 23.0.0", - "parity-scale-codec", - "scale-info", -] - [[package]] name = "sp-metadata-ir" version = "0.7.0" @@ -19441,41 +19496,34 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d1db25e362edbf5531b427d4bdfc2562bec6a031c3eb2a9145c0a0a01a572d" +checksum = "2319040b39b9614c35c7faaf548172f4d9a3b44b6992bbae534b096d5cdb4f79" dependencies = [ - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "parity-scale-codec", "scale-info", ] [[package]] -name = "sp-mixnet" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-metadata-ir" +version = "0.11.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "frame-metadata 23.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", ] [[package]] -name = "sp-mmr-primitives" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-mixnet" +version = "0.15.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "log", "parity-scale-codec", - "polkadot-ckb-merkle-mountain-range 0.8.1", "scale-info", - "serde", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-runtime 31.0.1", - "thiserror 1.0.69", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19497,16 +19545,20 @@ dependencies = [ ] [[package]] -name = "sp-npos-elections" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-mmr-primitives" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "log", "parity-scale-codec", + "polkadot-ckb-merkle-mountain-range 0.8.1", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", ] [[package]] @@ -19524,13 +19576,16 @@ dependencies = [ ] [[package]] -name = "sp-offchain" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-npos-elections" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19544,10 +19599,21 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "sp-offchain" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "sp-panic-handler" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "13.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" dependencies = [ "backtrace", "regex", @@ -19556,8 +19622,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "backtrace", "regex", @@ -19565,20 +19630,20 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "35.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "rustc-hash 1.1.0", "serde", - "sp-core 28.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-runtime" -version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "39.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e00503b83cf48fffe48746b91b9b832d6785d4e2eeb0941558371eac6baac6" dependencies = [ - "binary-merkle-tree 13.0.0", "docify", "either", "hash256-std-hasher", @@ -19591,23 +19656,22 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-trie 29.0.0", - "sp-weights 27.0.0", + "sp-application-crypto 38.0.0", + "sp-arithmetic 26.1.0", + "sp-core 34.0.0", + "sp-io 38.0.2", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 31.1.0", "tracing", - "tuplex", ] [[package]] name = "sp-runtime" -version = "39.0.5" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e00503b83cf48fffe48746b91b9b832d6785d4e2eeb0941558371eac6baac6" +checksum = "b25d4d3811410317175ff121b3ff8c8b723504dadf37cd418b5192a5098d11bf" dependencies = [ + "binary-merkle-tree 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "docify", "either", "hash256-std-hasher", @@ -19620,22 +19684,23 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 38.0.0", - "sp-arithmetic 26.1.0", - "sp-core 34.0.0", - "sp-io 38.0.2", + "sp-application-crypto 41.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 27.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 41.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-weights 31.1.0", + "sp-trie 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-weights 32.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", + "tuplex", ] [[package]] name = "sp-runtime" -version = "41.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "binary-merkle-tree 16.0.0", + "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "docify", "either", "hash256-std-hasher", @@ -19648,36 +19713,17 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 40.1.0", - "sp-arithmetic 26.1.0", - "sp-core 36.1.0", - "sp-io 40.0.1", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 39.1.0", - "sp-weights 31.1.0", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "tracing", "tuplex", ] -[[package]] -name = "sp-runtime-interface" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "polkavm-derive 0.24.0", - "primitive-types 0.13.1", - "sp-externalities 0.25.0", - "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-wasm-interface 20.0.0", - "static_assertions", -] - [[package]] name = "sp-runtime-interface" version = "28.0.0" @@ -19693,7 +19739,7 @@ dependencies = [ "sp-runtime-interface-proc-macro 18.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-storage 21.0.0", - "sp-tracing 17.1.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-wasm-interface 21.0.1", "static_assertions", ] @@ -19709,19 +19755,59 @@ dependencies = [ "parity-scale-codec", "polkavm-derive 0.18.0", "primitive-types 0.13.1", - "sp-externalities 0.30.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime-interface-proc-macro 18.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0", - "sp-tracing 17.1.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-wasm-interface 21.0.1", "static_assertions", ] +[[package]] +name = "sp-runtime-interface" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fcd9c219da8c85d45d5ae1ce80e73863a872ac27424880322903c6ac893c06e" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "primitive-types 0.13.1", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface-proc-macro 19.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "primitive-types 0.13.1", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface-proc-macro 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "static_assertions", +] + [[package]] name = "sp-runtime-interface-proc-macro" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", @@ -19733,9 +19819,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +checksum = "ca35431af10a450787ebfdcb6d7a91c23fa91eafe73a3f9d37db05c9ab36154b" dependencies = [ "Inflector", "expander", @@ -19746,17 +19832,16 @@ dependencies = [ ] [[package]] -name = "sp-session" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-runtime-interface-proc-macro" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "Inflector", + "expander", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] @@ -19775,16 +19860,17 @@ dependencies = [ ] [[package]] -name = "sp-staking" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-session" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-staking 39.0.0", ] [[package]] @@ -19816,23 +19902,16 @@ dependencies = [ ] [[package]] -name = "sp-state-machine" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-staking" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "hash-db", - "log", + "impl-trait-for-tuples", "parity-scale-codec", - "parking_lot 0.12.3", - "rand 0.8.5", - "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-panic-handler 13.0.0", - "sp-trie 29.0.0", - "thiserror 1.0.69", - "tracing", - "trie-db 0.30.0", + "scale-info", + "serde", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19849,7 +19928,7 @@ dependencies = [ "smallvec", "sp-core 34.0.0", "sp-externalities 0.29.0", - "sp-panic-handler 13.0.2", + "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-trie 37.0.0", "thiserror 1.0.69", "tracing", @@ -19869,18 +19948,59 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core 36.1.0", - "sp-externalities 0.30.0", - "sp-panic-handler 13.0.2", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-trie 39.1.0", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", ] +[[package]] +name = "sp-state-machine" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "483422b016ee9ddba949db6d3092961ed58526520f0586df74dc07defd922a58" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand 0.8.5", + "smallvec", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.69", + "tracing", + "trie-db 0.30.0", +] + +[[package]] +name = "sp-state-machine" +version = "0.46.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand 0.8.5", + "smallvec", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", + "tracing", + "trie-db 0.30.0", +] + [[package]] name = "sp-statement-store" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -19890,13 +20010,13 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.9", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", "x25519-dalek", ] @@ -19910,19 +20030,7 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" - -[[package]] -name = "sp-storage" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "impl-serde 0.5.0", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", -] +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" [[package]] name = "sp-storage" @@ -19951,15 +20059,15 @@ dependencies = [ ] [[package]] -name = "sp-timestamp" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-storage" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "async-trait", + "impl-serde 0.5.0", "parity-scale-codec", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "thiserror 1.0.69", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -19975,10 +20083,23 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-timestamp" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", +] + [[package]] name = "sp-tracing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" dependencies = [ "parity-scale-codec", "tracing", @@ -19989,8 +20110,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "tracing", @@ -19998,15 +20118,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sp-transaction-pool" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "sp-api 26.0.0", - "sp-runtime 31.0.1", -] - [[package]] name = "sp-transaction-pool" version = "34.0.0" @@ -20017,52 +20128,61 @@ dependencies = [ "sp-runtime 39.0.5", ] +[[package]] +name = "sp-transaction-pool" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "sp-transaction-storage-proof" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-inherents 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-trie" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd" dependencies = [ "ahash 0.8.12", "hash-db", - "memory-db 0.33.0", + "lazy_static", + "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "scale-info", "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "substrate-prometheus-endpoint", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "thiserror 1.0.69", "tracing", - "trie-db 0.30.0", + "trie-db 0.29.1", "trie-root", ] [[package]] name = "sp-trie" -version = "37.0.0" +version = "39.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" dependencies = [ "ahash 0.8.12", "hash-db", - "lazy_static", "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", @@ -20070,31 +20190,34 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core 34.0.0", - "sp-externalities 0.29.0", + "sp-core 36.1.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", "tracing", - "trie-db 0.29.1", + "trie-db 0.30.0", "trie-root", ] [[package]] name = "sp-trie" -version = "39.1.0" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +checksum = "6b2e157c9cf44a1a9d20f3c69322e302db70399bf3f218211387fe009dd4041c" dependencies = [ "ahash 0.8.12", + "foldhash", "hash-db", - "memory-db 0.32.0", + "hashbrown 0.15.3", + "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "scale-info", "schnellru", - "sp-core 36.1.0", - "sp-externalities 0.30.0", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-prometheus-endpoint 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -20102,20 +20225,28 @@ dependencies = [ ] [[package]] -name = "sp-version" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-trie" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "impl-serde 0.5.0", + "ahash 0.8.12", + "foldhash", + "hash-db", + "hashbrown 0.15.3", + "memory-db 0.34.0", + "nohash-hasher", "parity-scale-codec", - "parity-wasm", + "parking_lot 0.12.3", + "rand 0.8.5", "scale-info", - "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-runtime 31.0.1", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-version-proc-macro 13.0.0", + "schnellru", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror 1.0.69", + "tracing", + "trie-db 0.30.0", + "trie-root", ] [[package]] @@ -20138,9 +20269,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "39.0.0" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +checksum = "98fd599db91c11c32e4df4c85b22b6396f28284889a583db9151ff59599dd1cb" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -20148,22 +20279,27 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 41.1.0", + "sp-runtime 42.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version-proc-macro 15.0.0", + "sp-version-proc-macro 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.69", ] [[package]] -name = "sp-version-proc-macro" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "sp-version" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "impl-serde 0.5.0", "parity-scale-codec", - "proc-macro-warning", - "proc-macro2", - "quote", - "syn 2.0.101", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-version-proc-macro 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "thiserror 1.0.69", ] [[package]] @@ -20191,23 +20327,47 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-version-proc-macro" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "sp-wasm-interface" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "wasmtime", ] [[package]] name = "sp-wasm-interface" -version = "21.0.1" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +checksum = "ffdbc579c72fc03263894a0077383f543a093020d75741092511bb05a440ada6" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -20218,33 +20378,48 @@ dependencies = [ [[package]] name = "sp-weights" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "31.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 23.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-arithmetic 26.1.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-weights" -version = "31.1.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +checksum = "c8a1d448faceb064bb114df31fc45ff86ea2ee8fd17810c4357a578d081f7732" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0", + "sp-arithmetic 27.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sp-weights" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "spin" version = "0.5.2" @@ -20320,19 +20495,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "staging-parachain-info" -version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", -] - [[package]] name = "staging-parachain-info" version = "0.17.0" @@ -20348,24 +20510,16 @@ dependencies = [ ] [[package]] -name = "staging-xcm" -version = "7.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "staging-parachain-info" +version = "0.21.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", - "bounded-collections", - "derive-where", - "environmental", - "frame-support 28.0.0", - "hex-literal", - "impl-trait-for-tuples", - "log", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "scale-info", - "serde", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "xcm-procedural 7.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -20374,7 +20528,7 @@ version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aded0292274ad473250c22ed3deaf2d9ed47d15786d700e9e83ab7c1cad2ad44" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "bounded-collections", "derivative", "environmental", @@ -20393,7 +20547,7 @@ version = "14.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f66daa99c90c4b1443696ce42f38aa9d47954ae6270301be42f049a1bf0ba5" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "bounded-collections", "derivative", "environmental", @@ -20408,27 +20562,24 @@ dependencies = [ ] [[package]] -name = "staging-xcm-builder" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "staging-xcm" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ + "array-bytes 6.2.3", + "bounded-collections", + "derive-where", "environmental", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "hex-literal", "impl-trait-for-tuples", - "pallet-asset-conversion 10.0.0", - "pallet-transaction-payment 28.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", - "tracing", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "xcm-procedural 11.0.2", ] [[package]] @@ -20455,22 +20606,26 @@ dependencies = [ ] [[package]] -name = "staging-xcm-executor" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "staging-xcm-builder" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", + "pallet-asset-conversion 23.0.0", + "pallet-transaction-payment 41.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 17.0.0", + "scale-info", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", "tracing", ] @@ -20495,6 +20650,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "staging-xcm-executor" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "environmental", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "tracing", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -20595,8 +20770,9 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.7" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -20608,8 +20784,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -20640,32 +20815,47 @@ checksum = "b285e7d183a32732fdc119f3d81b7915790191fad602b7c709ef247073c77a2e" [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" [[package]] name = "substrate-frame-rpc-system" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "45.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", - "frame-system-rpc-runtime-api 26.0.0", + "frame-system-rpc-runtime-api 37.0.0", "futures", "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-block-builder 37.0.0", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe1fee79cb0bf260bb84b4fa885fae887646894a971abddae3d9ac4921531540" +dependencies = [ + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.2" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -20679,9 +20869,9 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "1.15.3" -source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#1e0cb6e317ee7202a286b5e1dad93a4979a9be28" +source = "git+https://github.com/r0gue-io/ismp?branch=polkadot-stable2506#a64c9c79824f1f6b0e0b5288bcaba18241fc19a0" dependencies = [ - "frame-support 28.0.0", + "frame-support 41.0.0", "hash-db", "ismp", "pallet-ismp", @@ -20689,33 +20879,34 @@ dependencies = [ "primitive-types 0.13.1", "scale-info", "serde", - "sp-consensus-aura 0.32.0", - "sp-consensus-babe 0.32.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-consensus-aura 0.43.0", + "sp-consensus-babe 0.43.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "substrate-state-trie-migration-rpc" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "44.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "trie-db 0.30.0", ] [[package]] name = "substrate-wasm-builder" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eccd97d503bdd5d14be243fefccc4b712f8740aab2baba3dfd0140e2d08f765" dependencies = [ "build-helper", "cargo_metadata 0.15.4", @@ -20723,9 +20914,8 @@ dependencies = [ "filetime", "jobserver", "parity-wasm", - "polkavm-linker 0.24.0", - "shlex", - "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "polkavm-linker 0.9.2", + "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -20735,18 +20925,28 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "24.0.2" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eccd97d503bdd5d14be243fefccc4b712f8740aab2baba3dfd0140e2d08f765" +checksum = "c57b288a411017a7e96ae36a767647cc3e66ea49423d4cd72885adac47beaf07" dependencies = [ + "array-bytes 6.2.3", "build-helper", "cargo_metadata 0.15.4", "console", "filetime", + "frame-metadata 23.0.0", "jobserver", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", - "polkavm-linker 0.9.2", + "polkavm-linker 0.24.0", + "sc-executor 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)", + "shlex", + "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 41.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -20756,28 +20956,18 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "26.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adc17ecd661e16b25708f36f6e6961f809a3ab16c89132a4acd7936c0f31e46" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", "build-helper", "cargo_metadata 0.15.4", "console", "filetime", - "frame-metadata 20.0.0", "jobserver", - "merkleized-metadata", - "parity-scale-codec", "parity-wasm", - "polkavm-linker 0.18.0", - "sc-executor 0.42.0", + "polkavm-linker 0.24.0", "shlex", - "sp-core 36.1.0", - "sp-io 40.0.1", - "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 17.1.0", - "sp-version 39.0.0", + "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "strum 0.26.3", "tempfile", "toml 0.8.22", @@ -21193,16 +21383,16 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "testnet-parachains-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "polkadot-core-primitives 7.0.0", + "cumulus-primitives-core 0.19.0", + "frame-support 41.0.0", + "polkadot-core-primitives 18.0.0", "rococo-runtime-constants", "smallvec", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", "westend-runtime-constants", ] @@ -21596,11 +21786,11 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "coarsetime", - "polkadot-primitives 7.0.0", + "polkadot-primitives 19.0.0", "tracing", "tracing-gum-proc-macro", ] @@ -21608,7 +21798,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "expander", "proc-macro-crate 3.3.0", @@ -22541,125 +22731,125 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "binary-merkle-tree 13.0.0", + "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", - "frame-metadata-hash-extension 0.1.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-benchmarking 41.0.0", + "frame-election-provider-support 41.0.0", + "frame-executive 41.0.0", + "frame-metadata-hash-extension 0.9.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "frame-system-benchmarking 41.0.0", + "frame-system-rpc-runtime-api 37.0.0", + "frame-try-runtime 0.47.0", "hex-literal", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-bags-list 27.0.0", - "pallet-balances 28.0.0", - "pallet-beefy 28.0.0", - "pallet-beefy-mmr 28.0.0", - "pallet-conviction-voting 28.0.0", - "pallet-delegated-staking 1.0.0", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", - "pallet-fast-unstake 27.0.0", - "pallet-grandpa 28.0.0", - "pallet-identity 29.0.0", - "pallet-indices 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-asset-rate 20.0.0", + "pallet-authority-discovery 41.0.0", + "pallet-authorship 41.0.0", + "pallet-babe 41.0.0", + "pallet-bags-list 40.0.0", + "pallet-balances 42.0.0", + "pallet-beefy 42.0.0", + "pallet-beefy-mmr 42.0.0", + "pallet-conviction-voting 41.0.0", + "pallet-delegated-staking 8.0.0", + "pallet-election-provider-multi-phase 40.0.0", + "pallet-election-provider-support-benchmarking 40.0.0", + "pallet-fast-unstake 40.0.0", + "pallet-grandpa 41.0.0", + "pallet-identity 41.0.0", + "pallet-indices 41.0.0", + "pallet-message-queue 44.0.0", "pallet-meta-tx", "pallet-migrations", - "pallet-mmr 27.0.0", - "pallet-multisig 28.0.0", - "pallet-nomination-pools 25.0.0", - "pallet-nomination-pools-benchmarking 26.0.0", - "pallet-nomination-pools-runtime-api 23.0.0", - "pallet-offences 27.0.0", - "pallet-offences-benchmarking 28.0.0", - "pallet-parameters 0.1.0", - "pallet-preimage 28.0.0", - "pallet-proxy 28.0.0", + "pallet-mmr 41.0.0", + "pallet-multisig 41.0.0", + "pallet-nomination-pools 39.0.0", + "pallet-nomination-pools-benchmarking 39.0.0", + "pallet-nomination-pools-runtime-api 37.0.0", + "pallet-offences 40.0.0", + "pallet-offences-benchmarking 41.0.0", + "pallet-parameters 0.12.0", + "pallet-preimage 41.0.0", + "pallet-proxy 41.0.0", "pallet-recovery", - "pallet-referenda 28.0.0", + "pallet-referenda 41.0.0", "pallet-root-testing", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-session-benchmarking 28.0.0", - "pallet-staking 28.0.0", + "pallet-scheduler 42.0.0", + "pallet-session 41.0.0", + "pallet-session-benchmarking 41.0.0", + "pallet-staking 41.0.0", "pallet-staking-async-ah-client", "pallet-staking-async-rc-client", - "pallet-staking-runtime-api 14.0.0", - "pallet-sudo 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", + "pallet-staking-runtime-api 27.0.0", + "pallet-sudo 41.0.0", + "pallet-timestamp 40.0.0", + "pallet-transaction-payment 41.0.0", + "pallet-transaction-payment-rpc-runtime-api 41.0.0", + "pallet-treasury 40.0.0", + "pallet-utility 41.0.0", "pallet-verify-signature", - "pallet-vesting 28.0.0", - "pallet-whitelist 27.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.0", + "pallet-vesting 41.0.0", + "pallet-whitelist 40.0.0", + "pallet-xcm 20.1.0", + "pallet-xcm-benchmarks 21.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-common 20.0.0", + "polkadot-runtime-parachains 20.0.1", "scale-info", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy 13.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-mmr-primitives 26.0.0", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", - "substrate-wasm-builder 17.0.0", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-authority-discovery 37.0.0", + "sp-block-builder 37.0.0", + "sp-consensus-babe 0.43.0", + "sp-consensus-beefy 25.0.0", + "sp-consensus-grandpa 24.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-genesis-builder 0.18.0", + "sp-inherents 37.0.0", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", + "sp-mmr-primitives 37.0.0", + "sp-npos-elections 37.0.0", + "sp-offchain 37.0.0", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-session 39.0.0", + "sp-staking 39.0.0", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-transaction-pool 37.0.0", + "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", + "substrate-wasm-builder 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "westend-runtime-constants", - "xcm-runtime-apis 0.1.1", + "xcm-runtime-apis 0.8.0", ] [[package]] name = "westend-runtime-constants" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 41.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-common 20.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", ] [[package]] @@ -23255,49 +23445,38 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.5.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.20.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "array-bytes", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "array-bytes 6.2.3", + "cumulus-pallet-parachain-system 0.21.0", + "cumulus-primitives-core 0.19.0", + "cumulus-primitives-parachain-inherent 0.19.0", "cumulus-test-relay-sproof-builder", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-timestamp 27.0.0", - "parachains-common 7.0.0", + "pallet-balances 42.0.0", + "pallet-message-queue 44.0.0", + "pallet-timestamp 40.0.0", + "parachains-common 22.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-parachains 20.0.1", + "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", "xcm-simulator", ] -[[package]] -name = "xcm-procedural" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "xcm-procedural" version = "8.0.0" @@ -23323,17 +23502,14 @@ dependencies = [ ] [[package]] -name = "xcm-runtime-apis" -version = "0.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +name = "xcm-procedural" +version = "11.0.2" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.1", - "staging-xcm-executor 7.0.0", + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] @@ -23351,25 +23527,39 @@ dependencies = [ "staging-xcm-executor 17.0.2", ] +[[package]] +name = "xcm-runtime-apis" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +dependencies = [ + "frame-support 41.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", +] + [[package]] name = "xcm-simulator" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", "parity-scale-codec", "paste", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.1", - "staging-xcm-builder 7.0.0", - "staging-xcm-executor 7.0.0", + "polkadot-core-primitives 18.0.0", + "polkadot-parachain-primitives 17.0.0", + "polkadot-primitives 19.0.0", + "polkadot-runtime-parachains 20.0.1", + "scale-info", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] From 293b65c76547ea90c70bbb011fa7e8fa8b03d331 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 20:57:47 +0100 Subject: [PATCH 046/284] chore(api): update cargo.lock --- pop-api/Cargo.lock | 449 +++++++++++++++++++++++---------------------- 1 file changed, 226 insertions(+), 223 deletions(-) diff --git a/pop-api/Cargo.lock b/pop-api/Cargo.lock index 902b42b6f..ba83a109c 100644 --- a/pop-api/Cargo.lock +++ b/pop-api/Cargo.lock @@ -475,8 +475,8 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hash-db", "log", @@ -1177,8 +1177,8 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "frame-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "frame-support", "frame-support-procedural", @@ -1191,11 +1191,11 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-runtime", - "sp-runtime-interface 24.0.0", - "sp-storage 19.0.0", + "sp-runtime-interface 30.0.0", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "static_assertions", ] @@ -1213,8 +1213,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "aquamarine", "array-bytes", @@ -1234,28 +1234,28 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing-proc-macro", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-metadata-ir", "sp-runtime", "sp-staking", - "sp-state-machine 0.35.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-weights 27.0.0", + "sp-state-machine 0.46.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0", + "sp-weights 32.0.0", "tt-call", ] [[package]] name = "frame-support-procedural" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", "cfg-expr", @@ -1268,14 +1268,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "syn 2.0.101", ] [[package]] name = "frame-support-procedural-tools" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "13.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -1286,8 +1286,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", @@ -1296,8 +1296,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "cfg-if", "docify", @@ -1306,11 +1306,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-runtime", "sp-version", - "sp-weights 27.0.0", + "sp-weights 32.0.0", ] [[package]] @@ -2227,10 +2227,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" dependencies = [ + "foldhash", "hash-db", "hashbrown 0.15.3", ] @@ -2421,8 +2422,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-runtime", ] @@ -3373,8 +3374,8 @@ dependencies = [ [[package]] name = "sp-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", "hash-db", @@ -3382,21 +3383,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-metadata-ir", "sp-runtime", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", "blake2", @@ -3409,20 +3410,21 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", ] [[package]] name = "sp-arithmetic" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "26.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" dependencies = [ "docify", "integer-sqrt", @@ -3435,9 +3437,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "26.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "docify", "integer-sqrt", @@ -3450,8 +3451,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "36.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" dependencies = [ "ark-vrf", "array-bytes", @@ -3459,7 +3461,7 @@ dependencies = [ "blake2", "bounded-collections", "bs58", - "dyn-clone", + "dyn-clonable", "ed25519-zebra", "futures", "hash-db", @@ -3481,15 +3483,14 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sha2 0.10.9", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-storage 19.0.0", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 29.0.1", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ss58-registry", - "substrate-bip39 0.4.7", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror", "tracing", "w3f-bls", @@ -3498,9 +3499,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "36.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "ark-vrf", "array-bytes", @@ -3508,7 +3508,7 @@ dependencies = [ "blake2", "bounded-collections", "bs58", - "dyn-clonable", + "dyn-clone", "ed25519-zebra", "futures", "hash-db", @@ -3530,14 +3530,15 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0", - "sp-runtime-interface 29.0.1", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "ss58-registry", - "substrate-bip39 0.6.0", + "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "thiserror", "tracing", "w3f-bls", @@ -3561,7 +3562,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "blake2b_simd", "byteorder", @@ -3574,10 +3575,10 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "syn 2.0.101", ] @@ -3595,7 +3596,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "proc-macro2", "quote", @@ -3604,29 +3605,29 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 19.0.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-externalities" version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-genesis-builder" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "scale-info", @@ -3637,8 +3638,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3650,8 +3651,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" dependencies = [ "bytes", "docify", @@ -3659,26 +3661,25 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.24.0", + "polkavm-derive 0.18.0", "rustversion", "secp256k1", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", + "sp-core 36.1.0", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-keystore 0.42.0", + "sp-runtime-interface 29.0.1", + "sp-state-machine 0.45.0", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 39.1.0", "tracing", "tracing-core", ] [[package]] name = "sp-io" -version = "40.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +version = "41.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bytes", "docify", @@ -3686,48 +3687,48 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive 0.24.0", "rustversion", "secp256k1", - "sp-core 36.1.0", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.30.0", - "sp-keystore 0.42.0", - "sp-runtime-interface 29.0.1", - "sp-state-machine 0.45.0", - "sp-tracing 17.1.0", - "sp-trie 39.1.0", + "sp-core 37.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keystore 0.43.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-keystore" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 36.1.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-keystore" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "parking_lot", - "sp-core 36.1.0", - "sp-externalities 0.30.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-metadata-ir" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.11.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -3736,8 +3737,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "13.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" dependencies = [ "backtrace", "regex", @@ -3746,8 +3748,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "backtrace", "regex", @@ -3755,8 +3756,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "binary-merkle-tree", "docify", @@ -3772,59 +3773,60 @@ dependencies = [ "serde", "simple-mermaid", "sp-application-crypto", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-trie 29.0.0", - "sp-weights 27.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0", + "sp-weights 32.0.0", "tracing", "tuplex", ] [[package]] name = "sp-runtime-interface" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.24.0", + "polkavm-derive 0.18.0", "primitive-types", - "sp-externalities 0.25.0", - "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-wasm-interface 20.0.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface-proc-macro 18.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 21.0.1", "static_assertions", ] [[package]] name = "sp-runtime-interface" -version = "29.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive 0.24.0", "primitive-types", - "sp-externalities 0.30.0", - "sp-runtime-interface-proc-macro 18.0.0", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 22.0.0", - "sp-tracing 17.1.0", - "sp-wasm-interface 21.0.1", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime-interface-proc-macro 19.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-wasm-interface 22.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", @@ -3836,9 +3838,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "Inflector", "expander", @@ -3850,21 +3851,22 @@ dependencies = [ [[package]] name = "sp-staking" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-runtime", ] [[package]] name = "sp-state-machine" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" dependencies = [ "hash-db", "log", @@ -3872,10 +3874,10 @@ dependencies = [ "parking_lot", "rand", "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-panic-handler 13.0.0", - "sp-trie 29.0.0", + "sp-core 36.1.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 13.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 39.1.0", "thiserror", "tracing", "trie-db", @@ -3883,9 +3885,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +version = "0.46.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hash-db", "log", @@ -3893,10 +3894,10 @@ dependencies = [ "parking_lot", "rand", "smallvec", - "sp-core 36.1.0", - "sp-externalities 0.30.0", - "sp-panic-handler 13.0.2", - "sp-trie 39.1.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-panic-handler 13.0.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-trie 40.0.0", "thiserror", "tracing", "trie-db", @@ -3911,37 +3912,38 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" [[package]] name = "sp-storage" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-storage" version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] name = "sp-tracing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" dependencies = [ "parity-scale-codec", "tracing", @@ -3952,8 +3954,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "tracing", @@ -3963,21 +3964,21 @@ dependencies = [ [[package]] name = "sp-trie" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "39.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" dependencies = [ "ahash", "hash-db", - "memory-db 0.33.0", + "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", "parking_lot", "rand", "scale-info", "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "substrate-prometheus-endpoint", + "sp-core 36.1.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror", "tracing", "trie-db", @@ -3986,21 +3987,23 @@ dependencies = [ [[package]] name = "sp-trie" -version = "39.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "ahash", + "foldhash", "hash-db", - "memory-db 0.32.0", + "hashbrown 0.15.3", + "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", "parking_lot", "rand", "scale-info", "schnellru", - "sp-core 36.1.0", - "sp-externalities 0.30.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint", "thiserror", "tracing", "trie-db", @@ -4009,8 +4012,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -4019,15 +4022,15 @@ dependencies = [ "serde", "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -4038,8 +4041,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -4049,9 +4053,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -4061,31 +4064,31 @@ dependencies = [ [[package]] name = "sp-weights" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "31.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 23.0.0", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=a251f77)", + "sp-arithmetic 26.1.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-weights" -version = "31.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 26.1.0", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 27.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] [[package]] @@ -4146,8 +4149,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "substrate-bip39" -version = "0.4.7" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -4159,8 +4163,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -4171,8 +4174,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?rev=a251f77#a251f77f35c4dc261e8ba51327d68a969f0671ca" +version = "0.17.2" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "http-body-util", "hyper", From bbb3645b54acc44cab2d9e68102029ef0eb92ee3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 8 May 2025 08:02:07 +0100 Subject: [PATCH 047/284] build(deps): disable default-features for serde --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 25928597c..ce0dc0698 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ rand = "0.8.5" scale-info = { version = "2.11.6", default-features = false, features = [ "derive", ] } -serde = "1.0.214" +serde = { version = "1.0.214", default-features = false } serde_json = { version = "1.0.132", default-features = false } smallvec = "1.11.2" subxt = "0.41.0" From eb10b32e511c242579996c3e7649511eae91b510 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 28 May 2025 10:49:22 +0100 Subject: [PATCH 048/284] feat(api-vnext): new 'pallet' to provide fungible api(s) via precompiles --- Cargo.toml | 1 + pallets/api-vnext/Cargo.toml | 40 ++ pallets/api-vnext/src/fungibles/mod.rs | 147 +++++ .../src/fungibles/precompiles/erc20.rs | 401 ++++++++++++ .../precompiles/interfaces/IERC20.sol | 83 +++ .../precompiles/interfaces/IFungibles.sol | 60 ++ .../src/fungibles/precompiles/mod.rs | 569 ++++++++++++++++++ pallets/api-vnext/src/lib.rs | 146 +++++ pallets/api-vnext/src/mock.rs | 141 +++++ 9 files changed, 1588 insertions(+) create mode 100644 pallets/api-vnext/Cargo.toml create mode 100644 pallets/api-vnext/src/fungibles/mod.rs create mode 100644 pallets/api-vnext/src/fungibles/precompiles/erc20.rs create mode 100644 pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol create mode 100644 pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol create mode 100644 pallets/api-vnext/src/fungibles/precompiles/mod.rs create mode 100644 pallets/api-vnext/src/lib.rs create mode 100644 pallets/api-vnext/src/mock.rs diff --git a/Cargo.toml b/Cargo.toml index ce0dc0698..9cd0cdc27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,7 @@ substrate-wasm-builder = { version = "27.0.0" } # Local pallet-api = { path = "pallets/api", default-features = false } +pallet-api-vnext = { path = "pallets/api-vnext", default-features = false } pallet-motion = { path = "pallets/motion", default-features = false } pallet-nfts = { path = "pallets/nfts", default-features = false } pop-chain-extension = { path = "./extension", default-features = false } diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml new file mode 100644 index 000000000..bf75b4269 --- /dev/null +++ b/pallets/api-vnext/Cargo.toml @@ -0,0 +1,40 @@ +[package] +authors.workspace = true +description = "API pallet, enabling smart(er) contracts with the power of Polkadot" +edition.workspace = true +homepage.workspace = true +license.workspace = true +name = "pallet-api-vnext" +repository.workspace = true +version = "0.1.0" + +[dependencies] +codec.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-assets = { workspace = true, default-features = false, optional = true } +pallet-revive = { workspace = true, default-features = false } +scale-info.workspace = true + +[dev-dependencies] +pallet-balances.workspace = true +pallet-timestamp.workspace = true +sp-io.workspace = true + +[features] +default = [ "fungibles", "std" ] +fungibles = [ "pallet-assets" ] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", +] +std = [ + "frame-support/std", + "frame-system/std", + "pallet-assets?/std", + "pallet-balances/std", + "pallet-revive/std", + "pallet-timestamp/std", + "sp-io/std", +] diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs new file mode 100644 index 000000000..b918ba3b8 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -0,0 +1,147 @@ +use core::cmp::Ordering::{Equal, Greater, Less}; + +use frame_support::{ + dispatch::{DispatchResult, DispatchResultWithPostInfo, WithPostDispatchInfo}, + pallet_prelude::{DispatchError, Zero}, + sp_runtime::Saturating, + traits::fungibles::{approvals::Inspect as _, Inspect as _}, + weights::Weight, +}; +use frame_system::{ensure_signed, pallet_prelude::OriginFor}; +use pallet_assets::{Config, NextAssetId}; +use AddressMatcher::Fixed; + +use super::*; + +pub mod precompiles; + +type AssetIdOf = >::AssetId; +type BalanceOf = >::Balance; + +fn approve, I>( + origin: OriginFor, + asset: AssetIdOf, + spender: AccountIdOf, + value: BalanceOf, +) -> DispatchResultWithPostInfo { + // TODO: weights + let owner = ensure_signed(origin.clone()).map_err(|e| e.with_weight(Weight::zero()))?; + let current_allowance = >::allowance(asset.clone(), &owner, &spender); + + let weight = match value.cmp(¤t_allowance) { + // If the new value is equal to the current allowance, do nothing. + Equal => Weight::zero(), + // If the new value is greater than the current allowance, approve the difference + // because `approve_transfer` works additively (see `pallet-assets`). + Greater => { + >::approve_transfer( + origin, + asset.into(), + T::Lookup::unlookup(spender), + value.saturating_sub(current_allowance), + ) + .map_err(|e| e.with_weight(Weight::zero()))?; + Weight::zero() + }, + // If the new value is less than the current allowance, cancel the approval and + // set the new value. + Less => { + let spender_source = T::Lookup::unlookup(spender); + >::cancel_approval( + origin.clone(), + asset.clone().into(), + spender_source.clone(), + ) + .map_err(|e| e.with_weight(Weight::zero()))?; + if value.is_zero() { + Weight::zero() + } else { + >::approve_transfer(origin, asset.into(), spender_source, value)?; + Weight::zero() + } + }, + }; + Ok(Some(weight).into()) +} + +fn burn, I>( + origin: OriginFor, + asset: AssetIdOf, + account: AccountIdOf, + value: BalanceOf, +) -> DispatchResultWithPostInfo { + let current_balance = >::balance(asset.clone(), &account); + if current_balance < value { + return Err(pallet_assets::Error::::BalanceLow + // TODO: weight: ::WeightInfo::balance_of() + .with_weight(Weight::zero())); + } + >::burn(origin, asset.into(), T::Lookup::unlookup(account.clone()), value)?; + Ok(().into()) +} + +fn clear_metadata, I>(origin: OriginFor, asset: AssetIdOf) -> DispatchResult { + >::clear_metadata(origin, asset.into()) +} + +fn create, I>( + origin: OriginFor, + admin: AccountIdOf, + min_balance: BalanceOf, +) -> Result, DispatchError> { + let id = NextAssetId::::get().unwrap_or_default(); + >::create(origin, id.clone().into(), T::Lookup::unlookup(admin), min_balance)?; + Ok(id) +} + +fn exists, I>(asset: AssetIdOf) -> bool { + >::asset_exists(asset) +} + +fn mint, I>( + origin: OriginFor, + asset: AssetIdOf, + account: AccountIdOf, + value: BalanceOf, +) -> DispatchResult { + >::mint(origin, asset.into(), T::Lookup::unlookup(account), value) +} + +fn set_metadata, I>( + origin: OriginFor, + asset: AssetIdOf, + name: Vec, + symbol: Vec, + decimals: u8, +) -> DispatchResult { + >::set_metadata(origin, asset.into(), name, symbol, decimals) +} + +fn start_destroy, I>(origin: OriginFor, asset: AssetIdOf) -> DispatchResult { + >::start_destroy(origin, asset.into()) +} + +fn transfer, I>( + origin: OriginFor, + asset: AssetIdOf, + to: AccountIdOf, + value: BalanceOf, +) -> DispatchResult { + >::transfer(origin, asset.into(), T::Lookup::unlookup(to.clone()), value) +} + +fn transfer_from, I>( + origin: OriginFor, + asset: AssetIdOf, + from: AccountIdOf, + to: AccountIdOf, + value: BalanceOf, +) -> DispatchResult { + >::transfer_approved( + origin, + asset.into(), + T::Lookup::unlookup(from), + T::Lookup::unlookup(to), + value, + ) +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs new file mode 100644 index 000000000..ac16fc672 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -0,0 +1,401 @@ +use alloc::string::String; + +use frame_support::{ + sp_runtime::{traits::AtLeast32Bit, TokenError}, + traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, +}; +use pallet_revive::precompiles::alloy::primitives::ruint::UintTryFrom; +use AddressMatcher::Prefix; +use IERC20::*; + +use super::*; + +sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); + +/// Precompile providing an interface of the ERC-20 standard as defined in the ERC. +pub struct Erc20(PhantomData<(T, I)>); +impl< + const PREFIX: u16, + T: frame_system::Config + Config + pallet_revive::Config, + I: 'static, + > Precompile for Erc20 +where + U256: UintTryFrom + UintTryTo, +{ + type Interface = IERC20Calls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Prefix(NonZero::new(PREFIX).expect("expected non-zero precompile address")); + + fn call( + address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, Error> { + use IERC20::{IERC20Calls::*, *}; + + let id: AssetIdOf = u32::from_be_bytes( + address[..4] + .try_into() + .map_err(|_| DispatchError::Token(TokenError::UnknownAsset))?, + ) + .into(); + + match input { + // IERC20 + totalSupply(_) => { + // TODO: charge based on benchmarked weight + let total_supply = U256::saturating_from(>::total_supply(id)); + Ok(totalSupplyCall::abi_encode_returns(&(total_supply,))) + }, + balanceOf(balanceOfCall { account }) => { + // TODO: charge based on benchmarked weight + let account = env.to_account_id(&(*account.0).into()); + let balance = U256::saturating_from(>::balance(id, account)); + Ok(balanceOfCall::abi_encode_returns(&(balance,))) + }, + transfer(transferCall { to, value }) => { + // TODO: charge based on benchmarked weight + let from = >::to_address(env.caller().account_id()?).0.into(); + + super::transfer::( + to_runtime_origin(env.caller()), + id, + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + let value = value.clone(); + deposit_event::(env, address, Transfer { from, to: to.clone(), value }); + Ok(transferCall::abi_encode_returns(&(true,))) + }, + allowance(allowanceCall { owner, spender }) => { + // TODO: charge based on benchmarked weight + let owner = env.to_account_id(&(*owner.0).into()); + let spender = env.to_account_id(&(*spender.0).into()); + let remaining = + U256::saturating_from(>::allowance(id, &owner, &spender)); + Ok(allowanceCall::abi_encode_returns(&(remaining,))) + }, + approve(approveCall { spender, value }) => { + // TODO: charge based on benchmarked weight + let owner = >::to_address(env.caller().account_id()?).0.into(); + + super::approve::( + to_runtime_origin(env.caller()), + id, + env.to_account_id(&(*spender.0).into()), + value.saturating_to(), + ) // TODO: adjust weight + .map_err(|e| e.error)?; + + let event = Approval { owner, spender: spender.clone(), value: value.clone() }; + deposit_event(env, address, event); + Ok(approveCall::abi_encode_returns(&(true,))) + }, + transferFrom(transferFromCall { from, to, value }) => { + // TODO: charge based on benchmarked weight + + transfer_from::( + to_runtime_origin(env.caller()), + id.into(), + env.to_account_id(&(*from.0).into()), + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + let from = from.clone(); + let value = value.clone(); + deposit_event(env, address, Transfer { from, to: to.clone(), value }); + Ok(transferFromCall::abi_encode_returns(&(true,))) + }, + // IERC20Metadata + name(_) => { + // TODO: charge based on benchmarked weight + let result = >::name(id); + // TODO: improve + let result = String::from_utf8_lossy(result.as_slice()); + Ok(nameCall::abi_encode_returns(&(result,))) + }, + symbol(_) => { + // TODO: charge based on benchmarked weight + let result = >::symbol(id); + // TODO: improve + let result = String::from_utf8_lossy(result.as_slice()); + Ok(symbolCall::abi_encode_returns(&(result,))) + }, + decimals(_) => { + // TODO: charge based on benchmarked weight + let result = >::decimals(id); + Ok(decimalsCall::abi_encode_returns(&(result,))) + }, + } + } +} + +impl, I: 'static> Erc20 { + pub fn address(id: u32) -> [u8; 20] { + prefixed_address(PREFIX, id) + } +} + +#[cfg(test)] +mod tests { + use frame_support::{assert_ok, sp_runtime::app_crypto::sp_core::bytes::to_hex}; + use mock::Test; + use pallet_assets::Instance1; + use pallet_revive::{ + precompiles::{alloy::sol_types::SolType, ExtWithInfo}, + test_utils::{ALICE, ALICE_ADDR, BOB, BOB_ADDR}, + }; + use IERC20Calls::*; + use IERC20::{Approval, Transfer}; + + use super::*; + use crate::mock::{ExtBuilder, RuntimeOrigin}; + + const ERC20: u16 = 101; + + type Assets = mock::Assets; + type Erc20 = super::Erc20; + + #[test] + fn total_supply_works() { + let id = u32::MAX; + let total_supply = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_balances(vec![(id, ALICE, total_supply)]) + .build_with_env(|mut call_setup| { + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + id, + &totalSupply(totalSupplyCall {}) + ) + .unwrap(), + U256::from(total_supply) + ); + }); + } + + #[test] + fn balance_of_works() { + let id = u32::MAX; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_balances(vec![(id, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + id, + &balanceOf(balanceOfCall { account: ALICE_ADDR.0.into() }) + ) + .unwrap(), + U256::from(endowment) + ); + + assert_eq!(Assets::balance(id, ALICE), endowment); + }); + } + + #[test] + fn transfer_works() { + let id = u32::MAX; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(id, BOB, true, 1)]) + .with_asset_balances(vec![(id, BOB, endowment)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(BOB)); + assert_eq!(Assets::balance(id, BOB), endowment); + assert_eq!(Assets::balance(id, ALICE), 0); + + let value = endowment / 2; + assert!(call_precompile::( + &mut call_setup.ext().0, + id, + &IERC20Calls::transfer(IERC20::transferCall { + to: ALICE_ADDR.0.into(), + value: U256::from(value) + }) + ) + .unwrap()); + + assert_eq!(Assets::balance(id, BOB), endowment - value); + assert_eq!(Assets::balance(id, ALICE), value); + let from = BOB_ADDR.0.into(); + let to = ALICE_ADDR.0.into(); + let event = Transfer { from, to, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, id), event); + }); + } + + #[test] + fn allowance_works() { + let id = u32::MAX; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + assert_ok!(super::approve::( + RuntimeOrigin::signed(ALICE), + id, + BOB, + value + )); + + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + id, + &allowance(allowanceCall { + owner: ALICE_ADDR.0.into(), + spender: BOB_ADDR.0.into(), + }) + ) + .unwrap(), + U256::from(value) + ); + }, + ); + } + + #[test] + fn approve_works() { + let id = u32::MAX; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + + assert_eq!(Assets::allowance(id, &ALICE, &BOB), 0); + + assert!(call_precompile::( + &mut call_setup.ext().0, + id, + &IERC20Calls::approve(IERC20::approveCall { + spender: BOB_ADDR.0.into(), + value: U256::from(value) + }) + ) + .unwrap()); + + assert_eq!(Assets::allowance(id, &ALICE, &BOB), value); + let owner = ALICE_ADDR.0.into(); + let spender = BOB_ADDR.0.into(); + let event = Approval { owner, spender, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, id), event); + }, + ); + } + + #[test] + fn transfer_from_works() { + let id = u32::MAX; + let endowment = 10_000_000; + let value = endowment / 2; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, true, 1)]) + .with_asset_balances(vec![(id, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + assert_eq!(Assets::balance(id, ALICE), endowment); + assert_eq!(Assets::balance(id, BOB), 0); + assert_ok!(super::approve::( + RuntimeOrigin::signed(ALICE), + id, + BOB, + value + )); + call_setup.set_origin(Origin::Signed(BOB)); + + assert!(call_precompile::( + &mut call_setup.ext().0, + id, + &transferFrom(IERC20::transferFromCall { + from: ALICE_ADDR.0.into(), + to: BOB_ADDR.0.into(), + value: U256::from(value), + }) + ) + .unwrap()); + + assert_eq!(Assets::balance(id, ALICE), endowment - value); + assert_eq!(Assets::balance(id, BOB), value); + let from = ALICE_ADDR.0.into(); + let to = BOB_ADDR.0.into(); + let event = Transfer { from, to, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, id), event); + }); + } + + #[test] + fn name_works() { + let id = u32::MAX; + let _name = "name"; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_metadata(vec![(id, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) + .build_with_env(|mut call_setup| { + assert_eq!( + call_precompile::(&mut call_setup.ext().0, id, &name(nameCall {})) + .unwrap() + .as_str(), + _name + ); + }); + } + + #[test] + fn symbol_works() { + let id = u32::MAX; + let _symbol = "symbol"; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_metadata(vec![(id, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) + .build_with_env(|mut call_setup| { + assert_eq!( + call_precompile::(&mut call_setup.ext().0, id, &symbol(symbolCall {})) + .unwrap() + .as_str(), + _symbol + ); + }); + } + + #[test] + fn decimals_works() { + let id = u32::MAX; + let _decimals = u8::MAX; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_metadata(vec![(id, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) + .build_with_env(|mut call_setup| { + let mut ext = call_setup.ext().0; + assert_eq!( + call_precompile::(&mut ext, id, &decimals(decimalsCall {})).unwrap() as u8, + _decimals + ); + }); + } + + #[test] + fn selectors_match_standard() { + assert_eq!(to_hex(&decimalsCall::SELECTOR, false), "0x313ce567"); + assert_eq!(to_hex(&nameCall::SELECTOR, false), "0x06fdde03"); + assert_eq!(to_hex(&symbolCall::SELECTOR, false), "0x95d89b41"); + } + + fn call_precompile::RustType>>( + ext: &mut impl ExtWithInfo, + id: u32, + input: &IERC20Calls, + ) -> Result { + super::call_precompile::(ext, &prefixed_address(ERC20, id), input) + } +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol new file mode 100644 index 000000000..48a9395a1 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol @@ -0,0 +1,83 @@ +/** + * @dev Interface of the ERC-20 standard as defined in the ERC. + * Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol + */ +interface IERC20 { + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. + * `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); + + /** + * @dev Returns the value of tokens in existence. + */ + function totalSupply() external view returns (uint256); + /** + * @dev Returns the value of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + /** + * @dev Moves a `value` amount of tokens from the caller's account to `to`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address to, uint256 value) external returns (bool); + /** + * @dev Returns the remaining number of tokens that `spender` will be allowed to spend on + * behalf of `owner` through {transferFrom}. This is zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + /** + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the caller's + * tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk that + * someone may use both the old and the new allowance by unfortunate transaction ordering. + * One possible solution to mitigate this race condition is to first reduce the spender's + * allowance to 0 and set the desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event.\ + */ + function approve(address spender, uint256 value) external returns (bool); + /** + * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. + * `value` is then deducted from the caller's allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 value) external returns (bool); + + // Extensions: `sol!` macro does not support inheritance, so extensions need to be included in same interface + + // IERC20Metadata: Interface for the optional metadata functions from the ERC-20 standard. + // Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol + + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + /** + * @dev Returns the symbol of the token. + */ + function symbol() external view returns (string memory); + /** + * @dev Returns the decimals places of the token. + */ + function decimals() external view returns (uint8); +} \ No newline at end of file diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol new file mode 100644 index 000000000..0b37600c1 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol @@ -0,0 +1,60 @@ +/** + * @dev The fungibles precompile offers a streamlined interface for interacting with fungible tokens. The goal is to + * provide a simplified, consistent API that adheres to standards in the smart contract space. + */ +// TODO: consider size of id -> uint256 (word) +interface IFungibles { + /** + * @dev Create a new token with an automatically generated identifier. + */ + function create(address admin, uint256 minBalance) external returns (uint32 id); + /** + * @dev Set the metadata for a token. + */ + function setMetadata(uint32 id, string name, string symbol, uint8 decimals) external; + /** + * @dev Clear the metadata for a token. + */ + function clearMetadata(uint32 id) external; + /** + * @dev Creates `value` amount of tokens and assigns them to `account`, increasing the total supply. + */ + function mint(uint32 id, address account, uint256 value) external; + /** + * @dev Transfers `value` amount of tokens from the caller's account to account `to`. + */ + function transfer(uint32 id, address to, uint256 value) external; + /** + * @dev Approves `spender` to spend `value` amount of tokens on behalf of the caller. + */ + function approve(uint32 id, address spender, uint256 value) external; + /** + * @dev Transfers `value` amount tokens on behalf of `from` to account `to`. + */ + function transferFrom(uint32 id, address from, address to, uint256 value) external; + /** + * @dev Destroys `value` amount of tokens from `account`, reducing the total supply. + */ + function burn(uint32 id, address account, uint256 value) external; + /** + * @dev Start the process of destroying a token. + */ + function startDestroy(uint32 id) external; + /** + * @dev Whether a specified token exists. + */ + function exists(uint32 id) external view returns (bool); + + /** + * @dev Event emitted when allowance by `owner` to `spender` changes. + */ + event Approval(uint32 id, address owner, address spender, uint256 value); + /** + * @dev Event emitted when a token is created. + */ + event Created(uint32 id, address creator, address admin); + /** + * @dev Event emitted when a token transfer occurs. + */ + event Transfer(uint32 indexed id, address indexed from, address indexed to, uint256 value); +} \ No newline at end of file diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs new file mode 100644 index 000000000..e4a0d9b0c --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -0,0 +1,569 @@ +pub use erc20::{Erc20, IERC20}; +use pallet_revive::precompiles::alloy::{ + primitives::{ruint::UintTryTo, Address}, + sol_types::SolCall, +}; +use IFungibles::*; + +use super::*; + +mod erc20; + +sol!("src/fungibles/precompiles/interfaces/IFungibles.sol"); + +/// The fungibles precompile offers a streamlined interface for interacting with fungible tokens. +/// The goal is to provide a simplified, consistent API that adheres to standards in the smart +/// contract space. +pub struct Fungibles(PhantomData<(T, I)>); +impl< + const FIXED: u16, + T: frame_system::Config + + Config + Into> + + pallet_revive::Config, + I: 'static, + > Precompile for Fungibles +where + U256: UintTryTo<>::Balance>, +{ + type Interface = IFungiblesCalls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Fixed(NonZero::new(FIXED).expect("expected non-zero precompile address")); + + fn call( + address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, Error> { + use IFungibles::IFungiblesCalls::*; + match input { + create(createCall { admin, minBalance }) => { + // TODO: charge based on benchmarked weight + let creator = >::to_address(env.caller().account_id()?).0.into(); + + let id = self::create::( + to_runtime_origin(env.caller()), + env.to_account_id(&(*admin.0).into()), + minBalance.saturating_to(), + )? + .into(); + + deposit_event(env, address, Created { id, creator, admin: admin.clone() }); + Ok(createCall::abi_encode_returns(&(id,))) + }, + mint(mintCall { id, account, value }) => { + // TODO: charge based on benchmarked weight + + self::mint::( + to_runtime_origin(env.caller()), + (*id).into(), + env.to_account_id(&(*account.0).into()), + value.saturating_to(), + )?; + + let from = Address::default(); + let to = account.clone(); + deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + Ok(mintCall::abi_encode_returns(&())) + }, + transfer(transferCall { id, to, value }) => { + // TODO: charge based on benchmarked weight + let from = >::to_address(env.caller().account_id()?).0.into(); + + self::transfer::( + to_runtime_origin(env.caller()), + (*id).into(), + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + let to = to.clone(); + deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + Ok(transferCall::abi_encode_returns(&())) + }, + approve(approveCall { id, spender, value }) => { + // TODO: charge based on benchmarked weight + let owner = >::to_address(env.caller().account_id()?).0.into(); + + self::approve::( + to_runtime_origin(env.caller()), + (*id).into(), + env.to_account_id(&(*spender.0).into()), + value.saturating_to(), + ) // TODO: adjust weight + .map_err(|e| e.error)?; + + let spender = spender.clone(); + let value = value.clone(); + deposit_event(env, address, Approval { id: *id, owner, spender, value }); + Ok(approveCall::abi_encode_returns(&())) + }, + transferFrom(transferFromCall { id, from, to, value }) => { + // TODO: charge based on benchmarked weight + + transfer_from::( + to_runtime_origin(env.caller()), + (*id).into(), + env.to_account_id(&(*from.0).into()), + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + let from = from.clone(); + let value = value.clone(); + deposit_event(env, address, Transfer { id: *id, from, to: to.clone(), value }); + Ok(transferFromCall::abi_encode_returns(&())) + }, + burn(burnCall { id, account, value }) => { + // TODO: charge based on benchmarked weight + + self::burn::( + to_runtime_origin(env.caller()), + (*id).into(), + env.to_account_id(&(*account.0).into()), + value.saturating_to(), + ) // TODO: adjust weight + .map_err(|e| e.error)?; + + let from = account.clone(); + let to = Address::default(); + deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + Ok(burnCall::abi_encode_returns(&())) + }, + startDestroy(startDestroyCall { id }) => { + // TODO: charge based on benchmarked weight + start_destroy::(to_runtime_origin(env.caller()), (*id).into())?; + Ok(startDestroyCall::abi_encode_returns(&())) + }, + exists(existsCall { id }) => { + let result = self::exists::((*id).into()); + Ok(existsCall::abi_encode_returns(&(result,))) + }, + setMetadata(setMetadataCall { id, name, symbol, decimals }) => { + // TODO: charge based on benchmarked weight + set_metadata::( + to_runtime_origin(env.caller()), + (*id).into(), + name.as_bytes().to_vec(), + symbol.as_bytes().to_vec(), + *decimals, + )?; + Ok(setMetadataCall::abi_encode_returns(&())) + }, + clearMetadata(clearMetadataCall { id }) => { + // TODO: charge based on benchmarked weight + clear_metadata::(to_runtime_origin(env.caller()), (*id).into())?; + Ok(clearMetadataCall::abi_encode_returns(&())) + }, + } + } +} + +impl, I: 'static> Fungibles { + pub const fn address() -> [u8; 20] { + fixed_address(FIXED) + } +} + +#[cfg(test)] +mod tests { + use frame_support::{assert_ok, traits::fungibles::Inspect, weights::Weight, BoundedVec}; + use mock::{Assets, ExtBuilder, *}; + use pallet_assets::{AssetDetails, AssetMetadata, AssetStatus, Instance1}; + use pallet_revive::{ + precompiles::{ + alloy::sol_types::{SolInterface, SolType}, + ExtWithInfo, + }, + test_utils::{ALICE_ADDR, BOB, BOB_ADDR}, + DepositLimit::*, + }; + + use super::{ + IFungibles::IFungiblesCalls::{clearMetadata, setMetadata, startDestroy}, + *, + }; + + const FUNGIBLES: u16 = 100; + const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); + + type Asset = pallet_assets::Asset; + type Fungibles = super::Fungibles; + type Metadata = pallet_assets::Metadata; + + #[test] + fn create_works() { + let id = 0u32; + let min_balance = 1; + ExtBuilder::new().build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert!(!Assets::asset_exists(id)); + + let mut ext = call_setup.ext().0; + let result: u32 = call_precompile( + &mut ext, + &IFungiblesCalls::create(createCall { + admin: BOB_ADDR.0.into(), + minBalance: U256::from(min_balance), + }), + ) + .unwrap(); + + assert_eq!(result, id); + assert!(Assets::asset_exists(id)); + assert_eq!( + Asset::get(id).unwrap(), + AssetDetails { + owner: ALICE, + issuer: BOB, + admin: BOB, + freezer: BOB, + supply: 0, + deposit: min_balance, + min_balance, + is_sufficient: false, + accounts: 0, + sufficients: 0, + approvals: 0, + status: AssetStatus::Live, + } + ); + + let event = Created { id, creator: ALICE_ADDR.0.into(), admin: BOB_ADDR.0.into() }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn create_via_bare_call_works() { + let id = 0u32; + let origin = RuntimeOrigin::signed(ALICE); + ExtBuilder::new().build().execute_with(|| { + assert!(!Assets::asset_exists(id)); + + let result = bare_call::( + origin, + ADDRESS.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + IFungiblesCalls::create(createCall { + admin: BOB_ADDR.0.into(), + minBalance: U256::from(1), + }) + .abi_encode(), + ) + .unwrap(); + + assert_eq!(result, id); + assert!(Assets::asset_exists(id)); + let event = Created { id, creator: ALICE_ADDR.0.into(), admin: BOB_ADDR.0.into() }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn mint_works() { + let id = 1; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::balance(id, ALICE), 0); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::mint(mintCall { + id, + account: ALICE_ADDR.0.into(), + value: U256::from(value) + }) + )); + + assert_eq!(Assets::balance(id, ALICE), value); + let from = Address::default(); + let to = ALICE_ADDR.0.into(); + let event = Transfer { id, from, to, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }, + ); + } + + #[test] + fn transfer_works() { + let id = 1; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, true, 1)]) + .with_asset_balances(vec![(id, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::balance(id, ALICE), endowment); + assert_eq!(Assets::balance(id, BOB), 0); + + let value = endowment / 2; + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::transfer(transferCall { + id, + to: BOB_ADDR.0.into(), + value: U256::from(value) + }) + )); + + assert_eq!(Assets::balance(id, ALICE), endowment - value); + assert_eq!(Assets::balance(id, BOB), value); + + let from = ALICE_ADDR.0.into(); + let to = BOB_ADDR.0.into(); + let event = Transfer { id, from, to, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn approve_works() { + let id = 1; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::allowance(id, &ALICE, &BOB), 0); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::approve(approveCall { + id, + spender: BOB_ADDR.0.into(), + value: U256::from(value), + }) + )); + + assert_eq!(Assets::allowance(id, &ALICE, &BOB), value); + let owner = ALICE_ADDR.0.into(); + let spender = BOB_ADDR.0.into(); + let event = Approval { id, owner, spender, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }, + ); + } + + #[test] + fn transfer_from_works() { + let id = 1; + let endowment = 10_000_000; + let value = endowment / 2; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, true, 1)]) + .with_asset_balances(vec![(id, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + assert_eq!(Assets::balance(id, ALICE), endowment); + assert_eq!(Assets::balance(id, BOB), 0); + assert_ok!(approve::( + RuntimeOrigin::signed(ALICE), + id, + BOB, + value + )); + call_setup.set_origin(Origin::Signed(BOB)); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::transferFrom(transferFromCall { + id, + from: ALICE_ADDR.0.into(), + to: BOB_ADDR.0.into(), + value: U256::from(value), + }) + )); + + assert_eq!(Assets::balance(id, ALICE), endowment - value); + assert_eq!(Assets::balance(id, BOB), value); + let from = ALICE_ADDR.0.into(); + let to = BOB_ADDR.0.into(); + let event = Transfer { id, from, to, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn burn_works() { + let id = 1; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_balances(vec![(id, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::balance(id, ALICE), endowment); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::burn(burnCall { + id, + account: ALICE_ADDR.0.into(), + value: U256::from(endowment), + }), + )); + + assert_eq!(Assets::balance(id, ALICE), 0); + let from = ALICE_ADDR.0.into(); + let to = Address::default(); + let event = Transfer { id, from, to, value: U256::from(endowment) }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn start_destroy_works() { + let id = 1; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Asset::get(id).unwrap().status, AssetStatus::Live); + + let mut ext = call_setup.ext().0; + assert_ok!(call_precompile::<()>(&mut ext, &startDestroy(startDestroyCall { id }))); + + assert_eq!(Asset::get(id).unwrap().status, AssetStatus::Destroying); + }, + ); + } + + #[test] + fn exists_works() { + let id = 1; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert!(Assets::asset_exists(id)); + + let mut ext = call_setup.ext().0; + assert!(call_precompile::( + &mut ext, + &IFungiblesCalls::exists(existsCall { id }) + ) + .unwrap()); + + let id = id + 1; + assert!(!Assets::asset_exists(id)); + assert!(!call_precompile::( + &mut ext, + &IFungiblesCalls::exists(existsCall { id }) + ) + .unwrap()); + }, + ); + } + + #[test] + fn exists_via_bare_call_works() { + let id = 1; + let origin = RuntimeOrigin::signed(ALICE); + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .build() + .execute_with(|| { + assert!(Assets::asset_exists(id)); + + let asset_exists = bare_call::( + origin.clone(), + ADDRESS.into(), + 0, + Weight::MAX, + Unchecked, + IFungiblesCalls::exists(existsCall { id }).abi_encode(), + ) + .unwrap(); + assert!(asset_exists); + + let id = id + 1; + assert!(!Assets::asset_exists(id)); + let exists = bare_call::( + origin, + ADDRESS.into(), + 0, + Weight::MAX, + Unchecked, + IFungiblesCalls::exists(existsCall { id }).abi_encode(), + ) + .unwrap(); + assert!(!exists); + }); + } + + #[test] + fn set_metadata_works() { + let id = 1; + let name = "name".to_string(); + let symbol = "symbol".to_string(); + let decimals = u8::MAX; + ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Metadata::get(id), AssetMetadata::default()); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &setMetadata(setMetadataCall { + id, + name: name.clone(), + symbol: symbol.clone(), + decimals + }) + )); + + assert_eq!( + Metadata::get(id), + AssetMetadata { + deposit: 11, + name: BoundedVec::truncate_from(name.into_bytes()), + symbol: BoundedVec::truncate_from(symbol.into_bytes()), + decimals, + is_frozen: false, + } + ); + }, + ); + } + + #[test] + fn clear_metadata_works() { + let id = 1; + let name = b"name".to_vec(); + let symbol = b"symbol".to_vec(); + let decimals = u8::MAX; + ExtBuilder::new() + .with_assets(vec![(id, ALICE, false, 1)]) + .with_asset_metadata(vec![(id, name.clone(), symbol.clone(), decimals)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!( + Metadata::get(id), + AssetMetadata { + deposit: 0, + name: BoundedVec::truncate_from(name), + symbol: BoundedVec::truncate_from(symbol), + decimals, + is_frozen: false, + } + ); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &clearMetadata(clearMetadataCall { id }) + )); + + assert_eq!(Metadata::get(id), AssetMetadata::default()); + }); + } + + fn call_precompile::RustType>>( + ext: &mut impl ExtWithInfo, + input: &IFungiblesCalls, + ) -> Result { + super::call_precompile::(ext, &ADDRESS, input) + } +} diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs new file mode 100644 index 000000000..f5edb0410 --- /dev/null +++ b/pallets/api-vnext/src/lib.rs @@ -0,0 +1,146 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; + +use alloc::vec::Vec; +use core::{convert::Into, marker::PhantomData, num::NonZero}; + +use frame_support::{dispatch::RawOrigin, sp_runtime::traits::StaticLookup}; +#[cfg(feature = "fungibles")] +pub use fungibles::precompiles::{Erc20, Fungibles}; +pub use pallet_revive::precompiles::alloy::primitives::U256; +use pallet_revive::{ + evm::{H160, H256}, + precompiles::{ + alloy::{sol, sol_types::SolEvent}, + AddressMatcher, Error, Ext, Precompile, + }, + AddressMapper as _, Config, Origin, +}; +#[cfg(test)] +use { + frame_support::{ + pallet_prelude::{DispatchError, Weight}, + sp_runtime::traits::Bounded, + }, + frame_system::pallet_prelude::OriginFor, + pallet_revive::{precompiles::alloy::sol_types::SolValue, BalanceOf, DepositLimit, MomentOf}, +}; + +#[cfg(feature = "fungibles")] +pub mod fungibles; +#[cfg(test)] +mod mock; + +type AccountIdOf = ::AccountId; +type AddressMapper = ::AddressMapper; +type Assets = pallet_assets::Pallet; + +// A bare call to a contract. +#[cfg(test)] +fn bare_call< + T: Config, + O: SolValue + + From<::RustType>, +>( + origin: OriginFor, + dest: H160, + value: BalanceOf, + gas_limit: Weight, + storage_deposit_limit: DepositLimit>, + data: Vec, +) -> Result +where + BalanceOf: Into + TryFrom + Bounded, + MomentOf: Into, + T::Hash: frame_support::traits::IsType, +{ + let result = pallet_revive::Pallet::::bare_call( + origin, + dest, + value, + gas_limit, + storage_deposit_limit, + data, + ) + .result?; + assert!(!result.did_revert()); + Ok(decode::(&result.data)) +} + +// A direct call to a precompile. +#[cfg(test)] +fn call_precompile< + P: Precompile, + O: SolValue + + From<::RustType>, +>( + ext: &mut impl pallet_revive::precompiles::ExtWithInfo, + address: &[u8; 20], + input: &P::Interface, +) -> Result { + pallet_revive::precompiles::run::precompile::(ext, address, input).map(|o| decode(&o)) +} + +#[cfg(test)] +fn decode< + T: SolValue + + From<::RustType>, +>( + data: &[u8], +) -> T { + T::abi_decode(data, true).expect("unable to decode") +} + +fn deposit_event( + _env: &mut impl Ext, + address: impl Into, + event: impl SolEvent, +) { + // TODO: ensure that env.deposit_event impl is correct + let topics = topics(&event); + let data = event.encode_data(); + // env.deposit_event(topics, data); + // TODO: charge gas + // Workaround to emit events explicitly as precompile, as env.deposit uses derived address of + // dummy contract when using `CallSetup` within tests + let revive_event = + pallet_revive::Event::ContractEmitted { contract: address.into(), data, topics }; + >::deposit_event(::RuntimeEvent::from(revive_event)) +} + +#[cfg(test)] +fn assert_last_event(address: impl Into, event: impl SolEvent) { + mock::System::assert_last_event( + pallet_revive::Event::ContractEmitted { + contract: address.into(), + data: event.encode_data(), + topics: topics(&event), + } + .into(), + ) +} + +const fn fixed_address(n: u16) -> [u8; 20] { + AddressMatcher::Fixed(NonZero::new(n).unwrap()).base_address() +} + +fn prefixed_address(n: u16, prefix: u32) -> [u8; 20] { + let mut address = AddressMatcher::Prefix(NonZero::new(n).unwrap()).base_address(); + address[..4].copy_from_slice(&prefix.to_be_bytes()); + address +} + +// TODO: verify +fn topics(event: &impl SolEvent) -> Vec { + event.encode_topics().into_iter().map(|t| (*t.0).into()).collect() +} + +/// Creates a new `RuntimeOrigin` from an ['Origin']. +// TODO: upstream? +pub fn to_runtime_origin(o: Origin) -> T::RuntimeOrigin { + match o { + Origin::Root => RawOrigin::Root.into(), + Origin::Signed(account) => RawOrigin::Signed(account).into(), + } +} diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs new file mode 100644 index 000000000..566b76a58 --- /dev/null +++ b/pallets/api-vnext/src/mock.rs @@ -0,0 +1,141 @@ +use codec::Compact; +use frame_support::{ + derive_impl, + sp_runtime::{traits::AccountIdLookup, AccountId32, BuildStorage}, + traits::AsEnsureOriginWithArg, +}; +use frame_system::{EnsureRoot, EnsureSigned}; +use pallet_assets::AutoIncAssetId; +use pallet_revive::precompiles::run::CallSetup; +pub(crate) use pallet_revive::test_utils::ALICE; + +pub(crate) type Balance = u128; +type Block = frame_system::mocking::MockBlock; +type Erc20 = crate::Erc20; +type Fungibles = crate::Fungibles; + +#[frame_support::runtime] +mod runtime { + #[runtime::runtime] + #[runtime::derive( + RuntimeCall, + RuntimeEvent, + RuntimeError, + RuntimeOrigin, + RuntimeFreezeReason, + RuntimeHoldReason, + RuntimeSlashReason, + RuntimeLockId, + RuntimeTask, + RuntimeViewFunction + )] + pub struct Test; + + #[runtime::pallet_index(0)] + pub type Assets = pallet_assets::Pallet; + #[runtime::pallet_index(1)] + pub type Balances = pallet_balances::Pallet; + #[runtime::pallet_index(2)] + pub type Contracts = pallet_revive::Pallet; + #[runtime::pallet_index(3)] + pub type System = frame_system::Pallet; + #[runtime::pallet_index(4)] + pub type Timestamp = pallet_timestamp::Pallet; +} + +#[derive_impl(pallet_assets::config_preludes::TestDefaultConfig)] +impl pallet_assets::Config for Test { + type AssetIdParameter = Compact; + type Balance = Balance; + type CallbackHandle = AutoIncAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type Currency = Balances; + type ForceOrigin = EnsureRoot; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Test { + type AccountStore = System; + type Balance = Balance; +} + +#[derive_impl(pallet_revive::config_preludes::TestDefaultConfig)] +impl pallet_revive::Config for Test { + type AddressMapper = pallet_revive::AccountId32Mapper; + type Currency = Balances; + type Precompiles = + (Fungibles<100, pallet_assets::Instance1>, Erc20<101, pallet_assets::Instance1>); + type Time = Timestamp; +} + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +impl frame_system::Config for Test { + type AccountData = pallet_balances::AccountData; + type AccountId = AccountId32; + type Block = Block; + type Lookup = AccountIdLookup; +} + +#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)] +impl pallet_timestamp::Config for Test {} + +pub(crate) struct ExtBuilder { + assets: Option>, + asset_accounts: Option>, + asset_metadata: Option, Vec, u8)>>, +} +impl ExtBuilder { + pub(crate) fn new() -> Self { + Self { assets: None, asset_accounts: None, asset_metadata: None } + } + + pub(crate) fn with_assets(mut self, assets: Vec<(u32, AccountId32, bool, u128)>) -> Self { + self.assets = Some(assets); + self + } + + pub(crate) fn with_asset_balances(mut self, accounts: Vec<(u32, AccountId32, u128)>) -> Self { + self.asset_accounts = Some(accounts); + self + } + + pub(crate) fn with_asset_metadata( + mut self, + metadata: Vec<(u32, Vec, Vec, u8)>, + ) -> Self { + self.asset_metadata = Some(metadata); + self + } + + pub(crate) fn build(mut self) -> sp_io::TestExternalities { + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + + pallet_balances::GenesisConfig:: { + balances: vec![(ALICE, 10_000_000_000)], + ..Default::default() + } + .assimilate_storage(&mut t) + .unwrap(); + + pallet_assets::GenesisConfig:: { + assets: self.assets.take().unwrap_or_default(), + metadata: self.asset_metadata.take().unwrap_or_default(), + accounts: self.asset_accounts.take().unwrap_or_default(), + next_asset_id: Some(0), + } + .assimilate_storage(&mut t) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext + } + + pub(crate) fn build_with_env(self, execute: impl FnOnce(CallSetup) -> R) -> R { + self.build().execute_with(|| { + let call_setup = CallSetup::::default(); + // let (ext, _) = call_setup.ext(); + execute(call_setup) + }) + } +} From 1e3f7cce65a3baac40da54908b42ca00568372cf Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 28 May 2025 10:50:26 +0100 Subject: [PATCH 049/284] feat(devnet): add fungibles precompiles --- runtime/devnet/Cargo.toml | 3 + runtime/devnet/src/config/contracts.rs | 84 +++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index 79376a1c1..a9a76b6c4 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -25,6 +25,7 @@ smallvec.workspace = true # Local pallet-api.workspace = true +pallet-api-vnext = { workspace = true, features = [ "fungibles" ] } pallet-nfts.workspace = true pop-chain-extension.workspace = true pop-primitives.workspace = true @@ -106,6 +107,7 @@ pallet-ismp-runtime-api.workspace = true enumflags2.workspace = true env_logger.workspace = true hex.workspace = true +sp-keyring.workspace = true [features] default = [ "std" ] @@ -133,6 +135,7 @@ std = [ "ismp-parachain/std", "ismp/std", "log/std", + "pallet-api-vnext/std", "pallet-api/std", "pallet-assets/std", "pallet-aura/std", diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 23dbc8503..ae321d0c2 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -9,10 +9,13 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - deposit, Balance, Balances, Perbill, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, - Timestamp, TransactionPayment, + config::assets::TrustBackedAssetsInstance, deposit, Balance, Balances, Perbill, Runtime, + RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, TransactionPayment, }; +type Erc20 = pallet_api_vnext::Erc20; +type Fungibles = pallet_api_vnext::Fungibles; + fn schedule() -> pallet_contracts::Schedule { pallet_contracts::Schedule { limits: pallet_contracts::Limits { @@ -102,7 +105,8 @@ impl pallet_revive::Config for Runtime { type NativeToEthRatio = NativeToEthRatio; // 512 MB. Used in an integrity test that verifies the runtime has enough memory. type PVFMemory = ConstU32<{ 512 * 1024 * 1024 }>; - type Precompiles = (); + type Precompiles = + (Fungibles<100, TrustBackedAssetsInstance>, Erc20<101, TrustBackedAssetsInstance>); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -136,3 +140,77 @@ fn contracts_prevents_runtime_calls() { TypeId::of::() ); } + +#[cfg(test)] +mod tests { + use frame_support::{assert_ok, traits::fungible::Mutate}; + use pallet_api_vnext::{ + fungibles::precompiles::{IFungibles::*, IERC20}, + U256, + }; + use pallet_revive::{precompiles::alloy::sol_types::SolCall, AddressMapper}; + use sp_core::{bytes::to_hex, H160}; + use sp_keyring::Sr25519Keyring::{Alice, Bob}; + use sp_runtime::Weight; + + use super::*; + use crate::{Assets, Revive, RuntimeOrigin, System}; + + type AccountId32Mapper = pallet_revive::AccountId32Mapper; + type Asset = pallet_assets::Asset; + type NextAssetId = pallet_assets::NextAssetId; + + fn new_test_ext() -> sp_io::TestExternalities { + let mut ext = sp_io::TestExternalities::new_empty(); + ext.execute_with(|| { + System::set_block_number(1); + Balances::set_balance(&Alice.to_account_id(), 100 * UNIT); + Balances::set_balance(&Bob.to_account_id(), 1 * UNIT); + NextAssetId::put(1); + }); + ext + } + + #[test] + fn fungibles_precompiles_work() { + let caller = Alice.to_account_id(); + let origin = RuntimeOrigin::signed(caller.clone()); + let origin_addr: H160 = AccountId32Mapper::to_address(&Alice.to_account_id()); + let id = 1; + let fungibles_addr: H160 = Fungibles::<100, TrustBackedAssetsInstance>::address().into(); + let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(id).into(); + let total_supply: Balance = 10_000; + new_test_ext().execute_with(|| { + assert_ok!(Revive::map_account(origin.clone())); + assert_ok!(Revive::map_account(RuntimeOrigin::signed(Bob.to_account_id()))); + + // Create a token via fungibles precompile + println!("IFungibles precompile: {}", to_hex(&fungibles_addr.0, false)); + let call = + createCall { admin: origin_addr.0.into(), minBalance: U256::from(1) }.abi_encode(); + println!("IFungibles.create: {}", to_hex(&call, false)); + assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); + let asset_details = Asset::get(id).unwrap(); + assert_eq!(asset_details.owner, caller); + assert_eq!(asset_details.admin, caller); + + // Mint via fungibles precompile + let call = + mintCall { id, account: origin_addr.0.into(), value: U256::from(total_supply) } + .abi_encode(); + println!("IFungibles.mint: {}", to_hex(&call, false)); + assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); + + // Transfer via erc20 precompile + println!("IERC20 precompile: {}", to_hex(&erc20_addr.0, false)); + let call = IERC20::transferCall { + to: AccountId32Mapper::to_address(&Bob.to_account_id()).0.into(), + value: U256::from(total_supply / 2), + } + .abi_encode(); + println!("IERC20.transfer: {}", to_hex(&call, false)); + assert_ok!(Revive::call(origin.clone(), erc20_addr, 0, Weight::zero(), 0, call)); + assert_eq!(Assets::balance(id, &Bob.to_account_id()), total_supply / 2); + }) + } +} From 9f97485cf4aad80b6f7a52e104fe6016a53caae8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 28 May 2025 11:25:47 +0100 Subject: [PATCH 050/284] build(deps): propagate runtime-benchmarks feature --- pallets/api-vnext/Cargo.toml | 1 + runtime/devnet/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index bf75b4269..67d8c1cae 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -28,6 +28,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", + "pallet-revive/runtime-benchmarks", ] std = [ "frame-support/std", diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index a9a76b6c4..4931aa5ba 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -200,6 +200,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-api-vnext/runtime-benchmarks", "pallet-api/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", From 29699a5e6db2dc6be4a2569d75f95f5f0c81d222 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 28 May 2025 16:09:41 +0100 Subject: [PATCH 051/284] build: disable doctest based on incompatible comments in .sol files --- pallets/api-vnext/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index 67d8c1cae..fcb813991 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -8,6 +8,9 @@ name = "pallet-api-vnext" repository.workspace = true version = "0.1.0" +[lib] +doctest = false + [dependencies] codec.workspace = true frame-support.workspace = true From 4f7c95b2801c8fc6d9cc41366701103883e89a4b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 4 Jun 2025 10:15:25 +0100 Subject: [PATCH 052/284] fix(precompiles/interfaces): use calldata specifiers for string parameters --- .../precompiles/interfaces/IFungibles.sol | 63 +++++++++++++------ 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol index 0b37600c1..a27864dab 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol @@ -6,55 +6,82 @@ interface IFungibles { /** * @dev Create a new token with an automatically generated identifier. - */ - function create(address admin, uint256 minBalance) external returns (uint32 id); + */ + function create( + address admin, + uint256 minBalance + ) external returns (uint32 id); + /** * @dev Set the metadata for a token. - */ - function setMetadata(uint32 id, string name, string symbol, uint8 decimals) external; + */ + function setMetadata( + uint32 id, + string calldata name, + string calldata symbol, + uint8 decimals + ) external; + /** * @dev Clear the metadata for a token. - */ + */ function clearMetadata(uint32 id) external; + /** * @dev Creates `value` amount of tokens and assigns them to `account`, increasing the total supply. - */ + */ function mint(uint32 id, address account, uint256 value) external; + /** * @dev Transfers `value` amount of tokens from the caller's account to account `to`. - */ + */ function transfer(uint32 id, address to, uint256 value) external; + /** * @dev Approves `spender` to spend `value` amount of tokens on behalf of the caller. - */ + */ function approve(uint32 id, address spender, uint256 value) external; + /** * @dev Transfers `value` amount tokens on behalf of `from` to account `to`. - */ - function transferFrom(uint32 id, address from, address to, uint256 value) external; + */ + function transferFrom( + uint32 id, + address from, + address to, + uint256 value + ) external; + /** * @dev Destroys `value` amount of tokens from `account`, reducing the total supply. - */ + */ function burn(uint32 id, address account, uint256 value) external; + /** * @dev Start the process of destroying a token. - */ + */ function startDestroy(uint32 id) external; + /** * @dev Whether a specified token exists. - */ + */ function exists(uint32 id) external view returns (bool); /** * @dev Event emitted when allowance by `owner` to `spender` changes. - */ + */ event Approval(uint32 id, address owner, address spender, uint256 value); /** * @dev Event emitted when a token is created. - */ + */ event Created(uint32 id, address creator, address admin); /** * @dev Event emitted when a token transfer occurs. - */ - event Transfer(uint32 indexed id, address indexed from, address indexed to, uint256 value); -} \ No newline at end of file + */ + event Transfer( + uint32 indexed id, + address indexed from, + address indexed to, + uint256 value + ); +} From 0a5ab34297902a1a9ff589d4a5006924f58b5b2d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 4 Jun 2025 10:15:56 +0100 Subject: [PATCH 053/284] style(precompiles/interfaces): formatting --- .../precompiles/interfaces/IERC20.sol | 98 +++++++++++-------- 1 file changed, 58 insertions(+), 40 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol index 48a9395a1..08173ed8c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol @@ -5,63 +5,79 @@ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). - * - * Note that `value` may be zero. - */ + * + * Note that `value` may be zero. + */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. * `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); + */ + event Approval( + address indexed owner, + address indexed spender, + uint256 value + ); /** * @dev Returns the value of tokens in existence. - */ + */ function totalSupply() external view returns (uint256); + /** * @dev Returns the value of tokens owned by `account`. - */ + */ function balanceOf(address account) external view returns (uint256); + /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ function transfer(address to, uint256 value) external returns (bool); + /** * @dev Returns the remaining number of tokens that `spender` will be allowed to spend on - * behalf of `owner` through {transferFrom}. This is zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); + * behalf of `owner` through {transferFrom}. This is zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance( + address owner, + address spender + ) external view returns (uint256); + /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the caller's - * tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk that - * someone may use both the old and the new allowance by unfortunate transaction ordering. - * One possible solution to mitigate this race condition is to first reduce the spender's - * allowance to 0 and set the desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event.\ - */ + * tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk that + * someone may use both the old and the new allowance by unfortunate transaction ordering. + * One possible solution to mitigate this race condition is to first reduce the spender's + * allowance to 0 and set the desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event.\ + */ function approve(address spender, uint256 value) external returns (bool); + /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. - * `value` is then deducted from the caller's allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address from, address to, uint256 value) external returns (bool); + * `value` is then deducted from the caller's allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 value + ) external returns (bool); // Extensions: `sol!` macro does not support inheritance, so extensions need to be included in same interface @@ -70,14 +86,16 @@ interface IERC20 { /** * @dev Returns the name of the token. - */ + */ function name() external view returns (string memory); + /** * @dev Returns the symbol of the token. - */ + */ function symbol() external view returns (string memory); + /** * @dev Returns the decimals places of the token. - */ + */ function decimals() external view returns (uint8); -} \ No newline at end of file +} From 9f31adc4f2f5663376ce24619794ba933fe5533d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 4 Jun 2025 10:37:10 +0100 Subject: [PATCH 054/284] refactor: use upcoming assetidextractor from pallet-assets --- pallets/api-vnext/src/fungibles/mod.rs | 18 ++++++++++++++++++ .../src/fungibles/precompiles/erc20.rs | 9 ++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index b918ba3b8..3a9aa5472 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -145,3 +145,21 @@ fn transfer_from, I>( value, ) } + +// TODO: replace with type in pallet_assets once available in next release +pub struct InlineAssetIdExtractor; +impl AssetIdExtractor for InlineAssetIdExtractor { + type AssetId = u32; + + fn asset_id_from_address(addr: &[u8; 20]) -> Result { + let bytes: [u8; 4] = addr[0..4].try_into().expect("slice is 4 bytes; qed"); + let index = u32::from_be_bytes(bytes); + return Ok(index.into()); + } +} +/// Mean of extracting the asset id from the precompile address. +pub trait AssetIdExtractor { + type AssetId; + /// Extracts the asset id from the address. + fn asset_id_from_address(address: &[u8; 20]) -> Result; +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index ac16fc672..8ced57c70 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,7 +1,7 @@ use alloc::string::String; use frame_support::{ - sp_runtime::{traits::AtLeast32Bit, TokenError}, + sp_runtime::{traits::AtLeast32Bit}, traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, }; use pallet_revive::precompiles::alloy::primitives::ruint::UintTryFrom; @@ -36,12 +36,7 @@ where ) -> Result, Error> { use IERC20::{IERC20Calls::*, *}; - let id: AssetIdOf = u32::from_be_bytes( - address[..4] - .try_into() - .map_err(|_| DispatchError::Token(TokenError::UnknownAsset))?, - ) - .into(); + let id = InlineAssetIdExtractor::asset_id_from_address(address)?.into(); match input { // IERC20 From fc1296843384d5b5c02a6c8ab0db00f268710fd0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 4 Jun 2025 11:05:59 +0100 Subject: [PATCH 055/284] refactor(api-vnext): resolve clippy warnings --- pallets/api-vnext/src/fungibles/mod.rs | 2 +- .../src/fungibles/precompiles/erc20.rs | 11 ++++------ .../src/fungibles/precompiles/mod.rs | 21 +++++++------------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index 3a9aa5472..3131690cc 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -154,7 +154,7 @@ impl AssetIdExtractor for InlineAssetIdExtractor { fn asset_id_from_address(addr: &[u8; 20]) -> Result { let bytes: [u8; 4] = addr[0..4].try_into().expect("slice is 4 bytes; qed"); let index = u32::from_be_bytes(bytes); - return Ok(index.into()); + Ok(index) } } /// Mean of extracting the asset id from the precompile address. diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 8ced57c70..c7ceaefe0 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -62,8 +62,7 @@ where value.saturating_to(), )?; - let value = value.clone(); - deposit_event::(env, address, Transfer { from, to: to.clone(), value }); + deposit_event::(env, address, Transfer { from, to: *to, value: *value }); Ok(transferCall::abi_encode_returns(&(true,))) }, allowance(allowanceCall { owner, spender }) => { @@ -86,7 +85,7 @@ where ) // TODO: adjust weight .map_err(|e| e.error)?; - let event = Approval { owner, spender: spender.clone(), value: value.clone() }; + let event = Approval { owner, spender: *spender, value: *value }; deposit_event(env, address, event); Ok(approveCall::abi_encode_returns(&(true,))) }, @@ -95,15 +94,13 @@ where transfer_from::( to_runtime_origin(env.caller()), - id.into(), + id, env.to_account_id(&(*from.0).into()), env.to_account_id(&(*to.0).into()), value.saturating_to(), )?; - let from = from.clone(); - let value = value.clone(); - deposit_event(env, address, Transfer { from, to: to.clone(), value }); + deposit_event(env, address, Transfer { from: *from, to: *to, value: *value }); Ok(transferFromCall::abi_encode_returns(&(true,))) }, // IERC20Metadata diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index e4a0d9b0c..d1722324c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -50,7 +50,7 @@ where )? .into(); - deposit_event(env, address, Created { id, creator, admin: admin.clone() }); + deposit_event(env, address, Created { id, creator, admin: *admin }); Ok(createCall::abi_encode_returns(&(id,))) }, mint(mintCall { id, account, value }) => { @@ -64,8 +64,8 @@ where )?; let from = Address::default(); - let to = account.clone(); - deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + let to = *account; + deposit_event(env, address, Transfer { id: *id, from, to, value: *value }); Ok(mintCall::abi_encode_returns(&())) }, transfer(transferCall { id, to, value }) => { @@ -79,8 +79,7 @@ where value.saturating_to(), )?; - let to = to.clone(); - deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + deposit_event(env, address, Transfer { id: *id, from, to: *to, value: *value }); Ok(transferCall::abi_encode_returns(&())) }, approve(approveCall { id, spender, value }) => { @@ -95,9 +94,7 @@ where ) // TODO: adjust weight .map_err(|e| e.error)?; - let spender = spender.clone(); - let value = value.clone(); - deposit_event(env, address, Approval { id: *id, owner, spender, value }); + deposit_event(env, address, Approval { id: *id, owner, spender: *spender, value: *value }); Ok(approveCall::abi_encode_returns(&())) }, transferFrom(transferFromCall { id, from, to, value }) => { @@ -111,9 +108,7 @@ where value.saturating_to(), )?; - let from = from.clone(); - let value = value.clone(); - deposit_event(env, address, Transfer { id: *id, from, to: to.clone(), value }); + deposit_event(env, address, Transfer { id: *id, from: *from, to: *to, value: *value }); Ok(transferFromCall::abi_encode_returns(&())) }, burn(burnCall { id, account, value }) => { @@ -127,9 +122,9 @@ where ) // TODO: adjust weight .map_err(|e| e.error)?; - let from = account.clone(); + let from = account; let to = Address::default(); - deposit_event(env, address, Transfer { id: *id, from, to, value: value.clone() }); + deposit_event(env, address, Transfer { id: *id, from: *from, to, value: *value }); Ok(burnCall::abi_encode_returns(&())) }, startDestroy(startDestroyCall { id }) => { From e2e748d0ce1dfc6653aaa55330fd9c7cbe7e0692 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 4 Jun 2025 11:39:52 +0100 Subject: [PATCH 056/284] style: formatting --- pallets/api-vnext/src/fungibles/precompiles/erc20.rs | 2 +- pallets/api-vnext/src/fungibles/precompiles/mod.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index c7ceaefe0..7aef13f9e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,7 +1,7 @@ use alloc::string::String; use frame_support::{ - sp_runtime::{traits::AtLeast32Bit}, + sp_runtime::traits::AtLeast32Bit, traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, }; use pallet_revive::precompiles::alloy::primitives::ruint::UintTryFrom; diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index d1722324c..f5f61bf76 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -94,7 +94,8 @@ where ) // TODO: adjust weight .map_err(|e| e.error)?; - deposit_event(env, address, Approval { id: *id, owner, spender: *spender, value: *value }); + let spender = *spender; + deposit_event(env, address, Approval { id: *id, owner, spender, value: *value }); Ok(approveCall::abi_encode_returns(&())) }, transferFrom(transferFromCall { id, from, to, value }) => { @@ -108,7 +109,8 @@ where value.saturating_to(), )?; - deposit_event(env, address, Transfer { id: *id, from: *from, to: *to, value: *value }); + let value = *value; + deposit_event(env, address, Transfer { id: *id, from: *from, to: *to, value }); Ok(transferFromCall::abi_encode_returns(&())) }, burn(burnCall { id, account, value }) => { From 64d6551a708fa312b1cadf53d8623f3e384bca67 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 6 Jun 2025 12:55:17 +0100 Subject: [PATCH 057/284] feat(pop-api): add initial fungibles api and example --- Cargo.toml | 1 + pop-api-vnext/.gitignore | 11 + pop-api-vnext/Cargo.toml | 28 ++ pop-api-vnext/examples/.gitignore | 9 + .../examples/fungibles-vnext/Cargo.toml | 24 ++ pop-api-vnext/examples/fungibles-vnext/lib.rs | 147 ++++++++++ pop-api-vnext/src/lib.rs | 272 ++++++++++++++++++ runtime/devnet/src/config/contracts.rs | 121 +++++++- 8 files changed, 601 insertions(+), 12 deletions(-) create mode 100644 pop-api-vnext/.gitignore create mode 100644 pop-api-vnext/Cargo.toml create mode 100644 pop-api-vnext/examples/.gitignore create mode 100644 pop-api-vnext/examples/fungibles-vnext/Cargo.toml create mode 100644 pop-api-vnext/examples/fungibles-vnext/lib.rs create mode 100644 pop-api-vnext/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 9cd0cdc27..ac664726e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ repository = "https://github.com/r0gue-io/pop-node/" exclude = [ "extension/contract", "pop-api", + "pop-api-vnext", "tests/contracts", ] members = [ diff --git a/pop-api-vnext/.gitignore b/pop-api-vnext/.gitignore new file mode 100644 index 000000000..e4fa8cd88 --- /dev/null +++ b/pop-api-vnext/.gitignore @@ -0,0 +1,11 @@ +.idea/ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml new file mode 100644 index 000000000..7a1195b27 --- /dev/null +++ b/pop-api-vnext/Cargo.toml @@ -0,0 +1,28 @@ +[package] +description = "Enabling smart(er) contracts with the power of Polkadot" +edition = "2021" +license = "GPL-3.0-only" +name = "pop-api" +version = "0.1.0" + +[package.metadata.ink-lang] +abi = "sol" + +[dependencies] +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +pop-primitives = { path = "../primitives", default-features = false } + +[lib] +crate-type = [ "rlib" ] +name = "pop_api" +path = "src/lib.rs" + +[features] +default = [ "std" ] +fungibles = [ ] +messaging = [ ] +nonfungibles = [ ] +std = [ + "ink/std", + "pop-primitives/std", +] diff --git a/pop-api-vnext/examples/.gitignore b/pop-api-vnext/examples/.gitignore new file mode 100644 index 000000000..d60800c86 --- /dev/null +++ b/pop-api-vnext/examples/.gitignore @@ -0,0 +1,9 @@ +# Ignore build artifacts from the local tests sub-crate. +**/target/ + +# Ignore backup files creates by cargo fmt. +**/*.rs.bk + +# Remove Cargo.lock when creating an executable, leave it for libraries +# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock +**/Cargo.lock diff --git a/pop-api-vnext/examples/fungibles-vnext/Cargo.toml b/pop-api-vnext/examples/fungibles-vnext/Cargo.toml new file mode 100644 index 000000000..4b3d4bb9e --- /dev/null +++ b/pop-api-vnext/examples/fungibles-vnext/Cargo.toml @@ -0,0 +1,24 @@ +[package] +authors = [ "R0GUE " ] +edition = "2021" +name = "fungibles" +version = "0.1.0" + +[package.metadata.ink-lang] +abi = "sol" + +[lib] +path = "lib.rs" + +[dependencies] +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } + +[dev-dependencies] +hex = { version = "0.4.3" } +scale-info = { version = "2" } + +[features] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] diff --git a/pop-api-vnext/examples/fungibles-vnext/lib.rs b/pop-api-vnext/examples/fungibles-vnext/lib.rs new file mode 100644 index 000000000..7eaf23f5e --- /dev/null +++ b/pop-api-vnext/examples/fungibles-vnext/lib.rs @@ -0,0 +1,147 @@ +#![cfg_attr(not(feature = "std"), no_std, no_main)] + +// NOTE: requires `cargo-contract` built from `master` + +#[ink::contract] +pub mod fungibles { + use ink::U256; + use pop_api::fungibles::{self as api, erc20, erc20::Transfer, TokenId as Id}; + + #[ink(storage)] + pub struct Fungible { + id: Id, + owner: Address, + } + + impl Fungible { + /// Instantiate the contract and create a new token. The token identifier will be stored + /// in contract's storage. + /// + /// # Parameters + /// * - `min_balance` - The minimum balance required for accounts holding this token. + // The `min_balance` ensures accounts hold a minimum amount of tokens, preventing tiny, + // inactive balances from bloating the blockchain state and slowing down the network. + #[ink(constructor, payable)] + #[allow(clippy::new_without_default)] + pub fn new(min_balance: U256) -> Self { + let mut instance = Self { id: 0, owner: Self::env().caller() }; + instance.id = api::create(instance.env().address(), min_balance); + instance + } + + /// Creates `value` amount of tokens and assigns them to `account`, increasing the total + /// supply. + /// + /// # Parameters + /// - `account` - The address to be credited with the created tokens. + /// - `value` - The number of tokens to mint. + #[ink(message)] + pub fn mint(&mut self, account: Address, value: U256) { + if let Err(e) = self.ensure_owner() { + // Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 + revert(e) + } + // No-op if `value` is zero. + if value == U256::zero() { + return; + } + api::mint(self.id, account, value); + self.env().emit_event(Transfer { from: Address::zero(), to: account, value }); + } + + /// Transfer the ownership of the contract to another account. + /// + /// # Parameters + /// - `owner` - New owner account. + #[ink(message)] + pub fn transfer_ownership(&mut self, owner: Address) { + if let Err(e) = self.ensure_owner() { + // Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 + revert(e) + } + self.owner = owner; + } + + /// Check if the caller is the owner of the contract. + fn ensure_owner(&self) -> Result<(), Error> { + if self.owner != self.env().caller() { + return Err(Error::NoPermission); + } + Ok(()) + } + } + + // TODO: implement via Erc20 trait once Solidity support available + impl Fungible { + /// Returns the total token supply. + #[ink(message)] + #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector + pub fn totalSupply(&self) -> U256 { + erc20::total_supply(self.id) + } + + /// Returns the account balance for the specified `owner`. + /// + /// # Parameters + /// - `owner` - The address whose balance is being queried. + #[ink(message)] + #[allow(non_snake_case)] + pub fn balanceOf(&self, owner: Address) -> U256 { + erc20::balance_of(self.id, owner) + } + + /// Returns the allowance for a `spender` approved by an `owner`. + /// + /// # Parameters + /// - `owner` - The account that owns the tokens. + /// - `spender` - The account that is allowed to spend the tokens. + #[ink(message)] + pub fn allowance(&self, owner: Address, spender: Address) -> U256 { + erc20::allowance(self.id, owner, spender) + } + + /// Transfers `value` amount of tokens from the contract to account `to` with + /// additional `data` in unspecified format. + /// + /// # Parameters + /// - `to` - The recipient account. + /// - `value` - The number of tokens to transfer. + #[ink(message)] + pub fn transfer(&mut self, to: Address, value: U256) -> bool { + if let Err(e) = self.ensure_owner() { + // Workaround until ink supports Error to Solidity custom error conversion + revert(e) + } + let contract = self.env().address(); + + // No-op if the contract and `to` is the same address or `value` is zero. + if contract == to || value == U256::zero() { + return true; + } + if !erc20::transfer(self.id, to, value) { + revert(Error::TransferFailed) + } + self.env().emit_event(Transfer { from: contract, to, value }); + true + } + } + + pub enum Error { + /// The signing account has no permission to do the operation. + NoPermission, + /// The transfer failed. + TransferFailed, + } + + fn revert(error: Error) -> ! { + use ink::env::{return_value_solidity as return_value, ReturnFlags}; + use Error::*; + + const REVERT: ReturnFlags = ReturnFlags::REVERT; + + match error { + NoPermission => return_value(REVERT, &(0x9d7b369d_u32.to_be_bytes())), + TransferFailed => return_value(REVERT, &(0x90b8ec18_u32.to_be_bytes())), + } + } +} diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs new file mode 100644 index 000000000..8ec6bae61 --- /dev/null +++ b/pop-api-vnext/src/lib.rs @@ -0,0 +1,272 @@ +#![cfg_attr(not(feature = "std"), no_std, no_main)] + +use ink::{ + env::{ + call::{build_call_solidity, ExecutionInput}, + DefaultEnvironment, + }, + prelude::vec::Vec, + Address, U256, +}; + +/// APIs for fungible tokens. +#[cfg(feature = "fungibles")] +pub mod fungibles { + use super::*; + + const PRECOMPILE: u16 = 100; + + pub type TokenId = u32; + + /// Create a new token with an automatically generated identifier. + #[inline] + pub fn create(admin: Address, min_balance: U256) -> TokenId { + let address = fixed_address(PRECOMPILE); + + // GOAL: + // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); + // precompile.create(admin, min_balance) + + // WORKAROUND: + let selector = 0x0ecaea73_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector).push_arg(admin).push_arg(min_balance)) + .returns::() + .invoke() + } + + /// Whether a specified token exists. + #[inline] + pub fn exists(id: TokenId) -> bool { + let address = fixed_address(PRECOMPILE); + + // GOAL: + // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); + // precompile.exists(id) + + // WORKAROUND: + let selector = 0x13c369ed_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector).push_arg(id)) + .returns::() + .invoke() + } + + /// Creates `value` amount of tokens and assigns them to `account`, increasing the total + /// supply. + #[inline] + pub fn mint(id: TokenId, account: Address, value: U256) { + let address = fixed_address(PRECOMPILE); + + // GOAL: + // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); + // precompile.mint(id, address, value) + + // WORKAROUND: + let selector = 0x79d9b87b_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input( + ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value), + ) + .returns::<()>() + .invoke() + } + + /// The fungibles precompile offers a streamlined interface for interacting with fungible + /// tokens. The goal is to provide a simplified, consistent API that adheres to standards in + /// the smart contract space. + #[ink::trait_definition] + pub trait Fungibles { + /// Create a new token with an automatically generated identifier. + #[ink(message)] + fn create(&self, admin: Address, min_balance: U256) -> TokenId; + + /// Set the metadata for a token. + #[ink(message)] + fn set_metadata(&self, id: TokenId, name: Vec, symbol: Vec, decimals: u8); + + /// Clear the metadata for a token. + #[ink(message)] + fn clear_metadata(&self, id: TokenId); + + /// Creates `value` amount of tokens and assigns them to `account`, increasing the total + /// supply. + #[ink(message)] + fn mint(&self, id: TokenId, account: Address, value: U256); + + /// Transfers `value` amount of tokens from the caller's account to account `to`. + #[ink(message)] + fn transfer(&self, id: TokenId, to: Address, value: U256); + + /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. + #[ink(message)] + fn approve(&self, id: TokenId, spender: Address, value: U256); + + /// Transfers `value` amount tokens on behalf of `from` to account `to`. + #[ink(message)] + fn transfer_from(&self, id: TokenId, from: Address, to: Address, value: U256); + + /// Destroys `value` amount of tokens from `account`, reducing the total supply. + #[ink(message)] + fn burn(&self, id: TokenId, address: Address, value: U256); + + /// Start the process of destroying a token. + #[ink(message)] + fn start_destroy(&self, id: TokenId) -> bool; + + /// Whether a specified token exists. + #[ink(message)] + fn exists(&self, id: TokenId) -> bool; + } + + /// APIs for fungible tokens conforming to the ERC20 standard. + pub mod erc20 { + use super::*; + + const PRECOMPILE: u16 = 101; + + /// Returns the value of tokens in existence. + #[inline] + pub fn total_supply(id: TokenId) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let selector = 0x18160ddd_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector)) + .returns::() + .invoke() + } + + /// Returns the value of tokens owned by `account`. + #[inline] + pub fn balance_of(id: TokenId, account: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let selector = 0x70a08231_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector).push_arg(account)) + .returns::() + .invoke() + } + + /// Returns the remaining number of tokens that `spender` will be allowed to spend + /// on behalf of `owner` through [`transfer_from`]. This is zero by default. + /// + /// This value changes when `approve` or [`transfer_from`] are called. + #[inline] + pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let selector = 0xdd62ed3e_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector).push_arg(owner).push_arg(spender)) + .returns::() + .invoke() + } + + /// Returns the value of tokens owned by `account`. + #[inline] + pub fn transfer(id: TokenId, to: Address, value: U256) -> bool { + let address = prefixed_address(PRECOMPILE, id); + let selector = 0x70a08231_u32.to_be_bytes().into(); + build_call_solidity::() + .call(address) + .exec_input(ExecutionInput::new(selector).push_arg(to).push_arg(value)) + .returns::() + .invoke() + } + + /// Emitted when the allowance of a `spender` for an `owner` is set by a call to + /// [`approve`]. `value` is the new allowance. + #[ink::event] + #[cfg_attr(feature = "std", derive(Debug))] + pub struct Approval { + /// The owner providing the allowance. + #[ink(topic)] + pub owner: Address, + /// The beneficiary of the allowance. + #[ink(topic)] + pub spender: Address, + /// The new allowance amount. + pub value: U256, + } + + /// Emitted when `value` tokens are moved from one account (`from`) to another (`to`). + /// + /// Note that `value` may be zero. + #[ink::event] + #[cfg_attr(feature = "std", derive(Debug))] + pub struct Transfer { + /// The source of the transfer. The zero address when minting. + #[ink(topic)] + pub from: Address, + /// The recipient of the transfer. The zero address when burning. + #[ink(topic)] + pub to: Address, + /// The amount transferred (or minted/burned). + pub value: U256, + } + + /// Interface of the ERC-20 standard. + #[ink::trait_definition] + pub trait Erc20 { + /// Returns the value of tokens in existence. + #[ink(message)] + #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector + fn totalSupply(&self) -> U256; + + /// Returns the value of tokens owned by `account`. + #[ink(message)] + #[allow(non_snake_case)] + fn balanceOf(&self, account: Address) -> U256; + + /// Returns the remaining number of tokens that `spender` will be allowed to spend + /// on behalf of `owner` through [`transfer_from`]. This is zero by default. + /// + /// This value changes when `approve` or `[`transfer_from`] are called. + #[ink(message)] + fn allowance(&self, owner: Address, spender: Address) -> U256; + + /// Moves a `value` amount of tokens from the caller's account to `to`. Returns a + /// boolean value indicating whether the operation succeeded. Emits a {Transfer} + /// event. + #[ink(message)] + fn transfer(&self, to: Address, value: U256) -> bool; + } + } +} + +fn fixed_address(n: u16) -> Address { + let shifted = (n as u32) << 16; + + let suffix = shifted.to_be_bytes(); + let mut address = [0u8; 20]; + let mut i = 16; + while i < address.len() { + address[i] = suffix[i - 16]; + i = i + 1; + } + address.into() +} + +fn prefixed_address(n: u16, prefix: u32) -> Address { + let mut address = fixed_address(n); + address.0[..4].copy_from_slice(&prefix.to_be_bytes()); + address +} + +#[test] +fn fixed_address_works() { + assert_eq!(hex::encode(fixed_address(100)), "0000000000000000000000000000000000640000") +} + +#[test] +fn prefixed_address_works() { + assert_eq!( + hex::encode(prefixed_address(101, u32::MAX)), + "ffffffff00000000000000000000000000650000" + ); +} diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index ae321d0c2..b7ce623eb 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -143,13 +143,18 @@ fn contracts_prevents_runtime_calls() { #[cfg(test)] mod tests { + use codec::Encode; use frame_support::{assert_ok, traits::fungible::Mutate}; - use pallet_api_vnext::{ - fungibles::precompiles::{IFungibles::*, IERC20}, - U256, + use frame_system::pallet_prelude::OriginFor; + use pallet_api_vnext::fungibles::precompiles::{IFungibles::*, IERC20}; + use pallet_revive::{ + precompiles::alloy::{ + primitives, + sol_types::{SolCall, SolType, SolValue}, + }, + AddressMapper, Code, DepositLimit, }; - use pallet_revive::{precompiles::alloy::sol_types::SolCall, AddressMapper}; - use sp_core::{bytes::to_hex, H160}; + use sp_core::{bytes::to_hex, H160, U256}; use sp_keyring::Sr25519Keyring::{Alice, Bob}; use sp_runtime::Weight; @@ -164,7 +169,7 @@ mod tests { let mut ext = sp_io::TestExternalities::new_empty(); ext.execute_with(|| { System::set_block_number(1); - Balances::set_balance(&Alice.to_account_id(), 100 * UNIT); + Balances::set_balance(&Alice.to_account_id(), 1_000 * UNIT); Balances::set_balance(&Bob.to_account_id(), 1 * UNIT); NextAssetId::put(1); }); @@ -175,7 +180,7 @@ mod tests { fn fungibles_precompiles_work() { let caller = Alice.to_account_id(); let origin = RuntimeOrigin::signed(caller.clone()); - let origin_addr: H160 = AccountId32Mapper::to_address(&Alice.to_account_id()); + let origin_addr = AccountId32Mapper::to_address(&caller); let id = 1; let fungibles_addr: H160 = Fungibles::<100, TrustBackedAssetsInstance>::address().into(); let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(id).into(); @@ -187,7 +192,8 @@ mod tests { // Create a token via fungibles precompile println!("IFungibles precompile: {}", to_hex(&fungibles_addr.0, false)); let call = - createCall { admin: origin_addr.0.into(), minBalance: U256::from(1) }.abi_encode(); + createCall { admin: origin_addr.0.into(), minBalance: primitives::U256::from(1) } + .abi_encode(); println!("IFungibles.create: {}", to_hex(&call, false)); assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); let asset_details = Asset::get(id).unwrap(); @@ -195,9 +201,12 @@ mod tests { assert_eq!(asset_details.admin, caller); // Mint via fungibles precompile - let call = - mintCall { id, account: origin_addr.0.into(), value: U256::from(total_supply) } - .abi_encode(); + let call = mintCall { + id, + account: origin_addr.0.into(), + value: primitives::U256::from(total_supply), + } + .abi_encode(); println!("IFungibles.mint: {}", to_hex(&call, false)); assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); @@ -205,7 +214,7 @@ mod tests { println!("IERC20 precompile: {}", to_hex(&erc20_addr.0, false)); let call = IERC20::transferCall { to: AccountId32Mapper::to_address(&Bob.to_account_id()).0.into(), - value: U256::from(total_supply / 2), + value: primitives::U256::from(total_supply / 2), } .abi_encode(); println!("IERC20.transfer: {}", to_hex(&call, false)); @@ -213,4 +222,92 @@ mod tests { assert_eq!(Assets::balance(id, &Bob.to_account_id()), total_supply / 2); }) } + + // Currently ignored due to explicit dependency on built contract + #[ignore] + #[test] + fn fungibles_precompiles_via_contract_works() { + let contract = include_bytes!( + "../../../../pop-api-vnext/examples/fungibles-vnext/target/ink/fungibles.polkavm" + ); + let caller = Alice.to_account_id(); + let origin = RuntimeOrigin::signed(caller.clone()); + let origin_addr = primitives::Address::new(AccountId32Mapper::to_address(&caller).0); + let minimum_value = U256::from(1); + let endowment = primitives::U256::from(10_000); + new_test_ext().execute_with(|| { + assert_ok!(Revive::map_account(origin.clone())); + + // Instantiate contract with some value, required to create underlying asset + let result = Revive::bare_instantiate( + origin.clone(), + 10 * UNIT, + Weight::MAX, + DepositLimit::Unchecked, + Code::Upload(contract.to_vec()), + // Constructors are not yet using Solidity encoding + [blake_selector("new"), minimum_value.encode()].concat(), + None, + ) + .result + .unwrap(); + assert!(!result.result.did_revert()); + + // Interact with contract as Erc20 + call::<()>( + origin.clone(), + result.addr, + [keccak_selector("mint(address,uint256)"), (origin_addr, endowment).abi_encode()] + .concat(), + ); + + let total_supply = call::( + origin.clone(), + result.addr, + keccak_selector("totalSupply()"), + ); + assert_eq!(total_supply, endowment); + + let balance_of = call::( + origin.clone(), + result.addr, + [keccak_selector("balanceOf(address)"), (origin_addr,).abi_encode()].concat(), + ); + assert_eq!(balance_of, endowment); + }); + + fn call::RustType>>( + origin: OriginFor, + contract: H160, + data: Vec, + ) -> T { + let result = + Revive::bare_call(origin, contract, 0, Weight::MAX, DepositLimit::Unchecked, data) + .result + .unwrap(); + assert!(!result.did_revert()); + T::abi_decode(&result.data, true).unwrap() + } + } + + fn blake_selector(name: &str) -> Vec { + let hash = sp_io::hashing::blake2_256(name.as_bytes()); + [hash[0..4].to_vec()].concat() + } + + fn keccak_selector(name: &str) -> Vec { + let hash = sp_io::hashing::keccak_256(name.as_bytes()); + [hash[0..4].to_vec()].concat() + } + + #[test] + fn selectors_work() { + // Constructors currently still use blake encoding + assert_eq!(hex::encode(blake_selector("new")), "9bae9d5e"); + + // Erc20 selectors + assert_eq!(hex::encode(keccak_selector("exists()")), "267c4ae4"); + assert_eq!(hex::encode(keccak_selector("totalSupply()")), "18160ddd"); + assert_eq!(hex::encode(keccak_selector("balanceOf(address)")), "70a08231"); + } } From 57bc9f19916abe669b7615191ce18090a3f48977 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 9 Jun 2025 12:21:58 +0100 Subject: [PATCH 058/284] chore: rename example directory --- pop-api-vnext/examples/{fungibles-vnext => fungibles}/Cargo.toml | 0 pop-api-vnext/examples/{fungibles-vnext => fungibles}/lib.rs | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pop-api-vnext/examples/{fungibles-vnext => fungibles}/Cargo.toml (100%) rename pop-api-vnext/examples/{fungibles-vnext => fungibles}/lib.rs (100%) diff --git a/pop-api-vnext/examples/fungibles-vnext/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml similarity index 100% rename from pop-api-vnext/examples/fungibles-vnext/Cargo.toml rename to pop-api-vnext/examples/fungibles/Cargo.toml diff --git a/pop-api-vnext/examples/fungibles-vnext/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs similarity index 100% rename from pop-api-vnext/examples/fungibles-vnext/lib.rs rename to pop-api-vnext/examples/fungibles/lib.rs From a338e0ea0d5c997ecd82d924c9e3efddbdd31164 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 13 Jun 2025 13:29:25 +0100 Subject: [PATCH 059/284] docs: remove trailing slash in comment --- .../api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol index 08173ed8c..7aa8d6c10 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol @@ -61,7 +61,7 @@ interface IERC20 { * allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * - * Emits an {Approval} event.\ + * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); From bfa3d9967f415f536e79a083f8866f7c5305408a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 13 Jun 2025 13:32:53 +0100 Subject: [PATCH 060/284] refactor(pop-api): improvements to implementation --- pop-api-vnext/Cargo.toml | 10 +- pop-api-vnext/examples/fungibles/Cargo.toml | 6 +- pop-api-vnext/examples/fungibles/lib.rs | 187 +++++-- pop-api-vnext/src/fungibles/erc20.rs | 509 +++++++++++++++++ pop-api-vnext/src/fungibles/mod.rs | 585 ++++++++++++++++++++ pop-api-vnext/src/lib.rs | 255 +-------- 6 files changed, 1267 insertions(+), 285 deletions(-) create mode 100644 pop-api-vnext/src/fungibles/erc20.rs create mode 100644 pop-api-vnext/src/fungibles/mod.rs diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 7a1195b27..89ec14f51 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -9,9 +9,13 @@ version = "0.1.0" abi = "sol" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } +[dev-dependencies] +hex = { version = "0.4.3" } + [lib] crate-type = [ "rlib" ] name = "pop_api" @@ -26,3 +30,7 @@ std = [ "ink/std", "pop-primitives/std", ] + +[lints.rust.unexpected_cfgs] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +level = "warn" diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 4b3d4bb9e..03f9e0bd2 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] @@ -22,3 +22,7 @@ scale-info = { version = "2" } default = [ "std" ] ink-as-dependency = [ ] std = [ "ink/std", "pop-api/std" ] + +[lints.rust.unexpected_cfgs] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +level = "warn" diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 7eaf23f5e..fecdc96c1 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -4,12 +4,19 @@ #[ink::contract] pub mod fungibles { - use ink::U256; - use pop_api::fungibles::{self as api, erc20, erc20::Transfer, TokenId as Id}; + use ink::{prelude::string::String, U256}; + use pop_api::{ + fungibles::{ + self as api, + erc20::{extensions::Erc20Metadata, Erc20}, + Approval, InvalidRecipient, NoPermission, TokenId, Transfer, + }, + revert, + }; #[ink(storage)] pub struct Fungible { - id: Id, + id: TokenId, owner: Address, } @@ -18,14 +25,23 @@ pub mod fungibles { /// in contract's storage. /// /// # Parameters + /// * - `name` - The name of the token. + /// * - `symbol` - The symbol of the token. /// * - `min_balance` - The minimum balance required for accounts holding this token. + /// * - `decimals` - The number of decimals. + /// + /// NOTE: The minimum balance must be non-zero. // The `min_balance` ensures accounts hold a minimum amount of tokens, preventing tiny, // inactive balances from bloating the blockchain state and slowing down the network. #[ink(constructor, payable)] #[allow(clippy::new_without_default)] - pub fn new(min_balance: U256) -> Self { + pub fn new(name: String, symbol: String, min_balance: U256, decimals: u8) -> Self { let mut instance = Self { id: 0, owner: Self::env().caller() }; - instance.id = api::create(instance.env().address(), min_balance); + match api::create(instance.env().address(), min_balance) { + Ok(id) => instance.id = id, + Err(error) => revert(&error), + } + api::set_metadata(instance.id, name, symbol, decimals); instance } @@ -37,47 +53,63 @@ pub mod fungibles { /// - `value` - The number of tokens to mint. #[ink(message)] pub fn mint(&mut self, account: Address, value: U256) { - if let Err(e) = self.ensure_owner() { + if let Err(error) = self.ensure_owner() { // Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 - revert(e) + revert(&error) } - // No-op if `value` is zero. - if value == U256::zero() { - return; + + if let Err(error) = api::mint(self.id, account, value) { + revert(&error) } - api::mint(self.id, account, value); self.env().emit_event(Transfer { from: Address::zero(), to: account, value }); } + /// Destroys `value` amount of tokens from `account`, reducing the total supply. + /// + /// # Parameters + /// - `account` - The address from which the tokens will be destroyed. + /// - `value` - The number of tokens to destroy. + #[ink(message)] + pub fn burn(&mut self, account: Address, value: U256) { + if let Err(e) = self.ensure_owner() { + revert(&e) + } + + if let Err(error) = api::burn(self.id, account, value) { + revert(&error) + } + self.env().emit_event(Transfer { from: account, to: Address::zero(), value }); + } + /// Transfer the ownership of the contract to another account. /// /// # Parameters /// - `owner` - New owner account. + /// + /// NOTE: the specified owner account is not checked, allowing the zero address to be + /// specified if desired.. #[ink(message)] pub fn transfer_ownership(&mut self, owner: Address) { if let Err(e) = self.ensure_owner() { - // Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 - revert(e) + revert(&e) } self.owner = owner; } /// Check if the caller is the owner of the contract. - fn ensure_owner(&self) -> Result<(), Error> { + fn ensure_owner(&self) -> Result<(), NoPermission> { if self.owner != self.env().caller() { - return Err(Error::NoPermission); + return Err(NoPermission); } Ok(()) } } - // TODO: implement via Erc20 trait once Solidity support available - impl Fungible { + impl Erc20 for Fungible { /// Returns the total token supply. #[ink(message)] - #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector - pub fn totalSupply(&self) -> U256 { - erc20::total_supply(self.id) + fn totalSupply(&self) -> U256 { + api::total_supply(self.id) } /// Returns the account balance for the specified `owner`. @@ -85,63 +117,116 @@ pub mod fungibles { /// # Parameters /// - `owner` - The address whose balance is being queried. #[ink(message)] - #[allow(non_snake_case)] - pub fn balanceOf(&self, owner: Address) -> U256 { - erc20::balance_of(self.id, owner) + fn balanceOf(&self, owner: Address) -> U256 { + api::balance_of(self.id, owner) } /// Returns the allowance for a `spender` approved by an `owner`. /// /// # Parameters - /// - `owner` - The account that owns the tokens. - /// - `spender` - The account that is allowed to spend the tokens. + /// - `owner` - The address that owns the tokens. + /// - `spender` - The address that is allowed to spend the tokens. #[ink(message)] - pub fn allowance(&self, owner: Address, spender: Address) -> U256 { - erc20::allowance(self.id, owner, spender) + fn allowance(&self, owner: Address, spender: Address) -> U256 { + api::allowance(self.id, owner, spender) } - /// Transfers `value` amount of tokens from the contract to account `to` with + /// Transfers `value` amount of tokens from the contract to address `to` with /// additional `data` in unspecified format. /// /// # Parameters - /// - `to` - The recipient account. + /// - `to` - The recipient address. /// - `value` - The number of tokens to transfer. #[ink(message)] - pub fn transfer(&mut self, to: Address, value: U256) -> bool { - if let Err(e) = self.ensure_owner() { - // Workaround until ink supports Error to Solidity custom error conversion - revert(e) + fn transfer(&mut self, to: Address, value: U256) -> bool { + if let Err(error) = self.ensure_owner() { + revert(&error) } let contract = self.env().address(); - // No-op if the contract and `to` is the same address or `value` is zero. - if contract == to || value == U256::zero() { - return true; + // Validate recipient. + if to == contract { + revert(&InvalidRecipient(to)) } - if !erc20::transfer(self.id, to, value) { - revert(Error::TransferFailed) + + if let Err(error) = api::transfer(self.id, to, value) { + revert(&error) } self.env().emit_event(Transfer { from: contract, to, value }); true } - } - pub enum Error { - /// The signing account has no permission to do the operation. - NoPermission, - /// The transfer failed. - TransferFailed, + /// Transfers `value` tokens on behalf of `from` to the account `to`. Contract must be + /// pre-approved by `from`. + /// + /// # Parameters + /// - `from` - The address from which the token balance will be withdrawn. + /// - `to` - The recipient address. + /// - `value` - The number of tokens to transfer. + #[ink(message)] + fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool { + if let Err(e) = self.ensure_owner() { + revert(&e) + } + let contract = self.env().address(); + + // A successful transfer reduces the allowance from `from` to the contract and triggers + // an `Approval` event with the updated allowance amount. + if let Err(error) = api::transfer_from(self.id, from, to, value) { + revert(&error) + } + self.env().emit_event(Transfer { from: contract, to, value }); + self.env().emit_event(Approval { + owner: from, + spender: contract, + value: self.allowance(from, contract), + }); + true + } + + /// Approves `spender` to spend `value` amount of tokens on behalf of the contract. + /// + /// Successive calls of this method overwrite previous values. + /// + /// # Parameters + /// - `spender` - The address that is allowed to spend the tokens. + /// - `value` - The number of tokens to approve. + #[ink(message)] + fn approve(&mut self, spender: Address, value: U256) -> bool { + if let Err(e) = self.ensure_owner() { + revert(&e) + } + let contract = self.env().address(); + + // Validate recipient. + if spender == contract { + revert(&InvalidRecipient(spender)) + } + if let Err(error) = api::approve(self.id, spender, value) { + revert(&error) + } + self.env().emit_event(Approval { owner: contract, spender, value }); + true + } } - fn revert(error: Error) -> ! { - use ink::env::{return_value_solidity as return_value, ReturnFlags}; - use Error::*; + impl Erc20Metadata for Fungible { + /// Returns the token name. + #[ink(message)] + fn name(&self) -> String { + api::name(self.id) + } - const REVERT: ReturnFlags = ReturnFlags::REVERT; + /// Returns the token symbol. + #[ink(message)] + fn symbol(&self) -> String { + api::symbol(self.id) + } - match error { - NoPermission => return_value(REVERT, &(0x9d7b369d_u32.to_be_bytes())), - TransferFailed => return_value(REVERT, &(0x90b8ec18_u32.to_be_bytes())), + /// Returns the token decimals. + #[ink(message)] + fn decimals(&self) -> u8 { + api::decimals(self.id) } } } diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs new file mode 100644 index 000000000..8ef4aff4c --- /dev/null +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -0,0 +1,509 @@ +pub use errors::*; + +use super::{ + contract_ref, prefixed_address, Address, Pop, SolAddress, SolEncode, SolError, SolType, + SolTypeEncode, String, TokenId, Uint, Vec, U256, +}; +use crate::ensure; + +const PRECOMPILE: u16 = 101; + +/// Interface of the ERC-20 standard. +#[ink::trait_definition] +pub trait Erc20 { + /// Returns the value of tokens in existence. + #[ink(message)] + #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector + fn totalSupply(&self) -> U256; + + /// Returns the value of tokens owned by `account`. + #[ink(message)] + #[allow(non_snake_case)] + fn balanceOf(&self, account: Address) -> U256; + + /// Moves a `value` amount of tokens from the caller's account to `to`. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a [`Transfer`] event. + #[ink(message)] + fn transfer(&mut self, to: Address, value: U256) -> bool; + + /// Returns the remaining number of tokens that `spender` will be allowed to spend + /// on behalf of `owner` through [`transfer_from`]. This is zero by default. + /// + /// This value changes when `approve` or `[`transfer_from`] are called. + #[ink(message)] + fn allowance(&self, owner: Address, spender: Address) -> U256; + + /// Sets a `value` amount of tokens as the allowance of `spender` over the caller's + /// tokens. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits an [`Approval`] event. + #[ink(message)] + fn approve(&mut self, spender: Address, value: U256) -> bool; + + /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. + /// `value` is then deducted from the caller's allowance. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a [`Transfer`] event. + #[ink(message)] + #[allow(non_snake_case)] + fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool; +} + +/// Emitted when the allowance of a `spender` for an `owner` is set by a call to +/// [`approve`]. `value` is the new allowance. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Approval { + /// The owner providing the allowance. + #[ink(topic)] + pub owner: Address, + /// The beneficiary of the allowance. + #[ink(topic)] + pub spender: Address, + /// The new allowance amount. + pub value: U256, +} + +/// Emitted when `value` tokens are moved from one account (`from`) to another (`to`). +/// +/// Note that `value` may be zero. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Transfer { + /// The source of the transfer. The zero address when minting. + #[ink(topic)] + pub from: Address, + /// The recipient of the transfer. The zero address when burning. + #[ink(topic)] + pub to: Address, + /// The amount transferred (or minted/burned). + pub value: U256, +} + +/// Returns the value of tokens in existence. +#[inline] +pub fn total_supply(id: TokenId) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20, Pop) = address.into(); + precompile.totalSupply() + + // let selector = 0x18160ddd_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector)) + // .returns::() + // .invoke() +} + +/// Returns the value of tokens owned by `account`. +#[inline] +pub fn balance_of(id: TokenId, account: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20, Pop) = address.into(); + precompile.balanceOf(account) + + // let selector = 0x70a08231_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(account)) + // .returns::() + // .invoke() +} + +/// Returns the value of tokens owned by `account`. +#[inline] +pub fn transfer(id: TokenId, to: Address, value: U256) -> Result { + ensure!(to != Address::zero(), ERC20InvalidSender(to)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, id); + let mut precompile: contract_ref!(Erc20, Pop) = address.into(); + Ok(precompile.transfer(to, value)) + + // let selector = 0xa9059cbb_u32.to_be_bytes().into(); + // let result = build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(to).push_arg(value)) + // .returns::() + // .invoke(); + // Ok(result) +} + +/// Returns the remaining number of tokens that `spender` will be allowed to spend +/// on behalf of `owner` through [`transfer_from`]. This is zero by default. +/// +/// This value changes when `approve` or [`transfer_from`] are called. +#[inline] +pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20, Pop) = address.into(); + precompile.allowance(owner, spender) + + // let selector = 0xdd62ed3e_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(owner).push_arg(spender)) + // .returns::() + // .invoke() +} + +/// Sets a `value` amount of tokens as the allowance of `spender` over the caller's +/// tokens. +/// +/// Returns a boolean value indicating whether the operation succeeded. +/// +/// Emits an [`Approval`] event. +#[inline] +pub fn approve(id: TokenId, spender: Address, value: U256) -> Result { + ensure!(spender != Address::zero(), ERC20InvalidApprover(spender)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, id); + let mut precompile: contract_ref!(Erc20, Pop) = address.into(); + Ok(precompile.approve(spender, value)) + + // let selector = 0x095ea7b3_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(spender).push_arg(value)) + // .returns::() + // .invoke()) +} + +/// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. +/// `value` is then deducted from the caller's allowance. +/// +/// Returns a boolean value indicating whether the operation succeeded. +/// +/// Emits a [`Transfer`] event. +#[inline] +pub fn transfer_from(id: TokenId, from: Address, to: Address, value: U256) -> Result { + ensure!(from != Address::zero(), ERC20InvalidSender(from)); + ensure!(to != Address::zero() && to != from, ERC20InvalidReceiver(to)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, id); + let mut precompile: contract_ref!(Erc20, Pop) = address.into(); + Ok(precompile.transferFrom(from, to, value)) + + // let selector = 0x23b872dd_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(from).push_arg(to).push_arg(value)) + // .returns::() + // .invoke()) +} + +/// Extensions to the ERC-20 standard. +pub mod extensions { + use super::*; + + /// Interface for the optional metadata functions from the ERC-20 standard. + #[ink::trait_definition] + pub trait Erc20Metadata { + /// Returns the name of the token. + #[ink(message)] + fn name(&self) -> String; + + /// Returns the symbol of the token. + #[ink(message)] + fn symbol(&self) -> String; + + /// Returns the decimals places of the token. + #[ink(message)] + fn decimals(&self) -> u8; + } + + /// Returns the name of the token. + #[inline] + pub fn name(id: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + precompile.name() + + // let selector = 0x06fdde03_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector)) + // .returns::() + // .invoke() + } + + /// Returns the symbol of the token. + #[inline] + pub fn symbol(id: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + precompile.symbol() + + // let selector = 0x95d89b41_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector)) + // .returns::() + // .invoke() + } + + /// Returns the decimals places of the token. + #[inline] + pub fn decimals(id: TokenId) -> u8 { + let address = prefixed_address(PRECOMPILE, id); + let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + precompile.decimals() + + // let selector = 0x313ce567_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector)) + // .returns::() + // .invoke() + } +} + +// NOTE: subject to change based on ink!'s support for solidity custom errors. +pub enum Error { + /// Indicates a failure with the `spender`’s `allowance`. + InsufficientAllowance(ERC20InsufficientAllowance), + /// Indicates an error related to the current `balance` of a `sender`. + InsufficientBalance(ERC20InsufficientBalance), + /// Indicates an error related to a specified `value`. + InsufficientValue(ERC20InsufficientValue), + /// Indicates a failure with the `approver` of a token to be approved. + InvalidApprover(ERC20InvalidApprover), + /// Indicates a failure with the token `receiver`. + InvalidReceiver(ERC20InvalidReceiver), + /// Indicates a failure with the token `sender`. + InvalidSender(ERC20InvalidSender), +} + +impl<'a> SolEncode<'a> for Error { + type SolType = (); + + fn encode(&'a self) -> Vec { + use Error::*; + match self { + InsufficientAllowance(e) => e.abi_encode(), + InsufficientBalance(e) => e.abi_encode(), + InsufficientValue(e) => e.abi_encode(), + InvalidApprover(e) => e.abi_encode(), + InvalidReceiver(e) => e.abi_encode(), + InvalidSender(e) => e.abi_encode(), + } + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } +} + +/// Standard ERC-20 errors. +// See https://eips.ethereum.org/EIPS/eip-6093 for more details. +mod errors { + use super::*; + + /// Indicates a failure with the `spender`’s `allowance`. + pub struct ERC20InsufficientAllowance(pub Address, pub U256, pub U256); + impl SolError for ERC20InsufficientAllowance { + type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [251, 143, 65, 178]; + const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self( + Address::from(*tuple.0 .0), + U256::from_little_endian(tuple.1.as_le_slice()), + U256::from_little_endian(tuple.2.as_le_slice()), + ) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + self.0.to_sol_type().tokenize(), + self.1.to_sol_type().tokenize(), + self.2.to_sol_type().tokenize(), + ) + } + } + + /// Indicates an error related to the current `balance` of a `sender`. + pub struct ERC20InsufficientBalance(pub Address, pub U256, pub U256); + impl SolError for ERC20InsufficientBalance { + type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [228, 80, 211, 140]; + const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self( + Address::from(*tuple.0 .0), + U256::from_little_endian(tuple.1.as_le_slice()), + U256::from_little_endian(tuple.2.as_le_slice()), + ) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + self.0.to_sol_type().tokenize(), + self.1.to_sol_type().tokenize(), + self.2.to_sol_type().tokenize(), + ) + } + } + + /// Indicates an error related to a specified `value`. + pub struct ERC20InsufficientValue; + impl SolError for ERC20InsufficientValue { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [191, 254, 152, 173]; + const SIGNATURE: &'static str = "ERC20InsufficientValue()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: ERC20InsufficientValue) -> Self { + Self::InsufficientValue(value) + } + } + + /// Indicates a failure with the `approver` of a token to be approved. + pub struct ERC20InvalidApprover(pub Address); + impl SolError for ERC20InvalidApprover { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [230, 2, 223, 5]; + const SIGNATURE: &'static str = "ERC20InvalidApprover(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } + } + impl From for Error { + fn from(value: ERC20InvalidApprover) -> Self { + Self::InvalidApprover(value) + } + } + + /// Indicates a failure with the token `sender`. + pub struct ERC20InvalidSender(pub Address); + impl SolError for ERC20InvalidSender { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [150, 198, 253, 30]; + const SIGNATURE: &'static str = "ERC20InvalidSender(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } + } + impl From for Error { + fn from(value: ERC20InvalidSender) -> Self { + Self::InvalidSender(value) + } + } + + /// Indicates a failure with the token `receiver`. + pub struct ERC20InvalidReceiver(pub Address); + impl SolError for ERC20InvalidReceiver { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8]; + const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } + } + + impl<'a> SolEncode<'a> for ERC20InvalidReceiver { + type SolType = (&'a Address,); + + #[inline] + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + #[inline] + fn to_sol_type(&'a self) -> Self::SolType { + (&self.0,) + } + } + impl From for Error { + fn from(value: ERC20InvalidReceiver) -> Self { + Self::InvalidReceiver(value) + } + } + + #[test] + fn error_encoding_works() { + for (result, expected) in [ + ( + ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InsufficientBalance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + ), + (ERC20InsufficientValue.abi_encode(),"bffe98ad"), + ( + ERC20InvalidApprover([255u8; 20].into()).abi_encode(), + "e602df05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InvalidReceiver([255u8; 20].into()).abi_encode(), + "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InvalidSender([255u8; 20].into()).abi_encode(), + "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ] { + assert_eq!(hex::encode(result), expected) + } + } +} diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs new file mode 100644 index 000000000..f176bd1c4 --- /dev/null +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -0,0 +1,585 @@ +use alloy_sol_types::{ + sol_data::{Address as SolAddress, Uint}, + SolError, SolType, +}; +pub use erc20::{Approval, Transfer}; +pub use errors::*; +use ink::{ + contract_ref, + prelude::{string::String, vec::Vec}, + primitives::sol::SolTypeEncode, + U256, +}; + +pub use super::revert; +use super::*; + +/// APIs for fungible tokens conforming to the ERC20 standard. +pub mod erc20; + +const PRECOMPILE: u16 = 100; + +pub type TokenId = u32; + +/// The fungibles precompile offers a streamlined interface for interacting with fungible +/// tokens. The goal is to provide a simplified, consistent API that adheres to standards in +/// the smart contract space. +#[ink::trait_definition] +pub trait Fungibles { + /// Create a new token with an automatically generated identifier. + #[ink(message)] + fn create(&self, admin: Address, min_balance: U256) -> TokenId; + + /// Set the metadata for a token. + #[ink(message)] + #[allow(non_snake_case)] + fn setMetadata(&self, id: TokenId, name: String, symbol: String, decimals: u8); + + /// Clear the metadata for a token. + #[ink(message)] + #[allow(non_snake_case)] + fn clearMetadata(&self, id: TokenId); + + /// Creates `value` amount of tokens and assigns them to `account`, increasing the total + /// supply. + #[ink(message)] + fn mint(&self, id: TokenId, account: Address, value: U256); + + /// Transfers `value` amount of tokens from the caller's account to account `to`. + #[ink(message)] + fn transfer(&self, id: TokenId, to: Address, value: U256); + + /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. + #[ink(message)] + fn approve(&self, id: TokenId, spender: Address, value: U256); + + /// Transfers `value` amount tokens on behalf of `from` to account `to`. + #[ink(message)] + #[allow(non_snake_case)] + fn transferFrom(&self, id: TokenId, from: Address, to: Address, value: U256); + + /// Destroys `value` amount of tokens from `account`, reducing the total supply. + #[ink(message)] + fn burn(&self, id: TokenId, address: Address, value: U256); + + /// Start the process of destroying a token. + #[ink(message)] + #[allow(non_snake_case)] + fn startDestroy(&self, id: TokenId); + + /// Whether a specified token exists. + #[ink(message)] + fn exists(&self, id: TokenId) -> bool; +} + +/// Create a new token with an automatically generated identifier. +/// +/// # Parameters +/// - `admin` - The account that will administer the token. +/// - `min_balance` - The minimum balance required for accounts holding this token. +/// +/// NOTE: The minimum balance must be non-zero. +#[inline] +pub fn create(admin: Address, min_balance: U256) -> Result { + ensure!(admin != Address::zero(), ZeroAdminAddress); + ensure!(min_balance != U256::zero(), MinBalanceZero); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.create(admin, min_balance)) + + // // WORKAROUND: + // let selector = 0x0ecaea73_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(admin).push_arg(min_balance)) + // .returns::() + // .invoke()) +} + +/// Set the metadata for a token. +#[inline] +pub fn set_metadata(id: TokenId, name: String, symbol: String, decimals: u8) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.setMetadata(id, name, symbol, decimals) + + // // WORKAROUND: + // let selector = 0xdc331b70_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input( + // ExecutionInput::new(selector) + // .push_arg(id) + // .push_arg(name) + // .push_arg(symbol) + // .push_arg(decimals), + // ) + // .returns::<()>() + // .invoke() +} + +/// Clear the metadata for a token. +#[inline] +pub fn clear_metadata(id: TokenId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.clearMetadata(id) + + // // WORKAROUND: + // let selector = 0xc4e4005a_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id)) + // .returns::<()>() + // .invoke() +} + +/// Creates `value` amount of tokens and assigns them to `account`, increasing the total +/// supply. +#[inline] +pub fn mint(id: TokenId, account: Address, value: U256) -> Result<(), Error> { + ensure!(account != Address::zero(), ZeroRecipientAddress); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.mint(id, account, value)) + + // // WORKAROUND: + // let selector = 0x79d9b87b_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value)) + // .returns() + // .invoke()) +} + +/// Transfers `value` amount of tokens from the caller's account to account `to`. +#[inline] +pub fn transfer(id: TokenId, to: Address, value: U256) -> Result<(), Error> { + ensure!(to != Address::zero(), ZeroRecipientAddress); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.transfer(id, to, value)) + + // // WORKAROUND: + // let selector = 0xd09ae45_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(to).push_arg(value)) + // .returns::<()>() + // .invoke()) +} + +/// Approves `spender` to spend `value` amount of tokens on behalf of the caller. +#[inline] +pub fn approve(id: TokenId, spender: Address, value: U256) -> Result<(), Error> { + ensure!(spender != Address::zero(), ZeroRecipientAddress); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.approve(id, spender, value)) + + // // WORKAROUND: + // let selector = 0xf674e563_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(spender).push_arg(value)) + // .returns::<()>() + // .invoke()) +} + +/// Transfers `value` amount tokens on behalf of `from` to account `to`. +#[inline] +pub fn transfer_from(id: TokenId, from: Address, to: Address, value: U256) -> Result<(), Error> { + ensure!(from != Address::zero(), ZeroSenderAddress); + ensure!(to != Address::zero(), ZeroRecipientAddress); + ensure!(to != from, InvalidRecipient(to)); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.transferFrom(id, from, to, value)) + + // // WORKAROUND: + // let selector = 0x0f0bc28d_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input( + // ExecutionInput::new(selector) + // .push_arg(id) + // .push_arg(from) + // .push_arg(to) + // .push_arg(value), + // ) + // .returns::<()>() + // .invoke()) +} + +/// Destroys `value` amount of tokens from `account`, reducing the total supply. +#[inline] +pub fn burn(id: TokenId, account: Address, value: U256) -> Result<(), Error> { + ensure!(account != Address::zero(), ZeroSenderAddress); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.burn(id, account, value)) + + // // WORKAROUND: + // let selector = 0xc3ec6016_u32.to_be_bytes().into(); + // Ok(build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value)) + // .returns() + // .invoke()) +} + +/// Start the process of destroying a token. +#[inline] +pub fn start_destroy(id: TokenId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.startDestroy(id) + + // // WORKAROUND: + // let selector = 0x224f84a5_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id)) + // .returns::<()>() + // .invoke() +} + +/// Whether a specified token exists. +#[inline] +pub fn exists(id: TokenId) -> bool { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.exists(id) + + // // WORKAROUND: + // let selector = 0x13c369ed_u32.to_be_bytes().into(); + // build_call_solidity::() + // .call(address) + // .exec_input(ExecutionInput::new(selector).push_arg(id)) + // .returns::() + // .invoke() +} + +/// Returns the total token supply. +#[inline] +pub fn total_supply(id: TokenId) -> U256 { + erc20::total_supply(id) +} + +/// Returns the value of tokens owned by `account`. +#[inline] +pub fn balance_of(id: TokenId, account: Address) -> U256 { + erc20::balance_of(id, account) +} + +/// Returns the remaining number of tokens that `spender` will be allowed to spend +/// on behalf of `owner` through [`transfer_from`]. This is zero by default. +/// +/// This value changes when `approve` or [`transfer_from`] are called. +#[inline] +pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { + erc20::allowance(id, owner, spender) +} + +/// Returns the name of the token. +#[inline] +pub fn name(id: TokenId) -> String { + erc20::extensions::name(id) +} + +/// Returns the symbol of the token. +#[inline] +pub fn symbol(id: TokenId) -> String { + erc20::extensions::symbol(id) +} + +/// Returns the decimals places of the token. +#[inline] +pub fn decimals(id: TokenId) -> u8 { + erc20::extensions::decimals(id) +} + +// NOTE: subject to change based on ink!'s support for solidity custom errors. +pub enum Error { + /// The token recipient is invalid. + InvalidRecipient(InvalidRecipient), + /// The minimum balance should be non-zero. + MinBalanceZero(MinBalanceZero), + /// The signing account has no permission to do the operation. + NoPermission(NoPermission), + /// The `admin` address cannot be the zero address. + ZeroAdminAddress(ZeroAdminAddress), + /// The recipient cannot be the zero address. + ZeroRecipientAddress(ZeroRecipientAddress), + /// The sender cannot be the zero address. + ZeroSenderAddress(ZeroSenderAddress), + /// The specified `value` cannot be zero. + ZeroValue(ZeroValue), +} + +impl<'a> SolEncode<'a> for Error { + type SolType = (); + + fn encode(&'a self) -> Vec { + use Error::*; + match self { + InvalidRecipient(e) => e.abi_encode(), + MinBalanceZero(e) => e.abi_encode(), + NoPermission(e) => e.abi_encode(), + ZeroAdminAddress(e) => e.abi_encode(), + ZeroRecipientAddress(e) => e.abi_encode(), + ZeroSenderAddress(e) => e.abi_encode(), + ZeroValue(e) => e.abi_encode(), + } + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } +} + +mod errors { + use super::*; + + /// The token recipient is invalid. + pub struct InvalidRecipient(pub Address); + impl SolError for InvalidRecipient { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [23, 133, 139, 190]; + const SIGNATURE: &'static str = "InvalidRecipient(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self(Address::from(*tuple.0 .0)) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } + } + impl<'a> SolEncode<'a> for InvalidRecipient { + type SolType = (&'a Address,); + + #[inline] + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + #[inline] + fn to_sol_type(&'a self) -> Self::SolType { + (&self.0,) + } + } + impl From for Error { + fn from(value: InvalidRecipient) -> Self { + Self::InvalidRecipient(value) + } + } + + /// The minimum balance should be non-zero. + pub struct MinBalanceZero; + impl SolError for MinBalanceZero { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [95, 21, 97, 139]; + const SIGNATURE: &'static str = "MinBalanceZero()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: MinBalanceZero) -> Self { + Self::MinBalanceZero(value) + } + } + + /// The signing account has no permission to do the operation. + pub struct NoPermission; + impl SolError for NoPermission { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [157, 123, 54, 157]; + const SIGNATURE: &'static str = "NoPermission()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl<'a> SolEncode<'a> for NoPermission { + type SolType = (); + + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } + } + // impl<'a> SolDecode<'a> for NoPermission { + // type SolType = (); + + // fn decode(data: &[u8]) -> Result + // where + // Self: Sized, + // { + // } + + // fn from_sol_type(value: Self::SolType) -> Self { + // todo!() + // } + // } + + impl From for Error { + fn from(value: NoPermission) -> Self { + Self::NoPermission(value) + } + } + + /// The `admin` address cannot be the zero address. + pub struct ZeroAdminAddress; + impl SolError for ZeroAdminAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [62, 243, 155, 129]; + const SIGNATURE: &'static str = "ZeroAdminAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: ZeroAdminAddress) -> Self { + Self::ZeroAdminAddress(value) + } + } + + /// The recipient cannot be the zero address. + pub struct ZeroRecipientAddress; + impl SolError for ZeroRecipientAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [206, 239, 152, 87]; + const SIGNATURE: &'static str = "ZeroRecipientAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: ZeroRecipientAddress) -> Self { + Self::ZeroRecipientAddress(value) + } + } + + /// The sender cannot be the zero address. + pub struct ZeroSenderAddress; + impl SolError for ZeroSenderAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [255, 54, 43, 196]; + const SIGNATURE: &'static str = "ZeroSenderAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: ZeroSenderAddress) -> Self { + Self::ZeroSenderAddress(value) + } + } + + /// The `value` should be non-zero. + pub struct ZeroValue; + impl SolError for ZeroValue { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [124, 148, 110, 215]; + const SIGNATURE: &'static str = "ZeroValue()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + } + impl From for Error { + fn from(value: ZeroValue) -> Self { + Self::ZeroValue(value) + } + } + + #[test] + fn error_encoding_works() { + for (result, expected) in [ + ( + InvalidRecipient([255u8; 20].into()).abi_encode(), + "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + ), + (MinBalanceZero.abi_encode(), "5f15618b"), + (NoPermission.abi_encode(), "9d7b369d"), + (ZeroAdminAddress.abi_encode(), "3ef39b81"), + (ZeroRecipientAddress.abi_encode(), "ceef9857"), + (ZeroSenderAddress.abi_encode(), "ff362bc4"), + (ZeroValue.abi_encode(), "7c946ed7"), + ] { + assert_eq!(hex::encode(result), expected) + } + } +} diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index 8ec6bae61..d78785777 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -1,244 +1,24 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] -use ink::{ - env::{ - call::{build_call_solidity, ExecutionInput}, - DefaultEnvironment, - }, - prelude::vec::Vec, - Address, U256, -}; +use ink::{Address, SolEncode}; + +type Pop = ink::env::DefaultEnvironment; /// APIs for fungible tokens. #[cfg(feature = "fungibles")] -pub mod fungibles { - use super::*; - - const PRECOMPILE: u16 = 100; - - pub type TokenId = u32; - - /// Create a new token with an automatically generated identifier. - #[inline] - pub fn create(admin: Address, min_balance: U256) -> TokenId { - let address = fixed_address(PRECOMPILE); - - // GOAL: - // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); - // precompile.create(admin, min_balance) - - // WORKAROUND: - let selector = 0x0ecaea73_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector).push_arg(admin).push_arg(min_balance)) - .returns::() - .invoke() - } - - /// Whether a specified token exists. - #[inline] - pub fn exists(id: TokenId) -> bool { - let address = fixed_address(PRECOMPILE); - - // GOAL: - // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); - // precompile.exists(id) - - // WORKAROUND: - let selector = 0x13c369ed_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector).push_arg(id)) - .returns::() - .invoke() - } - - /// Creates `value` amount of tokens and assigns them to `account`, increasing the total - /// supply. - #[inline] - pub fn mint(id: TokenId, account: Address, value: U256) { - let address = fixed_address(PRECOMPILE); - - // GOAL: - // let precompile: ink::contract_ref!(Fungibles, DefaultEnvironment) = address.into(); - // precompile.mint(id, address, value) - - // WORKAROUND: - let selector = 0x79d9b87b_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input( - ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value), - ) - .returns::<()>() - .invoke() - } - - /// The fungibles precompile offers a streamlined interface for interacting with fungible - /// tokens. The goal is to provide a simplified, consistent API that adheres to standards in - /// the smart contract space. - #[ink::trait_definition] - pub trait Fungibles { - /// Create a new token with an automatically generated identifier. - #[ink(message)] - fn create(&self, admin: Address, min_balance: U256) -> TokenId; - - /// Set the metadata for a token. - #[ink(message)] - fn set_metadata(&self, id: TokenId, name: Vec, symbol: Vec, decimals: u8); - - /// Clear the metadata for a token. - #[ink(message)] - fn clear_metadata(&self, id: TokenId); - - /// Creates `value` amount of tokens and assigns them to `account`, increasing the total - /// supply. - #[ink(message)] - fn mint(&self, id: TokenId, account: Address, value: U256); - - /// Transfers `value` amount of tokens from the caller's account to account `to`. - #[ink(message)] - fn transfer(&self, id: TokenId, to: Address, value: U256); - - /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. - #[ink(message)] - fn approve(&self, id: TokenId, spender: Address, value: U256); - - /// Transfers `value` amount tokens on behalf of `from` to account `to`. - #[ink(message)] - fn transfer_from(&self, id: TokenId, from: Address, to: Address, value: U256); - - /// Destroys `value` amount of tokens from `account`, reducing the total supply. - #[ink(message)] - fn burn(&self, id: TokenId, address: Address, value: U256); +pub mod fungibles; - /// Start the process of destroying a token. - #[ink(message)] - fn start_destroy(&self, id: TokenId) -> bool; - - /// Whether a specified token exists. - #[ink(message)] - fn exists(&self, id: TokenId) -> bool; - } - - /// APIs for fungible tokens conforming to the ERC20 standard. - pub mod erc20 { - use super::*; - - const PRECOMPILE: u16 = 101; - - /// Returns the value of tokens in existence. - #[inline] - pub fn total_supply(id: TokenId) -> U256 { - let address = prefixed_address(PRECOMPILE, id); - let selector = 0x18160ddd_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector)) - .returns::() - .invoke() - } - - /// Returns the value of tokens owned by `account`. - #[inline] - pub fn balance_of(id: TokenId, account: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, id); - let selector = 0x70a08231_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector).push_arg(account)) - .returns::() - .invoke() - } - - /// Returns the remaining number of tokens that `spender` will be allowed to spend - /// on behalf of `owner` through [`transfer_from`]. This is zero by default. - /// - /// This value changes when `approve` or [`transfer_from`] are called. - #[inline] - pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, id); - let selector = 0xdd62ed3e_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector).push_arg(owner).push_arg(spender)) - .returns::() - .invoke() +#[macro_export] +macro_rules! ensure { + ( $x:expr, $y:expr $(,)? ) => {{ + if !$x { + return Err($y.into()); } - - /// Returns the value of tokens owned by `account`. - #[inline] - pub fn transfer(id: TokenId, to: Address, value: U256) -> bool { - let address = prefixed_address(PRECOMPILE, id); - let selector = 0x70a08231_u32.to_be_bytes().into(); - build_call_solidity::() - .call(address) - .exec_input(ExecutionInput::new(selector).push_arg(to).push_arg(value)) - .returns::() - .invoke() - } - - /// Emitted when the allowance of a `spender` for an `owner` is set by a call to - /// [`approve`]. `value` is the new allowance. - #[ink::event] - #[cfg_attr(feature = "std", derive(Debug))] - pub struct Approval { - /// The owner providing the allowance. - #[ink(topic)] - pub owner: Address, - /// The beneficiary of the allowance. - #[ink(topic)] - pub spender: Address, - /// The new allowance amount. - pub value: U256, - } - - /// Emitted when `value` tokens are moved from one account (`from`) to another (`to`). - /// - /// Note that `value` may be zero. - #[ink::event] - #[cfg_attr(feature = "std", derive(Debug))] - pub struct Transfer { - /// The source of the transfer. The zero address when minting. - #[ink(topic)] - pub from: Address, - /// The recipient of the transfer. The zero address when burning. - #[ink(topic)] - pub to: Address, - /// The amount transferred (or minted/burned). - pub value: U256, - } - - /// Interface of the ERC-20 standard. - #[ink::trait_definition] - pub trait Erc20 { - /// Returns the value of tokens in existence. - #[ink(message)] - #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector - fn totalSupply(&self) -> U256; - - /// Returns the value of tokens owned by `account`. - #[ink(message)] - #[allow(non_snake_case)] - fn balanceOf(&self, account: Address) -> U256; - - /// Returns the remaining number of tokens that `spender` will be allowed to spend - /// on behalf of `owner` through [`transfer_from`]. This is zero by default. - /// - /// This value changes when `approve` or `[`transfer_from`] are called. - #[ink(message)] - fn allowance(&self, owner: Address, spender: Address) -> U256; - - /// Moves a `value` amount of tokens from the caller's account to `to`. Returns a - /// boolean value indicating whether the operation succeeded. Emits a {Transfer} - /// event. - #[ink(message)] - fn transfer(&self, to: Address, value: U256) -> bool; - } - } + }}; } +/// Calculates the address of a precompile at index `n`. +#[inline] fn fixed_address(n: u16) -> Address { let shifted = (n as u32) << 16; @@ -252,12 +32,23 @@ fn fixed_address(n: u16) -> Address { address.into() } +/// Calculates the address of a precompile at index `n` and with some additional prefix. +#[inline] fn prefixed_address(n: u16, prefix: u32) -> Address { let mut address = fixed_address(n); address.0[..4].copy_from_slice(&prefix.to_be_bytes()); address } +/// Reverts the current contract execution, rolling back any changes and returning the specified +/// `error`. +// Helper until Solidity support added for Rust errors for automatic reversion based on returning an +// error. +pub fn revert(error: &impl for<'a> SolEncode<'a>) -> ! { + use ink::env::{return_value_solidity, ReturnFlags}; + return_value_solidity(ReturnFlags::REVERT, error) +} + #[test] fn fixed_address_works() { assert_eq!(hex::encode(fixed_address(100)), "0000000000000000000000000000000000640000") From eeac4e65ba0fe84e2e830388b0711870dbab1f11 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 13 Jun 2025 13:33:47 +0100 Subject: [PATCH 061/284] test(devnet): improvements to fungibles precompile contract test --- runtime/devnet/src/config/contracts.rs | 36 ++++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index b7ce623eb..d7d33df23 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -223,20 +223,20 @@ mod tests { }) } - // Currently ignored due to explicit dependency on built contract - #[ignore] #[test] fn fungibles_precompiles_via_contract_works() { let contract = include_bytes!( - "../../../../pop-api-vnext/examples/fungibles-vnext/target/ink/fungibles.polkavm" + "../../../../pop-api-vnext/examples/fungibles/target/ink/fungibles.polkavm" ); let caller = Alice.to_account_id(); let origin = RuntimeOrigin::signed(caller.clone()); - let origin_addr = primitives::Address::new(AccountId32Mapper::to_address(&caller).0); + let recipient = Bob.to_account_id(); + let recipient_addr = primitives::Address::new(AccountId32Mapper::to_address(&recipient).0); let minimum_value = U256::from(1); let endowment = primitives::U256::from(10_000); new_test_ext().execute_with(|| { assert_ok!(Revive::map_account(origin.clone())); + assert_ok!(Revive::map_account(RuntimeOrigin::signed(recipient))); // Instantiate contract with some value, required to create underlying asset let result = Revive::bare_instantiate( @@ -246,21 +246,23 @@ mod tests { DepositLimit::Unchecked, Code::Upload(contract.to_vec()), // Constructors are not yet using Solidity encoding - [blake_selector("new"), minimum_value.encode()].concat(), + [blake_selector("new"), ("Name", "SYMBOL", minimum_value, 10u8).encode()].concat(), None, ) .result .unwrap(); assert!(!result.result.did_revert()); + let contract = primitives::Address::new(result.addr.0); - // Interact with contract as Erc20 + // Mint some tokens to the contract call::<()>( origin.clone(), result.addr, - [keccak_selector("mint(address,uint256)"), (origin_addr, endowment).abi_encode()] + [keccak_selector("mint(address,uint256)"), (contract, endowment).abi_encode()] .concat(), ); + // Interact with contract as Erc20 let total_supply = call::( origin.clone(), result.addr, @@ -271,9 +273,27 @@ mod tests { let balance_of = call::( origin.clone(), result.addr, - [keccak_selector("balanceOf(address)"), (origin_addr,).abi_encode()].concat(), + [keccak_selector("balanceOf(address)"), (contract,).abi_encode()].concat(), ); assert_eq!(balance_of, endowment); + + // Transfer tokens from contract to recipient + let value = endowment / primitives::U256::from(2); + assert!(call::( + origin.clone(), + result.addr, + [ + keccak_selector("transfer(address,uint256)"), + (recipient_addr, value).abi_encode(), + ] + .concat(), + )); + let balance_of = call::( + origin.clone(), + result.addr, + [keccak_selector("balanceOf(address)"), (recipient_addr,).abi_encode()].concat(), + ); + assert_eq!(balance_of, value); }); fn call::RustType>>( From d37aa16f3868c11ac93d2ac388ea45e04b784a7c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 13 Jun 2025 13:39:24 +0100 Subject: [PATCH 062/284] refactor(pop-api): remove redundant code for manual precompile calls --- pop-api-vnext/src/fungibles/erc20.rs | 64 ---------------- pop-api-vnext/src/fungibles/mod.rs | 106 --------------------------- 2 files changed, 170 deletions(-) diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index 8ef4aff4c..211982f15 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -93,13 +93,6 @@ pub fn total_supply(id: TokenId) -> U256 { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.totalSupply() - - // let selector = 0x18160ddd_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector)) - // .returns::() - // .invoke() } /// Returns the value of tokens owned by `account`. @@ -108,13 +101,6 @@ pub fn balance_of(id: TokenId, account: Address) -> U256 { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.balanceOf(account) - - // let selector = 0x70a08231_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(account)) - // .returns::() - // .invoke() } /// Returns the value of tokens owned by `account`. @@ -126,14 +112,6 @@ pub fn transfer(id: TokenId, to: Address, value: U256) -> Result { let address = prefixed_address(PRECOMPILE, id); let mut precompile: contract_ref!(Erc20, Pop) = address.into(); Ok(precompile.transfer(to, value)) - - // let selector = 0xa9059cbb_u32.to_be_bytes().into(); - // let result = build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(to).push_arg(value)) - // .returns::() - // .invoke(); - // Ok(result) } /// Returns the remaining number of tokens that `spender` will be allowed to spend @@ -145,13 +123,6 @@ pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.allowance(owner, spender) - - // let selector = 0xdd62ed3e_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(owner).push_arg(spender)) - // .returns::() - // .invoke() } /// Sets a `value` amount of tokens as the allowance of `spender` over the caller's @@ -168,13 +139,6 @@ pub fn approve(id: TokenId, spender: Address, value: U256) -> Result() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(spender).push_arg(value)) - // .returns::() - // .invoke()) } /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. @@ -192,13 +156,6 @@ pub fn transfer_from(id: TokenId, from: Address, to: Address, value: U256) -> Re let address = prefixed_address(PRECOMPILE, id); let mut precompile: contract_ref!(Erc20, Pop) = address.into(); Ok(precompile.transferFrom(from, to, value)) - - // let selector = 0x23b872dd_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(from).push_arg(to).push_arg(value)) - // .returns::() - // .invoke()) } /// Extensions to the ERC-20 standard. @@ -227,13 +184,6 @@ pub mod extensions { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.name() - - // let selector = 0x06fdde03_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector)) - // .returns::() - // .invoke() } /// Returns the symbol of the token. @@ -242,13 +192,6 @@ pub mod extensions { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.symbol() - - // let selector = 0x95d89b41_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector)) - // .returns::() - // .invoke() } /// Returns the decimals places of the token. @@ -257,13 +200,6 @@ pub mod extensions { let address = prefixed_address(PRECOMPILE, id); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.decimals() - - // let selector = 0x313ce567_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector)) - // .returns::() - // .invoke() } } diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index f176bd1c4..cd286bbea 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -87,14 +87,6 @@ pub fn create(admin: Address, min_balance: U256) -> Result { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.create(admin, min_balance)) - - // // WORKAROUND: - // let selector = 0x0ecaea73_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(admin).push_arg(min_balance)) - // .returns::() - // .invoke()) } /// Set the metadata for a token. @@ -103,20 +95,6 @@ pub fn set_metadata(id: TokenId, name: String, symbol: String, decimals: u8) { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); precompile.setMetadata(id, name, symbol, decimals) - - // // WORKAROUND: - // let selector = 0xdc331b70_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input( - // ExecutionInput::new(selector) - // .push_arg(id) - // .push_arg(name) - // .push_arg(symbol) - // .push_arg(decimals), - // ) - // .returns::<()>() - // .invoke() } /// Clear the metadata for a token. @@ -125,14 +103,6 @@ pub fn clear_metadata(id: TokenId) { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); precompile.clearMetadata(id) - - // // WORKAROUND: - // let selector = 0xc4e4005a_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id)) - // .returns::<()>() - // .invoke() } /// Creates `value` amount of tokens and assigns them to `account`, increasing the total @@ -145,14 +115,6 @@ pub fn mint(id: TokenId, account: Address, value: U256) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.mint(id, account, value)) - - // // WORKAROUND: - // let selector = 0x79d9b87b_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value)) - // .returns() - // .invoke()) } /// Transfers `value` amount of tokens from the caller's account to account `to`. @@ -164,14 +126,6 @@ pub fn transfer(id: TokenId, to: Address, value: U256) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.transfer(id, to, value)) - - // // WORKAROUND: - // let selector = 0xd09ae45_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(to).push_arg(value)) - // .returns::<()>() - // .invoke()) } /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. @@ -183,14 +137,6 @@ pub fn approve(id: TokenId, spender: Address, value: U256) -> Result<(), Error> let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.approve(id, spender, value)) - - // // WORKAROUND: - // let selector = 0xf674e563_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(spender).push_arg(value)) - // .returns::<()>() - // .invoke()) } /// Transfers `value` amount tokens on behalf of `from` to account `to`. @@ -204,20 +150,6 @@ pub fn transfer_from(id: TokenId, from: Address, to: Address, value: U256) -> Re let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.transferFrom(id, from, to, value)) - - // // WORKAROUND: - // let selector = 0x0f0bc28d_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input( - // ExecutionInput::new(selector) - // .push_arg(id) - // .push_arg(from) - // .push_arg(to) - // .push_arg(value), - // ) - // .returns::<()>() - // .invoke()) } /// Destroys `value` amount of tokens from `account`, reducing the total supply. @@ -229,14 +161,6 @@ pub fn burn(id: TokenId, account: Address, value: U256) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); Ok(precompile.burn(id, account, value)) - - // // WORKAROUND: - // let selector = 0xc3ec6016_u32.to_be_bytes().into(); - // Ok(build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id).push_arg(account).push_arg(value)) - // .returns() - // .invoke()) } /// Start the process of destroying a token. @@ -245,14 +169,6 @@ pub fn start_destroy(id: TokenId) { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); precompile.startDestroy(id) - - // // WORKAROUND: - // let selector = 0x224f84a5_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id)) - // .returns::<()>() - // .invoke() } /// Whether a specified token exists. @@ -261,14 +177,6 @@ pub fn exists(id: TokenId) -> bool { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); precompile.exists(id) - - // // WORKAROUND: - // let selector = 0x13c369ed_u32.to_be_bytes().into(); - // build_call_solidity::() - // .call(address) - // .exec_input(ExecutionInput::new(selector).push_arg(id)) - // .returns::() - // .invoke() } /// Returns the total token supply. @@ -445,20 +353,6 @@ mod errors { () } } - // impl<'a> SolDecode<'a> for NoPermission { - // type SolType = (); - - // fn decode(data: &[u8]) -> Result - // where - // Self: Sized, - // { - // } - - // fn from_sol_type(value: Self::SolType) -> Self { - // todo!() - // } - // } - impl From for Error { fn from(value: NoPermission) -> Self { Self::NoPermission(value) From a721b470a0cb98ae9a8b73d93a55adf3d15e4086 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 14 Jun 2025 09:49:08 +0100 Subject: [PATCH 063/284] refactor(fungibles): ensure feature parity with prior implementation --- pallets/api-vnext/src/fungibles/mod.rs | 80 +- .../src/fungibles/precompiles/erc20.rs | 165 ++-- .../precompiles/interfaces/IFungibles.sol | 173 +++- .../src/fungibles/precompiles/mod.rs | 793 ++++++++++++------ pop-api-vnext/examples/fungibles/lib.rs | 66 +- pop-api-vnext/src/fungibles/erc20.rs | 43 +- pop-api-vnext/src/fungibles/mod.rs | 381 +++++++-- runtime/devnet/src/config/contracts.rs | 10 +- 8 files changed, 1246 insertions(+), 465 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index 3131690cc..c93c6c995 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -1,8 +1,10 @@ use core::cmp::Ordering::{Equal, Greater, Less}; use frame_support::{ - dispatch::{DispatchResult, DispatchResultWithPostInfo, WithPostDispatchInfo}, - pallet_prelude::{DispatchError, Zero}, + dispatch::{ + DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo, WithPostDispatchInfo, + }, + pallet_prelude::{CheckedSub, DispatchError, Zero}, sp_runtime::Saturating, traits::fungibles::{approvals::Inspect as _, Inspect as _}, weights::Weight, @@ -94,10 +96,84 @@ fn create, I>( Ok(id) } +fn decrease_allowance, I>( + origin: OriginFor, + asset: AssetIdOf, + spender: AccountIdOf, + value: BalanceOf, +) -> Result<(BalanceOf, Option), DispatchErrorWithPostInfo> { + let owner = ensure_signed(origin.clone()).map_err(|e| { + e.with_weight( + // TODO: WeightOf::::approve(0, 0) + Weight::zero(), + ) + })?; + if value.is_zero() { + return Ok(( + value, + Some( + // TODO: WeightOf::::approve(0, 0) + Weight::zero(), + ), + )); + } + let current_allowance = >::allowance(asset.clone(), &owner, &spender); + let spender_source = T::Lookup::unlookup(spender.clone()); + let asset_param: >::AssetIdParameter = asset.clone().into(); + + // Cancel the approval and approve `new_allowance` if difference is more than zero. + let new_allowance = current_allowance + .checked_sub(&value) + .ok_or(pallet_assets::Error::::Unapproved)?; + >::cancel_approval(origin.clone(), asset_param.clone(), spender_source.clone()) + .map_err(|e| { + e.with_weight( + // TODO: WeightOf::::approve(0, 1) + Weight::zero(), + ) + })?; + let weight = if new_allowance.is_zero() { + // TODO: WeightOf::::approve(0, 1) + Weight::zero() + } else { + >::approve_transfer(origin, asset_param, spender_source, new_allowance)?; + // TODO: WeightOf::::approve(1, 1) + Weight::zero() + }; + Ok((new_allowance, Some(weight).into())) +} + fn exists, I>(asset: AssetIdOf) -> bool { >::asset_exists(asset) } +fn increase_allowance, I>( + origin: OriginFor, + asset: AssetIdOf, + spender: AccountIdOf, + value: BalanceOf, +) -> Result, DispatchErrorWithPostInfo> { + let owner = ensure_signed(origin.clone()).map_err(|e| { + e.with_weight( + // TODO: WeightOf::::approve(0, 0) + Weight::zero(), + ) + })?; + >::approve_transfer( + origin, + asset.clone().into(), + T::Lookup::unlookup(spender.clone()), + value, + ) + .map_err(|e| { + e.with_weight( + // TODO: AssetsWeightInfoOf::::approve_transfer() + Weight::zero(), + ) + })?; + Ok(>::allowance(asset, &owner, &spender)) +} + fn mint, I>( origin: OriginFor, asset: AssetIdOf, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 7aef13f9e..785941d08 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,14 +1,18 @@ -use alloc::string::String; +use alloc::{string::String, vec::Vec}; use frame_support::{ sp_runtime::traits::AtLeast32Bit, traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, }; -use pallet_revive::precompiles::alloy::primitives::ruint::UintTryFrom; +use pallet_revive::AddressMapper as _; use AddressMatcher::Prefix; use IERC20::*; -use super::*; +use super::{ + deposit_event, prefixed_address, sol, to_runtime_origin, AddressMapper, AddressMatcher, + AssetIdExtractor, Assets, Config, Error, Ext, InlineAssetIdExtractor, NonZero, PhantomData, + Precompile, SolCall, UintTryFrom, UintTryTo, U256, +}; sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); @@ -36,19 +40,19 @@ where ) -> Result, Error> { use IERC20::{IERC20Calls::*, *}; - let id = InlineAssetIdExtractor::asset_id_from_address(address)?.into(); + let token = InlineAssetIdExtractor::asset_id_from_address(address)?.into(); match input { // IERC20 totalSupply(_) => { // TODO: charge based on benchmarked weight - let total_supply = U256::saturating_from(>::total_supply(id)); + let total_supply = U256::saturating_from(>::total_supply(token)); Ok(totalSupplyCall::abi_encode_returns(&(total_supply,))) }, balanceOf(balanceOfCall { account }) => { // TODO: charge based on benchmarked weight let account = env.to_account_id(&(*account.0).into()); - let balance = U256::saturating_from(>::balance(id, account)); + let balance = U256::saturating_from(>::balance(token, account)); Ok(balanceOfCall::abi_encode_returns(&(balance,))) }, transfer(transferCall { to, value }) => { @@ -57,7 +61,7 @@ where super::transfer::( to_runtime_origin(env.caller()), - id, + token, env.to_account_id(&(*to.0).into()), value.saturating_to(), )?; @@ -70,7 +74,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let remaining = - U256::saturating_from(>::allowance(id, &owner, &spender)); + U256::saturating_from(>::allowance(token, &owner, &spender)); Ok(allowanceCall::abi_encode_returns(&(remaining,))) }, approve(approveCall { spender, value }) => { @@ -79,7 +83,7 @@ where super::approve::( to_runtime_origin(env.caller()), - id, + token, env.to_account_id(&(*spender.0).into()), value.saturating_to(), ) // TODO: adjust weight @@ -92,9 +96,9 @@ where transferFrom(transferFromCall { from, to, value }) => { // TODO: charge based on benchmarked weight - transfer_from::( + super::transfer_from::( to_runtime_origin(env.caller()), - id, + token, env.to_account_id(&(*from.0).into()), env.to_account_id(&(*to.0).into()), value.saturating_to(), @@ -106,21 +110,21 @@ where // IERC20Metadata name(_) => { // TODO: charge based on benchmarked weight - let result = >::name(id); + let result = >::name(token); // TODO: improve let result = String::from_utf8_lossy(result.as_slice()); Ok(nameCall::abi_encode_returns(&(result,))) }, symbol(_) => { // TODO: charge based on benchmarked weight - let result = >::symbol(id); + let result = >::symbol(token); // TODO: improve let result = String::from_utf8_lossy(result.as_slice()); Ok(symbolCall::abi_encode_returns(&(result,))) }, decimals(_) => { // TODO: charge based on benchmarked weight - let result = >::decimals(id); + let result = >::decimals(token); Ok(decimalsCall::abi_encode_returns(&(result,))) }, } @@ -136,35 +140,41 @@ impl, I: 'static> Erc20 { #[cfg(test)] mod tests { use frame_support::{assert_ok, sp_runtime::app_crypto::sp_core::bytes::to_hex}; - use mock::Test; use pallet_assets::Instance1; use pallet_revive::{ - precompiles::{alloy::sol_types::SolType, ExtWithInfo}, + precompiles::{ + alloy::sol_types::{SolType, SolValue}, + ExtWithInfo, + }, test_utils::{ALICE, ALICE_ADDR, BOB, BOB_ADDR}, + Origin, }; use IERC20Calls::*; use IERC20::{Approval, Transfer}; use super::*; - use crate::mock::{ExtBuilder, RuntimeOrigin}; + use crate::{ + assert_last_event, + fungibles::approve, + mock::{Assets, ExtBuilder, RuntimeOrigin, Test}, + }; const ERC20: u16 = 101; - type Assets = mock::Assets; type Erc20 = super::Erc20; #[test] fn total_supply_works() { - let id = u32::MAX; + let token = u32::MAX; let total_supply = 10_000_000; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_balances(vec![(id, ALICE, total_supply)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, total_supply)]) .build_with_env(|mut call_setup| { assert_eq!( call_precompile::( &mut call_setup.ext().0, - id, + token, &totalSupply(totalSupplyCall {}) ) .unwrap(), @@ -175,44 +185,44 @@ mod tests { #[test] fn balance_of_works() { - let id = u32::MAX; + let token = u32::MAX; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_balances(vec![(id, ALICE, endowment)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) .build_with_env(|mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); assert_eq!( call_precompile::( &mut call_setup.ext().0, - id, + token, &balanceOf(balanceOfCall { account: ALICE_ADDR.0.into() }) ) .unwrap(), U256::from(endowment) ); - assert_eq!(Assets::balance(id, ALICE), endowment); + assert_eq!(Assets::balance(token, ALICE), endowment); }); } #[test] fn transfer_works() { - let id = u32::MAX; + let token = u32::MAX; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(id, BOB, true, 1)]) - .with_asset_balances(vec![(id, BOB, endowment)]) + .with_assets(vec![(token, BOB, true, 1)]) + .with_asset_balances(vec![(token, BOB, endowment)]) .build_with_env(|mut call_setup| { call_setup.set_origin(Origin::Signed(BOB)); - assert_eq!(Assets::balance(id, BOB), endowment); - assert_eq!(Assets::balance(id, ALICE), 0); + assert_eq!(Assets::balance(token, BOB), endowment); + assert_eq!(Assets::balance(token, ALICE), 0); let value = endowment / 2; assert!(call_precompile::( &mut call_setup.ext().0, - id, + token, &IERC20Calls::transfer(IERC20::transferCall { to: ALICE_ADDR.0.into(), value: U256::from(value) @@ -220,24 +230,24 @@ mod tests { ) .unwrap()); - assert_eq!(Assets::balance(id, BOB), endowment - value); - assert_eq!(Assets::balance(id, ALICE), value); + assert_eq!(Assets::balance(token, BOB), endowment - value); + assert_eq!(Assets::balance(token, ALICE), value); let from = BOB_ADDR.0.into(); let to = ALICE_ADDR.0.into(); let event = Transfer { from, to, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, id), event); + assert_last_event(prefixed_address(ERC20, token), event); }); } #[test] fn allowance_works() { - let id = u32::MAX; + let token = u32::MAX; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { - assert_ok!(super::approve::( + assert_ok!(approve::( RuntimeOrigin::signed(ALICE), - id, + token, BOB, value )); @@ -245,7 +255,7 @@ mod tests { assert_eq!( call_precompile::( &mut call_setup.ext().0, - id, + token, &allowance(allowanceCall { owner: ALICE_ADDR.0.into(), spender: BOB_ADDR.0.into(), @@ -260,17 +270,17 @@ mod tests { #[test] fn approve_works() { - let id = u32::MAX; + let token = u32::MAX; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::allowance(id, &ALICE, &BOB), 0); + assert_eq!(Assets::allowance(token, &ALICE, &BOB), 0); assert!(call_precompile::( &mut call_setup.ext().0, - id, + token, &IERC20Calls::approve(IERC20::approveCall { spender: BOB_ADDR.0.into(), value: U256::from(value) @@ -278,29 +288,29 @@ mod tests { ) .unwrap()); - assert_eq!(Assets::allowance(id, &ALICE, &BOB), value); + assert_eq!(Assets::allowance(token, &ALICE, &BOB), value); let owner = ALICE_ADDR.0.into(); let spender = BOB_ADDR.0.into(); let event = Approval { owner, spender, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, id), event); + assert_last_event(prefixed_address(ERC20, token), event); }, ); } #[test] fn transfer_from_works() { - let id = u32::MAX; + let token = u32::MAX; let endowment = 10_000_000; let value = endowment / 2; ExtBuilder::new() - .with_assets(vec![(id, ALICE, true, 1)]) - .with_asset_balances(vec![(id, ALICE, endowment)]) + .with_assets(vec![(token, ALICE, true, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) .build_with_env(|mut call_setup| { - assert_eq!(Assets::balance(id, ALICE), endowment); - assert_eq!(Assets::balance(id, BOB), 0); - assert_ok!(super::approve::( + assert_eq!(Assets::balance(token, ALICE), endowment); + assert_eq!(Assets::balance(token, BOB), 0); + assert_ok!(approve::( RuntimeOrigin::signed(ALICE), - id, + token, BOB, value )); @@ -308,7 +318,7 @@ mod tests { assert!(call_precompile::( &mut call_setup.ext().0, - id, + token, &transferFrom(IERC20::transferFromCall { from: ALICE_ADDR.0.into(), to: BOB_ADDR.0.into(), @@ -317,25 +327,25 @@ mod tests { ) .unwrap()); - assert_eq!(Assets::balance(id, ALICE), endowment - value); - assert_eq!(Assets::balance(id, BOB), value); + assert_eq!(Assets::balance(token, ALICE), endowment - value); + assert_eq!(Assets::balance(token, BOB), value); let from = ALICE_ADDR.0.into(); let to = BOB_ADDR.0.into(); let event = Transfer { from, to, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, id), event); + assert_last_event(prefixed_address(ERC20, token), event); }); } #[test] fn name_works() { - let id = u32::MAX; + let token = u32::MAX; let _name = "name"; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_metadata(vec![(id, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) .build_with_env(|mut call_setup| { assert_eq!( - call_precompile::(&mut call_setup.ext().0, id, &name(nameCall {})) + call_precompile::(&mut call_setup.ext().0, token, &name(nameCall {})) .unwrap() .as_str(), _name @@ -345,16 +355,20 @@ mod tests { #[test] fn symbol_works() { - let id = u32::MAX; + let token = u32::MAX; let _symbol = "symbol"; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_metadata(vec![(id, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) .build_with_env(|mut call_setup| { assert_eq!( - call_precompile::(&mut call_setup.ext().0, id, &symbol(symbolCall {})) - .unwrap() - .as_str(), + call_precompile::( + &mut call_setup.ext().0, + token, + &symbol(symbolCall {}) + ) + .unwrap() + .as_str(), _symbol ); }); @@ -362,15 +376,16 @@ mod tests { #[test] fn decimals_works() { - let id = u32::MAX; + let token = u32::MAX; let _decimals = u8::MAX; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_metadata(vec![(id, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) .build_with_env(|mut call_setup| { let mut ext = call_setup.ext().0; assert_eq!( - call_precompile::(&mut ext, id, &decimals(decimalsCall {})).unwrap() as u8, + call_precompile::(&mut ext, token, &decimals(decimalsCall {})).unwrap() + as u8, _decimals ); }); @@ -384,10 +399,10 @@ mod tests { } fn call_precompile::RustType>>( - ext: &mut impl ExtWithInfo, - id: u32, + ext: &mut impl ExtWithInfo, + token: u32, input: &IERC20Calls, ) -> Result { - super::call_precompile::(ext, &prefixed_address(ERC20, id), input) + crate::call_precompile::(ext, &prefixed_address(ERC20, token), input) } } diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol index a27864dab..99719f137 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol @@ -1,11 +1,71 @@ /** - * @dev The fungibles precompile offers a streamlined interface for interacting with fungible tokens. The goal is to - * provide a simplified, consistent API that adheres to standards in the smart contract space. + * @title The fungibles precompile offers a streamlined interface for interacting with fungible + * tokens. The goal is to provide a simplified, consistent API that adheres to standards in the + * smart contract space. */ // TODO: consider size of id -> uint256 (word) interface IFungibles { /** - * @dev Create a new token with an automatically generated identifier. + * @notice Transfers `value` amount of tokens from the caller's account to account `to`. + * @param token The token to transfer. + * @param to The recipient account. + * @param value The number of tokens to transfer. + */ + function transfer(uint32 token, address to, uint256 value) external; + + /** + * @notice Transfers `value` amount tokens on behalf of `from` to account `to`. + * @param token The token to transfer. + * @param from The account from which the token balance will be withdrawn. + * @param to The recipient account. + * @param value The number of tokens to transfer. + */ + function transferFrom( + uint32 token, + address from, + address to, + uint256 value + ) external; + + /** + * @notice Approves `spender` to spend `value` amount of tokens on behalf of the caller. + * @param token The token to approve. + * @param spender The account that is allowed to spend the tokens. + * @param value The number of tokens to approve. + */ + function approve(uint32 token, address spender, uint256 value) external; + + /** + * @notice Increases the allowance of `spender` by `value` amount of tokens. + * @param token The token to have an allowance increased. + * @param spender The account that is allowed to spend the tokens. + * @param value The number of tokens to increase the allowance by. + * @return allowance The resulting allowance of `spender`. + */ + function increaseAllowance( + uint32 token, + address spender, + uint256 value + ) external returns (uint256 allowance); + + /** + * @notice Decreases the allowance of `spender` by `value` amount of tokens. + * @param token The token to have an allowance decreased. + * @param spender The account that is allowed to spend the tokens. + * @param value The number of tokens to decrease the allowance by. + * @return allowance The resulting allowance of `spender`. + */ + function decreaseAllowance( + uint32 token, + address spender, + uint256 value + ) external returns (uint256 allowance); + + /** + * @notice Create a new token with an automatically generated identifier. + * @param admin The account that will administer the token. + * @param minBalance The minimum balance required for accounts holding this token. + * @return id The resulting identifier of the token. */ function create( address admin, @@ -13,75 +73,124 @@ interface IFungibles { ) external returns (uint32 id); /** - * @dev Set the metadata for a token. + * @notice Start the process of destroying a token. + * @dev See `pallet-assets` documentation for more information. Related dispatchables are`destroy_accounts`, `destroy_approvals`, `finish_destroy`. + * @param token The token to be destroyed. + */ + function startDestroy(uint32 token) external; + + /** + * @notice Set the metadata for a token. + * @param token The token to update. + * @param name The user friendly name of this token. + * @param symbol The exchange symbol for this token. + * @param decimals The number of decimals this token uses to represent one unit. */ function setMetadata( - uint32 id, + uint32 token, string calldata name, string calldata symbol, uint8 decimals ) external; /** - * @dev Clear the metadata for a token. + * @notice Clear the metadata for a token. + * @param token The token to update. */ - function clearMetadata(uint32 id) external; + function clearMetadata(uint32 token) external; /** - * @dev Creates `value` amount of tokens and assigns them to `account`, increasing the total supply. + * @notice Creates `value` amount of tokens and assigns them to `account`, increasing the total supply. + * @param token The token to mint. + * @param token The account to be credited with the created tokens. + * @param value The number of tokens to mint. */ - function mint(uint32 id, address account, uint256 value) external; + function mint(uint32 token, address account, uint256 value) external; /** - * @dev Transfers `value` amount of tokens from the caller's account to account `to`. + * @notice Destroys `value` amount of tokens from `account`, reducing the total supply. + * @param token The token to burn. + * @param account The account from which the tokens will be destroyed. + * @param value The number of tokens to destroy. */ - function transfer(uint32 id, address to, uint256 value) external; + function burn(uint32 token, address account, uint256 value) external; /** - * @dev Approves `spender` to spend `value` amount of tokens on behalf of the caller. + * @notice Total token supply for a specified token. + * @param token The token. */ - function approve(uint32 id, address spender, uint256 value) external; + function totalSupply(uint32 token) external view returns (uint256); /** - * @dev Transfers `value` amount tokens on behalf of `from` to account `to`. + * @notice Account balance for a specified `token` and `owner`. + * @param token The token. + * @param owner The owner of the token. */ - function transferFrom( - uint32 id, - address from, - address to, - uint256 value - ) external; + function balanceOf( + uint32 token, + address owner + ) external view returns (uint256); /** - * @dev Destroys `value` amount of tokens from `account`, reducing the total supply. + * @notice Allowance for a `spender` approved by an `owner`, for a specified `token`. + * @param token The token. + * @param owner The owner of the token. + * @param spender The spender with an allowance. */ - function burn(uint32 id, address account, uint256 value) external; + function allowance( + uint32 token, + address owner, + address spender + ) external view returns (uint256); /** - * @dev Start the process of destroying a token. + * @notice Name of the specified token. */ - function startDestroy(uint32 id) external; + function name(uint32 token) external view returns (string memory); /** - * @dev Whether a specified token exists. + * @notice Symbol for the specified token. */ - function exists(uint32 id) external view returns (bool); + function symbol(uint32 token) external view returns (string memory); /** - * @dev Event emitted when allowance by `owner` to `spender` changes. + * @notice Decimals for the specified token. */ - event Approval(uint32 id, address owner, address spender, uint256 value); + function decimals(uint32 token) external view returns (uint8); + /** - * @dev Event emitted when a token is created. + * @notice Whether the specified token exists. */ - event Created(uint32 id, address creator, address admin); + function exists(uint32 token) external view returns (bool); + + /** + * @notice Event emitted when allowance by `owner` to `spender` changes. + * @param token The token. + * @param owner The owner providing the allowance. + * @param spender The beneficiary of the allowance. + * @param value The new allowance amount. + */ + event Approval(uint32 token, address owner, address spender, uint256 value); + /** - * @dev Event emitted when a token transfer occurs. + * @notice Event emitted when a token transfer occurs. + * @param token The token. + * @param from The source of the transfer. The zero address when minting. + * @param to The recipient of the transfer. The zero address when burning. + * @param value The amount transferred (or minted/burned). */ event Transfer( - uint32 indexed id, + uint32 indexed token, address indexed from, address indexed to, uint256 value ); + + /** + * @notice Event emitted when a token is created. + * @param id The token identifier. + * @param creator The creator of the token. + * @param admin The administrator of the token. + */ + event Created(uint32 id, address creator, address admin); } diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index f5f61bf76..bb2309d8e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -1,6 +1,12 @@ +use alloc::string::String; + pub use erc20::{Erc20, IERC20}; +use frame_support::traits::fungibles::metadata::Inspect as _; use pallet_revive::precompiles::alloy::{ - primitives::{ruint::UintTryTo, Address}, + primitives::{ + ruint::{UintTryFrom, UintTryTo}, + Address, + }, sol_types::SolCall, }; use IFungibles::*; @@ -23,7 +29,7 @@ impl< I: 'static, > Precompile for Fungibles where - U256: UintTryTo<>::Balance>, + U256: UintTryFrom + UintTryTo<>::Balance>, { type Interface = IFungiblesCalls; type T = T; @@ -37,88 +43,155 @@ where input: &Self::Interface, env: &mut impl Ext, ) -> Result, Error> { - use IFungibles::IFungiblesCalls::*; match input { - create(createCall { admin, minBalance }) => { + IFungiblesCalls::transfer(transferCall { token, to, value }) => { // TODO: charge based on benchmarked weight - let creator = >::to_address(env.caller().account_id()?).0.into(); + let from = >::to_address(env.caller().account_id()?).0.into(); - let id = self::create::( + self::transfer::( to_runtime_origin(env.caller()), - env.to_account_id(&(*admin.0).into()), - minBalance.saturating_to(), - )? - .into(); + (*token).into(), + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; - deposit_event(env, address, Created { id, creator, admin: *admin }); - Ok(createCall::abi_encode_returns(&(id,))) + deposit_event( + env, + address, + Transfer { token: *token, from, to: *to, value: *value }, + ); + Ok(transferCall::abi_encode_returns(&())) }, - mint(mintCall { id, account, value }) => { + IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { // TODO: charge based on benchmarked weight - self::mint::( + transfer_from::( to_runtime_origin(env.caller()), - (*id).into(), - env.to_account_id(&(*account.0).into()), + (*token).into(), + env.to_account_id(&(*from.0).into()), + env.to_account_id(&(*to.0).into()), value.saturating_to(), )?; - let from = Address::default(); - let to = *account; - deposit_event(env, address, Transfer { id: *id, from, to, value: *value }); - Ok(mintCall::abi_encode_returns(&())) + let value = *value; + deposit_event( + env, + address, + Transfer { token: *token, from: *from, to: *to, value }, + ); + Ok(transferFromCall::abi_encode_returns(&())) }, - transfer(transferCall { id, to, value }) => { + IFungiblesCalls::approve(approveCall { token, spender, value }) => { // TODO: charge based on benchmarked weight - let from = >::to_address(env.caller().account_id()?).0.into(); + let owner = >::to_address(env.caller().account_id()?).0.into(); - self::transfer::( + self::approve::( to_runtime_origin(env.caller()), - (*id).into(), - env.to_account_id(&(*to.0).into()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), value.saturating_to(), - )?; + ) // TODO: adjust weight + .map_err(|e| e.error)?; - deposit_event(env, address, Transfer { id: *id, from, to: *to, value: *value }); - Ok(transferCall::abi_encode_returns(&())) + let spender = *spender; + deposit_event( + env, + address, + Approval { token: *token, owner, spender, value: *value }, + ); + Ok(approveCall::abi_encode_returns(&())) }, - approve(approveCall { id, spender, value }) => { + IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { // TODO: charge based on benchmarked weight let owner = >::to_address(env.caller().account_id()?).0.into(); - self::approve::( + let value = U256::saturating_from( + self::increase_allowance::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), + value.saturating_to(), + ) // TODO: adjust weight + .map_err(|e| e.error)?, + ); + + let spender = *spender; + deposit_event(env, address, Approval { token: *token, owner, spender, value }); + Ok(increaseAllowanceCall::abi_encode_returns(&(value,))) + }, + IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { + // TODO: charge based on benchmarked weight + let owner = >::to_address(env.caller().account_id()?).0.into(); + + let (value, weight) = self::decrease_allowance::( to_runtime_origin(env.caller()), - (*id).into(), + (*token).into(), env.to_account_id(&(*spender.0).into()), value.saturating_to(), ) // TODO: adjust weight .map_err(|e| e.error)?; + let value = U256::saturating_from(value); let spender = *spender; - deposit_event(env, address, Approval { id: *id, owner, spender, value: *value }); - Ok(approveCall::abi_encode_returns(&())) + deposit_event(env, address, Approval { token: *token, owner, spender, value }); + Ok(decreaseAllowanceCall::abi_encode_returns(&(value,))) }, - transferFrom(transferFromCall { id, from, to, value }) => { + IFungiblesCalls::create(createCall { admin, minBalance }) => { // TODO: charge based on benchmarked weight + let creator = >::to_address(env.caller().account_id()?).0.into(); - transfer_from::( + let id = self::create::( to_runtime_origin(env.caller()), - (*id).into(), - env.to_account_id(&(*from.0).into()), - env.to_account_id(&(*to.0).into()), + env.to_account_id(&(*admin.0).into()), + minBalance.saturating_to(), + )? + .into(); + + deposit_event(env, address, Created { id, creator, admin: *admin }); + Ok(createCall::abi_encode_returns(&(id,))) + }, + IFungiblesCalls::startDestroy(startDestroyCall { token }) => { + // TODO: charge based on benchmarked weight + start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; + Ok(startDestroyCall::abi_encode_returns(&())) + }, + IFungiblesCalls::setMetadata(setMetadataCall { token, name, symbol, decimals }) => { + // TODO: charge based on benchmarked weight + set_metadata::( + to_runtime_origin(env.caller()), + (*token).into(), + name.as_bytes().to_vec(), + symbol.as_bytes().to_vec(), + *decimals, + )?; + Ok(setMetadataCall::abi_encode_returns(&())) + }, + IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { + // TODO: charge based on benchmarked weight + clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; + Ok(clearMetadataCall::abi_encode_returns(&())) + }, + IFungiblesCalls::mint(mintCall { token, account, value }) => { + // TODO: charge based on benchmarked weight + + self::mint::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*account.0).into()), value.saturating_to(), )?; - let value = *value; - deposit_event(env, address, Transfer { id: *id, from: *from, to: *to, value }); - Ok(transferFromCall::abi_encode_returns(&())) + let from = Address::default(); + let to = *account; + deposit_event(env, address, Transfer { token: *token, from, to, value: *value }); + Ok(mintCall::abi_encode_returns(&())) }, - burn(burnCall { id, account, value }) => { + IFungiblesCalls::burn(burnCall { token, account, value }) => { // TODO: charge based on benchmarked weight self::burn::( to_runtime_origin(env.caller()), - (*id).into(), + (*token).into(), env.to_account_id(&(*account.0).into()), value.saturating_to(), ) // TODO: adjust weight @@ -126,33 +199,60 @@ where let from = account; let to = Address::default(); - deposit_event(env, address, Transfer { id: *id, from: *from, to, value: *value }); + deposit_event( + env, + address, + Transfer { token: *token, from: *from, to, value: *value }, + ); Ok(burnCall::abi_encode_returns(&())) }, - startDestroy(startDestroyCall { id }) => { + IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { // TODO: charge based on benchmarked weight - start_destroy::(to_runtime_origin(env.caller()), (*id).into())?; - Ok(startDestroyCall::abi_encode_returns(&())) + let total_supply = + U256::saturating_from(>::total_supply((*token).into())); + Ok(totalSupplyCall::abi_encode_returns(&(total_supply,))) }, - exists(existsCall { id }) => { - let result = self::exists::((*id).into()); - Ok(existsCall::abi_encode_returns(&(result,))) + IFungiblesCalls::balanceOf(balanceOfCall { token, owner }) => { + // TODO: charge based on benchmarked weight + let account = env.to_account_id(&(*owner.0).into()); + let balance = + U256::saturating_from(>::balance((*token).into(), account)); + Ok(balanceOfCall::abi_encode_returns(&(balance,))) }, - setMetadata(setMetadataCall { id, name, symbol, decimals }) => { + IFungiblesCalls::allowance(allowanceCall { token, owner, spender }) => { // TODO: charge based on benchmarked weight - set_metadata::( - to_runtime_origin(env.caller()), - (*id).into(), - name.as_bytes().to_vec(), - symbol.as_bytes().to_vec(), - *decimals, - )?; - Ok(setMetadataCall::abi_encode_returns(&())) + let owner = env.to_account_id(&(*owner.0).into()); + let spender = env.to_account_id(&(*spender.0).into()); + let remaining = U256::saturating_from(>::allowance( + (*token).into(), + &owner, + &spender, + )); + Ok(allowanceCall::abi_encode_returns(&(remaining,))) }, - clearMetadata(clearMetadataCall { id }) => { + IFungiblesCalls::name(nameCall { token }) => { // TODO: charge based on benchmarked weight - clear_metadata::(to_runtime_origin(env.caller()), (*id).into())?; - Ok(clearMetadataCall::abi_encode_returns(&())) + let result = >::name((*token).into()); + // TODO: improve + let result = String::from_utf8_lossy(result.as_slice()); + Ok(nameCall::abi_encode_returns(&(result,))) + }, + IFungiblesCalls::symbol(symbolCall { token }) => { + // TODO: charge based on benchmarked weight + let result = >::symbol((*token).into()); + // TODO: improve + let result = String::from_utf8_lossy(result.as_slice()); + Ok(nameCall::abi_encode_returns(&(result,))) + }, + IFungiblesCalls::decimals(decimalsCall { token }) => { + // TODO: charge based on benchmarked weight + let result = >::decimals((*token).into()); + Ok(decimalsCall::abi_encode_returns(&(result,))) + }, + IFungiblesCalls::exists(existsCall { token }) => { + // TODO: charge based on benchmarked weight + let result = self::exists::((*token).into()); + Ok(existsCall::abi_encode_returns(&(result,))) }, } } @@ -166,7 +266,10 @@ impl, I: 'static> Fungibles { #[cfg(test)] mod tests { - use frame_support::{assert_ok, traits::fungibles::Inspect, weights::Weight, BoundedVec}; + use frame_support::{ + assert_ok, sp_runtime::traits::AccountIdLookup, traits::fungibles::Inspect, + weights::Weight, BoundedVec, + }; use mock::{Assets, ExtBuilder, *}; use pallet_assets::{AssetDetails, AssetMetadata, AssetStatus, Instance1}; use pallet_revive::{ @@ -190,6 +293,179 @@ mod tests { type Fungibles = super::Fungibles; type Metadata = pallet_assets::Metadata; + #[test] + fn transfer_works() { + let token = 1; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, true, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::balance(token, ALICE), endowment); + assert_eq!(Assets::balance(token, BOB), 0); + + let value = endowment / 2; + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::transfer(transferCall { + token, + to: BOB_ADDR.0.into(), + value: U256::from(value) + }) + )); + + assert_eq!(Assets::balance(token, ALICE), endowment - value); + assert_eq!(Assets::balance(token, BOB), value); + + let from = ALICE_ADDR.0.into(); + let to = BOB_ADDR.0.into(); + let event = Transfer { token, from, to, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn transfer_from_works() { + let token = 1; + let endowment = 10_000_000; + let value = endowment / 2; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, true, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) + .build_with_env(|mut call_setup| { + assert_eq!(Assets::balance(token, ALICE), endowment); + assert_eq!(Assets::balance(token, BOB), 0); + assert_ok!(approve::( + RuntimeOrigin::signed(ALICE), + token, + BOB, + value + )); + call_setup.set_origin(Origin::Signed(BOB)); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::transferFrom(transferFromCall { + token, + from: ALICE_ADDR.0.into(), + to: BOB_ADDR.0.into(), + value: U256::from(value), + }) + )); + + assert_eq!(Assets::balance(token, ALICE), endowment - value); + assert_eq!(Assets::balance(token, BOB), value); + let from = ALICE_ADDR.0.into(); + let to = BOB_ADDR.0.into(); + let event = Transfer { token, from, to, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }); + } + + #[test] + fn approve_works() { + let token = 1; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::allowance(token, &ALICE, &BOB), 0); + + assert_ok!(call_precompile::<()>( + &mut call_setup.ext().0, + &IFungiblesCalls::approve(approveCall { + token, + spender: BOB_ADDR.0.into(), + value: U256::from(value), + }) + )); + + assert_eq!(Assets::allowance(token, &ALICE, &BOB), value); + let owner = ALICE_ADDR.0.into(); + let spender = BOB_ADDR.0.into(); + let event = Approval { token, owner, spender, value: U256::from(value) }; + assert_last_event(ADDRESS, event); + }, + ); + } + + #[test] + fn increase_allowance_works() { + let token = 1; + let origin = ALICE; + let spender = BOB; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(origin.clone())); + assert_ok!(Assets::approve_transfer( + RuntimeOrigin::signed(origin.clone()), + token.into(), + AccountIdLookup::unlookup(spender.clone()), + value, + )); + assert_eq!(Assets::allowance(token, &origin, &spender), value); + + // Double the allowance. + let allowance = call_precompile::( + &mut call_setup.ext().0, + &IFungiblesCalls::increaseAllowance(increaseAllowanceCall { + token, + spender: BOB_ADDR.0.into(), + value: U256::from(value), + }), + ) + .unwrap(); + + assert_eq!(allowance, U256::from(value * 2)); + assert_eq!(Assets::allowance(token, &origin, &spender), value * 2); + let owner = ALICE_ADDR.0.into(); + let spender = BOB_ADDR.0.into(); + let event = Approval { token, owner, spender, value: U256::from(allowance) }; + assert_last_event(ADDRESS, event); + }, + ); + } + + #[test] + fn decrease_allowance_works() { + let token = 1; + let origin = ALICE; + let spender = BOB; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(origin.clone())); + assert_ok!(Assets::approve_transfer( + RuntimeOrigin::signed(origin.clone()), + token.into(), + AccountIdLookup::unlookup(spender.clone()), + value, + )); + assert_eq!(Assets::allowance(token, &origin, &spender), value); + + // Halve the allowance. + let allowance = call_precompile::( + &mut call_setup.ext().0, + &IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { + token, + spender: BOB_ADDR.0.into(), + value: U256::from(value / 2), + }), + ) + .unwrap(); + + assert_eq!(allowance, U256::from(value / 2)); + assert_eq!(Assets::allowance(token, &origin, &spender), value / 2); + let owner = ALICE_ADDR.0.into(); + let spender = BOB_ADDR.0.into(); + let event = Approval { token, owner, spender, value: U256::from(allowance) }; + assert_last_event(ADDRESS, event); + }, + ); + } + #[test] fn create_works() { let id = 0u32; @@ -262,193 +538,296 @@ mod tests { } #[test] - fn mint_works() { - let id = 1; - let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + fn start_destroy_works() { + let token = 1; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(id, ALICE), 0); + assert_eq!(Asset::get(token).unwrap().status, AssetStatus::Live); + + let mut ext = call_setup.ext().0; + assert_ok!(call_precompile::<()>( + &mut ext, + &startDestroy(startDestroyCall { token }) + )); + + assert_eq!(Asset::get(token).unwrap().status, AssetStatus::Destroying); + }, + ); + } + + #[test] + fn set_metadata_works() { + let token = 1; + let name = "name".to_string(); + let symbol = "symbol".to_string(); + let decimals = u8::MAX; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( + |mut call_setup| { + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Metadata::get(token), AssetMetadata::default()); assert_ok!(call_precompile::<()>( &mut call_setup.ext().0, - &IFungiblesCalls::mint(mintCall { - id, - account: ALICE_ADDR.0.into(), - value: U256::from(value) + &setMetadata(setMetadataCall { + token, + name: name.clone(), + symbol: symbol.clone(), + decimals }) )); - assert_eq!(Assets::balance(id, ALICE), value); - let from = Address::default(); - let to = ALICE_ADDR.0.into(); - let event = Transfer { id, from, to, value: U256::from(value) }; - assert_last_event(ADDRESS, event); + assert_eq!( + Metadata::get(token), + AssetMetadata { + deposit: 11, + name: BoundedVec::truncate_from(name.into_bytes()), + symbol: BoundedVec::truncate_from(symbol.into_bytes()), + decimals, + is_frozen: false, + } + ); }, ); } #[test] - fn transfer_works() { - let id = 1; - let endowment = 10_000_000; + fn clear_metadata_works() { + let token = 1; + let name = b"name".to_vec(); + let symbol = b"symbol".to_vec(); + let decimals = u8::MAX; ExtBuilder::new() - .with_assets(vec![(id, ALICE, true, 1)]) - .with_asset_balances(vec![(id, ALICE, endowment)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, name.clone(), symbol.clone(), decimals)]) .build_with_env(|mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(id, ALICE), endowment); - assert_eq!(Assets::balance(id, BOB), 0); + assert_eq!( + Metadata::get(token), + AssetMetadata { + deposit: 0, + name: BoundedVec::truncate_from(name), + symbol: BoundedVec::truncate_from(symbol), + decimals, + is_frozen: false, + } + ); - let value = endowment / 2; assert_ok!(call_precompile::<()>( &mut call_setup.ext().0, - &IFungiblesCalls::transfer(transferCall { - id, - to: BOB_ADDR.0.into(), - value: U256::from(value) - }) + &clearMetadata(clearMetadataCall { token }) )); - assert_eq!(Assets::balance(id, ALICE), endowment - value); - assert_eq!(Assets::balance(id, BOB), value); - - let from = ALICE_ADDR.0.into(); - let to = BOB_ADDR.0.into(); - let event = Transfer { id, from, to, value: U256::from(value) }; - assert_last_event(ADDRESS, event); + assert_eq!(Metadata::get(token), AssetMetadata::default()); }); } #[test] - fn approve_works() { - let id = 1; + fn mint_works() { + let token = 1; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::allowance(id, &ALICE, &BOB), 0); + assert_eq!(Assets::balance(token, ALICE), 0); assert_ok!(call_precompile::<()>( &mut call_setup.ext().0, - &IFungiblesCalls::approve(approveCall { - id, - spender: BOB_ADDR.0.into(), - value: U256::from(value), + &IFungiblesCalls::mint(mintCall { + token, + account: ALICE_ADDR.0.into(), + value: U256::from(value) }) )); - assert_eq!(Assets::allowance(id, &ALICE, &BOB), value); - let owner = ALICE_ADDR.0.into(); - let spender = BOB_ADDR.0.into(); - let event = Approval { id, owner, spender, value: U256::from(value) }; + assert_eq!(Assets::balance(token, ALICE), value); + let from = Address::default(); + let to = ALICE_ADDR.0.into(); + let event = Transfer { token, from, to, value: U256::from(value) }; assert_last_event(ADDRESS, event); }, ); } #[test] - fn transfer_from_works() { - let id = 1; + fn burn_works() { + let token = 1; let endowment = 10_000_000; - let value = endowment / 2; ExtBuilder::new() - .with_assets(vec![(id, ALICE, true, 1)]) - .with_asset_balances(vec![(id, ALICE, endowment)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) .build_with_env(|mut call_setup| { - assert_eq!(Assets::balance(id, ALICE), endowment); - assert_eq!(Assets::balance(id, BOB), 0); - assert_ok!(approve::( - RuntimeOrigin::signed(ALICE), - id, - BOB, - value - )); - call_setup.set_origin(Origin::Signed(BOB)); + call_setup.set_origin(Origin::Signed(ALICE)); + assert_eq!(Assets::balance(token, ALICE), endowment); assert_ok!(call_precompile::<()>( &mut call_setup.ext().0, - &IFungiblesCalls::transferFrom(transferFromCall { - id, - from: ALICE_ADDR.0.into(), - to: BOB_ADDR.0.into(), - value: U256::from(value), - }) + &IFungiblesCalls::burn(burnCall { + token, + account: ALICE_ADDR.0.into(), + value: U256::from(endowment), + }), )); - assert_eq!(Assets::balance(id, ALICE), endowment - value); - assert_eq!(Assets::balance(id, BOB), value); + assert_eq!(Assets::balance(token, ALICE), 0); let from = ALICE_ADDR.0.into(); - let to = BOB_ADDR.0.into(); - let event = Transfer { id, from, to, value: U256::from(value) }; + let to = Address::default(); + let event = Transfer { token, from, to, value: U256::from(endowment) }; assert_last_event(ADDRESS, event); }); } #[test] - fn burn_works() { - let id = 1; + fn total_supply_works() { + let token = u32::MAX; + let total_supply = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, total_supply)]) + .build_with_env(|mut call_setup| { + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + &IFungiblesCalls::totalSupply(totalSupplyCall { token }) + ) + .unwrap(), + U256::from(total_supply) + ); + }); + } + + #[test] + fn balance_of_works() { + let token = u32::MAX; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_balances(vec![(id, ALICE, endowment)]) + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, endowment)]) .build_with_env(|mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(id, ALICE), endowment); - assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, - &IFungiblesCalls::burn(burnCall { - id, - account: ALICE_ADDR.0.into(), - value: U256::from(endowment), - }), - )); + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + &IFungiblesCalls::balanceOf(balanceOfCall { + token, + owner: ALICE_ADDR.0.into() + }) + ) + .unwrap(), + U256::from(endowment) + ); - assert_eq!(Assets::balance(id, ALICE), 0); - let from = ALICE_ADDR.0.into(); - let to = Address::default(); - let event = Transfer { id, from, to, value: U256::from(endowment) }; - assert_last_event(ADDRESS, event); + assert_eq!(Assets::balance(token, ALICE), endowment); }); } #[test] - fn start_destroy_works() { - let id = 1; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + fn allowance_works() { + let token = u32::MAX; + let value = 10_000_000; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Asset::get(id).unwrap().status, AssetStatus::Live); - - let mut ext = call_setup.ext().0; - assert_ok!(call_precompile::<()>(&mut ext, &startDestroy(startDestroyCall { id }))); + assert_ok!(approve::( + RuntimeOrigin::signed(ALICE), + token, + BOB, + value + )); - assert_eq!(Asset::get(id).unwrap().status, AssetStatus::Destroying); + assert_eq!( + call_precompile::( + &mut call_setup.ext().0, + &IFungiblesCalls::allowance(allowanceCall { + token, + owner: ALICE_ADDR.0.into(), + spender: BOB_ADDR.0.into(), + }) + ) + .unwrap(), + U256::from(value) + ); }, ); } + #[test] + fn name_works() { + let token = 1; + let name = "name".to_string(); + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, name.as_bytes().into(), b"symbol".to_vec(), u8::MAX)]) + .build_with_env(|mut call_setup| { + let mut ext = call_setup.ext().0; + assert_eq!( + call_precompile::(&mut ext, &IFungiblesCalls::name(nameCall { token })) + .unwrap(), + name + ); + }); + } + + #[test] + fn symbol_works() { + let token = 1; + let symbol = "symbol".to_string(); + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), symbol.as_bytes().into(), u8::MAX)]) + .build_with_env(|mut call_setup| { + let mut ext = call_setup.ext().0; + assert_eq!( + call_precompile::( + &mut ext, + &IFungiblesCalls::symbol(symbolCall { token }) + ) + .unwrap(), + symbol + ); + }); + } + + #[test] + fn decimals_works() { + let token = 1; + let decimals = u8::MAX; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), decimals)]) + .build_with_env(|mut call_setup| { + let mut ext = call_setup.ext().0; + assert_eq!( + call_precompile::( + &mut ext, + &IFungiblesCalls::decimals(decimalsCall { token }) + ) + .unwrap() as u8, + decimals + ); + }); + } + #[test] fn exists_works() { - let id = 1; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( + let token = 1; + ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( |mut call_setup| { call_setup.set_origin(Origin::Signed(ALICE)); - assert!(Assets::asset_exists(id)); + assert!(Assets::asset_exists(token)); let mut ext = call_setup.ext().0; assert!(call_precompile::( &mut ext, - &IFungiblesCalls::exists(existsCall { id }) + &IFungiblesCalls::exists(existsCall { token }) ) .unwrap()); - let id = id + 1; - assert!(!Assets::asset_exists(id)); + let token = token + 1; + assert!(!Assets::asset_exists(token)); assert!(!call_precompile::( &mut ext, - &IFungiblesCalls::exists(existsCall { id }) + &IFungiblesCalls::exists(existsCall { token }) ) .unwrap()); }, @@ -457,13 +836,13 @@ mod tests { #[test] fn exists_via_bare_call_works() { - let id = 1; + let token = 1; let origin = RuntimeOrigin::signed(ALICE); ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) + .with_assets(vec![(token, ALICE, false, 1)]) .build() .execute_with(|| { - assert!(Assets::asset_exists(id)); + assert!(Assets::asset_exists(token)); let asset_exists = bare_call::( origin.clone(), @@ -471,92 +850,26 @@ mod tests { 0, Weight::MAX, Unchecked, - IFungiblesCalls::exists(existsCall { id }).abi_encode(), + IFungiblesCalls::exists(existsCall { token }).abi_encode(), ) .unwrap(); assert!(asset_exists); - let id = id + 1; - assert!(!Assets::asset_exists(id)); + let token = token + 1; + assert!(!Assets::asset_exists(token)); let exists = bare_call::( origin, ADDRESS.into(), 0, Weight::MAX, Unchecked, - IFungiblesCalls::exists(existsCall { id }).abi_encode(), + IFungiblesCalls::exists(existsCall { token }).abi_encode(), ) .unwrap(); assert!(!exists); }); } - #[test] - fn set_metadata_works() { - let id = 1; - let name = "name".to_string(); - let symbol = "symbol".to_string(); - let decimals = u8::MAX; - ExtBuilder::new().with_assets(vec![(id, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Metadata::get(id), AssetMetadata::default()); - - assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, - &setMetadata(setMetadataCall { - id, - name: name.clone(), - symbol: symbol.clone(), - decimals - }) - )); - - assert_eq!( - Metadata::get(id), - AssetMetadata { - deposit: 11, - name: BoundedVec::truncate_from(name.into_bytes()), - symbol: BoundedVec::truncate_from(symbol.into_bytes()), - decimals, - is_frozen: false, - } - ); - }, - ); - } - - #[test] - fn clear_metadata_works() { - let id = 1; - let name = b"name".to_vec(); - let symbol = b"symbol".to_vec(); - let decimals = u8::MAX; - ExtBuilder::new() - .with_assets(vec![(id, ALICE, false, 1)]) - .with_asset_metadata(vec![(id, name.clone(), symbol.clone(), decimals)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!( - Metadata::get(id), - AssetMetadata { - deposit: 0, - name: BoundedVec::truncate_from(name), - symbol: BoundedVec::truncate_from(symbol), - decimals, - is_frozen: false, - } - ); - - assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, - &clearMetadata(clearMetadataCall { id }) - )); - - assert_eq!(Metadata::get(id), AssetMetadata::default()); - }); - } - fn call_precompile::RustType>>( ext: &mut impl ExtWithInfo, input: &IFungiblesCalls, diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index fecdc96c1..25cb83d88 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -1,18 +1,20 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] +use ink::{prelude::string::String, U256}; +use pop_api::{ + fungibles::{ + self as api, + erc20::{extensions::Erc20Metadata, Erc20}, + Approval, InvalidRecipient, NoPermission, TokenId, Transfer, + }, + revert, +}; + // NOTE: requires `cargo-contract` built from `master` #[ink::contract] pub mod fungibles { - use ink::{prelude::string::String, U256}; - use pop_api::{ - fungibles::{ - self as api, - erc20::{extensions::Erc20Metadata, Erc20}, - Approval, InvalidRecipient, NoPermission, TokenId, Transfer, - }, - revert, - }; + use super::*; #[ink(storage)] pub struct Fungible { @@ -64,6 +66,52 @@ pub mod fungibles { self.env().emit_event(Transfer { from: Address::zero(), to: account, value }); } + /// Increases the allowance of `spender` by `value` amount of tokens. + /// + /// # Parameters + /// - `spender` - The account that is allowed to spend the tokens. + /// - `value` - The number of tokens to increase the allowance by. + #[ink(message)] + pub fn increase_allowance(&mut self, spender: Address, value: U256) { + if let Err(e) = self.ensure_owner() { + revert(&e) + } + let contract = self.env().address(); + + // Validate recipient. + if spender == contract { + revert(&InvalidRecipient(spender)) + } + if let Err(error) = api::increase_allowance(self.id, spender, value) { + revert(&error) + } + let allowance = self.allowance(contract, spender); + self.env().emit_event(Approval { owner: contract, spender, value: allowance }); + } + + /// Decreases the allowance of `spender` by `value` amount of tokens. + /// + /// # Parameters + /// - `spender` - The account that is allowed to spend the tokens. + /// - `value` - The number of tokens to decrease the allowance by. + #[ink(message)] + pub fn decrease_allowance(&mut self, spender: Address, value: U256) { + if let Err(e) = self.ensure_owner() { + revert(&e) + } + let contract = self.env().address(); + + // Validate recipient. + if spender == contract { + revert(&InvalidRecipient(spender)) + } + if let Err(error) = api::decrease_allowance(self.id, spender, value) { + revert(&error) + } + let value = self.allowance(contract, spender); + self.env().emit_event(Approval { owner: contract, spender, value }); + } + /// Destroys `value` amount of tokens from `account`, reducing the total supply. /// /// # Parameters diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index 211982f15..bde784533 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -13,7 +13,7 @@ const PRECOMPILE: u16 = 101; pub trait Erc20 { /// Returns the value of tokens in existence. #[ink(message)] - #[allow(non_snake_case)] // Required to ensure message name results in correct sol selector + #[allow(non_snake_case)] fn totalSupply(&self) -> U256; /// Returns the value of tokens owned by `account`. @@ -89,27 +89,27 @@ pub struct Transfer { /// Returns the value of tokens in existence. #[inline] -pub fn total_supply(id: TokenId) -> U256 { - let address = prefixed_address(PRECOMPILE, id); +pub fn total_supply(token: TokenId) -> U256 { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.totalSupply() } /// Returns the value of tokens owned by `account`. #[inline] -pub fn balance_of(id: TokenId, account: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, id); +pub fn balance_of(token: TokenId, account: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.balanceOf(account) } /// Returns the value of tokens owned by `account`. #[inline] -pub fn transfer(id: TokenId, to: Address, value: U256) -> Result { +pub fn transfer(token: TokenId, to: Address, value: U256) -> Result { ensure!(to != Address::zero(), ERC20InvalidSender(to)); ensure!(value != U256::zero(), ERC20InsufficientValue); - let address = prefixed_address(PRECOMPILE, id); + let address = prefixed_address(PRECOMPILE, token); let mut precompile: contract_ref!(Erc20, Pop) = address.into(); Ok(precompile.transfer(to, value)) } @@ -119,8 +119,8 @@ pub fn transfer(id: TokenId, to: Address, value: U256) -> Result { /// /// This value changes when `approve` or [`transfer_from`] are called. #[inline] -pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, id); +pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20, Pop) = address.into(); precompile.allowance(owner, spender) } @@ -132,11 +132,11 @@ pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { /// /// Emits an [`Approval`] event. #[inline] -pub fn approve(id: TokenId, spender: Address, value: U256) -> Result { +pub fn approve(token: TokenId, spender: Address, value: U256) -> Result { ensure!(spender != Address::zero(), ERC20InvalidApprover(spender)); ensure!(value != U256::zero(), ERC20InsufficientValue); - let address = prefixed_address(PRECOMPILE, id); + let address = prefixed_address(PRECOMPILE, token); let mut precompile: contract_ref!(Erc20, Pop) = address.into(); Ok(precompile.approve(spender, value)) } @@ -148,12 +148,17 @@ pub fn approve(id: TokenId, spender: Address, value: U256) -> Result Result { +pub fn transfer_from( + token: TokenId, + from: Address, + to: Address, + value: U256, +) -> Result { ensure!(from != Address::zero(), ERC20InvalidSender(from)); ensure!(to != Address::zero() && to != from, ERC20InvalidReceiver(to)); ensure!(value != U256::zero(), ERC20InsufficientValue); - let address = prefixed_address(PRECOMPILE, id); + let address = prefixed_address(PRECOMPILE, token); let mut precompile: contract_ref!(Erc20, Pop) = address.into(); Ok(precompile.transferFrom(from, to, value)) } @@ -180,24 +185,24 @@ pub mod extensions { /// Returns the name of the token. #[inline] - pub fn name(id: TokenId) -> String { - let address = prefixed_address(PRECOMPILE, id); + pub fn name(token: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.name() } /// Returns the symbol of the token. #[inline] - pub fn symbol(id: TokenId) -> String { - let address = prefixed_address(PRECOMPILE, id); + pub fn symbol(token: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.symbol() } /// Returns the decimals places of the token. #[inline] - pub fn decimals(id: TokenId) -> u8 { - let address = prefixed_address(PRECOMPILE, id); + pub fn decimals(token: TokenId) -> u8 { + let address = prefixed_address(PRECOMPILE, token); let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); precompile.decimals() } diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index cd286bbea..1ec13e22b 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -26,196 +26,411 @@ pub type TokenId = u32; /// the smart contract space. #[ink::trait_definition] pub trait Fungibles { + /// Transfers `value` amount of tokens from the caller's account to account `to`. + /// + /// # Parameters + /// - `token` - The token to transfer. + /// - `to` - The recipient account. + /// - `value` - The number of tokens to transfer. + #[ink(message)] + fn transfer(&self, token: TokenId, to: Address, value: U256); + + /// Transfers `value` amount tokens on behalf of `from` to account `to`. + /// + /// # Parameters + /// - `token` - The token to transfer. + /// - `from` - The account from which the token balance will be withdrawn. + /// - `to` - The recipient account. + /// - `value` - The number of tokens to transfer. + #[ink(message)] + #[allow(non_snake_case)] + fn transferFrom(&self, token: TokenId, from: Address, to: Address, value: U256); + + /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. + /// + /// # Parameters + /// - `token` - The token to approve. + /// - `spender` - The account that is allowed to spend the tokens. + /// - `value` - The number of tokens to approve. + #[ink(message)] + fn approve(&self, token: TokenId, spender: Address, value: U256); + + /// Increases the allowance of `spender` by `value` amount of tokens. + /// + /// # Parameters + /// - `token` - The token to have an allowance increased. + /// - `spender` - The account that is allowed to spend the tokens. + /// - `value` - The number of tokens to increase the allowance by. + #[ink(message)] + #[allow(non_snake_case)] + fn increaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256; + + /// Decreases the allowance of `spender` by `value` amount of tokens. + /// + /// # Parameters + /// - `token` - The token to have an allowance decreased. + /// - `spender` - The account that is allowed to spend the tokens. + /// - `value` - The number of tokens to decrease the allowance by. + #[ink(message)] + #[allow(non_snake_case)] + fn decreaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256; + /// Create a new token with an automatically generated identifier. + /// + /// # Parameters + /// - `admin` - The account that will administer the token. + /// - `min_balance` - The minimum balance required for accounts holding this token. + /// + /// NOTE: The minimum balance must be non-zero. #[ink(message)] fn create(&self, admin: Address, min_balance: U256) -> TokenId; + /// Start the process of destroying a token. + /// + /// # Parameters + /// - `token` - The token to be destroyed. + #[ink(message)] + #[allow(non_snake_case)] + fn startDestroy(&self, token: TokenId); + /// Set the metadata for a token. + /// + /// # Parameters + /// - `token`: The token to update. + /// - `name`: The user friendly name of this token. + /// - `symbol`: The exchange symbol for this token. + /// - `decimals`: The number of decimals this token uses to represent one unit. #[ink(message)] #[allow(non_snake_case)] - fn setMetadata(&self, id: TokenId, name: String, symbol: String, decimals: u8); + fn setMetadata(&self, token: TokenId, name: String, symbol: String, decimals: u8); /// Clear the metadata for a token. + /// + /// # Parameters + /// - `token` - The token to update. #[ink(message)] #[allow(non_snake_case)] - fn clearMetadata(&self, id: TokenId); + fn clearMetadata(&self, token: TokenId); /// Creates `value` amount of tokens and assigns them to `account`, increasing the total /// supply. + /// + /// # Parameters + /// - `token` - The token to mint. + /// - `account` - The account to be credited with the created tokens. + /// - `value` - The number of tokens to mint. #[ink(message)] - fn mint(&self, id: TokenId, account: Address, value: U256); + fn mint(&self, token: TokenId, account: Address, value: U256); - /// Transfers `value` amount of tokens from the caller's account to account `to`. + /// Destroys `value` amount of tokens from `account`, reducing the total supply. + /// + /// # Parameters + /// - `token` - The token to burn. + /// - `account` - The account from which the tokens will be destroyed. + /// - `value` - The number of tokens to destroy. #[ink(message)] - fn transfer(&self, id: TokenId, to: Address, value: U256); + fn burn(&self, token: TokenId, address: Address, value: U256); - /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. + /// Total token supply for a specified token. + /// + /// # Parameters + /// - `token` - The token. #[ink(message)] - fn approve(&self, id: TokenId, spender: Address, value: U256); + #[allow(non_snake_case)] + fn totalSupply(&self, token: TokenId) -> U256; - /// Transfers `value` amount tokens on behalf of `from` to account `to`. + /// Account balance for a specified `token` and `owner`. + /// + /// # Parameters + /// - `token` - The token. + /// - `owner` - The owner of the token. #[ink(message)] #[allow(non_snake_case)] - fn transferFrom(&self, id: TokenId, from: Address, to: Address, value: U256); + fn balanceOf(&self, token: TokenId, owner: Address) -> U256; + + /// Allowance for a `spender` approved by an `owner`, for a specified `token`. + /// + /// # Parameters + /// - `token` - The token. + /// - `owner` - The owner of the token. + /// - `spender` - The spender with an allowance. + #[ink(message)] + fn allowance(&self, token: TokenId, owner: Address, spender: Address) -> U256; - /// Destroys `value` amount of tokens from `account`, reducing the total supply. + /// Name of the specified token. + /// + /// # Parameters + /// - `token` - The token. #[ink(message)] - fn burn(&self, id: TokenId, address: Address, value: U256); + fn name(&self, token: TokenId) -> String; - /// Start the process of destroying a token. + /// Symbol for the specified token. + /// + /// # Parameters + /// - `token` - The token. #[ink(message)] - #[allow(non_snake_case)] - fn startDestroy(&self, id: TokenId); + fn symbol(&self, token: TokenId) -> String; - /// Whether a specified token exists. + /// Decimals for the specified token. + /// + /// # Parameters + /// - `token` - The token. #[ink(message)] - fn exists(&self, id: TokenId) -> bool; + fn decimals(&self, token: TokenId) -> u8; + + /// Whether the specified token exists. + /// + /// # Parameters + /// - `token` - The token. + #[ink(message)] + fn exists(&self, token: TokenId) -> bool; } -/// Create a new token with an automatically generated identifier. +/// Allowance for a `spender` approved by an `owner`, for a specified `token`. /// /// # Parameters -/// - `admin` - The account that will administer the token. -/// - `min_balance` - The minimum balance required for accounts holding this token. -/// -/// NOTE: The minimum balance must be non-zero. +/// - `token` - The token. +/// - `owner` - The owner of the token. +/// - `spender` - The spender with an allowance. #[inline] -pub fn create(admin: Address, min_balance: U256) -> Result { - ensure!(admin != Address::zero(), ZeroAdminAddress); - ensure!(min_balance != U256::zero(), MinBalanceZero); - +pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.create(admin, min_balance)) + precompile.allowance(token, owner, spender) } -/// Set the metadata for a token. +/// Approves `spender` to spend `value` amount of tokens on behalf of the caller. +/// +/// # Parameters +/// - `token` - The token to approve. +/// - `spender` - The account that is allowed to spend the tokens. +/// - `value` - The number of tokens to approve. #[inline] -pub fn set_metadata(id: TokenId, name: String, symbol: String, decimals: u8) { +pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Error> { + ensure!(spender != Address::zero(), ZeroRecipientAddress); + ensure!(value != U256::zero(), ZeroValue); + let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - precompile.setMetadata(id, name, symbol, decimals) + Ok(precompile.approve(token, spender, value)) } -/// Clear the metadata for a token. +/// Account balance for a specified `token` and `owner`. +/// +/// # Parameters +/// - `token` - The token. +/// - `owner` - The owner of the token. #[inline] -pub fn clear_metadata(id: TokenId) { +pub fn balance_of(token: TokenId, account: Address) -> U256 { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - precompile.clearMetadata(id) + precompile.balanceOf(token, account) } -/// Creates `value` amount of tokens and assigns them to `account`, increasing the total -/// supply. +/// Destroys `value` amount of tokens from `account`, reducing the total supply. +/// +/// # Parameters +/// - `token` - The token to burn. +/// - `account` - The account from which the tokens will be destroyed. +/// - `value` - The number of tokens to destroy. #[inline] -pub fn mint(id: TokenId, account: Address, value: U256) -> Result<(), Error> { - ensure!(account != Address::zero(), ZeroRecipientAddress); +pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> { + ensure!(account != Address::zero(), ZeroSenderAddress); ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.mint(id, account, value)) + Ok(precompile.burn(token, account, value)) } -/// Transfers `value` amount of tokens from the caller's account to account `to`. +/// Clear the metadata for a token. +/// +/// # Parameters +/// - `token` - The token to update. #[inline] -pub fn transfer(id: TokenId, to: Address, value: U256) -> Result<(), Error> { - ensure!(to != Address::zero(), ZeroRecipientAddress); - ensure!(value != U256::zero(), ZeroValue); +pub fn clear_metadata(token: TokenId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.clearMetadata(token) +} + +/// Create a new token with an automatically generated identifier. +/// +/// # Parameters +/// - `admin` - The account that will administer the token. +/// - `min_balance` - The minimum balance required for accounts holding this token. +/// +/// NOTE: The minimum balance must be non-zero. +#[inline] +pub fn create(admin: Address, min_balance: U256) -> Result { + ensure!(admin != Address::zero(), ZeroAdminAddress); + ensure!(min_balance != U256::zero(), MinBalanceZero); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.transfer(id, to, value)) + Ok(precompile.create(admin, min_balance)) } -/// Approves `spender` to spend `value` amount of tokens on behalf of the caller. +/// Decimals for the specified token. +/// +/// # Parameters +/// - `token` - The token. #[inline] -pub fn approve(id: TokenId, spender: Address, value: U256) -> Result<(), Error> { +pub fn decimals(token: TokenId) -> u8 { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.decimals(token) +} + +/// Decreases the allowance of `spender` by `value` amount of tokens. +/// +/// # Parameters +/// - `token` - The token to have an allowance decreased. +/// - `spender` - The account that is allowed to spend the tokens. +/// - `value` - The number of tokens to decrease the allowance by. +pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Result { ensure!(spender != Address::zero(), ZeroRecipientAddress); ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.approve(id, spender, value)) + Ok(precompile.increaseAllowance(token, spender, value)) } -/// Transfers `value` amount tokens on behalf of `from` to account `to`. +/// Whether the specified token exists. +/// +/// # Parameters +/// - `token` - The token. #[inline] -pub fn transfer_from(id: TokenId, from: Address, to: Address, value: U256) -> Result<(), Error> { - ensure!(from != Address::zero(), ZeroSenderAddress); - ensure!(to != Address::zero(), ZeroRecipientAddress); - ensure!(to != from, InvalidRecipient(to)); +pub fn exists(token: TokenId) -> bool { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.exists(token) +} + +/// Increases the allowance of `spender` by `value` amount of tokens. +/// +/// # Parameters +/// - `token` - The token to have an allowance increased. +/// - `spender` - The account that is allowed to spend the tokens. +/// - `value` - The number of tokens to increase the allowance by. +pub fn increase_allowance(token: TokenId, spender: Address, value: U256) -> Result { + ensure!(spender != Address::zero(), ZeroRecipientAddress); ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.transferFrom(id, from, to, value)) + Ok(precompile.increaseAllowance(token, spender, value)) } -/// Destroys `value` amount of tokens from `account`, reducing the total supply. +/// Creates `value` amount of tokens and assigns them to `account`, increasing the total +/// supply. +/// +/// # Parameters +/// - `token` - The token to mint. +/// - `account` - The account to be credited with the created tokens. +/// - `value` - The number of tokens to mint. #[inline] -pub fn burn(id: TokenId, account: Address, value: U256) -> Result<(), Error> { - ensure!(account != Address::zero(), ZeroSenderAddress); +pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> { + ensure!(account != Address::zero(), ZeroRecipientAddress); ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - Ok(precompile.burn(id, account, value)) + Ok(precompile.mint(token, account, value)) } -/// Start the process of destroying a token. +/// Name of the specified token. +/// +/// # Parameters +/// - `token` - The token. #[inline] -pub fn start_destroy(id: TokenId) { +pub fn name(token: TokenId) -> String { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - precompile.startDestroy(id) + precompile.name(token) } -/// Whether a specified token exists. +/// Set the metadata for a token. +/// +/// # Parameters +/// - `token`: The token to update. +/// - `name`: The user friendly name of this token. +/// - `symbol`: The exchange symbol for this token. +/// - `decimals`: The number of decimals this token uses to represent one unit. #[inline] -pub fn exists(id: TokenId) -> bool { +pub fn set_metadata(token: TokenId, name: String, symbol: String, decimals: u8) { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop) = address.into(); - precompile.exists(id) + precompile.setMetadata(token, name, symbol, decimals) } -/// Returns the total token supply. +/// Start the process of destroying a token. +/// +/// # Parameters +/// - `token` - The token to be destroyed. #[inline] -pub fn total_supply(id: TokenId) -> U256 { - erc20::total_supply(id) +pub fn start_destroy(token: TokenId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.startDestroy(token) } -/// Returns the value of tokens owned by `account`. +/// Symbol for the specified token. +/// +/// # Parameters +/// - `token` - The token. #[inline] -pub fn balance_of(id: TokenId, account: Address) -> U256 { - erc20::balance_of(id, account) +pub fn symbol(token: TokenId) -> String { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.symbol(token) } -/// Returns the remaining number of tokens that `spender` will be allowed to spend -/// on behalf of `owner` through [`transfer_from`]. This is zero by default. +/// Total token supply for a specified token. /// -/// This value changes when `approve` or [`transfer_from`] are called. +/// # Parameters +/// - `token` - The token. #[inline] -pub fn allowance(id: TokenId, owner: Address, spender: Address) -> U256 { - erc20::allowance(id, owner, spender) +pub fn total_supply(token: TokenId) -> U256 { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + precompile.totalSupply(token) } -/// Returns the name of the token. +/// Transfers `value` amount of tokens from the caller's account to account `to`. +/// +/// # Parameters +/// - `token` - The token to transfer. +/// - `to` - The recipient account. +/// - `value` - The number of tokens to transfer. #[inline] -pub fn name(id: TokenId) -> String { - erc20::extensions::name(id) -} +pub fn transfer(token: TokenId, to: Address, value: U256) -> Result<(), Error> { + ensure!(to != Address::zero(), ZeroRecipientAddress); + ensure!(value != U256::zero(), ZeroValue); -/// Returns the symbol of the token. -#[inline] -pub fn symbol(id: TokenId) -> String { - erc20::extensions::symbol(id) + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.transfer(token, to, value)) } -/// Returns the decimals places of the token. +/// Transfers `value` amount tokens on behalf of `from` to account `to`. +/// +/// # Parameters +/// - `token` - The token to transfer. +/// - `from` - The account from which the token balance will be withdrawn. +/// - `to` - The recipient account. +/// - `value` - The number of tokens to transfer. #[inline] -pub fn decimals(id: TokenId) -> u8 { - erc20::extensions::decimals(id) +pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> Result<(), Error> { + ensure!(from != Address::zero(), ZeroSenderAddress); + ensure!(to != Address::zero(), ZeroRecipientAddress); + ensure!(to != from, InvalidRecipient(to)); + ensure!(value != U256::zero(), ZeroValue); + + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Fungibles, Pop) = address.into(); + Ok(precompile.transferFrom(token, from, to, value)) } // NOTE: subject to change based on ink!'s support for solidity custom errors. diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index d7d33df23..686c3e32c 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -181,9 +181,9 @@ mod tests { let caller = Alice.to_account_id(); let origin = RuntimeOrigin::signed(caller.clone()); let origin_addr = AccountId32Mapper::to_address(&caller); - let id = 1; + let token = 1; let fungibles_addr: H160 = Fungibles::<100, TrustBackedAssetsInstance>::address().into(); - let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(id).into(); + let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(token).into(); let total_supply: Balance = 10_000; new_test_ext().execute_with(|| { assert_ok!(Revive::map_account(origin.clone())); @@ -196,13 +196,13 @@ mod tests { .abi_encode(); println!("IFungibles.create: {}", to_hex(&call, false)); assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); - let asset_details = Asset::get(id).unwrap(); + let asset_details = Asset::get(token).unwrap(); assert_eq!(asset_details.owner, caller); assert_eq!(asset_details.admin, caller); // Mint via fungibles precompile let call = mintCall { - id, + token, account: origin_addr.0.into(), value: primitives::U256::from(total_supply), } @@ -219,7 +219,7 @@ mod tests { .abi_encode(); println!("IERC20.transfer: {}", to_hex(&call, false)); assert_ok!(Revive::call(origin.clone(), erc20_addr, 0, Weight::zero(), 0, call)); - assert_eq!(Assets::balance(id, &Bob.to_account_id()), total_supply / 2); + assert_eq!(Assets::balance(token, &Bob.to_account_id()), total_supply / 2); }) } From b9996d183165f331ea2a5e7cab51fbc9a258c14c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:17:26 +0100 Subject: [PATCH 064/284] refactor(pop-api): use explicit sol encoding for precompile contract refs --- pop-api-vnext/Cargo.toml | 3 --- pop-api-vnext/src/fungibles/erc20.rs | 20 +++++++-------- pop-api-vnext/src/fungibles/mod.rs | 37 ++++++++++++++-------------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 89ec14f51..50c407f31 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -5,9 +5,6 @@ license = "GPL-3.0-only" name = "pop-api" version = "0.1.0" -[package.metadata.ink-lang] -abi = "sol" - [dependencies] alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index bde784533..909b2838c 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -1,7 +1,7 @@ pub use errors::*; use super::{ - contract_ref, prefixed_address, Address, Pop, SolAddress, SolEncode, SolError, SolType, + contract_ref, prefixed_address, Address, Pop, Sol, SolAddress, SolEncode, SolError, SolType, SolTypeEncode, String, TokenId, Uint, Vec, U256, }; use crate::ensure; @@ -91,7 +91,7 @@ pub struct Transfer { #[inline] pub fn total_supply(token: TokenId) -> U256 { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop) = address.into(); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); precompile.totalSupply() } @@ -99,7 +99,7 @@ pub fn total_supply(token: TokenId) -> U256 { #[inline] pub fn balance_of(token: TokenId, account: Address) -> U256 { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop) = address.into(); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); precompile.balanceOf(account) } @@ -110,7 +110,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); - let mut precompile: contract_ref!(Erc20, Pop) = address.into(); + let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); Ok(precompile.transfer(to, value)) } @@ -121,7 +121,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result #[inline] pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop) = address.into(); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); precompile.allowance(owner, spender) } @@ -137,7 +137,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result String { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); precompile.name() } @@ -195,7 +195,7 @@ pub mod extensions { #[inline] pub fn symbol(token: TokenId) -> String { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); precompile.symbol() } @@ -203,7 +203,7 @@ pub mod extensions { #[inline] pub fn decimals(token: TokenId) -> u8 { let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop) = address.into(); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); precompile.decimals() } } diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index 1ec13e22b..0bea36445 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -5,6 +5,7 @@ use alloy_sol_types::{ pub use erc20::{Approval, Transfer}; pub use errors::*; use ink::{ + abi::Sol, contract_ref, prelude::{string::String, vec::Vec}, primitives::sol::SolTypeEncode, @@ -195,7 +196,7 @@ pub trait Fungibles { #[inline] pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.allowance(token, owner, spender) } @@ -211,7 +212,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.approve(token, spender, value)) } @@ -223,7 +224,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro #[inline] pub fn balance_of(token: TokenId, account: Address) -> U256 { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.balanceOf(token, account) } @@ -239,7 +240,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.burn(token, account, value)) } @@ -250,7 +251,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> #[inline] pub fn clear_metadata(token: TokenId) { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.clearMetadata(token) } @@ -267,7 +268,7 @@ pub fn create(admin: Address, min_balance: U256) -> Result { ensure!(min_balance != U256::zero(), MinBalanceZero); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.create(admin, min_balance)) } @@ -278,7 +279,7 @@ pub fn create(admin: Address, min_balance: U256) -> Result { #[inline] pub fn decimals(token: TokenId) -> u8 { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.decimals(token) } @@ -293,7 +294,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.increaseAllowance(token, spender, value)) } @@ -304,7 +305,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu #[inline] pub fn exists(token: TokenId) -> bool { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.exists(token) } @@ -319,7 +320,7 @@ pub fn increase_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.increaseAllowance(token, spender, value)) } @@ -336,7 +337,7 @@ pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.mint(token, account, value)) } @@ -347,7 +348,7 @@ pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> #[inline] pub fn name(token: TokenId) -> String { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.name(token) } @@ -361,7 +362,7 @@ pub fn name(token: TokenId) -> String { #[inline] pub fn set_metadata(token: TokenId, name: String, symbol: String, decimals: u8) { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.setMetadata(token, name, symbol, decimals) } @@ -372,7 +373,7 @@ pub fn set_metadata(token: TokenId, name: String, symbol: String, decimals: u8) #[inline] pub fn start_destroy(token: TokenId) { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.startDestroy(token) } @@ -383,7 +384,7 @@ pub fn start_destroy(token: TokenId) { #[inline] pub fn symbol(token: TokenId) -> String { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.symbol(token) } @@ -394,7 +395,7 @@ pub fn symbol(token: TokenId) -> String { #[inline] pub fn total_supply(token: TokenId) -> U256 { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.totalSupply(token) } @@ -410,7 +411,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result<(), Error> { ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.transfer(token, to, value)) } @@ -429,7 +430,7 @@ pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.transferFrom(token, from, to, value)) } From 19504bda2860dd748ac59947a869a9e47bb03f8b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:29:20 +0100 Subject: [PATCH 065/284] docs(examples): update parameter description based on review comment --- pop-api-vnext/examples/fungibles/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 25cb83d88..226eba684 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -163,7 +163,7 @@ pub mod fungibles { /// Returns the account balance for the specified `owner`. /// /// # Parameters - /// - `owner` - The address whose balance is being queried. + /// - `owner` - The account whose balance is being queried. #[ink(message)] fn balanceOf(&self, owner: Address) -> U256 { api::balance_of(self.id, owner) From f941588dfb241a3a16c76d68ad3b85b2067a0dc3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:38:37 +0100 Subject: [PATCH 066/284] docs(api): add public function doc --- pallets/api-vnext/src/fungibles/precompiles/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index bb2309d8e..cf6f55284 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -259,6 +259,7 @@ where } impl, I: 'static> Fungibles { + /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) } From f94211e181760027d5eaf9b6d16064eeed62ceb9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:41:50 +0100 Subject: [PATCH 067/284] docs(example): update constructor parameter doc style to match messages --- pop-api-vnext/examples/fungibles/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 226eba684..3ba492286 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -27,10 +27,10 @@ pub mod fungibles { /// in contract's storage. /// /// # Parameters - /// * - `name` - The name of the token. - /// * - `symbol` - The symbol of the token. - /// * - `min_balance` - The minimum balance required for accounts holding this token. - /// * - `decimals` - The number of decimals. + /// - `name` - The name of the token. + /// - `symbol` - The symbol of the token. + /// - `min_balance` - The minimum balance required for accounts holding this token. + /// - `decimals` - The number of decimals. /// /// NOTE: The minimum balance must be non-zero. // The `min_balance` ensures accounts hold a minimum amount of tokens, preventing tiny, From 9d772e2a1ae64cf0c791533cc4608a110e961493 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:45:50 +0100 Subject: [PATCH 068/284] docs(example): use account instead of address in doc comments --- pop-api-vnext/examples/fungibles/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 3ba492286..557a3be96 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -51,7 +51,7 @@ pub mod fungibles { /// supply. /// /// # Parameters - /// - `account` - The address to be credited with the created tokens. + /// - `account` - The account to be credited with the created tokens. /// - `value` - The number of tokens to mint. #[ink(message)] pub fn mint(&mut self, account: Address, value: U256) { @@ -115,7 +115,7 @@ pub mod fungibles { /// Destroys `value` amount of tokens from `account`, reducing the total supply. /// /// # Parameters - /// - `account` - The address from which the tokens will be destroyed. + /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] pub fn burn(&mut self, account: Address, value: U256) { @@ -172,18 +172,18 @@ pub mod fungibles { /// Returns the allowance for a `spender` approved by an `owner`. /// /// # Parameters - /// - `owner` - The address that owns the tokens. - /// - `spender` - The address that is allowed to spend the tokens. + /// - `owner` - The account that owns the tokens. + /// - `spender` - The account that is allowed to spend the tokens. #[ink(message)] fn allowance(&self, owner: Address, spender: Address) -> U256 { api::allowance(self.id, owner, spender) } - /// Transfers `value` amount of tokens from the contract to address `to` with + /// Transfers `value` amount of tokens from the contract to account `to` with /// additional `data` in unspecified format. /// /// # Parameters - /// - `to` - The recipient address. + /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] fn transfer(&mut self, to: Address, value: U256) -> bool { @@ -208,8 +208,8 @@ pub mod fungibles { /// pre-approved by `from`. /// /// # Parameters - /// - `from` - The address from which the token balance will be withdrawn. - /// - `to` - The recipient address. + /// - `from` - The account from which the token balance will be withdrawn. + /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool { @@ -237,7 +237,7 @@ pub mod fungibles { /// Successive calls of this method overwrite previous values. /// /// # Parameters - /// - `spender` - The address that is allowed to spend the tokens. + /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to approve. #[ink(message)] fn approve(&mut self, spender: Address, value: U256) -> bool { From 170d7f318bbb5d215e2ae14f3c689efee40a9d2b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:55:53 +0100 Subject: [PATCH 069/284] docs(example): add todo prefix to comment --- pop-api-vnext/examples/fungibles/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 557a3be96..409503526 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -56,7 +56,7 @@ pub mod fungibles { #[ink(message)] pub fn mint(&mut self, account: Address, value: U256) { if let Err(error) = self.ensure_owner() { - // Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 + // TODO: Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 revert(&error) } From cff694a1dfda99c79ed20c55080a67d8f9f88ff1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 11:57:59 +0100 Subject: [PATCH 070/284] docs(api): add public function doc --- pallets/api-vnext/src/fungibles/precompiles/erc20.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 785941d08..d569bf30d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -132,6 +132,7 @@ where } impl, I: 'static> Erc20 { + /// The address of the precompile. pub fn address(id: u32) -> [u8; 20] { prefixed_address(PREFIX, id) } From 9ca25d0a497ef501e8b07e7c04ff5498cdb96b4f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 16 Jun 2025 12:09:45 +0100 Subject: [PATCH 071/284] test(api): remove additional check deemed unnecessary --- pallets/api-vnext/src/fungibles/precompiles/erc20.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index d569bf30d..dea34d000 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -203,8 +203,6 @@ mod tests { .unwrap(), U256::from(endowment) ); - - assert_eq!(Assets::balance(token, ALICE), endowment); }); } From f54ab1f30531ce4628a740ed82c918ea3dbbe167 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 17 Jun 2025 09:09:42 +0100 Subject: [PATCH 072/284] docs(api): add fungibles doc comments --- pallets/api-vnext/src/fungibles/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index c93c6c995..dc33fdda1 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -1,3 +1,7 @@ +//! The fungibles API offers a streamlined interface for interacting with fungible tokens. The +//! goal is to provide a simplified, consistent API that adheres to standards in the smart contract +//! space. + use core::cmp::Ordering::{Equal, Greater, Less}; use frame_support::{ @@ -15,6 +19,7 @@ use AddressMatcher::Fixed; use super::*; +/// The fungibles precompiles offer a streamlined interface for interacting with fungible tokens. pub mod precompiles; type AssetIdOf = >::AssetId; From dc859e88946b59e160f797ba04c22bcf9ed2aca2 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 10:15:57 +0100 Subject: [PATCH 073/284] refactor(precompiles): add license and version requirement --- .../api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol | 3 +++ .../src/fungibles/precompiles/interfaces/IFungibles.sol | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol index 7aa8d6c10..9e78dcfae 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.30; + /** * @dev Interface of the ERC-20 standard as defined in the ERC. * Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol index 99719f137..f58fb962d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.30; + /** * @title The fungibles precompile offers a streamlined interface for interacting with fungible * tokens. The goal is to provide a simplified, consistent API that adheres to standards in the From 73a4986d9312a226ef3ce3df668ac7f9d8c714f1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 10:17:15 +0100 Subject: [PATCH 074/284] refactor(precompiles): update return types after rebase --- .../src/fungibles/precompiles/erc20.rs | 24 +++++------ .../src/fungibles/precompiles/mod.rs | 42 +++++++++---------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index dea34d000..701226820 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -47,13 +47,13 @@ where totalSupply(_) => { // TODO: charge based on benchmarked weight let total_supply = U256::saturating_from(>::total_supply(token)); - Ok(totalSupplyCall::abi_encode_returns(&(total_supply,))) + Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, balanceOf(balanceOfCall { account }) => { // TODO: charge based on benchmarked weight let account = env.to_account_id(&(*account.0).into()); let balance = U256::saturating_from(>::balance(token, account)); - Ok(balanceOfCall::abi_encode_returns(&(balance,))) + Ok(balanceOfCall::abi_encode_returns(&balance)) }, transfer(transferCall { to, value }) => { // TODO: charge based on benchmarked weight @@ -67,7 +67,7 @@ where )?; deposit_event::(env, address, Transfer { from, to: *to, value: *value }); - Ok(transferCall::abi_encode_returns(&(true,))) + Ok(transferCall::abi_encode_returns(&true)) }, allowance(allowanceCall { owner, spender }) => { // TODO: charge based on benchmarked weight @@ -75,7 +75,7 @@ where let spender = env.to_account_id(&(*spender.0).into()); let remaining = U256::saturating_from(>::allowance(token, &owner, &spender)); - Ok(allowanceCall::abi_encode_returns(&(remaining,))) + Ok(allowanceCall::abi_encode_returns(&remaining)) }, approve(approveCall { spender, value }) => { // TODO: charge based on benchmarked weight @@ -91,7 +91,7 @@ where let event = Approval { owner, spender: *spender, value: *value }; deposit_event(env, address, event); - Ok(approveCall::abi_encode_returns(&(true,))) + Ok(approveCall::abi_encode_returns(&true)) }, transferFrom(transferFromCall { from, to, value }) => { // TODO: charge based on benchmarked weight @@ -105,27 +105,25 @@ where )?; deposit_event(env, address, Transfer { from: *from, to: *to, value: *value }); - Ok(transferFromCall::abi_encode_returns(&(true,))) + Ok(transferFromCall::abi_encode_returns(&true)) }, // IERC20Metadata name(_) => { // TODO: charge based on benchmarked weight let result = >::name(token); - // TODO: improve - let result = String::from_utf8_lossy(result.as_slice()); - Ok(nameCall::abi_encode_returns(&(result,))) + let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, symbol(_) => { // TODO: charge based on benchmarked weight let result = >::symbol(token); - // TODO: improve - let result = String::from_utf8_lossy(result.as_slice()); - Ok(symbolCall::abi_encode_returns(&(result,))) + let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(symbolCall::abi_encode_returns(&result)) }, decimals(_) => { // TODO: charge based on benchmarked weight let result = >::decimals(token); - Ok(decimalsCall::abi_encode_returns(&(result,))) + Ok(decimalsCall::abi_encode_returns(&result)) }, } } diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index cf6f55284..715530529 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -60,7 +60,7 @@ where address, Transfer { token: *token, from, to: *to, value: *value }, ); - Ok(transferCall::abi_encode_returns(&())) + Ok(transferCall::abi_encode_returns(&transferReturn{})) }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { // TODO: charge based on benchmarked weight @@ -79,7 +79,7 @@ where address, Transfer { token: *token, from: *from, to: *to, value }, ); - Ok(transferFromCall::abi_encode_returns(&())) + Ok(transferFromCall::abi_encode_returns(&transferFromReturn{})) }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { // TODO: charge based on benchmarked weight @@ -99,7 +99,7 @@ where address, Approval { token: *token, owner, spender, value: *value }, ); - Ok(approveCall::abi_encode_returns(&())) + Ok(approveCall::abi_encode_returns(&approveReturn{})) }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { // TODO: charge based on benchmarked weight @@ -117,7 +117,7 @@ where let spender = *spender; deposit_event(env, address, Approval { token: *token, owner, spender, value }); - Ok(increaseAllowanceCall::abi_encode_returns(&(value,))) + Ok(increaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { // TODO: charge based on benchmarked weight @@ -134,7 +134,7 @@ where let spender = *spender; deposit_event(env, address, Approval { token: *token, owner, spender, value }); - Ok(decreaseAllowanceCall::abi_encode_returns(&(value,))) + Ok(decreaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::create(createCall { admin, minBalance }) => { // TODO: charge based on benchmarked weight @@ -148,12 +148,12 @@ where .into(); deposit_event(env, address, Created { id, creator, admin: *admin }); - Ok(createCall::abi_encode_returns(&(id,))) + Ok(createCall::abi_encode_returns(&id)) }, IFungiblesCalls::startDestroy(startDestroyCall { token }) => { // TODO: charge based on benchmarked weight start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; - Ok(startDestroyCall::abi_encode_returns(&())) + Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn{})) }, IFungiblesCalls::setMetadata(setMetadataCall { token, name, symbol, decimals }) => { // TODO: charge based on benchmarked weight @@ -164,12 +164,12 @@ where symbol.as_bytes().to_vec(), *decimals, )?; - Ok(setMetadataCall::abi_encode_returns(&())) + Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn{})) }, IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { // TODO: charge based on benchmarked weight clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; - Ok(clearMetadataCall::abi_encode_returns(&())) + Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn{})) }, IFungiblesCalls::mint(mintCall { token, account, value }) => { // TODO: charge based on benchmarked weight @@ -184,7 +184,7 @@ where let from = Address::default(); let to = *account; deposit_event(env, address, Transfer { token: *token, from, to, value: *value }); - Ok(mintCall::abi_encode_returns(&())) + Ok(mintCall::abi_encode_returns(&mintReturn{})) }, IFungiblesCalls::burn(burnCall { token, account, value }) => { // TODO: charge based on benchmarked weight @@ -204,20 +204,20 @@ where address, Transfer { token: *token, from: *from, to, value: *value }, ); - Ok(burnCall::abi_encode_returns(&())) + Ok(burnCall::abi_encode_returns(&burnReturn{})) }, IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { // TODO: charge based on benchmarked weight let total_supply = U256::saturating_from(>::total_supply((*token).into())); - Ok(totalSupplyCall::abi_encode_returns(&(total_supply,))) + Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, IFungiblesCalls::balanceOf(balanceOfCall { token, owner }) => { // TODO: charge based on benchmarked weight let account = env.to_account_id(&(*owner.0).into()); let balance = U256::saturating_from(>::balance((*token).into(), account)); - Ok(balanceOfCall::abi_encode_returns(&(balance,))) + Ok(balanceOfCall::abi_encode_returns(&balance)) }, IFungiblesCalls::allowance(allowanceCall { token, owner, spender }) => { // TODO: charge based on benchmarked weight @@ -228,31 +228,29 @@ where &owner, &spender, )); - Ok(allowanceCall::abi_encode_returns(&(remaining,))) + Ok(allowanceCall::abi_encode_returns(&remaining)) }, IFungiblesCalls::name(nameCall { token }) => { // TODO: charge based on benchmarked weight let result = >::name((*token).into()); - // TODO: improve - let result = String::from_utf8_lossy(result.as_slice()); - Ok(nameCall::abi_encode_returns(&(result,))) + let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::symbol(symbolCall { token }) => { // TODO: charge based on benchmarked weight let result = >::symbol((*token).into()); - // TODO: improve - let result = String::from_utf8_lossy(result.as_slice()); - Ok(nameCall::abi_encode_returns(&(result,))) + let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::decimals(decimalsCall { token }) => { // TODO: charge based on benchmarked weight let result = >::decimals((*token).into()); - Ok(decimalsCall::abi_encode_returns(&(result,))) + Ok(decimalsCall::abi_encode_returns(&result)) }, IFungiblesCalls::exists(existsCall { token }) => { // TODO: charge based on benchmarked weight let result = self::exists::((*token).into()); - Ok(existsCall::abi_encode_returns(&(result,))) + Ok(existsCall::abi_encode_returns(&result)) }, } } From bd5f22a5b82674c7da4c09aafd9994870165ba30 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 12:31:28 +0100 Subject: [PATCH 075/284] test(api): resolve breaking changes after rebase --- pallets/api-vnext/src/lib.rs | 9 +++++++-- pallets/api-vnext/src/mock.rs | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index f5edb0410..e328feef6 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -69,7 +69,7 @@ where } // A direct call to a precompile. -#[cfg(test)] +#[cfg(all(test, feature = "runtime-benchmarks"))] fn call_precompile< P: Precompile, O: SolValue @@ -89,7 +89,7 @@ fn decode< >( data: &[u8], ) -> T { - T::abi_decode(data, true).expect("unable to decode") + T::abi_decode(data).expect("unable to decode") } fn deposit_event( @@ -131,6 +131,11 @@ fn prefixed_address(n: u16, prefix: u32) -> [u8; 20] { address } +#[cfg(test)] +fn to_address(account: &::AccountId) -> H160 { + pallet_revive::AccountId32Mapper::::to_address(account) +} + // TODO: verify fn topics(event: &impl SolEvent) -> Vec { event.encode_topics().into_iter().map(|t| (*t.0).into()).collect() diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 566b76a58..fdb2d2260 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -6,7 +6,6 @@ use frame_support::{ }; use frame_system::{EnsureRoot, EnsureSigned}; use pallet_assets::AutoIncAssetId; -use pallet_revive::precompiles::run::CallSetup; pub(crate) use pallet_revive::test_utils::ALICE; pub(crate) type Balance = u128; @@ -63,9 +62,11 @@ impl pallet_balances::Config for Test { impl pallet_revive::Config for Test { type AddressMapper = pallet_revive::AccountId32Mapper; type Currency = Balances; + type InstantiateOrigin = EnsureSigned; type Precompiles = (Fungibles<100, pallet_assets::Instance1>, Erc20<101, pallet_assets::Instance1>); type Time = Timestamp; + type UploadOrigin = EnsureSigned; } #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] @@ -131,9 +132,13 @@ impl ExtBuilder { ext } - pub(crate) fn build_with_env(self, execute: impl FnOnce(CallSetup) -> R) -> R { + #[cfg(feature = "runtime-benchmarks")] + pub(crate) fn build_with_env( + self, + execute: impl FnOnce(pallet_revive::precompiles::run::CallSetup) -> R, + ) -> R { self.build().execute_with(|| { - let call_setup = CallSetup::::default(); + let call_setup = pallet_revive::precompiles::run::CallSetup::::default(); // let (ext, _) = call_setup.ext(); execute(call_setup) }) From 03f2e266fb6b0c97f55ba1b91fdba50fad743e2c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 12:32:16 +0100 Subject: [PATCH 076/284] test(api): improve fungibles precompile tests after rebase --- .../src/fungibles/precompiles/mod.rs | 435 ++++++++---------- 1 file changed, 196 insertions(+), 239 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 715530529..8e87212c1 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -60,7 +60,7 @@ where address, Transfer { token: *token, from, to: *to, value: *value }, ); - Ok(transferCall::abi_encode_returns(&transferReturn{})) + Ok(transferCall::abi_encode_returns(&transferReturn {})) }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { // TODO: charge based on benchmarked weight @@ -79,7 +79,7 @@ where address, Transfer { token: *token, from: *from, to: *to, value }, ); - Ok(transferFromCall::abi_encode_returns(&transferFromReturn{})) + Ok(transferFromCall::abi_encode_returns(&transferFromReturn {})) }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { // TODO: charge based on benchmarked weight @@ -99,7 +99,7 @@ where address, Approval { token: *token, owner, spender, value: *value }, ); - Ok(approveCall::abi_encode_returns(&approveReturn{})) + Ok(approveCall::abi_encode_returns(&approveReturn {})) }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { // TODO: charge based on benchmarked weight @@ -153,7 +153,7 @@ where IFungiblesCalls::startDestroy(startDestroyCall { token }) => { // TODO: charge based on benchmarked weight start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; - Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn{})) + Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn {})) }, IFungiblesCalls::setMetadata(setMetadataCall { token, name, symbol, decimals }) => { // TODO: charge based on benchmarked weight @@ -164,12 +164,12 @@ where symbol.as_bytes().to_vec(), *decimals, )?; - Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn{})) + Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn {})) }, IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { // TODO: charge based on benchmarked weight clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; - Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn{})) + Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, IFungiblesCalls::mint(mintCall { token, account, value }) => { // TODO: charge based on benchmarked weight @@ -184,7 +184,7 @@ where let from = Address::default(); let to = *account; deposit_event(env, address, Transfer { token: *token, from, to, value: *value }); - Ok(mintCall::abi_encode_returns(&mintReturn{})) + Ok(mintCall::abi_encode_returns(&mintReturn {})) }, IFungiblesCalls::burn(burnCall { token, account, value }) => { // TODO: charge based on benchmarked weight @@ -204,7 +204,7 @@ where address, Transfer { token: *token, from: *from, to, value: *value }, ); - Ok(burnCall::abi_encode_returns(&burnReturn{})) + Ok(burnCall::abi_encode_returns(&burnReturn {})) }, IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { // TODO: charge based on benchmarked weight @@ -272,12 +272,8 @@ mod tests { use mock::{Assets, ExtBuilder, *}; use pallet_assets::{AssetDetails, AssetMetadata, AssetStatus, Instance1}; use pallet_revive::{ - precompiles::{ - alloy::sol_types::{SolInterface, SolType}, - ExtWithInfo, - }, - test_utils::{ALICE_ADDR, BOB, BOB_ADDR}, - DepositLimit::*, + precompiles::alloy::sol_types::{SolInterface, SolType}, + test_utils::{ALICE, BOB, CHARLIE}, }; use super::{ @@ -288,37 +284,39 @@ mod tests { const FUNGIBLES: u16 = 100; const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); + type AccountId = ::AccountId; type Asset = pallet_assets::Asset; - type Fungibles = super::Fungibles; type Metadata = pallet_assets::Metadata; #[test] fn transfer_works() { let token = 1; + let origin = ALICE; let endowment = 10_000_000; + let to = BOB; ExtBuilder::new() - .with_assets(vec![(token, ALICE, true, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(token, ALICE), endowment); - assert_eq!(Assets::balance(token, BOB), 0); + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &origin), endowment); + assert_eq!(Assets::balance(token, &to), 0); let value = endowment / 2; assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::transfer(transferCall { token, - to: BOB_ADDR.0.into(), + to: to_address(&to).0.into(), value: U256::from(value) }) )); - assert_eq!(Assets::balance(token, ALICE), endowment - value); - assert_eq!(Assets::balance(token, BOB), value); + assert_eq!(Assets::balance(token, &origin), endowment - value); + assert_eq!(Assets::balance(token, &to), value); - let from = ALICE_ADDR.0.into(); - let to = BOB_ADDR.0.into(); + let from = to_address(&origin).0.into(); + let to = to_address(&to).0.into(); let event = Transfer { token, from, to, value: U256::from(value) }; assert_last_event(ADDRESS, event); }); @@ -327,36 +325,39 @@ mod tests { #[test] fn transfer_from_works() { let token = 1; + let origin = BOB; + let from = ALICE; let endowment = 10_000_000; + let to = CHARLIE; let value = endowment / 2; ExtBuilder::new() - .with_assets(vec![(token, ALICE, true, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - assert_eq!(Assets::balance(token, ALICE), endowment); - assert_eq!(Assets::balance(token, BOB), 0); + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, from.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &from), endowment); + assert_eq!(Assets::balance(token, &to), 0); assert_ok!(approve::( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(from.clone()), token, - BOB, + origin.clone(), value )); - call_setup.set_origin(Origin::Signed(BOB)); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::transferFrom(transferFromCall { token, - from: ALICE_ADDR.0.into(), - to: BOB_ADDR.0.into(), + from: to_address(&from).0.into(), + to: to_address(&to).0.into(), value: U256::from(value), }) )); - assert_eq!(Assets::balance(token, ALICE), endowment - value); - assert_eq!(Assets::balance(token, BOB), value); - let from = ALICE_ADDR.0.into(); - let to = BOB_ADDR.0.into(); + assert_eq!(Assets::balance(token, &from), endowment - value); + assert_eq!(Assets::balance(token, &to), value); + let from = to_address(&from).0.into(); + let to = to_address(&to).0.into(); let event = Transfer { token, from, to, value: U256::from(value) }; assert_last_event(ADDRESS, event); }); @@ -365,28 +366,30 @@ mod tests { #[test] fn approve_works() { let token = 1; + let origin = ALICE; + let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::allowance(token, &ALICE, &BOB), 0); + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { + assert_eq!(Assets::allowance(token, &origin, &spender), 0); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::approve(approveCall { token, - spender: BOB_ADDR.0.into(), + spender: to_address(&spender).0.into(), value: U256::from(value), }) )); - assert_eq!(Assets::allowance(token, &ALICE, &BOB), value); - let owner = ALICE_ADDR.0.into(); - let spender = BOB_ADDR.0.into(); + assert_eq!(Assets::allowance(token, &origin, &spender), value); + let owner = to_address(&origin).0.into(); + let spender = to_address(&spender).0.into(); let event = Approval { token, owner, spender, value: U256::from(value) }; assert_last_event(ADDRESS, event); - }, - ); + }); } #[test] @@ -395,9 +398,10 @@ mod tests { let origin = ALICE; let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(origin.clone())); + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { assert_ok!(Assets::approve_transfer( RuntimeOrigin::signed(origin.clone()), token.into(), @@ -408,10 +412,10 @@ mod tests { // Double the allowance. let allowance = call_precompile::( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, - spender: BOB_ADDR.0.into(), + spender: to_address(&spender).0.into(), value: U256::from(value), }), ) @@ -419,12 +423,11 @@ mod tests { assert_eq!(allowance, U256::from(value * 2)); assert_eq!(Assets::allowance(token, &origin, &spender), value * 2); - let owner = ALICE_ADDR.0.into(); - let spender = BOB_ADDR.0.into(); + let owner = to_address(&origin).0.into(); + let spender = to_address(&spender).0.into(); let event = Approval { token, owner, spender, value: U256::from(allowance) }; assert_last_event(ADDRESS, event); - }, - ); + }); } #[test] @@ -433,9 +436,10 @@ mod tests { let origin = ALICE; let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(origin.clone())); + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { assert_ok!(Assets::approve_transfer( RuntimeOrigin::signed(origin.clone()), token.into(), @@ -446,10 +450,10 @@ mod tests { // Halve the allowance. let allowance = call_precompile::( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, - spender: BOB_ADDR.0.into(), + spender: to_address(&spender).0.into(), value: U256::from(value / 2), }), ) @@ -457,41 +461,42 @@ mod tests { assert_eq!(allowance, U256::from(value / 2)); assert_eq!(Assets::allowance(token, &origin, &spender), value / 2); - let owner = ALICE_ADDR.0.into(); - let spender = BOB_ADDR.0.into(); + let owner = to_address(&origin).0.into(); + let spender = to_address(&spender).0.into(); let event = Approval { token, owner, spender, value: U256::from(allowance) }; assert_last_event(ADDRESS, event); - }, - ); + }); } #[test] fn create_works() { - let id = 0u32; + let token = 0; + let origin = ALICE; + let admin = BOB; let min_balance = 1; - ExtBuilder::new().build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert!(!Assets::asset_exists(id)); - - let mut ext = call_setup.ext().0; - let result: u32 = call_precompile( - &mut ext, - &IFungiblesCalls::create(createCall { - admin: BOB_ADDR.0.into(), - minBalance: U256::from(min_balance), - }), - ) - .unwrap(); - - assert_eq!(result, id); - assert!(Assets::asset_exists(id)); + ExtBuilder::new().build().execute_with(|| { + assert!(!Assets::asset_exists(token)); + assert_eq!( - Asset::get(id).unwrap(), + call_precompile::( + &origin, + &IFungiblesCalls::create(createCall { + admin: to_address(&admin).0.into(), + minBalance: U256::from(min_balance), + }), + ) + .unwrap(), + token + ); + + assert!(Assets::asset_exists(token)); + assert_eq!( + Asset::get(token).unwrap(), AssetDetails { - owner: ALICE, - issuer: BOB, - admin: BOB, - freezer: BOB, + owner: origin.clone(), + issuer: admin.clone(), + admin: admin.clone(), + freezer: admin.clone(), supply: 0, deposit: min_balance, min_balance, @@ -503,35 +508,9 @@ mod tests { } ); - let event = Created { id, creator: ALICE_ADDR.0.into(), admin: BOB_ADDR.0.into() }; - assert_last_event(ADDRESS, event); - }); - } - - #[test] - fn create_via_bare_call_works() { - let id = 0u32; - let origin = RuntimeOrigin::signed(ALICE); - ExtBuilder::new().build().execute_with(|| { - assert!(!Assets::asset_exists(id)); - - let result = bare_call::( - origin, - ADDRESS.into(), - 0, - Weight::MAX, - DepositLimit::Balance(u128::MAX), - IFungiblesCalls::create(createCall { - admin: BOB_ADDR.0.into(), - minBalance: U256::from(1), - }) - .abi_encode(), - ) - .unwrap(); - - assert_eq!(result, id); - assert!(Assets::asset_exists(id)); - let event = Created { id, creator: ALICE_ADDR.0.into(), admin: BOB_ADDR.0.into() }; + let creator = to_address(&origin).0.into(); + let admin = to_address(&admin).0.into(); + let event = Created { id: token, creator, admin }; assert_last_event(ADDRESS, event); }); } @@ -539,35 +518,37 @@ mod tests { #[test] fn start_destroy_works() { let token = 1; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); + let origin = ALICE; + ExtBuilder::new() + .with_assets(vec![(token, origin.clone(), false, 1)]) + .build() + .execute_with(|| { assert_eq!(Asset::get(token).unwrap().status, AssetStatus::Live); - let mut ext = call_setup.ext().0; assert_ok!(call_precompile::<()>( - &mut ext, + &origin, &startDestroy(startDestroyCall { token }) )); assert_eq!(Asset::get(token).unwrap().status, AssetStatus::Destroying); - }, - ); + }); } #[test] fn set_metadata_works() { let token = 1; + let origin = ALICE; let name = "name".to_string(); let symbol = "symbol".to_string(); let decimals = u8::MAX; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); + ExtBuilder::new() + .with_assets(vec![(token, origin.clone(), false, 1)]) + .build() + .execute_with(|| { assert_eq!(Metadata::get(token), AssetMetadata::default()); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &setMetadata(setMetadataCall { token, name: name.clone(), @@ -586,21 +567,21 @@ mod tests { is_frozen: false, } ); - }, - ); + }); } #[test] fn clear_metadata_works() { let token = 1; + let origin = ALICE; let name = b"name".to_vec(); let symbol = b"symbol".to_vec(); let decimals = u8::MAX; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, origin.clone(), false, 1)]) .with_asset_metadata(vec![(token, name.clone(), symbol.clone(), decimals)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); + .build() + .execute_with(|| { assert_eq!( Metadata::get(token), AssetMetadata { @@ -613,7 +594,7 @@ mod tests { ); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &clearMetadata(clearMetadataCall { token }) )); @@ -624,52 +605,54 @@ mod tests { #[test] fn mint_works() { let token = 1; + let origin = ALICE; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(token, ALICE), 0); + ExtBuilder::new() + .with_assets(vec![(token, origin.clone(), false, 1)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &origin), 0); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::mint(mintCall { token, - account: ALICE_ADDR.0.into(), + account: to_address(&origin).0.into(), value: U256::from(value) }) )); - assert_eq!(Assets::balance(token, ALICE), value); + assert_eq!(Assets::balance(token, &origin), value); let from = Address::default(); - let to = ALICE_ADDR.0.into(); + let to = to_address(&origin).0.into(); let event = Transfer { token, from, to, value: U256::from(value) }; assert_last_event(ADDRESS, event); - }, - ); + }); } #[test] fn burn_works() { let token = 1; + let origin = ALICE; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - assert_eq!(Assets::balance(token, ALICE), endowment); + .with_assets(vec![(token, origin.clone(), false, 1)]) + .with_asset_balances(vec![(token, origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &origin), endowment); assert_ok!(call_precompile::<()>( - &mut call_setup.ext().0, + &origin, &IFungiblesCalls::burn(burnCall { token, - account: ALICE_ADDR.0.into(), + account: to_address(&origin).0.into(), value: U256::from(endowment), }), )); - assert_eq!(Assets::balance(token, ALICE), 0); - let from = ALICE_ADDR.0.into(); + assert_eq!(Assets::balance(token, &origin), 0); + let from = to_address(&origin).0.into(); let to = Address::default(); let event = Transfer { token, from, to, value: U256::from(endowment) }; assert_last_event(ADDRESS, event); @@ -678,15 +661,16 @@ mod tests { #[test] fn total_supply_works() { - let token = u32::MAX; + let token = 1; let total_supply = 10_000_000; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_balances(vec![(token, ALICE, total_supply)]) - .build_with_env(|mut call_setup| { + .build() + .execute_with(|| { assert_eq!( call_precompile::( - &mut call_setup.ext().0, + &BOB, &IFungiblesCalls::totalSupply(totalSupplyCall { token }) ) .unwrap(), @@ -697,57 +681,60 @@ mod tests { #[test] fn balance_of_works() { - let token = u32::MAX; + let token = 1; + let owner = ALICE; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_balances(vec![(token, owner.clone(), endowment)]) + .build() + .execute_with(|| { assert_eq!( call_precompile::( - &mut call_setup.ext().0, + &BOB, &IFungiblesCalls::balanceOf(balanceOfCall { token, - owner: ALICE_ADDR.0.into() + owner: to_address(&owner).0.into() }) ) .unwrap(), U256::from(endowment) ); - assert_eq!(Assets::balance(token, ALICE), endowment); + assert_eq!(Assets::balance(token, owner), endowment); }); } #[test] fn allowance_works() { - let token = u32::MAX; + let token = 1; + let owner = ALICE; + let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { assert_ok!(approve::( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(owner.clone()), token, - BOB, + spender.clone(), value )); assert_eq!( call_precompile::( - &mut call_setup.ext().0, + &BOB, &IFungiblesCalls::allowance(allowanceCall { token, - owner: ALICE_ADDR.0.into(), - spender: BOB_ADDR.0.into(), + owner: to_address(&owner).0.into(), + spender: to_address(&spender).0.into(), }) ) .unwrap(), U256::from(value) ); - }, - ); + }); } #[test] @@ -755,12 +742,12 @@ mod tests { let token = 1; let name = "name".to_string(); ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, name.as_bytes().into(), b"symbol".to_vec(), u8::MAX)]) - .build_with_env(|mut call_setup| { - let mut ext = call_setup.ext().0; + .build() + .execute_with(|| { assert_eq!( - call_precompile::(&mut ext, &IFungiblesCalls::name(nameCall { token })) + call_precompile::(&ALICE, &IFungiblesCalls::name(nameCall { token })) .unwrap(), name ); @@ -772,13 +759,13 @@ mod tests { let token = 1; let symbol = "symbol".to_string(); ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, b"name".to_vec(), symbol.as_bytes().into(), u8::MAX)]) - .build_with_env(|mut call_setup| { - let mut ext = call_setup.ext().0; + .build() + .execute_with(|| { assert_eq!( call_precompile::( - &mut ext, + &ALICE, &IFungiblesCalls::symbol(symbolCall { token }) ) .unwrap(), @@ -792,13 +779,13 @@ mod tests { let token = 1; let decimals = u8::MAX; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), decimals)]) - .build_with_env(|mut call_setup| { - let mut ext = call_setup.ext().0; + .build() + .execute_with(|| { assert_eq!( call_precompile::( - &mut ext, + &ALICE, &IFungiblesCalls::decimals(decimalsCall { token }) ) .unwrap() as u8, @@ -810,14 +797,14 @@ mod tests { #[test] fn exists_works() { let token = 1; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { assert!(Assets::asset_exists(token)); - let mut ext = call_setup.ext().0; assert!(call_precompile::( - &mut ext, + &ALICE, &IFungiblesCalls::exists(existsCall { token }) ) .unwrap()); @@ -825,54 +812,24 @@ mod tests { let token = token + 1; assert!(!Assets::asset_exists(token)); assert!(!call_precompile::( - &mut ext, + &ALICE, &IFungiblesCalls::exists(existsCall { token }) ) .unwrap()); - }, - ); - } - - #[test] - fn exists_via_bare_call_works() { - let token = 1; - let origin = RuntimeOrigin::signed(ALICE); - ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) - .build() - .execute_with(|| { - assert!(Assets::asset_exists(token)); - - let asset_exists = bare_call::( - origin.clone(), - ADDRESS.into(), - 0, - Weight::MAX, - Unchecked, - IFungiblesCalls::exists(existsCall { token }).abi_encode(), - ) - .unwrap(); - assert!(asset_exists); - - let token = token + 1; - assert!(!Assets::asset_exists(token)); - let exists = bare_call::( - origin, - ADDRESS.into(), - 0, - Weight::MAX, - Unchecked, - IFungiblesCalls::exists(existsCall { token }).abi_encode(), - ) - .unwrap(); - assert!(!exists); }); } fn call_precompile::RustType>>( - ext: &mut impl ExtWithInfo, + origin: &AccountId, input: &IFungiblesCalls, - ) -> Result { - super::call_precompile::(ext, &ADDRESS, input) + ) -> Result { + bare_call::( + RuntimeOrigin::signed(origin.clone()), + ADDRESS.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) } } From 93bb10232fd6bdd8ff0293a97a6e9c9241794fb0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 12:56:55 +0100 Subject: [PATCH 077/284] test(api): improve erc20 precompile tests after rebase --- .../src/fungibles/precompiles/erc20.rs | 212 +++++++++--------- 1 file changed, 111 insertions(+), 101 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 701226820..97f50cd00 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -138,45 +138,42 @@ impl, I: 'static> Erc20 { #[cfg(test)] mod tests { - use frame_support::{assert_ok, sp_runtime::app_crypto::sp_core::bytes::to_hex}; + use frame_support::{ + assert_ok, + sp_runtime::{app_crypto::sp_core::bytes::to_hex, DispatchError}, + }; use pallet_assets::Instance1; use pallet_revive::{ - precompiles::{ - alloy::sol_types::{SolType, SolValue}, - ExtWithInfo, - }, - test_utils::{ALICE, ALICE_ADDR, BOB, BOB_ADDR}, - Origin, + precompiles::alloy::sol_types::{SolInterface, SolType, SolValue}, + test_utils::{ALICE, BOB, CHARLIE}, }; use IERC20Calls::*; use IERC20::{Approval, Transfer}; use super::*; use crate::{ - assert_last_event, + assert_last_event, bare_call, fungibles::approve, mock::{Assets, ExtBuilder, RuntimeOrigin, Test}, + to_address, DepositLimit, Weight, }; const ERC20: u16 = 101; - type Erc20 = super::Erc20; + type AccountId = ::AccountId; #[test] fn total_supply_works() { - let token = u32::MAX; + let token = 1; let total_supply = 10_000_000; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_balances(vec![(token, ALICE, total_supply)]) - .build_with_env(|mut call_setup| { + .build() + .execute_with(|| { assert_eq!( - call_precompile::( - &mut call_setup.ext().0, - token, - &totalSupply(totalSupplyCall {}) - ) - .unwrap(), + call_precompile::(&ALICE, token, &totalSupply(totalSupplyCall {})) + .unwrap(), U256::from(total_supply) ); }); @@ -184,19 +181,19 @@ mod tests { #[test] fn balance_of_works() { - let token = u32::MAX; + let token = 1; + let account = ALICE; let endowment = 10_000_000; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_balances(vec![(token, account.clone(), endowment)]) + .build() + .execute_with(|| { assert_eq!( call_precompile::( - &mut call_setup.ext().0, + &BOB, token, - &balanceOf(balanceOfCall { account: ALICE_ADDR.0.into() }) + &balanceOf(balanceOfCall { account: to_address(&account).0.into() }) ) .unwrap(), U256::from(endowment) @@ -206,31 +203,33 @@ mod tests { #[test] fn transfer_works() { - let token = u32::MAX; + let token = 1; + let origin = ALICE; let endowment = 10_000_000; + let to = BOB; ExtBuilder::new() - .with_assets(vec![(token, BOB, true, 1)]) - .with_asset_balances(vec![(token, BOB, endowment)]) - .build_with_env(|mut call_setup| { - call_setup.set_origin(Origin::Signed(BOB)); - assert_eq!(Assets::balance(token, BOB), endowment); - assert_eq!(Assets::balance(token, ALICE), 0); + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &origin), endowment); + assert_eq!(Assets::balance(token, &to), 0); let value = endowment / 2; assert!(call_precompile::( - &mut call_setup.ext().0, + &origin, token, &IERC20Calls::transfer(IERC20::transferCall { - to: ALICE_ADDR.0.into(), + to: to_address(&to).0.into(), value: U256::from(value) }) ) .unwrap()); - assert_eq!(Assets::balance(token, BOB), endowment - value); - assert_eq!(Assets::balance(token, ALICE), value); - let from = BOB_ADDR.0.into(); - let to = ALICE_ADDR.0.into(); + assert_eq!(Assets::balance(token, &origin), endowment - value); + assert_eq!(Assets::balance(token, &to), value); + let from = to_address(&origin).0.into(); + let to = to_address(&to).0.into(); let event = Transfer { from, to, value: U256::from(value) }; assert_last_event(prefixed_address(ERC20, token), event); }); @@ -238,12 +237,16 @@ mod tests { #[test] fn allowance_works() { - let token = u32::MAX; + let token = 1; + let owner = ALICE; + let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { assert_ok!(approve::( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(owner.clone()), token, BOB, value @@ -251,83 +254,86 @@ mod tests { assert_eq!( call_precompile::( - &mut call_setup.ext().0, + &BOB, token, &allowance(allowanceCall { - owner: ALICE_ADDR.0.into(), - spender: BOB_ADDR.0.into(), + owner: to_address(&owner).0.into(), + spender: to_address(&spender).0.into(), }) ) .unwrap(), U256::from(value) ); - }, - ); + }); } #[test] fn approve_works() { - let token = u32::MAX; + let token = 1; + let origin = ALICE; + let spender = BOB; let value = 10_000_000; - ExtBuilder::new().with_assets(vec![(token, ALICE, false, 1)]).build_with_env( - |mut call_setup| { - call_setup.set_origin(Origin::Signed(ALICE)); - - assert_eq!(Assets::allowance(token, &ALICE, &BOB), 0); + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { + assert_eq!(Assets::allowance(token, &origin, &spender), 0); assert!(call_precompile::( - &mut call_setup.ext().0, + &origin, token, &IERC20Calls::approve(IERC20::approveCall { - spender: BOB_ADDR.0.into(), + spender: to_address(&spender).0.into(), value: U256::from(value) }) ) .unwrap()); - assert_eq!(Assets::allowance(token, &ALICE, &BOB), value); - let owner = ALICE_ADDR.0.into(); - let spender = BOB_ADDR.0.into(); + assert_eq!(Assets::allowance(token, &origin, &spender), value); + let owner = to_address(&origin).0.into(); + let spender = to_address(&spender).0.into(); let event = Approval { owner, spender, value: U256::from(value) }; assert_last_event(prefixed_address(ERC20, token), event); - }, - ); + }); } #[test] fn transfer_from_works() { - let token = u32::MAX; + let token = 1; + let origin = BOB; + let from = ALICE; let endowment = 10_000_000; + let to = CHARLIE; let value = endowment / 2; ExtBuilder::new() - .with_assets(vec![(token, ALICE, true, 1)]) - .with_asset_balances(vec![(token, ALICE, endowment)]) - .build_with_env(|mut call_setup| { - assert_eq!(Assets::balance(token, ALICE), endowment); - assert_eq!(Assets::balance(token, BOB), 0); + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, from.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &from), endowment); + assert_eq!(Assets::balance(token, &to), 0); assert_ok!(approve::( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(from.clone()), token, - BOB, + origin.clone(), value )); - call_setup.set_origin(Origin::Signed(BOB)); assert!(call_precompile::( - &mut call_setup.ext().0, + &origin, token, &transferFrom(IERC20::transferFromCall { - from: ALICE_ADDR.0.into(), - to: BOB_ADDR.0.into(), + from: to_address(&from).0.into(), + to: to_address(&to).0.into(), value: U256::from(value), }) ) .unwrap()); - assert_eq!(Assets::balance(token, ALICE), endowment - value); - assert_eq!(Assets::balance(token, BOB), value); - let from = ALICE_ADDR.0.into(); - let to = BOB_ADDR.0.into(); + assert_eq!(Assets::balance(token, &from), endowment - value); + assert_eq!(Assets::balance(token, &to), value); + let from = to_address(&from).0.into(); + let to = to_address(&to).0.into(); let event = Transfer { from, to, value: U256::from(value) }; assert_last_event(prefixed_address(ERC20, token), event); }); @@ -335,16 +341,15 @@ mod tests { #[test] fn name_works() { - let token = u32::MAX; + let token = 1; let _name = "name"; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) - .build_with_env(|mut call_setup| { + .build() + .execute_with(|| { assert_eq!( - call_precompile::(&mut call_setup.ext().0, token, &name(nameCall {})) - .unwrap() - .as_str(), + call_precompile::(&ALICE, token, &name(nameCall {})).unwrap().as_str(), _name ); }); @@ -352,20 +357,17 @@ mod tests { #[test] fn symbol_works() { - let token = u32::MAX; + let token = 1; let _symbol = "symbol"; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) - .build_with_env(|mut call_setup| { + .build() + .execute_with(|| { assert_eq!( - call_precompile::( - &mut call_setup.ext().0, - token, - &symbol(symbolCall {}) - ) - .unwrap() - .as_str(), + call_precompile::(&ALICE, token, &symbol(symbolCall {})) + .unwrap() + .as_str(), _symbol ); }); @@ -373,15 +375,15 @@ mod tests { #[test] fn decimals_works() { - let token = u32::MAX; + let token = 1; let _decimals = u8::MAX; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) - .build_with_env(|mut call_setup| { - let mut ext = call_setup.ext().0; + .build() + .execute_with(|| { assert_eq!( - call_precompile::(&mut ext, token, &decimals(decimalsCall {})).unwrap() + call_precompile::(&ALICE, token, &decimals(decimalsCall {})).unwrap() as u8, _decimals ); @@ -396,10 +398,18 @@ mod tests { } fn call_precompile::RustType>>( - ext: &mut impl ExtWithInfo, + origin: &AccountId, token: u32, input: &IERC20Calls, - ) -> Result { - crate::call_precompile::(ext, &prefixed_address(ERC20, token), input) + ) -> Result { + let address = prefixed_address(ERC20, token); + bare_call::( + RuntimeOrigin::signed(origin.clone()), + address.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) } } From 3d3fe4cccffa5a2dd608aef81c50b0f4a3106f83 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 13:03:32 +0100 Subject: [PATCH 078/284] test(api): define precompile constants within mock runtime --- pallets/api-vnext/src/fungibles/precompiles/erc20.rs | 4 +--- pallets/api-vnext/src/fungibles/precompiles/mod.rs | 1 - pallets/api-vnext/src/mock.rs | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 97f50cd00..98a08cb2d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -154,12 +154,10 @@ mod tests { use crate::{ assert_last_event, bare_call, fungibles::approve, - mock::{Assets, ExtBuilder, RuntimeOrigin, Test}, + mock::{Assets, ExtBuilder, RuntimeOrigin, Test, ERC20}, to_address, DepositLimit, Weight, }; - const ERC20: u16 = 101; - type AccountId = ::AccountId; #[test] diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 8e87212c1..3929bf30d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -281,7 +281,6 @@ mod tests { *, }; - const FUNGIBLES: u16 = 100; const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); type AccountId = ::AccountId; diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index fdb2d2260..19eed1511 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -13,6 +13,9 @@ type Block = frame_system::mocking::MockBlock; type Erc20 = crate::Erc20; type Fungibles = crate::Fungibles; +pub(crate) const ERC20: u16 = 2; +pub(crate) const FUNGIBLES: u16 = 1; + #[frame_support::runtime] mod runtime { #[runtime::runtime] @@ -64,7 +67,7 @@ impl pallet_revive::Config for Test { type Currency = Balances; type InstantiateOrigin = EnsureSigned; type Precompiles = - (Fungibles<100, pallet_assets::Instance1>, Erc20<101, pallet_assets::Instance1>); + (Fungibles, Erc20); type Time = Timestamp; type UploadOrigin = EnsureSigned; } From ea46cfadd16a4f9d429361de3beddf52dc413790 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 13:06:59 +0100 Subject: [PATCH 079/284] refactor(api): use asset id extractors from pallet-assets --- pallets/api-vnext/src/fungibles/mod.rs | 18 ------------------ .../src/fungibles/precompiles/erc20.rs | 6 +++--- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index dc33fdda1..6bbb6b971 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -226,21 +226,3 @@ fn transfer_from, I>( value, ) } - -// TODO: replace with type in pallet_assets once available in next release -pub struct InlineAssetIdExtractor; -impl AssetIdExtractor for InlineAssetIdExtractor { - type AssetId = u32; - - fn asset_id_from_address(addr: &[u8; 20]) -> Result { - let bytes: [u8; 4] = addr[0..4].try_into().expect("slice is 4 bytes; qed"); - let index = u32::from_be_bytes(bytes); - Ok(index) - } -} -/// Mean of extracting the asset id from the precompile address. -pub trait AssetIdExtractor { - type AssetId; - /// Extracts the asset id from the address. - fn asset_id_from_address(address: &[u8; 20]) -> Result; -} diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 98a08cb2d..f582ad148 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -4,14 +4,14 @@ use frame_support::{ sp_runtime::traits::AtLeast32Bit, traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, }; +use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; use pallet_revive::AddressMapper as _; use AddressMatcher::Prefix; use IERC20::*; use super::{ - deposit_event, prefixed_address, sol, to_runtime_origin, AddressMapper, AddressMatcher, - AssetIdExtractor, Assets, Config, Error, Ext, InlineAssetIdExtractor, NonZero, PhantomData, - Precompile, SolCall, UintTryFrom, UintTryTo, U256, + deposit_event, prefixed_address, sol, to_runtime_origin, AddressMapper, AddressMatcher, Assets, + Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, UintTryFrom, UintTryTo, U256, }; sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); From f3df2c69f03876325c46f92b48598095b82f5ea9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 13:24:10 +0100 Subject: [PATCH 080/284] test(devnet): resolve breaking changes after rebase --- runtime/devnet/src/config/contracts.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 686c3e32c..b51c5a518 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -243,7 +243,7 @@ mod tests { origin.clone(), 10 * UNIT, Weight::MAX, - DepositLimit::Unchecked, + DepositLimit::Balance(u128::MAX), Code::Upload(contract.to_vec()), // Constructors are not yet using Solidity encoding [blake_selector("new"), ("Name", "SYMBOL", minimum_value, 10u8).encode()].concat(), @@ -301,12 +301,18 @@ mod tests { contract: H160, data: Vec, ) -> T { - let result = - Revive::bare_call(origin, contract, 0, Weight::MAX, DepositLimit::Unchecked, data) - .result - .unwrap(); + let result = Revive::bare_call( + origin, + contract, + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + data, + ) + .result + .unwrap(); assert!(!result.did_revert()); - T::abi_decode(&result.data, true).unwrap() + T::abi_decode(&result.data).unwrap() } } From f658aee4a23b4f1155b035989a6622de076bdbba Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 23:43:55 +0100 Subject: [PATCH 081/284] refactor(api): import soltype --- pallets/api-vnext/src/lib.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index e328feef6..3b9efe32f 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -24,7 +24,10 @@ use { sp_runtime::traits::Bounded, }, frame_system::pallet_prelude::OriginFor, - pallet_revive::{precompiles::alloy::sol_types::SolValue, BalanceOf, DepositLimit, MomentOf}, + pallet_revive::{ + precompiles::alloy::sol_types::{SolType, SolValue}, + BalanceOf, DepositLimit, MomentOf, + }, }; #[cfg(feature = "fungibles")] @@ -83,12 +86,7 @@ fn call_precompile< } #[cfg(test)] -fn decode< - T: SolValue - + From<::RustType>, ->( - data: &[u8], -) -> T { +fn decode::RustType>>(data: &[u8]) -> T { T::abi_decode(data).expect("unable to decode") } From b63cdf328b02ff1b768625894d054ddf9f23b025 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 23:44:38 +0100 Subject: [PATCH 082/284] refactor(api): correct fungibles trait parameter names --- pop-api-vnext/src/fungibles/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index 0bea36445..eaa04d5ed 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -130,7 +130,7 @@ pub trait Fungibles { /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] - fn burn(&self, token: TokenId, address: Address, value: U256); + fn burn(&self, token: TokenId, account: Address, value: U256); /// Total token supply for a specified token. /// @@ -222,10 +222,10 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro /// - `token` - The token. /// - `owner` - The owner of the token. #[inline] -pub fn balance_of(token: TokenId, account: Address) -> U256 { +pub fn balance_of(token: TokenId, owner: Address) -> U256 { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - precompile.balanceOf(token, account) + precompile.balanceOf(token, owner) } /// Destroys `value` amount of tokens from `account`, reducing the total supply. From d96fbddedda708d583b6450e0f278c69c4cfa2b0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 18 Jun 2025 23:45:02 +0100 Subject: [PATCH 083/284] refactor(devnet): simplify selector implementations --- runtime/devnet/src/config/contracts.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index b51c5a518..c7d42eb7b 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -317,13 +317,11 @@ mod tests { } fn blake_selector(name: &str) -> Vec { - let hash = sp_io::hashing::blake2_256(name.as_bytes()); - [hash[0..4].to_vec()].concat() + sp_io::hashing::blake2_256(name.as_bytes())[0..4].to_vec() } fn keccak_selector(name: &str) -> Vec { - let hash = sp_io::hashing::keccak_256(name.as_bytes()); - [hash[0..4].to_vec()].concat() + sp_io::hashing::keccak_256(name.as_bytes())[0..4].to_vec() } #[test] From a65437660ff2de4293ab20d67915000184a38e8a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 09:58:31 +0100 Subject: [PATCH 084/284] test(api): add initial integration tests --- Cargo.toml | 1 + pop-api-vnext/integration-tests/Cargo.toml | 47 ++ pop-api-vnext/integration-tests/build.rs | 58 +++ .../contracts/fungibles/Cargo.toml | 29 ++ .../contracts/fungibles/lib.rs | 134 +++++ .../integration-tests/src/fungibles.rs | 479 ++++++++++++++++++ pop-api-vnext/integration-tests/src/lib.rs | 145 ++++++ 7 files changed, 893 insertions(+) create mode 100644 pop-api-vnext/integration-tests/Cargo.toml create mode 100644 pop-api-vnext/integration-tests/build.rs create mode 100644 pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml create mode 100644 pop-api-vnext/integration-tests/contracts/fungibles/lib.rs create mode 100644 pop-api-vnext/integration-tests/src/fungibles.rs create mode 100644 pop-api-vnext/integration-tests/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index ac664726e..3e445da86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,7 @@ members = [ "integration-tests", "node", "pallets/*", + "pop-api-vnext/integration-tests", "pop-api/integration-tests", "primitives", "runtime/devnet", diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml new file mode 100644 index 000000000..d57908d9c --- /dev/null +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -0,0 +1,47 @@ +[package] +build = "build.rs" +edition = "2021" +name = "pop-api-vnext-integration-tests" +version = "0.1.0" + +[build-dependencies] +contract-build = { git = "https://github.com/use-ink/cargo-contract" } + +[dev-dependencies] +codec.workspace = true +env_logger.workspace = true +frame-support = { workspace = true, default-features = false } +frame-system = { workspace = true, default-features = false } +log.workspace = true +pallet-assets = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-revive = { workspace = true, default-features = false } +pop-api = { path = "../../pop-api", default-features = false, features = [ + "fungibles", + "messaging", + "nonfungibles", +] } +pop-primitives = { workspace = true, default-features = false } +pop-runtime-devnet.workspace = true +pop-runtime-testnet.workspace = true +sp-io = { workspace = true, default-features = false } +sp-runtime = { workspace = true, default-features = false } + +[features] +default = [ "devnet", "std" ] +devnet = [ "pop-runtime-devnet/default" ] +std = [ + "codec/std", + "frame-support/std", + "frame-system/std", + "pallet-assets/std", + "pallet-balances/std", + "pallet-revive/std", + "pop-api/std", + "pop-primitives/std", + "pop-runtime-devnet/std", + "pop-runtime-testnet/std", + "sp-io/std", + "sp-runtime/std", +] +testnet = [ "pop-runtime-testnet/default" ] diff --git a/pop-api-vnext/integration-tests/build.rs b/pop-api-vnext/integration-tests/build.rs new file mode 100644 index 000000000..21334ac20 --- /dev/null +++ b/pop-api-vnext/integration-tests/build.rs @@ -0,0 +1,58 @@ +use std::{ + fs, + path::{Path, PathBuf}, + process, +}; + +use contract_build::{ + execute, BuildArtifacts, BuildMode, BuildResult, ExecuteArgs, ManifestPath, OutputType, + Verbosity, +}; + +fn main() { + let contracts_dir = PathBuf::from("./contracts/"); + let contract_dirs = match get_subcontract_directories(&contracts_dir) { + Ok(dirs) => dirs, + Err(e) => { + eprintln!("Failed to read contracts directory: {}", e); + process::exit(1); + }, + }; + + for contract in contract_dirs { + if let Err(e) = build_contract(&contract) { + eprintln!("Failed to build contract {}: {}", contract.display(), e); + process::exit(1); + } + } +} + +// Function to retrieve all subdirectories in a given directory. +fn get_subcontract_directories(contracts_dir: &Path) -> Result, String> { + fs::read_dir(contracts_dir) + .map_err(|e| format!("Could not read directory '{}': {}", contracts_dir.display(), e))? + .filter_map(|entry| match entry { + Ok(entry) if entry.path().is_dir() => Some(Ok(entry.path())), + Ok(_) => None, + Err(e) => Some(Err(format!("Error reading directory entry: {}", e))), + }) + .collect() +} + +// Function to build a contract given its directory. +fn build_contract(contract_dir: &Path) -> Result { + let manifest_path = ManifestPath::new(contract_dir.join("Cargo.toml")).map_err(|e| { + format!("Could not retrieve manifest path for {}: {}", contract_dir.display(), e) + })?; + + let args = ExecuteArgs { + build_artifact: BuildArtifacts::CodeOnly, + build_mode: BuildMode::Debug, + manifest_path, + output_type: OutputType::HumanReadable, + verbosity: Verbosity::Default, + ..Default::default() + }; + + execute(args).map_err(|e| format!("Build failed for {}: {}", contract_dir.display(), e)) +} diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml new file mode 100644 index 000000000..da78763da --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -0,0 +1,29 @@ +[package] +authors = [ "R0GUE " ] +edition = "2021" +name = "fungibles" +version = "0.1.0" + +[package.metadata.ink-lang] +abi = "sol" + +[workspace] + +[dependencies] +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } + +[dev-dependencies] +scale-info = { version = "2" } + +[lib] +path = "lib.rs" + +[features] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] + +[lints.rust.unexpected_cfgs] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +level = "warn" diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs new file mode 100644 index 000000000..3f957f129 --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -0,0 +1,134 @@ +#![cfg_attr(not(feature = "std"), no_std, no_main)] + +use ink::{prelude::string::String, U256}; +use pop_api::fungibles::{self as api, Fungibles, TokenId}; + +#[ink::contract] +pub mod fungibles { + + use pop_api::revert; + + use super::*; + + #[ink(storage)] + pub struct Fungible; + + impl Fungible { + #[ink(constructor, payable)] + #[allow(clippy::new_without_default)] + pub fn new() -> Self { + Self {} + } + } + + impl Fungibles for Fungible { + #[ink(message)] + fn transfer(&self, token: TokenId, to: Address, value: U256) { + if let Err(error) = api::transfer(token, to, value) { + revert(&error) + } + } + + #[ink(message)] + fn transferFrom(&self, token: TokenId, from: Address, to: Address, value: U256) { + if let Err(error) = api::transfer_from(token, from, to, value) { + revert(&error) + } + } + + #[ink(message)] + fn approve(&self, token: TokenId, spender: Address, value: U256) { + if let Err(error) = api::approve(token, spender, value) { + revert(&error) + } + } + + #[ink(message)] + fn increaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256 { + match api::increase_allowance(token, spender, value) { + Ok(allowance) => allowance, + Err(error) => revert(&error), + } + } + + #[ink(message)] + fn decreaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256 { + match api::decrease_allowance(token, spender, value) { + Ok(allowance) => allowance, + Err(error) => revert(&error), + } + } + + #[ink(message)] + fn create(&self, admin: Address, min_balance: U256) -> TokenId { + match api::create(admin, min_balance) { + Ok(token) => token, + Err(error) => revert(&error), + } + } + + #[ink(message)] + fn startDestroy(&self, token: TokenId) { + api::start_destroy(token); + } + + #[ink(message)] + fn setMetadata(&self, token: TokenId, name: String, symbol: String, decimals: u8) { + api::set_metadata(token, name, symbol, decimals); + } + + #[ink(message)] + fn clearMetadata(&self, token: TokenId) { + api::clear_metadata(token); + } + + #[ink(message)] + fn mint(&self, token: TokenId, account: Address, value: U256) { + if let Err(error) = api::mint(token, account, value) { + revert(&error) + } + } + + #[ink(message)] + fn burn(&self, token: TokenId, account: Address, value: U256) { + if let Err(error) = api::burn(token, account, value) { + revert(&error) + } + } + + #[ink(message)] + fn totalSupply(&self, token: TokenId) -> U256 { + api::total_supply(token) + } + + #[ink(message)] + fn balanceOf(&self, token: TokenId, owner: Address) -> U256 { + api::balance_of(token, owner) + } + + #[ink(message)] + fn allowance(&self, token: TokenId, owner: Address, spender: Address) -> U256 { + api::allowance(token, owner, spender) + } + + #[ink(message)] + fn name(&self, token: TokenId) -> String { + api::name(token) + } + + #[ink(message)] + fn symbol(&self, token: TokenId) -> String { + api::symbol(token) + } + + #[ink(message)] + fn decimals(&self, token: TokenId) -> u8 { + api::decimals(token) + } + + #[ink(message)] + fn exists(&self, token: TokenId) -> bool { + api::exists(token) + } + } +} diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs new file mode 100644 index 000000000..9768b8571 --- /dev/null +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -0,0 +1,479 @@ +use frame_support::traits::fungibles::{ + approvals::Inspect as _, metadata::Inspect as _, Inspect as _, +}; +use pop_primitives::TokenId; + +use super::*; + +const CONTRACT: &str = "contracts/fungibles/target/ink/fungibles.polkavm"; + +#[test] +fn total_supply_works() { + let token = 1; + let endowment = 100; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, BOB, endowment)]) + .build() + .execute_with(|| { + let contract = Contract::new(); + + // Tokens in circulation. + assert_eq!(contract.total_supply(token), Assets::total_supply(token).into()); + assert_eq!(contract.total_supply(token), endowment.into()); + + // No tokens in circulation. + let token = TokenId::MAX; + assert_eq!(contract.total_supply(token), Assets::total_supply(token).into()); + assert_eq!(contract.total_supply(token), 0.into()); + }); +} + +#[test] +fn balance_of_works() { + let token = 1; + let owner = BOB; + let endowment = 100; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, owner.clone(), endowment)]) + .build() + .execute_with(|| { + let contract = Contract::new(); + + // Tokens in circulation. + assert_eq!( + contract.balance_of(token, to_address(&owner)), + Assets::balance(token, &owner).into() + ); + assert_eq!(contract.balance_of(token, to_address(&owner)), endowment.into()); + + // No tokens in circulation. + let token = TokenId::MAX; + assert_eq!( + contract.balance_of(token, to_address(&owner)), + Assets::balance(token, &owner).into() + ); + assert_eq!(contract.balance_of(token, to_address(&owner)), 0.into()); + }); +} + +#[test] +fn allowance_works() { + let token = 1; + let owner = BOB; + let spender = ALICE; + let allowance = 50; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(); + + // Tokens in circulation. + approve(&owner, token, &spender, allowance); + assert_eq!( + contract.allowance(token, to_address(&owner), to_address(&spender)), + Assets::allowance(token, &owner, &spender).into() + ); + assert_eq!( + contract.allowance(token, to_address(&owner), to_address(&spender)), + allowance.into() + ); + + // No tokens in circulation. + let token = TokenId::MAX; + assert_eq!( + contract.allowance(token, to_address(&owner), to_address(&spender)), + Assets::allowance(token, &owner, &spender).into() + ); + assert_eq!( + contract.allowance(token, to_address(&owner), to_address(&spender)), + 0.into() + ); + }); +} + +#[test] +#[ignore] +fn transfer_works() { + todo!() +} + +#[test] +#[ignore] +fn transfer_from_works() { + todo!() +} + +#[test] +#[ignore] +fn approve_works() { + todo!() +} + +#[test] +#[ignore] +fn increase_allowance_works() { + todo!() +} + +#[test] +#[ignore] +fn decrease_allowance_works() { + todo!() +} + +#[test] +fn metadata_works() { + let token = 1; + let name = "name".to_string(); + let symbol = "symbol".to_string(); + let decimals: u8 = 69; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_metadata(vec![( + token, + name.as_bytes().to_vec(), + symbol.as_bytes().to_vec(), + decimals, + )]) + .build() + .execute_with(|| { + let contract = Contract::new(); + + // Existing token. + assert_eq!(contract.name(token).as_bytes(), Assets::name(token).as_slice()); + assert_eq!(contract.name(token), name); + assert_eq!(contract.symbol(token).as_bytes(), Assets::symbol(token).as_slice()); + assert_eq!(contract.symbol(token), symbol); + assert_eq!(contract.decimals(token), Assets::decimals(token)); + assert_eq!(contract.decimals(token), decimals); + + // Token does not exist. + let token = TokenId::MAX; + assert_eq!(contract.name(token), String::default()); + assert_eq!(contract.symbol(token), String::default()); + assert_eq!(contract.decimals(token), 0); + }); +} + +#[test] +#[ignore] +fn create_works() { + todo!() +} + +// Testing a contract that creates a token in the constructor. +#[test] +#[ignore] +fn instantiate_and_create_fungible_works() { + todo!() +} + +#[test] +#[ignore] +fn start_destroy_works() { + todo!() +} + +#[test] +#[ignore] +fn set_metadata_works() { + todo!() +} + +#[test] +#[ignore] +fn clear_metadata_works() { + todo!() +} + +#[test] +fn exists_works() { + let token = 1; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .build() + .execute_with(|| { + let contract = Contract::new(); + + // Tokens in circulation. + assert_eq!(contract.exists(token), Assets::asset_exists(token)); + + // No tokens in circulation. + let token = TokenId::MAX; + assert_eq!(contract.exists(token), Assets::asset_exists(token)); + }); +} + +#[test] +#[ignore] +fn mint_works() { + todo!() +} + +#[test] +#[ignore] +fn burn_works() { + todo!() +} + +// A simple, strongly typed wrapper for the contract. +struct Contract { + address: H160, +} + +impl Contract { + // Create a new instance of the contract through on-chain instantiation. + fn new() -> Self { + let address = instantiate(CONTRACT, 0, None); + Self { address: address.clone() } + } + + fn allowance(&self, token: TokenId, owner: H160, spender: H160) -> U256 { + let owner = alloy::Address::from(owner.0); + let spender = alloy::Address::from(spender.0); + U256::from_little_endian( + self.call::( + ALICE, + keccak_selector("allowance(uint32,address,address)"), + (token, owner, spender).abi_encode(), + 0, + ) + .unwrap() + .as_le_slice(), + ) + } + + fn approve(&mut self, origin: &AccountId, token: TokenId, spender: H160, value: U256) { + let spender = alloy::Address::from(spender.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("approve(uint32,address,uint256)"), + (token, spender, value).abi_encode(), + 0, + ) + .unwrap() + } + + fn balance_of(&self, token: TokenId, owner: H160) -> U256 { + let owner = alloy::Address::from(owner.0); + U256::from_little_endian( + self.call::( + ALICE, + keccak_selector("balanceOf(uint32,address)"), + (token, owner).abi_encode(), + 0, + ) + .unwrap() + .as_le_slice(), + ) + } + + fn burn(&mut self, origin: &AccountId, token: TokenId, account: H160, value: U256) { + let account = alloy::Address::from(account.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("burn(uint32,address,uint256)"), + (token, account, value).abi_encode(), + 0, + ) + .unwrap() + } + + fn clear_metadata(&mut self, origin: &AccountId, token: TokenId) { + self.call( + origin.clone(), + keccak_selector("clearMetadata(uint32)"), + (token,).abi_encode(), + 0, + ) + .unwrap() + } + + fn create(&mut self, origin: &AccountId, admin: H160, min_balance: U256) -> TokenId { + let admin = alloy::Address::from(admin.0); + let min_balance = alloy::U256::from_be_bytes(min_balance.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("create(address,uint256)"), + (admin, min_balance).abi_encode(), + 0, + ) + .unwrap() + } + + fn decimals(&self, token: TokenId) -> u8 { + self.call::(ALICE, keccak_selector("decimals(uint32)"), (token,).abi_encode(), 0) + .unwrap() as u8 + } + + fn decrease_allowance( + &mut self, + origin: &AccountId, + token: TokenId, + spender: H160, + value: U256, + ) -> U256 { + let spender = alloy::Address::from(spender.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + U256::from_little_endian( + self.call::( + origin.clone(), + keccak_selector("decreaseAllowance(uint32,address,uint256)"), + (token, spender, value).abi_encode(), + 0, + ) + .unwrap() + .as_le_slice(), + ) + } + + fn exists(&self, token: TokenId) -> bool { + self.call(ALICE, keccak_selector("exists(uint32)"), (token,).abi_encode(), 0) + .unwrap() + } + + fn increase_allowance( + &mut self, + origin: &AccountId, + token: TokenId, + spender: H160, + value: U256, + ) -> U256 { + let spender = alloy::Address::from(spender.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + U256::from_little_endian( + self.call::( + origin.clone(), + keccak_selector("increaseAllowance(uint32,address,uint256)"), + (token, spender, value).abi_encode(), + 0, + ) + .unwrap() + .as_le_slice(), + ) + } + + fn mint(&mut self, origin: &AccountId, token: TokenId, account: H160, value: U256) { + let account = alloy::Address::from(account.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("mint(uint32,address,uint256)"), + (token, account, value).abi_encode(), + 0, + ) + .unwrap() + } + + fn name(&self, token: TokenId) -> String { + self.call(ALICE, keccak_selector("name(uint32)"), (token,).abi_encode(), 0) + .unwrap() + } + + fn set_metadata( + &mut self, + origin: &AccountId, + token: TokenId, + name: String, + symbol: String, + decimals: u8, + ) { + self.call( + origin.clone(), + keccak_selector("setMetadata(uint32,string,string,uint8)"), + (token, name, symbol, decimals as u16).abi_encode(), + 0, + ) + .unwrap() + } + + fn start_destroy(&mut self, origin: &AccountId, token: TokenId) { + self.call(origin.clone(), keccak_selector("startDestroy(uint32)"), (token,).abi_encode(), 0) + .unwrap() + } + + fn symbol(&self, token: TokenId) -> String { + self.call(ALICE, keccak_selector("symbol(uint32)"), (token,).abi_encode(), 0) + .unwrap() + } + + fn total_supply(&self, token: TokenId) -> U256 { + U256::from_little_endian( + self.call::( + ALICE, + keccak_selector("totalSupply(uint32)"), + (token,).abi_encode(), + 0, + ) + .unwrap() + .as_le_slice(), + ) + } + + fn transfer(&mut self, origin: &AccountId, token: TokenId, to: H160, value: U256) { + let to = alloy::Address::from(to.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("transfer(uint32,address,uint256)"), + (token, to, value).abi_encode(), + 0, + ) + .unwrap() + } + + fn transfer_from( + &mut self, + origin: &AccountId, + token: TokenId, + from: H160, + to: H160, + value: U256, + ) { + let from = alloy::Address::from(from.0); + let to = alloy::Address::from(to.0); + let value = alloy::U256::from_be_bytes(value.to_big_endian()); + self.call( + origin.clone(), + keccak_selector("transferFrom(uint32,address,address,uint256)"), + (token, from, to, value).abi_encode(), + 0, + ) + .unwrap() + } + + fn call::RustType>>( + &self, + origin: AccountId, + selector: [u8; 4], + params: Vec, + value: Balance, + ) -> Result { + let origin = RuntimeOrigin::signed(origin); + let dest = self.address.clone(); + let data = [selector.as_slice(), params.as_slice()].concat(); + let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) + .expect("should work"); + match result.did_revert() { + true => { + println!("{:?}", result.data); + todo!("error conversion") + }, + false => Ok(decode::(&result.data)), + } + } +} + +fn approve(origin: &AccountId, id: TokenId, delegate: &AccountId, amount: Balance) { + assert_ok!(Assets::approve_transfer( + RuntimeOrigin::signed(origin.clone()), + id.into(), + delegate.clone().into(), + amount, + )); +} diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs new file mode 100644 index 000000000..86ef636dc --- /dev/null +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -0,0 +1,145 @@ +#![cfg(test)] + +use std::path::Path; + +use frame_support::{assert_ok, weights::Weight}; +use pallet_assets::{Instance1, NextAssetId}; +use pallet_revive::{ + precompiles::alloy::{ + primitives as alloy, + sol_types::{SolType, SolValue}, + }, + test_utils::{ALICE, BOB}, + AccountId32Mapper, AddressMapper, Code, DepositLimit, ExecReturnValue, H160, U256, +}; +#[cfg(feature = "devnet")] +use pop_runtime_devnet::{ + AccountId, Assets, Balance, Revive, Runtime, RuntimeOrigin, System, UNIT, +}; +use sp_runtime::{BuildStorage, DispatchError}; + +mod fungibles; + +const GAS_LIMIT: Weight = Weight::from_parts(500_000_000_000, 3 * 1024 * 1024); +const INIT_AMOUNT: Balance = 100_000_000 * UNIT; +const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(Balance::MAX); + +type AssetId = u32; + +fn bare_call( + origin: RuntimeOrigin, + dest: H160, + value: Balance, + gas_limit: Weight, + storage_deposit_limit: DepositLimit, + data: Vec, +) -> Result { + let result = Revive::bare_call(origin, dest, value, gas_limit, storage_deposit_limit, data); + log::info!("contract exec result={result:?}"); + result.result +} + +fn blake_selector(input: &str) -> [u8; 4] { + sp_io::hashing::blake2_256(input.as_bytes())[0..4] + .try_into() + .expect("hash length > 4") +} + +fn decode::RustType>>(data: &[u8]) -> T { + T::abi_decode(data).expect("unable to decode") +} + +// Deploy, instantiate and return contract address. +fn instantiate(contract: impl AsRef, value: u128, salt: Option<[u8; 32]>) -> H160 { + let binary = std::fs::read(contract).expect("could not read .wasm file"); + + let result = Revive::bare_instantiate( + RuntimeOrigin::signed(ALICE), + value, + GAS_LIMIT, + DepositLimit::Balance(Balance::MAX), + Code::Upload(binary), + blake_selector("new").to_vec(), + salt, + ) + .result + .unwrap(); + assert!(!result.result.did_revert(), "deploying contract reverted {:?}", result); + result.addr +} + +fn keccak_selector(input: &str) -> [u8; 4] { + sp_io::hashing::keccak_256(input.as_bytes())[0..4] + .try_into() + .expect("hash length > 4") +} + +fn to_address(account: &AccountId) -> H160 { + AccountId32Mapper::::to_address(account) +} + +pub(crate) struct ExtBuilder { + assets: Option>, + asset_accounts: Option>, + asset_metadata: Option, Vec, u8)>>, +} + +impl ExtBuilder { + pub(crate) fn new() -> Self { + Self { assets: None, asset_accounts: None, asset_metadata: None } + } + + pub(crate) fn with_assets(mut self, assets: Vec<(AssetId, AccountId, bool, Balance)>) -> Self { + self.assets = Some(assets); + self + } + + pub(crate) fn with_asset_balances( + mut self, + accounts: Vec<(AssetId, AccountId, Balance)>, + ) -> Self { + self.asset_accounts = Some(accounts); + self + } + + pub(crate) fn with_asset_metadata( + mut self, + metadata: Vec<(AssetId, Vec, Vec, u8)>, + ) -> Self { + self.asset_metadata = Some(metadata); + self + } + + pub(crate) fn build(mut self) -> sp_io::TestExternalities { + let _ = env_logger::try_init(); + + let mut t = frame_system::GenesisConfig::::default() + .build_storage() + .expect("Frame system builds valid default genesis config"); + + pallet_balances::GenesisConfig:: { + // FERDIE has no initial balance. + balances: vec![(ALICE, INIT_AMOUNT), (BOB, INIT_AMOUNT)], + ..Default::default() + } + .assimilate_storage(&mut t) + .expect("Pallet balances storage can be assimilated"); + + pallet_assets::GenesisConfig:: { + assets: self.assets.take().unwrap_or_default(), + metadata: self.asset_metadata.take().unwrap_or_default(), + accounts: self.asset_accounts.take().unwrap_or_default(), + next_asset_id: Some(0), + } + .assimilate_storage(&mut t) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| { + System::set_block_number(1); + NextAssetId::::put(1); + }); + + ext + } +} From 7bedff4364319e50f9cec19d66e5fa5b71166fa3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 10:01:39 +0100 Subject: [PATCH 085/284] ci: add job for pop-api-vnext integration tests --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf54f692d..8c09e6a3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: ci on: push: - branches: [ main ] + branches: [main] pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] + types: [opened, synchronize, reopened, ready_for_review] concurrency: # Cancel any in-progress jobs for the same pull request @@ -150,6 +150,17 @@ jobs: - name: Run API integration tests run: cargo test -p pop-api-integration-tests --release --locked --features "${{ matrix.features }}" + api-vnext-integration-tests: + needs: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: "./.github/actions/init" + + - name: Run API integration tests + run: cargo test -p pop-api-vnext-integration-tests --release --locked + api-tests: runs-on: ubuntu-latest steps: From ab7effcd210804eb72240eba6aca3d7ae52fdb67 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 12:46:25 +0100 Subject: [PATCH 086/284] test(api): minimal implementation of transfer test Solidity error handling still unsupported. --- pop-api-vnext/integration-tests/Cargo.toml | 9 +- .../contracts/fungibles/lib.rs | 5 +- .../integration-tests/src/fungibles.rs | 89 +++++++++++++++++-- pop-api-vnext/integration-tests/src/lib.rs | 24 ++++- 4 files changed, 115 insertions(+), 12 deletions(-) diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index d57908d9c..514c7aed0 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -4,6 +4,9 @@ edition = "2021" name = "pop-api-vnext-integration-tests" version = "0.1.0" +[package.metadata.ink-lang] +abi = "sol" + [build-dependencies] contract-build = { git = "https://github.com/use-ink/cargo-contract" } @@ -16,11 +19,7 @@ log.workspace = true pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } -pop-api = { path = "../../pop-api", default-features = false, features = [ - "fungibles", - "messaging", - "nonfungibles", -] } +pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } pop-primitives = { workspace = true, default-features = false } pop-runtime-devnet.workspace = true pop-runtime-testnet.workspace = true diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 3f957f129..1bf475219 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::{prelude::string::String, U256}; -use pop_api::fungibles::{self as api, Fungibles, TokenId}; +use pop_api::fungibles::{self as api, Approval, Fungibles, TokenId, Transfer}; #[ink::contract] pub mod fungibles { @@ -27,6 +27,7 @@ pub mod fungibles { if let Err(error) = api::transfer(token, to, value) { revert(&error) } + self.env().emit_event(Transfer { from: self.env().address(), to, value }); } #[ink(message)] @@ -34,6 +35,7 @@ pub mod fungibles { if let Err(error) = api::transfer_from(token, from, to, value) { revert(&error) } + self.env().emit_event(Transfer { from, to, value }); } #[ink(message)] @@ -41,6 +43,7 @@ pub mod fungibles { if let Err(error) = api::approve(token, spender, value) { revert(&error) } + self.env().emit_event(Approval { owner: self.env().address(), spender, value }); } #[ink(message)] diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 9768b8571..47abc0580 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -1,6 +1,8 @@ -use frame_support::traits::fungibles::{ - approvals::Inspect as _, metadata::Inspect as _, Inspect as _, +use frame_support::{ + pallet_prelude::Encode, + traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _, Inspect as _}, }; +use pop_api::fungibles::Transfer; use pop_primitives::TokenId; use super::*; @@ -68,7 +70,7 @@ fn allowance_works() { .with_assets(vec![(token, ALICE, false, 1)]) .build() .execute_with(|| { - let mut contract = Contract::new(); + let contract = Contract::new(); // Tokens in circulation. approve(&owner, token, &spender, allowance); @@ -95,9 +97,61 @@ fn allowance_works() { } #[test] -#[ignore] fn transfer_works() { - todo!() + let token = 1; + let owner = ALICE; + let amount: Balance = 100 * UNIT; + let to = BOB; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(); + + // Token does not exist. + // assert_eq!(transfer(&addr, 1, BOB, amount), Err(Module { index: 52, error: [3, 0] + // })); + // Mint `amount` to contract address. + mint(&owner, token, &to_account_id(&contract.address), amount); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // transfer(&addr, token, BOB, amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + thaw(&owner, token); + // Not enough balance. + // assert_eq!( + // transfer(&addr, token, BOB, amount + 1 * UNIT), + // Err(Module { index: 52, error: [0, 0] }) + // ); + // Not enough balance due to ED. + // assert_eq!( + // transfer(&addr, token, BOB, amount), + // Err(Module { index: 52, error: [0, 0] }) + // ); + // Successful transfer. + let balance_before_transfer = Assets::balance(token, &BOB); + contract.transfer(&owner, token, to_address(&to), (amount / 2).into()); + let balance_after_transfer = Assets::balance(token, &BOB); + assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); + // Successfully emit event. + let from = contract.address; + let to = to_address(&to); + let expected = Transfer { from, to, value: (amount / 2).into() }.encode(); + assert_eq!(contract.last_event(), expected); + // Transfer token to account that does not exist. + // assert_eq!( + // contract.transfer(&owner, token, to_address(&CHARLIE), (amount / 4).into()), + // Err(Token(CannotCreate)) + // ); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&ALICE, token); + // assert_eq!( + // contract.transfer(&addr, token, BOB, amount / 4), + // Err(Module { index: 52, error: [16, 0] }) + // ); + }); } #[test] @@ -467,6 +521,10 @@ impl Contract { false => Ok(decode::(&result.data)), } } + + fn last_event(&self) -> Vec { + last_contract_event(&self.address) + } } fn approve(origin: &AccountId, id: TokenId, delegate: &AccountId, amount: Balance) { @@ -477,3 +535,24 @@ fn approve(origin: &AccountId, id: TokenId, delegate: &AccountId, amount: Balanc amount, )); } + +fn freeze(origin: &AccountId, id: TokenId) { + assert_ok!(Assets::freeze_asset(RuntimeOrigin::signed(origin.clone()), id.into())); +} + +fn mint(origin: &AccountId, id: TokenId, beneficiary: &AccountId, amount: Balance) { + assert_ok!(Assets::mint( + RuntimeOrigin::signed(origin.clone()), + id.into(), + beneficiary.clone().into(), + amount, + )); +} + +fn start_destroy(origin: &AccountId, id: TokenId) { + assert_ok!(Assets::start_destroy(RuntimeOrigin::signed(origin.clone()), id.into())); +} + +fn thaw(origin: &AccountId, id: TokenId) { + assert_ok!(Assets::thaw_asset(RuntimeOrigin::signed(origin.clone()), id.into())); +} diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index 86ef636dc..fac478ec4 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -26,6 +26,24 @@ const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(Balan type AssetId = u32; +// Get the last event from `pallet-revive`. +fn last_contract_event(address: &H160) -> Vec { + let events = System::read_events_for_pallet::>(); + let contract_events = events + .iter() + .filter_map(|event| match event { + pallet_revive::Event::::ContractEmitted { contract, data, .. } + if contract == address => + Some(data.as_slice()), + _ => None, + }) + .collect::>(); + contract_events + .last() + .expect("expected an event for the specified contract") + .to_vec() +} + fn bare_call( origin: RuntimeOrigin, dest: H160, @@ -74,6 +92,10 @@ fn keccak_selector(input: &str) -> [u8; 4] { .expect("hash length > 4") } +fn to_account_id(address: &H160) -> AccountId { + AccountId32Mapper::::to_account_id(address) +} + fn to_address(account: &AccountId) -> H160 { AccountId32Mapper::::to_address(account) } @@ -118,7 +140,7 @@ impl ExtBuilder { .expect("Frame system builds valid default genesis config"); pallet_balances::GenesisConfig:: { - // FERDIE has no initial balance. + // CHARLIE has no initial balance. balances: vec![(ALICE, INIT_AMOUNT), (BOB, INIT_AMOUNT)], ..Default::default() } From ff060108e2c70a2d6a3b5231118108b486db505f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 12:48:14 +0100 Subject: [PATCH 087/284] ci: set rustflags for pop-api-vnext integration tests --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c09e6a3b..de3ad7df2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,6 +153,8 @@ jobs: api-vnext-integration-tests: needs: lint runs-on: ubuntu-latest + env: + RUSTFLAGS: '--cfg ink_abi="sol"' steps: - uses: actions/checkout@v4 From 6ad029db3de3c47f47d51696bc28d1c7877c7423 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 12:52:15 +0100 Subject: [PATCH 088/284] test(runtime): disable precompiles with contract test Disabled until it can be replaced completely by integration tests. --- runtime/devnet/src/config/contracts.rs | 184 ++++++++++++------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index c7d42eb7b..87083aab5 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -223,98 +223,98 @@ mod tests { }) } - #[test] - fn fungibles_precompiles_via_contract_works() { - let contract = include_bytes!( - "../../../../pop-api-vnext/examples/fungibles/target/ink/fungibles.polkavm" - ); - let caller = Alice.to_account_id(); - let origin = RuntimeOrigin::signed(caller.clone()); - let recipient = Bob.to_account_id(); - let recipient_addr = primitives::Address::new(AccountId32Mapper::to_address(&recipient).0); - let minimum_value = U256::from(1); - let endowment = primitives::U256::from(10_000); - new_test_ext().execute_with(|| { - assert_ok!(Revive::map_account(origin.clone())); - assert_ok!(Revive::map_account(RuntimeOrigin::signed(recipient))); - - // Instantiate contract with some value, required to create underlying asset - let result = Revive::bare_instantiate( - origin.clone(), - 10 * UNIT, - Weight::MAX, - DepositLimit::Balance(u128::MAX), - Code::Upload(contract.to_vec()), - // Constructors are not yet using Solidity encoding - [blake_selector("new"), ("Name", "SYMBOL", minimum_value, 10u8).encode()].concat(), - None, - ) - .result - .unwrap(); - assert!(!result.result.did_revert()); - let contract = primitives::Address::new(result.addr.0); - - // Mint some tokens to the contract - call::<()>( - origin.clone(), - result.addr, - [keccak_selector("mint(address,uint256)"), (contract, endowment).abi_encode()] - .concat(), - ); - - // Interact with contract as Erc20 - let total_supply = call::( - origin.clone(), - result.addr, - keccak_selector("totalSupply()"), - ); - assert_eq!(total_supply, endowment); - - let balance_of = call::( - origin.clone(), - result.addr, - [keccak_selector("balanceOf(address)"), (contract,).abi_encode()].concat(), - ); - assert_eq!(balance_of, endowment); - - // Transfer tokens from contract to recipient - let value = endowment / primitives::U256::from(2); - assert!(call::( - origin.clone(), - result.addr, - [ - keccak_selector("transfer(address,uint256)"), - (recipient_addr, value).abi_encode(), - ] - .concat(), - )); - let balance_of = call::( - origin.clone(), - result.addr, - [keccak_selector("balanceOf(address)"), (recipient_addr,).abi_encode()].concat(), - ); - assert_eq!(balance_of, value); - }); - - fn call::RustType>>( - origin: OriginFor, - contract: H160, - data: Vec, - ) -> T { - let result = Revive::bare_call( - origin, - contract, - 0, - Weight::MAX, - DepositLimit::Balance(u128::MAX), - data, - ) - .result - .unwrap(); - assert!(!result.did_revert()); - T::abi_decode(&result.data).unwrap() - } - } + // #[test] + // fn fungibles_precompiles_via_contract_works() { + // let contract = include_bytes!( + // "../../../../pop-api-vnext/examples/fungibles/target/ink/fungibles.polkavm" + // ); + // let caller = Alice.to_account_id(); + // let origin = RuntimeOrigin::signed(caller.clone()); + // let recipient = Bob.to_account_id(); + // let recipient_addr = primitives::Address::new(AccountId32Mapper::to_address(&recipient).0); + // let minimum_value = U256::from(1); + // let endowment = primitives::U256::from(10_000); + // new_test_ext().execute_with(|| { + // assert_ok!(Revive::map_account(origin.clone())); + // assert_ok!(Revive::map_account(RuntimeOrigin::signed(recipient))); + + // // Instantiate contract with some value, required to create underlying asset + // let result = Revive::bare_instantiate( + // origin.clone(), + // 10 * UNIT, + // Weight::MAX, + // DepositLimit::Balance(u128::MAX), + // Code::Upload(contract.to_vec()), + // // Constructors are not yet using Solidity encoding + // [blake_selector("new"), ("Name", "SYMBOL", minimum_value, 10u8).encode()].concat(), + // None, + // ) + // .result + // .unwrap(); + // assert!(!result.result.did_revert()); + // let contract = primitives::Address::new(result.addr.0); + + // // Mint some tokens to the contract + // call::<()>( + // origin.clone(), + // result.addr, + // [keccak_selector("mint(address,uint256)"), (contract, endowment).abi_encode()] + // .concat(), + // ); + + // // Interact with contract as Erc20 + // let total_supply = call::( + // origin.clone(), + // result.addr, + // keccak_selector("totalSupply()"), + // ); + // assert_eq!(total_supply, endowment); + + // let balance_of = call::( + // origin.clone(), + // result.addr, + // [keccak_selector("balanceOf(address)"), (contract,).abi_encode()].concat(), + // ); + // assert_eq!(balance_of, endowment); + + // // Transfer tokens from contract to recipient + // let value = endowment / primitives::U256::from(2); + // assert!(call::( + // origin.clone(), + // result.addr, + // [ + // keccak_selector("transfer(address,uint256)"), + // (recipient_addr, value).abi_encode(), + // ] + // .concat(), + // )); + // let balance_of = call::( + // origin.clone(), + // result.addr, + // [keccak_selector("balanceOf(address)"), (recipient_addr,).abi_encode()].concat(), + // ); + // assert_eq!(balance_of, value); + // }); + + // fn call::RustType>>( + // origin: OriginFor, + // contract: H160, + // data: Vec, + // ) -> T { + // let result = Revive::bare_call( + // origin, + // contract, + // 0, + // Weight::MAX, + // DepositLimit::Balance(u128::MAX), + // data, + // ) + // .result + // .unwrap(); + // assert!(!result.did_revert()); + // T::abi_decode(&result.data).unwrap() + // } + // } fn blake_selector(name: &str) -> Vec { sp_io::hashing::blake2_256(name.as_bytes())[0..4].to_vec() From 7263db891d84beec2586584a20d92b471009d9e5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 13:13:29 +0100 Subject: [PATCH 089/284] test(api): add transfer_from test --- .../integration-tests/src/fungibles.rs | 56 ++++++++++++++++++- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 47abc0580..721cc59a0 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -146,7 +146,7 @@ fn transfer_works() { // Err(Token(CannotCreate)) // ); // Token is not live, i.e. frozen or being destroyed. - start_destroy(&ALICE, token); + start_destroy(&owner, token); // assert_eq!( // contract.transfer(&addr, token, BOB, amount / 4), // Err(Module { index: 52, error: [16, 0] }) @@ -155,9 +155,59 @@ fn transfer_works() { } #[test] -#[ignore] fn transfer_from_works() { - todo!() + let token = 1; + let owner = ALICE; + let amount: Balance = 100 * UNIT; + let to = BOB; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_balances(vec![(token, owner.clone(), amount)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(); + + // Token does not exist. + // assert_eq!( + // transfer_from(&addr, 1, ALICE, BOB, amount / 2), + // Err(Module { index: 52, error: [3, 0] }), + // ); + // Unapproved transfer. + // assert_eq!( + // transfer_from(&addr, token, ALICE, BOB, amount / 2), + // Err(Module { index: 52, error: [10, 0] }) + // ); + // Approve the contract to transfer on behalf of owner. + approve(&owner, token, &to_account_id(&contract.address), amount + 1 * UNIT); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // transfer_from(&addr, token, ALICE, BOB, amount), + // Err(Module { index: 52, error: [16, 0] }), + // ); + thaw(&owner, token); + // Not enough balance. + // assert_eq!( + // transfer_from(&addr, token, ALICE, BOB, amount + 1 * UNIT), + // Err(Module { index: 52, error: [0, 0] }), + // ); + // Successful transfer. + let balance_before_transfer = Assets::balance(token, &BOB); + contract.transfer_from( + &owner, + token, + to_address(&owner), + to_address(&to), + (amount / 2).into(), + ); + let balance_after_transfer = Assets::balance(token, &BOB); + assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); + // Successfully emit event. + let from = to_address(&owner); + let to = to_address(&to); + let expected = Transfer { from, to, value: (amount / 2).into() }.encode(); + assert_eq!(contract.last_event(), expected); + }); } #[test] From 498ca3ef667269c4bfcf3ea77f6e35798d5718c8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 13:50:42 +0100 Subject: [PATCH 090/284] ci: exclude pop-api-integration-tests from test and coverage jobs --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de3ad7df2..d7c60558b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,7 +113,7 @@ jobs: - uses: "./.github/actions/init" - name: Run tests - run: cargo test --release --locked --workspace --exclude integration-tests --exclude pop-api-integration-tests --features=runtime-benchmarks + run: cargo test --release --locked --workspace --exclude integration-tests --exclude pop-api-integration-tests --exclude pop-api-vnext-integration-tests --features=runtime-benchmarks integration-tests: needs: lint @@ -207,7 +207,7 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --features=runtime-benchmarks,try-runtime,ismp --workspace --exclude integration-tests --exclude pop-api-integration-tests --lib --bins --codecov --output-path codecov.json + run: cargo llvm-cov --features=runtime-benchmarks,try-runtime,ismp --workspace --exclude integration-tests --exclude pop-api-integration-tests --exclude pop-api-vnext-integration-tests --lib --bins --codecov --output-path codecov.json - name: Upload to codecov.io uses: codecov/codecov-action@v4 From af398374a21c51e116a765b37fa58aa8363eb09d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 14:06:24 +0100 Subject: [PATCH 091/284] test(api): add approve test --- .../integration-tests/src/fungibles.rs | 90 ++++++++++++++++--- pop-api-vnext/integration-tests/src/lib.rs | 3 +- 2 files changed, 79 insertions(+), 14 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 721cc59a0..ee7e84496 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -2,8 +2,9 @@ use frame_support::{ pallet_prelude::Encode, traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _, Inspect as _}, }; -use pop_api::fungibles::Transfer; +use pop_api::fungibles::{Approval, Transfer}; use pop_primitives::TokenId; +use sp_io::hashing::twox_256; use super::*; @@ -18,7 +19,7 @@ fn total_supply_works() { .with_asset_balances(vec![(token, BOB, endowment)]) .build() .execute_with(|| { - let contract = Contract::new(); + let contract = Contract::new(0); // Tokens in circulation. assert_eq!(contract.total_supply(token), Assets::total_supply(token).into()); @@ -41,7 +42,7 @@ fn balance_of_works() { .with_asset_balances(vec![(token, owner.clone(), endowment)]) .build() .execute_with(|| { - let contract = Contract::new(); + let contract = Contract::new(0); // Tokens in circulation. assert_eq!( @@ -70,7 +71,7 @@ fn allowance_works() { .with_assets(vec![(token, ALICE, false, 1)]) .build() .execute_with(|| { - let contract = Contract::new(); + let contract = Contract::new(0); // Tokens in circulation. approve(&owner, token, &spender, allowance); @@ -106,7 +107,7 @@ fn transfer_works() { .with_assets(vec![(token, owner.clone(), false, 1)]) .build() .execute_with(|| { - let mut contract = Contract::new(); + let mut contract = Contract::new(0); // Token does not exist. // assert_eq!(transfer(&addr, 1, BOB, amount), Err(Module { index: 52, error: [3, 0] @@ -165,7 +166,7 @@ fn transfer_from_works() { .with_asset_balances(vec![(token, owner.clone(), amount)]) .build() .execute_with(|| { - let mut contract = Contract::new(); + let mut contract = Contract::new(0); // Token does not exist. // assert_eq!( @@ -211,9 +212,71 @@ fn transfer_from_works() { } #[test] -#[ignore] fn approve_works() { - todo!() + let token = 1; + let owner = ALICE; + let amount: Balance = 100 * UNIT; + let delegate = BOB; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_balances(vec![(token, owner.clone(), amount)]) + .build() + .execute_with(|| { + let contract = Contract::new(0); + + // Token does not exist. + // assert_eq!(contract.approve(&addr, TokenId::MAX, &BOB, amount), Err(Module { index: + // 52, error: [3, 0] })); + // assert_eq!(contract.approve(&addr, token, &BOB, amount), Err(ConsumerRemaining)); + let mut contract = Contract::new(INIT_VALUE); + // Mint `amount` to contract address. + mint(&owner, token, &to_account_id(&contract.address), amount); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // contract.approve(&addr, token, &BOB, amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + thaw(&owner, token); + // Successful approvals. + assert_eq!(0, Assets::allowance(token, &to_account_id(&contract.address), &delegate)); + contract.approve( + &to_account_id(&contract.address), + token, + to_address(&delegate), + amount.into(), + ); + assert_eq!( + Assets::allowance(token, &to_account_id(&contract.address), &delegate), + amount + ); + // Successfully emit event. + let spender = to_address(&delegate); + let expected = + Approval { owner: contract.address, spender, value: amount.into() }.encode(); + assert_eq!(contract.last_event(), expected); + // Non-additive, sets new value. + contract.approve( + &to_account_id(&contract.address), + token, + spender, + (amount / 2).into(), + ); + assert_eq!( + Assets::allowance(token, &to_account_id(&contract.address), &delegate), + amount / 2 + ); + // Successfully emit event. + let expected = + Approval { owner: contract.address, spender, value: (amount / 2).into() }.encode(); + assert_eq!(contract.last_event(), expected); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&owner, token); + // assert_eq!( + // approve(&addr, token, &BOB, amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + }); } #[test] @@ -244,7 +307,7 @@ fn metadata_works() { )]) .build() .execute_with(|| { - let contract = Contract::new(); + let contract = Contract::new(0); // Existing token. assert_eq!(contract.name(token).as_bytes(), Assets::name(token).as_slice()); @@ -300,7 +363,7 @@ fn exists_works() { .with_assets(vec![(token, ALICE, false, 1)]) .build() .execute_with(|| { - let contract = Contract::new(); + let contract = Contract::new(0); // Tokens in circulation. assert_eq!(contract.exists(token), Assets::asset_exists(token)); @@ -330,9 +393,10 @@ struct Contract { impl Contract { // Create a new instance of the contract through on-chain instantiation. - fn new() -> Self { - let address = instantiate(CONTRACT, 0, None); - Self { address: address.clone() } + fn new(value: Balance) -> Self { + let salt = twox_256(&value.to_le_bytes()); + let address = instantiate(CONTRACT, value, Some(salt)); + Self { address } } fn allowance(&self, token: TokenId, owner: H160, spender: H160) -> U256 { diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index fac478ec4..9eeb2994e 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -22,6 +22,7 @@ mod fungibles; const GAS_LIMIT: Weight = Weight::from_parts(500_000_000_000, 3 * 1024 * 1024); const INIT_AMOUNT: Balance = 100_000_000 * UNIT; +const INIT_VALUE: Balance = 100 * UNIT; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(Balance::MAX); type AssetId = u32; @@ -68,7 +69,7 @@ fn decode::RustType>>(data: &[u8]) -> } // Deploy, instantiate and return contract address. -fn instantiate(contract: impl AsRef, value: u128, salt: Option<[u8; 32]>) -> H160 { +fn instantiate(contract: impl AsRef, value: Balance, salt: Option<[u8; 32]>) -> H160 { let binary = std::fs::read(contract).expect("could not read .wasm file"); let result = Revive::bare_instantiate( From 6cf1d435b6e392934498f8b409c3dc3ffe9608e6 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 14:09:25 +0100 Subject: [PATCH 092/284] test(api): add contract.account_id() helper --- .../integration-tests/src/fungibles.rs | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index ee7e84496..a81171632 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -113,7 +113,7 @@ fn transfer_works() { // assert_eq!(transfer(&addr, 1, BOB, amount), Err(Module { index: 52, error: [3, 0] // })); // Mint `amount` to contract address. - mint(&owner, token, &to_account_id(&contract.address), amount); + mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -179,7 +179,7 @@ fn transfer_from_works() { // Err(Module { index: 52, error: [10, 0] }) // ); // Approve the contract to transfer on behalf of owner. - approve(&owner, token, &to_account_id(&contract.address), amount + 1 * UNIT); + approve(&owner, token, &contract.account_id(), amount + 1 * UNIT); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -230,7 +230,7 @@ fn approve_works() { // assert_eq!(contract.approve(&addr, token, &BOB, amount), Err(ConsumerRemaining)); let mut contract = Contract::new(INIT_VALUE); // Mint `amount` to contract address. - mint(&owner, token, &to_account_id(&contract.address), amount); + mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -239,33 +239,17 @@ fn approve_works() { // ); thaw(&owner, token); // Successful approvals. - assert_eq!(0, Assets::allowance(token, &to_account_id(&contract.address), &delegate)); - contract.approve( - &to_account_id(&contract.address), - token, - to_address(&delegate), - amount.into(), - ); - assert_eq!( - Assets::allowance(token, &to_account_id(&contract.address), &delegate), - amount - ); + assert_eq!(0, Assets::allowance(token, &contract.account_id(), &delegate)); + contract.approve(&contract.account_id(), token, to_address(&delegate), amount.into()); + assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount); // Successfully emit event. let spender = to_address(&delegate); let expected = Approval { owner: contract.address, spender, value: amount.into() }.encode(); assert_eq!(contract.last_event(), expected); // Non-additive, sets new value. - contract.approve( - &to_account_id(&contract.address), - token, - spender, - (amount / 2).into(), - ); - assert_eq!( - Assets::allowance(token, &to_account_id(&contract.address), &delegate), - amount / 2 - ); + contract.approve(&contract.account_id(), token, spender, (amount / 2).into()); + assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount / 2); // Successfully emit event. let expected = Approval { owner: contract.address, spender, value: (amount / 2).into() }.encode(); @@ -615,6 +599,10 @@ impl Contract { .unwrap() } + fn account_id(&self) -> AccountId { + to_account_id(&self.address) + } + fn call::RustType>>( &self, origin: AccountId, From 63e558603c6d2e44dc5e3268b04a2bf179cf04a0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 16:43:41 +0100 Subject: [PATCH 093/284] test(api): add increase/decrease allowance tests --- .../integration-tests/src/fungibles.rs | 105 +++++++++++++++++- pop-api-vnext/src/fungibles/mod.rs | 2 +- 2 files changed, 102 insertions(+), 5 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index a81171632..688a84a19 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -264,15 +264,112 @@ fn approve_works() { } #[test] -#[ignore] fn increase_allowance_works() { - todo!() + let token = 1; + let owner = ALICE; + let amount: Balance = 100 * UNIT; + let delegate = BOB; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + // Instantiate a contract without balance - test `ConsumerRemaining. + let contract = Contract::new(0); + // Token does not exist. + // assert_eq!( + // increase_allowance(&addr, 0, &BOB, amount), + // Err(Module { index: 52, error: [3, 0] }) + // ); + mint(&owner, token, &contract.account_id(), amount); + // assert_eq!(contract.increase_allowance(&owner, token, &delegate, amount), + // Err(ConsumerRemaining)); + + // Instantiate a contract with balance. + let mut contract = Contract::new(INIT_VALUE); + // Create token with Alice as owner and mint `amount` to contract address. + mint(&owner, token, &contract.account_id(), amount); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // contract.increase_allowance(&addr, token, &BOB, amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + thaw(&owner, token); + // Successful approvals: + assert_eq!(0, Assets::allowance(token, &contract.account_id(), &delegate)); + assert_eq!( + contract.increase_allowance( + &contract.account_id(), + token, + to_address(&delegate), + amount.into() + ), + amount.into() + ); + assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount); + // Additive. + assert_eq!( + contract.increase_allowance( + &contract.account_id(), + token, + to_address(&delegate), + amount.into() + ), + (amount * 2).into() + ); + assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount * 2); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&owner, token); + // assert_eq!( + // contract.increase_allowance(&addr, token, &BOB, amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + }); } #[test] -#[ignore] fn decrease_allowance_works() { - todo!() + let token = 1; + let owner = ALICE; + let amount: Balance = 100 * UNIT; + let delegate = BOB; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(INIT_VALUE); + + // Mint `amount` to contract address, then approve delegate to spend `amount`. + mint(&owner, token, &contract.account_id(), amount); + approve(&contract.account_id(), token, &delegate, amount); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // decrease_allowance(&addr, token, &BOB, amount), + // Err(Module { index: 52, error: [16, 0] }), + // ); + thaw(&owner, token); + // "Unapproved" error is returned if the current allowance is less than `value`. + // assert_eq!( + // decrease_allowance(&addr, token, &BOB, amount * 2), + // Err(Module { index: 52, error: [10, 0] }), + // ); + // Successfully decrease allowance. + let amount = amount / 2 - 1 * UNIT; + let allowance_before = Assets::allowance(token, &contract.account_id(), &delegate); + assert_eq!( + contract.decrease_allowance(&owner, token, to_address(&delegate), amount.into()), + (allowance_before - amount).into() + ); + let allowance_after = Assets::allowance(token, &contract.account_id(), &delegate); + assert_eq!(allowance_before - allowance_after, amount); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&owner, token); + // assert_eq!( + // contract.decrease_allowance(&addr, token, &delegate, 1 * UNIT), + // Err(Module { index: 52, error: [16, 0] }), + // ); + }); } #[test] diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index eaa04d5ed..380a83772 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -295,7 +295,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.increaseAllowance(token, spender, value)) + Ok(precompile.decreaseAllowance(token, spender, value)) } /// Whether the specified token exists. From 32ed48df4d7a296de760a59342095309aea2a2d3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 16:54:04 +0100 Subject: [PATCH 094/284] refactor(api): separate out fungibles errors module --- pop-api-vnext/src/fungibles/errors.rs | 257 +++++++++++++++++++++++++ pop-api-vnext/src/fungibles/mod.rs | 261 +------------------------- 2 files changed, 258 insertions(+), 260 deletions(-) create mode 100644 pop-api-vnext/src/fungibles/errors.rs diff --git a/pop-api-vnext/src/fungibles/errors.rs b/pop-api-vnext/src/fungibles/errors.rs new file mode 100644 index 000000000..cafc0d3b1 --- /dev/null +++ b/pop-api-vnext/src/fungibles/errors.rs @@ -0,0 +1,257 @@ +use super::*; + +// NOTE: subject to change based on ink!'s support for solidity custom errors. +pub enum Error { + /// The token recipient is invalid. + InvalidRecipient(InvalidRecipient), + /// The minimum balance should be non-zero. + MinBalanceZero(MinBalanceZero), + /// The signing account has no permission to do the operation. + NoPermission(NoPermission), + /// The `admin` address cannot be the zero address. + ZeroAdminAddress(ZeroAdminAddress), + /// The recipient cannot be the zero address. + ZeroRecipientAddress(ZeroRecipientAddress), + /// The sender cannot be the zero address. + ZeroSenderAddress(ZeroSenderAddress), + /// The specified `value` cannot be zero. + ZeroValue(ZeroValue), +} + +impl<'a> SolEncode<'a> for Error { + type SolType = (); + + fn encode(&'a self) -> Vec { + use Error::*; + match self { + InvalidRecipient(e) => e.abi_encode(), + MinBalanceZero(e) => e.abi_encode(), + NoPermission(e) => e.abi_encode(), + ZeroAdminAddress(e) => e.abi_encode(), + ZeroRecipientAddress(e) => e.abi_encode(), + ZeroSenderAddress(e) => e.abi_encode(), + ZeroValue(e) => e.abi_encode(), + } + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } +} + +/// The token recipient is invalid. +pub struct InvalidRecipient(pub Address); +impl SolError for InvalidRecipient { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [23, 133, 139, 190]; + const SIGNATURE: &'static str = "InvalidRecipient(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self(Address::from(*tuple.0 .0)) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } +} +impl<'a> SolEncode<'a> for InvalidRecipient { + type SolType = (&'a Address,); + + #[inline] + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + #[inline] + fn to_sol_type(&'a self) -> Self::SolType { + (&self.0,) + } +} +impl From for Error { + fn from(value: InvalidRecipient) -> Self { + Self::InvalidRecipient(value) + } +} + +/// The minimum balance should be non-zero. +pub struct MinBalanceZero; +impl SolError for MinBalanceZero { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [95, 21, 97, 139]; + const SIGNATURE: &'static str = "MinBalanceZero()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: MinBalanceZero) -> Self { + Self::MinBalanceZero(value) + } +} + +/// The signing account has no permission to do the operation. +pub struct NoPermission; +impl SolError for NoPermission { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [157, 123, 54, 157]; + const SIGNATURE: &'static str = "NoPermission()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl<'a> SolEncode<'a> for NoPermission { + type SolType = (); + + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } +} +impl From for Error { + fn from(value: NoPermission) -> Self { + Self::NoPermission(value) + } +} + +/// The `admin` address cannot be the zero address. +pub struct ZeroAdminAddress; +impl SolError for ZeroAdminAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [62, 243, 155, 129]; + const SIGNATURE: &'static str = "ZeroAdminAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: ZeroAdminAddress) -> Self { + Self::ZeroAdminAddress(value) + } +} + +/// The recipient cannot be the zero address. +pub struct ZeroRecipientAddress; +impl SolError for ZeroRecipientAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [206, 239, 152, 87]; + const SIGNATURE: &'static str = "ZeroRecipientAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: ZeroRecipientAddress) -> Self { + Self::ZeroRecipientAddress(value) + } +} + +/// The sender cannot be the zero address. +pub struct ZeroSenderAddress; +impl SolError for ZeroSenderAddress { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [255, 54, 43, 196]; + const SIGNATURE: &'static str = "ZeroSenderAddress()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: ZeroSenderAddress) -> Self { + Self::ZeroSenderAddress(value) + } +} + +/// The `value` should be non-zero. +pub struct ZeroValue; +impl SolError for ZeroValue { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [124, 148, 110, 215]; + const SIGNATURE: &'static str = "ZeroValue()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: ZeroValue) -> Self { + Self::ZeroValue(value) + } +} + +#[test] +fn error_encoding_works() { + for (result, expected) in [ + ( + InvalidRecipient([255u8; 20].into()).abi_encode(), + "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + ), + (MinBalanceZero.abi_encode(), "5f15618b"), + (NoPermission.abi_encode(), "9d7b369d"), + (ZeroAdminAddress.abi_encode(), "3ef39b81"), + (ZeroRecipientAddress.abi_encode(), "ceef9857"), + (ZeroSenderAddress.abi_encode(), "ff362bc4"), + (ZeroValue.abi_encode(), "7c946ed7"), + ] { + assert_eq!(hex::encode(result), expected) + } +} diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index 380a83772..116670e9b 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -17,6 +17,7 @@ use super::*; /// APIs for fungible tokens conforming to the ERC20 standard. pub mod erc20; +pub mod errors; const PRECOMPILE: u16 = 100; @@ -433,263 +434,3 @@ pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); Ok(precompile.transferFrom(token, from, to, value)) } - -// NOTE: subject to change based on ink!'s support for solidity custom errors. -pub enum Error { - /// The token recipient is invalid. - InvalidRecipient(InvalidRecipient), - /// The minimum balance should be non-zero. - MinBalanceZero(MinBalanceZero), - /// The signing account has no permission to do the operation. - NoPermission(NoPermission), - /// The `admin` address cannot be the zero address. - ZeroAdminAddress(ZeroAdminAddress), - /// The recipient cannot be the zero address. - ZeroRecipientAddress(ZeroRecipientAddress), - /// The sender cannot be the zero address. - ZeroSenderAddress(ZeroSenderAddress), - /// The specified `value` cannot be zero. - ZeroValue(ZeroValue), -} - -impl<'a> SolEncode<'a> for Error { - type SolType = (); - - fn encode(&'a self) -> Vec { - use Error::*; - match self { - InvalidRecipient(e) => e.abi_encode(), - MinBalanceZero(e) => e.abi_encode(), - NoPermission(e) => e.abi_encode(), - ZeroAdminAddress(e) => e.abi_encode(), - ZeroRecipientAddress(e) => e.abi_encode(), - ZeroSenderAddress(e) => e.abi_encode(), - ZeroValue(e) => e.abi_encode(), - } - } - - fn to_sol_type(&'a self) -> Self::SolType { - () - } -} - -mod errors { - use super::*; - - /// The token recipient is invalid. - pub struct InvalidRecipient(pub Address); - impl SolError for InvalidRecipient { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [23, 133, 139, 190]; - const SIGNATURE: &'static str = "InvalidRecipient(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self(Address::from(*tuple.0 .0)) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } - } - impl<'a> SolEncode<'a> for InvalidRecipient { - type SolType = (&'a Address,); - - #[inline] - fn encode(&'a self) -> Vec { - self.abi_encode() - } - - #[inline] - fn to_sol_type(&'a self) -> Self::SolType { - (&self.0,) - } - } - impl From for Error { - fn from(value: InvalidRecipient) -> Self { - Self::InvalidRecipient(value) - } - } - - /// The minimum balance should be non-zero. - pub struct MinBalanceZero; - impl SolError for MinBalanceZero { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [95, 21, 97, 139]; - const SIGNATURE: &'static str = "MinBalanceZero()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: MinBalanceZero) -> Self { - Self::MinBalanceZero(value) - } - } - - /// The signing account has no permission to do the operation. - pub struct NoPermission; - impl SolError for NoPermission { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [157, 123, 54, 157]; - const SIGNATURE: &'static str = "NoPermission()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl<'a> SolEncode<'a> for NoPermission { - type SolType = (); - - fn encode(&'a self) -> Vec { - self.abi_encode() - } - - fn to_sol_type(&'a self) -> Self::SolType { - () - } - } - impl From for Error { - fn from(value: NoPermission) -> Self { - Self::NoPermission(value) - } - } - - /// The `admin` address cannot be the zero address. - pub struct ZeroAdminAddress; - impl SolError for ZeroAdminAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [62, 243, 155, 129]; - const SIGNATURE: &'static str = "ZeroAdminAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: ZeroAdminAddress) -> Self { - Self::ZeroAdminAddress(value) - } - } - - /// The recipient cannot be the zero address. - pub struct ZeroRecipientAddress; - impl SolError for ZeroRecipientAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [206, 239, 152, 87]; - const SIGNATURE: &'static str = "ZeroRecipientAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: ZeroRecipientAddress) -> Self { - Self::ZeroRecipientAddress(value) - } - } - - /// The sender cannot be the zero address. - pub struct ZeroSenderAddress; - impl SolError for ZeroSenderAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [255, 54, 43, 196]; - const SIGNATURE: &'static str = "ZeroSenderAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: ZeroSenderAddress) -> Self { - Self::ZeroSenderAddress(value) - } - } - - /// The `value` should be non-zero. - pub struct ZeroValue; - impl SolError for ZeroValue { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [124, 148, 110, 215]; - const SIGNATURE: &'static str = "ZeroValue()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: ZeroValue) -> Self { - Self::ZeroValue(value) - } - } - - #[test] - fn error_encoding_works() { - for (result, expected) in [ - ( - InvalidRecipient([255u8; 20].into()).abi_encode(), - "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - ), - (MinBalanceZero.abi_encode(), "5f15618b"), - (NoPermission.abi_encode(), "9d7b369d"), - (ZeroAdminAddress.abi_encode(), "3ef39b81"), - (ZeroRecipientAddress.abi_encode(), "ceef9857"), - (ZeroSenderAddress.abi_encode(), "ff362bc4"), - (ZeroValue.abi_encode(), "7c946ed7"), - ] { - assert_eq!(hex::encode(result), expected) - } - } -} From 2a1de1f6cdb8c81fe337874898e258aa299b0e38 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 16:57:48 +0100 Subject: [PATCH 095/284] feat(api): add fungibles events --- pop-api-vnext/src/fungibles/events.rs | 63 +++++++++++++++++++++++++++ pop-api-vnext/src/fungibles/mod.rs | 1 + 2 files changed, 64 insertions(+) create mode 100644 pop-api-vnext/src/fungibles/events.rs diff --git a/pop-api-vnext/src/fungibles/events.rs b/pop-api-vnext/src/fungibles/events.rs new file mode 100644 index 000000000..b49f9011b --- /dev/null +++ b/pop-api-vnext/src/fungibles/events.rs @@ -0,0 +1,63 @@ +//! A set of events for use in smart contracts interacting with the fungibles API. +//! +//! The `Transfer` and `Approval` events conform to the ERC-20 standard. The other events +//! (`Create`, `StartDestroy`, `SetMetadata`, `ClearMetadata`) are provided for convenience. +//! +//! These events are not emitted by the API itself but can be used in your contracts to +//! track token operations. Be mindful of the costs associated with emitting events. +//! +//! For more details, refer to [ink! events](https://use.ink/basics/events). + +pub use erc20::{Approval, Transfer}; + +use super::*; + +/// Event emitted when a token is created. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Created { + /// The token identifier. + #[ink(topic)] + pub id: TokenId, + /// The creator of the token. + #[ink(topic)] + pub creator: Address, + /// The administrator of the token. + #[ink(topic)] + pub admin: Address, +} + +/// Event emitted when a token is in the process of being destroyed. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct DestroyStarted { + /// The token. + #[ink(topic)] + pub token: TokenId, +} + +/// Event emitted when new metadata is set for a token. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct MetadataSet { + /// The token. + #[ink(topic)] + pub token: TokenId, + /// The name of the token. + #[ink(topic)] + pub name: String, + /// The symbol of the token. + #[ink(topic)] + pub symbol: String, + /// The decimals of the token. + pub decimals: u8, +} + +/// Event emitted when metadata is cleared for a token. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct MetadataCleared { + /// The token. + #[ink(topic)] + pub token: TokenId, +} diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/mod.rs index 116670e9b..b04270cf0 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/mod.rs @@ -18,6 +18,7 @@ use super::*; /// APIs for fungible tokens conforming to the ERC20 standard. pub mod erc20; pub mod errors; +pub mod events; const PRECOMPILE: u16 = 100; From df16d6aa90258eca999bcfc8c53778b3a00c4b12 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 17:23:28 +0100 Subject: [PATCH 096/284] test(api): add create test --- .../contracts/fungibles/lib.rs | 11 ++++- .../integration-tests/src/fungibles.rs | 41 +++++++++++++++++-- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 1bf475219..148ddf39c 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::{prelude::string::String, U256}; -use pop_api::fungibles::{self as api, Approval, Fungibles, TokenId, Transfer}; +use pop_api::fungibles::{self as api, events::*, Fungibles, TokenId}; #[ink::contract] pub mod fungibles { @@ -65,7 +65,14 @@ pub mod fungibles { #[ink(message)] fn create(&self, admin: Address, min_balance: U256) -> TokenId { match api::create(admin, min_balance) { - Ok(token) => token, + Ok(token) => { + self.env().emit_event(Created { + id: token, + creator: self.env().address(), + admin, + }); + token + }, Err(error) => revert(&error), } } diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 688a84a19..3acf19c43 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -1,8 +1,10 @@ use frame_support::{ pallet_prelude::Encode, - traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _, Inspect as _}, + traits::fungibles::{ + approvals::Inspect as _, metadata::Inspect as _, roles::Inspect as _, Inspect as _, + }, }; -use pop_api::fungibles::{Approval, Transfer}; +use pop_api::fungibles::events::*; use pop_primitives::TokenId; use sp_io::hashing::twox_256; @@ -407,9 +409,40 @@ fn metadata_works() { } #[test] -#[ignore] fn create_works() { - todo!() + let token = 1; + let creator = ALICE; + let admin = BOB; + ExtBuilder::new().build().execute_with(|| { + // Instantiate a contract without balance for fees. + let contract = Contract::new(0); + // No balance to pay for fees. + // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, + // 0] }),); + + // Instantiate a contract with insufficient balance for deposit. + let contract = Contract::new(100); + // No balance to pay the deposit. + // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, + // 0] }),); + + // Instantiate a contract with enough balance. + let mut contract = Contract::new(INIT_VALUE); + // }),); The minimal balance for a token must be non zero. + // assert_eq!(contract.create(&addr, &admin, 0), Err(Module { index: 52, error: [7, 0] }),); + // Create token successfully. + let token = contract.create(&creator, to_address(&admin), 1.into()); + assert_eq!(Assets::owner(token), Some(contract.account_id())); + // Successfully emit event. + let admin = to_address(&admin); + let expected = Created { id: token, creator: contract.address, admin }.encode(); + assert_eq!(contract.last_event(), expected); + // Token ID is already taken. + // assert_eq!( + // contract.create(&addr, TOKEN_ID, &BOB, 1), + // Err(Module { index: 52, error: [5, 0] }), + // ); + }); } // Testing a contract that creates a token in the constructor. From e4cb38d5ebc82601b5c5bf617d9725e4dcc78c52 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 20:28:05 +0100 Subject: [PATCH 097/284] test(api): add start_destroy test --- .../contracts/fungibles/lib.rs | 1 + .../integration-tests/src/fungibles.rs | 27 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 148ddf39c..1e73ec2fc 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -80,6 +80,7 @@ pub mod fungibles { #[ink(message)] fn startDestroy(&self, token: TokenId) { api::start_destroy(token); + self.env().emit_event(DestroyStarted { token }); } #[ink(message)] diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 3acf19c43..9e60c6eb2 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -410,7 +410,6 @@ fn metadata_works() { #[test] fn create_works() { - let token = 1; let creator = ALICE; let admin = BOB; ExtBuilder::new().build().execute_with(|| { @@ -453,9 +452,31 @@ fn instantiate_and_create_fungible_works() { } #[test] -#[ignore] fn start_destroy_works() { - todo!() + let token = 0; + let owner = ALICE; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(INIT_VALUE); + + // Token does not exist. + // assert_eq!( + // contract.start_destroy(&owner, TokenId::MAX), + // Err(Module { index: 52, error: [3, 0] }), + // ); + // No Permission. + // assert_eq!( + // contract.start_destroy(&owner, token), + // Err(Module { index: 52, error: [2, 0] }), + // ); + let token = contract.create(&owner, to_address(&owner), 1.into()); + contract.start_destroy(&owner, token); + // Successfully emit event. + let expected = DestroyStarted { token }.encode(); + assert_eq!(contract.last_event(), expected); + }); } #[test] From 941f32ddbaa904119ad45110a714953a2e7f025c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 21:30:50 +0100 Subject: [PATCH 098/284] test(api): make contract instantiation origin explicit to simplify api --- .../integration-tests/src/fungibles.rs | 255 ++++++++---------- pop-api-vnext/integration-tests/src/lib.rs | 15 +- 2 files changed, 117 insertions(+), 153 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 9e60c6eb2..f7c7dbdb8 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -21,7 +21,7 @@ fn total_supply_works() { .with_asset_balances(vec![(token, BOB, endowment)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&BOB, 0); // Tokens in circulation. assert_eq!(contract.total_supply(token), Assets::total_supply(token).into()); @@ -37,14 +37,14 @@ fn total_supply_works() { #[test] fn balance_of_works() { let token = 1; - let owner = BOB; + let owner = ALICE; let endowment = 100; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, BOB, false, 1)]) .with_asset_balances(vec![(token, owner.clone(), endowment)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&CHARLIE, 0); // Tokens in circulation. assert_eq!( @@ -66,14 +66,14 @@ fn balance_of_works() { #[test] fn allowance_works() { let token = 1; - let owner = BOB; - let spender = ALICE; + let owner = ALICE; + let spender = BOB; let allowance = 50; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&CHARLIE, 0); // Tokens in circulation. approve(&owner, token, &spender, allowance); @@ -109,7 +109,7 @@ fn transfer_works() { .with_assets(vec![(token, owner.clone(), false, 1)]) .build() .execute_with(|| { - let mut contract = Contract::new(0); + let mut contract = Contract::new(&owner, 0); // Token does not exist. // assert_eq!(transfer(&addr, 1, BOB, amount), Err(Module { index: 52, error: [3, 0] @@ -134,9 +134,9 @@ fn transfer_works() { // Err(Module { index: 52, error: [0, 0] }) // ); // Successful transfer. - let balance_before_transfer = Assets::balance(token, &BOB); - contract.transfer(&owner, token, to_address(&to), (amount / 2).into()); - let balance_after_transfer = Assets::balance(token, &BOB); + let balance_before_transfer = Assets::balance(token, &to); + contract.transfer(token, to_address(&to), (amount / 2).into()); + let balance_after_transfer = Assets::balance(token, &to); assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); // Successfully emit event. let from = contract.address; @@ -145,13 +145,13 @@ fn transfer_works() { assert_eq!(contract.last_event(), expected); // Transfer token to account that does not exist. // assert_eq!( - // contract.transfer(&owner, token, to_address(&CHARLIE), (amount / 4).into()), + // contract.transfer(token, to_address(&CHARLIE), (amount / 4).into()), // Err(Token(CannotCreate)) // ); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); // assert_eq!( - // contract.transfer(&addr, token, BOB, amount / 4), + // contract.transfer(token, BOB, amount / 4), // Err(Module { index: 52, error: [16, 0] }) // ); }); @@ -168,7 +168,7 @@ fn transfer_from_works() { .with_asset_balances(vec![(token, owner.clone(), amount)]) .build() .execute_with(|| { - let mut contract = Contract::new(0); + let mut contract = Contract::new(&owner, 0); // Token does not exist. // assert_eq!( @@ -195,15 +195,9 @@ fn transfer_from_works() { // Err(Module { index: 52, error: [0, 0] }), // ); // Successful transfer. - let balance_before_transfer = Assets::balance(token, &BOB); - contract.transfer_from( - &owner, - token, - to_address(&owner), - to_address(&to), - (amount / 2).into(), - ); - let balance_after_transfer = Assets::balance(token, &BOB); + let balance_before_transfer = Assets::balance(token, &to); + contract.transfer_from(token, to_address(&owner), to_address(&to), (amount / 2).into()); + let balance_after_transfer = Assets::balance(token, &to); assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); // Successfully emit event. let from = to_address(&owner); @@ -217,20 +211,20 @@ fn transfer_from_works() { fn approve_works() { let token = 1; let owner = ALICE; + let spender = BOB; let amount: Balance = 100 * UNIT; - let delegate = BOB; ExtBuilder::new() .with_assets(vec![(token, owner.clone(), false, 1)]) - .with_asset_balances(vec![(token, owner.clone(), amount)]) + //.with_asset_balances(vec![(token, owner.clone(), amount)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&owner, 0); // Token does not exist. // assert_eq!(contract.approve(&addr, TokenId::MAX, &BOB, amount), Err(Module { index: // 52, error: [3, 0] })); // assert_eq!(contract.approve(&addr, token, &BOB, amount), Err(ConsumerRemaining)); - let mut contract = Contract::new(INIT_VALUE); + let mut contract = Contract::new(&owner, INIT_VALUE); // Mint `amount` to contract address. mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. @@ -241,17 +235,20 @@ fn approve_works() { // ); thaw(&owner, token); // Successful approvals. - assert_eq!(0, Assets::allowance(token, &contract.account_id(), &delegate)); - contract.approve(&contract.account_id(), token, to_address(&delegate), amount.into()); - assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount); + assert_eq!(0, Assets::allowance(token, &contract.account_id(), &spender)); + contract.approve(token, to_address(&spender), amount.into()); + assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount); // Successfully emit event. - let spender = to_address(&delegate); + let spender = to_address(&spender); let expected = Approval { owner: contract.address, spender, value: amount.into() }.encode(); assert_eq!(contract.last_event(), expected); // Non-additive, sets new value. - contract.approve(&contract.account_id(), token, spender, (amount / 2).into()); - assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount / 2); + contract.approve( token, spender, (amount / 2).into()); + assert_eq!( + Assets::allowance(token, &contract.account_id(), &to_account_id(&spender)), + amount / 2 + ); // Successfully emit event. let expected = Approval { owner: contract.address, spender, value: (amount / 2).into() }.encode(); @@ -269,14 +266,14 @@ fn approve_works() { fn increase_allowance_works() { let token = 1; let owner = ALICE; + let spender = BOB; let amount: Balance = 100 * UNIT; - let delegate = BOB; ExtBuilder::new() .with_assets(vec![(token, owner.clone(), false, 1)]) .build() .execute_with(|| { // Instantiate a contract without balance - test `ConsumerRemaining. - let contract = Contract::new(0); + let contract = Contract::new(&owner, 0); // Token does not exist. // assert_eq!( // increase_allowance(&addr, 0, &BOB, amount), @@ -287,7 +284,7 @@ fn increase_allowance_works() { // Err(ConsumerRemaining)); // Instantiate a contract with balance. - let mut contract = Contract::new(INIT_VALUE); + let mut contract = Contract::new(&owner, INIT_VALUE); // Create token with Alice as owner and mint `amount` to contract address. mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. @@ -298,28 +295,18 @@ fn increase_allowance_works() { // ); thaw(&owner, token); // Successful approvals: - assert_eq!(0, Assets::allowance(token, &contract.account_id(), &delegate)); + assert_eq!(0, Assets::allowance(token, &contract.account_id(), &spender)); assert_eq!( - contract.increase_allowance( - &contract.account_id(), - token, - to_address(&delegate), - amount.into() - ), + contract.increase_allowance(token, to_address(&spender), amount.into()), amount.into() ); - assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount); + assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount); // Additive. assert_eq!( - contract.increase_allowance( - &contract.account_id(), - token, - to_address(&delegate), - amount.into() - ), + contract.increase_allowance(token, to_address(&spender), amount.into()), (amount * 2).into() ); - assert_eq!(Assets::allowance(token, &contract.account_id(), &delegate), amount * 2); + assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount * 2); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); // assert_eq!( @@ -333,17 +320,17 @@ fn increase_allowance_works() { fn decrease_allowance_works() { let token = 1; let owner = ALICE; + let spender = BOB; let amount: Balance = 100 * UNIT; - let delegate = BOB; ExtBuilder::new() .with_assets(vec![(token, owner.clone(), false, 1)]) .build() .execute_with(|| { - let mut contract = Contract::new(INIT_VALUE); + let mut contract = Contract::new(&owner, INIT_VALUE); // Mint `amount` to contract address, then approve delegate to spend `amount`. mint(&owner, token, &contract.account_id(), amount); - approve(&contract.account_id(), token, &delegate, amount); + approve(&contract.account_id(), token, &spender, amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -358,12 +345,12 @@ fn decrease_allowance_works() { // ); // Successfully decrease allowance. let amount = amount / 2 - 1 * UNIT; - let allowance_before = Assets::allowance(token, &contract.account_id(), &delegate); + let allowance_before = Assets::allowance(token, &contract.account_id(), &spender); assert_eq!( - contract.decrease_allowance(&owner, token, to_address(&delegate), amount.into()), + contract.decrease_allowance(token, to_address(&spender), amount.into()), (allowance_before - amount).into() ); - let allowance_after = Assets::allowance(token, &contract.account_id(), &delegate); + let allowance_after = Assets::allowance(token, &contract.account_id(), &spender); assert_eq!(allowance_before - allowance_after, amount); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); @@ -377,20 +364,16 @@ fn decrease_allowance_works() { #[test] fn metadata_works() { let token = 1; + let owner = ALICE; let name = "name".to_string(); let symbol = "symbol".to_string(); let decimals: u8 = 69; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) - .with_asset_metadata(vec![( - token, - name.as_bytes().to_vec(), - symbol.as_bytes().to_vec(), - decimals, - )]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_metadata(vec![(token, name.clone().into(), symbol.clone().into(), decimals)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&owner, 0); // Existing token. assert_eq!(contract.name(token).as_bytes(), Assets::name(token).as_slice()); @@ -410,30 +393,29 @@ fn metadata_works() { #[test] fn create_works() { - let creator = ALICE; - let admin = BOB; + let owner = ALICE; ExtBuilder::new().build().execute_with(|| { // Instantiate a contract without balance for fees. - let contract = Contract::new(0); + let contract = Contract::new(&owner, 0); // No balance to pay for fees. // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, // 0] }),); // Instantiate a contract with insufficient balance for deposit. - let contract = Contract::new(100); + let contract = Contract::new(&owner, 100); // No balance to pay the deposit. // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, // 0] }),); // Instantiate a contract with enough balance. - let mut contract = Contract::new(INIT_VALUE); + let mut contract = Contract::new(&owner, INIT_VALUE); // }),); The minimal balance for a token must be non zero. // assert_eq!(contract.create(&addr, &admin, 0), Err(Module { index: 52, error: [7, 0] }),); // Create token successfully. - let token = contract.create(&creator, to_address(&admin), 1.into()); + let admin = to_address(&owner); + let token = contract.create(admin, 1.into()); assert_eq!(Assets::owner(token), Some(contract.account_id())); // Successfully emit event. - let admin = to_address(&admin); let expected = Created { id: token, creator: contract.address, admin }.encode(); assert_eq!(contract.last_event(), expected); // Token ID is already taken. @@ -456,23 +438,23 @@ fn start_destroy_works() { let token = 0; let owner = ALICE; ExtBuilder::new() - .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { - let mut contract = Contract::new(INIT_VALUE); + let mut contract = Contract::new(&owner, INIT_VALUE); // Token does not exist. // assert_eq!( - // contract.start_destroy(&owner, TokenId::MAX), + // contract.start_destroy(&creator, TokenId::MAX), // Err(Module { index: 52, error: [3, 0] }), // ); // No Permission. // assert_eq!( - // contract.start_destroy(&owner, token), + // contract.start_destroy(&creator, token), // Err(Module { index: 52, error: [2, 0] }), // ); - let token = contract.create(&owner, to_address(&owner), 1.into()); - contract.start_destroy(&owner, token); + let token = contract.create(to_address(&owner), 1.into()); + contract.start_destroy(token); // Successfully emit event. let expected = DestroyStarted { token }.encode(); assert_eq!(contract.last_event(), expected); @@ -494,11 +476,12 @@ fn clear_metadata_works() { #[test] fn exists_works() { let token = 1; + let owner = ALICE; ExtBuilder::new() - .with_assets(vec![(token, ALICE, false, 1)]) + .with_assets(vec![(token, owner.clone(), false, 1)]) .build() .execute_with(|| { - let contract = Contract::new(0); + let contract = Contract::new(&owner, 0); // Tokens in circulation. assert_eq!(contract.exists(token), Assets::asset_exists(token)); @@ -524,14 +507,16 @@ fn burn_works() { // A simple, strongly typed wrapper for the contract. struct Contract { address: H160, + creator: AccountId, } impl Contract { // Create a new instance of the contract through on-chain instantiation. - fn new(value: Balance) -> Self { + fn new(origin: &AccountId, value: Balance) -> Self { let salt = twox_256(&value.to_le_bytes()); - let address = instantiate(CONTRACT, value, Some(salt)); - Self { address } + let address = + instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, Some(salt)); + Self { address, creator: origin.clone() } } fn allowance(&self, token: TokenId, owner: H160, spender: H160) -> U256 { @@ -539,7 +524,7 @@ impl Contract { let spender = alloy::Address::from(spender.0); U256::from_little_endian( self.call::( - ALICE, + &self.creator, keccak_selector("allowance(uint32,address,address)"), (token, owner, spender).abi_encode(), 0, @@ -549,11 +534,11 @@ impl Contract { ) } - fn approve(&mut self, origin: &AccountId, token: TokenId, spender: H160, value: U256) { + fn approve(&mut self, token: TokenId, spender: H160, value: U256) { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("approve(uint32,address,uint256)"), (token, spender, value).abi_encode(), 0, @@ -565,7 +550,7 @@ impl Contract { let owner = alloy::Address::from(owner.0); U256::from_little_endian( self.call::( - ALICE, + &self.creator, keccak_selector("balanceOf(uint32,address)"), (token, owner).abi_encode(), 0, @@ -575,11 +560,11 @@ impl Contract { ) } - fn burn(&mut self, origin: &AccountId, token: TokenId, account: H160, value: U256) { + fn burn(&mut self, token: TokenId, account: H160, value: U256) { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("burn(uint32,address,uint256)"), (token, account, value).abi_encode(), 0, @@ -587,21 +572,16 @@ impl Contract { .unwrap() } - fn clear_metadata(&mut self, origin: &AccountId, token: TokenId) { - self.call( - origin.clone(), - keccak_selector("clearMetadata(uint32)"), - (token,).abi_encode(), - 0, - ) - .unwrap() + fn clear_metadata(&mut self, token: TokenId) { + self.call(&self.creator, keccak_selector("clearMetadata(uint32)"), (token,).abi_encode(), 0) + .unwrap() } - fn create(&mut self, origin: &AccountId, admin: H160, min_balance: U256) -> TokenId { + fn create(&mut self, admin: H160, min_balance: U256) -> TokenId { let admin = alloy::Address::from(admin.0); let min_balance = alloy::U256::from_be_bytes(min_balance.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("create(address,uint256)"), (admin, min_balance).abi_encode(), 0, @@ -610,22 +590,21 @@ impl Contract { } fn decimals(&self, token: TokenId) -> u8 { - self.call::(ALICE, keccak_selector("decimals(uint32)"), (token,).abi_encode(), 0) - .unwrap() as u8 + self.call::( + &self.creator, + keccak_selector("decimals(uint32)"), + (token,).abi_encode(), + 0, + ) + .unwrap() as u8 } - fn decrease_allowance( - &mut self, - origin: &AccountId, - token: TokenId, - spender: H160, - value: U256, - ) -> U256 { + fn decrease_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); U256::from_little_endian( self.call::( - origin.clone(), + &self.creator, keccak_selector("decreaseAllowance(uint32,address,uint256)"), (token, spender, value).abi_encode(), 0, @@ -636,22 +615,16 @@ impl Contract { } fn exists(&self, token: TokenId) -> bool { - self.call(ALICE, keccak_selector("exists(uint32)"), (token,).abi_encode(), 0) + self.call(&self.creator, keccak_selector("exists(uint32)"), (token,).abi_encode(), 0) .unwrap() } - fn increase_allowance( - &mut self, - origin: &AccountId, - token: TokenId, - spender: H160, - value: U256, - ) -> U256 { + fn increase_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); U256::from_little_endian( self.call::( - origin.clone(), + &self.creator, keccak_selector("increaseAllowance(uint32,address,uint256)"), (token, spender, value).abi_encode(), 0, @@ -661,11 +634,11 @@ impl Contract { ) } - fn mint(&mut self, origin: &AccountId, token: TokenId, account: H160, value: U256) { + fn mint(&mut self, token: TokenId, account: H160, value: U256) { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("mint(uint32,address,uint256)"), (token, account, value).abi_encode(), 0, @@ -674,20 +647,13 @@ impl Contract { } fn name(&self, token: TokenId) -> String { - self.call(ALICE, keccak_selector("name(uint32)"), (token,).abi_encode(), 0) + self.call(&self.creator, keccak_selector("name(uint32)"), (token,).abi_encode(), 0) .unwrap() } - fn set_metadata( - &mut self, - origin: &AccountId, - token: TokenId, - name: String, - symbol: String, - decimals: u8, - ) { + fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { self.call( - origin.clone(), + &self.creator, keccak_selector("setMetadata(uint32,string,string,uint8)"), (token, name, symbol, decimals as u16).abi_encode(), 0, @@ -695,20 +661,20 @@ impl Contract { .unwrap() } - fn start_destroy(&mut self, origin: &AccountId, token: TokenId) { - self.call(origin.clone(), keccak_selector("startDestroy(uint32)"), (token,).abi_encode(), 0) + fn start_destroy(&mut self, token: TokenId) { + self.call(&self.creator, keccak_selector("startDestroy(uint32)"), (token,).abi_encode(), 0) .unwrap() } fn symbol(&self, token: TokenId) -> String { - self.call(ALICE, keccak_selector("symbol(uint32)"), (token,).abi_encode(), 0) + self.call(&self.creator, keccak_selector("symbol(uint32)"), (token,).abi_encode(), 0) .unwrap() } fn total_supply(&self, token: TokenId) -> U256 { U256::from_little_endian( self.call::( - ALICE, + &self.creator, keccak_selector("totalSupply(uint32)"), (token,).abi_encode(), 0, @@ -718,11 +684,11 @@ impl Contract { ) } - fn transfer(&mut self, origin: &AccountId, token: TokenId, to: H160, value: U256) { + fn transfer(&mut self, token: TokenId, to: H160, value: U256) { let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("transfer(uint32,address,uint256)"), (token, to, value).abi_encode(), 0, @@ -730,19 +696,12 @@ impl Contract { .unwrap() } - fn transfer_from( - &mut self, - origin: &AccountId, - token: TokenId, - from: H160, - to: H160, - value: U256, - ) { + fn transfer_from(&mut self, token: TokenId, from: H160, to: H160, value: U256) { let from = alloy::Address::from(from.0); let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); self.call( - origin.clone(), + &self.creator, keccak_selector("transferFrom(uint32,address,address,uint256)"), (token, from, to, value).abi_encode(), 0, @@ -756,12 +715,12 @@ impl Contract { fn call::RustType>>( &self, - origin: AccountId, + origin: &AccountId, selector: [u8; 4], params: Vec, value: Balance, ) -> Result { - let origin = RuntimeOrigin::signed(origin); + let origin = RuntimeOrigin::signed(origin.clone()); let dest = self.address.clone(); let data = [selector.as_slice(), params.as_slice()].concat(); let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index 9eeb2994e..4a4398b58 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -9,7 +9,7 @@ use pallet_revive::{ primitives as alloy, sol_types::{SolType, SolValue}, }, - test_utils::{ALICE, BOB}, + test_utils::{ALICE, BOB, CHARLIE}, AccountId32Mapper, AddressMapper, Code, DepositLimit, ExecReturnValue, H160, U256, }; #[cfg(feature = "devnet")] @@ -69,11 +69,16 @@ fn decode::RustType>>(data: &[u8]) -> } // Deploy, instantiate and return contract address. -fn instantiate(contract: impl AsRef, value: Balance, salt: Option<[u8; 32]>) -> H160 { +fn instantiate( + origin: RuntimeOrigin, + contract: impl AsRef, + value: Balance, + salt: Option<[u8; 32]>, +) -> H160 { let binary = std::fs::read(contract).expect("could not read .wasm file"); let result = Revive::bare_instantiate( - RuntimeOrigin::signed(ALICE), + origin, value, GAS_LIMIT, DepositLimit::Balance(Balance::MAX), @@ -141,8 +146,8 @@ impl ExtBuilder { .expect("Frame system builds valid default genesis config"); pallet_balances::GenesisConfig:: { - // CHARLIE has no initial balance. - balances: vec![(ALICE, INIT_AMOUNT), (BOB, INIT_AMOUNT)], + // DJANGO has no initial balance. + balances: vec![(ALICE, INIT_AMOUNT), (BOB, INIT_AMOUNT), (CHARLIE, INIT_AMOUNT)], ..Default::default() } .assimilate_storage(&mut t) From b609a9a64a134b8d37b069e8225f3195afc6da8a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 19 Jun 2025 21:45:18 +0100 Subject: [PATCH 099/284] test(api): add set_metadata test --- .../contracts/fungibles/lib.rs | 3 +- .../integration-tests/src/fungibles.rs | 86 +++++++++++++------ 2 files changed, 64 insertions(+), 25 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 1e73ec2fc..a614db09c 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -85,7 +85,8 @@ pub mod fungibles { #[ink(message)] fn setMetadata(&self, token: TokenId, name: String, symbol: String, decimals: u8) { - api::set_metadata(token, name, symbol, decimals); + api::set_metadata(token, name.clone(), symbol.clone(), decimals); + self.env().emit_event(MetadataSet { token, name, symbol, decimals }); } #[ink(message)] diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index f7c7dbdb8..7fd05874f 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -435,36 +435,74 @@ fn instantiate_and_create_fungible_works() { #[test] fn start_destroy_works() { - let token = 0; let owner = ALICE; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .build() - .execute_with(|| { - let mut contract = Contract::new(&owner, INIT_VALUE); + ExtBuilder::new().build().execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); - // Token does not exist. - // assert_eq!( - // contract.start_destroy(&creator, TokenId::MAX), - // Err(Module { index: 52, error: [3, 0] }), - // ); - // No Permission. - // assert_eq!( - // contract.start_destroy(&creator, token), - // Err(Module { index: 52, error: [2, 0] }), - // ); - let token = contract.create(to_address(&owner), 1.into()); - contract.start_destroy(token); - // Successfully emit event. - let expected = DestroyStarted { token }.encode(); - assert_eq!(contract.last_event(), expected); - }); + // Token does not exist. + // assert_eq!( + // contract.start_destroy(&creator, TokenId::MAX), + // Err(Module { index: 52, error: [3, 0] }), + // ); + // No Permission. + // assert_eq!( + // contract.start_destroy(&creator, token), + // Err(Module { index: 52, error: [2, 0] }), + // ); + let token = contract.create(to_address(&owner), 1.into()); + contract.start_destroy(token); + // Successfully emit event. + let expected = DestroyStarted { token }.encode(); + assert_eq!(contract.last_event(), expected); + }); } #[test] -#[ignore] fn set_metadata_works() { - todo!() + let owner = ALICE; + let name = "name".to_string(); + let symbol = "symbol".to_string(); + let decimals: u8 = 69; + ExtBuilder::new().build().execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); + + // Token does not exist. + // assert_eq!( + // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0u8), + // Err(Module { index: 52, error: [3, 0] }), + // ); + // No Permission. + // assert_eq!( + // set_metadata(&addr, token, vec![0], vec![0], 0u8), + // Err(Module { index: 52, error: [2, 0] }), + // ); + let token = contract.create(to_address(&owner), 1.into()); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0u8), + // Err(Module { index: 52, error: [16, 0] }), + // ); + thaw(&owner, token); + // TODO: calling the below with a vector of length `100_000` errors in pallet contracts + // `OutputBufferTooSmall. Added to security analysis issue #131 to revisit. + // Set bad metadata - too large values. + // assert_eq!( + // set_metadata(&addr, TOKEN_ID, vec![0; 1000], vec![0; 1000], 0u8), + // Err(Module { index: 52, error: [9, 0] }), + // ); + // Set metadata successfully. + contract.set_metadata(token, name.clone(), symbol.clone(), decimals); + // Successfully emit event. + let expected = MetadataSet { token, name, symbol, decimals }.encode(); + assert_eq!(contract.last_event(), expected); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&contract.account_id(), token); + // assert_eq!( + // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0), + // Err(Module { index: 52, error: [16, 0] }), + // ); + }); } #[test] From 8cc45b158e1224947f0ebdc4fe205c58182eface Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 12:41:34 +0100 Subject: [PATCH 100/284] test(api): update expectation message to .polkavm --- pop-api-vnext/integration-tests/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index 4a4398b58..ae7d4b109 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -75,7 +75,7 @@ fn instantiate( value: Balance, salt: Option<[u8; 32]>, ) -> H160 { - let binary = std::fs::read(contract).expect("could not read .wasm file"); + let binary = std::fs::read(contract).expect("could not read .polkavm file"); let result = Revive::bare_instantiate( origin, From 95eb9941035e152abfec9855cf72639686976c9d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 12:44:00 +0100 Subject: [PATCH 101/284] test(api): add clear_metadata test --- .../contracts/fungibles/lib.rs | 1 + .../integration-tests/src/fungibles.rs | 60 +++++++++++++++++-- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index a614db09c..0ffedb1e0 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -92,6 +92,7 @@ pub mod fungibles { #[ink(message)] fn clearMetadata(&self, token: TokenId) { api::clear_metadata(token); + self.env().emit_event(MetadataCleared { token }); } #[ink(message)] diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 7fd05874f..e67f316f4 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -493,6 +493,10 @@ fn set_metadata_works() { // ); // Set metadata successfully. contract.set_metadata(token, name.clone(), symbol.clone(), decimals); + assert_eq!( + (&contract.name(token), &contract.symbol(token), &contract.decimals(token)), + (&name, &symbol, &decimals) + ); // Successfully emit event. let expected = MetadataSet { token, name, symbol, decimals }.encode(); assert_eq!(contract.last_event(), expected); @@ -506,9 +510,50 @@ fn set_metadata_works() { } #[test] -#[ignore] fn clear_metadata_works() { - todo!() + let token = 0; + let owner = ALICE; + let name = "name".to_string(); + let symbol = "symbol".to_string(); + let decimals: u8 = 69; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); + + // Token does not exist. + // assert_eq!(contract.clear_metadata(TokenId::MAX), Err(Module { index: 52, error: [3, + // 0] }),); + // No Permission. + // assert_eq!(contract.clear_metadata(token), Err(Module { index: 52, error: [2, 0] + // }),); + let token = contract.create(to_address(&owner), 1.into()); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + // assert_eq!( + // contract.clear_metadata(&addr, token), + // Err(Module { index: 52, error: [16, 0] }), + // ); + thaw(&owner, token); + // No metadata set. + // assert_eq!( + // contract.clear_metadata(&addr, token), + // Err(Module { index: 52, error: [3, 0] }), + // ); + contract.set_metadata(token, name, symbol, decimals); + // Clear metadata successfully. + contract.clear_metadata(token); + // Successfully emit event. + let expected = MetadataCleared { token }.encode(); + assert_eq!(contract.last_event(), expected); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&contract.account_id(), token); + // assert_eq!( + // contract.set_metadata(&addr, TOKEN_ID, vec![0], vec![0], decimals), + // Err(Module { index: 52, error: [16, 0] }), + // ); + }); } #[test] @@ -611,8 +656,13 @@ impl Contract { } fn clear_metadata(&mut self, token: TokenId) { - self.call(&self.creator, keccak_selector("clearMetadata(uint32)"), (token,).abi_encode(), 0) - .unwrap() + self.call( + &self.account_id(), // clear_metadata restricted to asset owner + keccak_selector("clearMetadata(uint32)"), + (token,).abi_encode(), + 0, + ) + .unwrap() } fn create(&mut self, admin: H160, min_balance: U256) -> TokenId { @@ -691,7 +741,7 @@ impl Contract { fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { self.call( - &self.creator, + &self.account_id(), // set_metadata restricted to asset owner keccak_selector("setMetadata(uint32,string,string,uint8)"), (token, name, symbol, decimals as u16).abi_encode(), 0, From 793078e1f77d42adfc4f58eef0a38582efe299df Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 13:17:55 +0100 Subject: [PATCH 102/284] test(api): reuse sol types to ease encoding --- pop-api-vnext/integration-tests/Cargo.toml | 2 + .../integration-tests/src/fungibles.rs | 172 +++++------------- pop-api-vnext/integration-tests/src/lib.rs | 2 +- 3 files changed, 52 insertions(+), 124 deletions(-) diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index 514c7aed0..7b872b734 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -16,6 +16,7 @@ env_logger.workspace = true frame-support = { workspace = true, default-features = false } frame-system = { workspace = true, default-features = false } log.workspace = true +pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles" ] } pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } @@ -33,6 +34,7 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", + "pallet-api-vnext/std", "pallet-assets/std", "pallet-balances/std", "pallet-revive/std", diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index e67f316f4..a0270f41f 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -4,6 +4,11 @@ use frame_support::{ approvals::Inspect as _, metadata::Inspect as _, roles::Inspect as _, Inspect as _, }, }; +use pallet_api_vnext::fungibles::precompiles::IFungibles::{ + allowanceCall, approveCall, balanceOfCall, burnCall, clearMetadataCall, createCall, + decimalsCall, decreaseAllowanceCall, existsCall, increaseAllowanceCall, mintCall, nameCall, + setMetadataCall, startDestroyCall, symbolCall, totalSupplyCall, transferCall, transferFromCall, +}; use pop_api::fungibles::events::*; use pop_primitives::TokenId; use sp_io::hashing::twox_256; @@ -605,220 +610,141 @@ impl Contract { fn allowance(&self, token: TokenId, owner: H160, spender: H160) -> U256 { let owner = alloy::Address::from(owner.0); let spender = alloy::Address::from(spender.0); - U256::from_little_endian( - self.call::( - &self.creator, - keccak_selector("allowance(uint32,address,address)"), - (token, owner, spender).abi_encode(), - 0, - ) - .unwrap() - .as_le_slice(), - ) + let call = allowanceCall { token, owner, spender }; + U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) } fn approve(&mut self, token: TokenId, spender: H160, value: U256) { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - self.call( - &self.creator, - keccak_selector("approve(uint32,address,uint256)"), - (token, spender, value).abi_encode(), - 0, - ) - .unwrap() + let call = approveCall { token, spender, value }; + self.call(&self.creator, call, 0).unwrap(); } fn balance_of(&self, token: TokenId, owner: H160) -> U256 { let owner = alloy::Address::from(owner.0); - U256::from_little_endian( - self.call::( - &self.creator, - keccak_selector("balanceOf(uint32,address)"), - (token, owner).abi_encode(), - 0, - ) - .unwrap() - .as_le_slice(), - ) + let call = balanceOfCall { token, owner }; + U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) } fn burn(&mut self, token: TokenId, account: H160, value: U256) { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - self.call( - &self.creator, - keccak_selector("burn(uint32,address,uint256)"), - (token, account, value).abi_encode(), - 0, - ) - .unwrap() + let call = burnCall { token, account, value }; + self.call(&self.creator, call, 0).unwrap(); } fn clear_metadata(&mut self, token: TokenId) { + let call = clearMetadataCall { token }; self.call( &self.account_id(), // clear_metadata restricted to asset owner - keccak_selector("clearMetadata(uint32)"), - (token,).abi_encode(), + call, 0, ) - .unwrap() + .unwrap(); } fn create(&mut self, admin: H160, min_balance: U256) -> TokenId { let admin = alloy::Address::from(admin.0); let min_balance = alloy::U256::from_be_bytes(min_balance.to_big_endian()); - self.call( - &self.creator, - keccak_selector("create(address,uint256)"), - (admin, min_balance).abi_encode(), - 0, - ) - .unwrap() + let call = createCall { admin, minBalance: min_balance }; + self.call(&self.creator, call, 0).unwrap() } fn decimals(&self, token: TokenId) -> u8 { - self.call::( - &self.creator, - keccak_selector("decimals(uint32)"), - (token,).abi_encode(), - 0, - ) - .unwrap() as u8 + let call = decimalsCall { token }; + self.call(&self.creator, call, 0).unwrap() } fn decrease_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - U256::from_little_endian( - self.call::( - &self.creator, - keccak_selector("decreaseAllowance(uint32,address,uint256)"), - (token, spender, value).abi_encode(), - 0, - ) - .unwrap() - .as_le_slice(), - ) + let call = decreaseAllowanceCall { token, spender, value }; + U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) } fn exists(&self, token: TokenId) -> bool { - self.call(&self.creator, keccak_selector("exists(uint32)"), (token,).abi_encode(), 0) - .unwrap() + let call = existsCall { token }; + self.call(&self.creator, call, 0).unwrap() } fn increase_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - U256::from_little_endian( - self.call::( - &self.creator, - keccak_selector("increaseAllowance(uint32,address,uint256)"), - (token, spender, value).abi_encode(), - 0, - ) - .unwrap() - .as_le_slice(), - ) + let call = increaseAllowanceCall { token, spender, value }; + U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) } fn mint(&mut self, token: TokenId, account: H160, value: U256) { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - self.call( - &self.creator, - keccak_selector("mint(uint32,address,uint256)"), - (token, account, value).abi_encode(), - 0, - ) - .unwrap() + let call = mintCall { token, account, value }; + self.call(&self.creator, call, 0).unwrap(); } fn name(&self, token: TokenId) -> String { - self.call(&self.creator, keccak_selector("name(uint32)"), (token,).abi_encode(), 0) - .unwrap() + let call = nameCall { token }; + self.call(&self.creator, call, 0).unwrap() } fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { + let call = setMetadataCall { token, name, symbol, decimals }; self.call( &self.account_id(), // set_metadata restricted to asset owner - keccak_selector("setMetadata(uint32,string,string,uint8)"), - (token, name, symbol, decimals as u16).abi_encode(), + call, 0, ) - .unwrap() + .unwrap(); } fn start_destroy(&mut self, token: TokenId) { - self.call(&self.creator, keccak_selector("startDestroy(uint32)"), (token,).abi_encode(), 0) - .unwrap() + let call = startDestroyCall { token }; + self.call(&self.creator, call, 0).unwrap(); } fn symbol(&self, token: TokenId) -> String { - self.call(&self.creator, keccak_selector("symbol(uint32)"), (token,).abi_encode(), 0) - .unwrap() + let call = symbolCall { token }; + self.call(&self.creator, call, 0).unwrap() } fn total_supply(&self, token: TokenId) -> U256 { - U256::from_little_endian( - self.call::( - &self.creator, - keccak_selector("totalSupply(uint32)"), - (token,).abi_encode(), - 0, - ) - .unwrap() - .as_le_slice(), - ) + let call = totalSupplyCall { token }; + U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) } fn transfer(&mut self, token: TokenId, to: H160, value: U256) { let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - self.call( - &self.creator, - keccak_selector("transfer(uint32,address,uint256)"), - (token, to, value).abi_encode(), - 0, - ) - .unwrap() + let call = transferCall { token, to, value }; + self.call(&self.creator, call, 0).unwrap(); } fn transfer_from(&mut self, token: TokenId, from: H160, to: H160, value: U256) { let from = alloy::Address::from(from.0); let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); - self.call( - &self.creator, - keccak_selector("transferFrom(uint32,address,address,uint256)"), - (token, from, to, value).abi_encode(), - 0, - ) - .unwrap() + let call = transferFromCall { token, from, to, value }; + self.call(&self.creator, call, 0).unwrap(); } fn account_id(&self) -> AccountId { to_account_id(&self.address) } - fn call::RustType>>( + fn call( &self, origin: &AccountId, - selector: [u8; 4], - params: Vec, + call: T, value: Balance, - ) -> Result { + ) -> Result { let origin = RuntimeOrigin::signed(origin.clone()); let dest = self.address.clone(); - let data = [selector.as_slice(), params.as_slice()].concat(); + let data = call.abi_encode(); let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) .expect("should work"); match result.did_revert() { - true => { - println!("{:?}", result.data); - todo!("error conversion") - }, - false => Ok(decode::(&result.data)), + true => todo!("error conversion: {:?}", result.data), + false => Ok(T::abi_decode_returns(&result.data).expect("unable to decode")), } } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index ae7d4b109..b252633f6 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -7,7 +7,7 @@ use pallet_assets::{Instance1, NextAssetId}; use pallet_revive::{ precompiles::alloy::{ primitives as alloy, - sol_types::{SolType, SolValue}, + sol_types::{SolCall, SolType, SolValue}, }, test_utils::{ALICE, BOB, CHARLIE}, AccountId32Mapper, AddressMapper, Code, DepositLimit, ExecReturnValue, H160, U256, From ef8e50506af356bbcc58f4dc9a8ddd8225f8ae9a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 14:02:50 +0100 Subject: [PATCH 103/284] test(api): add mint test --- .../integration-tests/src/fungibles.rs | 63 ++++++++++++++----- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index a0270f41f..768d36376 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -581,9 +581,52 @@ fn exists_works() { } #[test] -#[ignore] fn mint_works() { - todo!() + let token = 0; + let owner = ALICE; + let account = BOB; + let amount: Balance = 100 * UNIT; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); + + // Token does not exist. + // assert_eq!(mint(&addr, TokenId::MAX, &BOB, amount), Err(Token(UnknownAsset))); + // Minting can only be done by the owner. + // assert_eq!( + // contract.mint(token, &to_address(&account), 1.into()), + // Err(Module { index: 52, error: [2, 0] }) + // ); + // Contract must be admin in order to be able to mint. + let token = contract.create(contract.address, 2.into()); + // Minimum balance of a token can not be zero. + // assert_eq!(contract.mint(token, &account, 1.into()), Err(Token(BelowMinimum))); + // Token is not live, i.e. frozen or being destroyed. + freeze(&contract.account_id(), token); + // assert_eq!( + // contract.mint(token, to_address(&account), amount), + // Err(Module { index: 52, error: [16, 0] }) + // ); + thaw(&contract.account_id(), token); + // Successful mint. + let balance_before_mint = Assets::balance(token, &account); + contract.mint(token, to_address(&account), amount.into()); + let balance_after_mint = Assets::balance(token, &account); + assert_eq!(balance_after_mint, balance_before_mint + amount); + // Account can not hold more tokens than Balance::MAX. + // assert_eq!( + // contract.mint(token, to_address(&account), Balance::MAX.into()), + // Err(Arithmetic(Overflow)) + // ); + // Token is being destroyed. + start_destroy(&contract.account_id(), token); + // assert_eq!( + // contract.mint(token, to_address(&account), amount.into()), + // Err(Token(UnknownAsset)) + // ); + }); } #[test] @@ -636,12 +679,7 @@ impl Contract { fn clear_metadata(&mut self, token: TokenId) { let call = clearMetadataCall { token }; - self.call( - &self.account_id(), // clear_metadata restricted to asset owner - call, - 0, - ) - .unwrap(); + self.call(&self.creator, call, 0).unwrap(); } fn create(&mut self, admin: H160, min_balance: U256) -> TokenId { @@ -689,12 +727,7 @@ impl Contract { fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { let call = setMetadataCall { token, name, symbol, decimals }; - self.call( - &self.account_id(), // set_metadata restricted to asset owner - call, - 0, - ) - .unwrap(); + self.call(&self.creator, call, 0).unwrap(); } fn start_destroy(&mut self, token: TokenId) { @@ -743,7 +776,7 @@ impl Contract { let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) .expect("should work"); match result.did_revert() { - true => todo!("error conversion: {:?}", result.data), + true => todo!("error conversion: {:?}", String::from_utf8_lossy(&result.data)), false => Ok(T::abi_decode_returns(&result.data).expect("unable to decode")), } } From a5f351b12d5b73cfb749c1f06da90587f649a004 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 14:18:29 +0100 Subject: [PATCH 104/284] test(api): add burn test --- .../integration-tests/src/fungibles.rs | 50 ++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 768d36376..be3ddf874 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -630,9 +630,55 @@ fn mint_works() { } #[test] -#[ignore] fn burn_works() { - todo!() + let token = 0; + let owner = ALICE; + let account = BOB; + let amount: Balance = 100 * UNIT; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_balances(vec![(token, account.clone(), amount)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); + + // Token does not exist. + // assert_eq!( + // contract.burn(&addr, TokenId::MAX, &account, 0.into()), + // Err(Module { index: 52, error: [3, 0] }) + // ); + // Account has no tokens. + // assert_eq!( + // contract.burn(token, to_address(&account), amount.into()), + // Err(Module { index: 52, error: [0, 0] }) + // ); + // Burning can only be done by the manager. + // assert_eq!( + // contract.burn(token, to_address(&account), 1.into()), + // Err(Module { index: 52, error: [2, 0] }) + // ); + // Contract must be admin in order to be able to burn. + let token = contract.create(contract.address, 1.into()); + contract.mint(token, to_address(&account), (amount * 2).into()); + // Token is not live, i.e. frozen or being destroyed. + freeze(&contract.account_id(), token); + // assert_eq!( + // contract.burn(token, to_address(&account), amount.into()), + // Err(Module { index: 52, error: [16, 0] }) + // ); + thaw(&contract.account_id(), token); + // Successful mint. + let balance_before_burn = Assets::balance(token, &account); + contract.burn(token, to_address(&account), amount.into()); + let balance_after_burn = Assets::balance(token, &account); + assert_eq!(balance_after_burn, balance_before_burn - amount); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&contract.account_id(), token); + // assert_eq!( + // contract.burn(token, to_address(&account), amount), + // Err(Module { index: 52, error: [17, 0] }) + // ); + }); } // A simple, strongly typed wrapper for the contract. From 39ac3cec39b369ccc44eed178c76f0d0c4bc3bf0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 20 Jun 2025 14:46:20 +0100 Subject: [PATCH 105/284] test(api): add create with instantiation test --- .../contracts/fungibles/lib.rs | 18 ++++++++++++ .../integration-tests/src/fungibles.rs | 29 +++++++++++++++++-- pop-api-vnext/integration-tests/src/lib.rs | 3 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 0ffedb1e0..df055b2ae 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -19,6 +19,24 @@ pub mod fungibles { pub fn new() -> Self { Self {} } + + #[ink(constructor, payable)] + pub fn create(min_balance: U256) -> Self { + let contract = Self {}; + // Account of the contract which will be set to the owner of the fungible token. + let owner = contract.env().address(); + match api::create(owner, min_balance) { + Ok(id) => { + contract.env().emit_event(Created { + id, + creator: contract.env().caller(), + admin: owner, + }); + contract + }, + Err(error) => revert(&error), + } + } } impl Fungibles for Fungible { diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index be3ddf874..ddb1764b9 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -433,9 +433,21 @@ fn create_works() { // Testing a contract that creates a token in the constructor. #[test] -#[ignore] fn instantiate_and_create_fungible_works() { - todo!() + let token = 1; + let owner = ALICE; + ExtBuilder::new().build().execute_with(|| { + assert!(!Assets::asset_exists(token)); + + // Successfully create a token when instantiating the contract. + let mut contract = Contract::new_with_create(&owner, INIT_VALUE, 1.into()); + assert_eq!(Assets::owner(token), Some(contract.account_id())); + assert!(Assets::asset_exists(token)); + // Successfully emit event. + let creator = to_address(&owner); + let expected = Created { id: token, creator, admin: contract.address }.encode(); + assert_eq!(contract.last_event(), expected); + }); } #[test] @@ -690,9 +702,20 @@ struct Contract { impl Contract { // Create a new instance of the contract through on-chain instantiation. fn new(origin: &AccountId, value: Balance) -> Self { + let data = blake_selector("new").to_vec(); + let salt = twox_256(&value.to_le_bytes()); + + let address = + instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); + Self { address, creator: origin.clone() } + } + + // Create a new instance of the contract through on-chain instantiation. + fn new_with_create(origin: &AccountId, value: Balance, min_balance: U256) -> Self { + let data = [blake_selector("create").to_vec(), min_balance.encode()].concat(); let salt = twox_256(&value.to_le_bytes()); let address = - instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, Some(salt)); + instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); Self { address, creator: origin.clone() } } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index b252633f6..b9671c3fa 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -73,6 +73,7 @@ fn instantiate( origin: RuntimeOrigin, contract: impl AsRef, value: Balance, + data: Vec, salt: Option<[u8; 32]>, ) -> H160 { let binary = std::fs::read(contract).expect("could not read .polkavm file"); @@ -83,7 +84,7 @@ fn instantiate( GAS_LIMIT, DepositLimit::Balance(Balance::MAX), Code::Upload(binary), - blake_selector("new").to_vec(), + data, salt, ) .result From 412b82db7086eec113d4cde54e9ab619d576b626 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 17:07:38 +0100 Subject: [PATCH 106/284] feat(api): initial precompile benchmarking --- pallets/api-vnext/Cargo.toml | 5 + .../api-vnext/src/fungibles/benchmarking.rs | 276 ++++++++++++++++++ pallets/api-vnext/src/fungibles/mod.rs | 118 ++++---- .../src/fungibles/precompiles/erc20.rs | 14 +- .../src/fungibles/precompiles/mod.rs | 62 ++-- pallets/api-vnext/src/fungibles/weights.rs | 242 +++++++++++++++ pallets/api-vnext/src/lib.rs | 14 +- pallets/api-vnext/src/mock.rs | 21 +- runtime/devnet/src/config/api/mod.rs | 4 + runtime/devnet/src/lib.rs | 3 + 10 files changed, 655 insertions(+), 104 deletions(-) create mode 100644 pallets/api-vnext/src/fungibles/benchmarking.rs create mode 100644 pallets/api-vnext/src/fungibles/weights.rs diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index fcb813991..ebf32e521 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -13,6 +13,7 @@ doctest = false [dependencies] codec.workspace = true +frame-benchmarking.workspace = true frame-support.workspace = true frame-system.workspace = true pallet-assets = { workspace = true, default-features = false, optional = true } @@ -28,17 +29,21 @@ sp-io.workspace = true default = [ "fungibles", "std" ] fungibles = [ "pallet-assets" ] runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-revive/runtime-benchmarks", ] std = [ + "codec/std", + "frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-assets?/std", "pallet-balances/std", "pallet-revive/std", "pallet-timestamp/std", + "scale-info/std", "sp-io/std", ] diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs new file mode 100644 index 000000000..32799eff3 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -0,0 +1,276 @@ +//! Benchmarking setup for pallet_api::fungibles::precompiles + +use alloc::vec; + +use frame_benchmarking::v2::{whitelisted_caller as allowlisted_caller, *}; +use frame_support::{ + assert_ok, + pallet_prelude::IsType, + traits::{ + fungible::{Inspect, Mutate as _}, + fungibles::{ + approvals::{self, Inspect as _}, + metadata, Create, + }, + Get, Time, + }, +}; +use pallet_revive::{ + precompiles::{ + alloy::primitives as alloy, + run::{precompile, CallSetup, WasmModule, H256, U256}, + }, + test_utils::{ALICE_ADDR, BOB_ADDR}, + AddressMapper as _, Origin, +}; + +use super::{ + precompiles::{IFungibles::*, IFungiblesCalls, UintTryFrom, UintTryTo}, + Config, NextAssetId, Pallet, +}; +use crate::fixed_address; +#[cfg(test)] +use crate::mock::{ExtBuilder, Test}; + +const FUNGIBLES: u16 = 100; +const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); + +type AddressMapper = ::AddressMapper; +type Assets = pallet_assets::Pallet; +type AssetsBalance = >::Balance; +type AssetsStringLimit = >::StringLimit; +type Balances = ::Currency; +type Fungibles = super::Fungibles; +type TokenId = >::AssetId; + +#[instance_benchmarks( + where + // Precompiles + T: pallet_revive::Config< + Currency: Inspect<::AccountId, Balance: Into + TryFrom>, + Hash: IsType, + Time: Time> + >, + // Fungibles + T: pallet_assets::Config + Into>, + alloy::U256: UintTryFrom> + UintTryTo> +)] +mod benchmarks { + use super::*; + + // Parameter: + // - 'a': whether `approve_transfer` is required. + // - 'c': whether `cancel_approval` is required. + #[benchmark] + fn approve(a: Linear<0, 1>, c: Linear<0, 1>) -> Result<(), BenchmarkError> { + let owner = >::to_account_id(&ALICE_ADDR); + let spender = >::to_account_id(&BOB_ADDR); + let current_allowance = >::from(u32::MAX / 2); + // Set the `current_allowance`. + let token = create::(); + >::set_balance(&owner, u32::MAX.into()); + assert_ok!( as approvals::Mutate>::approve( + token.clone(), + &owner, + &spender, + current_allowance, + )); + let approval_value = match (a, c) { + // Equal to the current allowance. + (0, 0) => current_allowance, + // Greater than the current allowance. + (1, 0) => >::from(u32::MAX), + // Zero. + (0, 1) => >::from(0u32), + // Smaller than the current allowance. + (1, 1) => >::from(u32::MAX / 4), + _ => unreachable!("values can only be 0 or 1"), + }; + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::approve(approveCall { + token: token.clone().into(), + spender: >::to_address(&spender).0.into(), + value: alloy::U256::from(approval_value), + }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::allowance(token.clone(), &owner, &spender), approval_value); + if c == 1 { + assert_has_event::( + pallet_assets::Event::ApprovalCancelled { + asset_id: token.clone(), + owner: owner.clone(), + delegate: spender.clone(), + } + .into(), + ); + } + if a == 1 { + let amount = match c { + // When the allowance was cancelled and then approved with the new value. + 1 => approval_value, + // When the allowance was increased. + 0 => approval_value - current_allowance, + _ => unreachable!("`c` can only be 0 or 1"), + }; + assert_has_event::( + pallet_assets::Event::ApprovedTransfer { + asset_id: token, + source: owner, + delegate: spender, + amount, + } + .into(), + ); + } + Ok(()) + } + + #[benchmark] + fn total_supply() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::totalSupply(totalSupplyCall { token: 0 }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn balance_of() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let token = create::(); + let input = IFungiblesCalls::balanceOf(balanceOfCall { + token: token.into(), + owner: ALICE_ADDR.0.into(), + }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn allowance() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let token = create::(); + let input = IFungiblesCalls::allowance(allowanceCall { + token: token.into(), + owner: ALICE_ADDR.0.into(), + spender: BOB_ADDR.0.into(), + }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn token_name() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let token = create::(); + let input = IFungiblesCalls::name(nameCall { token: token.into() }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn symbol() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let token = create::(); + let input = IFungiblesCalls::symbol(symbolCall { token: token.into() }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn decimals() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::decimals(decimalsCall { token: 0 }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + #[benchmark] + fn exists() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::exists(existsCall { token: 0 }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + + impl_benchmark_test_suite!(Pallet, ExtBuilder::new().build(), Test); +} + +// Ensure `event` has been emitted. +fn assert_has_event, I>( + event: >::RuntimeEvent, +) { + frame_system::Pallet::::assert_has_event(event.into()); +} + +fn create + pallet_assets::Config + pallet_revive::Config, I>( +) -> TokenId { + let token = NextAssetId::::get().unwrap_or_default(); + let admin: T::AccountId = allowlisted_caller(); + >::set_balance(&admin, u32::MAX.into()); + assert_ok!( as Create>::create( + token.clone(), + admin.clone(), + true, + 1u32.into() + )); + + let max = AssetsStringLimit::::get() as usize; + assert_ok!( as metadata::Mutate>::set( + token.clone(), + &admin, + vec![255u8; max], + vec![255u8; max], + u8::MAX + )); + + token +} + +fn set_up_call< + T: pallet_revive::Config< + Currency: Inspect< + ::AccountId, + Balance: Into + TryFrom, + >, + Hash: IsType, + Time: Time>, + >, +>() -> CallSetup { + CallSetup::::new(WasmModule::dummy()) +} diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index 6bbb6b971..86403a76d 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -14,30 +14,51 @@ use frame_support::{ weights::Weight, }; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; -use pallet_assets::{Config, NextAssetId}; +pub use pallet::*; +use pallet_assets::NextAssetId; +pub use precompiles::{Erc20, Fungibles}; +use weights::WeightInfo; use AddressMatcher::Fixed; use super::*; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; /// The fungibles precompiles offer a streamlined interface for interacting with fungible tokens. pub mod precompiles; +pub mod weights; -type AssetIdOf = >::AssetId; -type BalanceOf = >::Balance; +type AssetIdOf = >::AssetId; +type BalanceOf = >::Balance; +type WeightOf = >::WeightInfo; -fn approve, I>( +#[frame_support::pallet] +pub mod pallet { + use super::weights::WeightInfo; + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Weight information for precompiles in this pallet. + type WeightInfo: WeightInfo; + } + + #[pallet::pallet] + pub struct Pallet(_); +} + +fn approve + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, spender: AccountIdOf, value: BalanceOf, ) -> DispatchResultWithPostInfo { - // TODO: weights - let owner = ensure_signed(origin.clone()).map_err(|e| e.with_weight(Weight::zero()))?; + let owner = ensure_signed(origin.clone()) + .map_err(|e| e.with_weight(>::approve(0, 0)))?; let current_allowance = >::allowance(asset.clone(), &owner, &spender); let weight = match value.cmp(¤t_allowance) { // If the new value is equal to the current allowance, do nothing. - Equal => Weight::zero(), + Equal => >::approve(0, 0), // If the new value is greater than the current allowance, approve the difference // because `approve_transfer` works additively (see `pallet-assets`). Greater => { @@ -47,8 +68,8 @@ fn approve, I>( T::Lookup::unlookup(spender), value.saturating_sub(current_allowance), ) - .map_err(|e| e.with_weight(Weight::zero()))?; - Weight::zero() + .map_err(|e| e.with_weight(>::approve(1, 0)))?; + >::approve(1, 0) }, // If the new value is less than the current allowance, cancel the approval and // set the new value. @@ -59,19 +80,19 @@ fn approve, I>( asset.clone().into(), spender_source.clone(), ) - .map_err(|e| e.with_weight(Weight::zero()))?; + .map_err(|e| e.with_weight(>::approve(0, 1)))?; if value.is_zero() { - Weight::zero() + >::approve(0, 1) } else { >::approve_transfer(origin, asset.into(), spender_source, value)?; - Weight::zero() + >::approve(1, 1) } }, }; Ok(Some(weight).into()) } -fn burn, I>( +fn burn + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, account: AccountIdOf, @@ -80,18 +101,20 @@ fn burn, I>( let current_balance = >::balance(asset.clone(), &account); if current_balance < value { return Err(pallet_assets::Error::::BalanceLow - // TODO: weight: ::WeightInfo::balance_of() - .with_weight(Weight::zero())); + .with_weight(>::WeightInfo::balance_of())); } >::burn(origin, asset.into(), T::Lookup::unlookup(account.clone()), value)?; Ok(().into()) } -fn clear_metadata, I>(origin: OriginFor, asset: AssetIdOf) -> DispatchResult { +fn clear_metadata, I>( + origin: OriginFor, + asset: AssetIdOf, +) -> DispatchResult { >::clear_metadata(origin, asset.into()) } -fn create, I>( +fn create, I>( origin: OriginFor, admin: AccountIdOf, min_balance: BalanceOf, @@ -101,69 +124,48 @@ fn create, I>( Ok(id) } -fn decrease_allowance, I>( +fn decrease_allowance + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, spender: AccountIdOf, value: BalanceOf, ) -> Result<(BalanceOf, Option), DispatchErrorWithPostInfo> { - let owner = ensure_signed(origin.clone()).map_err(|e| { - e.with_weight( - // TODO: WeightOf::::approve(0, 0) - Weight::zero(), - ) - })?; + let owner = ensure_signed(origin.clone()) + .map_err(|e| e.with_weight(>::approve(0, 0)))?; if value.is_zero() { - return Ok(( - value, - Some( - // TODO: WeightOf::::approve(0, 0) - Weight::zero(), - ), - )); + return Ok((value, Some(>::approve(0, 0)))); } let current_allowance = >::allowance(asset.clone(), &owner, &spender); let spender_source = T::Lookup::unlookup(spender.clone()); - let asset_param: >::AssetIdParameter = asset.clone().into(); + let asset_param: >::AssetIdParameter = asset.clone().into(); // Cancel the approval and approve `new_allowance` if difference is more than zero. let new_allowance = current_allowance .checked_sub(&value) .ok_or(pallet_assets::Error::::Unapproved)?; >::cancel_approval(origin.clone(), asset_param.clone(), spender_source.clone()) - .map_err(|e| { - e.with_weight( - // TODO: WeightOf::::approve(0, 1) - Weight::zero(), - ) - })?; + .map_err(|e| e.with_weight(>::approve(0, 1)))?; let weight = if new_allowance.is_zero() { - // TODO: WeightOf::::approve(0, 1) - Weight::zero() + >::approve(0, 1) } else { >::approve_transfer(origin, asset_param, spender_source, new_allowance)?; - // TODO: WeightOf::::approve(1, 1) - Weight::zero() + >::approve(1, 1) }; Ok((new_allowance, Some(weight).into())) } -fn exists, I>(asset: AssetIdOf) -> bool { +fn exists, I>(asset: AssetIdOf) -> bool { >::asset_exists(asset) } -fn increase_allowance, I>( +fn increase_allowance + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, spender: AccountIdOf, value: BalanceOf, ) -> Result, DispatchErrorWithPostInfo> { - let owner = ensure_signed(origin.clone()).map_err(|e| { - e.with_weight( - // TODO: WeightOf::::approve(0, 0) - Weight::zero(), - ) - })?; + let owner = ensure_signed(origin.clone()) + .map_err(|e| e.with_weight(>::approve(0, 0)))?; >::approve_transfer( origin, asset.clone().into(), @@ -172,14 +174,13 @@ fn increase_allowance, I>( ) .map_err(|e| { e.with_weight( - // TODO: AssetsWeightInfoOf::::approve_transfer() - Weight::zero(), + <>::WeightInfo as pallet_assets::WeightInfo>::approve_transfer(), ) })?; Ok(>::allowance(asset, &owner, &spender)) } -fn mint, I>( +fn mint, I>( origin: OriginFor, asset: AssetIdOf, account: AccountIdOf, @@ -188,7 +189,7 @@ fn mint, I>( >::mint(origin, asset.into(), T::Lookup::unlookup(account), value) } -fn set_metadata, I>( +fn set_metadata, I>( origin: OriginFor, asset: AssetIdOf, name: Vec, @@ -198,11 +199,14 @@ fn set_metadata, I>( >::set_metadata(origin, asset.into(), name, symbol, decimals) } -fn start_destroy, I>(origin: OriginFor, asset: AssetIdOf) -> DispatchResult { +fn start_destroy, I>( + origin: OriginFor, + asset: AssetIdOf, +) -> DispatchResult { >::start_destroy(origin, asset.into()) } -fn transfer, I>( +fn transfer, I>( origin: OriginFor, asset: AssetIdOf, to: AccountIdOf, @@ -211,7 +215,7 @@ fn transfer, I>( >::transfer(origin, asset.into(), T::Lookup::unlookup(to.clone()), value) } -fn transfer_from, I>( +fn transfer_from, I>( origin: OriginFor, asset: AssetIdOf, from: AccountIdOf, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index f582ad148..9476bba1c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -17,10 +17,13 @@ use super::{ sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); /// Precompile providing an interface of the ERC-20 standard as defined in the ERC. -pub struct Erc20(PhantomData<(T, I)>); +pub struct Erc20(PhantomData<(T, I)>); impl< const PREFIX: u16, - T: frame_system::Config + Config + pallet_revive::Config, + T: frame_system::Config + + pallet_assets::Config + + pallet_revive::Config + + Config, I: 'static, > Precompile for Erc20 where @@ -129,7 +132,7 @@ where } } -impl, I: 'static> Erc20 { +impl, I: 'static> Erc20 { /// The address of the precompile. pub fn address(id: u32) -> [u8; 20] { prefixed_address(PREFIX, id) @@ -142,7 +145,6 @@ mod tests { assert_ok, sp_runtime::{app_crypto::sp_core::bytes::to_hex, DispatchError}, }; - use pallet_assets::Instance1; use pallet_revive::{ precompiles::alloy::sol_types::{SolInterface, SolType, SolValue}, test_utils::{ALICE, BOB, CHARLIE}, @@ -243,7 +245,7 @@ mod tests { .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { - assert_ok!(approve::( + assert_ok!(approve::( RuntimeOrigin::signed(owner.clone()), token, BOB, @@ -310,7 +312,7 @@ mod tests { .execute_with(|| { assert_eq!(Assets::balance(token, &from), endowment); assert_eq!(Assets::balance(token, &to), 0); - assert_ok!(approve::( + assert_ok!(approve::( RuntimeOrigin::signed(from.clone()), token, origin.clone(), diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 3929bf30d..82afabced 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -2,14 +2,16 @@ use alloc::string::String; pub use erc20::{Erc20, IERC20}; use frame_support::traits::fungibles::metadata::Inspect as _; -use pallet_revive::precompiles::alloy::{ +pub(super) use pallet_revive::precompiles::alloy::{ primitives::{ ruint::{UintTryFrom, UintTryTo}, Address, }, sol_types::SolCall, }; -use IFungibles::*; +use pallet_revive::precompiles::RuntimeCosts; +use weights::WeightInfo; +pub(super) use IFungibles::*; use super::*; @@ -20,16 +22,18 @@ sol!("src/fungibles/precompiles/interfaces/IFungibles.sol"); /// The fungibles precompile offers a streamlined interface for interacting with fungible tokens. /// The goal is to provide a simplified, consistent API that adheres to standards in the smart /// contract space. -pub struct Fungibles(PhantomData<(T, I)>); +pub struct Fungibles(PhantomData<(T, I)>); impl< const FIXED: u16, T: frame_system::Config - + Config + Into> - + pallet_revive::Config, + + pallet_assets::Config + Into> + + pallet_revive::Config + + Config, I: 'static, > Precompile for Fungibles where - U256: UintTryFrom + UintTryTo<>::Balance>, + U256: UintTryFrom<>::Balance> + + UintTryTo<>::Balance>, { type Interface = IFungiblesCalls; type T = T; @@ -82,17 +86,24 @@ where Ok(transferFromCall::abi_encode_returns(&transferFromReturn {})) }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { - // TODO: charge based on benchmarked weight + let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - self::approve::( + let result = self::approve::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), value.saturating_to(), - ) // TODO: adjust weight + ) .map_err(|e| e.error)?; + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + let spender = *spender; deposit_event( env, @@ -207,48 +218,45 @@ where Ok(burnCall::abi_encode_returns(&burnReturn {})) }, IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::total_supply())?; let total_supply = U256::saturating_from(>::total_supply((*token).into())); Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, IFungiblesCalls::balanceOf(balanceOfCall { token, owner }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*owner.0).into()); let balance = U256::saturating_from(>::balance((*token).into(), account)); Ok(balanceOfCall::abi_encode_returns(&balance)) }, IFungiblesCalls::allowance(allowanceCall { token, owner, spender }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::allowance())?; let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); - let remaining = U256::saturating_from(>::allowance( - (*token).into(), - &owner, - &spender, - )); + let allowance = >::allowance((*token).into(), &owner, &spender); + let remaining = U256::saturating_from(allowance); Ok(allowanceCall::abi_encode_returns(&remaining)) }, IFungiblesCalls::name(nameCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::token_name())?; let result = >::name((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::symbol(symbolCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::symbol())?; let result = >::symbol((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::decimals(decimalsCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::decimals())?; let result = >::decimals((*token).into()); Ok(decimalsCall::abi_encode_returns(&result)) }, IFungiblesCalls::exists(existsCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::exists())?; let result = self::exists::((*token).into()); Ok(existsCall::abi_encode_returns(&result)) }, @@ -256,7 +264,7 @@ where } } -impl, I: 'static> Fungibles { +impl, I: 'static> Fungibles { /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) @@ -270,7 +278,7 @@ mod tests { weights::Weight, BoundedVec, }; use mock::{Assets, ExtBuilder, *}; - use pallet_assets::{AssetDetails, AssetMetadata, AssetStatus, Instance1}; + use pallet_assets::{AssetDetails, AssetMetadata, AssetStatus}; use pallet_revive::{ precompiles::alloy::sol_types::{SolInterface, SolType}, test_utils::{ALICE, BOB, CHARLIE}, @@ -284,8 +292,8 @@ mod tests { const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); type AccountId = ::AccountId; - type Asset = pallet_assets::Asset; - type Metadata = pallet_assets::Metadata; + type Asset = pallet_assets::Asset; + type Metadata = pallet_assets::Metadata; #[test] fn transfer_works() { @@ -336,7 +344,7 @@ mod tests { .execute_with(|| { assert_eq!(Assets::balance(token, &from), endowment); assert_eq!(Assets::balance(token, &to), 0); - assert_ok!(approve::( + assert_ok!(approve::( RuntimeOrigin::signed(from.clone()), token, origin.clone(), @@ -714,7 +722,7 @@ mod tests { .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { - assert_ok!(approve::( + assert_ok!(approve::( RuntimeOrigin::signed(owner.clone()), token, spender.clone(), diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs new file mode 100644 index 000000000..f4f16cc25 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -0,0 +1,242 @@ + +//! Autogenerated weights for `pallet_api_vnext::fungibles` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-06-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `R0GUE`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` + +// Executed Command: +// ./target/release/pop-node +// benchmark +// pallet +// --chain=pop-devnet-dev +// --wasm-execution=compiled +// --pallet=pallet-api-vnext::fungibles +// --steps=50 +// --repeat=20 +// --json +// --template=./scripts/templates/pallet-weight-template.hbs +// --output=./pallets/api-vnext/src/fungibles/weights.rs +// --extrinsic= + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use core::marker::PhantomData; + +/// Weight functions needed for `pallet_api_vnext::fungibles`. +pub trait WeightInfo { + fn approve(a: u32, c: u32, ) -> Weight; + fn total_supply() -> Weight; + fn balance_of() -> Weight; + fn allowance() -> Weight; + fn token_name() -> Weight; + fn symbol() -> Weight; + fn decimals() -> Weight; + fn exists() -> Weight; +} + +/// Weights for `pallet_api_vnext::fungibles` using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 1]`. + /// The range of component `c` is `[0, 1]`. + fn approve(a: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `699 + c * (140 ±0)` + // Estimated: `3675` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(8_074_489, 3675) + // Standard Error: 53_265 + .saturating_add(Weight::from_parts(19_925_510, 0).saturating_mul(a.into())) + // Standard Error: 53_265 + .saturating_add(Weight::from_parts(34_050_000, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn total_supply() -> Weight { + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3675` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:0) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn balance_of() -> Weight { + // Proof Size summary in bytes: + // Measured: `346` + // Estimated: `3599` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 3599) + .saturating_add(T::DbWeight::get().reads(2_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:0) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn allowance() -> Weight { + // Proof Size summary in bytes: + // Measured: `291` + // Estimated: `6044` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 6044) + .saturating_add(T::DbWeight::get().reads(3_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn token_name() -> Weight { + // Proof Size summary in bytes: + // Measured: `267` + // Estimated: `3605` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn symbol() -> Weight { + // Proof Size summary in bytes: + // Measured: `267` + // Estimated: `3605` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn decimals() -> Weight { + // Proof Size summary in bytes: + // Measured: `136` + // Estimated: `3605` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 3605) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn exists() -> Weight { + // Proof Size summary in bytes: + // Measured: `139` + // Estimated: `3675` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } +} + +// For backwards compatibility and tests. +impl WeightInfo for () { + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// The range of component `a` is `[0, 1]`. + /// The range of component `c` is `[0, 1]`. + fn approve(a: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `699 + c * (140 ±0)` + // Estimated: `3675` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(8_074_489, 3675) + // Standard Error: 53_265 + .saturating_add(Weight::from_parts(19_925_510, 0).saturating_mul(a.into())) + // Standard Error: 53_265 + .saturating_add(Weight::from_parts(34_050_000, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn total_supply() -> Weight { + // Proof Size summary in bytes: + // Measured: `300` + // Estimated: `3675` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:0) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + fn balance_of() -> Weight { + // Proof Size summary in bytes: + // Measured: `346` + // Estimated: `3599` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 3599) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:0) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + fn allowance() -> Weight { + // Proof Size summary in bytes: + // Measured: `291` + // Estimated: `6044` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 6044) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn token_name() -> Weight { + // Proof Size summary in bytes: + // Measured: `267` + // Estimated: `3605` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn symbol() -> Weight { + // Proof Size summary in bytes: + // Measured: `267` + // Estimated: `3605` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Metadata` (r:1 w:0) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn decimals() -> Weight { + // Proof Size summary in bytes: + // Measured: `136` + // Estimated: `3605` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 3605) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn exists() -> Weight { + // Proof Size summary in bytes: + // Measured: `139` + // Estimated: `3675` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } +} + diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 3b9efe32f..c3dfc02ac 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -15,7 +15,7 @@ use pallet_revive::{ alloy::{sol, sol_types::SolEvent}, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, Config, Origin, + AddressMapper as _, Origin, }; #[cfg(test)] use { @@ -36,13 +36,13 @@ pub mod fungibles; mod mock; type AccountIdOf = ::AccountId; -type AddressMapper = ::AddressMapper; +type AddressMapper = ::AddressMapper; type Assets = pallet_assets::Pallet; // A bare call to a contract. #[cfg(test)] fn bare_call< - T: Config, + T: pallet_revive::Config, O: SolValue + From<::RustType>, >( @@ -90,7 +90,7 @@ fn decode::RustType>>(data: &[u8]) -> T::abi_decode(data).expect("unable to decode") } -fn deposit_event( +fn deposit_event( _env: &mut impl Ext, address: impl Into, event: impl SolEvent, @@ -104,7 +104,9 @@ fn deposit_event( // dummy contract when using `CallSetup` within tests let revive_event = pallet_revive::Event::ContractEmitted { contract: address.into(), data, topics }; - >::deposit_event(::RuntimeEvent::from(revive_event)) + >::deposit_event(::RuntimeEvent::from( + revive_event, + )) } #[cfg(test)] @@ -141,7 +143,7 @@ fn topics(event: &impl SolEvent) -> Vec { /// Creates a new `RuntimeOrigin` from an ['Origin']. // TODO: upstream? -pub fn to_runtime_origin(o: Origin) -> T::RuntimeOrigin { +pub fn to_runtime_origin(o: Origin) -> T::RuntimeOrigin { match o { Origin::Root => RawOrigin::Root.into(), Origin::Signed(account) => RawOrigin::Signed(account).into(), diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 19eed1511..80bdce74d 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -8,10 +8,10 @@ use frame_system::{EnsureRoot, EnsureSigned}; use pallet_assets::AutoIncAssetId; pub(crate) use pallet_revive::test_utils::ALICE; +use super::fungibles; + pub(crate) type Balance = u128; type Block = frame_system::mocking::MockBlock; -type Erc20 = crate::Erc20; -type Fungibles = crate::Fungibles; pub(crate) const ERC20: u16 = 2; pub(crate) const FUNGIBLES: u16 = 1; @@ -34,7 +34,7 @@ mod runtime { pub struct Test; #[runtime::pallet_index(0)] - pub type Assets = pallet_assets::Pallet; + pub type Assets = pallet_assets::Pallet; #[runtime::pallet_index(1)] pub type Balances = pallet_balances::Pallet; #[runtime::pallet_index(2)] @@ -43,13 +43,15 @@ mod runtime { pub type System = frame_system::Pallet; #[runtime::pallet_index(4)] pub type Timestamp = pallet_timestamp::Pallet; + #[runtime::pallet_index(5)] + pub type Fungibles = fungibles::Pallet; } #[derive_impl(pallet_assets::config_preludes::TestDefaultConfig)] -impl pallet_assets::Config for Test { +impl pallet_assets::Config for Test { type AssetIdParameter = Compact; type Balance = Balance; - type CallbackHandle = AutoIncAssetId; + type CallbackHandle = AutoIncAssetId; type CreateOrigin = AsEnsureOriginWithArg>; type Currency = Balances; type ForceOrigin = EnsureRoot; @@ -66,8 +68,7 @@ impl pallet_revive::Config for Test { type AddressMapper = pallet_revive::AccountId32Mapper; type Currency = Balances; type InstantiateOrigin = EnsureSigned; - type Precompiles = - (Fungibles, Erc20); + type Precompiles = (fungibles::Fungibles, fungibles::Erc20); type Time = Timestamp; type UploadOrigin = EnsureSigned; } @@ -83,6 +84,10 @@ impl frame_system::Config for Test { #[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)] impl pallet_timestamp::Config for Test {} +impl fungibles::Config for Test { + type WeightInfo = (); +} + pub(crate) struct ExtBuilder { assets: Option>, asset_accounts: Option>, @@ -121,7 +126,7 @@ impl ExtBuilder { .assimilate_storage(&mut t) .unwrap(); - pallet_assets::GenesisConfig:: { + pallet_assets::GenesisConfig:: { assets: self.assets.take().unwrap_or_default(), metadata: self.asset_metadata.take().unwrap_or_default(), accounts: self.asset_accounts.take().unwrap_or_default(), diff --git a/runtime/devnet/src/config/api/mod.rs b/runtime/devnet/src/config/api/mod.rs index a5b2eafa1..b93d3691a 100644 --- a/runtime/devnet/src/config/api/mod.rs +++ b/runtime/devnet/src/config/api/mod.rs @@ -218,6 +218,10 @@ impl Contains for Filter { } } +impl pallet_api_vnext::fungibles::Config for Runtime { + type WeightInfo = (); +} + #[cfg(test)] mod tests { use codec::Encode; diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 6178675e9..cb417f41a 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -706,6 +706,8 @@ mod runtime { pub type Fungibles = fungibles::Pallet; #[runtime::pallet_index(151)] pub type NonFungibles = nonfungibles::Pallet; + #[runtime::pallet_index(152)] + pub type FungiblesvNext = pallet_api_vnext::fungibles::Pallet; } #[cfg(feature = "runtime-benchmarks")] @@ -724,6 +726,7 @@ mod benches { [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] [cumulus_pallet_weight_reclaim, WeightReclaim] + [pallet_api_vnext::fungibles, FungiblesvNext] ); } From 7648a9a7e2da03a2cbd1c574aa0eaa216434ba39 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 17:10:06 +0100 Subject: [PATCH 107/284] refactor(api): charge weight for increase/decrease allowance calls --- .../src/fungibles/precompiles/mod.rs | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 82afabced..5124f22f7 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -113,7 +113,7 @@ where Ok(approveCall::abi_encode_returns(&approveReturn {})) }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { - // TODO: charge based on benchmarked weight + let charged = env.charge(>::WeightInfo::approve(1, 0))?; let owner = >::to_address(env.caller().account_id()?).0.into(); let value = U256::saturating_from( @@ -122,8 +122,17 @@ where (*token).into(), env.to_account_id(&(*spender.0).into()), value.saturating_to(), - ) // TODO: adjust weight - .map_err(|e| e.error)?, + ) + .map_err(|e| { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + e.error + })?, ); let spender = *spender; @@ -131,16 +140,37 @@ where Ok(increaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { - // TODO: charge based on benchmarked weight + let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let (value, weight) = self::decrease_allowance::( + let value = match self::decrease_allowance::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), value.saturating_to(), - ) // TODO: adjust weight - .map_err(|e| e.error)?; + ) { + Ok((value, weight)) => { + // Adjust weight + if let Some(actual_weight) = weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + value + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error.into()) + }, + }; + let value = U256::saturating_from(value); let spender = *spender; From 36925fc6dc6ebe741eee384339c258e2679316eb Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 17:14:18 +0100 Subject: [PATCH 108/284] refactor(api): improve decrease allowance implementation --- pallets/api-vnext/src/fungibles/precompiles/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 5124f22f7..3ddf7859a 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -157,7 +157,7 @@ where env.gas_meter_mut() .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } - value + U256::saturating_from(value) }, Err(e) => { // Adjust weight @@ -171,8 +171,6 @@ where }, }; - let value = U256::saturating_from(value); - let spender = *spender; deposit_event(env, address, Approval { token: *token, owner, spender, value }); Ok(decreaseAllowanceCall::abi_encode_returns(&value)) From 40fc745fde4ab2c11bdeb8f9484dfff26e72d554 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 20:16:28 +0100 Subject: [PATCH 109/284] feat(api): add clear_metadata benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 37 +++++++--- .../src/fungibles/precompiles/mod.rs | 2 +- pallets/api-vnext/src/fungibles/weights.rs | 67 +++++++++++++------ 3 files changed, 74 insertions(+), 32 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 32799eff3..ff36f5e2f 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -2,7 +2,7 @@ use alloc::vec; -use frame_benchmarking::v2::{whitelisted_caller as allowlisted_caller, *}; +use frame_benchmarking::v2::*; use frame_support::{ assert_ok, pallet_prelude::IsType, @@ -20,7 +20,7 @@ use pallet_revive::{ alloy::primitives as alloy, run::{precompile, CallSetup, WasmModule, H256, U256}, }, - test_utils::{ALICE_ADDR, BOB_ADDR}, + test_utils::{ALICE_ADDR, BOB_ADDR, CHARLIE_ADDR}, AddressMapper as _, Origin, }; @@ -66,8 +66,8 @@ mod benchmarks { let owner = >::to_account_id(&ALICE_ADDR); let spender = >::to_account_id(&BOB_ADDR); let current_allowance = >::from(u32::MAX / 2); + let token = create::(>::to_account_id(&CHARLIE_ADDR)); // Set the `current_allowance`. - let token = create::(); >::set_balance(&owner, u32::MAX.into()); assert_ok!( as approvals::Mutate>::approve( token.clone(), @@ -133,6 +133,21 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn clear_metadata() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = create::(owner.clone()); + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::clearMetadata(clearMetadataCall { token: token.into() }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + } + #[benchmark] fn total_supply() { let mut call_setup = set_up_call(); @@ -147,9 +162,9 @@ mod benchmarks { #[benchmark] fn balance_of() { + let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let token = create::(); let input = IFungiblesCalls::balanceOf(balanceOfCall { token: token.into(), owner: ALICE_ADDR.0.into(), @@ -163,9 +178,9 @@ mod benchmarks { #[benchmark] fn allowance() { + let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let token = create::(); let input = IFungiblesCalls::allowance(allowanceCall { token: token.into(), owner: ALICE_ADDR.0.into(), @@ -180,9 +195,9 @@ mod benchmarks { #[benchmark] fn token_name() { + let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let token = create::(); let input = IFungiblesCalls::name(nameCall { token: token.into() }); #[block] @@ -193,9 +208,9 @@ mod benchmarks { #[benchmark] fn symbol() { + let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let token = create::(); let input = IFungiblesCalls::symbol(symbolCall { token: token.into() }); #[block] @@ -239,13 +254,13 @@ fn assert_has_event, I>( } fn create + pallet_assets::Config + pallet_revive::Config, I>( + owner: T::AccountId, ) -> TokenId { let token = NextAssetId::::get().unwrap_or_default(); - let admin: T::AccountId = allowlisted_caller(); - >::set_balance(&admin, u32::MAX.into()); + >::set_balance(&owner, u32::MAX.into()); assert_ok!( as Create>::create( token.clone(), - admin.clone(), + owner.clone(), true, 1u32.into() )); @@ -253,7 +268,7 @@ fn create + pallet_assets::Config + pallet_rev let max = AssetsStringLimit::::get() as usize; assert_ok!( as metadata::Mutate>::set( token.clone(), - &admin, + &owner, vec![255u8; max], vec![255u8; max], u8::MAX diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 3ddf7859a..7e2085b94 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -206,7 +206,7 @@ where Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn {})) }, IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::clear_metadata())?; clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index f4f16cc25..53d299456 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -32,6 +32,7 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { fn approve(a: u32, c: u32, ) -> Weight; + fn clear_metadata() -> Weight; fn total_supply() -> Weight; fn balance_of() -> Weight; fn allowance() -> Weight; @@ -57,22 +58,35 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_074_489, 3675) - // Standard Error: 53_265 - .saturating_add(Weight::from_parts(19_925_510, 0).saturating_mul(a.into())) - // Standard Error: 53_265 - .saturating_add(Weight::from_parts(34_050_000, 0).saturating_mul(c.into())) + Weight::from_parts(7_259_183, 3675) + // Standard Error: 88_425 + .saturating_add(Weight::from_parts(21_497_959, 0).saturating_mul(a.into())) + // Standard Error: 88_425 + .saturating_add(Weight::from_parts(35_842_857, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn clear_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `645` + // Estimated: `3675` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) fn total_supply() -> Weight { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -83,7 +97,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } @@ -96,7 +110,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 6044) + Weight::from_parts(11_000_000, 6044) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -106,7 +120,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `267` // Estimated: `3605` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -115,7 +129,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -156,22 +170,35 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_074_489, 3675) - // Standard Error: 53_265 - .saturating_add(Weight::from_parts(19_925_510, 0).saturating_mul(a.into())) - // Standard Error: 53_265 - .saturating_add(Weight::from_parts(34_050_000, 0).saturating_mul(c.into())) + Weight::from_parts(7_259_183, 3675) + // Standard Error: 88_425 + .saturating_add(Weight::from_parts(21_497_959, 0).saturating_mul(a.into())) + // Standard Error: 88_425 + .saturating_add(Weight::from_parts(35_842_857, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn clear_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `645` + // Estimated: `3675` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) fn total_supply() -> Weight { // Proof Size summary in bytes: // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -182,7 +209,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } @@ -195,7 +222,7 @@ impl WeightInfo for () { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 6044) + Weight::from_parts(11_000_000, 6044) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -205,7 +232,7 @@ impl WeightInfo for () { // Measured: `267` // Estimated: `3605` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -214,7 +241,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } From 2ef674a126f3196c197281ecaf7cede14fd3d80f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 20:54:53 +0100 Subject: [PATCH 110/284] feat(api): add set_metadata benchmark Also adds a few additional improvements. --- .../api-vnext/src/fungibles/benchmarking.rs | 69 +++++++++++--- .../src/fungibles/precompiles/mod.rs | 8 +- pallets/api-vnext/src/fungibles/weights.rs | 93 ++++++++++++------- 3 files changed, 118 insertions(+), 52 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index ff36f5e2f..743752c71 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -1,6 +1,9 @@ //! Benchmarking setup for pallet_api::fungibles::precompiles -use alloc::vec; +use alloc::{ + string::{String, ToString}, + vec, +}; use frame_benchmarking::v2::*; use frame_support::{ @@ -10,7 +13,8 @@ use frame_support::{ fungible::{Inspect, Mutate as _}, fungibles::{ approvals::{self, Inspect as _}, - metadata, Create, + metadata::{self, Inspect as _}, + Create, }, Get, Time, }, @@ -25,7 +29,7 @@ use pallet_revive::{ }; use super::{ - precompiles::{IFungibles::*, IFungiblesCalls, UintTryFrom, UintTryTo}, + precompiles::{IFungibles, IFungiblesCalls, UintTryFrom, UintTryTo}, Config, NextAssetId, Pallet, }; use crate::fixed_address; @@ -90,7 +94,7 @@ mod benchmarks { let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::approve(approveCall { + let input = IFungiblesCalls::approve(IFungibles::approveCall { token: token.clone().into(), spender: >::to_address(&spender).0.into(), value: alloy::U256::from(approval_value), @@ -133,6 +137,35 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn set_metadata() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = create::(owner.clone()); + let max = AssetsStringLimit::::get() as usize; + let name = vec![42u8; max]; + let symbol = vec![42u8; max]; + let decimals = u8::MAX - 1; + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::setMetadata(IFungibles::setMetadataCall { + token: token.clone().into(), + name: String::from_utf8_lossy(&name).to_string(), + symbol: String::from_utf8_lossy(&symbol).to_string(), + decimals, + }); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::name(token.clone()), name); + assert_eq!(>::symbol(token.clone()), symbol); + assert_eq!(>::decimals(token), decimals); + } + #[benchmark] fn clear_metadata() { let owner = >::to_account_id(&ALICE_ADDR); @@ -140,19 +173,25 @@ mod benchmarks { let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::clearMetadata(clearMetadataCall { token: token.into() }); + let input = IFungiblesCalls::clearMetadata(IFungibles::clearMetadataCall { + token: token.clone().into(), + }); #[block] { assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); } + + assert!(>::name(token.clone()).is_empty()); + assert!(>::symbol(token.clone()).is_empty()); + assert_eq!(>::decimals(token), 0); } #[benchmark] fn total_supply() { let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::totalSupply(totalSupplyCall { token: 0 }); + let input = IFungiblesCalls::totalSupply(IFungibles::totalSupplyCall { token: 0 }); #[block] { @@ -165,7 +204,7 @@ mod benchmarks { let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::balanceOf(balanceOfCall { + let input = IFungiblesCalls::balanceOf(IFungibles::balanceOfCall { token: token.into(), owner: ALICE_ADDR.0.into(), }); @@ -181,7 +220,7 @@ mod benchmarks { let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::allowance(allowanceCall { + let input = IFungiblesCalls::allowance(IFungibles::allowanceCall { token: token.into(), owner: ALICE_ADDR.0.into(), spender: BOB_ADDR.0.into(), @@ -194,11 +233,11 @@ mod benchmarks { } #[benchmark] - fn token_name() { + fn metadata_name() { let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::name(nameCall { token: token.into() }); + let input = IFungiblesCalls::name(IFungibles::nameCall { token: token.into() }); #[block] { @@ -207,11 +246,11 @@ mod benchmarks { } #[benchmark] - fn symbol() { + fn metadata_symbol() { let token = create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::symbol(symbolCall { token: token.into() }); + let input = IFungiblesCalls::symbol(IFungibles::symbolCall { token: token.into() }); #[block] { @@ -220,10 +259,10 @@ mod benchmarks { } #[benchmark] - fn decimals() { + fn metadata_decimals() { let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::decimals(decimalsCall { token: 0 }); + let input = IFungiblesCalls::decimals(IFungibles::decimalsCall { token: 0 }); #[block] { @@ -235,7 +274,7 @@ mod benchmarks { fn exists() { let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::exists(existsCall { token: 0 }); + let input = IFungiblesCalls::exists(IFungibles::existsCall { token: 0 }); #[block] { diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 7e2085b94..4982b57fc 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -195,7 +195,7 @@ where Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn {})) }, IFungiblesCalls::setMetadata(setMetadataCall { token, name, symbol, decimals }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::set_metadata())?; set_metadata::( to_runtime_origin(env.caller()), (*token).into(), @@ -267,19 +267,19 @@ where Ok(allowanceCall::abi_encode_returns(&remaining)) }, IFungiblesCalls::name(nameCall { token }) => { - env.charge(>::WeightInfo::token_name())?; + env.charge(>::WeightInfo::metadata_name())?; let result = >::name((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::symbol(symbolCall { token }) => { - env.charge(>::WeightInfo::symbol())?; + env.charge(>::WeightInfo::metadata_symbol())?; let result = >::symbol((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::decimals(decimalsCall { token }) => { - env.charge(>::WeightInfo::decimals())?; + env.charge(>::WeightInfo::metadata_decimals())?; let result = >::decimals((*token).into()); Ok(decimalsCall::abi_encode_returns(&result)) }, diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index 53d299456..0954753e0 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -32,13 +32,14 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { fn approve(a: u32, c: u32, ) -> Weight; + fn set_metadata() -> Weight; fn clear_metadata() -> Weight; fn total_supply() -> Weight; fn balance_of() -> Weight; fn allowance() -> Weight; - fn token_name() -> Weight; - fn symbol() -> Weight; - fn decimals() -> Weight; + fn metadata_name() -> Weight; + fn metadata_symbol() -> Weight; + fn metadata_decimals() -> Weight; fn exists() -> Weight; } @@ -58,11 +59,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_259_183, 3675) - // Standard Error: 88_425 - .saturating_add(Weight::from_parts(21_497_959, 0).saturating_mul(a.into())) - // Standard Error: 88_425 - .saturating_add(Weight::from_parts(35_842_857, 0).saturating_mul(c.into())) + Weight::from_parts(8_414_285, 3675) + // Standard Error: 151_952 + .saturating_add(Weight::from_parts(19_830_612, 0).saturating_mul(a.into())) + // Standard Error: 151_952 + .saturating_add(Weight::from_parts(35_355_102, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -70,12 +71,25 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn set_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `505` + // Estimated: `3675` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -86,7 +100,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -98,7 +112,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `346` // Estimated: `3599` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 3599) + Weight::from_parts(9_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) @@ -115,17 +129,17 @@ impl WeightInfo for SubstrateWeight { } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn token_name() -> Weight { + fn metadata_name() -> Weight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 3605) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn symbol() -> Weight { + fn metadata_symbol() -> Weight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` @@ -135,12 +149,12 @@ impl WeightInfo for SubstrateWeight { } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn decimals() -> Weight { + fn metadata_decimals() -> Weight { // Proof Size summary in bytes: // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) @@ -170,11 +184,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_259_183, 3675) - // Standard Error: 88_425 - .saturating_add(Weight::from_parts(21_497_959, 0).saturating_mul(a.into())) - // Standard Error: 88_425 - .saturating_add(Weight::from_parts(35_842_857, 0).saturating_mul(c.into())) + Weight::from_parts(8_414_285, 3675) + // Standard Error: 151_952 + .saturating_add(Weight::from_parts(19_830_612, 0).saturating_mul(a.into())) + // Standard Error: 151_952 + .saturating_add(Weight::from_parts(35_355_102, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -182,12 +196,25 @@ impl WeightInfo for () { /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) + fn set_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `505` + // Estimated: `3675` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Metadata` (r:1 w:1) + /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -198,7 +225,7 @@ impl WeightInfo for () { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -210,7 +237,7 @@ impl WeightInfo for () { // Measured: `346` // Estimated: `3599` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 3599) + Weight::from_parts(9_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) @@ -227,17 +254,17 @@ impl WeightInfo for () { } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn token_name() -> Weight { + fn metadata_name() -> Weight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 3605) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn symbol() -> Weight { + fn metadata_symbol() -> Weight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` @@ -247,12 +274,12 @@ impl WeightInfo for () { } /// Storage: `Assets::Metadata` (r:1 w:0) /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`) - fn decimals() -> Weight { + fn metadata_decimals() -> Weight { // Proof Size summary in bytes: // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) From 09dcce7f59ecf174d804a9ad1b82350334ca604a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 24 Jun 2025 21:05:19 +0100 Subject: [PATCH 111/284] feat(api): add start_destroy benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 22 +++++++ .../src/fungibles/precompiles/mod.rs | 2 +- pallets/api-vnext/src/fungibles/weights.rs | 59 +++++++++++++------ 3 files changed, 64 insertions(+), 19 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 743752c71..2aa24d15a 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -19,6 +19,7 @@ use frame_support::{ Get, Time, }, }; +use pallet_assets::{Asset, AssetStatus}; use pallet_revive::{ precompiles::{ alloy::primitives as alloy, @@ -137,6 +138,27 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn start_destroy() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = create::(owner.clone()); + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::startDestroy(IFungibles::startDestroyCall { + token: token.clone().into(), + }); + + assert_eq!(>::get(token.clone()).unwrap().status, AssetStatus::Live); + + #[block] + { + assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::get(token.clone()).unwrap().status, AssetStatus::Destroying); + } + #[benchmark] fn set_metadata() { let owner = >::to_account_id(&ALICE_ADDR); diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 4982b57fc..1cff218d2 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -190,7 +190,7 @@ where Ok(createCall::abi_encode_returns(&id)) }, IFungiblesCalls::startDestroy(startDestroyCall { token }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::start_destroy())?; start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn {})) }, diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index 0954753e0..e9d8da9be 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -32,6 +32,7 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { fn approve(a: u32, c: u32, ) -> Weight; + fn start_destroy() -> Weight; fn set_metadata() -> Weight; fn clear_metadata() -> Weight; fn total_supply() -> Weight; @@ -59,14 +60,25 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_414_285, 3675) - // Standard Error: 151_952 - .saturating_add(Weight::from_parts(19_830_612, 0).saturating_mul(a.into())) - // Standard Error: 151_952 - .saturating_add(Weight::from_parts(35_355_102, 0).saturating_mul(c.into())) + Weight::from_parts(7_212_244, 3675) + // Standard Error: 51_405 + .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(a.into())) + // Standard Error: 51_405 + .saturating_add(Weight::from_parts(35_787_755, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn start_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `337` + // Estimated: `3675` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) @@ -89,7 +101,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `645` // Estimated: `3675` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_000_000, 3675) + Weight::from_parts(30_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -112,7 +124,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `346` // Estimated: `3599` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 3599) + Weight::from_parts(8_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) @@ -133,7 +145,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -154,7 +166,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3605) + Weight::from_parts(5_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) @@ -184,14 +196,25 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_414_285, 3675) - // Standard Error: 151_952 - .saturating_add(Weight::from_parts(19_830_612, 0).saturating_mul(a.into())) - // Standard Error: 151_952 - .saturating_add(Weight::from_parts(35_355_102, 0).saturating_mul(c.into())) + Weight::from_parts(7_212_244, 3675) + // Standard Error: 51_405 + .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(a.into())) + // Standard Error: 51_405 + .saturating_add(Weight::from_parts(35_787_755, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn start_destroy() -> Weight { + // Proof Size summary in bytes: + // Measured: `337` + // Estimated: `3675` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) /// Storage: `Assets::Metadata` (r:1 w:1) @@ -214,7 +237,7 @@ impl WeightInfo for () { // Measured: `645` // Estimated: `3675` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_000_000, 3675) + Weight::from_parts(30_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -237,7 +260,7 @@ impl WeightInfo for () { // Measured: `346` // Estimated: `3599` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 3599) + Weight::from_parts(8_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) @@ -258,7 +281,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -279,7 +302,7 @@ impl WeightInfo for () { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3605) + Weight::from_parts(5_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) From 84d2aaa4eb9f5164442c60e86b4db1b2e738f801 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 14:50:45 +0100 Subject: [PATCH 112/284] feat(api): add create benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 43 +++++++++--- .../src/fungibles/precompiles/mod.rs | 4 +- pallets/api-vnext/src/fungibles/weights.rs | 69 ++++++++++++++----- pallets/api-vnext/src/lib.rs | 29 +++++--- 4 files changed, 103 insertions(+), 42 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 2aa24d15a..22d4259f3 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -14,7 +14,7 @@ use frame_support::{ fungibles::{ approvals::{self, Inspect as _}, metadata::{self, Inspect as _}, - Create, + Create, Inspect as _, }, Get, Time, }, @@ -33,9 +33,9 @@ use super::{ precompiles::{IFungibles, IFungiblesCalls, UintTryFrom, UintTryTo}, Config, NextAssetId, Pallet, }; -use crate::fixed_address; #[cfg(test)] use crate::mock::{ExtBuilder, Test}; +use crate::{call_precompile, fixed_address}; const FUNGIBLES: u16 = 100; const ADDRESS: [u8; 20] = fixed_address(FUNGIBLES); @@ -71,7 +71,7 @@ mod benchmarks { let owner = >::to_account_id(&ALICE_ADDR); let spender = >::to_account_id(&BOB_ADDR); let current_allowance = >::from(u32::MAX / 2); - let token = create::(>::to_account_id(&CHARLIE_ADDR)); + let token = super::create::(>::to_account_id(&CHARLIE_ADDR)); // Set the `current_allowance`. >::set_balance(&owner, u32::MAX.into()); assert_ok!( as approvals::Mutate>::approve( @@ -138,10 +138,33 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn create() { + let owner = >::to_account_id(&ALICE_ADDR); + let admin = BOB_ADDR; + let min_balance: AssetsBalance = 1u8.into(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::create(IFungibles::createCall { + admin: admin.0.into(), + minBalance: alloy::U256::from(min_balance), + }); + + let mut token = 0; + #[block] + { + token = call_precompile::, _, _>(&mut ext, &ADDRESS, &input).unwrap(); + } + + assert!(>::asset_exists(token.into())); + } + #[benchmark] fn start_destroy() { let owner = >::to_account_id(&ALICE_ADDR); - let token = create::(owner.clone()); + let token = super::create::(owner.clone()); let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; @@ -162,7 +185,7 @@ mod benchmarks { #[benchmark] fn set_metadata() { let owner = >::to_account_id(&ALICE_ADDR); - let token = create::(owner.clone()); + let token = super::create::(owner.clone()); let max = AssetsStringLimit::::get() as usize; let name = vec![42u8; max]; let symbol = vec![42u8; max]; @@ -191,7 +214,7 @@ mod benchmarks { #[benchmark] fn clear_metadata() { let owner = >::to_account_id(&ALICE_ADDR); - let token = create::(owner.clone()); + let token = super::create::(owner.clone()); let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; @@ -223,7 +246,7 @@ mod benchmarks { #[benchmark] fn balance_of() { - let token = create::(>::to_account_id(&ALICE_ADDR)); + let token = super::create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::balanceOf(IFungibles::balanceOfCall { @@ -239,7 +262,7 @@ mod benchmarks { #[benchmark] fn allowance() { - let token = create::(>::to_account_id(&ALICE_ADDR)); + let token = super::create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::allowance(IFungibles::allowanceCall { @@ -256,7 +279,7 @@ mod benchmarks { #[benchmark] fn metadata_name() { - let token = create::(>::to_account_id(&ALICE_ADDR)); + let token = super::create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::name(IFungibles::nameCall { token: token.into() }); @@ -269,7 +292,7 @@ mod benchmarks { #[benchmark] fn metadata_symbol() { - let token = create::(>::to_account_id(&ALICE_ADDR)); + let token = super::create::(>::to_account_id(&ALICE_ADDR)); let mut call_setup = set_up_call(); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::symbol(IFungibles::symbolCall { token: token.into() }); diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 1cff218d2..414129a4c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -5,7 +5,7 @@ use frame_support::traits::fungibles::metadata::Inspect as _; pub(super) use pallet_revive::precompiles::alloy::{ primitives::{ ruint::{UintTryFrom, UintTryTo}, - Address, + Address, U256, }, sol_types::SolCall, }; @@ -176,7 +176,7 @@ where Ok(decreaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::create(createCall { admin, minBalance }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::create())?; let creator = >::to_address(env.caller().account_id()?).0.into(); let id = self::create::( diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index e9d8da9be..a518df732 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_api_vnext::fungibles` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-06-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-06-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `R0GUE`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` @@ -32,6 +32,7 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { fn approve(a: u32, c: u32, ) -> Weight; + fn create() -> Weight; fn start_destroy() -> Weight; fn set_metadata() -> Weight; fn clear_metadata() -> Weight; @@ -60,11 +61,26 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_212_244, 3675) - // Standard Error: 51_405 - .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(a.into())) - // Standard Error: 51_405 - .saturating_add(Weight::from_parts(35_787_755, 0).saturating_mul(c.into())) + Weight::from_parts(6_814_285, 3675) + // Standard Error: 132_214 + .saturating_add(Weight::from_parts(21_432_653, 0).saturating_mul(a.into())) + // Standard Error: 132_214 + .saturating_add(Weight::from_parts(36_653_061, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:1) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `471` + // Estimated: `3675` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -87,7 +103,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -112,7 +128,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -136,7 +152,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 6044) + Weight::from_parts(10_000_000, 6044) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -145,7 +161,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -196,11 +212,26 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_212_244, 3675) - // Standard Error: 51_405 - .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(a.into())) - // Standard Error: 51_405 - .saturating_add(Weight::from_parts(35_787_755, 0).saturating_mul(c.into())) + Weight::from_parts(6_814_285, 3675) + // Standard Error: 132_214 + .saturating_add(Weight::from_parts(21_432_653, 0).saturating_mul(a.into())) + // Standard Error: 132_214 + .saturating_add(Weight::from_parts(36_653_061, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::NextAssetId` (r:1 w:1) + /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + fn create() -> Weight { + // Proof Size summary in bytes: + // Measured: `471` + // Estimated: `3675` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -223,7 +254,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -248,7 +279,7 @@ impl WeightInfo for () { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -272,7 +303,7 @@ impl WeightInfo for () { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 6044) + Weight::from_parts(10_000_000, 6044) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -281,7 +312,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index c3dfc02ac..67dfc7b4b 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -8,14 +8,14 @@ use core::{convert::Into, marker::PhantomData, num::NonZero}; use frame_support::{dispatch::RawOrigin, sp_runtime::traits::StaticLookup}; #[cfg(feature = "fungibles")] pub use fungibles::precompiles::{Erc20, Fungibles}; -pub use pallet_revive::precompiles::alloy::primitives::U256; +#[cfg(any(test, feature = "runtime-benchmarks"))] +use pallet_revive::precompiles::alloy::sol_types::{SolType, SolValue}; use pallet_revive::{ - evm::{H160, H256}, precompiles::{ alloy::{sol, sol_types::SolEvent}, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, Origin, + AddressMapper as _, Origin, H160, H256, U256, }; #[cfg(test)] use { @@ -24,10 +24,7 @@ use { sp_runtime::traits::Bounded, }, frame_system::pallet_prelude::OriginFor, - pallet_revive::{ - precompiles::alloy::sol_types::{SolType, SolValue}, - BalanceOf, DepositLimit, MomentOf, - }, + pallet_revive::{BalanceOf, DepositLimit, MomentOf}, }; #[cfg(feature = "fungibles")] @@ -72,20 +69,30 @@ where } // A direct call to a precompile. -#[cfg(all(test, feature = "runtime-benchmarks"))] +#[cfg(feature = "runtime-benchmarks")] fn call_precompile< - P: Precompile, + P: Precompile, + E: pallet_revive::precompiles::ExtWithInfo< + T: pallet_revive::Config< + Currency: frame_support::traits::fungible::Inspect< + ::AccountId, + Balance: Into + TryFrom, + >, + Hash: frame_support::traits::IsType, + Time: frame_support::traits::Time>, + >, + >, O: SolValue + From<::RustType>, >( - ext: &mut impl pallet_revive::precompiles::ExtWithInfo, + ext: &mut E, address: &[u8; 20], input: &P::Interface, ) -> Result { pallet_revive::precompiles::run::precompile::(ext, address, input).map(|o| decode(&o)) } -#[cfg(test)] +#[cfg(any(test, feature = "runtime-benchmarks"))] fn decode::RustType>>(data: &[u8]) -> T { T::abi_decode(data).expect("unable to decode") } From 4d8cb302e09e80729ff7ed400196dc4f23c77278 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 14:57:44 +0100 Subject: [PATCH 113/284] refactor(api): move benchmark assertion into block --- pallets/api-vnext/src/fungibles/benchmarking.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 22d4259f3..8c0d97a99 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -152,13 +152,12 @@ mod benchmarks { minBalance: alloy::U256::from(min_balance), }); - let mut token = 0; #[block] { - token = call_precompile::, _, _>(&mut ext, &ADDRESS, &input).unwrap(); + let token = + call_precompile::, _, u32>(&mut ext, &ADDRESS, &input).unwrap(); + assert!(>::asset_exists(token.into())); } - - assert!(>::asset_exists(token.into())); } #[benchmark] From 1d3f3cf5635aea3fa4e5db44218e45d2f3a7b355 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 15:03:21 +0100 Subject: [PATCH 114/284] refactor(api): use call_precompile helper Provides decoding to ease assertions. --- .../api-vnext/src/fungibles/benchmarking.rs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 8c0d97a99..51c0e9873 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -23,7 +23,7 @@ use pallet_assets::{Asset, AssetStatus}; use pallet_revive::{ precompiles::{ alloy::primitives as alloy, - run::{precompile, CallSetup, WasmModule, H256, U256}, + run::{CallSetup, WasmModule, H256, U256}, }, test_utils::{ALICE_ADDR, BOB_ADDR, CHARLIE_ADDR}, AddressMapper as _, Origin, @@ -103,7 +103,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } assert_eq!(>::allowance(token.clone(), &owner, &spender), approval_value); @@ -175,7 +175,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } assert_eq!(>::get(token.clone()).unwrap().status, AssetStatus::Destroying); @@ -202,7 +202,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } assert_eq!(>::name(token.clone()), name); @@ -223,7 +223,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } assert!(>::name(token.clone()).is_empty()); @@ -239,7 +239,9 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, alloy::U256>( + &mut ext, &ADDRESS, &input + )); } } @@ -255,7 +257,9 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, alloy::U256>( + &mut ext, &ADDRESS, &input + )); } } @@ -272,7 +276,9 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, alloy::U256>( + &mut ext, &ADDRESS, &input + )); } } @@ -285,7 +291,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, String>(&mut ext, &ADDRESS, &input)); } } @@ -298,7 +304,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, String>(&mut ext, &ADDRESS, &input)); } } @@ -310,7 +316,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, u16>(&mut ext, &ADDRESS, &input)); } } @@ -322,7 +328,7 @@ mod benchmarks { #[block] { - assert_ok!(precompile::, _>(&mut ext, &ADDRESS, &input)); + assert_ok!(call_precompile::, _, bool>(&mut ext, &ADDRESS, &input)); } } From f208ccf64c36bd3de3fe0adf981196661fd8e7bf Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 15:24:03 +0100 Subject: [PATCH 115/284] feat(api): add mint benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 24 ++++ .../src/fungibles/precompiles/mod.rs | 2 +- pallets/api-vnext/src/fungibles/weights.rs | 103 ++++++++++++------ 3 files changed, 94 insertions(+), 35 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 51c0e9873..12b7a0add 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -231,6 +231,30 @@ mod benchmarks { assert_eq!(>::decimals(token), 0); } + #[benchmark] + fn mint() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = super::create::(owner.clone()); + let account = >::to_account_id(&BOB_ADDR); + let value: AssetsBalance = u32::MAX.into(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::mint(IFungibles::mintCall { + token: token.clone().into(), + account: >::to_address(&account).0.into(), + value: alloy::U256::from(value), + }); + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::balance(token, account), value); + } + #[benchmark] fn total_supply() { let mut call_setup = set_up_call(); diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 414129a4c..99dbf3ce8 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -211,7 +211,7 @@ where Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, IFungiblesCalls::mint(mintCall { token, account, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::mint())?; self::mint::( to_runtime_origin(env.caller()), diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index a518df732..ea04c5996 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -36,6 +36,7 @@ pub trait WeightInfo { fn start_destroy() -> Weight; fn set_metadata() -> Weight; fn clear_metadata() -> Weight; + fn mint() -> Weight; fn total_supply() -> Weight; fn balance_of() -> Weight; fn allowance() -> Weight; @@ -61,11 +62,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(6_814_285, 3675) - // Standard Error: 132_214 - .saturating_add(Weight::from_parts(21_432_653, 0).saturating_mul(a.into())) - // Standard Error: 132_214 - .saturating_add(Weight::from_parts(36_653_061, 0).saturating_mul(c.into())) + Weight::from_parts(5_474_489, 3675) + // Standard Error: 210_972 + .saturating_add(Weight::from_parts(23_262_244, 0).saturating_mul(a.into())) + // Standard Error: 210_972 + .saturating_add(Weight::from_parts(38_513_265, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -79,8 +80,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_000_000, 3675) + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(37_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -90,8 +91,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 3675) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -103,8 +104,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 3675) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -116,11 +117,28 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 29_000_000 picoseconds. + // Minimum execution time: 30_000_000 picoseconds. Weight::from_parts(30_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn mint() -> Weight { + // Proof Size summary in bytes: + // Measured: `584` + // Estimated: `3675` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) fn total_supply() -> Weight { @@ -152,7 +170,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 6044) + Weight::from_parts(11_000_000, 6044) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -161,8 +179,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -172,7 +190,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `267` // Estimated: `3605` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -182,7 +200,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) @@ -212,11 +230,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(6_814_285, 3675) - // Standard Error: 132_214 - .saturating_add(Weight::from_parts(21_432_653, 0).saturating_mul(a.into())) - // Standard Error: 132_214 - .saturating_add(Weight::from_parts(36_653_061, 0).saturating_mul(c.into())) + Weight::from_parts(5_474_489, 3675) + // Standard Error: 210_972 + .saturating_add(Weight::from_parts(23_262_244, 0).saturating_mul(a.into())) + // Standard Error: 210_972 + .saturating_add(Weight::from_parts(38_513_265, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -230,8 +248,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_000_000, 3675) + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(37_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -241,8 +259,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 3675) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -254,8 +272,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 3675) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -267,11 +285,28 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 29_000_000 picoseconds. + // Minimum execution time: 30_000_000 picoseconds. Weight::from_parts(30_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn mint() -> Weight { + // Proof Size summary in bytes: + // Measured: `584` + // Estimated: `3675` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } /// Storage: `Assets::Asset` (r:1 w:0) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) fn total_supply() -> Weight { @@ -303,7 +338,7 @@ impl WeightInfo for () { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 6044) + Weight::from_parts(11_000_000, 6044) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -312,8 +347,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -323,7 +358,7 @@ impl WeightInfo for () { // Measured: `267` // Estimated: `3605` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 3605) + Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -333,7 +368,7 @@ impl WeightInfo for () { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) From c71555a7e282691ac249b7f5398057f69dfcc416 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 15:51:06 +0100 Subject: [PATCH 116/284] feat(api): add burn benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 30 ++++- .../src/fungibles/precompiles/mod.rs | 2 +- pallets/api-vnext/src/fungibles/weights.rs | 107 ++++++++++++------ 3 files changed, 100 insertions(+), 39 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 12b7a0add..86cae1b6c 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -10,11 +10,11 @@ use frame_support::{ assert_ok, pallet_prelude::IsType, traits::{ - fungible::{Inspect, Mutate as _}, + fungible::{Inspect, Mutate}, fungibles::{ approvals::{self, Inspect as _}, metadata::{self, Inspect as _}, - Create, Inspect as _, + Create, Inspect as _, Mutate as _, }, Get, Time, }, @@ -255,6 +255,32 @@ mod benchmarks { assert_eq!(>::balance(token, account), value); } + #[benchmark] + fn burn() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = super::create::(owner.clone()); + let account = >::to_account_id(&BOB_ADDR); + let value: AssetsBalance = u32::MAX.into(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::burn(IFungibles::burnCall { + token: token.clone().into(), + account: >::to_address(&account).0.into(), + value: alloy::U256::from(value), + }); + + >::set_balance(token.clone(), &account, value); + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::balance(token, account), 0u8.into()); + } + #[benchmark] fn total_supply() { let mut call_setup = set_up_call(); diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 99dbf3ce8..dd0daef71 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -226,7 +226,7 @@ where Ok(mintCall::abi_encode_returns(&mintReturn {})) }, IFungiblesCalls::burn(burnCall { token, account, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::burn())?; self::burn::( to_runtime_origin(env.caller()), diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index ea04c5996..75a387314 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -37,6 +37,7 @@ pub trait WeightInfo { fn set_metadata() -> Weight; fn clear_metadata() -> Weight; fn mint() -> Weight; + fn burn() -> Weight; fn total_supply() -> Weight; fn balance_of() -> Weight; fn allowance() -> Weight; @@ -62,11 +63,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(5_474_489, 3675) - // Standard Error: 210_972 - .saturating_add(Weight::from_parts(23_262_244, 0).saturating_mul(a.into())) - // Standard Error: 210_972 - .saturating_add(Weight::from_parts(38_513_265, 0).saturating_mul(c.into())) + Weight::from_parts(8_088_775, 3675) + // Standard Error: 83_548 + .saturating_add(Weight::from_parts(19_990_816, 0).saturating_mul(a.into())) + // Standard Error: 83_548 + .saturating_add(Weight::from_parts(34_170_408, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -80,8 +81,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(37_000_000, 3675) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -91,8 +92,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 3675) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -104,8 +105,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_000_000, 3675) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -117,7 +118,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 30_000_000 picoseconds. + // Minimum execution time: 29_000_000 picoseconds. Weight::from_parts(30_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -134,8 +135,25 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 3675) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn burn() -> Weight { + // Proof Size summary in bytes: + // Measured: `744` + // Estimated: `3675` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -146,7 +164,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -157,7 +175,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } @@ -179,7 +197,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -200,7 +218,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3605) + Weight::from_parts(5_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) @@ -230,11 +248,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(5_474_489, 3675) - // Standard Error: 210_972 - .saturating_add(Weight::from_parts(23_262_244, 0).saturating_mul(a.into())) - // Standard Error: 210_972 - .saturating_add(Weight::from_parts(38_513_265, 0).saturating_mul(c.into())) + Weight::from_parts(8_088_775, 3675) + // Standard Error: 83_548 + .saturating_add(Weight::from_parts(19_990_816, 0).saturating_mul(a.into())) + // Standard Error: 83_548 + .saturating_add(Weight::from_parts(34_170_408, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -248,8 +266,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(37_000_000, 3675) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -259,8 +277,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 3675) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -272,8 +290,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_000_000, 3675) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -285,7 +303,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 30_000_000 picoseconds. + // Minimum execution time: 29_000_000 picoseconds. Weight::from_parts(30_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -302,8 +320,25 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 3675) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn burn() -> Weight { + // Proof Size summary in bytes: + // Measured: `744` + // Estimated: `3675` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -314,7 +349,7 @@ impl WeightInfo for () { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -325,7 +360,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } @@ -347,7 +382,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -368,7 +403,7 @@ impl WeightInfo for () { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3605) + Weight::from_parts(5_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) From 16aab05ff27b686bc0274ff35a2904321cc9323f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 16:02:14 +0100 Subject: [PATCH 117/284] feat(api): add transfer benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 29 ++++++ .../src/fungibles/precompiles/mod.rs | 2 +- pallets/api-vnext/src/fungibles/weights.rs | 99 +++++++++++++------ 3 files changed, 97 insertions(+), 33 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 86cae1b6c..0393562c3 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -63,6 +63,35 @@ type TokenId = >::AssetId; mod benchmarks { use super::*; + #[benchmark] + fn transfer() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = super::create::(owner.clone()); + let to = >::to_account_id(&BOB_ADDR); + let value: AssetsBalance = u32::MAX.into(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::transfer(IFungibles::transferCall { + token: token.clone().into(), + to: >::to_address(&to).0.into(), + value: alloy::U256::from(value), + }); + + >::set_balance(token.clone(), &owner, value); + assert_eq!(>::balance(token.clone(), &owner), value); + assert_eq!(>::balance(token.clone(), &to), 0u8.into()); + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::balance(token.clone(), &owner), 0u8.into()); + assert_eq!(>::balance(token, &to), value); + } + // Parameter: // - 'a': whether `approve_transfer` is required. // - 'c': whether `cancel_approval` is required. diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index dd0daef71..950e40672 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -49,7 +49,7 @@ where ) -> Result, Error> { match input { IFungiblesCalls::transfer(transferCall { token, to, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::transfer())?; let from = >::to_address(env.caller().account_id()?).0.into(); self::transfer::( diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index 75a387314..a76ece18d 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -31,6 +31,7 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { + fn transfer() -> Weight; fn approve(a: u32, c: u32, ) -> Weight; fn create() -> Weight; fn start_destroy() -> Weight; @@ -50,6 +51,23 @@ pub trait WeightInfo { /// Weights for `pallet_api_vnext::fungibles` using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `781` + // Estimated: `6208` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(48_000_000, 6208) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) @@ -63,11 +81,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_088_775, 3675) - // Standard Error: 83_548 - .saturating_add(Weight::from_parts(19_990_816, 0).saturating_mul(a.into())) - // Standard Error: 83_548 - .saturating_add(Weight::from_parts(34_170_408, 0).saturating_mul(c.into())) + Weight::from_parts(6_576_530, 3675) + // Standard Error: 127_016 + .saturating_add(Weight::from_parts(22_054_081, 0).saturating_mul(a.into())) + // Standard Error: 127_016 + .saturating_add(Weight::from_parts(36_419_387, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -81,8 +99,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 3675) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -105,7 +123,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -135,8 +153,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_000_000, 3675) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -152,7 +170,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 39_000_000 picoseconds. + // Minimum execution time: 38_000_000 picoseconds. Weight::from_parts(39_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -164,7 +182,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -175,7 +193,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } @@ -197,7 +215,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -207,7 +225,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -218,7 +236,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) @@ -235,6 +253,23 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests. impl WeightInfo for () { + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `781` + // Estimated: `6208` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(48_000_000, 6208) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) + } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) @@ -248,11 +283,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(8_088_775, 3675) - // Standard Error: 83_548 - .saturating_add(Weight::from_parts(19_990_816, 0).saturating_mul(a.into())) - // Standard Error: 83_548 - .saturating_add(Weight::from_parts(34_170_408, 0).saturating_mul(c.into())) + Weight::from_parts(6_576_530, 3675) + // Standard Error: 127_016 + .saturating_add(Weight::from_parts(22_054_081, 0).saturating_mul(a.into())) + // Standard Error: 127_016 + .saturating_add(Weight::from_parts(36_419_387, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -266,8 +301,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 3675) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -290,7 +325,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -320,8 +355,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_000_000, 3675) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -337,7 +372,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 39_000_000 picoseconds. + // Minimum execution time: 38_000_000 picoseconds. Weight::from_parts(39_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -349,7 +384,7 @@ impl WeightInfo for () { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(6_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -360,7 +395,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } @@ -382,7 +417,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -392,7 +427,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -403,7 +438,7 @@ impl WeightInfo for () { // Measured: `136` // Estimated: `3605` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 3605) + Weight::from_parts(6_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Assets::Asset` (r:1 w:0) From e7d4b5f796891e288ed6a0b7b59e5d83b25c6805 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 16:44:29 +0100 Subject: [PATCH 118/284] feat(api): add transfer_from benchmark --- .../api-vnext/src/fungibles/benchmarking.rs | 38 ++++++- .../src/fungibles/precompiles/mod.rs | 10 +- pallets/api-vnext/src/fungibles/weights.rs | 107 ++++++++++++------ 3 files changed, 113 insertions(+), 42 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 0393562c3..3d1cdb30f 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -12,7 +12,7 @@ use frame_support::{ traits::{ fungible::{Inspect, Mutate}, fungibles::{ - approvals::{self, Inspect as _}, + approvals::{self, Inspect as _, Mutate as _}, metadata::{self, Inspect as _}, Create, Inspect as _, Mutate as _, }, @@ -92,6 +92,42 @@ mod benchmarks { assert_eq!(>::balance(token, &to), value); } + #[benchmark] + fn transfer_from() { + let owner = >::to_account_id(&ALICE_ADDR); + let token = super::create::(owner.clone()); + let spender = >::to_account_id(&BOB_ADDR); + let to = >::to_account_id(&CHARLIE_ADDR); + let value: AssetsBalance = u32::MAX.into(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(spender.clone())); + let mut ext = call_setup.ext().0; + let input = IFungiblesCalls::transferFrom(IFungibles::transferFromCall { + token: token.clone().into(), + from: >::to_address(&owner).0.into(), + to: >::to_address(&to).0.into(), + value: alloy::U256::from(value), + }); + + >::set_balance(token.clone(), &owner, value); + assert_eq!(>::balance(token.clone(), &owner), value); + assert_eq!(>::balance(token.clone(), &spender), 0u8.into()); + assert_eq!(>::balance(token.clone(), &to), 0u8.into()); + assert_ok!(>::approve(token.clone(), &owner, &spender, value)); + assert_eq!(>::allowance(token.clone(), &owner, &spender), value); + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); + } + + assert_eq!(>::balance(token.clone(), &owner), 0u8.into()); + assert_eq!(>::balance(token.clone(), &spender), 0u8.into()); + assert_eq!(>::balance(token.clone(), &to), value); + assert_eq!(>::allowance(token, &owner, &spender), 0u8.into()); + } + // Parameter: // - 'a': whether `approve_transfer` is required. // - 'c': whether `cancel_approval` is required. diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 950e40672..fc7dbdb70 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -67,7 +67,7 @@ where Ok(transferCall::abi_encode_returns(&transferReturn {})) }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::transfer_from())?; transfer_from::( to_runtime_origin(env.caller()), @@ -77,12 +77,8 @@ where value.saturating_to(), )?; - let value = *value; - deposit_event( - env, - address, - Transfer { token: *token, from: *from, to: *to, value }, - ); + let event = Transfer { token: *token, from: *from, to: *to, value: *value }; + deposit_event(env, address, event); Ok(transferFromCall::abi_encode_returns(&transferFromReturn {})) }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index a76ece18d..0705da275 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -32,6 +32,7 @@ use core::marker::PhantomData; /// Weight functions needed for `pallet_api_vnext::fungibles`. pub trait WeightInfo { fn transfer() -> Weight; + fn transfer_from() -> Weight; fn approve(a: u32, c: u32, ) -> Weight; fn create() -> Weight; fn start_destroy() -> Weight; @@ -64,10 +65,29 @@ impl WeightInfo for SubstrateWeight { // Measured: `781` // Estimated: `6208` // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(48_000_000, 6208) + Weight::from_parts(49_000_000, 6208) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_from() -> Weight { + // Proof Size summary in bytes: + // Measured: `951` + // Estimated: `6208` + // Minimum execution time: 68_000_000 picoseconds. + Weight::from_parts(69_000_000, 6208) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) @@ -81,11 +101,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(6_576_530, 3675) - // Standard Error: 127_016 - .saturating_add(Weight::from_parts(22_054_081, 0).saturating_mul(a.into())) - // Standard Error: 127_016 - .saturating_add(Weight::from_parts(36_419_387, 0).saturating_mul(c.into())) + Weight::from_parts(7_862_244, 3675) + // Standard Error: 43_634 + .saturating_add(Weight::from_parts(20_137_755, 0).saturating_mul(a.into())) + // Standard Error: 43_634 + .saturating_add(Weight::from_parts(35_150_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -99,8 +119,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 3675) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -123,8 +143,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 3675) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -137,7 +157,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `645` // Estimated: `3675` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + Weight::from_parts(29_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -153,8 +173,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -170,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(39_000_000, 3675) + // Minimum execution time: 40_000_000 picoseconds. + Weight::from_parts(41_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -182,7 +202,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -193,7 +213,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(T::DbWeight::get().reads(2_u64)) } @@ -266,10 +286,29 @@ impl WeightInfo for () { // Measured: `781` // Estimated: `6208` // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(48_000_000, 6208) + Weight::from_parts(49_000_000, 6208) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Approvals` (r:1 w:1) + /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(148), added: 2623, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_from() -> Weight { + // Proof Size summary in bytes: + // Measured: `951` + // Estimated: `6208` + // Minimum execution time: 68_000_000 picoseconds. + Weight::from_parts(69_000_000, 6208) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(5_u64)) + } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `Assets::Approvals` (r:1 w:1) @@ -283,11 +322,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(6_576_530, 3675) - // Standard Error: 127_016 - .saturating_add(Weight::from_parts(22_054_081, 0).saturating_mul(a.into())) - // Standard Error: 127_016 - .saturating_add(Weight::from_parts(36_419_387, 0).saturating_mul(c.into())) + Weight::from_parts(7_862_244, 3675) + // Standard Error: 43_634 + .saturating_add(Weight::from_parts(20_137_755, 0).saturating_mul(a.into())) + // Standard Error: 43_634 + .saturating_add(Weight::from_parts(35_150_000, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -301,8 +340,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `471` // Estimated: `3675` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(34_000_000, 3675) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -325,8 +364,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3675` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 3675) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -339,7 +378,7 @@ impl WeightInfo for () { // Measured: `645` // Estimated: `3675` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + Weight::from_parts(29_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -355,8 +394,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `584` // Estimated: `3675` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 3675) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -372,8 +411,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(39_000_000, 3675) + // Minimum execution time: 40_000_000 picoseconds. + Weight::from_parts(41_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -384,7 +423,7 @@ impl WeightInfo for () { // Measured: `300` // Estimated: `3675` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 3675) + Weight::from_parts(5_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) @@ -395,7 +434,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3599` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3599) .saturating_add(RocksDbWeight::get().reads(2_u64)) } From 6b1b9a8b0e96ea58b9d03519d599f2e3fd2ddbd9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 16:49:55 +0100 Subject: [PATCH 119/284] refactor(api/fungibles/benchmarking): add copy trait bound to asset id to eliminate manual clones --- .../api-vnext/src/fungibles/benchmarking.rs | 79 ++++++++++--------- pallets/api-vnext/src/fungibles/weights.rs | 68 ++++++++-------- 2 files changed, 74 insertions(+), 73 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 3d1cdb30f..a3425e6d7 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -57,7 +57,7 @@ type TokenId = >::AssetId; Time: Time> >, // Fungibles - T: pallet_assets::Config + Into>, + T: pallet_assets::Config + Into + Copy>, alloy::U256: UintTryFrom> + UintTryTo> )] mod benchmarks { @@ -74,21 +74,21 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::transfer(IFungibles::transferCall { - token: token.clone().into(), + token: token.into(), to: >::to_address(&to).0.into(), value: alloy::U256::from(value), }); - >::set_balance(token.clone(), &owner, value); - assert_eq!(>::balance(token.clone(), &owner), value); - assert_eq!(>::balance(token.clone(), &to), 0u8.into()); + >::set_balance(token, &owner, value); + assert_eq!(>::balance(token, &owner), value); + assert_eq!(>::balance(token, &to), 0u8.into()); #[block] { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::balance(token.clone(), &owner), 0u8.into()); + assert_eq!(>::balance(token, &owner), 0u8.into()); assert_eq!(>::balance(token, &to), value); } @@ -104,27 +104,27 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(spender.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::transferFrom(IFungibles::transferFromCall { - token: token.clone().into(), + token: token.into(), from: >::to_address(&owner).0.into(), to: >::to_address(&to).0.into(), value: alloy::U256::from(value), }); - >::set_balance(token.clone(), &owner, value); - assert_eq!(>::balance(token.clone(), &owner), value); - assert_eq!(>::balance(token.clone(), &spender), 0u8.into()); - assert_eq!(>::balance(token.clone(), &to), 0u8.into()); - assert_ok!(>::approve(token.clone(), &owner, &spender, value)); - assert_eq!(>::allowance(token.clone(), &owner, &spender), value); + >::set_balance(token, &owner, value); + assert_eq!(>::balance(token, &owner), value); + assert_eq!(>::balance(token, &spender), 0u8.into()); + assert_eq!(>::balance(token, &to), 0u8.into()); + assert_ok!(>::approve(token, &owner, &spender, value)); + assert_eq!(>::allowance(token, &owner, &spender), value); #[block] { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::balance(token.clone(), &owner), 0u8.into()); - assert_eq!(>::balance(token.clone(), &spender), 0u8.into()); - assert_eq!(>::balance(token.clone(), &to), value); + assert_eq!(>::balance(token, &owner), 0u8.into()); + assert_eq!(>::balance(token, &spender), 0u8.into()); + assert_eq!(>::balance(token, &to), value); assert_eq!(>::allowance(token, &owner, &spender), 0u8.into()); } @@ -140,7 +140,7 @@ mod benchmarks { // Set the `current_allowance`. >::set_balance(&owner, u32::MAX.into()); assert_ok!( as approvals::Mutate>::approve( - token.clone(), + token, &owner, &spender, current_allowance, @@ -161,7 +161,7 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::approve(IFungibles::approveCall { - token: token.clone().into(), + token: token.into(), spender: >::to_address(&spender).0.into(), value: alloy::U256::from(approval_value), }); @@ -171,11 +171,11 @@ mod benchmarks { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::allowance(token.clone(), &owner, &spender), approval_value); + assert_eq!(>::allowance(token, &owner, &spender), approval_value); if c == 1 { assert_has_event::( pallet_assets::Event::ApprovalCancelled { - asset_id: token.clone(), + asset_id: token, owner: owner.clone(), delegate: spender.clone(), } @@ -232,18 +232,17 @@ mod benchmarks { let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::startDestroy(IFungibles::startDestroyCall { - token: token.clone().into(), - }); + let input = + IFungiblesCalls::startDestroy(IFungibles::startDestroyCall { token: token.into() }); - assert_eq!(>::get(token.clone()).unwrap().status, AssetStatus::Live); + assert_eq!(>::get(token).unwrap().status, AssetStatus::Live); #[block] { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::get(token.clone()).unwrap().status, AssetStatus::Destroying); + assert_eq!(>::get(token).unwrap().status, AssetStatus::Destroying); } #[benchmark] @@ -259,7 +258,7 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::setMetadata(IFungibles::setMetadataCall { - token: token.clone().into(), + token: token.into(), name: String::from_utf8_lossy(&name).to_string(), symbol: String::from_utf8_lossy(&symbol).to_string(), decimals, @@ -270,8 +269,8 @@ mod benchmarks { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::name(token.clone()), name); - assert_eq!(>::symbol(token.clone()), symbol); + assert_eq!(>::name(token), name); + assert_eq!(>::symbol(token), symbol); assert_eq!(>::decimals(token), decimals); } @@ -282,17 +281,16 @@ mod benchmarks { let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; - let input = IFungiblesCalls::clearMetadata(IFungibles::clearMetadataCall { - token: token.clone().into(), - }); + let input = + IFungiblesCalls::clearMetadata(IFungibles::clearMetadataCall { token: token.into() }); #[block] { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert!(>::name(token.clone()).is_empty()); - assert!(>::symbol(token.clone()).is_empty()); + assert!(>::name(token).is_empty()); + assert!(>::symbol(token).is_empty()); assert_eq!(>::decimals(token), 0); } @@ -307,7 +305,7 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::mint(IFungibles::mintCall { - token: token.clone().into(), + token: token.into(), account: >::to_address(&account).0.into(), value: alloy::U256::from(value), }); @@ -331,12 +329,12 @@ mod benchmarks { call_setup.set_origin(Origin::Signed(owner.clone())); let mut ext = call_setup.ext().0; let input = IFungiblesCalls::burn(IFungibles::burnCall { - token: token.clone().into(), + token: token.into(), account: >::to_address(&account).0.into(), value: alloy::U256::from(value), }); - >::set_balance(token.clone(), &account, value); + >::set_balance(token, &account, value); #[block] { @@ -457,13 +455,16 @@ fn assert_has_event, I>( frame_system::Pallet::::assert_has_event(event.into()); } -fn create + pallet_assets::Config + pallet_revive::Config, I>( +fn create< + T: Config + pallet_assets::Config + pallet_revive::Config, + I, +>( owner: T::AccountId, ) -> TokenId { let token = NextAssetId::::get().unwrap_or_default(); >::set_balance(&owner, u32::MAX.into()); assert_ok!( as Create>::create( - token.clone(), + token, owner.clone(), true, 1u32.into() @@ -471,7 +472,7 @@ fn create + pallet_assets::Config + pallet_rev let max = AssetsStringLimit::::get() as usize; assert_ok!( as metadata::Mutate>::set( - token.clone(), + token, &owner, vec![255u8; max], vec![255u8; max], diff --git a/pallets/api-vnext/src/fungibles/weights.rs b/pallets/api-vnext/src/fungibles/weights.rs index 0705da275..2cc996118 100644 --- a/pallets/api-vnext/src/fungibles/weights.rs +++ b/pallets/api-vnext/src/fungibles/weights.rs @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `781` // Estimated: `6208` // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(49_000_000, 6208) + Weight::from_parts(47_000_000, 6208) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -83,8 +83,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `951` // Estimated: `6208` - // Minimum execution time: 68_000_000 picoseconds. - Weight::from_parts(69_000_000, 6208) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(68_000_000, 6208) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -101,11 +101,11 @@ impl WeightInfo for SubstrateWeight { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_862_244, 3675) - // Standard Error: 43_634 - .saturating_add(Weight::from_parts(20_137_755, 0).saturating_mul(a.into())) - // Standard Error: 43_634 - .saturating_add(Weight::from_parts(35_150_000, 0).saturating_mul(c.into())) + Weight::from_parts(8_044_897, 3675) + // Standard Error: 78_152 + .saturating_add(Weight::from_parts(19_955_102, 0).saturating_mul(a.into())) + // Standard Error: 78_152 + .saturating_add(Weight::from_parts(34_600_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -120,7 +120,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `471` // Estimated: `3675` // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 3675) + Weight::from_parts(34_000_000, 3675) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -130,7 +130,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -156,7 +156,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 29_000_000 picoseconds. + // Minimum execution time: 28_000_000 picoseconds. Weight::from_parts(29_000_000, 3675) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -190,8 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(41_000_000, 3675) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(40_000_000, 3675) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -226,7 +226,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 6044) + Weight::from_parts(10_000_000, 6044) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -235,7 +235,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -245,7 +245,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -266,7 +266,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `139` // Estimated: `3675` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(4_000_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) } } @@ -286,7 +286,7 @@ impl WeightInfo for () { // Measured: `781` // Estimated: `6208` // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(49_000_000, 6208) + Weight::from_parts(47_000_000, 6208) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -304,8 +304,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `951` // Estimated: `6208` - // Minimum execution time: 68_000_000 picoseconds. - Weight::from_parts(69_000_000, 6208) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(68_000_000, 6208) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -322,11 +322,11 @@ impl WeightInfo for () { // Measured: `699 + c * (140 ±0)` // Estimated: `3675` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(7_862_244, 3675) - // Standard Error: 43_634 - .saturating_add(Weight::from_parts(20_137_755, 0).saturating_mul(a.into())) - // Standard Error: 43_634 - .saturating_add(Weight::from_parts(35_150_000, 0).saturating_mul(c.into())) + Weight::from_parts(8_044_897, 3675) + // Standard Error: 78_152 + .saturating_add(Weight::from_parts(19_955_102, 0).saturating_mul(a.into())) + // Standard Error: 78_152 + .saturating_add(Weight::from_parts(34_600_000, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -341,7 +341,7 @@ impl WeightInfo for () { // Measured: `471` // Estimated: `3675` // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 3675) + Weight::from_parts(34_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -351,7 +351,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `337` // Estimated: `3675` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -377,7 +377,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3675` - // Minimum execution time: 29_000_000 picoseconds. + // Minimum execution time: 28_000_000 picoseconds. Weight::from_parts(29_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -411,8 +411,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `744` // Estimated: `3675` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(41_000_000, 3675) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(40_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -447,7 +447,7 @@ impl WeightInfo for () { // Measured: `291` // Estimated: `6044` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 6044) + Weight::from_parts(10_000_000, 6044) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Assets::Metadata` (r:1 w:0) @@ -456,7 +456,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -466,7 +466,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `267` // Estimated: `3605` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 3605) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -487,7 +487,7 @@ impl WeightInfo for () { // Measured: `139` // Estimated: `3675` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 3675) + Weight::from_parts(4_000_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) } } From a69a828a622a1794cd2a9edf1d6d863ded22463b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 16:55:10 +0100 Subject: [PATCH 120/284] refactor(api/fungibles): refund appropriate burn weight on failure --- .../api-vnext/src/fungibles/precompiles/mod.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index fc7dbdb70..d3cd8937d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -222,15 +222,24 @@ where Ok(mintCall::abi_encode_returns(&mintReturn {})) }, IFungiblesCalls::burn(burnCall { token, account, value }) => { - env.charge(>::WeightInfo::burn())?; + let charged = env.charge(>::WeightInfo::burn())?; self::burn::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*account.0).into()), value.saturating_to(), - ) // TODO: adjust weight - .map_err(|e| e.error)?; + ) + .map_err(|e| { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + e.error + })?; let from = account; let to = Address::default(); From f1c5958c693389bd5bc066f70439a3b27a1e3bb1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 17:00:11 +0100 Subject: [PATCH 121/284] style(api/fungibles): formatting --- .../src/fungibles/precompiles/mod.rs | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index d3cd8937d..39f133a51 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -59,11 +59,8 @@ where value.saturating_to(), )?; - deposit_event( - env, - address, - Transfer { token: *token, from, to: *to, value: *value }, - ); + let event = Transfer { token: *token, from, to: *to, value: *value }; + deposit_event(env, address, event); Ok(transferCall::abi_encode_returns(&transferReturn {})) }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { @@ -100,12 +97,8 @@ where .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } - let spender = *spender; - deposit_event( - env, - address, - Approval { token: *token, owner, spender, value: *value }, - ); + let event = Approval { token: *token, owner, spender: *spender, value: *value }; + deposit_event(env, address, event); Ok(approveCall::abi_encode_returns(&approveReturn {})) }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { @@ -187,11 +180,14 @@ where }, IFungiblesCalls::startDestroy(startDestroyCall { token }) => { env.charge(>::WeightInfo::start_destroy())?; + start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; + Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn {})) }, IFungiblesCalls::setMetadata(setMetadataCall { token, name, symbol, decimals }) => { env.charge(>::WeightInfo::set_metadata())?; + set_metadata::( to_runtime_origin(env.caller()), (*token).into(), @@ -199,10 +195,12 @@ where symbol.as_bytes().to_vec(), *decimals, )?; + Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn {})) }, IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { env.charge(>::WeightInfo::clear_metadata())?; + clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, @@ -241,56 +239,66 @@ where e.error })?; - let from = account; let to = Address::default(); - deposit_event( - env, - address, - Transfer { token: *token, from: *from, to, value: *value }, - ); + let event = Transfer { token: *token, from: *account, to, value: *value }; + deposit_event(env, address, event); Ok(burnCall::abi_encode_returns(&burnReturn {})) }, IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { env.charge(>::WeightInfo::total_supply())?; + let total_supply = U256::saturating_from(>::total_supply((*token).into())); + Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, IFungiblesCalls::balanceOf(balanceOfCall { token, owner }) => { env.charge(>::WeightInfo::balance_of())?; + let account = env.to_account_id(&(*owner.0).into()); let balance = U256::saturating_from(>::balance((*token).into(), account)); + Ok(balanceOfCall::abi_encode_returns(&balance)) }, IFungiblesCalls::allowance(allowanceCall { token, owner, spender }) => { env.charge(>::WeightInfo::allowance())?; + let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let allowance = >::allowance((*token).into(), &owner, &spender); let remaining = U256::saturating_from(allowance); + Ok(allowanceCall::abi_encode_returns(&remaining)) }, IFungiblesCalls::name(nameCall { token }) => { env.charge(>::WeightInfo::metadata_name())?; + let result = >::name((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::symbol(symbolCall { token }) => { env.charge(>::WeightInfo::metadata_symbol())?; + let result = >::symbol((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, IFungiblesCalls::decimals(decimalsCall { token }) => { env.charge(>::WeightInfo::metadata_decimals())?; + let result = >::decimals((*token).into()); + Ok(decimalsCall::abi_encode_returns(&result)) }, IFungiblesCalls::exists(existsCall { token }) => { env.charge(>::WeightInfo::exists())?; + let result = self::exists::((*token).into()); + Ok(existsCall::abi_encode_returns(&result)) }, } From e7e029998bd60b9d1b96a55cbfe2012c164e9e0b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 25 Jun 2025 17:10:17 +0100 Subject: [PATCH 122/284] refactor(api/fungibles/erc20): charge benchmarked weight Uses benchmarks from the fungibles precompile which should be exactly the same for these functions. --- .../src/fungibles/precompiles/erc20.rs | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 9476bba1c..656b77745 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -5,13 +5,14 @@ use frame_support::{ traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, }; use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; -use pallet_revive::AddressMapper as _; +use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; use AddressMatcher::Prefix; use IERC20::*; use super::{ - deposit_event, prefixed_address, sol, to_runtime_origin, AddressMapper, AddressMatcher, Assets, - Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, UintTryFrom, UintTryTo, U256, + deposit_event, prefixed_address, sol, to_runtime_origin, weights::WeightInfo, AddressMapper, + AddressMatcher, Assets, Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, + UintTryFrom, UintTryTo, U256, }; sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); @@ -48,18 +49,22 @@ where match input { // IERC20 totalSupply(_) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::total_supply())?; + let total_supply = U256::saturating_from(>::total_supply(token)); + Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, balanceOf(balanceOfCall { account }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::balance_of())?; + let account = env.to_account_id(&(*account.0).into()); let balance = U256::saturating_from(>::balance(token, account)); + Ok(balanceOfCall::abi_encode_returns(&balance)) }, transfer(transferCall { to, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::transfer())?; let from = >::to_address(env.caller().account_id()?).0.into(); super::transfer::( @@ -73,18 +78,20 @@ where Ok(transferCall::abi_encode_returns(&true)) }, allowance(allowanceCall { owner, spender }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::allowance())?; + let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let remaining = U256::saturating_from(>::allowance(token, &owner, &spender)); + Ok(allowanceCall::abi_encode_returns(&remaining)) }, approve(approveCall { spender, value }) => { - // TODO: charge based on benchmarked weight + let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - super::approve::( + let result = super::approve::( to_runtime_origin(env.caller()), token, env.to_account_id(&(*spender.0).into()), @@ -92,12 +99,19 @@ where ) // TODO: adjust weight .map_err(|e| e.error)?; + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + let event = Approval { owner, spender: *spender, value: *value }; deposit_event(env, address, event); Ok(approveCall::abi_encode_returns(&true)) }, transferFrom(transferFromCall { from, to, value }) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::transfer_from())?; super::transfer_from::( to_runtime_origin(env.caller()), @@ -112,20 +126,26 @@ where }, // IERC20Metadata name(_) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::metadata_name())?; + let result = >::name(token); let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(nameCall::abi_encode_returns(&result)) }, symbol(_) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::metadata_symbol())?; + let result = >::symbol(token); let result = String::from_utf8_lossy(result.as_slice()).into(); + Ok(symbolCall::abi_encode_returns(&result)) }, decimals(_) => { - // TODO: charge based on benchmarked weight + env.charge(>::WeightInfo::metadata_decimals())?; + let result = >::decimals(token); + Ok(decimalsCall::abi_encode_returns(&result)) }, } From 0d7e1107226107aa8caeee287f99c5196b62ae6b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 07:32:41 +0100 Subject: [PATCH 123/284] chore(api): add cargo.lock --- pop-api-vnext/Cargo.lock | 6225 ++++++++++++++++ .../contracts/fungibles/Cargo.lock | 6233 +++++++++++++++++ 2 files changed, 12458 insertions(+) create mode 100644 pop-api-vnext/Cargo.lock create mode 100644 pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock diff --git a/pop-api-vnext/Cargo.lock b/pop-api-vnext/Cargo.lock new file mode 100644 index 000000000..d024ae0fb --- /dev/null +++ b/pop-api-vnext/Cargo.lock @@ -0,0 +1,6225 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-sol-types 0.8.25", +] + +[[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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-sol-type-parser 0.8.25", + "alloy-sol-types 0.8.25", + "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 0.8.25", + "alloy-sol-type-parser 0.8.25", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-abi" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15516116086325c157c18261d768a20677f0f699348000ed391d4ad0dcb82530" +dependencies = [ + "alloy-primitives 1.2.1", + "alloy-sol-type-parser 1.2.1", + "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.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.1.1", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-primitives" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6177ed26655d4e84e00b65cb494d4e0b8830e7cae7ef5d63087d445a2600fb55" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.9.1", + "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", + "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 0.8.25", + "alloy-sol-macro-input 0.8.25", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a14f21d053aea4c6630687c2f4ad614bed4c81e14737a9b904798b24f30ea849" +dependencies = [ + "alloy-sol-macro-expander 1.2.1", + "alloy-sol-macro-input 1.2.1", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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 0.8.25", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34d99282e7c9ef14eb62727981a985a01869e586d1dec729d3bb33679094c100" +dependencies = [ + "alloy-sol-macro-input 1.2.1", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 1.2.1", + "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", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda029f955b78e493360ee1d7bd11e1ab9f2a220a5715449babc79d6d0a01105" +dependencies = [ + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 1.2.1", +] + +[[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-type-parser" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10db1bd7baa35bc8d4a1b07efbf734e73e5ba09f2580fb8cee3483a36087ceb2" +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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-sol-macro 0.8.25", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58377025a47d8b8426b3e4846a251f2c1991033b27f517aade368146f6ab1dfe" +dependencies = [ + "alloy-json-abi 1.2.1", + "alloy-primitives 1.2.1", + "alloy-sol-macro 1.2.1", + "serde", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1786b2e3832f6f0f7c8d62d5d5a282f6952a1ab99981c54cd52b6ac1d8f02df5" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c1c928edb9d8ff24cb5dcb7651d3a98494fff3099eee95c2404cd813a9139f" +dependencies = [ + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + +[[package]] +name = "ark-vrf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_chacha 0.3.1", + "sha2 0.10.9", + "w3f-ring-proof", + "zeroize", +] + +[[package]] +name = "array-bytes" +version = "6.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "binary-merkle-tree" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", +] + +[[package]] +name = "bip32" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" +dependencies = [ + "bs58", + "hmac 0.12.1", + "k256", + "rand_core 0.6.4", + "ripemd", + "secp256k1 0.27.0", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "bip39" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d193de1f7487df1914d3a568b772458861d33f9c54249612cc2893d6915054" +dependencies = [ + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative 0.1.2", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative 0.2.1", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bounded-collections" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ad8a0bed7827f0b07a5d23cec2e58cc02038a99e4ca81616cb2bb2025f804d" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.9", + "tinyvec", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "bytemuck" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "camino" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.26", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "const_env" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9e4f72c6e3398ca6da372abd9affd8f89781fe728869bbf986206e9af9627e" +dependencies = [ + "const_env_impl", +] + +[[package]] +name = "const_env_impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f51209740b5e1589e702b3044cdd4562cef41b6da404904192ffffb852d62" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.104", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive-where" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "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]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "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.104", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "docify" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a772b62b1837c8f060432ddcc10b17aae1453ef17617a99bc07789252d2a5896" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e6be249b0a462a14784a99b19bf35a667bb5e09de611738bb7362fa4c95ff7" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.104", + "termcolor", + "toml", + "walkdir", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a36efbb9bfd58e1723780aa04b61aba95ace6a05d9ffabfdb0b43672552f0805" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[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", + "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", + "primitive-types 0.13.1", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "expander" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" +dependencies = [ + "blake2", + "file-guard", + "fs-err", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "frame-benchmarking" +version = "40.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9e5fcdb30bb83b2d97d7e718127230e0fbbad82b9c32dedf63971f08709def" +dependencies = [ + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-storage", + "static_assertions", +] + +[[package]] +name = "frame-decode" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6027a409bac4fe95b4d107f965fcdbc252fc89d884a360d076b3070b6128c094" +dependencies = [ + "frame-metadata 17.0.0", + "parity-scale-codec", + "scale-decode 0.14.0", + "scale-info", + "scale-type-resolver", + "sp-crypto-hashing", +] + +[[package]] +name = "frame-metadata" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-support" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c7c272704856cc88a86aef689a778050e59f89d7ec1e4ffb3a9e8e04e6b10" +dependencies = [ + "aquamarine", + "array-bytes", + "binary-merkle-tree", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 20.0.0", + "frame-support-procedural", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-weights", + "tt-call", +] + +[[package]] +name = "frame-support-procedural" +version = "33.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcb3c16c8fe1b4edc6df122212b50f776dfce31a94fa63305100841ba4eb7c93" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "docify", + "expander", + "frame-support-procedural-tools", + "itertools 0.11.0", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "13.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-system" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc20d95c35bad22eb8b8d7ef91197a439483458237b176e621d9210f2fbff15" +dependencies = [ + "cfg-if", + "docify", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-version", + "sp-weights", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand 0.8.5", + "rand_core 0.6.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hex-literal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d40b9d5e17727407e55028eafc22b2dc68781786e6d7eb8a21103f5058e3a14" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-num-traits" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" +dependencies = [ + "integer-sqrt", + "num-traits", + "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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "ink" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "const_format", + "deranged", + "derive_more 2.0.1", + "ink_env", + "ink_macro", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage", + "keccak-const", + "linkme", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "scale-info", + "sp-io", + "sp-runtime-interface", + "staging-xcm", +] + +[[package]] +name = "ink_allocator" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_codegen" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "either", + "heck", + "impl-serde", + "ink_ir", + "ink_primitives", + "itertools 0.14.0", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.104", +] + +[[package]] +name = "ink_engine" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_primitives", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", +] + +[[package]] +name = "ink_env" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "cfg-if", + "const_env", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_allocator", + "ink_engine", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "schnorrkel", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", + "sp-io", + "sp-runtime-interface", + "staging-xcm", + "static_assertions", +] + +[[package]] +name = "ink_ir" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "either", + "impl-serde", + "ink_prelude", + "itertools 0.14.0", + "proc-macro2", + "quote", + "sha3", + "syn 2.0.104", +] + +[[package]] +name = "ink_macro" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "ink_codegen", + "ink_ir", + "ink_primitives", + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "ink_metadata" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "derive_more 2.0.1", + "impl-serde", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", +] + +[[package]] +name = "ink_prelude" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_primitives" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "alloy-sol-types 1.2.1", + "cfg-if", + "derive_more 2.0.1", + "impl-trait-for-tuples", + "ink_prelude", + "itertools 0.14.0", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "paste", + "primitive-types 0.13.1", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime-interface", + "xxhash-rust", +] + +[[package]] +name = "ink_storage" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "array-init", + "cfg-if", + "derive_more 2.0.1", + "ink_env", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "pallet-revive-uapi", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ink_storage_traits" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "ink_metadata", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime-interface", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.9", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +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-const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" + +[[package]] +name = "keccak-hash" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" +dependencies = [ + "primitive-types 0.13.1", + "tiny-keccak", +] + +[[package]] +name = "konst" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +dependencies = [ + "bitflags 2.9.1", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linkme" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1b1703c00b2a6a70738920544aa51652532cacddfec2e162d2e29eae01e665c" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "linregress" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eda9dcf4f2a99787827661f312ac3219292549c2ee992bf9a6248ffb066bf7" +dependencies = [ + "nalgebra", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[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.104", +] + +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memory-db" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +dependencies = [ + "hash-db", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "nalgebra" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" +dependencies = [ + "approx", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-asset-conversion" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e063e39ad8ecd3c2b00c963f50cdf79e614c819a01e1c1ce9993287075b1b4d9" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-revive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "895fe6f50f621a69132697b8b43d29d1db4d9ff445eec410bf1fc98cd7e9412c" +dependencies = [ + "alloy-core", + "derive_more 0.99.20", + "environmental", + "ethabi-decode", + "ethereum-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal 0.4.1", + "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", + "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 = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1df19ca809f036d6ddf1632039e9db312f92dbe8f9390e6722ad808cd95377" +dependencies = [ + "anyhow", + "cargo_metadata", + "pallet-revive-uapi", + "polkavm-linker", + "sp-core", + "sp-io", + "toml", +] + +[[package]] +name = "pallet-revive-proc-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63c2dc2fc6961da23fefc54689ce81a8e006f6988bc465dcc9ab9db905d31766" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "pallet-revive-uapi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb8f45102c6279f59f55e0051fc6c26b996619d7842800dfaf3a2583459a1c7" +dependencies = [ + "bitflags 1.3.2", + "pallet-revive-proc-macro", + "parity-scale-codec", + "polkavm-derive 0.21.0", + "scale-info", +] + +[[package]] +name = "pallet-transaction-payment" +version = "40.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ebd61b64848e39e5615832c964dc10b63bcebff26a9ec1cb867b4087240a03" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "bytes", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", + "password-hash", +] + +[[package]] +name = "pest" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "polkadot-core-primitives" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7c519ee804fd08d7464871bd2fe164e8f0683501ea59d2a10f5ef214dacb3b" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "16.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72943c0948c686b47bacb1a03e59baff63bfba2e16e208d77f0f8615827f8564" +dependencies = [ + "bounded-collections", + "derive_more 0.99.20", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "polkadot-sdk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" +dependencies = [ + "sp-crypto-hashing", +] + +[[package]] +name = "polkavm" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd34e2f74206fff33482ae1718e275f11365ef8c4de7f0e69217f8845303867" +dependencies = [ + "libc", + "log", + "polkavm-assembler", + "polkavm-common 0.21.0", + "polkavm-linux-raw", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" + +[[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", +] + +[[package]] +name = "polkavm-common" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538810ffdaa629113b9f436f43ba487a6cceacc04a769ac3cdcd32fcf87351cd" + +[[package]] +name = "polkavm-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" +dependencies = [ + "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]] +name = "polkavm-derive" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e819eaea986d6a3de2a08840f0cc188db3c318b30f9bb1deb416d8c4beb2ed14" +dependencies = [ + "polkavm-derive-impl-macro 0.22.0", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" +dependencies = [ + "polkavm-common 0.18.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414507a0a7c9451cc81336ef1f5ccbab8fa4aeda402668735aa28331867bd3ef" +dependencies = [ + "polkavm-common 0.22.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" +dependencies = [ + "polkavm-derive-impl 0.18.1", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad6a5df4cc6466a219386b04d8bd267ba772f9458a8e9aa7539757ca5b11e2aa" +dependencies = [ + "polkavm-derive-impl 0.22.0", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-linker" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bc764986c4a63f9ab9890c3f4eb9b4c13b6ff80d79685bd48ade147234aab4" +dependencies = [ + "dirs", + "gimli", + "hashbrown 0.14.5", + "log", + "object", + "polkavm-common 0.21.0", + "regalloc2", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linux-raw" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "pop-api" +version = "0.1.0" +dependencies = [ + "alloy-sol-types 1.2.1", + "hex", + "ink", + "pop-primitives", +] + +[[package]] +name = "pop-primitives" +version = "0.0.0" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +dependencies = [ + "proc-macro2", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +dependencies = [ + "fixed-hash", + "impl-codec 0.7.1", + "impl-num-traits", + "impl-rlp", + "impl-serde", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro-warning" +version = "1.84.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75eea531cfcd120e0851a3f8aed42c4841f78c889eefafd96339c72677ae42c3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.9.1", + "lazy_static", + "num-traits", + "rand 0.9.1", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash 1.1.0", + "slice-group-by", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[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 = "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.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-hex" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustversion" +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 = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-info", + "scale-type-resolver", + "serde", +] + +[[package]] +name = "scale-bits" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver", +] + +[[package]] +name = "scale-decode" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-decode-derive 0.14.0", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-decode" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" +dependencies = [ + "parity-scale-codec", + "scale-bits 0.7.0", + "scale-decode-derive 0.16.0", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-decode-derive" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-decode-derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-encode" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-encode-derive 0.8.0", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-encode" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" +dependencies = [ + "parity-scale-codec", + "scale-encode-derive 0.10.0", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-encode-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-encode-derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more 1.0.0", + "parity-scale-codec", + "scale-info-derive", + "schemars", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" +dependencies = [ + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-value" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +dependencies = [ + "derive_more 1.0.0", + "either", + "parity-scale-codec", + "scale-bits 0.6.0", + "scale-decode 0.14.0", + "scale-encode 0.8.0", + "scale-info", + "scale-type-resolver", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.104", +] + +[[package]] +name = "schnellru" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec", + "curve25519-dalek", + "getrandom_or_panic", + "merlin", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "password-hash", + "pbkdf2", + "salsa20", + "sha2 0.10.9", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "secp256k1-sys 0.9.2", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes 0.14.0", + "rand 0.8.5", + "secp256k1-sys 0.10.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "secrecy" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simba" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simple-mermaid" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "sp-api" +version = "36.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "541da427f47dfb97f3dd0556fa3272bdc5dfa0d4c1ad53a22670a9bae4db63d7" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", + "sp-metadata-ir", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-trie", + "sp-version", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-api-proc-macro" +version = "22.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cedafdeaf15c774433ad8f5b00883bdf7d86e7c8b8e050e3439d4ae422114096" +dependencies = [ + "Inflector", + "blake2", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-application-crypto" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba375ab65a76f7413d1bfe48122fd347ce7bd2047e36ecbbd78f12f5adaed121" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", +] + +[[package]] +name = "sp-arithmetic" +version = "26.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +dependencies = [ + "docify", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "static_assertions", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4f3b3414e7620ad72d0000b520e0570dca38dc63e160c95164ff3f789020cc1" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b54310103ae4f0e3228e217e2a9ccaca0d7c3502d3aa276623febf4c722ca397" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc83d9e7b1d58e1d020c20d7208b00d21fa73dcf92721114eae432b9f01e62d5" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-timestamp", +] + +[[package]] +name = "sp-core" +version = "36.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +dependencies = [ + "ark-vrf", + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.104", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-externalities" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb0d996dfce9afb8879bdfbba9cb9a7d06f29fda38168b91e90419b3b92c42e" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "sp-inherents" +version = "36.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb09ff07946f3e1ecdd4bfb40b2cceba60188215ceb941b5b07230294d7aee1" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-io" +version = "40.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.18.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core", + "sp-crypto-hashing", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-tracing", + "sp-trie", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +dependencies = [ + "parity-scale-codec", + "parking_lot", + "sp-core", + "sp-externalities", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d1db25e362edbf5531b427d4bdfc2562bec6a031c3eb2a9145c0a0a01a572d" +dependencies = [ + "frame-metadata 20.0.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp-panic-handler" +version = "13.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +dependencies = [ + "backtrace", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "41.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +dependencies = [ + "binary-merkle-tree", + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-trie", + "sp-weights", + "tracing", + "tuplex", +] + +[[package]] +name = "sp-runtime-interface" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.18.0", + "primitive-types 0.13.1", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-staking" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8f9c0a32836e3c8842b0aec0813077654885d45d83b618210fbb730ea63545" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sp-state-machine" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", + "thiserror 1.0.69", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + +[[package]] +name = "sp-storage" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", +] + +[[package]] +name = "sp-timestamp" +version = "36.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "176c77326c15425a15e085261161a9435f9a3c0d4bf61dae6dccf05b957a51c6" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-tracing" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +dependencies = [ + "parity-scale-codec", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-trie" +version = "39.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +dependencies = [ + "ahash", + "hash-db", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core", + "sp-externalities", + "thiserror 1.0.69", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "39.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-version-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-wasm-interface" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + +[[package]] +name = "sp-weights" +version = "31.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-debug-derive", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-xcm" +version = "16.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0126278d7fc6d7dec55e5a109f838bbf401dd084aecf2597e4e11ea07515a0a" +dependencies = [ + "array-bytes", + "bounded-collections", + "derive-where", + "environmental", + "frame-support", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-weights", + "xcm-procedural", +] + +[[package]] +name = "staging-xcm-builder" +version = "20.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f031952c1496cf7f86d19ab38e3264be9a54b7d8eecb25ba69f977cc7549d08" +dependencies = [ + "environmental", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "pallet-asset-conversion", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", + "tracing", +] + +[[package]] +name = "staging-xcm-executor" +version = "19.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9bc315e8c7018fcfe0371ce4b7e726fb699e37b2acc3e5effb87a7d131a3ff" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "tracing", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "substrate-bip39" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "schnorrkel", + "sha2 0.10.9", + "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 = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subxt-core" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7a1bc6c9c1724971636a66e3225a7253cdb35bb6efb81524a6c71c04f08c59" +dependencies = [ + "base58", + "blake2", + "derive-where", + "frame-decode", + "frame-metadata 17.0.0", + "hashbrown 0.14.5", + "hex", + "impl-serde", + "keccak-hash", + "parity-scale-codec", + "polkadot-sdk", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-decode 0.14.0", + "scale-encode 0.8.0", + "scale-info", + "scale-value", + "serde", + "serde_json", + "subxt-metadata", + "tracing", +] + +[[package]] +name = "subxt-metadata" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacd4e7484fef58deaa2dcb32d94753a864b208a668c0dd0c28be1d8abeeadb2" +dependencies = [ + "frame-decode", + "frame-metadata 17.0.0", + "hashbrown 0.14.5", + "parity-scale-codec", + "polkadot-sdk", + "scale-info", +] + +[[package]] +name = "subxt-signer" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" +dependencies = [ + "base64", + "bip32", + "bip39", + "cfg-if", + "crypto_secretbox", + "hex", + "hmac 0.12.1", + "keccak-hash", + "parity-scale-codec", + "pbkdf2", + "polkadot-sdk", + "regex", + "schnorrkel", + "scrypt", + "secp256k1 0.30.0", + "secrecy 0.10.3", + "serde", + "serde_json", + "sha2 0.10.9", + "subxt-core", + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "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.104", +] + +[[package]] +name = "syn-solidity" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ac494e7266fcdd2ad80bf4375d55d27a117ea5c866c26d0e97fe5b3caeeb75" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trie-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c0670ab45a6b7002c7df369fee950a27cf29ae0474343fd3a15aa15f691e7a6" +dependencies = [ + "hash-db", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db", +] + +[[package]] +name = "tt-call" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" + +[[package]] +name = "tuplex" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "676ac81d5454c4dcf37955d34fa8626ede3490f744b86ca14a7b90168d2a08aa" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "w3f-bls" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6bfb937b3d12077654a9e43e32a4e9c20177dd9fea0f3aba673e7840bb54f32" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", + "arrayref", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.9", + "sha3", + "zeroize", +] + +[[package]] +name = "w3f-pcs" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbe7a8d5c914b69392ab3b267f679a2e546fe29afaddce47981772ac71bd02e1" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "merlin", +] + +[[package]] +name = "w3f-plonk-common" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca389e494fe08c5c108b512e2328309036ee1c0bc7bdfdb743fef54d448c8c" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "getrandom_or_panic", + "rand_core 0.6.4", + "w3f-pcs", +] + +[[package]] +name = "w3f-ring-proof" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a639379402ad51504575dbd258740383291ac8147d3b15859bdf1ea48c677de" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "ark-transcript", + "w3f-pcs", + "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 = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wide" +version = "0.7.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xcm-procedural" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3d21c65cbf847ae0b1a8e6411b614d269d3108c6c649b039bffcf225e89aa4" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock new file mode 100644 index 000000000..dd91fd6df --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -0,0 +1,6233 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-sol-types 0.8.25", +] + +[[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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-sol-type-parser 0.8.25", + "alloy-sol-types 0.8.25", + "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 0.8.25", + "alloy-sol-type-parser 0.8.25", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-abi" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15516116086325c157c18261d768a20677f0f699348000ed391d4ad0dcb82530" +dependencies = [ + "alloy-primitives 1.2.1", + "alloy-sol-type-parser 1.2.1", + "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.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.1.1", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-primitives" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6177ed26655d4e84e00b65cb494d4e0b8830e7cae7ef5d63087d445a2600fb55" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.9.1", + "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", + "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 0.8.25", + "alloy-sol-macro-input 0.8.25", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a14f21d053aea4c6630687c2f4ad614bed4c81e14737a9b904798b24f30ea849" +dependencies = [ + "alloy-sol-macro-expander 1.2.1", + "alloy-sol-macro-input 1.2.1", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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 0.8.25", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34d99282e7c9ef14eb62727981a985a01869e586d1dec729d3bb33679094c100" +dependencies = [ + "alloy-sol-macro-input 1.2.1", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 1.2.1", + "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", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda029f955b78e493360ee1d7bd11e1ab9f2a220a5715449babc79d6d0a01105" +dependencies = [ + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 1.2.1", +] + +[[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-type-parser" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10db1bd7baa35bc8d4a1b07efbf734e73e5ba09f2580fb8cee3483a36087ceb2" +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 0.8.25", + "alloy-primitives 0.8.25", + "alloy-sol-macro 0.8.25", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58377025a47d8b8426b3e4846a251f2c1991033b27f517aade368146f6ab1dfe" +dependencies = [ + "alloy-json-abi 1.2.1", + "alloy-primitives 1.2.1", + "alloy-sol-macro 1.2.1", + "serde", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1786b2e3832f6f0f7c8d62d5d5a282f6952a1ab99981c54cd52b6ac1d8f02df5" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c1c928edb9d8ff24cb5dcb7651d3a98494fff3099eee95c2404cd813a9139f" +dependencies = [ + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + +[[package]] +name = "ark-vrf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_chacha 0.3.1", + "sha2 0.10.9", + "w3f-ring-proof", + "zeroize", +] + +[[package]] +name = "array-bytes" +version = "6.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "binary-merkle-tree" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", +] + +[[package]] +name = "bip32" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" +dependencies = [ + "bs58", + "hmac 0.12.1", + "k256", + "rand_core 0.6.4", + "ripemd", + "secp256k1 0.27.0", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "bip39" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d193de1f7487df1914d3a568b772458861d33f9c54249612cc2893d6915054" +dependencies = [ + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative 0.1.2", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative 0.2.1", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bounded-collections" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ad8a0bed7827f0b07a5d23cec2e58cc02038a99e4ca81616cb2bb2025f804d" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.9", + "tinyvec", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "bytemuck" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "camino" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.26", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "const_env" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9e4f72c6e3398ca6da372abd9affd8f89781fe728869bbf986206e9af9627e" +dependencies = [ + "const_env_impl", +] + +[[package]] +name = "const_env_impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f51209740b5e1589e702b3044cdd4562cef41b6da404904192ffffb852d62" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.104", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive-where" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "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]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "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.104", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "docify" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a772b62b1837c8f060432ddcc10b17aae1453ef17617a99bc07789252d2a5896" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e6be249b0a462a14784a99b19bf35a667bb5e09de611738bb7362fa4c95ff7" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.104", + "termcolor", + "toml", + "walkdir", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a36efbb9bfd58e1723780aa04b61aba95ace6a05d9ffabfdb0b43672552f0805" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[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", + "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", + "primitive-types 0.13.1", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "expander" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" +dependencies = [ + "blake2", + "file-guard", + "fs-err", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "frame-benchmarking" +version = "40.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9e5fcdb30bb83b2d97d7e718127230e0fbbad82b9c32dedf63971f08709def" +dependencies = [ + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-storage", + "static_assertions", +] + +[[package]] +name = "frame-decode" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6027a409bac4fe95b4d107f965fcdbc252fc89d884a360d076b3070b6128c094" +dependencies = [ + "frame-metadata 17.0.0", + "parity-scale-codec", + "scale-decode 0.14.0", + "scale-info", + "scale-type-resolver", + "sp-crypto-hashing", +] + +[[package]] +name = "frame-metadata" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-support" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c7c272704856cc88a86aef689a778050e59f89d7ec1e4ffb3a9e8e04e6b10" +dependencies = [ + "aquamarine", + "array-bytes", + "binary-merkle-tree", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 20.0.0", + "frame-support-procedural", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-weights", + "tt-call", +] + +[[package]] +name = "frame-support-procedural" +version = "33.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcb3c16c8fe1b4edc6df122212b50f776dfce31a94fa63305100841ba4eb7c93" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "docify", + "expander", + "frame-support-procedural-tools", + "itertools 0.11.0", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "13.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-system" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc20d95c35bad22eb8b8d7ef91197a439483458237b176e621d9210f2fbff15" +dependencies = [ + "cfg-if", + "docify", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-version", + "sp-weights", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "fungibles" +version = "0.1.0" +dependencies = [ + "ink", + "pop-api", + "scale-info", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand 0.8.5", + "rand_core 0.6.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hex-literal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d40b9d5e17727407e55028eafc22b2dc68781786e6d7eb8a21103f5058e3a14" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-num-traits" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" +dependencies = [ + "integer-sqrt", + "num-traits", + "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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "ink" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "const_format", + "deranged", + "derive_more 2.0.1", + "ink_env", + "ink_macro", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage", + "keccak-const", + "linkme", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "scale-info", + "sp-io", + "sp-runtime-interface", + "staging-xcm", +] + +[[package]] +name = "ink_allocator" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_codegen" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "either", + "heck", + "impl-serde", + "ink_ir", + "ink_primitives", + "itertools 0.14.0", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.104", +] + +[[package]] +name = "ink_engine" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_primitives", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", +] + +[[package]] +name = "ink_env" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "cfg-if", + "const_env", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_allocator", + "ink_engine", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive 0.22.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "schnorrkel", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", + "sp-io", + "sp-runtime-interface", + "staging-xcm", + "static_assertions", +] + +[[package]] +name = "ink_ir" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "blake2", + "either", + "impl-serde", + "ink_prelude", + "itertools 0.14.0", + "proc-macro2", + "quote", + "sha3", + "syn 2.0.104", +] + +[[package]] +name = "ink_macro" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "ink_codegen", + "ink_ir", + "ink_primitives", + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "ink_metadata" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "derive_more 2.0.1", + "impl-serde", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", +] + +[[package]] +name = "ink_prelude" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_primitives" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "alloy-sol-types 1.2.1", + "cfg-if", + "derive_more 2.0.1", + "impl-trait-for-tuples", + "ink_prelude", + "itertools 0.14.0", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "paste", + "primitive-types 0.13.1", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime-interface", + "xxhash-rust", +] + +[[package]] +name = "ink_storage" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "array-init", + "cfg-if", + "derive_more 2.0.1", + "ink_env", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "pallet-revive-uapi", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ink_storage_traits" +version = "6.0.0-alpha" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +dependencies = [ + "ink_metadata", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime-interface", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.9", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +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-const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" + +[[package]] +name = "keccak-hash" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" +dependencies = [ + "primitive-types 0.13.1", + "tiny-keccak", +] + +[[package]] +name = "konst" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +dependencies = [ + "bitflags 2.9.1", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linkme" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1b1703c00b2a6a70738920544aa51652532cacddfec2e162d2e29eae01e665c" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "linregress" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eda9dcf4f2a99787827661f312ac3219292549c2ee992bf9a6248ffb066bf7" +dependencies = [ + "nalgebra", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[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.104", +] + +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memory-db" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +dependencies = [ + "hash-db", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "nalgebra" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" +dependencies = [ + "approx", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-asset-conversion" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e063e39ad8ecd3c2b00c963f50cdf79e614c819a01e1c1ce9993287075b1b4d9" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "pallet-revive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "895fe6f50f621a69132697b8b43d29d1db4d9ff445eec410bf1fc98cd7e9412c" +dependencies = [ + "alloy-core", + "derive_more 0.99.20", + "environmental", + "ethabi-decode", + "ethereum-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal 0.4.1", + "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", + "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 = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1df19ca809f036d6ddf1632039e9db312f92dbe8f9390e6722ad808cd95377" +dependencies = [ + "anyhow", + "cargo_metadata", + "pallet-revive-uapi", + "polkavm-linker", + "sp-core", + "sp-io", + "toml", +] + +[[package]] +name = "pallet-revive-proc-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63c2dc2fc6961da23fefc54689ce81a8e006f6988bc465dcc9ab9db905d31766" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "pallet-revive-uapi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb8f45102c6279f59f55e0051fc6c26b996619d7842800dfaf3a2583459a1c7" +dependencies = [ + "bitflags 1.3.2", + "pallet-revive-proc-macro", + "parity-scale-codec", + "polkavm-derive 0.21.0", + "scale-info", +] + +[[package]] +name = "pallet-transaction-payment" +version = "40.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ebd61b64848e39e5615832c964dc10b63bcebff26a9ec1cb867b4087240a03" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "bytes", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", + "password-hash", +] + +[[package]] +name = "pest" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "polkadot-core-primitives" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7c519ee804fd08d7464871bd2fe164e8f0683501ea59d2a10f5ef214dacb3b" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "16.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72943c0948c686b47bacb1a03e59baff63bfba2e16e208d77f0f8615827f8564" +dependencies = [ + "bounded-collections", + "derive_more 0.99.20", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "polkadot-sdk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" +dependencies = [ + "sp-crypto-hashing", +] + +[[package]] +name = "polkavm" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd34e2f74206fff33482ae1718e275f11365ef8c4de7f0e69217f8845303867" +dependencies = [ + "libc", + "log", + "polkavm-assembler", + "polkavm-common 0.21.0", + "polkavm-linux-raw", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" + +[[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", +] + +[[package]] +name = "polkavm-common" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538810ffdaa629113b9f436f43ba487a6cceacc04a769ac3cdcd32fcf87351cd" + +[[package]] +name = "polkavm-derive" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" +dependencies = [ + "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]] +name = "polkavm-derive" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e819eaea986d6a3de2a08840f0cc188db3c318b30f9bb1deb416d8c4beb2ed14" +dependencies = [ + "polkavm-derive-impl-macro 0.22.0", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" +dependencies = [ + "polkavm-common 0.18.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414507a0a7c9451cc81336ef1f5ccbab8fa4aeda402668735aa28331867bd3ef" +dependencies = [ + "polkavm-common 0.22.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" +dependencies = [ + "polkavm-derive-impl 0.18.1", + "syn 2.0.104", +] + +[[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.104", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad6a5df4cc6466a219386b04d8bd267ba772f9458a8e9aa7539757ca5b11e2aa" +dependencies = [ + "polkavm-derive-impl 0.22.0", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-linker" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bc764986c4a63f9ab9890c3f4eb9b4c13b6ff80d79685bd48ade147234aab4" +dependencies = [ + "dirs", + "gimli", + "hashbrown 0.14.5", + "log", + "object", + "polkavm-common 0.21.0", + "regalloc2", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linux-raw" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "pop-api" +version = "0.1.0" +dependencies = [ + "alloy-sol-types 1.2.1", + "ink", + "pop-primitives", +] + +[[package]] +name = "pop-primitives" +version = "0.0.0" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +dependencies = [ + "proc-macro2", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +dependencies = [ + "fixed-hash", + "impl-codec 0.7.1", + "impl-num-traits", + "impl-rlp", + "impl-serde", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro-warning" +version = "1.84.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75eea531cfcd120e0851a3f8aed42c4841f78c889eefafd96339c72677ae42c3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.9.1", + "lazy_static", + "num-traits", + "rand 0.9.1", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash 1.1.0", + "slice-group-by", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[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 = "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.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-hex" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustversion" +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 = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-info", + "scale-type-resolver", + "serde", +] + +[[package]] +name = "scale-bits" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver", +] + +[[package]] +name = "scale-decode" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-decode-derive 0.14.0", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-decode" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" +dependencies = [ + "parity-scale-codec", + "scale-bits 0.7.0", + "scale-decode-derive 0.16.0", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-decode-derive" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-decode-derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-encode" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" +dependencies = [ + "derive_more 1.0.0", + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-encode-derive 0.8.0", + "scale-type-resolver", + "smallvec", +] + +[[package]] +name = "scale-encode" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" +dependencies = [ + "parity-scale-codec", + "scale-encode-derive 0.10.0", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-encode-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-encode-derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more 1.0.0", + "parity-scale-codec", + "scale-info-derive", + "schemars", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" +dependencies = [ + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-value" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +dependencies = [ + "derive_more 1.0.0", + "either", + "parity-scale-codec", + "scale-bits 0.6.0", + "scale-decode 0.14.0", + "scale-encode 0.8.0", + "scale-info", + "scale-type-resolver", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.104", +] + +[[package]] +name = "schnellru" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec", + "curve25519-dalek", + "getrandom_or_panic", + "merlin", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "password-hash", + "pbkdf2", + "salsa20", + "sha2 0.10.9", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "secp256k1-sys 0.9.2", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes 0.14.0", + "rand 0.8.5", + "secp256k1-sys 0.10.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "secrecy" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simba" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simple-mermaid" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "sp-api" +version = "36.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "541da427f47dfb97f3dd0556fa3272bdc5dfa0d4c1ad53a22670a9bae4db63d7" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", + "sp-metadata-ir", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-trie", + "sp-version", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-api-proc-macro" +version = "22.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cedafdeaf15c774433ad8f5b00883bdf7d86e7c8b8e050e3439d4ae422114096" +dependencies = [ + "Inflector", + "blake2", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-application-crypto" +version = "40.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba375ab65a76f7413d1bfe48122fd347ce7bd2047e36ecbbd78f12f5adaed121" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", +] + +[[package]] +name = "sp-arithmetic" +version = "26.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +dependencies = [ + "docify", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "static_assertions", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4f3b3414e7620ad72d0000b520e0570dca38dc63e160c95164ff3f789020cc1" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b54310103ae4f0e3228e217e2a9ccaca0d7c3502d3aa276623febf4c722ca397" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc83d9e7b1d58e1d020c20d7208b00d21fa73dcf92721114eae432b9f01e62d5" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-timestamp", +] + +[[package]] +name = "sp-core" +version = "36.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +dependencies = [ + "ark-vrf", + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.104", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-externalities" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb0d996dfce9afb8879bdfbba9cb9a7d06f29fda38168b91e90419b3b92c42e" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "sp-inherents" +version = "36.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb09ff07946f3e1ecdd4bfb40b2cceba60188215ceb941b5b07230294d7aee1" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-io" +version = "40.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.18.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core", + "sp-crypto-hashing", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-tracing", + "sp-trie", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +dependencies = [ + "parity-scale-codec", + "parking_lot", + "sp-core", + "sp-externalities", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d1db25e362edbf5531b427d4bdfc2562bec6a031c3eb2a9145c0a0a01a572d" +dependencies = [ + "frame-metadata 20.0.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp-panic-handler" +version = "13.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +dependencies = [ + "backtrace", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "41.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +dependencies = [ + "binary-merkle-tree", + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-trie", + "sp-weights", + "tracing", + "tuplex", +] + +[[package]] +name = "sp-runtime-interface" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.18.0", + "primitive-types 0.13.1", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-staking" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8f9c0a32836e3c8842b0aec0813077654885d45d83b618210fbb730ea63545" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sp-state-machine" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", + "thiserror 1.0.69", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + +[[package]] +name = "sp-storage" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", +] + +[[package]] +name = "sp-timestamp" +version = "36.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "176c77326c15425a15e085261161a9435f9a3c0d4bf61dae6dccf05b957a51c6" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-tracing" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +dependencies = [ + "parity-scale-codec", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-trie" +version = "39.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +dependencies = [ + "ahash", + "hash-db", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core", + "sp-externalities", + "thiserror 1.0.69", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "39.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-version-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-wasm-interface" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + +[[package]] +name = "sp-weights" +version = "31.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-debug-derive", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-xcm" +version = "16.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0126278d7fc6d7dec55e5a109f838bbf401dd084aecf2597e4e11ea07515a0a" +dependencies = [ + "array-bytes", + "bounded-collections", + "derive-where", + "environmental", + "frame-support", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-weights", + "xcm-procedural", +] + +[[package]] +name = "staging-xcm-builder" +version = "20.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f031952c1496cf7f86d19ab38e3264be9a54b7d8eecb25ba69f977cc7549d08" +dependencies = [ + "environmental", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "pallet-asset-conversion", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", + "tracing", +] + +[[package]] +name = "staging-xcm-executor" +version = "19.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9bc315e8c7018fcfe0371ce4b7e726fb699e37b2acc3e5effb87a7d131a3ff" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", + "tracing", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "substrate-bip39" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "schnorrkel", + "sha2 0.10.9", + "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 = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subxt-core" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7a1bc6c9c1724971636a66e3225a7253cdb35bb6efb81524a6c71c04f08c59" +dependencies = [ + "base58", + "blake2", + "derive-where", + "frame-decode", + "frame-metadata 17.0.0", + "hashbrown 0.14.5", + "hex", + "impl-serde", + "keccak-hash", + "parity-scale-codec", + "polkadot-sdk", + "primitive-types 0.13.1", + "scale-bits 0.6.0", + "scale-decode 0.14.0", + "scale-encode 0.8.0", + "scale-info", + "scale-value", + "serde", + "serde_json", + "subxt-metadata", + "tracing", +] + +[[package]] +name = "subxt-metadata" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacd4e7484fef58deaa2dcb32d94753a864b208a668c0dd0c28be1d8abeeadb2" +dependencies = [ + "frame-decode", + "frame-metadata 17.0.0", + "hashbrown 0.14.5", + "parity-scale-codec", + "polkadot-sdk", + "scale-info", +] + +[[package]] +name = "subxt-signer" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" +dependencies = [ + "base64", + "bip32", + "bip39", + "cfg-if", + "crypto_secretbox", + "hex", + "hmac 0.12.1", + "keccak-hash", + "parity-scale-codec", + "pbkdf2", + "polkadot-sdk", + "regex", + "schnorrkel", + "scrypt", + "secp256k1 0.30.0", + "secrecy 0.10.3", + "serde", + "serde_json", + "sha2 0.10.9", + "subxt-core", + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "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.104", +] + +[[package]] +name = "syn-solidity" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ac494e7266fcdd2ad80bf4375d55d27a117ea5c866c26d0e97fe5b3caeeb75" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trie-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c0670ab45a6b7002c7df369fee950a27cf29ae0474343fd3a15aa15f691e7a6" +dependencies = [ + "hash-db", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db", +] + +[[package]] +name = "tt-call" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" + +[[package]] +name = "tuplex" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "676ac81d5454c4dcf37955d34fa8626ede3490f744b86ca14a7b90168d2a08aa" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "w3f-bls" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6bfb937b3d12077654a9e43e32a4e9c20177dd9fea0f3aba673e7840bb54f32" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", + "arrayref", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.9", + "sha3", + "zeroize", +] + +[[package]] +name = "w3f-pcs" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbe7a8d5c914b69392ab3b267f679a2e546fe29afaddce47981772ac71bd02e1" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "merlin", +] + +[[package]] +name = "w3f-plonk-common" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca389e494fe08c5c108b512e2328309036ee1c0bc7bdfdb743fef54d448c8c" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "getrandom_or_panic", + "rand_core 0.6.4", + "w3f-pcs", +] + +[[package]] +name = "w3f-ring-proof" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a639379402ad51504575dbd258740383291ac8147d3b15859bdf1ea48c677de" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "ark-transcript", + "w3f-pcs", + "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 = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wide" +version = "0.7.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xcm-procedural" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3d21c65cbf847ae0b1a8e6411b614d269d3108c6c649b039bffcf225e89aa4" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] From 2957547ab2e2af0ab7025631ced5e7ddadfc1faa Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 10:02:56 +0100 Subject: [PATCH 124/284] test(devnet): set gas limit now that precompiles charge weight --- runtime/devnet/src/config/contracts.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 87083aab5..6b04d77f4 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -185,6 +185,7 @@ mod tests { let fungibles_addr: H160 = Fungibles::<100, TrustBackedAssetsInstance>::address().into(); let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(token).into(); let total_supply: Balance = 10_000; + let gas_limit = Weight::from_parts(600_000_000, 10_000); new_test_ext().execute_with(|| { assert_ok!(Revive::map_account(origin.clone())); assert_ok!(Revive::map_account(RuntimeOrigin::signed(Bob.to_account_id()))); @@ -195,7 +196,7 @@ mod tests { createCall { admin: origin_addr.0.into(), minBalance: primitives::U256::from(1) } .abi_encode(); println!("IFungibles.create: {}", to_hex(&call, false)); - assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); + assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, gas_limit, 0, call)); let asset_details = Asset::get(token).unwrap(); assert_eq!(asset_details.owner, caller); assert_eq!(asset_details.admin, caller); @@ -208,7 +209,7 @@ mod tests { } .abi_encode(); println!("IFungibles.mint: {}", to_hex(&call, false)); - assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, Weight::zero(), 0, call)); + assert_ok!(Revive::call(origin.clone(), fungibles_addr, 0, gas_limit, 0, call)); // Transfer via erc20 precompile println!("IERC20 precompile: {}", to_hex(&erc20_addr.0, false)); @@ -218,7 +219,7 @@ mod tests { } .abi_encode(); println!("IERC20.transfer: {}", to_hex(&call, false)); - assert_ok!(Revive::call(origin.clone(), erc20_addr, 0, Weight::zero(), 0, call)); + assert_ok!(Revive::call(origin.clone(), erc20_addr, 0, gas_limit, 0, call)); assert_eq!(Assets::balance(token, &Bob.to_account_id()), total_supply / 2); }) } From 1c1130d14b080932dd88e6f95f7b03146b4d0579 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 10:14:22 +0100 Subject: [PATCH 125/284] test(devnet): remove contract and selector integration tests as available elsewhere now --- runtime/devnet/Cargo.toml | 1 - runtime/devnet/src/config/contracts.rs | 123 +------------------------ 2 files changed, 3 insertions(+), 121 deletions(-) diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index 4931aa5ba..1262c52f4 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -106,7 +106,6 @@ pallet-ismp-runtime-api.workspace = true [dev-dependencies] enumflags2.workspace = true env_logger.workspace = true -hex.workspace = true sp-keyring.workspace = true [features] diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 6b04d77f4..50ef534b9 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -143,18 +143,13 @@ fn contracts_prevents_runtime_calls() { #[cfg(test)] mod tests { - use codec::Encode; use frame_support::{assert_ok, traits::fungible::Mutate}; - use frame_system::pallet_prelude::OriginFor; use pallet_api_vnext::fungibles::precompiles::{IFungibles::*, IERC20}; use pallet_revive::{ - precompiles::alloy::{ - primitives, - sol_types::{SolCall, SolType, SolValue}, - }, - AddressMapper, Code, DepositLimit, + precompiles::alloy::{primitives, sol_types::SolCall}, + AddressMapper, }; - use sp_core::{bytes::to_hex, H160, U256}; + use sp_core::{bytes::to_hex, H160}; use sp_keyring::Sr25519Keyring::{Alice, Bob}; use sp_runtime::Weight; @@ -223,116 +218,4 @@ mod tests { assert_eq!(Assets::balance(token, &Bob.to_account_id()), total_supply / 2); }) } - - // #[test] - // fn fungibles_precompiles_via_contract_works() { - // let contract = include_bytes!( - // "../../../../pop-api-vnext/examples/fungibles/target/ink/fungibles.polkavm" - // ); - // let caller = Alice.to_account_id(); - // let origin = RuntimeOrigin::signed(caller.clone()); - // let recipient = Bob.to_account_id(); - // let recipient_addr = primitives::Address::new(AccountId32Mapper::to_address(&recipient).0); - // let minimum_value = U256::from(1); - // let endowment = primitives::U256::from(10_000); - // new_test_ext().execute_with(|| { - // assert_ok!(Revive::map_account(origin.clone())); - // assert_ok!(Revive::map_account(RuntimeOrigin::signed(recipient))); - - // // Instantiate contract with some value, required to create underlying asset - // let result = Revive::bare_instantiate( - // origin.clone(), - // 10 * UNIT, - // Weight::MAX, - // DepositLimit::Balance(u128::MAX), - // Code::Upload(contract.to_vec()), - // // Constructors are not yet using Solidity encoding - // [blake_selector("new"), ("Name", "SYMBOL", minimum_value, 10u8).encode()].concat(), - // None, - // ) - // .result - // .unwrap(); - // assert!(!result.result.did_revert()); - // let contract = primitives::Address::new(result.addr.0); - - // // Mint some tokens to the contract - // call::<()>( - // origin.clone(), - // result.addr, - // [keccak_selector("mint(address,uint256)"), (contract, endowment).abi_encode()] - // .concat(), - // ); - - // // Interact with contract as Erc20 - // let total_supply = call::( - // origin.clone(), - // result.addr, - // keccak_selector("totalSupply()"), - // ); - // assert_eq!(total_supply, endowment); - - // let balance_of = call::( - // origin.clone(), - // result.addr, - // [keccak_selector("balanceOf(address)"), (contract,).abi_encode()].concat(), - // ); - // assert_eq!(balance_of, endowment); - - // // Transfer tokens from contract to recipient - // let value = endowment / primitives::U256::from(2); - // assert!(call::( - // origin.clone(), - // result.addr, - // [ - // keccak_selector("transfer(address,uint256)"), - // (recipient_addr, value).abi_encode(), - // ] - // .concat(), - // )); - // let balance_of = call::( - // origin.clone(), - // result.addr, - // [keccak_selector("balanceOf(address)"), (recipient_addr,).abi_encode()].concat(), - // ); - // assert_eq!(balance_of, value); - // }); - - // fn call::RustType>>( - // origin: OriginFor, - // contract: H160, - // data: Vec, - // ) -> T { - // let result = Revive::bare_call( - // origin, - // contract, - // 0, - // Weight::MAX, - // DepositLimit::Balance(u128::MAX), - // data, - // ) - // .result - // .unwrap(); - // assert!(!result.did_revert()); - // T::abi_decode(&result.data).unwrap() - // } - // } - - fn blake_selector(name: &str) -> Vec { - sp_io::hashing::blake2_256(name.as_bytes())[0..4].to_vec() - } - - fn keccak_selector(name: &str) -> Vec { - sp_io::hashing::keccak_256(name.as_bytes())[0..4].to_vec() - } - - #[test] - fn selectors_work() { - // Constructors currently still use blake encoding - assert_eq!(hex::encode(blake_selector("new")), "9bae9d5e"); - - // Erc20 selectors - assert_eq!(hex::encode(keccak_selector("exists()")), "267c4ae4"); - assert_eq!(hex::encode(keccak_selector("totalSupply()")), "18160ddd"); - assert_eq!(hex::encode(keccak_selector("balanceOf(address)")), "70a08231"); - } } From 2c68e934d4f479d61f610477e6a88543a9bd9097 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 10:23:32 +0100 Subject: [PATCH 126/284] test(api): add selectors test --- pop-api-vnext/integration-tests/Cargo.toml | 1 + pop-api-vnext/integration-tests/src/lib.rs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index 7b872b734..ec26838bd 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -15,6 +15,7 @@ codec.workspace = true env_logger.workspace = true frame-support = { workspace = true, default-features = false } frame-system = { workspace = true, default-features = false } +hex.workspace = true log.workspace = true pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles" ] } pallet-assets = { workspace = true, default-features = false } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index b9671c3fa..435a8bc73 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -172,3 +172,14 @@ impl ExtBuilder { ext } } + +#[test] +fn selectors_work() { + // Constructors currently still use blake encoding + assert_eq!(hex::encode(blake_selector("new")), "9bae9d5e"); + + // Erc20 selectors + assert_eq!(hex::encode(keccak_selector("exists()")), "267c4ae4"); + assert_eq!(hex::encode(keccak_selector("totalSupply()")), "18160ddd"); + assert_eq!(hex::encode(keccak_selector("balanceOf(address)")), "70a08231"); +} From 7a2357b607f4ab14d2b76092aaf5eba7b58d4afd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:11:23 +0100 Subject: [PATCH 127/284] test(api): add initial tests --- pallets/api-vnext/src/fungibles/mod.rs | 2 + pallets/api-vnext/src/fungibles/tests.rs | 189 +++++++++++++++++++++++ pallets/api-vnext/src/mock.rs | 64 +++++--- 3 files changed, 237 insertions(+), 18 deletions(-) create mode 100644 pallets/api-vnext/src/fungibles/tests.rs diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index 86403a76d..c43a6dd67 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -26,6 +26,8 @@ use super::*; mod benchmarking; /// The fungibles precompiles offer a streamlined interface for interacting with fungible tokens. pub mod precompiles; +#[cfg(test)] +mod tests; pub mod weights; type AssetIdOf = >::AssetId; diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs new file mode 100644 index 000000000..d700f0802 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -0,0 +1,189 @@ +use frame_support::{ + assert_noop, assert_ok, + sp_runtime::DispatchError::BadOrigin, + traits::{fungibles::approvals::Mutate, Get}, +}; + +use super::*; +use crate::mock::{Assets, *}; + +type AssetsError = pallet_assets::Error; +type ED = ExistentialDeposit; +type WeightInfo = ::WeightInfo; + +#[test] +fn transfer_works() { + let token = 1; + let value = 100 * UNIT; + let from = ALICE; + let to = BOB; + ExtBuilder::new() + .with_balances(vec![(from.clone(), ED::get()), (to.clone(), ED::get())]) + .with_assets(vec![(token, from.clone(), false, 1)]) + .with_asset_balances(vec![(token, from.clone(), value)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!(transfer::(origin, 0, to.clone(), value), BadOrigin); + } + // Check error works for `Assets::transfer_keep_alive()`. + assert_noop!( + transfer::(signed(from.clone()), TokenId::MAX, to.clone(), value), + AssetsError::Unknown + ); + let balance_before_transfer = Assets::balance(token, &to); + assert_ok!(transfer::(signed(from), token, to.clone(), value)); + let balance_after_transfer = Assets::balance(token, &to); + assert_eq!(balance_after_transfer, balance_before_transfer + value); + }); +} + +#[test] +fn transfer_from_works() { + let token = 1; + let value = 100 * UNIT; + let from = ALICE; + let to = BOB; + let spender = CHARLIE; + ExtBuilder::new() + .with_balances(vec![(from.clone(), UNIT), (to.clone(), ED::get())]) + .with_assets(vec![(token, from.clone(), false, 1)]) + .with_asset_balances(vec![(token, from.clone(), value * 2)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!( + transfer_from::(origin, token, from.clone(), to.clone(), value), + BadOrigin + ); + } + // Check error works for `Assets::transfer_approved()`. + assert_noop!( + transfer_from::( + signed(spender.clone()), + TokenId::MAX, + from.clone(), + to.clone(), + value + ), + AssetsError::Unknown + ); + // Approve `spender` to transfer up to `value`. + approve(token, &from, &spender, value); + // Successfully call transfer from. + let from_balance_before_transfer = Assets::balance(token, &from); + let to_balance_before_transfer = Assets::balance(token, &to); + assert_ok!(transfer_from::( + signed(spender), + token, + from.clone(), + to.clone(), + value + )); + let from_balance_after_transfer = Assets::balance(token, &from); + let to_balance_after_transfer = Assets::balance(token, &to); + // Check that `to` has received the `value` tokens from `from`. + assert_eq!(to_balance_after_transfer, to_balance_before_transfer + value); + assert_eq!(from_balance_after_transfer, from_balance_before_transfer - value); + }); +} + +mod approve { + use super::*; + use crate::fungibles::{approve, weights::WeightInfo as _}; + + #[test] + fn ensure_signed_works() { + let token = 1; + let value = 100 * UNIT; + let spender = BOB; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!( + approve::(origin, token, spender.clone(), value), + BadOrigin.with_weight(WeightInfo::approve(0, 0)) + ); + } + }); + } + + #[test] + fn ensure_error_cases_from_pallet_assets_work() { + let token = 1; + let value = 100 * UNIT; + let owner = ALICE; + let spender = BOB; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT), (spender.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + // Check error works for `Assets::approve_transfer()` in `Greater` match arm. + assert_noop!( + approve::( + signed(owner.clone()), + TokenId::MAX, + spender.clone(), + value + ), + AssetsError::Unknown.with_weight(WeightInfo::approve(1, 0)) + ); + super::approve(token, &owner, &spender, value); + // Check error works for `Assets::cancel_approval()` in `Less` match arm. + assert_ok!(Assets::freeze_asset(signed(owner.clone()), token.into())); + assert_noop!( + approve::(signed(owner.clone()), token, spender, value / 2), + AssetsError::AssetNotLive.with_weight(WeightInfo::approve(0, 1)) + ); + assert_ok!(Assets::thaw_asset(signed(owner), token.into())); + // No error test for `approve_transfer` in `Less` arm because it is not possible. + }); + } + + // Non-additive, sets new value. + #[test] + fn approve_works() { + let token = 1; + let value: Balance = 100 * UNIT; + let owner = ALICE; + let spender = BOB; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT), (spender.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + // Approves a value to spend that is higher than the current allowance. + assert_eq!(Assets::allowance(token, &owner, &spender), 0); + assert_eq!( + approve::(signed(owner.clone()), token, spender.clone(), value), + Ok(Some(WeightInfo::approve(1, 0)).into()) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), value); + // Approves a value to spend that is lower than the current allowance. + assert_eq!( + approve::(signed(owner.clone()), token, spender.clone(), value / 2), + Ok(Some(WeightInfo::approve(1, 1)).into()) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), value / 2); + // Approves a value to spend that is equal to the current allowance. + assert_eq!( + approve::(signed(owner.clone()), token, spender.clone(), value / 2), + Ok(Some(WeightInfo::approve(0, 0)).into()) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), value / 2); + // Sets allowance to zero. + assert_eq!( + approve::(signed(owner.clone()), token, spender.clone(), 0), + Ok(Some(WeightInfo::approve(0, 1)).into()) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), 0); + }); + } +} + +fn approve(token: TokenId, owner: &AccountId, spender: &AccountId, amount: Balance) { + assert_ok!(Assets::approve(token, owner, spender, amount)); +} diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 80bdce74d..81c22ba84 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -2,19 +2,24 @@ use codec::Compact; use frame_support::{ derive_impl, sp_runtime::{traits::AccountIdLookup, AccountId32, BuildStorage}, - traits::AsEnsureOriginWithArg, + traits::{AsEnsureOriginWithArg, Get}, }; use frame_system::{EnsureRoot, EnsureSigned}; use pallet_assets::AutoIncAssetId; -pub(crate) use pallet_revive::test_utils::ALICE; +pub(crate) use pallet_revive::test_utils::{ALICE, BOB, CHARLIE}; use super::fungibles; +pub(crate) type AccountId = AccountId32; pub(crate) type Balance = u128; type Block = frame_system::mocking::MockBlock; +pub(crate) type ExistentialDeposit = ::ExistentialDeposit; +// For terminology in tests. +pub(crate) type TokenId = u32; pub(crate) const ERC20: u16 = 2; pub(crate) const FUNGIBLES: u16 = 1; +pub(crate) const UNIT: Balance = 10_000_000_000; #[frame_support::runtime] mod runtime { @@ -49,12 +54,12 @@ mod runtime { #[derive_impl(pallet_assets::config_preludes::TestDefaultConfig)] impl pallet_assets::Config for Test { - type AssetIdParameter = Compact; + type AssetIdParameter = Compact; type Balance = Balance; type CallbackHandle = AutoIncAssetId; type CreateOrigin = AsEnsureOriginWithArg>; type Currency = Balances; - type ForceOrigin = EnsureRoot; + type ForceOrigin = EnsureRoot; } #[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] @@ -76,7 +81,7 @@ impl pallet_revive::Config for Test { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; - type AccountId = AccountId32; + type AccountId = AccountId; type Block = Block; type Lookup = AccountIdLookup; } @@ -89,42 +94,53 @@ impl fungibles::Config for Test { } pub(crate) struct ExtBuilder { - assets: Option>, - asset_accounts: Option>, - asset_metadata: Option, Vec, u8)>>, + assets: Option>, + asset_accounts: Option>, + asset_metadata: Option, Vec, u8)>>, + balances: Vec<(AccountId, Balance)>, } impl ExtBuilder { pub(crate) fn new() -> Self { - Self { assets: None, asset_accounts: None, asset_metadata: None } + Self { + assets: None, + asset_accounts: None, + asset_metadata: None, + balances: vec![(ALICE, ExistentialDeposit::get())], + } } - pub(crate) fn with_assets(mut self, assets: Vec<(u32, AccountId32, bool, u128)>) -> Self { + pub(crate) fn with_assets(mut self, assets: Vec<(TokenId, AccountId, bool, Balance)>) -> Self { self.assets = Some(assets); self } - pub(crate) fn with_asset_balances(mut self, accounts: Vec<(u32, AccountId32, u128)>) -> Self { + pub(crate) fn with_asset_balances( + mut self, + accounts: Vec<(TokenId, AccountId, Balance)>, + ) -> Self { self.asset_accounts = Some(accounts); self } pub(crate) fn with_asset_metadata( mut self, - metadata: Vec<(u32, Vec, Vec, u8)>, + metadata: Vec<(TokenId, Vec, Vec, u8)>, ) -> Self { self.asset_metadata = Some(metadata); self } + pub(crate) fn with_balances(mut self, balances: Vec<(AccountId, Balance)>) -> Self { + self.balances = balances; + self + } + pub(crate) fn build(mut self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - pallet_balances::GenesisConfig:: { - balances: vec![(ALICE, 10_000_000_000)], - ..Default::default() - } - .assimilate_storage(&mut t) - .unwrap(); + pallet_balances::GenesisConfig:: { balances: self.balances, ..Default::default() } + .assimilate_storage(&mut t) + .unwrap(); pallet_assets::GenesisConfig:: { assets: self.assets.take().unwrap_or_default(), @@ -152,3 +168,15 @@ impl ExtBuilder { }) } } + +pub(crate) fn signed(account: AccountId) -> RuntimeOrigin { + RuntimeOrigin::signed(account) +} + +pub(crate) fn root() -> RuntimeOrigin { + RuntimeOrigin::root() +} + +pub(crate) fn none() -> RuntimeOrigin { + RuntimeOrigin::none() +} From 924a87d3d499edce2f6ec158df1f21543677f0dc Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:15:34 +0100 Subject: [PATCH 128/284] test(api): remove unnecessary helper --- pallets/api-vnext/src/fungibles/tests.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index d700f0802..ecd6fa4a8 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -69,7 +69,7 @@ fn transfer_from_works() { AssetsError::Unknown ); // Approve `spender` to transfer up to `value`. - approve(token, &from, &spender, value); + assert_ok!(Assets::approve(token, &from, &spender, value)); // Successfully call transfer from. let from_balance_before_transfer = Assets::balance(token, &from); let to_balance_before_transfer = Assets::balance(token, &to); @@ -131,7 +131,7 @@ mod approve { ), AssetsError::Unknown.with_weight(WeightInfo::approve(1, 0)) ); - super::approve(token, &owner, &spender, value); + assert_ok!(Assets::approve(token, &owner, &spender, value)); // Check error works for `Assets::cancel_approval()` in `Less` match arm. assert_ok!(Assets::freeze_asset(signed(owner.clone()), token.into())); assert_noop!( @@ -183,7 +183,3 @@ mod approve { }); } } - -fn approve(token: TokenId, owner: &AccountId, spender: &AccountId, amount: Balance) { - assert_ok!(Assets::approve(token, owner, spender, amount)); -} From 815e07c5936752795f13d5f618bce94cd981cfb3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:29:42 +0100 Subject: [PATCH 129/284] test(api): add increase/decrease tests --- pallets/api-vnext/src/fungibles/tests.rs | 115 ++++++++++++++++++++++- 1 file changed, 113 insertions(+), 2 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index ecd6fa4a8..491c1834e 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -3,11 +3,13 @@ use frame_support::{ sp_runtime::DispatchError::BadOrigin, traits::{fungibles::approvals::Mutate, Get}, }; +use pallet_assets::WeightInfo as _; -use super::*; +use super::{weights::WeightInfo as _, *}; use crate::mock::{Assets, *}; type AssetsError = pallet_assets::Error; +type AssetsWeightInfo = ::WeightInfo; type ED = ExistentialDeposit; type WeightInfo = ::WeightInfo; @@ -90,7 +92,7 @@ fn transfer_from_works() { mod approve { use super::*; - use crate::fungibles::{approve, weights::WeightInfo as _}; + use crate::fungibles::approve; #[test] fn ensure_signed_works() { @@ -183,3 +185,112 @@ mod approve { }); } } + +#[test] +fn increase_allowance_works() { + let token = 1; + let value: Balance = 100 * UNIT; + let owner = ALICE; + let spender = BOB; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT), (spender.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!( + increase_allowance::(origin, token, spender.clone(), value), + BadOrigin.with_weight(WeightInfo::approve(0, 0)) + ); + } + // Check error works for `Assets::approve_transfer()`. + assert_noop!( + increase_allowance::( + signed(owner.clone()), + TokenId::MAX, + spender.clone(), + value + ), + AssetsError::Unknown.with_weight(AssetsWeightInfo::approve_transfer()) + ); + assert_eq!(0, Assets::allowance(token, &owner, &spender)); + assert_ok!(increase_allowance::( + signed(owner.clone()), + token, + spender.clone(), + value + )); + assert_eq!(Assets::allowance(token, &owner, &spender), value); + // Additive. + assert_ok!(increase_allowance::( + signed(owner.clone()), + token, + spender.clone(), + value + )); + assert_eq!(Assets::allowance(token, &owner, &spender), value * 2); + }); +} + +#[test] +fn decrease_allowance_works() { + let token = 1; + let value: Balance = 100 * UNIT; + let owner = ALICE; + let spender = BOB; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT), (spender.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!( + decrease_allowance::(origin, token, spender.clone(), 0), + BadOrigin.with_weight(WeightInfo::approve(0, 0)) + ); + } + assert_ok!(Assets::approve(token, &owner, &spender, value)); + assert_eq!(Assets::allowance(token, &owner, &spender), value); + // Check error works for `Assets::cancel_approval()`. No error test for + // `approve_transfer` because it is not possible. + assert_ok!(Assets::freeze_asset(signed(owner.clone()), token.into())); + assert_noop!( + decrease_allowance::( + signed(owner.clone()), + token, + spender.clone(), + value / 2 + ), + AssetsError::AssetNotLive.with_weight(WeightInfo::approve(0, 1)) + ); + assert_ok!(Assets::thaw_asset(signed(owner.clone()), token.into())); + // Owner balance is not changed if decreased by zero. + assert_eq!( + decrease_allowance::(signed(owner.clone()), token, spender.clone(), 0), + Ok((0, Some(WeightInfo::approve(0, 0)).into())) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), value); + // "Unapproved" error is returned if the current allowance is less than amount to + // decrease with. + assert_noop!( + decrease_allowance::( + signed(owner.clone()), + token, + spender.clone(), + value * 2 + ), + AssetsError::Unapproved + ); + // Decrease allowance successfully. + assert_eq!( + decrease_allowance::( + signed(owner.clone()), + token, + spender.clone(), + value / 2 + ), + Ok((value / 2, Some(WeightInfo::approve(1, 1)).into())) + ); + assert_eq!(Assets::allowance(token, &owner, &spender), value / 2); + }); +} From eb4564b0b8263fe0f6f3d7e50ac1c35cc739c2fb Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:34:53 +0100 Subject: [PATCH 130/284] test(api): add create test --- pallets/api-vnext/src/fungibles/tests.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 491c1834e..47b383fb5 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -294,3 +294,22 @@ fn decrease_allowance_works() { assert_eq!(Assets::allowance(token, &owner, &spender), value / 2); }); } + +#[test] +fn create_works() { + let creator = ALICE; + let admin = BOB; + let min_balance = 100; + ExtBuilder::new() + .with_balances(vec![(creator.clone(), UNIT)]) + .build() + .execute_with(|| { + for origin in vec![root(), none()] { + assert_noop!(create::(origin, admin.clone(), min_balance), BadOrigin); + } + let id = NextAssetId::::get().unwrap_or_default(); + assert!(!Assets::asset_exists(id)); + assert_ok!(create::(signed(creator), admin, min_balance)); + assert!(Assets::asset_exists(id)); + }); +} From 2b83635d6d194785118bcb63be7d5bf88e6a3cca Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:39:54 +0100 Subject: [PATCH 131/284] test(api): add start_destroy test --- pallets/api-vnext/src/fungibles/tests.rs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 47b383fb5..ad8774532 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -1,6 +1,6 @@ use frame_support::{ assert_noop, assert_ok, - sp_runtime::DispatchError::BadOrigin, + sp_runtime::{DispatchError::BadOrigin, TokenError}, traits::{fungibles::approvals::Mutate, Get}, }; use pallet_assets::WeightInfo as _; @@ -313,3 +313,25 @@ fn create_works() { assert!(Assets::asset_exists(id)); }); } + +#[test] +fn start_destroy_works() { + let token = 1; + let creator = ALICE; + ExtBuilder::new() + .with_assets(vec![(token, creator.clone(), false, 1)]) + .build() + .execute_with(|| { + // Check error works for `Assets::start_destroy()`. + assert_noop!( + start_destroy::(signed(creator.clone()), TokenId::MAX), + AssetsError::Unknown + ); + assert_ok!(start_destroy::(signed(creator.clone()), token)); + // Check that the token is not live after starting the destroy process. + assert_noop!( + Assets::mint(signed(creator.clone()), token.into(), creator.into(), 10 * UNIT), + TokenError::UnknownAsset + ); + }); +} From 26c56ced306c952ac5d7f5966af39bccdc899ee2 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:44:05 +0100 Subject: [PATCH 132/284] test(api): add set_metadata test --- pallets/api-vnext/src/fungibles/tests.rs | 41 +++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index ad8774532..35005d05f 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -1,7 +1,10 @@ use frame_support::{ assert_noop, assert_ok, sp_runtime::{DispatchError::BadOrigin, TokenError}, - traits::{fungibles::approvals::Mutate, Get}, + traits::{ + fungibles::{approvals::Mutate, metadata::Inspect}, + Get, + }, }; use pallet_assets::WeightInfo as _; @@ -335,3 +338,39 @@ fn start_destroy_works() { ); }); } + +#[test] +fn set_metadata_works() { + let token = 1; + let creator = ALICE; + let name = vec![42]; + let symbol = vec![42]; + let decimals = 42; + ExtBuilder::new() + .with_balances(vec![(creator.clone(), UNIT)]) + .with_assets(vec![(token, creator.clone(), false, 1)]) + .build() + .execute_with(|| { + // Check error works for `Assets::set_metadata()`. + assert_noop!( + set_metadata::( + signed(creator.clone()), + TokenId::MAX, + name.clone(), + symbol.clone(), + decimals + ), + AssetsError::Unknown + ); + assert_ok!(set_metadata::( + signed(creator), + token, + name.clone(), + symbol.clone(), + decimals + )); + assert_eq!(Assets::name(token), name); + assert_eq!(Assets::symbol(token), symbol); + assert_eq!(Assets::decimals(token), decimals); + }); +} From 214785c6286df7029e257260086151b41d047e5d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:48:22 +0100 Subject: [PATCH 133/284] test(api): add clear_metadata test --- pallets/api-vnext/src/fungibles/tests.rs | 25 ++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 35005d05f..b25d30272 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -343,8 +343,8 @@ fn start_destroy_works() { fn set_metadata_works() { let token = 1; let creator = ALICE; - let name = vec![42]; - let symbol = vec![42]; + let name = b"name".to_vec(); + let symbol = b"symbol".to_vec(); let decimals = 42; ExtBuilder::new() .with_balances(vec![(creator.clone(), UNIT)]) @@ -374,3 +374,24 @@ fn set_metadata_works() { assert_eq!(Assets::decimals(token), decimals); }); } + +#[test] +fn clear_metadata_works() { + let token = 1; + let creator = ALICE; + ExtBuilder::new() + .with_assets(vec![(token, creator.clone(), false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), 42)]) + .build() + .execute_with(|| { + // Check error works for `Assets::clear_metadata()`. + assert_noop!( + clear_metadata::(signed(creator.clone()), TokenId::MAX), + AssetsError::Unknown + ); + assert_ok!(clear_metadata::(signed(creator), token)); + assert!(Assets::name(token).is_empty()); + assert!(Assets::symbol(token).is_empty()); + assert!(Assets::decimals(token).is_zero()); + }); +} From 692566ab78378a03b990021d5448add702d1c52d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:52:08 +0100 Subject: [PATCH 134/284] test(api): add mint test --- pallets/api-vnext/src/fungibles/tests.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index b25d30272..7f3487ac8 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -395,3 +395,26 @@ fn clear_metadata_works() { assert!(Assets::decimals(token).is_zero()); }); } + +#[test] +fn mint_works() { + let token = 1; + let value: Balance = 100 * UNIT; + let from = ALICE; + let to = BOB; + ExtBuilder::new() + .with_balances(vec![(from.clone(), ED::get()), (to.clone(), ED::get())]) + .with_assets(vec![(token, from.clone(), false, 1)]) + .build() + .execute_with(|| { + // Check error works for `Assets::mint()`. + assert_noop!( + mint::(signed(from.clone()), TokenId::MAX, to.clone(), value), + TokenError::UnknownAsset + ); + let balance_before_mint = Assets::balance(token, &to); + assert_ok!(mint::(signed(from), token, to.clone(), value)); + let balance_after_mint = Assets::balance(token, &to); + assert_eq!(balance_after_mint, balance_before_mint + value); + }); +} From fddd58fdc593db9dfe18db54fe8ff749f39b269d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 12:58:49 +0100 Subject: [PATCH 135/284] test(api): add burn test --- pallets/api-vnext/src/fungibles/tests.rs | 41 +++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 7f3487ac8..e84299828 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -399,7 +399,7 @@ fn clear_metadata_works() { #[test] fn mint_works() { let token = 1; - let value: Balance = 100 * UNIT; + let value = 100 * UNIT; let from = ALICE; let to = BOB; ExtBuilder::new() @@ -418,3 +418,42 @@ fn mint_works() { assert_eq!(balance_after_mint, balance_before_mint + value); }); } + +#[test] +fn burn_works() { + let token = 1; + let value = 100 * UNIT; + let owner = ALICE; + let from = BOB; + let total_supply = value * 2; + ExtBuilder::new() + .with_balances(vec![(from.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_balances(vec![(token, from.clone(), total_supply)]) + .build() + .execute_with(|| { + // "BalanceLow" error is returned if token is not created. + assert_noop!( + burn::(signed(owner.clone()), TokenId::MAX, from.clone(), value), + AssetsError::BalanceLow.with_weight(WeightInfo::balance_of()) + ); + assert_eq!(Assets::total_supply(token), total_supply); + // Check error works for `Assets::burn()`. + assert_ok!(Assets::freeze_asset(signed(owner.clone()), token.into())); + assert_noop!( + burn::(signed(owner.clone()), token, from.clone(), value), + AssetsError::AssetNotLive + ); + assert_ok!(Assets::thaw_asset(signed(owner.clone()), token.into())); + // "BalanceLow" error is returned if the balance is less than amount to burn. + assert_noop!( + burn::(signed(owner.clone()), token, from.clone(), total_supply * 2), + AssetsError::BalanceLow.with_weight(WeightInfo::balance_of()) + ); + let balance_before_burn = Assets::balance(token, &from); + assert_ok!(burn::(signed(owner), token, from.clone(), value)); + assert_eq!(Assets::total_supply(token), total_supply - value); + let balance_after_burn = Assets::balance(token, &from); + assert_eq!(balance_after_burn, balance_before_burn - value); + }); +} From 8f06875174b90cd84dd7f48071c9fb06b9fbbb03 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:04:13 +0100 Subject: [PATCH 136/284] test(api): add exists test --- pallets/api-vnext/src/fungibles/tests.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index e84299828..258e7b961 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -457,3 +457,16 @@ fn burn_works() { assert_eq!(balance_after_burn, balance_before_burn - value); }); } + +#[test] +fn exists_works() { + let token = 1; + let owner = ALICE; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + assert_eq!(exists::(TokenId::MAX), false); + assert_eq!(exists::(token), true); + }); +} From cfba7667aeabfccf02b94e6bdceae1a316d16205 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:21:14 +0100 Subject: [PATCH 137/284] refactor(api): share total_supply implementation --- pallets/api-vnext/src/fungibles/mod.rs | 4 ++++ .../api-vnext/src/fungibles/precompiles/erc20.rs | 2 +- pallets/api-vnext/src/fungibles/precompiles/mod.rs | 3 +-- pallets/api-vnext/src/fungibles/tests.rs | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index c43a6dd67..c272ba954 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -208,6 +208,10 @@ fn start_destroy, I>( >::start_destroy(origin, asset.into()) } +fn total_supply, I>(asset: AssetIdOf) -> T::Balance { + >::total_supply(asset) +} + fn transfer, I>( origin: OriginFor, asset: AssetIdOf, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 656b77745..ad047f284 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -51,7 +51,7 @@ where totalSupply(_) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = U256::saturating_from(>::total_supply(token)); + let total_supply = U256::saturating_from(super::total_supply::(token)); Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 39f133a51..e5c34110e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -247,8 +247,7 @@ where IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = - U256::saturating_from(>::total_supply((*token).into())); + let total_supply = U256::saturating_from(total_supply::((*token).into())); Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 258e7b961..f4607a5ef 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -458,6 +458,20 @@ fn burn_works() { }); } +#[test] +fn total_supply_works() { + let token = 1; + let total_supply = 100 * UNIT; + ExtBuilder::new() + .with_assets(vec![(token, ALICE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, total_supply)]) + .build() + .execute_with(|| { + assert_eq!(super::total_supply::(TokenId::MAX), 0); + assert_eq!(super::total_supply::(token), total_supply); + }); +} + #[test] fn exists_works() { let token = 1; From f7ee10617ed1811ca880bc852bac93dfafb09fc0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:27:47 +0100 Subject: [PATCH 138/284] refactor(api): share balance implementation --- pallets/api-vnext/src/fungibles/mod.rs | 7 +++++++ .../api-vnext/src/fungibles/precompiles/erc20.rs | 2 +- .../api-vnext/src/fungibles/precompiles/mod.rs | 3 +-- pallets/api-vnext/src/fungibles/tests.rs | 15 +++++++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index c272ba954..dd4239eff 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -94,6 +94,13 @@ fn approve + pallet_assets::Config, I>( Ok(Some(weight).into()) } +fn balance, I>( + asset: AssetIdOf, + account: &T::AccountId, +) -> T::Balance { + >::balance(asset, account) +} + fn burn + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index ad047f284..a8a66c394 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -59,7 +59,7 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*account.0).into()); - let balance = U256::saturating_from(>::balance(token, account)); + let balance = U256::saturating_from(super::balance::(token, &account)); Ok(balanceOfCall::abi_encode_returns(&balance)) }, diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index e5c34110e..b832126a5 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -255,8 +255,7 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*owner.0).into()); - let balance = - U256::saturating_from(>::balance((*token).into(), account)); + let balance = U256::saturating_from(balance::((*token).into(), &account)); Ok(balanceOfCall::abi_encode_returns(&balance)) }, diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index f4607a5ef..765a09999 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -472,6 +472,21 @@ fn total_supply_works() { }); } +#[test] +fn balance_of_works() { + let token = 1; + let owner = ALICE; + let value = 100 * UNIT; + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .with_asset_balances(vec![(token, owner.clone(), value)]) + .build() + .execute_with(|| { + assert_eq!(balance::(TokenId::MAX, &owner), 0); + assert_eq!(balance::(token, &owner), value); + }); +} + #[test] fn exists_works() { let token = 1; From 3f73be665f4cc25134edd8267eeb4084a45c87fd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:36:04 +0100 Subject: [PATCH 139/284] refactor(api): share allowance implementation --- pallets/api-vnext/src/fungibles/mod.rs | 8 ++++++++ .../src/fungibles/precompiles/erc20.rs | 2 +- .../src/fungibles/precompiles/mod.rs | 19 ++++++++++--------- pallets/api-vnext/src/fungibles/tests.rs | 17 +++++++++++++++++ 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index dd4239eff..fd6497f38 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -94,6 +94,14 @@ fn approve + pallet_assets::Config, I>( Ok(Some(weight).into()) } +fn allowance, I>( + asset: AssetIdOf, + owner: &T::AccountId, + spender: &T::AccountId, +) -> T::Balance { + >::allowance(asset, owner, spender) +} + fn balance, I>( asset: AssetIdOf, account: &T::AccountId, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index a8a66c394..59e3b2350 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -83,7 +83,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let remaining = - U256::saturating_from(>::allowance(token, &owner, &spender)); + U256::saturating_from(super::allowance::(token, &owner, &spender)); Ok(allowanceCall::abi_encode_returns(&remaining)) }, diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index b832126a5..8564e50e5 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -52,7 +52,7 @@ where env.charge(>::WeightInfo::transfer())?; let from = >::to_address(env.caller().account_id()?).0.into(); - self::transfer::( + transfer::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*to.0).into()), @@ -82,7 +82,7 @@ where let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let result = self::approve::( + let result = approve::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), @@ -106,7 +106,7 @@ where let owner = >::to_address(env.caller().account_id()?).0.into(); let value = U256::saturating_from( - self::increase_allowance::( + increase_allowance::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), @@ -132,7 +132,7 @@ where let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let value = match self::decrease_allowance::( + let value = match decrease_allowance::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), @@ -168,7 +168,7 @@ where env.charge(>::WeightInfo::create())?; let creator = >::to_address(env.caller().account_id()?).0.into(); - let id = self::create::( + let id = create::( to_runtime_origin(env.caller()), env.to_account_id(&(*admin.0).into()), minBalance.saturating_to(), @@ -202,12 +202,13 @@ where env.charge(>::WeightInfo::clear_metadata())?; clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; + Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, IFungiblesCalls::mint(mintCall { token, account, value }) => { env.charge(>::WeightInfo::mint())?; - self::mint::( + mint::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*account.0).into()), @@ -222,7 +223,7 @@ where IFungiblesCalls::burn(burnCall { token, account, value }) => { let charged = env.charge(>::WeightInfo::burn())?; - self::burn::( + burn::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*account.0).into()), @@ -264,7 +265,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); - let allowance = >::allowance((*token).into(), &owner, &spender); + let allowance = allowance::((*token).into(), &owner, &spender); let remaining = U256::saturating_from(allowance); Ok(allowanceCall::abi_encode_returns(&remaining)) @@ -295,7 +296,7 @@ where IFungiblesCalls::exists(existsCall { token }) => { env.charge(>::WeightInfo::exists())?; - let result = self::exists::((*token).into()); + let result = exists::((*token).into()); Ok(existsCall::abi_encode_returns(&result)) }, diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 765a09999..2d6fb158b 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -487,6 +487,23 @@ fn balance_of_works() { }); } +#[test] +fn allowance_works() { + let token = 1; + let value: Balance = 100 * UNIT; + let owner = ALICE; + let spender = BOB; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT), (spender.clone(), ED::get())]) + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + assert_eq!(allowance::(token, &owner, &spender), 0); + assert_ok!(Assets::approve(token, &owner, &spender, value)); + assert_eq!(allowance::(token, &owner, &spender), value); + }); +} + #[test] fn exists_works() { let token = 1; From 03daed6eb8a09fa9bd2ad9fa2c6a7cb97dcf0d15 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:47:35 +0100 Subject: [PATCH 140/284] refactor(api): share metadata implementation --- pallets/api-vnext/src/fungibles/mod.rs | 14 ++++++++++- .../src/fungibles/precompiles/erc20.rs | 16 ++++++------- .../src/fungibles/precompiles/mod.rs | 7 +++--- pallets/api-vnext/src/fungibles/tests.rs | 23 +++++++++++++++++++ 4 files changed, 46 insertions(+), 14 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles/mod.rs index fd6497f38..8a54ce770 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles/mod.rs @@ -10,7 +10,7 @@ use frame_support::{ }, pallet_prelude::{CheckedSub, DispatchError, Zero}, sp_runtime::Saturating, - traits::fungibles::{approvals::Inspect as _, Inspect as _}, + traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _, Inspect as _}, weights::Weight, }; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; @@ -141,6 +141,10 @@ fn create, I>( Ok(id) } +fn decimals, I>(asset: AssetIdOf) -> u8 { + >::decimals(asset) +} + fn decrease_allowance + pallet_assets::Config, I>( origin: OriginFor, asset: AssetIdOf, @@ -206,6 +210,10 @@ fn mint, I>( >::mint(origin, asset.into(), T::Lookup::unlookup(account), value) } +fn name, I>(asset: AssetIdOf) -> Vec { + >::name(asset) +} + fn set_metadata, I>( origin: OriginFor, asset: AssetIdOf, @@ -223,6 +231,10 @@ fn start_destroy, I>( >::start_destroy(origin, asset.into()) } +fn symbol, I>(asset: AssetIdOf) -> Vec { + >::symbol(asset) +} + fn total_supply, I>(asset: AssetIdOf) -> T::Balance { >::total_supply(asset) } diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 59e3b2350..9afe3ab03 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,9 +1,6 @@ use alloc::{string::String, vec::Vec}; -use frame_support::{ - sp_runtime::traits::AtLeast32Bit, - traits::fungibles::{approvals::Inspect as _, metadata::Inspect as _}, -}; +use frame_support::sp_runtime::traits::AtLeast32Bit; use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; use AddressMatcher::Prefix; @@ -11,8 +8,8 @@ use IERC20::*; use super::{ deposit_event, prefixed_address, sol, to_runtime_origin, weights::WeightInfo, AddressMapper, - AddressMatcher, Assets, Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, - UintTryFrom, UintTryTo, U256, + AddressMatcher, Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, UintTryFrom, + UintTryTo, U256, }; sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); @@ -128,7 +125,7 @@ where name(_) => { env.charge(>::WeightInfo::metadata_name())?; - let result = >::name(token); + let result = super::name::(token); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) @@ -136,7 +133,7 @@ where symbol(_) => { env.charge(>::WeightInfo::metadata_symbol())?; - let result = >::symbol(token); + let result = super::symbol::(token); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(symbolCall::abi_encode_returns(&result)) @@ -144,7 +141,7 @@ where decimals(_) => { env.charge(>::WeightInfo::metadata_decimals())?; - let result = >::decimals(token); + let result = super::decimals::(token); Ok(decimalsCall::abi_encode_returns(&result)) }, @@ -164,6 +161,7 @@ mod tests { use frame_support::{ assert_ok, sp_runtime::{app_crypto::sp_core::bytes::to_hex, DispatchError}, + traits::fungibles::approvals::Inspect, }; use pallet_revive::{ precompiles::alloy::sol_types::{SolInterface, SolType, SolValue}, diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 8564e50e5..1a33e933e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -1,7 +1,6 @@ use alloc::string::String; pub use erc20::{Erc20, IERC20}; -use frame_support::traits::fungibles::metadata::Inspect as _; pub(super) use pallet_revive::precompiles::alloy::{ primitives::{ ruint::{UintTryFrom, UintTryTo}, @@ -273,7 +272,7 @@ where IFungiblesCalls::name(nameCall { token }) => { env.charge(>::WeightInfo::metadata_name())?; - let result = >::name((*token).into()); + let result = name::((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) @@ -281,7 +280,7 @@ where IFungiblesCalls::symbol(symbolCall { token }) => { env.charge(>::WeightInfo::metadata_symbol())?; - let result = >::symbol((*token).into()); + let result = symbol::((*token).into()); let result = String::from_utf8_lossy(result.as_slice()).into(); Ok(nameCall::abi_encode_returns(&result)) @@ -289,7 +288,7 @@ where IFungiblesCalls::decimals(decimalsCall { token }) => { env.charge(>::WeightInfo::metadata_decimals())?; - let result = >::decimals((*token).into()); + let result = decimals::((*token).into()); Ok(decimalsCall::abi_encode_returns(&result)) }, diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 2d6fb158b..5c74498e4 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -504,6 +504,29 @@ fn allowance_works() { }); } +#[test] +fn metadata_works() { + let token = 1; + let creator = ALICE; + let name = b"name".to_vec(); + let symbol = b"symbol".to_vec(); + let decimals = 42; + ExtBuilder::new() + .with_balances(vec![(creator.clone(), UNIT)]) + .with_assets(vec![(token, creator.clone(), false, 1)]) + .with_asset_metadata(vec![(token, name.clone(), symbol.clone(), decimals)]) + .build() + .execute_with(|| { + assert!(super::name::(TokenId::MAX).is_empty()); + assert!(super::symbol::(TokenId::MAX).is_empty()); + assert_eq!(super::decimals::(TokenId::MAX), 0); + + assert_eq!(super::name::(token), name); + assert_eq!(super::symbol::(token), symbol); + assert_eq!(super::decimals::(token), decimals); + }); +} + #[test] fn exists_works() { let token = 1; From 059d19010ac387698faef2d02504de903726245f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 13:56:47 +0100 Subject: [PATCH 141/284] test(api): explicitly endow when more than ed required --- .../src/fungibles/precompiles/erc20.rs | 5 +- .../src/fungibles/precompiles/mod.rs | 83 ++++++++++--------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 9afe3ab03..42e734154 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -174,7 +174,7 @@ mod tests { use crate::{ assert_last_event, bare_call, fungibles::approve, - mock::{Assets, ExtBuilder, RuntimeOrigin, Test, ERC20}, + mock::{Assets, ExtBuilder, RuntimeOrigin, Test, ERC20, UNIT}, to_address, DepositLimit, Weight, }; @@ -260,6 +260,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { @@ -292,6 +293,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { @@ -324,6 +326,7 @@ mod tests { let to = CHARLIE; let value = endowment / 2; ExtBuilder::new() + .with_balances(vec![(from.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, true, 1)]) .with_asset_balances(vec![(token, from.clone(), endowment)]) .build() diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/mod.rs index 1a33e933e..f2e0f082c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/mod.rs @@ -377,6 +377,7 @@ mod tests { let to = CHARLIE; let value = endowment / 2; ExtBuilder::new() + .with_balances(vec![(from.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, true, 1)]) .with_asset_balances(vec![(token, from.clone(), endowment)]) .build() @@ -416,6 +417,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { @@ -445,6 +447,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { @@ -483,6 +486,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { @@ -520,45 +524,48 @@ mod tests { let origin = ALICE; let admin = BOB; let min_balance = 1; - ExtBuilder::new().build().execute_with(|| { - assert!(!Assets::asset_exists(token)); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) + .build() + .execute_with(|| { + assert!(!Assets::asset_exists(token)); - assert_eq!( - call_precompile::( - &origin, - &IFungiblesCalls::create(createCall { - admin: to_address(&admin).0.into(), - minBalance: U256::from(min_balance), - }), - ) - .unwrap(), - token - ); - - assert!(Assets::asset_exists(token)); - assert_eq!( - Asset::get(token).unwrap(), - AssetDetails { - owner: origin.clone(), - issuer: admin.clone(), - admin: admin.clone(), - freezer: admin.clone(), - supply: 0, - deposit: min_balance, - min_balance, - is_sufficient: false, - accounts: 0, - sufficients: 0, - approvals: 0, - status: AssetStatus::Live, - } - ); + assert_eq!( + call_precompile::( + &origin, + &IFungiblesCalls::create(createCall { + admin: to_address(&admin).0.into(), + minBalance: U256::from(min_balance), + }), + ) + .unwrap(), + token + ); - let creator = to_address(&origin).0.into(); - let admin = to_address(&admin).0.into(); - let event = Created { id: token, creator, admin }; - assert_last_event(ADDRESS, event); - }); + assert!(Assets::asset_exists(token)); + assert_eq!( + Asset::get(token).unwrap(), + AssetDetails { + owner: origin.clone(), + issuer: admin.clone(), + admin: admin.clone(), + freezer: admin.clone(), + supply: 0, + deposit: min_balance, + min_balance, + is_sufficient: false, + accounts: 0, + sufficients: 0, + approvals: 0, + status: AssetStatus::Live, + } + ); + + let creator = to_address(&origin).0.into(); + let admin = to_address(&admin).0.into(); + let event = Created { id: token, creator, admin }; + assert_last_event(ADDRESS, event); + }); } #[test] @@ -588,6 +595,7 @@ mod tests { let symbol = "symbol".to_string(); let decimals = u8::MAX; ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) .with_assets(vec![(token, origin.clone(), false, 1)]) .build() .execute_with(|| { @@ -758,6 +766,7 @@ mod tests { let spender = BOB; let value = 10_000_000; ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT)]) .with_assets(vec![(token, CHARLIE, false, 1)]) .build() .execute_with(|| { From 89ea8ac8d051aabe867bdaf5e86411b460dd2b97 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 16:54:11 +0100 Subject: [PATCH 142/284] refactor(api): reorganize for versioning --- .../src/{fungibles/mod.rs => fungibles.rs} | 1 - .../api-vnext/src/fungibles/benchmarking.rs | 7 +- .../api-vnext/src/fungibles/precompiles.rs | 19 + .../src/fungibles/precompiles/erc20.rs | 438 +---------------- .../src/fungibles/precompiles/erc20/v0.rs | 432 +++++++++++++++++ .../interfaces/{ => v0}/IERC20.sol | 0 .../interfaces/{ => v0}/IFungibles.sol | 0 .../fungibles/precompiles/{mod.rs => v0.rs} | 27 +- pallets/api-vnext/src/lib.rs | 2 - pallets/api-vnext/src/mock.rs | 5 +- pop-api-vnext/examples/fungibles/lib.rs | 2 +- .../contracts/fungibles/lib.rs | 2 +- pop-api-vnext/integration-tests/src/lib.rs | 14 +- pop-api-vnext/src/fungibles.rs | 17 + pop-api-vnext/src/fungibles/erc20.rs | 446 +----------------- pop-api-vnext/src/fungibles/erc20/v0.rs | 180 +++++++ .../src/fungibles/erc20/v0/errors.rs | 236 +++++++++ .../src/fungibles/erc20/v0/events.rs | 32 ++ pop-api-vnext/src/fungibles/{mod.rs => v0.rs} | 31 +- .../src/fungibles/{ => v0}/errors.rs | 0 .../src/fungibles/{ => v0}/events.rs | 2 +- pop-api-vnext/src/lib.rs | 13 +- pop-api-vnext/src/sol.rs | 14 + runtime/devnet/src/config/contracts.rs | 20 +- 24 files changed, 987 insertions(+), 953 deletions(-) rename pallets/api-vnext/src/{fungibles/mod.rs => fungibles.rs} (99%) create mode 100644 pallets/api-vnext/src/fungibles/precompiles.rs create mode 100644 pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs rename pallets/api-vnext/src/fungibles/precompiles/interfaces/{ => v0}/IERC20.sol (100%) rename pallets/api-vnext/src/fungibles/precompiles/interfaces/{ => v0}/IFungibles.sol (100%) rename pallets/api-vnext/src/fungibles/precompiles/{mod.rs => v0.rs} (97%) create mode 100644 pop-api-vnext/src/fungibles.rs create mode 100644 pop-api-vnext/src/fungibles/erc20/v0.rs create mode 100644 pop-api-vnext/src/fungibles/erc20/v0/errors.rs create mode 100644 pop-api-vnext/src/fungibles/erc20/v0/events.rs rename pop-api-vnext/src/fungibles/{mod.rs => v0.rs} (96%) rename pop-api-vnext/src/fungibles/{ => v0}/errors.rs (100%) rename pop-api-vnext/src/fungibles/{ => v0}/events.rs (97%) create mode 100644 pop-api-vnext/src/sol.rs diff --git a/pallets/api-vnext/src/fungibles/mod.rs b/pallets/api-vnext/src/fungibles.rs similarity index 99% rename from pallets/api-vnext/src/fungibles/mod.rs rename to pallets/api-vnext/src/fungibles.rs index 8a54ce770..0947bc972 100644 --- a/pallets/api-vnext/src/fungibles/mod.rs +++ b/pallets/api-vnext/src/fungibles.rs @@ -16,7 +16,6 @@ use frame_support::{ use frame_system::{ensure_signed, pallet_prelude::OriginFor}; pub use pallet::*; use pallet_assets::NextAssetId; -pub use precompiles::{Erc20, Fungibles}; use weights::WeightInfo; use AddressMatcher::Fixed; diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index a3425e6d7..73bbcddeb 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -30,7 +30,10 @@ use pallet_revive::{ }; use super::{ - precompiles::{IFungibles, IFungiblesCalls, UintTryFrom, UintTryTo}, + precompiles::{ + v0::{IFungibles, IFungiblesCalls}, + UintTryFrom, UintTryTo, + }, Config, NextAssetId, Pallet, }; #[cfg(test)] @@ -45,7 +48,7 @@ type Assets = pallet_assets::Pallet; type AssetsBalance = >::Balance; type AssetsStringLimit = >::StringLimit; type Balances = ::Currency; -type Fungibles = super::Fungibles; +type Fungibles = super::precompiles::v0::Fungibles; type TokenId = >::AssetId; #[instance_benchmarks( diff --git a/pallets/api-vnext/src/fungibles/precompiles.rs b/pallets/api-vnext/src/fungibles/precompiles.rs new file mode 100644 index 000000000..2ce954f78 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles.rs @@ -0,0 +1,19 @@ +use alloc::string::String; + +pub(super) use pallet_revive::precompiles::alloy::{ + primitives::{ + ruint::{UintTryFrom, UintTryTo}, + Address, U256, + }, + sol_types::SolCall, +}; +use pallet_revive::precompiles::RuntimeCosts; +use weights::WeightInfo; + +use super::*; + +/// APIs for fungible tokens conforming to the ERC20 standard. +pub mod erc20; + +/// The first version of the Fungibles API. +pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 42e734154..43e23df9a 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,436 +1,4 @@ -use alloc::{string::String, vec::Vec}; +use super::{SolCall, UintTryFrom, UintTryTo, U256}; -use frame_support::sp_runtime::traits::AtLeast32Bit; -use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; -use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; -use AddressMatcher::Prefix; -use IERC20::*; - -use super::{ - deposit_event, prefixed_address, sol, to_runtime_origin, weights::WeightInfo, AddressMapper, - AddressMatcher, Config, Error, Ext, NonZero, PhantomData, Precompile, SolCall, UintTryFrom, - UintTryTo, U256, -}; - -sol!("src/fungibles/precompiles/interfaces/IERC20.sol"); - -/// Precompile providing an interface of the ERC-20 standard as defined in the ERC. -pub struct Erc20(PhantomData<(T, I)>); -impl< - const PREFIX: u16, - T: frame_system::Config - + pallet_assets::Config - + pallet_revive::Config - + Config, - I: 'static, - > Precompile for Erc20 -where - U256: UintTryFrom + UintTryTo, -{ - type Interface = IERC20Calls; - type T = T; - - const HAS_CONTRACT_INFO: bool = false; - const MATCHER: AddressMatcher = - Prefix(NonZero::new(PREFIX).expect("expected non-zero precompile address")); - - fn call( - address: &[u8; 20], - input: &Self::Interface, - env: &mut impl Ext, - ) -> Result, Error> { - use IERC20::{IERC20Calls::*, *}; - - let token = InlineAssetIdExtractor::asset_id_from_address(address)?.into(); - - match input { - // IERC20 - totalSupply(_) => { - env.charge(>::WeightInfo::total_supply())?; - - let total_supply = U256::saturating_from(super::total_supply::(token)); - - Ok(totalSupplyCall::abi_encode_returns(&total_supply)) - }, - balanceOf(balanceOfCall { account }) => { - env.charge(>::WeightInfo::balance_of())?; - - let account = env.to_account_id(&(*account.0).into()); - let balance = U256::saturating_from(super::balance::(token, &account)); - - Ok(balanceOfCall::abi_encode_returns(&balance)) - }, - transfer(transferCall { to, value }) => { - env.charge(>::WeightInfo::transfer())?; - let from = >::to_address(env.caller().account_id()?).0.into(); - - super::transfer::( - to_runtime_origin(env.caller()), - token, - env.to_account_id(&(*to.0).into()), - value.saturating_to(), - )?; - - deposit_event::(env, address, Transfer { from, to: *to, value: *value }); - Ok(transferCall::abi_encode_returns(&true)) - }, - allowance(allowanceCall { owner, spender }) => { - env.charge(>::WeightInfo::allowance())?; - - let owner = env.to_account_id(&(*owner.0).into()); - let spender = env.to_account_id(&(*spender.0).into()); - let remaining = - U256::saturating_from(super::allowance::(token, &owner, &spender)); - - Ok(allowanceCall::abi_encode_returns(&remaining)) - }, - approve(approveCall { spender, value }) => { - let charged = env.charge(>::WeightInfo::approve(1, 1))?; - let owner = >::to_address(env.caller().account_id()?).0.into(); - - let result = super::approve::( - to_runtime_origin(env.caller()), - token, - env.to_account_id(&(*spender.0).into()), - value.saturating_to(), - ) // TODO: adjust weight - .map_err(|e| e.error)?; - - // Adjust weight - if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - - let event = Approval { owner, spender: *spender, value: *value }; - deposit_event(env, address, event); - Ok(approveCall::abi_encode_returns(&true)) - }, - transferFrom(transferFromCall { from, to, value }) => { - env.charge(>::WeightInfo::transfer_from())?; - - super::transfer_from::( - to_runtime_origin(env.caller()), - token, - env.to_account_id(&(*from.0).into()), - env.to_account_id(&(*to.0).into()), - value.saturating_to(), - )?; - - deposit_event(env, address, Transfer { from: *from, to: *to, value: *value }); - Ok(transferFromCall::abi_encode_returns(&true)) - }, - // IERC20Metadata - name(_) => { - env.charge(>::WeightInfo::metadata_name())?; - - let result = super::name::(token); - let result = String::from_utf8_lossy(result.as_slice()).into(); - - Ok(nameCall::abi_encode_returns(&result)) - }, - symbol(_) => { - env.charge(>::WeightInfo::metadata_symbol())?; - - let result = super::symbol::(token); - let result = String::from_utf8_lossy(result.as_slice()).into(); - - Ok(symbolCall::abi_encode_returns(&result)) - }, - decimals(_) => { - env.charge(>::WeightInfo::metadata_decimals())?; - - let result = super::decimals::(token); - - Ok(decimalsCall::abi_encode_returns(&result)) - }, - } - } -} - -impl, I: 'static> Erc20 { - /// The address of the precompile. - pub fn address(id: u32) -> [u8; 20] { - prefixed_address(PREFIX, id) - } -} - -#[cfg(test)] -mod tests { - use frame_support::{ - assert_ok, - sp_runtime::{app_crypto::sp_core::bytes::to_hex, DispatchError}, - traits::fungibles::approvals::Inspect, - }; - use pallet_revive::{ - precompiles::alloy::sol_types::{SolInterface, SolType, SolValue}, - test_utils::{ALICE, BOB, CHARLIE}, - }; - use IERC20Calls::*; - use IERC20::{Approval, Transfer}; - - use super::*; - use crate::{ - assert_last_event, bare_call, - fungibles::approve, - mock::{Assets, ExtBuilder, RuntimeOrigin, Test, ERC20, UNIT}, - to_address, DepositLimit, Weight, - }; - - type AccountId = ::AccountId; - - #[test] - fn total_supply_works() { - let token = 1; - let total_supply = 10_000_000; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .with_asset_balances(vec![(token, ALICE, total_supply)]) - .build() - .execute_with(|| { - assert_eq!( - call_precompile::(&ALICE, token, &totalSupply(totalSupplyCall {})) - .unwrap(), - U256::from(total_supply) - ); - }); - } - - #[test] - fn balance_of_works() { - let token = 1; - let account = ALICE; - let endowment = 10_000_000; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .with_asset_balances(vec![(token, account.clone(), endowment)]) - .build() - .execute_with(|| { - assert_eq!( - call_precompile::( - &BOB, - token, - &balanceOf(balanceOfCall { account: to_address(&account).0.into() }) - ) - .unwrap(), - U256::from(endowment) - ); - }); - } - - #[test] - fn transfer_works() { - let token = 1; - let origin = ALICE; - let endowment = 10_000_000; - let to = BOB; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, true, 1)]) - .with_asset_balances(vec![(token, origin.clone(), endowment)]) - .build() - .execute_with(|| { - assert_eq!(Assets::balance(token, &origin), endowment); - assert_eq!(Assets::balance(token, &to), 0); - - let value = endowment / 2; - assert!(call_precompile::( - &origin, - token, - &IERC20Calls::transfer(IERC20::transferCall { - to: to_address(&to).0.into(), - value: U256::from(value) - }) - ) - .unwrap()); - - assert_eq!(Assets::balance(token, &origin), endowment - value); - assert_eq!(Assets::balance(token, &to), value); - let from = to_address(&origin).0.into(); - let to = to_address(&to).0.into(); - let event = Transfer { from, to, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, token), event); - }); - } - - #[test] - fn allowance_works() { - let token = 1; - let owner = ALICE; - let spender = BOB; - let value = 10_000_000; - ExtBuilder::new() - .with_balances(vec![(owner.clone(), UNIT)]) - .with_assets(vec![(token, CHARLIE, false, 1)]) - .build() - .execute_with(|| { - assert_ok!(approve::( - RuntimeOrigin::signed(owner.clone()), - token, - BOB, - value - )); - - assert_eq!( - call_precompile::( - &BOB, - token, - &allowance(allowanceCall { - owner: to_address(&owner).0.into(), - spender: to_address(&spender).0.into(), - }) - ) - .unwrap(), - U256::from(value) - ); - }); - } - - #[test] - fn approve_works() { - let token = 1; - let origin = ALICE; - let spender = BOB; - let value = 10_000_000; - ExtBuilder::new() - .with_balances(vec![(origin.clone(), UNIT)]) - .with_assets(vec![(token, CHARLIE, false, 1)]) - .build() - .execute_with(|| { - assert_eq!(Assets::allowance(token, &origin, &spender), 0); - - assert!(call_precompile::( - &origin, - token, - &IERC20Calls::approve(IERC20::approveCall { - spender: to_address(&spender).0.into(), - value: U256::from(value) - }) - ) - .unwrap()); - - assert_eq!(Assets::allowance(token, &origin, &spender), value); - let owner = to_address(&origin).0.into(); - let spender = to_address(&spender).0.into(); - let event = Approval { owner, spender, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, token), event); - }); - } - - #[test] - fn transfer_from_works() { - let token = 1; - let origin = BOB; - let from = ALICE; - let endowment = 10_000_000; - let to = CHARLIE; - let value = endowment / 2; - ExtBuilder::new() - .with_balances(vec![(from.clone(), UNIT)]) - .with_assets(vec![(token, CHARLIE, true, 1)]) - .with_asset_balances(vec![(token, from.clone(), endowment)]) - .build() - .execute_with(|| { - assert_eq!(Assets::balance(token, &from), endowment); - assert_eq!(Assets::balance(token, &to), 0); - assert_ok!(approve::( - RuntimeOrigin::signed(from.clone()), - token, - origin.clone(), - value - )); - - assert!(call_precompile::( - &origin, - token, - &transferFrom(IERC20::transferFromCall { - from: to_address(&from).0.into(), - to: to_address(&to).0.into(), - value: U256::from(value), - }) - ) - .unwrap()); - - assert_eq!(Assets::balance(token, &from), endowment - value); - assert_eq!(Assets::balance(token, &to), value); - let from = to_address(&from).0.into(); - let to = to_address(&to).0.into(); - let event = Transfer { from, to, value: U256::from(value) }; - assert_last_event(prefixed_address(ERC20, token), event); - }); - } - - #[test] - fn name_works() { - let token = 1; - let _name = "name"; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .with_asset_metadata(vec![(token, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) - .build() - .execute_with(|| { - assert_eq!( - call_precompile::(&ALICE, token, &name(nameCall {})).unwrap().as_str(), - _name - ); - }); - } - - #[test] - fn symbol_works() { - let token = 1; - let _symbol = "symbol"; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .with_asset_metadata(vec![(token, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) - .build() - .execute_with(|| { - assert_eq!( - call_precompile::(&ALICE, token, &symbol(symbolCall {})) - .unwrap() - .as_str(), - _symbol - ); - }); - } - - #[test] - fn decimals_works() { - let token = 1; - let _decimals = u8::MAX; - ExtBuilder::new() - .with_assets(vec![(token, CHARLIE, false, 1)]) - .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) - .build() - .execute_with(|| { - assert_eq!( - call_precompile::(&ALICE, token, &decimals(decimalsCall {})).unwrap() - as u8, - _decimals - ); - }); - } - - #[test] - fn selectors_match_standard() { - assert_eq!(to_hex(&decimalsCall::SELECTOR, false), "0x313ce567"); - assert_eq!(to_hex(&nameCall::SELECTOR, false), "0x06fdde03"); - assert_eq!(to_hex(&symbolCall::SELECTOR, false), "0x95d89b41"); - } - - fn call_precompile::RustType>>( - origin: &AccountId, - token: u32, - input: &IERC20Calls, - ) -> Result { - let address = prefixed_address(ERC20, token); - bare_call::( - RuntimeOrigin::signed(origin.clone()), - address.into(), - 0, - Weight::MAX, - DepositLimit::Balance(u128::MAX), - input.abi_encode(), - ) - } -} +/// The first version of the Erc20 API. +pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs new file mode 100644 index 000000000..cb3476d02 --- /dev/null +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -0,0 +1,432 @@ +use alloc::{string::String, vec::Vec}; + +use frame_support::sp_runtime::traits::AtLeast32Bit; +use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; +use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; +use AddressMatcher::Prefix; +use IERC20::*; + +use super::{super::super::*, U256, *}; + +sol!("src/fungibles/precompiles/interfaces/v0/IERC20.sol"); + +/// Precompile providing an interface of the ERC-20 standard as defined in the ERC. +pub struct Erc20(PhantomData<(T, I)>); +impl< + const PREFIX: u16, + T: frame_system::Config + + pallet_assets::Config + + pallet_revive::Config + + Config, + I: 'static, + > Precompile for Erc20 +where + U256: UintTryFrom + UintTryTo, +{ + type Interface = IERC20Calls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Prefix(NonZero::new(PREFIX).expect("expected non-zero precompile address")); + + fn call( + address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, Error> { + let token = InlineAssetIdExtractor::asset_id_from_address(address)?.into(); + + match input { + // IERC20 + IERC20Calls::totalSupply(_) => { + env.charge(>::WeightInfo::total_supply())?; + + let total_supply = U256::saturating_from(total_supply::(token)); + + Ok(totalSupplyCall::abi_encode_returns(&total_supply)) + }, + IERC20Calls::balanceOf(balanceOfCall { account }) => { + env.charge(>::WeightInfo::balance_of())?; + + let account = env.to_account_id(&(*account.0).into()); + let balance = U256::saturating_from(balance::(token, &account)); + + Ok(balanceOfCall::abi_encode_returns(&balance)) + }, + IERC20Calls::transfer(transferCall { to, value }) => { + env.charge(>::WeightInfo::transfer())?; + let from = >::to_address(env.caller().account_id()?).0.into(); + + transfer::( + to_runtime_origin(env.caller()), + token, + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + deposit_event::(env, address, Transfer { from, to: *to, value: *value }); + Ok(transferCall::abi_encode_returns(&true)) + }, + IERC20Calls::allowance(allowanceCall { owner, spender }) => { + env.charge(>::WeightInfo::allowance())?; + + let owner = env.to_account_id(&(*owner.0).into()); + let spender = env.to_account_id(&(*spender.0).into()); + let remaining = U256::saturating_from(allowance::(token, &owner, &spender)); + + Ok(allowanceCall::abi_encode_returns(&remaining)) + }, + IERC20Calls::approve(approveCall { spender, value }) => { + let charged = env.charge(>::WeightInfo::approve(1, 1))?; + let owner = >::to_address(env.caller().account_id()?).0.into(); + + let result = approve::( + to_runtime_origin(env.caller()), + token, + env.to_account_id(&(*spender.0).into()), + value.saturating_to(), + ) // TODO: adjust weight + .map_err(|e| e.error)?; + + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 + // lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + + let event = Approval { owner, spender: *spender, value: *value }; + deposit_event(env, address, event); + Ok(approveCall::abi_encode_returns(&true)) + }, + IERC20Calls::transferFrom(transferFromCall { from, to, value }) => { + env.charge(>::WeightInfo::transfer_from())?; + + transfer_from::( + to_runtime_origin(env.caller()), + token, + env.to_account_id(&(*from.0).into()), + env.to_account_id(&(*to.0).into()), + value.saturating_to(), + )?; + + deposit_event(env, address, Transfer { from: *from, to: *to, value: *value }); + Ok(transferFromCall::abi_encode_returns(&true)) + }, + // IERC20Metadata + IERC20Calls::name(_) => { + env.charge(>::WeightInfo::metadata_name())?; + + let result = name::(token); + let result = String::from_utf8_lossy(result.as_slice()).into(); + + Ok(nameCall::abi_encode_returns(&result)) + }, + IERC20Calls::symbol(_) => { + env.charge(>::WeightInfo::metadata_symbol())?; + + let result = symbol::(token); + let result = String::from_utf8_lossy(result.as_slice()).into(); + + Ok(symbolCall::abi_encode_returns(&result)) + }, + IERC20Calls::decimals(_) => { + env.charge(>::WeightInfo::metadata_decimals())?; + + let result = decimals::(token); + + Ok(decimalsCall::abi_encode_returns(&result)) + }, + } + } +} + +impl, I: 'static> Erc20 { + /// The address of the precompile. + pub fn address(id: u32) -> [u8; 20] { + prefixed_address(PREFIX, id) + } +} + +#[cfg(test)] +mod tests { + use frame_support::{ + assert_ok, + sp_runtime::{app_crypto::sp_core::bytes::to_hex, DispatchError}, + traits::fungibles::approvals::Inspect, + }; + use pallet_revive::{ + precompiles::alloy::sol_types::{SolInterface, SolType, SolValue}, + test_utils::{ALICE, BOB, CHARLIE}, + }; + use IERC20Calls::*; + use IERC20::{Approval, Transfer}; + + use super::*; + use crate::{ + assert_last_event, bare_call, + fungibles::approve, + mock::{Assets, ExtBuilder, RuntimeOrigin, Test, ERC20, UNIT}, + to_address, DepositLimit, Weight, + }; + + type AccountId = ::AccountId; + + #[test] + fn total_supply_works() { + let token = 1; + let total_supply = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_balances(vec![(token, ALICE, total_supply)]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::(&ALICE, token, &totalSupply(totalSupplyCall {})) + .unwrap(), + U256::from(total_supply) + ); + }); + } + + #[test] + fn balance_of_works() { + let token = 1; + let account = ALICE; + let endowment = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_balances(vec![(token, account.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::( + &BOB, + token, + &balanceOf(balanceOfCall { account: to_address(&account).0.into() }) + ) + .unwrap(), + U256::from(endowment) + ); + }); + } + + #[test] + fn transfer_works() { + let token = 1; + let origin = ALICE; + let endowment = 10_000_000; + let to = BOB; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &origin), endowment); + assert_eq!(Assets::balance(token, &to), 0); + + let value = endowment / 2; + assert!(call_precompile::( + &origin, + token, + &IERC20Calls::transfer(IERC20::transferCall { + to: to_address(&to).0.into(), + value: U256::from(value) + }) + ) + .unwrap()); + + assert_eq!(Assets::balance(token, &origin), endowment - value); + assert_eq!(Assets::balance(token, &to), value); + let from = to_address(&origin).0.into(); + let to = to_address(&to).0.into(); + let event = Transfer { from, to, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, token), event); + }); + } + + #[test] + fn allowance_works() { + let token = 1; + let owner = ALICE; + let spender = BOB; + let value = 10_000_000; + ExtBuilder::new() + .with_balances(vec![(owner.clone(), UNIT)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { + assert_ok!(approve::( + RuntimeOrigin::signed(owner.clone()), + token, + BOB, + value + )); + + assert_eq!( + call_precompile::( + &BOB, + token, + &IERC20Calls::allowance(allowanceCall { + owner: to_address(&owner).0.into(), + spender: to_address(&spender).0.into(), + }) + ) + .unwrap(), + U256::from(value) + ); + }); + } + + #[test] + fn approve_works() { + let token = 1; + let origin = ALICE; + let spender = BOB; + let value = 10_000_000; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), UNIT)]) + .with_assets(vec![(token, CHARLIE, false, 1)]) + .build() + .execute_with(|| { + assert_eq!(Assets::allowance(token, &origin, &spender), 0); + + assert!(call_precompile::( + &origin, + token, + &IERC20Calls::approve(IERC20::approveCall { + spender: to_address(&spender).0.into(), + value: U256::from(value) + }) + ) + .unwrap()); + + assert_eq!(Assets::allowance(token, &origin, &spender), value); + let owner = to_address(&origin).0.into(); + let spender = to_address(&spender).0.into(); + let event = Approval { owner, spender, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, token), event); + }); + } + + #[test] + fn transfer_from_works() { + let token = 1; + let origin = BOB; + let from = ALICE; + let endowment = 10_000_000; + let to = CHARLIE; + let value = endowment / 2; + ExtBuilder::new() + .with_balances(vec![(from.clone(), UNIT)]) + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, from.clone(), endowment)]) + .build() + .execute_with(|| { + assert_eq!(Assets::balance(token, &from), endowment); + assert_eq!(Assets::balance(token, &to), 0); + assert_ok!(approve::( + RuntimeOrigin::signed(from.clone()), + token, + origin.clone(), + value + )); + + assert!(call_precompile::( + &origin, + token, + &transferFrom(IERC20::transferFromCall { + from: to_address(&from).0.into(), + to: to_address(&to).0.into(), + value: U256::from(value), + }) + ) + .unwrap()); + + assert_eq!(Assets::balance(token, &from), endowment - value); + assert_eq!(Assets::balance(token, &to), value); + let from = to_address(&from).0.into(); + let to = to_address(&to).0.into(); + let event = Transfer { from, to, value: U256::from(value) }; + assert_last_event(prefixed_address(ERC20, token), event); + }); + } + + #[test] + fn name_works() { + let token = 1; + let _name = "name"; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_metadata(vec![(token, _name.as_bytes().to_vec(), b"symbol".to_vec(), 10)]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::(&ALICE, token, &IERC20Calls::name(nameCall {})) + .unwrap() + .as_str(), + _name + ); + }); + } + + #[test] + fn symbol_works() { + let token = 1; + let _symbol = "symbol"; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), _symbol.as_bytes().to_vec(), 10)]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::(&ALICE, token, &IERC20Calls::symbol(symbolCall {})) + .unwrap() + .as_str(), + _symbol + ); + }); + } + + #[test] + fn decimals_works() { + let token = 1; + let _decimals = u8::MAX; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, false, 1)]) + .with_asset_metadata(vec![(token, b"name".to_vec(), b"symbol".to_vec(), _decimals)]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::(&ALICE, token, &IERC20Calls::decimals(decimalsCall {})) + .unwrap() as u8, + _decimals + ); + }); + } + + #[test] + fn selectors_match_standard() { + assert_eq!(to_hex(&decimalsCall::SELECTOR, false), "0x313ce567"); + assert_eq!(to_hex(&nameCall::SELECTOR, false), "0x06fdde03"); + assert_eq!(to_hex(&symbolCall::SELECTOR, false), "0x95d89b41"); + } + + fn call_precompile::RustType>>( + origin: &AccountId, + token: u32, + input: &IERC20Calls, + ) -> Result { + let address = prefixed_address(ERC20, token); + bare_call::( + RuntimeOrigin::signed(origin.clone()), + address.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) + } +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol similarity index 100% rename from pallets/api-vnext/src/fungibles/precompiles/interfaces/IERC20.sol rename to pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol similarity index 100% rename from pallets/api-vnext/src/fungibles/precompiles/interfaces/IFungibles.sol rename to pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol diff --git a/pallets/api-vnext/src/fungibles/precompiles/mod.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs similarity index 97% rename from pallets/api-vnext/src/fungibles/precompiles/mod.rs rename to pallets/api-vnext/src/fungibles/precompiles/v0.rs index f2e0f082c..9768400af 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/mod.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -1,26 +1,12 @@ -use alloc::string::String; - -pub use erc20::{Erc20, IERC20}; -pub(super) use pallet_revive::precompiles::alloy::{ - primitives::{ - ruint::{UintTryFrom, UintTryTo}, - Address, U256, - }, - sol_types::SolCall, -}; -use pallet_revive::precompiles::RuntimeCosts; -use weights::WeightInfo; -pub(super) use IFungibles::*; +pub(crate) use IFungibles::*; use super::*; -mod erc20; +sol!("src/fungibles/precompiles/interfaces/v0/IFungibles.sol"); -sol!("src/fungibles/precompiles/interfaces/IFungibles.sol"); - -/// The fungibles precompile offers a streamlined interface for interacting with fungible tokens. -/// The goal is to provide a simplified, consistent API that adheres to standards in the smart -/// contract space. +/// The fungibles precompile offers a streamlined interface for interacting with fungible +/// tokens. The goal is to provide a simplified, consistent API that adheres to standards in +/// the smart contract space. pub struct Fungibles(PhantomData<(T, I)>); impl< const FIXED: u16, @@ -91,7 +77,8 @@ where // Adjust weight if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 lands + // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 + // lands env.gas_meter_mut() .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 67dfc7b4b..6cd84ed2e 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -6,8 +6,6 @@ use alloc::vec::Vec; use core::{convert::Into, marker::PhantomData, num::NonZero}; use frame_support::{dispatch::RawOrigin, sp_runtime::traits::StaticLookup}; -#[cfg(feature = "fungibles")] -pub use fungibles::precompiles::{Erc20, Fungibles}; #[cfg(any(test, feature = "runtime-benchmarks"))] use pallet_revive::precompiles::alloy::sol_types::{SolType, SolValue}; use pallet_revive::{ diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 81c22ba84..1c8b74ef0 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -73,7 +73,10 @@ impl pallet_revive::Config for Test { type AddressMapper = pallet_revive::AccountId32Mapper; type Currency = Balances; type InstantiateOrigin = EnsureSigned; - type Precompiles = (fungibles::Fungibles, fungibles::Erc20); + type Precompiles = ( + fungibles::precompiles::v0::Fungibles, + fungibles::precompiles::erc20::v0::Erc20, + ); type Time = Timestamp; type UploadOrigin = EnsureSigned; } diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 409503526..6e9a49fd9 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -5,7 +5,7 @@ use pop_api::{ fungibles::{ self as api, erc20::{extensions::Erc20Metadata, Erc20}, - Approval, InvalidRecipient, NoPermission, TokenId, Transfer, + *, }, revert, }; diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index df055b2ae..725f5a6dd 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::{prelude::string::String, U256}; -use pop_api::fungibles::{self as api, events::*, Fungibles, TokenId}; +use pop_api::fungibles::{self as api, *}; #[ink::contract] pub mod fungibles { diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index 435a8bc73..e55bb30bf 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -25,7 +25,7 @@ const INIT_AMOUNT: Balance = 100_000_000 * UNIT; const INIT_VALUE: Balance = 100 * UNIT; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(Balance::MAX); -type AssetId = u32; +type TokenId = u32; // Get the last event from `pallet-revive`. fn last_contract_event(address: &H160) -> Vec { @@ -108,9 +108,9 @@ fn to_address(account: &AccountId) -> H160 { } pub(crate) struct ExtBuilder { - assets: Option>, - asset_accounts: Option>, - asset_metadata: Option, Vec, u8)>>, + assets: Option>, + asset_accounts: Option>, + asset_metadata: Option, Vec, u8)>>, } impl ExtBuilder { @@ -118,14 +118,14 @@ impl ExtBuilder { Self { assets: None, asset_accounts: None, asset_metadata: None } } - pub(crate) fn with_assets(mut self, assets: Vec<(AssetId, AccountId, bool, Balance)>) -> Self { + pub(crate) fn with_assets(mut self, assets: Vec<(TokenId, AccountId, bool, Balance)>) -> Self { self.assets = Some(assets); self } pub(crate) fn with_asset_balances( mut self, - accounts: Vec<(AssetId, AccountId, Balance)>, + accounts: Vec<(TokenId, AccountId, Balance)>, ) -> Self { self.asset_accounts = Some(accounts); self @@ -133,7 +133,7 @@ impl ExtBuilder { pub(crate) fn with_asset_metadata( mut self, - metadata: Vec<(AssetId, Vec, Vec, u8)>, + metadata: Vec<(TokenId, Vec, Vec, u8)>, ) -> Self { self.asset_metadata = Some(metadata); self diff --git a/pop-api-vnext/src/fungibles.rs b/pop-api-vnext/src/fungibles.rs new file mode 100644 index 000000000..79b5fab99 --- /dev/null +++ b/pop-api-vnext/src/fungibles.rs @@ -0,0 +1,17 @@ +use ink::{ + contract_ref, + prelude::{string::String, vec::Vec}, + U256, +}; +use sol::*; +pub use v0::*; + +use super::*; + +/// APIs for fungible tokens conforming to the ERC20 standard. +pub mod erc20; + +/// The first version of the Fungibles API. +pub mod v0; + +pub type TokenId = u32; diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index 909b2838c..0fba7fa41 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -1,4 +1,4 @@ -pub use errors::*; +pub use v0::*; use super::{ contract_ref, prefixed_address, Address, Pop, Sol, SolAddress, SolEncode, SolError, SolType, @@ -6,445 +6,5 @@ use super::{ }; use crate::ensure; -const PRECOMPILE: u16 = 101; - -/// Interface of the ERC-20 standard. -#[ink::trait_definition] -pub trait Erc20 { - /// Returns the value of tokens in existence. - #[ink(message)] - #[allow(non_snake_case)] - fn totalSupply(&self) -> U256; - - /// Returns the value of tokens owned by `account`. - #[ink(message)] - #[allow(non_snake_case)] - fn balanceOf(&self, account: Address) -> U256; - - /// Moves a `value` amount of tokens from the caller's account to `to`. - /// - /// Returns a boolean value indicating whether the operation succeeded. - /// - /// Emits a [`Transfer`] event. - #[ink(message)] - fn transfer(&mut self, to: Address, value: U256) -> bool; - - /// Returns the remaining number of tokens that `spender` will be allowed to spend - /// on behalf of `owner` through [`transfer_from`]. This is zero by default. - /// - /// This value changes when `approve` or `[`transfer_from`] are called. - #[ink(message)] - fn allowance(&self, owner: Address, spender: Address) -> U256; - - /// Sets a `value` amount of tokens as the allowance of `spender` over the caller's - /// tokens. - /// - /// Returns a boolean value indicating whether the operation succeeded. - /// - /// Emits an [`Approval`] event. - #[ink(message)] - fn approve(&mut self, spender: Address, value: U256) -> bool; - - /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. - /// `value` is then deducted from the caller's allowance. - /// - /// Returns a boolean value indicating whether the operation succeeded. - /// - /// Emits a [`Transfer`] event. - #[ink(message)] - #[allow(non_snake_case)] - fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool; -} - -/// Emitted when the allowance of a `spender` for an `owner` is set by a call to -/// [`approve`]. `value` is the new allowance. -#[ink::event] -#[cfg_attr(feature = "std", derive(Debug))] -pub struct Approval { - /// The owner providing the allowance. - #[ink(topic)] - pub owner: Address, - /// The beneficiary of the allowance. - #[ink(topic)] - pub spender: Address, - /// The new allowance amount. - pub value: U256, -} - -/// Emitted when `value` tokens are moved from one account (`from`) to another (`to`). -/// -/// Note that `value` may be zero. -#[ink::event] -#[cfg_attr(feature = "std", derive(Debug))] -pub struct Transfer { - /// The source of the transfer. The zero address when minting. - #[ink(topic)] - pub from: Address, - /// The recipient of the transfer. The zero address when burning. - #[ink(topic)] - pub to: Address, - /// The amount transferred (or minted/burned). - pub value: U256, -} - -/// Returns the value of tokens in existence. -#[inline] -pub fn total_supply(token: TokenId) -> U256 { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - precompile.totalSupply() -} - -/// Returns the value of tokens owned by `account`. -#[inline] -pub fn balance_of(token: TokenId, account: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - precompile.balanceOf(account) -} - -/// Returns the value of tokens owned by `account`. -#[inline] -pub fn transfer(token: TokenId, to: Address, value: U256) -> Result { - ensure!(to != Address::zero(), ERC20InvalidSender(to)); - ensure!(value != U256::zero(), ERC20InsufficientValue); - - let address = prefixed_address(PRECOMPILE, token); - let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - Ok(precompile.transfer(to, value)) -} - -/// Returns the remaining number of tokens that `spender` will be allowed to spend -/// on behalf of `owner` through [`transfer_from`]. This is zero by default. -/// -/// This value changes when `approve` or [`transfer_from`] are called. -#[inline] -pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - precompile.allowance(owner, spender) -} - -/// Sets a `value` amount of tokens as the allowance of `spender` over the caller's -/// tokens. -/// -/// Returns a boolean value indicating whether the operation succeeded. -/// -/// Emits an [`Approval`] event. -#[inline] -pub fn approve(token: TokenId, spender: Address, value: U256) -> Result { - ensure!(spender != Address::zero(), ERC20InvalidApprover(spender)); - ensure!(value != U256::zero(), ERC20InsufficientValue); - - let address = prefixed_address(PRECOMPILE, token); - let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - Ok(precompile.approve(spender, value)) -} - -/// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. -/// `value` is then deducted from the caller's allowance. -/// -/// Returns a boolean value indicating whether the operation succeeded. -/// -/// Emits a [`Transfer`] event. -#[inline] -pub fn transfer_from( - token: TokenId, - from: Address, - to: Address, - value: U256, -) -> Result { - ensure!(from != Address::zero(), ERC20InvalidSender(from)); - ensure!(to != Address::zero() && to != from, ERC20InvalidReceiver(to)); - ensure!(value != U256::zero(), ERC20InsufficientValue); - - let address = prefixed_address(PRECOMPILE, token); - let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - Ok(precompile.transferFrom(from, to, value)) -} - -/// Extensions to the ERC-20 standard. -pub mod extensions { - use super::*; - - /// Interface for the optional metadata functions from the ERC-20 standard. - #[ink::trait_definition] - pub trait Erc20Metadata { - /// Returns the name of the token. - #[ink(message)] - fn name(&self) -> String; - - /// Returns the symbol of the token. - #[ink(message)] - fn symbol(&self) -> String; - - /// Returns the decimals places of the token. - #[ink(message)] - fn decimals(&self) -> u8; - } - - /// Returns the name of the token. - #[inline] - pub fn name(token: TokenId) -> String { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); - precompile.name() - } - - /// Returns the symbol of the token. - #[inline] - pub fn symbol(token: TokenId) -> String { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); - precompile.symbol() - } - - /// Returns the decimals places of the token. - #[inline] - pub fn decimals(token: TokenId) -> u8 { - let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); - precompile.decimals() - } -} - -// NOTE: subject to change based on ink!'s support for solidity custom errors. -pub enum Error { - /// Indicates a failure with the `spender`’s `allowance`. - InsufficientAllowance(ERC20InsufficientAllowance), - /// Indicates an error related to the current `balance` of a `sender`. - InsufficientBalance(ERC20InsufficientBalance), - /// Indicates an error related to a specified `value`. - InsufficientValue(ERC20InsufficientValue), - /// Indicates a failure with the `approver` of a token to be approved. - InvalidApprover(ERC20InvalidApprover), - /// Indicates a failure with the token `receiver`. - InvalidReceiver(ERC20InvalidReceiver), - /// Indicates a failure with the token `sender`. - InvalidSender(ERC20InvalidSender), -} - -impl<'a> SolEncode<'a> for Error { - type SolType = (); - - fn encode(&'a self) -> Vec { - use Error::*; - match self { - InsufficientAllowance(e) => e.abi_encode(), - InsufficientBalance(e) => e.abi_encode(), - InsufficientValue(e) => e.abi_encode(), - InvalidApprover(e) => e.abi_encode(), - InvalidReceiver(e) => e.abi_encode(), - InvalidSender(e) => e.abi_encode(), - } - } - - fn to_sol_type(&'a self) -> Self::SolType { - () - } -} - -/// Standard ERC-20 errors. -// See https://eips.ethereum.org/EIPS/eip-6093 for more details. -mod errors { - use super::*; - - /// Indicates a failure with the `spender`’s `allowance`. - pub struct ERC20InsufficientAllowance(pub Address, pub U256, pub U256); - impl SolError for ERC20InsufficientAllowance { - type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [251, 143, 65, 178]; - const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self( - Address::from(*tuple.0 .0), - U256::from_little_endian(tuple.1.as_le_slice()), - U256::from_little_endian(tuple.2.as_le_slice()), - ) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - self.0.to_sol_type().tokenize(), - self.1.to_sol_type().tokenize(), - self.2.to_sol_type().tokenize(), - ) - } - } - - /// Indicates an error related to the current `balance` of a `sender`. - pub struct ERC20InsufficientBalance(pub Address, pub U256, pub U256); - impl SolError for ERC20InsufficientBalance { - type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [228, 80, 211, 140]; - const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self( - Address::from(*tuple.0 .0), - U256::from_little_endian(tuple.1.as_le_slice()), - U256::from_little_endian(tuple.2.as_le_slice()), - ) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - self.0.to_sol_type().tokenize(), - self.1.to_sol_type().tokenize(), - self.2.to_sol_type().tokenize(), - ) - } - } - - /// Indicates an error related to a specified `value`. - pub struct ERC20InsufficientValue; - impl SolError for ERC20InsufficientValue { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [191, 254, 152, 173]; - const SIGNATURE: &'static str = "ERC20InsufficientValue()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - } - impl From for Error { - fn from(value: ERC20InsufficientValue) -> Self { - Self::InsufficientValue(value) - } - } - - /// Indicates a failure with the `approver` of a token to be approved. - pub struct ERC20InvalidApprover(pub Address); - impl SolError for ERC20InvalidApprover { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [230, 2, 223, 5]; - const SIGNATURE: &'static str = "ERC20InvalidApprover(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } - } - impl From for Error { - fn from(value: ERC20InvalidApprover) -> Self { - Self::InvalidApprover(value) - } - } - - /// Indicates a failure with the token `sender`. - pub struct ERC20InvalidSender(pub Address); - impl SolError for ERC20InvalidSender { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [150, 198, 253, 30]; - const SIGNATURE: &'static str = "ERC20InvalidSender(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } - } - impl From for Error { - fn from(value: ERC20InvalidSender) -> Self { - Self::InvalidSender(value) - } - } - - /// Indicates a failure with the token `receiver`. - pub struct ERC20InvalidReceiver(pub Address); - impl SolError for ERC20InvalidReceiver { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8]; - const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } - } - - impl<'a> SolEncode<'a> for ERC20InvalidReceiver { - type SolType = (&'a Address,); - - #[inline] - fn encode(&'a self) -> Vec { - self.abi_encode() - } - - #[inline] - fn to_sol_type(&'a self) -> Self::SolType { - (&self.0,) - } - } - impl From for Error { - fn from(value: ERC20InvalidReceiver) -> Self { - Self::InvalidReceiver(value) - } - } - - #[test] - fn error_encoding_works() { - for (result, expected) in [ - ( - ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), - "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - ), - ( - ERC20InsufficientBalance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), - "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - ), - (ERC20InsufficientValue.abi_encode(),"bffe98ad"), - ( - ERC20InvalidApprover([255u8; 20].into()).abi_encode(), - "e602df05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" - ), - ( - ERC20InvalidReceiver([255u8; 20].into()).abi_encode(), - "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" - ), - ( - ERC20InvalidSender([255u8; 20].into()).abi_encode(), - "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" - ), - ] { - assert_eq!(hex::encode(result), expected) - } - } -} +/// The first version of the Erc20 API. +pub mod v0; diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs new file mode 100644 index 000000000..16c5a5402 --- /dev/null +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -0,0 +1,180 @@ +pub use errors::*; +pub use events::*; + +use super::*; + +/// Standard ERC-20 errors. See https://eips.ethereum.org/EIPS/eip-6093 for more details. +mod errors; +mod events; + +// Precompile index within the runtime +const PRECOMPILE: u16 = 2; + +/// Interface of the ERC-20 standard. +#[ink::trait_definition] +pub trait Erc20 { + /// Returns the value of tokens in existence. + #[ink(message)] + #[allow(non_snake_case)] + fn totalSupply(&self) -> U256; + + /// Returns the value of tokens owned by `account`. + #[ink(message)] + #[allow(non_snake_case)] + fn balanceOf(&self, account: Address) -> U256; + + /// Moves a `value` amount of tokens from the caller's account to `to`. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a [`Transfer`] event. + #[ink(message)] + fn transfer(&mut self, to: Address, value: U256) -> bool; + + /// Returns the remaining number of tokens that `spender` will be allowed to spend + /// on behalf of `owner` through [`transfer_from`]. This is zero by default. + /// + /// This value changes when `approve` or `[`transfer_from`] are called. + #[ink(message)] + fn allowance(&self, owner: Address, spender: Address) -> U256; + + /// Sets a `value` amount of tokens as the allowance of `spender` over the caller's + /// tokens. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits an [`Approval`] event. + #[ink(message)] + fn approve(&mut self, spender: Address, value: U256) -> bool; + + /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. + /// `value` is then deducted from the caller's allowance. + /// + /// Returns a boolean value indicating whether the operation succeeded. + /// + /// Emits a [`Transfer`] event. + #[ink(message)] + #[allow(non_snake_case)] + fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool; +} + +/// Returns the value of tokens in existence. +#[inline] +pub fn total_supply(token: TokenId) -> U256 { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + precompile.totalSupply() +} + +/// Returns the value of tokens owned by `account`. +#[inline] +pub fn balance_of(token: TokenId, account: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + precompile.balanceOf(account) +} + +/// Returns the value of tokens owned by `account`. +#[inline] +pub fn transfer(token: TokenId, to: Address, value: U256) -> Result { + ensure!(to != Address::zero(), ERC20InvalidSender(to)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, token); + let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + Ok(precompile.transfer(to, value)) +} + +/// Returns the remaining number of tokens that `spender` will be allowed to spend +/// on behalf of `owner` through [`transfer_from`]. This is zero by default. +/// +/// This value changes when `approve` or [`transfer_from`] are called. +#[inline] +pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + precompile.allowance(owner, spender) +} + +/// Sets a `value` amount of tokens as the allowance of `spender` over the caller's +/// tokens. +/// +/// Returns a boolean value indicating whether the operation succeeded. +/// +/// Emits an [`Approval`] event. +#[inline] +pub fn approve(token: TokenId, spender: Address, value: U256) -> Result { + ensure!(spender != Address::zero(), ERC20InvalidApprover(spender)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, token); + let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + Ok(precompile.approve(spender, value)) +} + +/// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. +/// `value` is then deducted from the caller's allowance. +/// +/// Returns a boolean value indicating whether the operation succeeded. +/// +/// Emits a [`Transfer`] event. +#[inline] +pub fn transfer_from( + token: TokenId, + from: Address, + to: Address, + value: U256, +) -> Result { + ensure!(from != Address::zero(), ERC20InvalidSender(from)); + ensure!(to != Address::zero() && to != from, ERC20InvalidReceiver(to)); + ensure!(value != U256::zero(), ERC20InsufficientValue); + + let address = prefixed_address(PRECOMPILE, token); + let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + Ok(precompile.transferFrom(from, to, value)) +} + +/// Extensions to the ERC-20 standard. +pub mod extensions { + use super::*; + + /// Interface for the optional metadata functions from the ERC-20 standard. + #[ink::trait_definition] + pub trait Erc20Metadata { + /// Returns the name of the token. + #[ink(message)] + fn name(&self) -> String; + + /// Returns the symbol of the token. + #[ink(message)] + fn symbol(&self) -> String; + + /// Returns the decimals places of the token. + #[ink(message)] + fn decimals(&self) -> u8; + } + + /// Returns the name of the token. + #[inline] + pub fn name(token: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); + precompile.name() + } + + /// Returns the symbol of the token. + #[inline] + pub fn symbol(token: TokenId) -> String { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); + precompile.symbol() + } + + /// Returns the decimals places of the token. + #[inline] + pub fn decimals(token: TokenId) -> u8 { + let address = prefixed_address(PRECOMPILE, token); + let precompile: contract_ref!(Erc20Metadata, Pop, Sol) = address.into(); + precompile.decimals() + } +} diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs new file mode 100644 index 000000000..218697eb7 --- /dev/null +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -0,0 +1,236 @@ +use super::*; + +// NOTE: subject to change based on ink!'s support for solidity custom errors. +pub enum Error { + /// Indicates a failure with the `spender`’s `allowance`. + InsufficientAllowance(ERC20InsufficientAllowance), + /// Indicates an error related to the current `balance` of a `sender`. + InsufficientBalance(ERC20InsufficientBalance), + /// Indicates an error related to a specified `value`. + InsufficientValue(ERC20InsufficientValue), + /// Indicates a failure with the `approver` of a token to be approved. + InvalidApprover(ERC20InvalidApprover), + /// Indicates a failure with the token `receiver`. + InvalidReceiver(ERC20InvalidReceiver), + /// Indicates a failure with the token `sender`. + InvalidSender(ERC20InvalidSender), +} + +impl<'a> SolEncode<'a> for Error { + type SolType = (); + + fn encode(&'a self) -> Vec { + use Error::*; + match self { + InsufficientAllowance(e) => e.abi_encode(), + InsufficientBalance(e) => e.abi_encode(), + InsufficientValue(e) => e.abi_encode(), + InvalidApprover(e) => e.abi_encode(), + InvalidReceiver(e) => e.abi_encode(), + InvalidSender(e) => e.abi_encode(), + } + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } +} + +/// Indicates a failure with the `spender`’s `allowance`. +pub struct ERC20InsufficientAllowance(pub Address, pub U256, pub U256); +impl SolError for ERC20InsufficientAllowance { + type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [251, 143, 65, 178]; + const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self( + Address::from(*tuple.0 .0), + U256::from_little_endian(tuple.1.as_le_slice()), + U256::from_little_endian(tuple.2.as_le_slice()), + ) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + self.0.to_sol_type().tokenize(), + self.1.to_sol_type().tokenize(), + self.2.to_sol_type().tokenize(), + ) + } +} + +/// Indicates an error related to the current `balance` of a `sender`. +pub struct ERC20InsufficientBalance(pub Address, pub U256, pub U256); +impl SolError for ERC20InsufficientBalance { + type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [228, 80, 211, 140]; + const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self( + Address::from(*tuple.0 .0), + U256::from_little_endian(tuple.1.as_le_slice()), + U256::from_little_endian(tuple.2.as_le_slice()), + ) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + self.0.to_sol_type().tokenize(), + self.1.to_sol_type().tokenize(), + self.2.to_sol_type().tokenize(), + ) + } +} + +/// Indicates an error related to a specified `value`. +pub struct ERC20InsufficientValue; +impl SolError for ERC20InsufficientValue { + type Parameters<'a> = (); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [191, 254, 152, 173]; + const SIGNATURE: &'static str = "ERC20InsufficientValue()"; + + #[inline] + fn new<'a>(_tuple: as SolType>::RustType) -> Self { + Self + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } +} +impl From for Error { + fn from(value: ERC20InsufficientValue) -> Self { + Self::InsufficientValue(value) + } +} + +/// Indicates a failure with the `approver` of a token to be approved. +pub struct ERC20InvalidApprover(pub Address); +impl SolError for ERC20InvalidApprover { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [230, 2, 223, 5]; + const SIGNATURE: &'static str = "ERC20InvalidApprover(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } +} +impl From for Error { + fn from(value: ERC20InvalidApprover) -> Self { + Self::InvalidApprover(value) + } +} + +/// Indicates a failure with the token `sender`. +pub struct ERC20InvalidSender(pub Address); +impl SolError for ERC20InvalidSender { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [150, 198, 253, 30]; + const SIGNATURE: &'static str = "ERC20InvalidSender(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } +} +impl From for Error { + fn from(value: ERC20InvalidSender) -> Self { + Self::InvalidSender(value) + } +} + +/// Indicates a failure with the token `receiver`. +pub struct ERC20InvalidReceiver(pub Address); +impl SolError for ERC20InvalidReceiver { + type Parameters<'a> = (SolAddress,); + type Token<'a> = as SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8]; + const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)"; + + #[inline] + fn new<'a>(tuple: as SolType>::RustType) -> Self { + Self((*tuple.0 .0).into()) + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + (self.0.to_sol_type().tokenize(),) + } +} + +impl<'a> SolEncode<'a> for ERC20InvalidReceiver { + type SolType = (&'a Address,); + + #[inline] + fn encode(&'a self) -> Vec { + self.abi_encode() + } + + #[inline] + fn to_sol_type(&'a self) -> Self::SolType { + (&self.0,) + } +} +impl From for Error { + fn from(value: ERC20InvalidReceiver) -> Self { + Self::InvalidReceiver(value) + } +} + +#[test] +fn error_encoding_works() { + for (result, expected) in [ + ( + ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InsufficientBalance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + ), + (ERC20InsufficientValue.abi_encode(),"bffe98ad"), + ( + ERC20InvalidApprover([255u8; 20].into()).abi_encode(), + "e602df05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InvalidReceiver([255u8; 20].into()).abi_encode(), + "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ( + ERC20InvalidSender([255u8; 20].into()).abi_encode(), + "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), + ] { + assert_eq!(hex::encode(result), expected) + } +} diff --git a/pop-api-vnext/src/fungibles/erc20/v0/events.rs b/pop-api-vnext/src/fungibles/erc20/v0/events.rs new file mode 100644 index 000000000..df94f64bc --- /dev/null +++ b/pop-api-vnext/src/fungibles/erc20/v0/events.rs @@ -0,0 +1,32 @@ +use super::*; + +/// Emitted when the allowance of a `spender` for an `owner` is set by a call to +/// [`approve`]. `value` is the new allowance. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Approval { + /// The owner providing the allowance. + #[ink(topic)] + pub owner: Address, + /// The beneficiary of the allowance. + #[ink(topic)] + pub spender: Address, + /// The new allowance amount. + pub value: U256, +} + +/// Emitted when `value` tokens are moved from one account (`from`) to another (`to`). +/// +/// Note that `value` may be zero. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Transfer { + /// The source of the transfer. The zero address when minting. + #[ink(topic)] + pub from: Address, + /// The recipient of the transfer. The zero address when burning. + #[ink(topic)] + pub to: Address, + /// The amount transferred (or minted/burned). + pub value: U256, +} diff --git a/pop-api-vnext/src/fungibles/mod.rs b/pop-api-vnext/src/fungibles/v0.rs similarity index 96% rename from pop-api-vnext/src/fungibles/mod.rs rename to pop-api-vnext/src/fungibles/v0.rs index b04270cf0..87817ef0b 100644 --- a/pop-api-vnext/src/fungibles/mod.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -1,30 +1,17 @@ -use alloy_sol_types::{ - sol_data::{Address as SolAddress, Uint}, - SolError, SolType, -}; -pub use erc20::{Approval, Transfer}; pub use errors::*; -use ink::{ - abi::Sol, - contract_ref, - prelude::{string::String, vec::Vec}, - primitives::sol::SolTypeEncode, - U256, -}; +pub use events::*; -pub use super::revert; -use super::*; - -/// APIs for fungible tokens conforming to the ERC20 standard. -pub mod erc20; -pub mod errors; -pub mod events; +use super::{ + contract_ref, ensure, erc20::v0 as erc20, fixed_address, Address, Pop, Sol, SolAddress, + SolEncode, SolError, SolType, SolTypeEncode, String, TokenId, Vec, U256, +}; -const PRECOMPILE: u16 = 100; +mod errors; +mod events; -pub type TokenId = u32; +const PRECOMPILE: u16 = 1; -/// The fungibles precompile offers a streamlined interface for interacting with fungible +/// The fungibles API offers a streamlined interface for interacting with fungible /// tokens. The goal is to provide a simplified, consistent API that adheres to standards in /// the smart contract space. #[ink::trait_definition] diff --git a/pop-api-vnext/src/fungibles/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs similarity index 100% rename from pop-api-vnext/src/fungibles/errors.rs rename to pop-api-vnext/src/fungibles/v0/errors.rs diff --git a/pop-api-vnext/src/fungibles/events.rs b/pop-api-vnext/src/fungibles/v0/events.rs similarity index 97% rename from pop-api-vnext/src/fungibles/events.rs rename to pop-api-vnext/src/fungibles/v0/events.rs index b49f9011b..b652fc4c3 100644 --- a/pop-api-vnext/src/fungibles/events.rs +++ b/pop-api-vnext/src/fungibles/v0/events.rs @@ -8,7 +8,7 @@ //! //! For more details, refer to [ink! events](https://use.ink/basics/events). -pub use erc20::{Approval, Transfer}; +pub use super::erc20::{Approval, Transfer}; use super::*; diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index d78785777..c69e009e2 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -1,12 +1,14 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] -use ink::{Address, SolEncode}; +use ink::Address; +pub use sol::revert; type Pop = ink::env::DefaultEnvironment; /// APIs for fungible tokens. #[cfg(feature = "fungibles")] pub mod fungibles; +mod sol; #[macro_export] macro_rules! ensure { @@ -40,15 +42,6 @@ fn prefixed_address(n: u16, prefix: u32) -> Address { address } -/// Reverts the current contract execution, rolling back any changes and returning the specified -/// `error`. -// Helper until Solidity support added for Rust errors for automatic reversion based on returning an -// error. -pub fn revert(error: &impl for<'a> SolEncode<'a>) -> ! { - use ink::env::{return_value_solidity, ReturnFlags}; - return_value_solidity(ReturnFlags::REVERT, error) -} - #[test] fn fixed_address_works() { assert_eq!(hex::encode(fixed_address(100)), "0000000000000000000000000000000000640000") diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs new file mode 100644 index 000000000..215c891c3 --- /dev/null +++ b/pop-api-vnext/src/sol.rs @@ -0,0 +1,14 @@ +pub use alloy_sol_types::{ + sol_data::{Address as SolAddress, Uint}, + SolError, SolType, +}; +pub use ink::{abi::Sol, primitives::sol::SolTypeEncode, SolEncode}; + +/// Reverts the current contract execution, rolling back any changes and returning the specified +/// `error`. +// Helper until Solidity support added for Rust errors for automatic reversion based on returning an +// error. +pub fn revert(error: &impl for<'a> SolEncode<'a>) -> ! { + use ink::env::{return_value_solidity, ReturnFlags}; + return_value_solidity(ReturnFlags::REVERT, error) +} diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 50ef534b9..140fc3dda 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -13,8 +13,10 @@ use crate::{ RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, TransactionPayment, }; -type Erc20 = pallet_api_vnext::Erc20; -type Fungibles = pallet_api_vnext::Fungibles; +type Erc20 = + pallet_api_vnext::fungibles::precompiles::erc20::v0::Erc20; +type Fungibles = + pallet_api_vnext::fungibles::precompiles::v0::Fungibles; fn schedule() -> pallet_contracts::Schedule { pallet_contracts::Schedule { @@ -105,8 +107,12 @@ impl pallet_revive::Config for Runtime { type NativeToEthRatio = NativeToEthRatio; // 512 MB. Used in an integrity test that verifies the runtime has enough memory. type PVFMemory = ConstU32<{ 512 * 1024 * 1024 }>; - type Precompiles = - (Fungibles<100, TrustBackedAssetsInstance>, Erc20<101, TrustBackedAssetsInstance>); + type Precompiles = ( + // 1: `Fungibles` precompile v0 using `TrustBackedAssetsInstance` instances + Fungibles<1, TrustBackedAssetsInstance>, + // 2: `Erc20` precompile v0 using `TrustBackedAssetsInstance` instances + Erc20<2, TrustBackedAssetsInstance>, + ); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -144,7 +150,7 @@ fn contracts_prevents_runtime_calls() { #[cfg(test)] mod tests { use frame_support::{assert_ok, traits::fungible::Mutate}; - use pallet_api_vnext::fungibles::precompiles::{IFungibles::*, IERC20}; + use pallet_api_vnext::fungibles::precompiles::{erc20::v0::IERC20, v0::IFungibles::*}; use pallet_revive::{ precompiles::alloy::{primitives, sol_types::SolCall}, AddressMapper, @@ -177,8 +183,8 @@ mod tests { let origin = RuntimeOrigin::signed(caller.clone()); let origin_addr = AccountId32Mapper::to_address(&caller); let token = 1; - let fungibles_addr: H160 = Fungibles::<100, TrustBackedAssetsInstance>::address().into(); - let erc20_addr: H160 = Erc20::<101, TrustBackedAssetsInstance>::address(token).into(); + let fungibles_addr: H160 = Fungibles::<1, TrustBackedAssetsInstance>::address().into(); + let erc20_addr: H160 = Erc20::<2, TrustBackedAssetsInstance>::address(token).into(); let total_supply: Balance = 10_000; let gas_limit = Weight::from_parts(600_000_000, 10_000); new_test_ext().execute_with(|| { From 4ee1f94b646914ffa628f6e24fbfa698c1017965 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 17:04:22 +0100 Subject: [PATCH 143/284] style: formatting --- pop-api-vnext/src/fungibles/v0/events.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pop-api-vnext/src/fungibles/v0/events.rs b/pop-api-vnext/src/fungibles/v0/events.rs index b652fc4c3..266121196 100644 --- a/pop-api-vnext/src/fungibles/v0/events.rs +++ b/pop-api-vnext/src/fungibles/v0/events.rs @@ -9,7 +9,6 @@ //! For more details, refer to [ink! events](https://use.ink/basics/events). pub use super::erc20::{Approval, Transfer}; - use super::*; /// Event emitted when a token is created. From 8a75690f23e08a9764fdb26510a3a0deeda18b64 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 17:09:57 +0100 Subject: [PATCH 144/284] build(deps): update ink after sol-abi improvements merged --- pop-api-vnext/Cargo.toml | 4 ++-- pop-api-vnext/examples/fungibles/Cargo.toml | 2 +- .../contracts/fungibles/Cargo.lock | 24 +++++++++---------- .../contracts/fungibles/Cargo.toml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 50c407f31..232d60099 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -6,8 +6,8 @@ name = "pop-api" version = "0.1.0" [dependencies] -alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } +alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 03f9e0bd2..9f89d7e4e 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index dd91fd6df..7c5709829 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -2354,7 +2354,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "const_format", "deranged", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "cfg-if", ] @@ -2387,7 +2387,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2409,7 +2409,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2426,7 +2426,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "blake2", "cfg-if", @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "blake2", "either", @@ -2475,7 +2475,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "ink_codegen", "ink_ir", @@ -2490,7 +2490,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "cfg-if", ] @@ -2513,7 +2513,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "alloy-sol-types 1.2.1", "cfg-if", @@ -2540,7 +2540,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "array-init", "cfg-if", @@ -2558,7 +2558,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" dependencies = [ "ink_metadata", "ink_prelude", diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index da78763da..d5b9801e1 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -10,7 +10,7 @@ abi = "sol" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-abi", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] From ff40d3a705cd227250a26e3f760393c559c7b8c4 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 26 Jun 2025 17:28:33 +0100 Subject: [PATCH 145/284] ci: explicitly cache pallet-revive-fixtures output --- .github/actions/init/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index e4b0af65b..f7ce6b833 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -29,4 +29,6 @@ runs: with: cache-on-failure: true cache-all-crates: true - key: ${{ inputs.cache-key }} \ No newline at end of file + cache-directors: | + target/pallet-revive-fixtures + key: ${{ inputs.cache-key }} From d567a3fcba2bee3acd26cfaac7563979e4666365 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 10:37:50 +0100 Subject: [PATCH 146/284] test(api/integration-tests): fix imports after refactor --- pop-api-vnext/integration-tests/src/fungibles.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index ddb1764b9..27345a264 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -4,12 +4,12 @@ use frame_support::{ approvals::Inspect as _, metadata::Inspect as _, roles::Inspect as _, Inspect as _, }, }; -use pallet_api_vnext::fungibles::precompiles::IFungibles::{ +use pallet_api_vnext::fungibles::precompiles::v0::IFungibles::{ allowanceCall, approveCall, balanceOfCall, burnCall, clearMetadataCall, createCall, decimalsCall, decreaseAllowanceCall, existsCall, increaseAllowanceCall, mintCall, nameCall, setMetadataCall, startDestroyCall, symbolCall, totalSupplyCall, transferCall, transferFromCall, }; -use pop_api::fungibles::events::*; +use pop_api::fungibles::*; use pop_primitives::TokenId; use sp_io::hashing::twox_256; From edcbcfc881abea3835c750e07da40082a7b16a07 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 10:46:01 +0100 Subject: [PATCH 147/284] ci: remove cached pallet-revive fixtures --- .github/actions/init/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index f7ce6b833..6c8677e00 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -29,6 +29,10 @@ runs: with: cache-on-failure: true cache-all-crates: true - cache-directors: | - target/pallet-revive-fixtures key: ${{ inputs.cache-key }} + + - name: Remove cached pallet-revive fixtures + shell: bash + run: | + ls target/pallet-revive-fixtures + rm -rf target/pallet-revive-fixtures From d8bf357aea8fa40f28ccfd02dd080eb1557ad964 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 10:52:28 +0100 Subject: [PATCH 148/284] ci: only list if directory exists --- .github/actions/init/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index 6c8677e00..fc3d1de7c 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -34,5 +34,5 @@ runs: - name: Remove cached pallet-revive fixtures shell: bash run: | - ls target/pallet-revive-fixtures + [ -d target/pallet-revive-fixtures ] && ls target/pallet-revive-fixtures rm -rf target/pallet-revive-fixtures From fb42af6e327a66081a1b901c9f1cdda52b3ff077 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 11:30:19 +0100 Subject: [PATCH 149/284] ci(init): make crate caching configurable --- .github/actions/init/action.yml | 23 +++++++++++++---------- .github/workflows/ci.yml | 9 +++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index fc3d1de7c..eee75096d 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -1,8 +1,16 @@ name: Initialize description: This action initializes a runner for use in other actions. inputs: + cache-all-crates: + description: Whether all crates should be cached, or only dependent crates. Defaults to true. + default: "true" + cache-directories: + description: Additional non-workspace directories to be cached, separated by newlines. + cache-on-failure: + description: Cache even if the build fails. Defaults to false. + default: "true" cache-key: - description: "The key to be used for the cache" + description: An additional optional key to be added. Useful for jobs utilizing a matrix. runs: using: "composite" @@ -25,14 +33,9 @@ runs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Rust Cache - uses: Swatinem/rust-cache@v2.7.8 + uses: Swatinem/rust-cache@v2.8 with: - cache-on-failure: true - cache-all-crates: true + cache-all-crates: ${{ inputs.cache-all-crates }} + cache-directories: ${{ inputs.cache-directories }} + cache-on-failure: ${{ inputs.cache-on-failure }} key: ${{ inputs.cache-key }} - - - name: Remove cached pallet-revive fixtures - shell: bash - run: | - [ -d target/pallet-revive-fixtures ] && ls target/pallet-revive-fixtures - rm -rf target/pallet-revive-fixtures diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7c60558b..a22d12208 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,9 @@ jobs: - uses: actions/checkout@v4 - uses: "./.github/actions/init" + with: + # TODO: remove once pallet-revive-fixtures build cache issue resolved + cache-all-crates: false - name: Check Build run: | @@ -62,6 +65,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: "./.github/actions/init" + with: + # TODO: remove once pallet-revive-fixtures build cache issue resolved + cache-all-crates: false - name: Check Build with ISMP run: | cargo check --release --locked --workspace --exclude integration-tests --features=ismp,runtime-benchmarks,try-runtime @@ -202,6 +208,9 @@ jobs: - uses: actions/checkout@v4 - uses: "./.github/actions/init" + with: + # TODO: remove once pallet-revive-fixtures build cache issue resolved + cache-all-crates: false - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov From bdadf068ce7c523fbcef3c6591b0c456b49000fb Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 11:32:27 +0100 Subject: [PATCH 150/284] ci(init): bump rust-cache version --- .github/actions/init/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index eee75096d..00e111ce6 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -33,7 +33,7 @@ runs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Rust Cache - uses: Swatinem/rust-cache@v2.8 + uses: Swatinem/rust-cache@v2.8.0 with: cache-all-crates: ${{ inputs.cache-all-crates }} cache-directories: ${{ inputs.cache-directories }} From 9a75e2c055f090becc788f2c2d0056dba5cb0576 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 12:45:17 +0100 Subject: [PATCH 151/284] refactor(pallets/api): address clippy warning --- pallets/api-vnext/src/fungibles.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles.rs b/pallets/api-vnext/src/fungibles.rs index 0947bc972..829096bcf 100644 --- a/pallets/api-vnext/src/fungibles.rs +++ b/pallets/api-vnext/src/fungibles.rs @@ -171,7 +171,7 @@ fn decrease_allowance + pallet_assets::Config, I>( >::approve_transfer(origin, asset_param, spender_source, new_allowance)?; >::approve(1, 1) }; - Ok((new_allowance, Some(weight).into())) + Ok((new_allowance, Some(weight))) } fn exists, I>(asset: AssetIdOf) -> bool { From fd2406db2462fbd42d4f04ec05dfd9ab011dce8a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 12:49:58 +0100 Subject: [PATCH 152/284] docs(api): add missing precompile index comment --- pop-api-vnext/src/fungibles/v0.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pop-api-vnext/src/fungibles/v0.rs b/pop-api-vnext/src/fungibles/v0.rs index 87817ef0b..3247d026e 100644 --- a/pop-api-vnext/src/fungibles/v0.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -9,6 +9,7 @@ use super::{ mod errors; mod events; +// Precompile index within the runtime const PRECOMPILE: u16 = 1; /// The fungibles API offers a streamlined interface for interacting with fungible From 17a8f9250248522ccda647fb2df9aef0e2396e39 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 13:11:36 +0100 Subject: [PATCH 153/284] refactor(pallets/api): ensure weight charge updated on both approve success and failure --- .../src/fungibles/precompiles/erc20/v0.rs | 33 ++++++++++++------- .../api-vnext/src/fungibles/precompiles/v0.rs | 33 ++++++++++++------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index cb3476d02..c10e4e2ce 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -81,21 +81,32 @@ where let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let result = approve::( + match approve::( to_runtime_origin(env.caller()), token, env.to_account_id(&(*spender.0).into()), value.saturating_to(), - ) // TODO: adjust weight - .map_err(|e| e.error)?; - - // Adjust weight - if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 - // lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } + ) { + Ok(result) => { + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error.into()) + }, + }; let event = Approval { owner, spender: *spender, value: *value }; deposit_event(env, address, event); diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 9768400af..6949ef30c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -67,21 +67,32 @@ where let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let result = approve::( + match approve::( to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), value.saturating_to(), - ) - .map_err(|e| e.error)?; - - // Adjust weight - if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once #8693 - // lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } + ) { + Ok(result) => { + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error.into()) + }, + }; let event = Approval { token: *token, owner, spender: *spender, value: *value }; deposit_event(env, address, event); From 9af083f7d4c0fce7fdaa1373fa524c093a475922 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 13:43:14 +0100 Subject: [PATCH 154/284] refactor(pallets-api): update event handling based on reference implementation --- .../src/fungibles/precompiles/erc20/v0.rs | 7 ++-- .../api-vnext/src/fungibles/precompiles/v0.rs | 19 +++++------ pallets/api-vnext/src/lib.rs | 33 +++++++++---------- 3 files changed, 27 insertions(+), 32 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index c10e4e2ce..80180b153 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -65,7 +65,7 @@ where value.saturating_to(), )?; - deposit_event::(env, address, Transfer { from, to: *to, value: *value }); + deposit_event(env, Transfer { from, to: *to, value: *value })?; Ok(transferCall::abi_encode_returns(&true)) }, IERC20Calls::allowance(allowanceCall { owner, spender }) => { @@ -108,8 +108,7 @@ where }, }; - let event = Approval { owner, spender: *spender, value: *value }; - deposit_event(env, address, event); + deposit_event(env, Approval { owner, spender: *spender, value: *value })?; Ok(approveCall::abi_encode_returns(&true)) }, IERC20Calls::transferFrom(transferFromCall { from, to, value }) => { @@ -123,7 +122,7 @@ where value.saturating_to(), )?; - deposit_event(env, address, Transfer { from: *from, to: *to, value: *value }); + deposit_event(env, Transfer { from: *from, to: *to, value: *value })?; Ok(transferFromCall::abi_encode_returns(&true)) }, // IERC20Metadata diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 6949ef30c..15ef1515d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -28,7 +28,7 @@ where Fixed(NonZero::new(FIXED).expect("expected non-zero precompile address")); fn call( - address: &[u8; 20], + _address: &[u8; 20], input: &Self::Interface, env: &mut impl Ext, ) -> Result, Error> { @@ -44,8 +44,7 @@ where value.saturating_to(), )?; - let event = Transfer { token: *token, from, to: *to, value: *value }; - deposit_event(env, address, event); + deposit_event(env, Transfer { token: *token, from, to: *to, value: *value })?; Ok(transferCall::abi_encode_returns(&transferReturn {})) }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { @@ -60,7 +59,7 @@ where )?; let event = Transfer { token: *token, from: *from, to: *to, value: *value }; - deposit_event(env, address, event); + deposit_event(env, event)?; Ok(transferFromCall::abi_encode_returns(&transferFromReturn {})) }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { @@ -95,7 +94,7 @@ where }; let event = Approval { token: *token, owner, spender: *spender, value: *value }; - deposit_event(env, address, event); + deposit_event(env, event)?; Ok(approveCall::abi_encode_returns(&approveReturn {})) }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { @@ -122,7 +121,7 @@ where ); let spender = *spender; - deposit_event(env, address, Approval { token: *token, owner, spender, value }); + deposit_event(env, Approval { token: *token, owner, spender, value })?; Ok(increaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { @@ -158,7 +157,7 @@ where }; let spender = *spender; - deposit_event(env, address, Approval { token: *token, owner, spender, value }); + deposit_event(env, Approval { token: *token, owner, spender, value })?; Ok(decreaseAllowanceCall::abi_encode_returns(&value)) }, IFungiblesCalls::create(createCall { admin, minBalance }) => { @@ -172,7 +171,7 @@ where )? .into(); - deposit_event(env, address, Created { id, creator, admin: *admin }); + deposit_event(env, Created { id, creator, admin: *admin })?; Ok(createCall::abi_encode_returns(&id)) }, IFungiblesCalls::startDestroy(startDestroyCall { token }) => { @@ -214,7 +213,7 @@ where let from = Address::default(); let to = *account; - deposit_event(env, address, Transfer { token: *token, from, to, value: *value }); + deposit_event(env, Transfer { token: *token, from, to, value: *value })?; Ok(mintCall::abi_encode_returns(&mintReturn {})) }, IFungiblesCalls::burn(burnCall { token, account, value }) => { @@ -239,7 +238,7 @@ where let to = Address::default(); let event = Transfer { token: *token, from: *account, to, value: *value }; - deposit_event(env, address, event); + deposit_event(env, event)?; Ok(burnCall::abi_encode_returns(&burnReturn {})) }, IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 6cd84ed2e..e59aa4cbb 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -10,7 +10,7 @@ use frame_support::{dispatch::RawOrigin, sp_runtime::traits::StaticLookup}; use pallet_revive::precompiles::alloy::sol_types::{SolType, SolValue}; use pallet_revive::{ precompiles::{ - alloy::{sol, sol_types::SolEvent}, + alloy::{primitives::IntoLogData, sol, sol_types::SolEvent}, AddressMatcher, Error, Ext, Precompile, }, AddressMapper as _, Origin, H160, H256, U256, @@ -96,22 +96,19 @@ fn decode::RustType>>(data: &[u8]) -> } fn deposit_event( - _env: &mut impl Ext, - address: impl Into, - event: impl SolEvent, -) { - // TODO: ensure that env.deposit_event impl is correct - let topics = topics(&event); - let data = event.encode_data(); - // env.deposit_event(topics, data); - // TODO: charge gas - // Workaround to emit events explicitly as precompile, as env.deposit uses derived address of - // dummy contract when using `CallSetup` within tests - let revive_event = - pallet_revive::Event::ContractEmitted { contract: address.into(), data, topics }; - >::deposit_event(::RuntimeEvent::from( - revive_event, - )) + env: &mut impl Ext, + event: impl SolEvent + IntoLogData, +) -> Result<(), Error> { + // Source: https://github.com/paritytech/polkadot-sdk/blob/e1026d7ee22a593cf566a99484eee02a03ecc236/substrate/frame/assets/src/precompiles.rs#L152 + let (topics, data) = event.into_log_data().split(); + let topics = topics.into_iter().map(|v| H256(v.0)).collect::>(); + env.gas_meter_mut() + .charge(pallet_revive::precompiles::RuntimeCosts::DepositEvent { + num_topic: topics.len() as u32, + len: topics.len() as u32, + })?; + env.deposit_event(topics, data.to_vec()); + Ok(()) } #[cfg(test)] @@ -141,7 +138,7 @@ fn to_address(account: &::AccountId) -> H160 pallet_revive::AccountId32Mapper::::to_address(account) } -// TODO: verify +#[cfg(test)] fn topics(event: &impl SolEvent) -> Vec { event.encode_topics().into_iter().map(|t| (*t.0).into()).collect() } From 0880a73106e6e4c25c08dd9b37caa04ac3c8e2c6 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 27 Jun 2025 13:45:28 +0100 Subject: [PATCH 155/284] docs: remove todo comment --- pallets/api-vnext/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index e59aa4cbb..6d8b8621a 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -144,7 +144,6 @@ fn topics(event: &impl SolEvent) -> Vec { } /// Creates a new `RuntimeOrigin` from an ['Origin']. -// TODO: upstream? pub fn to_runtime_origin(o: Origin) -> T::RuntimeOrigin { match o { Origin::Root => RawOrigin::Root.into(), From 7feeed4603b137f83eede07cfaa12f126818b976 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 30 Jun 2025 21:22:00 +0100 Subject: [PATCH 156/284] test(api/integration-tests): constructor encoding Uses `all` encoding to support multiple constructors after solidity constructor support added. --- .github/workflows/ci.yml | 2 +- pop-api-vnext/Cargo.toml | 4 +-- pop-api-vnext/examples/fungibles/Cargo.toml | 2 +- pop-api-vnext/integration-tests/Cargo.toml | 2 +- .../contracts/fungibles/Cargo.lock | 32 +++++++++---------- .../contracts/fungibles/Cargo.toml | 5 +-- .../contracts/fungibles/lib.rs | 2 +- .../integration-tests/src/fungibles.rs | 4 +-- 8 files changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a22d12208..9facc8ab7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,7 +160,7 @@ jobs: needs: lint runs-on: ubuntu-latest env: - RUSTFLAGS: '--cfg ink_abi="sol"' + RUSTFLAGS: '--cfg ink_abi="all"' steps: - uses: actions/checkout@v4 diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 232d60099..c6c5cbcd8 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -6,8 +6,8 @@ name = "pop-api" version = "0.1.0" [dependencies] -alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 9f89d7e4e..e70a97772 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index ec26838bd..df6e98d7c 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -5,7 +5,7 @@ name = "pop-api-vnext-integration-tests" version = "0.1.0" [package.metadata.ink-lang] -abi = "sol" +abi = "all" [build-dependencies] contract-build = { git = "https://github.com/use-ink/cargo-contract" } diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index 7c5709829..5b6f22299 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -2342,9 +2342,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown 0.15.4", @@ -2354,7 +2354,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "const_format", "deranged", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "cfg-if", ] @@ -2387,7 +2387,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2409,7 +2409,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2426,7 +2426,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "blake2", "cfg-if", @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "blake2", "either", @@ -2475,7 +2475,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "ink_codegen", "ink_ir", @@ -2490,7 +2490,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "cfg-if", ] @@ -2513,7 +2513,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "alloy-sol-types 1.2.1", "cfg-if", @@ -2540,7 +2540,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "array-init", "cfg-if", @@ -2558,7 +2558,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#717b4985e8dec31b4eceb2d47ebe643e3b4c02e8" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" dependencies = [ "ink_metadata", "ink_prelude", @@ -3144,9 +3144,9 @@ dependencies = [ [[package]] name = "pallet-revive-fixtures" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1df19ca809f036d6ddf1632039e9db312f92dbe8f9390e6722ad808cd95377" +checksum = "279282bb5f8e1da5a22f0e74aabbe31d62e158b7700e102fd9447a971f90d383" dependencies = [ "anyhow", "cargo_metadata", diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index d5b9801e1..3008d59d8 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -4,13 +4,14 @@ edition = "2021" name = "fungibles" version = "0.1.0" +# ink! abi required for multiple constructors (fungibles) [package.metadata.ink-lang] -abi = "sol" +abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 725f5a6dd..358d4b924 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -14,7 +14,7 @@ pub mod fungibles { pub struct Fungible; impl Fungible { - #[ink(constructor, payable)] + #[ink(constructor, default, payable)] #[allow(clippy::new_without_default)] pub fn new() -> Self { Self {} diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 27345a264..5810d19af 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -702,7 +702,7 @@ struct Contract { impl Contract { // Create a new instance of the contract through on-chain instantiation. fn new(origin: &AccountId, value: Balance) -> Self { - let data = blake_selector("new").to_vec(); + let data = vec![]; // Default solidity constructor let salt = twox_256(&value.to_le_bytes()); let address = @@ -712,7 +712,7 @@ impl Contract { // Create a new instance of the contract through on-chain instantiation. fn new_with_create(origin: &AccountId, value: Balance, min_balance: U256) -> Self { - let data = [blake_selector("create").to_vec(), min_balance.encode()].concat(); + let data = [blake_selector("create").to_vec(), min_balance.encode()].concat(); // Additional constructor via ink abi let salt = twox_256(&value.to_le_bytes()); let address = instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); From a1bed0b86e627e9e13bfbacf5818d536b06c6d1d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 1 Jul 2025 11:13:01 +0100 Subject: [PATCH 157/284] docs(api): fix transfer comment --- pop-api-vnext/src/fungibles/erc20/v0.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index 16c5a5402..b7255d9a2 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -74,7 +74,11 @@ pub fn balance_of(token: TokenId, account: Address) -> U256 { precompile.balanceOf(account) } -/// Returns the value of tokens owned by `account`. +/// Moves a `value` amount of tokens from the caller's account to `to`. +/// +/// Returns a boolean value indicating whether the operation succeeded. +/// +/// Emits a [`Transfer`] event. #[inline] pub fn transfer(token: TokenId, to: Address, value: U256) -> Result { ensure!(to != Address::zero(), ERC20InvalidSender(to)); From 37ab37a8a60108e10fe4e16cb36c1df3a5a0dd86 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 1 Jul 2025 11:31:48 +0100 Subject: [PATCH 158/284] docs(api): port readmes --- pop-api-vnext/README.md | 63 ++++++++++++++++++++++ pop-api-vnext/examples/fungibles/README.md | 42 +++++++++++++++ pop-api-vnext/src/fungibles/README.md | 18 +++++++ 3 files changed, 123 insertions(+) create mode 100644 pop-api-vnext/README.md create mode 100644 pop-api-vnext/examples/fungibles/README.md create mode 100644 pop-api-vnext/src/fungibles/README.md diff --git a/pop-api-vnext/README.md b/pop-api-vnext/README.md new file mode 100644 index 000000000..28b25fabe --- /dev/null +++ b/pop-api-vnext/README.md @@ -0,0 +1,63 @@ +## Pop API + +The `pop-api` crate provides a high-level interface that allows smart contracts to seamlessly interact with Pop, a +blockchain built to power innovative and impactful solutions on Polkadot. Designed for stability, simplicity, and +efficiency, the API abstracts away the complexities of the runtime, enabling developers to focus on building powerful +applications rather than managing intricate blockchain details. + +### Design Goals + +- **Simple**: enhance the developer experience by abstracting away the complexities of runtime functionality, making it + easy for developers to build advanced applications. +- **Versioned**: offer a stable, versioned interface that ensures smart contracts stay compatible as the runtime + evolves, enabling seamless integration of new features without disrupting existing contracts. +- **Efficient**: optimise for minimal contract size, having the lowest possible deployment and execution costs. + +### Key Features + +- **Versioned Interface**: Provides backward compatibility, ensuring that existing contract functionality remains stable + as new features are added to the runtime. +- **Error Handling**: Supports rich, versioned error types, enabling contracts to receive and interpret any runtime + error, making troubleshooting and development easier. +- **Use Cases**: + - [Fungibles](./src/fungibles/README.md): Interacting and managing fungible tokens. + - In development: + - Non-Fungibles: Interacting and managing non fungible tokens. + - Messaging: Cross chain rails for interaction with other chains using ISMP & XCM. + - Sponsorship: Allowing smart contracts to sponsor transactions. + - Incentives: Incentivise smart contracts by sharing chain revenue. + +### Getting Started + +Using the API in your ink! smart contract is as easy as adding the `pop-api` crate in your `Cargo.toml`: + +```toml +pop-api = { git = "https://github.com/r0gue-io/pop-node", default-features = false } +``` + +and importing it within the contract source: + +```rust +use pop_api::*; +``` + +Check out the ink! smart contract [examples](./example) using the API. + +### Learn more + +The true strength of the API lies in the Pop runtime, where powerful precompiles provide flexible and +efficient access to all runtime features, while specialized API modules deliver stable, intuitive interfaces for +developers. Together, these elements make the API a powerful tool for creating decentralized applications on Polkadot. + +Want to explore how it all works? Check out: + +- [API Modules](../pallets/api-vnext) + +### Support + +Be part of our passionate community of Web3 builders. [Join our Telegram](https://t.me/onpopio)! + +Feel free to raise issues if anything is unclear, if you have ideas or want to contribute to Pop! + +For any questions related to ink! you can also go to [Polkadot Stack Exchange](https://polkadot.stackexchange.com/) or +ask the [ink! community](https://t.me/inkathon/). diff --git a/pop-api-vnext/examples/fungibles/README.md b/pop-api-vnext/examples/fungibles/README.md new file mode 100644 index 000000000..c66d61eb9 --- /dev/null +++ b/pop-api-vnext/examples/fungibles/README.md @@ -0,0 +1,42 @@ +# Erc20 Fungible Token with Pop API + +This [ink!][ink] contract implements a [ERC20-compliant][erc-20] fungible token by leveraging the [Fungibles API][pop-api-fungibles]. Unlike typical token contracts, where the contract itself manages the token, tokens created by this contract are managed directly by Pop. This enables seamless integration and interoperability of the token across the Polkadot ecosystem and its applications. + +As the creator of the token, the contract has permissions to mint and burn tokens, but it can only transfer and approve tokens on its own behalf and requires explicit approval to transfer tokens for other accounts. Instead of users interacting with the contract to handle their token approvals, they interact primarily with Pop’s runtime or the corresponding ERC-20 precompile. + +## Key benefits of using the Pop API + +- The token operates live on the Pop Network, beyond just within the contract. +- Simplify token management with high-level interfaces to significantly reduce contract size and complexity. + +[Learn more how Pop API works.](pop-api) + +## Use Cases + +This contract can serve a variety of purposes where owner-controlled token management is essential. Example use cases include: +- **DAO Token**: A DAO can use this contract to manage a governance token, with the DAO overseeing token issuance and removal based on governance decisions. +- **Staking and Rewards**: This contract supports minting tokens specifically for reward distribution. +- **Loyalty Programs**: Businesses or platforms can use this contract to issue loyalty points, with the owner managing token balances for users based on participation or purchases. + +## Test with Pop Drink + +Since this contract interacts directly with Pop’s runtime through the Pop API, it requires [Pop Drink](https://github.com/r0gue-io/pop-drink) for testing. See how the contract is tested in [tests](./tests.rs). + +## Potential Improvements + +- **Multiple owner management**: Instead of restricting ownership to a single `owner`, the contract could be designed to accommodate multiple owners. + +## Support + +Be part of our passionate community of Web3 builders. [Join our Telegram](https://t.me/onpopio)! + +Feel free to raise issues if anything is unclear, you have ideas or want to contribute to Pop! Examples using the fungibles API are always welcome! + +For any questions related to ink! you can also go to [Polkadot Stack Exchange](https://polkadot.stackexchange.com/) or +ask the [ink! community](https://t.me/inkathon/1). + +[ink]: https://use.ink +[erc-20]: https://ethereum.org/en/developers/docs/standards/tokens/erc-20/ +[pop-api]: https://github.com/r0gue-io/pop-node/tree/main/pop-api/ +[pop-api-fungibles]: https://github.com/r0gue-io/pop-node/tree/main/pop-api-vnext/src/fungibles +[pop-drink]: https://github.com/r0gue-io/pop-drink diff --git a/pop-api-vnext/src/fungibles/README.md b/pop-api-vnext/src/fungibles/README.md new file mode 100644 index 000000000..88d83b65f --- /dev/null +++ b/pop-api-vnext/src/fungibles/README.md @@ -0,0 +1,18 @@ +## Fungibles API + +The `fungibles` module provides an api for interacting and managing fungible tokens. + +It includes the following interfaces: + +1. `Fungibles` +2. `Erc20` +3. `Erc20Metadata` + +To use it in your contract add the `fungibles` feature to the `pop-api` dependency. + +```toml +# Cargo.toml +pop-api = { git = "https://github.com/r0gue-io/pop-node", default-features = false, features = [ "fungibles" ] } +``` + +Check out the [examples](../../examples/fungibles/) to learn how you can use the fungibles api. From 87a761f0bae2ca7d184d2cb06d837b5f1c8f3f9f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 16:03:41 +0100 Subject: [PATCH 159/284] refactor(pallets/api): simplify u256 conversion --- .../api-vnext/src/fungibles/precompiles.rs | 7 +- .../src/fungibles/precompiles/erc20.rs | 2 +- .../src/fungibles/precompiles/erc20/v0.rs | 21 +++--- .../api-vnext/src/fungibles/precompiles/v0.rs | 67 ++++++++++--------- pallets/api-vnext/src/lib.rs | 48 ++++++++++--- 5 files changed, 89 insertions(+), 56 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles.rs b/pallets/api-vnext/src/fungibles/precompiles.rs index 2ce954f78..baa84bf2e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles.rs +++ b/pallets/api-vnext/src/fungibles/precompiles.rs @@ -1,13 +1,10 @@ use alloc::string::String; pub(super) use pallet_revive::precompiles::alloy::{ - primitives::{ - ruint::{UintTryFrom, UintTryTo}, - Address, U256, - }, + primitives::{Address, U256}, sol_types::SolCall, }; -use pallet_revive::precompiles::RuntimeCosts; +use pallet_revive::precompiles::{Error, RuntimeCosts}; use weights::WeightInfo; use super::*; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 43e23df9a..20bf9325c 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,4 +1,4 @@ -use super::{SolCall, UintTryFrom, UintTryTo, U256}; +use super::{SolCall, U256}; /// The first version of the Erc20 API. pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index 80180b153..f93554dfe 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -15,13 +15,16 @@ pub struct Erc20(PhantomData<(T, I)>); impl< const PREFIX: u16, T: frame_system::Config - + pallet_assets::Config - + pallet_revive::Config + + pallet_assets::Config< + I, + AssetId: AtLeast32Bit, + Balance: TryConvert, + > + pallet_revive::Config + Config, I: 'static, > Precompile for Erc20 where - U256: UintTryFrom + UintTryTo, + U256: TryConvert<>::Balance, Error = Error>, { type Interface = IERC20Calls; type T = T; @@ -42,7 +45,7 @@ where IERC20Calls::totalSupply(_) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = U256::saturating_from(total_supply::(token)); + let total_supply = total_supply::(token).try_convert()?; Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, @@ -50,7 +53,7 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*account.0).into()); - let balance = U256::saturating_from(balance::(token, &account)); + let balance = balance::(token, &account).try_convert()?; Ok(balanceOfCall::abi_encode_returns(&balance)) }, @@ -62,7 +65,7 @@ where to_runtime_origin(env.caller()), token, env.to_account_id(&(*to.0).into()), - value.saturating_to(), + (*value).try_convert()?, )?; deposit_event(env, Transfer { from, to: *to, value: *value })?; @@ -73,7 +76,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); - let remaining = U256::saturating_from(allowance::(token, &owner, &spender)); + let remaining = allowance::(token, &owner, &spender).try_convert()?; Ok(allowanceCall::abi_encode_returns(&remaining)) }, @@ -85,7 +88,7 @@ where to_runtime_origin(env.caller()), token, env.to_account_id(&(*spender.0).into()), - value.saturating_to(), + (*value).try_convert()?, ) { Ok(result) => { // Adjust weight @@ -119,7 +122,7 @@ where token, env.to_account_id(&(*from.0).into()), env.to_account_id(&(*to.0).into()), - value.saturating_to(), + (*value).try_convert()?, )?; deposit_event(env, Transfer { from: *from, to: *to, value: *value })?; diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 15ef1515d..b6a16eaee 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -11,14 +11,16 @@ pub struct Fungibles(PhantomData<(T, I)>); impl< const FIXED: u16, T: frame_system::Config - + pallet_assets::Config + Into> - + pallet_revive::Config + + pallet_assets::Config< + I, + AssetId: Default + From + Into, + Balance: TryConvert, + > + pallet_revive::Config + Config, I: 'static, > Precompile for Fungibles where - U256: UintTryFrom<>::Balance> - + UintTryTo<>::Balance>, + U256: TryConvert<>::Balance, Error = Error>, { type Interface = IFungiblesCalls; type T = T; @@ -41,7 +43,7 @@ where to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*to.0).into()), - value.saturating_to(), + (*value).try_convert()?, )?; deposit_event(env, Transfer { token: *token, from, to: *to, value: *value })?; @@ -55,7 +57,7 @@ where (*token).into(), env.to_account_id(&(*from.0).into()), env.to_account_id(&(*to.0).into()), - value.saturating_to(), + (*value).try_convert()?, )?; let event = Transfer { token: *token, from: *from, to: *to, value: *value }; @@ -70,7 +72,7 @@ where to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), - value.saturating_to(), + (*value).try_convert()?, ) { Ok(result) => { // Adjust weight @@ -101,24 +103,23 @@ where let charged = env.charge(>::WeightInfo::approve(1, 0))?; let owner = >::to_address(env.caller().account_id()?).0.into(); - let value = U256::saturating_from( - increase_allowance::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*spender.0).into()), - value.saturating_to(), - ) - .map_err(|e| { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - e.error - })?, - ); + let value = increase_allowance::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), + (*value).try_convert()?, + ) + .map_err(|e| { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + e.error + })? + .try_convert()?; let spender = *spender; deposit_event(env, Approval { token: *token, owner, spender, value })?; @@ -132,7 +133,7 @@ where to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*spender.0).into()), - value.saturating_to(), + (*value).try_convert()?, ) { Ok((value, weight)) => { // Adjust weight @@ -142,7 +143,7 @@ where env.gas_meter_mut() .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } - U256::saturating_from(value) + value.try_convert()? }, Err(e) => { // Adjust weight @@ -167,7 +168,7 @@ where let id = create::( to_runtime_origin(env.caller()), env.to_account_id(&(*admin.0).into()), - minBalance.saturating_to(), + (*minBalance).try_convert()?, )? .into(); @@ -208,7 +209,7 @@ where to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*account.0).into()), - value.saturating_to(), + (*value).try_convert()?, )?; let from = Address::default(); @@ -223,7 +224,7 @@ where to_runtime_origin(env.caller()), (*token).into(), env.to_account_id(&(*account.0).into()), - value.saturating_to(), + (*value).try_convert()?, ) .map_err(|e| { // Adjust weight @@ -244,7 +245,7 @@ where IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = U256::saturating_from(total_supply::((*token).into())); + let total_supply = total_supply::((*token).into()).try_convert()?; Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, @@ -252,7 +253,7 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*owner.0).into()); - let balance = U256::saturating_from(balance::((*token).into(), &account)); + let balance = balance::((*token).into(), &account).try_convert()?; Ok(balanceOfCall::abi_encode_returns(&balance)) }, @@ -262,7 +263,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let allowance = allowance::((*token).into(), &owner, &spender); - let remaining = U256::saturating_from(allowance); + let remaining = allowance.try_convert()?; Ok(allowanceCall::abi_encode_returns(&remaining)) }, diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 6d8b8621a..9e38490ca 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -5,24 +5,29 @@ extern crate alloc; use alloc::vec::Vec; use core::{convert::Into, marker::PhantomData, num::NonZero}; -use frame_support::{dispatch::RawOrigin, sp_runtime::traits::StaticLookup}; +use frame_support::{ + dispatch::RawOrigin, + pallet_prelude::DispatchError, + sp_runtime::{traits::StaticLookup, ArithmeticError}, +}; #[cfg(any(test, feature = "runtime-benchmarks"))] use pallet_revive::precompiles::alloy::sol_types::{SolType, SolValue}; use pallet_revive::{ precompiles::{ - alloy::{primitives::IntoLogData, sol, sol_types::SolEvent}, + alloy::{ + primitives::{self as alloy, IntoLogData}, + sol, + sol_types::SolEvent, + }, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, Origin, H160, H256, U256, + AddressMapper as _, Origin, H256, U256, }; #[cfg(test)] use { - frame_support::{ - pallet_prelude::{DispatchError, Weight}, - sp_runtime::traits::Bounded, - }, + frame_support::{pallet_prelude::Weight, sp_runtime::traits::Bounded}, frame_system::pallet_prelude::OriginFor, - pallet_revive::{BalanceOf, DepositLimit, MomentOf}, + pallet_revive::{BalanceOf, DepositLimit, MomentOf, H160}, }; #[cfg(feature = "fungibles")] @@ -150,3 +155,30 @@ pub fn to_runtime_origin(o: Origin) -> T::RuntimeOr Origin::Signed(account) => RawOrigin::Signed(account).into(), } } + +/// Extension trait for ergonomic conversion between types. +pub trait TryConvert { + /// The type returned in the event of a conversion error. + type Error; + + /// Attempt to convert to target type. + fn try_convert(self) -> Result; +} + +impl TryConvert for u128 { + type Error = Error; + + fn try_convert(self) -> Result { + self.try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow).into()) + } +} + +impl> TryConvert for alloy::U256 { + type Error = Error; + + fn try_convert(self) -> Result { + self.try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow).into()) + } +} From 1f9d00eb7df117ed916e2fb7b206707114e58955 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 16:17:30 +0100 Subject: [PATCH 160/284] refactor(pallets/api): relocate benchmarking call setup and resolve issues --- .../api-vnext/src/fungibles/benchmarking.rs | 39 ++++++------------- pallets/api-vnext/src/lib.rs | 19 +++++++++ 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index 73bbcddeb..e40b65033 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -23,18 +23,16 @@ use pallet_assets::{Asset, AssetStatus}; use pallet_revive::{ precompiles::{ alloy::primitives as alloy, - run::{CallSetup, WasmModule, H256, U256}, + run::{H256, U256}, + Error, }, test_utils::{ALICE_ADDR, BOB_ADDR, CHARLIE_ADDR}, AddressMapper as _, Origin, }; use super::{ - precompiles::{ - v0::{IFungibles, IFungiblesCalls}, - UintTryFrom, UintTryTo, - }, - Config, NextAssetId, Pallet, + precompiles::v0::{IFungibles, IFungiblesCalls}, + set_up_call, Config, NextAssetId, Pallet, TryConvert, }; #[cfg(test)] use crate::mock::{ExtBuilder, Test}; @@ -60,8 +58,8 @@ type TokenId = >::AssetId; Time: Time> >, // Fungibles - T: pallet_assets::Config + Into + Copy>, - alloy::U256: UintTryFrom> + UintTryTo> + T: pallet_assets::Config + Into + Copy, Balance: TryConvert>, + alloy::U256: TryConvert, Error = Error> )] mod benchmarks { use super::*; @@ -79,7 +77,7 @@ mod benchmarks { let input = IFungiblesCalls::transfer(IFungibles::transferCall { token: token.into(), to: >::to_address(&to).0.into(), - value: alloy::U256::from(value), + value: value.try_convert().unwrap(), }); >::set_balance(token, &owner, value); @@ -110,7 +108,7 @@ mod benchmarks { token: token.into(), from: >::to_address(&owner).0.into(), to: >::to_address(&to).0.into(), - value: alloy::U256::from(value), + value: value.try_convert().unwrap(), }); >::set_balance(token, &owner, value); @@ -166,7 +164,7 @@ mod benchmarks { let input = IFungiblesCalls::approve(IFungibles::approveCall { token: token.into(), spender: >::to_address(&spender).0.into(), - value: alloy::U256::from(approval_value), + value: approval_value.try_convert().unwrap(), }); #[block] @@ -217,7 +215,7 @@ mod benchmarks { let mut ext = call_setup.ext().0; let input = IFungiblesCalls::create(IFungibles::createCall { admin: admin.0.into(), - minBalance: alloy::U256::from(min_balance), + minBalance: min_balance.try_convert().unwrap(), }); #[block] @@ -310,7 +308,7 @@ mod benchmarks { let input = IFungiblesCalls::mint(IFungibles::mintCall { token: token.into(), account: >::to_address(&account).0.into(), - value: alloy::U256::from(value), + value: value.try_convert().unwrap(), }); #[block] @@ -334,7 +332,7 @@ mod benchmarks { let input = IFungiblesCalls::burn(IFungibles::burnCall { token: token.into(), account: >::to_address(&account).0.into(), - value: alloy::U256::from(value), + value: value.try_convert().unwrap(), }); >::set_balance(token, &account, value); @@ -484,16 +482,3 @@ fn create< token } - -fn set_up_call< - T: pallet_revive::Config< - Currency: Inspect< - ::AccountId, - Balance: Into + TryFrom, - >, - Hash: IsType, - Time: Time>, - >, ->() -> CallSetup { - CallSetup::::new(WasmModule::dummy()) -} diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 9e38490ca..c72405f5b 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -23,6 +23,11 @@ use pallet_revive::{ }, AddressMapper as _, Origin, H256, U256, }; +#[cfg(feature = "runtime-benchmarks")] +use { + frame_support::{pallet_prelude::IsType, traits::fungible::Inspect}, + pallet_revive::precompiles::run::{CallSetup, WasmModule}, +}; #[cfg(test)] use { frame_support::{pallet_prelude::Weight, sp_runtime::traits::Bounded}, @@ -138,6 +143,20 @@ fn prefixed_address(n: u16, prefix: u32) -> [u8; 20] { address } +#[cfg(feature = "runtime-benchmarks")] +fn set_up_call< + T: pallet_revive::Config< + Currency: Inspect< + ::AccountId, + Balance: Into + TryFrom, + >, + Hash: IsType, + Time: frame_support::traits::Time>, + >, +>() -> CallSetup { + CallSetup::::new(WasmModule::dummy()) +} + #[cfg(test)] fn to_address(account: &::AccountId) -> H160 { pallet_revive::AccountId32Mapper::::to_address(account) From cee5279045b9e4ec77a75279802f1e7c19e92f6e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 19:07:15 +0100 Subject: [PATCH 161/284] refactor(api): update ink, eliminating manual encoding/decoding --- pop-api-vnext/Cargo.lock | 26 +- pop-api-vnext/Cargo.toml | 4 +- pop-api-vnext/examples/fungibles/Cargo.toml | 2 +- pop-api-vnext/examples/fungibles/lib.rs | 134 +++++----- .../contracts/fungibles/Cargo.lock | 26 +- .../contracts/fungibles/Cargo.toml | 2 +- .../contracts/fungibles/lib.rs | 102 ++++---- pop-api-vnext/src/fungibles/erc20.rs | 5 +- pop-api-vnext/src/fungibles/erc20/v0.rs | 14 +- .../src/fungibles/erc20/v0/errors.rs | 197 +-------------- pop-api-vnext/src/fungibles/v0.rs | 54 ++-- pop-api-vnext/src/fungibles/v0/errors.rs | 231 +----------------- pop-api-vnext/src/sol.rs | 6 +- 13 files changed, 201 insertions(+), 602 deletions(-) diff --git a/pop-api-vnext/Cargo.lock b/pop-api-vnext/Cargo.lock index d024ae0fb..2cd2e5985 100644 --- a/pop-api-vnext/Cargo.lock +++ b/pop-api-vnext/Cargo.lock @@ -2345,7 +2345,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "const_format", "deranged", @@ -2370,7 +2370,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "cfg-if", ] @@ -2378,7 +2378,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2400,7 +2400,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2417,7 +2417,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "cfg-if", @@ -2450,7 +2450,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "either", @@ -2466,7 +2466,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "ink_codegen", "ink_ir", @@ -2481,7 +2481,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2496,7 +2496,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "cfg-if", ] @@ -2504,7 +2504,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "alloy-sol-types 1.2.1", "cfg-if", @@ -2525,13 +2525,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime-interface", + "sp-weights", "xxhash-rust", ] [[package]] name = "ink_storage" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "array-init", "cfg-if", @@ -2549,7 +2550,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-abi#3ac568305e0f0e872cc772933a487ecf640d7950" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "ink_metadata", "ink_prelude", @@ -3538,6 +3539,7 @@ dependencies = [ "hex", "ink", "pop-primitives", + "scale-info", ] [[package]] diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index c6c5cbcd8..f9509eb3e 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -6,12 +6,12 @@ name = "pop-api" version = "0.1.0" [dependencies] -alloy-sol-types = { version = "1.0.0", default-features = false } # Required until ink implements sol error support -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] hex = { version = "0.4.3" } +scale-info = { version = "2" } [lib] crate-type = [ "rlib" ] diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index e70a97772..9f89d7e4e 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 6e9a49fd9..2dba18ff2 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -2,6 +2,7 @@ use ink::{prelude::string::String, U256}; use pop_api::{ + ensure, fungibles::{ self as api, erc20::{extensions::Erc20Metadata, Erc20}, @@ -37,14 +38,16 @@ pub mod fungibles { // inactive balances from bloating the blockchain state and slowing down the network. #[ink(constructor, payable)] #[allow(clippy::new_without_default)] - pub fn new(name: String, symbol: String, min_balance: U256, decimals: u8) -> Self { + pub fn new( + name: String, + symbol: String, + min_balance: U256, + decimals: u8, + ) -> Result { let mut instance = Self { id: 0, owner: Self::env().caller() }; - match api::create(instance.env().address(), min_balance) { - Ok(id) => instance.id = id, - Err(error) => revert(&error), - } + instance.id = api::create(instance.env().address(), min_balance)?; api::set_metadata(instance.id, name, symbol, decimals); - instance + Ok(instance) } /// Creates `value` amount of tokens and assigns them to `account`, increasing the total @@ -54,16 +57,11 @@ pub mod fungibles { /// - `account` - The account to be credited with the created tokens. /// - `value` - The number of tokens to mint. #[ink(message)] - pub fn mint(&mut self, account: Address, value: U256) { - if let Err(error) = self.ensure_owner() { - // TODO: Workaround until ink supports Error to Solidity custom error conversion; https://github.com/use-ink/ink/issues/2404 - revert(&error) - } - - if let Err(error) = api::mint(self.id, account, value) { - revert(&error) - } + pub fn mint(&mut self, account: Address, value: U256) -> Result<(), Error> { + self.ensure_owner()?; + api::mint(self.id, account, value)?; self.env().emit_event(Transfer { from: Address::zero(), to: account, value }); + Ok(()) } /// Increases the allowance of `spender` by `value` amount of tokens. @@ -72,21 +70,16 @@ pub mod fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to increase the allowance by. #[ink(message)] - pub fn increase_allowance(&mut self, spender: Address, value: U256) { - if let Err(e) = self.ensure_owner() { - revert(&e) - } + pub fn increase_allowance(&mut self, spender: Address, value: U256) -> Result<(), Error> { + self.ensure_owner()?; let contract = self.env().address(); // Validate recipient. - if spender == contract { - revert(&InvalidRecipient(spender)) - } - if let Err(error) = api::increase_allowance(self.id, spender, value) { - revert(&error) - } + ensure!(spender != contract, InvalidRecipient(spender)); + api::increase_allowance(self.id, spender, value)?; let allowance = self.allowance(contract, spender); self.env().emit_event(Approval { owner: contract, spender, value: allowance }); + Ok(()) } /// Decreases the allowance of `spender` by `value` amount of tokens. @@ -95,21 +88,16 @@ pub mod fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to decrease the allowance by. #[ink(message)] - pub fn decrease_allowance(&mut self, spender: Address, value: U256) { - if let Err(e) = self.ensure_owner() { - revert(&e) - } + pub fn decrease_allowance(&mut self, spender: Address, value: U256) -> Result<(), Error> { + self.ensure_owner()?; let contract = self.env().address(); // Validate recipient. - if spender == contract { - revert(&InvalidRecipient(spender)) - } - if let Err(error) = api::decrease_allowance(self.id, spender, value) { - revert(&error) - } + ensure!(spender != contract, InvalidRecipient(spender)); + api::decrease_allowance(self.id, spender, value)?; let value = self.allowance(contract, spender); self.env().emit_event(Approval { owner: contract, spender, value }); + Ok(()) } /// Destroys `value` amount of tokens from `account`, reducing the total supply. @@ -118,15 +106,11 @@ pub mod fungibles { /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] - pub fn burn(&mut self, account: Address, value: U256) { - if let Err(e) = self.ensure_owner() { - revert(&e) - } - - if let Err(error) = api::burn(self.id, account, value) { - revert(&error) - } + pub fn burn(&mut self, account: Address, value: U256) -> Result<(), Error> { + self.ensure_owner()?; + api::burn(self.id, account, value)?; self.env().emit_event(Transfer { from: account, to: Address::zero(), value }); + Ok(()) } /// Transfer the ownership of the contract to another account. @@ -137,18 +121,15 @@ pub mod fungibles { /// NOTE: the specified owner account is not checked, allowing the zero address to be /// specified if desired.. #[ink(message)] - pub fn transfer_ownership(&mut self, owner: Address) { - if let Err(e) = self.ensure_owner() { - revert(&e) - } + pub fn transfer_ownership(&mut self, owner: Address) -> Result<(), Error> { + self.ensure_owner()?; self.owner = owner; + Ok(()) } /// Check if the caller is the owner of the contract. - fn ensure_owner(&self) -> Result<(), NoPermission> { - if self.owner != self.env().caller() { - return Err(NoPermission); - } + fn ensure_owner(&self) -> Result<(), Error> { + ensure!(self.env().caller() == self.owner, NoPermission); Ok(()) } } @@ -157,7 +138,7 @@ pub mod fungibles { /// Returns the total token supply. #[ink(message)] fn totalSupply(&self) -> U256 { - api::total_supply(self.id) + erc20::total_supply(self.id) } /// Returns the account balance for the specified `owner`. @@ -166,7 +147,7 @@ pub mod fungibles { /// - `owner` - The account whose balance is being queried. #[ink(message)] fn balanceOf(&self, owner: Address) -> U256 { - api::balance_of(self.id, owner) + erc20::balance_of(self.id, owner) } /// Returns the allowance for a `spender` approved by an `owner`. @@ -176,7 +157,7 @@ pub mod fungibles { /// - `spender` - The account that is allowed to spend the tokens. #[ink(message)] fn allowance(&self, owner: Address, spender: Address) -> U256 { - api::allowance(self.id, owner, spender) + erc20::allowance(self.id, owner, spender) } /// Transfers `value` amount of tokens from the contract to account `to` with @@ -186,7 +167,7 @@ pub mod fungibles { /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] - fn transfer(&mut self, to: Address, value: U256) -> bool { + fn transfer(&mut self, to: Address, value: U256) -> Result { if let Err(error) = self.ensure_owner() { revert(&error) } @@ -197,11 +178,9 @@ pub mod fungibles { revert(&InvalidRecipient(to)) } - if let Err(error) = api::transfer(self.id, to, value) { - revert(&error) - } + erc20::transfer(self.id, to, value)?; self.env().emit_event(Transfer { from: contract, to, value }); - true + Ok(true) } /// Transfers `value` tokens on behalf of `from` to the account `to`. Contract must be @@ -212,24 +191,27 @@ pub mod fungibles { /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] - fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool { - if let Err(e) = self.ensure_owner() { - revert(&e) + fn transferFrom( + &mut self, + from: Address, + to: Address, + value: U256, + ) -> Result { + if let Err(error) = self.ensure_owner() { + revert(&error) } let contract = self.env().address(); // A successful transfer reduces the allowance from `from` to the contract and triggers // an `Approval` event with the updated allowance amount. - if let Err(error) = api::transfer_from(self.id, from, to, value) { - revert(&error) - } + erc20::transfer_from(self.id, from, to, value)?; self.env().emit_event(Transfer { from: contract, to, value }); self.env().emit_event(Approval { owner: from, spender: contract, value: self.allowance(from, contract), }); - true + Ok(true) } /// Approves `spender` to spend `value` amount of tokens on behalf of the contract. @@ -240,21 +222,19 @@ pub mod fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to approve. #[ink(message)] - fn approve(&mut self, spender: Address, value: U256) -> bool { - if let Err(e) = self.ensure_owner() { - revert(&e) + fn approve(&mut self, spender: Address, value: U256) -> Result { + if let Err(error) = self.ensure_owner() { + revert(&error) } let contract = self.env().address(); // Validate recipient. if spender == contract { - revert(&InvalidRecipient(spender)) - } - if let Err(error) = api::approve(self.id, spender, value) { - revert(&error) + revert(&InvalidRecipient(spender)); } + erc20::approve(self.id, spender, value)?; self.env().emit_event(Approval { owner: contract, spender, value }); - true + Ok(true) } } @@ -262,19 +242,19 @@ pub mod fungibles { /// Returns the token name. #[ink(message)] fn name(&self) -> String { - api::name(self.id) + erc20::extensions::name(self.id) } /// Returns the token symbol. #[ink(message)] fn symbol(&self) -> String { - api::symbol(self.id) + erc20::extensions::symbol(self.id) } /// Returns the token decimals. #[ink(message)] fn decimals(&self) -> u8 { - api::decimals(self.id) + erc20::extensions::decimals(self.id) } } } diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index 5b6f22299..639d242b3 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -2354,7 +2354,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "const_format", "deranged", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "cfg-if", ] @@ -2387,7 +2387,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2409,7 +2409,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2426,7 +2426,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "cfg-if", @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "blake2", "either", @@ -2475,7 +2475,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "ink_codegen", "ink_ir", @@ -2490,7 +2490,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "cfg-if", ] @@ -2513,7 +2513,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "alloy-sol-types 1.2.1", "cfg-if", @@ -2534,13 +2534,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime-interface", + "sp-weights", "xxhash-rust", ] [[package]] name = "ink_storage" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "array-init", "cfg-if", @@ -2558,7 +2559,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Fsol-ctor#cf61cb8296ca6a6f33c05311a2387d8f3074f4b1" +source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" dependencies = [ "ink_metadata", "ink_prelude", @@ -3543,7 +3544,6 @@ dependencies = [ name = "pop-api" version = "0.1.0" dependencies = [ - "alloy-sol-types 1.2.1", "ink", "pop-primitives", ] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index 3008d59d8..ab09c3088 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/sol-ctor", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 358d4b924..149530b78 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -6,8 +6,6 @@ use pop_api::fungibles::{self as api, *}; #[ink::contract] pub mod fungibles { - use pop_api::revert; - use super::*; #[ink(storage)] @@ -21,78 +19,74 @@ pub mod fungibles { } #[ink(constructor, payable)] - pub fn create(min_balance: U256) -> Self { + pub fn create(min_balance: U256) -> Result { let contract = Self {}; // Account of the contract which will be set to the owner of the fungible token. let owner = contract.env().address(); - match api::create(owner, min_balance) { - Ok(id) => { - contract.env().emit_event(Created { - id, - creator: contract.env().caller(), - admin: owner, - }); - contract - }, - Err(error) => revert(&error), - } + let id = api::create(owner, min_balance)?; + contract.env().emit_event(Created { + id, + creator: contract.env().caller(), + admin: owner, + }); + Ok(contract) } } impl Fungibles for Fungible { #[ink(message)] - fn transfer(&self, token: TokenId, to: Address, value: U256) { - if let Err(error) = api::transfer(token, to, value) { - revert(&error) - } + fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error> { + api::transfer(token, to, value)?; self.env().emit_event(Transfer { from: self.env().address(), to, value }); + Ok(()) } #[ink(message)] - fn transferFrom(&self, token: TokenId, from: Address, to: Address, value: U256) { - if let Err(error) = api::transfer_from(token, from, to, value) { - revert(&error) - } + fn transferFrom( + &self, + token: TokenId, + from: Address, + to: Address, + value: U256, + ) -> Result<(), Error> { + api::transfer_from(token, from, to, value)?; self.env().emit_event(Transfer { from, to, value }); + Ok(()) } #[ink(message)] - fn approve(&self, token: TokenId, spender: Address, value: U256) { - if let Err(error) = api::approve(token, spender, value) { - revert(&error) - } + fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error> { + api::approve(token, spender, value)?; self.env().emit_event(Approval { owner: self.env().address(), spender, value }); + Ok(()) } #[ink(message)] - fn increaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256 { - match api::increase_allowance(token, spender, value) { - Ok(allowance) => allowance, - Err(error) => revert(&error), - } + fn increaseAllowance( + &self, + token: TokenId, + spender: Address, + value: U256, + ) -> Result { + api::increase_allowance(token, spender, value) } #[ink(message)] - fn decreaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256 { - match api::decrease_allowance(token, spender, value) { - Ok(allowance) => allowance, - Err(error) => revert(&error), - } + fn decreaseAllowance( + &self, + token: TokenId, + spender: Address, + value: U256, + ) -> Result { + api::decrease_allowance(token, spender, value) } #[ink(message)] - fn create(&self, admin: Address, min_balance: U256) -> TokenId { - match api::create(admin, min_balance) { - Ok(token) => { - self.env().emit_event(Created { - id: token, - creator: self.env().address(), - admin, - }); - token - }, - Err(error) => revert(&error), - } + fn create(&self, admin: Address, min_balance: U256) -> Result { + let token = api::create(admin, min_balance)?; + self.env() + .emit_event(Created { id: token, creator: self.env().address(), admin }); + Ok(token) } #[ink(message)] @@ -114,17 +108,13 @@ pub mod fungibles { } #[ink(message)] - fn mint(&self, token: TokenId, account: Address, value: U256) { - if let Err(error) = api::mint(token, account, value) { - revert(&error) - } + fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + api::mint(token, account, value) } #[ink(message)] - fn burn(&self, token: TokenId, account: Address, value: U256) { - if let Err(error) = api::burn(token, account, value) { - revert(&error) - } + fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + api::burn(token, account, value) } #[ink(message)] diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index 0fba7fa41..12ba1148d 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -1,9 +1,6 @@ pub use v0::*; -use super::{ - contract_ref, prefixed_address, Address, Pop, Sol, SolAddress, SolEncode, SolError, SolType, - SolTypeEncode, String, TokenId, Uint, Vec, U256, -}; +use super::{contract_ref, prefixed_address, Address, Pop, Sol, String, TokenId, U256}; use crate::ensure; /// The first version of the Erc20 API. diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index b7255d9a2..964bd981a 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -1,4 +1,4 @@ -pub use errors::*; +pub use errors::{Error, Error::*}; pub use events::*; use super::*; @@ -29,7 +29,7 @@ pub trait Erc20 { /// /// Emits a [`Transfer`] event. #[ink(message)] - fn transfer(&mut self, to: Address, value: U256) -> bool; + fn transfer(&mut self, to: Address, value: U256) -> Result; /// Returns the remaining number of tokens that `spender` will be allowed to spend /// on behalf of `owner` through [`transfer_from`]. This is zero by default. @@ -45,7 +45,7 @@ pub trait Erc20 { /// /// Emits an [`Approval`] event. #[ink(message)] - fn approve(&mut self, spender: Address, value: U256) -> bool; + fn approve(&mut self, spender: Address, value: U256) -> Result; /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. /// `value` is then deducted from the caller's allowance. @@ -55,7 +55,7 @@ pub trait Erc20 { /// Emits a [`Transfer`] event. #[ink(message)] #[allow(non_snake_case)] - fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> bool; + fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> Result; } /// Returns the value of tokens in existence. @@ -86,7 +86,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result let address = prefixed_address(PRECOMPILE, token); let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); - Ok(precompile.transfer(to, value)) + precompile.transfer(to, value) } /// Returns the remaining number of tokens that `spender` will be allowed to spend @@ -113,7 +113,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result SolEncode<'a> for Error { +impl<'a> ink::SolEncode<'a> for Error { type SolType = (); fn encode(&'a self) -> Vec { - use Error::*; - match self { - InsufficientAllowance(e) => e.abi_encode(), - InsufficientBalance(e) => e.abi_encode(), - InsufficientValue(e) => e.abi_encode(), - InvalidApprover(e) => e.abi_encode(), - InvalidReceiver(e) => e.abi_encode(), - InvalidSender(e) => e.abi_encode(), - } + SolErrorEncode::encode(self) } fn to_sol_type(&'a self) -> Self::SolType { @@ -36,176 +29,6 @@ impl<'a> SolEncode<'a> for Error { } } -/// Indicates a failure with the `spender`’s `allowance`. -pub struct ERC20InsufficientAllowance(pub Address, pub U256, pub U256); -impl SolError for ERC20InsufficientAllowance { - type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [251, 143, 65, 178]; - const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self( - Address::from(*tuple.0 .0), - U256::from_little_endian(tuple.1.as_le_slice()), - U256::from_little_endian(tuple.2.as_le_slice()), - ) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - self.0.to_sol_type().tokenize(), - self.1.to_sol_type().tokenize(), - self.2.to_sol_type().tokenize(), - ) - } -} - -/// Indicates an error related to the current `balance` of a `sender`. -pub struct ERC20InsufficientBalance(pub Address, pub U256, pub U256); -impl SolError for ERC20InsufficientBalance { - type Parameters<'a> = (SolAddress, Uint<256>, Uint<256>); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [228, 80, 211, 140]; - const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self( - Address::from(*tuple.0 .0), - U256::from_little_endian(tuple.1.as_le_slice()), - U256::from_little_endian(tuple.2.as_le_slice()), - ) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - self.0.to_sol_type().tokenize(), - self.1.to_sol_type().tokenize(), - self.2.to_sol_type().tokenize(), - ) - } -} - -/// Indicates an error related to a specified `value`. -pub struct ERC20InsufficientValue; -impl SolError for ERC20InsufficientValue { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [191, 254, 152, 173]; - const SIGNATURE: &'static str = "ERC20InsufficientValue()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: ERC20InsufficientValue) -> Self { - Self::InsufficientValue(value) - } -} - -/// Indicates a failure with the `approver` of a token to be approved. -pub struct ERC20InvalidApprover(pub Address); -impl SolError for ERC20InvalidApprover { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [230, 2, 223, 5]; - const SIGNATURE: &'static str = "ERC20InvalidApprover(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } -} -impl From for Error { - fn from(value: ERC20InvalidApprover) -> Self { - Self::InvalidApprover(value) - } -} - -/// Indicates a failure with the token `sender`. -pub struct ERC20InvalidSender(pub Address); -impl SolError for ERC20InvalidSender { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [150, 198, 253, 30]; - const SIGNATURE: &'static str = "ERC20InvalidSender(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } -} -impl From for Error { - fn from(value: ERC20InvalidSender) -> Self { - Self::InvalidSender(value) - } -} - -/// Indicates a failure with the token `receiver`. -pub struct ERC20InvalidReceiver(pub Address); -impl SolError for ERC20InvalidReceiver { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8]; - const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self((*tuple.0 .0).into()) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } -} - -impl<'a> SolEncode<'a> for ERC20InvalidReceiver { - type SolType = (&'a Address,); - - #[inline] - fn encode(&'a self) -> Vec { - self.abi_encode() - } - - #[inline] - fn to_sol_type(&'a self) -> Self::SolType { - (&self.0,) - } -} -impl From for Error { - fn from(value: ERC20InvalidReceiver) -> Self { - Self::InvalidReceiver(value) - } -} - #[test] fn error_encoding_works() { for (result, expected) in [ diff --git a/pop-api-vnext/src/fungibles/v0.rs b/pop-api-vnext/src/fungibles/v0.rs index 3247d026e..a94f77fd7 100644 --- a/pop-api-vnext/src/fungibles/v0.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -1,9 +1,9 @@ -pub use errors::*; +pub use errors::{Error, Error::*}; pub use events::*; use super::{ - contract_ref, ensure, erc20::v0 as erc20, fixed_address, Address, Pop, Sol, SolAddress, - SolEncode, SolError, SolType, SolTypeEncode, String, TokenId, Vec, U256, + contract_ref, ensure, erc20::v0 as erc20, fixed_address, Address, Pop, Sol, String, TokenId, + Vec, U256, }; mod errors; @@ -24,7 +24,7 @@ pub trait Fungibles { /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] - fn transfer(&self, token: TokenId, to: Address, value: U256); + fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error>; /// Transfers `value` amount tokens on behalf of `from` to account `to`. /// @@ -35,7 +35,13 @@ pub trait Fungibles { /// - `value` - The number of tokens to transfer. #[ink(message)] #[allow(non_snake_case)] - fn transferFrom(&self, token: TokenId, from: Address, to: Address, value: U256); + fn transferFrom( + &self, + token: TokenId, + from: Address, + to: Address, + value: U256, + ) -> Result<(), Error>; /// Approves `spender` to spend `value` amount of tokens on behalf of the caller. /// @@ -44,7 +50,7 @@ pub trait Fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to approve. #[ink(message)] - fn approve(&self, token: TokenId, spender: Address, value: U256); + fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error>; /// Increases the allowance of `spender` by `value` amount of tokens. /// @@ -54,7 +60,12 @@ pub trait Fungibles { /// - `value` - The number of tokens to increase the allowance by. #[ink(message)] #[allow(non_snake_case)] - fn increaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256; + fn increaseAllowance( + &self, + token: TokenId, + spender: Address, + value: U256, + ) -> Result; /// Decreases the allowance of `spender` by `value` amount of tokens. /// @@ -64,7 +75,12 @@ pub trait Fungibles { /// - `value` - The number of tokens to decrease the allowance by. #[ink(message)] #[allow(non_snake_case)] - fn decreaseAllowance(&self, token: TokenId, spender: Address, value: U256) -> U256; + fn decreaseAllowance( + &self, + token: TokenId, + spender: Address, + value: U256, + ) -> Result; /// Create a new token with an automatically generated identifier. /// @@ -74,7 +90,7 @@ pub trait Fungibles { /// /// NOTE: The minimum balance must be non-zero. #[ink(message)] - fn create(&self, admin: Address, min_balance: U256) -> TokenId; + fn create(&self, admin: Address, min_balance: U256) -> Result; /// Start the process of destroying a token. /// @@ -111,7 +127,7 @@ pub trait Fungibles { /// - `account` - The account to be credited with the created tokens. /// - `value` - The number of tokens to mint. #[ink(message)] - fn mint(&self, token: TokenId, account: Address, value: U256); + fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Destroys `value` amount of tokens from `account`, reducing the total supply. /// @@ -120,7 +136,7 @@ pub trait Fungibles { /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] - fn burn(&self, token: TokenId, account: Address, value: U256); + fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Total token supply for a specified token. /// @@ -203,7 +219,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.approve(token, spender, value)) + precompile.approve(token, spender, value) } /// Account balance for a specified `token` and `owner`. @@ -231,7 +247,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.burn(token, account, value)) + precompile.burn(token, account, value) } /// Clear the metadata for a token. @@ -259,7 +275,7 @@ pub fn create(admin: Address, min_balance: U256) -> Result { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.create(admin, min_balance)) + precompile.create(admin, min_balance) } /// Decimals for the specified token. @@ -285,7 +301,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.decreaseAllowance(token, spender, value)) + precompile.decreaseAllowance(token, spender, value) } /// Whether the specified token exists. @@ -311,7 +327,7 @@ pub fn increase_allowance(token: TokenId, spender: Address, value: U256) -> Resu let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.increaseAllowance(token, spender, value)) + precompile.increaseAllowance(token, spender, value) } /// Creates `value` amount of tokens and assigns them to `account`, increasing the total @@ -328,7 +344,7 @@ pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.mint(token, account, value)) + precompile.mint(token, account, value) } /// Name of the specified token. @@ -402,7 +418,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.transfer(token, to, value)) + precompile.transfer(token, to, value) } /// Transfers `value` amount tokens on behalf of `from` to account `to`. @@ -421,5 +437,5 @@ pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); - Ok(precompile.transferFrom(token, from, to, value)) + precompile.transferFrom(token, from, to, value) } diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index cafc0d3b1..5320cb908 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -1,242 +1,37 @@ +use ink::sol::SolErrorEncode; + use super::*; -// NOTE: subject to change based on ink!'s support for solidity custom errors. +#[derive(ink::SolErrorDecode, ink::SolErrorEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// The token recipient is invalid. - InvalidRecipient(InvalidRecipient), + InvalidRecipient(Address), /// The minimum balance should be non-zero. - MinBalanceZero(MinBalanceZero), + MinBalanceZero, /// The signing account has no permission to do the operation. - NoPermission(NoPermission), + NoPermission, /// The `admin` address cannot be the zero address. - ZeroAdminAddress(ZeroAdminAddress), + ZeroAdminAddress, /// The recipient cannot be the zero address. - ZeroRecipientAddress(ZeroRecipientAddress), + ZeroRecipientAddress, /// The sender cannot be the zero address. - ZeroSenderAddress(ZeroSenderAddress), + ZeroSenderAddress, /// The specified `value` cannot be zero. - ZeroValue(ZeroValue), -} - -impl<'a> SolEncode<'a> for Error { - type SolType = (); - - fn encode(&'a self) -> Vec { - use Error::*; - match self { - InvalidRecipient(e) => e.abi_encode(), - MinBalanceZero(e) => e.abi_encode(), - NoPermission(e) => e.abi_encode(), - ZeroAdminAddress(e) => e.abi_encode(), - ZeroRecipientAddress(e) => e.abi_encode(), - ZeroSenderAddress(e) => e.abi_encode(), - ZeroValue(e) => e.abi_encode(), - } - } - - fn to_sol_type(&'a self) -> Self::SolType { - () - } + ZeroValue, } -/// The token recipient is invalid. -pub struct InvalidRecipient(pub Address); -impl SolError for InvalidRecipient { - type Parameters<'a> = (SolAddress,); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [23, 133, 139, 190]; - const SIGNATURE: &'static str = "InvalidRecipient(address)"; - - #[inline] - fn new<'a>(tuple: as SolType>::RustType) -> Self { - Self(Address::from(*tuple.0 .0)) - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - (self.0.to_sol_type().tokenize(),) - } -} -impl<'a> SolEncode<'a> for InvalidRecipient { - type SolType = (&'a Address,); - - #[inline] - fn encode(&'a self) -> Vec { - self.abi_encode() - } - - #[inline] - fn to_sol_type(&'a self) -> Self::SolType { - (&self.0,) - } -} -impl From for Error { - fn from(value: InvalidRecipient) -> Self { - Self::InvalidRecipient(value) - } -} - -/// The minimum balance should be non-zero. -pub struct MinBalanceZero; -impl SolError for MinBalanceZero { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [95, 21, 97, 139]; - const SIGNATURE: &'static str = "MinBalanceZero()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: MinBalanceZero) -> Self { - Self::MinBalanceZero(value) - } -} - -/// The signing account has no permission to do the operation. -pub struct NoPermission; -impl SolError for NoPermission { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [157, 123, 54, 157]; - const SIGNATURE: &'static str = "NoPermission()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl<'a> SolEncode<'a> for NoPermission { +impl<'a> ink::SolEncode<'a> for Error { type SolType = (); fn encode(&'a self) -> Vec { - self.abi_encode() + SolErrorEncode::encode(self) } fn to_sol_type(&'a self) -> Self::SolType { () } } -impl From for Error { - fn from(value: NoPermission) -> Self { - Self::NoPermission(value) - } -} - -/// The `admin` address cannot be the zero address. -pub struct ZeroAdminAddress; -impl SolError for ZeroAdminAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [62, 243, 155, 129]; - const SIGNATURE: &'static str = "ZeroAdminAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: ZeroAdminAddress) -> Self { - Self::ZeroAdminAddress(value) - } -} - -/// The recipient cannot be the zero address. -pub struct ZeroRecipientAddress; -impl SolError for ZeroRecipientAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [206, 239, 152, 87]; - const SIGNATURE: &'static str = "ZeroRecipientAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: ZeroRecipientAddress) -> Self { - Self::ZeroRecipientAddress(value) - } -} - -/// The sender cannot be the zero address. -pub struct ZeroSenderAddress; -impl SolError for ZeroSenderAddress { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [255, 54, 43, 196]; - const SIGNATURE: &'static str = "ZeroSenderAddress()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: ZeroSenderAddress) -> Self { - Self::ZeroSenderAddress(value) - } -} - -/// The `value` should be non-zero. -pub struct ZeroValue; -impl SolError for ZeroValue { - type Parameters<'a> = (); - type Token<'a> = as SolType>::Token<'a>; - - const SELECTOR: [u8; 4] = [124, 148, 110, 215]; - const SIGNATURE: &'static str = "ZeroValue()"; - - #[inline] - fn new<'a>(_tuple: as SolType>::RustType) -> Self { - Self - } - - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } -} -impl From for Error { - fn from(value: ZeroValue) -> Self { - Self::ZeroValue(value) - } -} #[test] fn error_encoding_works() { diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index 215c891c3..29816e5c0 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,8 +1,4 @@ -pub use alloy_sol_types::{ - sol_data::{Address as SolAddress, Uint}, - SolError, SolType, -}; -pub use ink::{abi::Sol, primitives::sol::SolTypeEncode, SolEncode}; +pub use ink::{abi::Sol, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. From 59a94a3c5c0dfcccfdd253f5a8485610bc0a5d79 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 21:53:36 +0100 Subject: [PATCH 162/284] fix(api): add missing imports after refactor --- pop-api-vnext/src/fungibles/erc20.rs | 2 +- pop-api-vnext/src/fungibles/erc20/v0/errors.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pop-api-vnext/src/fungibles/erc20.rs b/pop-api-vnext/src/fungibles/erc20.rs index 12ba1148d..3a341144f 100644 --- a/pop-api-vnext/src/fungibles/erc20.rs +++ b/pop-api-vnext/src/fungibles/erc20.rs @@ -1,6 +1,6 @@ pub use v0::*; -use super::{contract_ref, prefixed_address, Address, Pop, Sol, String, TokenId, U256}; +use super::{contract_ref, prefixed_address, Address, Pop, Sol, String, TokenId, Vec, U256}; use crate::ensure; /// The first version of the Erc20 API. diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 5496262bd..1fc5fec8a 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -1,3 +1,5 @@ +use ink::sol::SolErrorEncode; + use super::*; #[derive(ink::SolErrorDecode, ink::SolErrorEncode)] From 2988372d788f1cf41a52a8e59795651985ac54a9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 11 Jul 2025 13:42:53 +0100 Subject: [PATCH 163/284] refactor: implement initial precompile reverts --- Cargo.toml | 1 + pallets/api-vnext/Cargo.toml | 1 + pallets/api-vnext/src/errors.rs | 39 +++ .../src/fungibles/precompiles/erc20/v0.rs | 137 +++++++++- .../precompiles/interfaces/v0/IERC20.sol | 29 +++ .../precompiles/interfaces/v0/IFungibles.sol | 13 + .../api-vnext/src/fungibles/precompiles/v0.rs | 245 +++++++++++++++++- pallets/api-vnext/src/lib.rs | 23 +- pop-api-vnext/src/fungibles/erc20/v0.rs | 4 +- .../src/fungibles/erc20/v0/errors.rs | 2 + 10 files changed, 474 insertions(+), 20 deletions(-) create mode 100644 pallets/api-vnext/src/errors.rs diff --git a/Cargo.toml b/Cargo.toml index 3e445da86..1e5191ee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ resolver = "2" [workspace.dependencies] anyhow = { version = "1.0.81", default-features = false } +base64 = { version = "0.22.1", default-features = false } clap = { version = "4.5.13", features = [ "derive" ] } codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [ "derive", diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index ebf32e521..c56bef868 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -12,6 +12,7 @@ version = "0.1.0" doctest = false [dependencies] +base64.workspace = true codec.workspace = true frame-benchmarking.workspace = true frame-support.workspace = true diff --git a/pallets/api-vnext/src/errors.rs b/pallets/api-vnext/src/errors.rs new file mode 100644 index 000000000..cd44ee508 --- /dev/null +++ b/pallets/api-vnext/src/errors.rs @@ -0,0 +1,39 @@ +/// Evaluate an expression, assert it returns an expected `Error::Revert` value and that +/// runtime storage has not been mutated (i.e. expression is a no-operation). +/// +/// Used as `assert_revert!(expression_to_assert, expected_error_expression)`. +#[cfg(test)] +macro_rules! assert_revert { + ($x:expr, $e:expr $(,)?) => {{ + use pallet_revive::precompiles::{alloy::sol_types::Revert, Error}; + + // Use function to resolve type inference from expected error + fn decode_revert(revert: Revert, _expected: &T) -> T { + use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; + let decoded = BASE64.decode(revert.reason).expect("base64 decoding error"); + T::abi_decode(&decoded).expect("sol decoding error") + } + + let Err(Error::Revert(revert)) = $x else { panic!("expected revert, got {:?}", $x) }; + assert_eq!(decode_revert(revert, &$e), $e); + }}; +} + +/// Evaluate `$x:expr` and if not true return `Err(Error::Revert)` with the reason containing a +/// base64-encoding of the specified Solidity error. +/// +/// Used as `ensure!(expression_to_ensure, error_to_return_on_false)`. +macro_rules! ensure { + ($x:expr, $e:expr $(,)?) => {{ + use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; + use pallet_revive::precompiles::{ + alloy::sol_types::{Revert, SolError}, + Error, + }; + + if !$x { + let encoded = BASE64.encode(<_ as SolError>::abi_encode(&$e)); + frame_support::fail!(Error::Revert(Revert { reason: encoded })) + } + }}; +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index f93554dfe..0d941d96a 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -8,7 +8,10 @@ use IERC20::*; use super::{super::super::*, U256, *}; -sol!("src/fungibles/precompiles/interfaces/v0/IERC20.sol"); +sol!( + #![sol(extra_derives(Debug, PartialEq))] + "src/fungibles/precompiles/interfaces/v0/IERC20.sol" +); /// Precompile providing an interface of the ERC-20 standard as defined in the ERC. pub struct Erc20(PhantomData<(T, I)>); @@ -60,6 +63,8 @@ where IERC20Calls::transfer(transferCall { to, value }) => { env.charge(>::WeightInfo::transfer())?; let from = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); + ensure!(!value.is_zero(), ERC20InsufficientValue); transfer::( to_runtime_origin(env.caller()), @@ -83,6 +88,8 @@ where IERC20Calls::approve(approveCall { spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!spender.is_zero(), ERC20InvalidSpender { spender: *spender }); + ensure!(!value.is_zero(), ERC20InsufficientValue); match approve::( to_runtime_origin(env.caller()), @@ -116,6 +123,9 @@ where }, IERC20Calls::transferFrom(transferFromCall { from, to, value }) => { env.charge(>::WeightInfo::transfer_from())?; + ensure!(!from.is_zero(), ERC20InvalidSender { sender: *from }); + ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); + ensure!(!value.is_zero(), ERC20InsufficientValue); transfer_from::( to_runtime_origin(env.caller()), @@ -166,15 +176,16 @@ impl, I: 'static> Erc20(&ALICE, token, &totalSupply(totalSupplyCall {})) - .unwrap(), + call_precompile::(&ALICE, token, &call).unwrap(), U256::from(total_supply) ); }); @@ -218,7 +229,9 @@ mod tests { call_precompile::( &BOB, token, - &balanceOf(balanceOfCall { account: to_address(&account).0.into() }) + &IERC20Calls::balanceOf(balanceOfCall { + account: to_address(&account).0.into() + }) ) .unwrap(), U256::from(endowment) @@ -226,6 +239,35 @@ mod tests { }); } + #[test] + fn transfer_reverts_with_invalid_receiver() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = transferCall { to: Address::default(), value: U256::ZERO }; + let transfer = IERC20Calls::transfer(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer), + ERC20InvalidReceiver { receiver: Address::default() } + ); + }); + } + + #[test] + fn transfer_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let to = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferCall { to, value: U256::ZERO }; + let transfer = IERC20Calls::transfer(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer), + ERC20InsufficientValue + ); + }); + } + #[test] fn transfer_works() { let token = 1; @@ -293,6 +335,32 @@ mod tests { }); } + #[test] + fn approve_reverts_with_invalid_spender() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = approveCall { spender: Address::default(), value: U256::ZERO }; + let approve = IERC20Calls::approve(call); + assert_revert!( + call_precompile::<()>(&origin, token, &approve), + ERC20InvalidSpender { spender: Address::default() } + ); + }); + } + + #[test] + fn approve_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let spender = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = approveCall { spender, value: U256::ZERO }; + let approve = IERC20Calls::approve(call); + assert_revert!(call_precompile::<()>(&origin, token, &approve), ERC20InsufficientValue); + }); + } + #[test] fn approve_works() { let token = 1; @@ -324,6 +392,55 @@ mod tests { }); } + #[test] + fn transfer_from_reverts_with_invalid_sender() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { + from: Address::default(), + to: Address::default(), + value: U256::ZERO, + }; + let transfer_from = IERC20Calls::transferFrom(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer_from), + ERC20InvalidSender { sender: Address::default() } + ); + }); + } + + #[test] + fn transfer_from_reverts_with_invalid_receiver() { + let token = 1; + let origin = ALICE; + let from = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { from, to: Address::default(), value: U256::ZERO }; + let transfer_from = IERC20Calls::transferFrom(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer_from), + ERC20InvalidReceiver { receiver: Address::default() } + ); + }); + } + + #[test] + fn transfer_from_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let from = [255; 20].into(); + let to = [1; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { from, to, value: U256::ZERO }; + let transfer_from = IERC20Calls::transferFrom(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer_from), + ERC20InsufficientValue + ); + }); + } + #[test] fn transfer_from_works() { let token = 1; @@ -350,7 +467,7 @@ mod tests { assert!(call_precompile::( &origin, token, - &transferFrom(IERC20::transferFromCall { + &IERC20Calls::transferFrom(IERC20::transferFromCall { from: to_address(&from).0.into(), to: to_address(&to).0.into(), value: U256::from(value), @@ -431,7 +548,7 @@ mod tests { origin: &AccountId, token: u32, input: &IERC20Calls, - ) -> Result { + ) -> Result { let address = prefixed_address(ERC20, token); bare_call::( RuntimeOrigin::signed(origin.clone()), diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol index 9e78dcfae..2d21c68d4 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol @@ -101,4 +101,33 @@ interface IERC20 { * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); + + /** + * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + * @param balance Current balance for the interacting account. + * @param needed Minimum amount required to perform a transfer. + */ + error ERC20InsufficientBalance( + address sender, + uint256 balance, + uint256 needed + ); + /// @dev Indicates an error related to a specified `value`. + error ERC20InsufficientValue(); + /** + * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @param receiver Address to which tokens are being transferred. + */ + error ERC20InvalidReceiver(address receiver); + /** + * @dev Indicates a failure with the token `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + */ + error ERC20InvalidSender(address sender); + /** + * @dev Indicates a failure with the `spender` to be approved. Used in approvals. + * @param spender Address that may be allowed to operate on tokens without being their owner. + */ + error ERC20InvalidSpender(address spender); } diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol index f58fb962d..caa1dfae9 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol @@ -196,4 +196,17 @@ interface IFungibles { * @param admin The administrator of the token. */ event Created(uint32 id, address creator, address admin); + + /// @dev The token recipient is invalid. + error InvalidRecipient(address); + /// @dev The minimum balance should be non-zero. + error MinBalanceZero(); + /// @dev The `admin` address cannot be the zero address. + error ZeroAdminAddress(); + /// @dev The recipient cannot be the zero address. + error ZeroRecipientAddress(); + /// @dev The sender cannot be the zero address. + error ZeroSenderAddress(); + /// @dev The specified `value` cannot be zero. + error ZeroValue(); } diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index b6a16eaee..1fb78d214 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -2,7 +2,10 @@ pub(crate) use IFungibles::*; use super::*; -sol!("src/fungibles/precompiles/interfaces/v0/IFungibles.sol"); +sol!( + #![sol(extra_derives(Debug, PartialEq))] + "src/fungibles/precompiles/interfaces/v0/IFungibles.sol" +); /// The fungibles precompile offers a streamlined interface for interacting with fungible /// tokens. The goal is to provide a simplified, consistent API that adheres to standards in @@ -38,6 +41,8 @@ where IFungiblesCalls::transfer(transferCall { token, to, value }) => { env.charge(>::WeightInfo::transfer())?; let from = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!to.is_zero(), ZeroRecipientAddress); + ensure!(!value.is_zero(), ZeroValue); transfer::( to_runtime_origin(env.caller()), @@ -51,6 +56,10 @@ where }, IFungiblesCalls::transferFrom(transferFromCall { token, from, to, value }) => { env.charge(>::WeightInfo::transfer_from())?; + ensure!(!from.is_zero(), ZeroSenderAddress); + ensure!(!to.is_zero(), ZeroRecipientAddress); + ensure!(to != from, InvalidRecipient(*to)); + ensure!(!value.is_zero(), ZeroValue); transfer_from::( to_runtime_origin(env.caller()), @@ -67,6 +76,8 @@ where IFungiblesCalls::approve(approveCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!spender.is_zero(), ZeroRecipientAddress); + ensure!(!value.is_zero(), ZeroValue); match approve::( to_runtime_origin(env.caller()), @@ -102,6 +113,8 @@ where IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 0))?; let owner = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!spender.is_zero(), ZeroRecipientAddress); + ensure!(!value.is_zero(), ZeroValue); let value = increase_allowance::( to_runtime_origin(env.caller()), @@ -128,6 +141,8 @@ where IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!spender.is_zero(), ZeroRecipientAddress); + ensure!(!value.is_zero(), ZeroValue); let value = match decrease_allowance::( to_runtime_origin(env.caller()), @@ -164,6 +179,8 @@ where IFungiblesCalls::create(createCall { admin, minBalance }) => { env.charge(>::WeightInfo::create())?; let creator = >::to_address(env.caller().account_id()?).0.into(); + ensure!(!admin.is_zero(), ZeroAdminAddress); + ensure!(!minBalance.is_zero(), MinBalanceZero); let id = create::( to_runtime_origin(env.caller()), @@ -204,6 +221,8 @@ where }, IFungiblesCalls::mint(mintCall { token, account, value }) => { env.charge(>::WeightInfo::mint())?; + ensure!(!account.is_zero(), ZeroRecipientAddress); + ensure!(!value.is_zero(), ZeroValue); mint::( to_runtime_origin(env.caller()), @@ -219,6 +238,8 @@ where }, IFungiblesCalls::burn(burnCall { token, account, value }) => { let charged = env.charge(>::WeightInfo::burn())?; + ensure!(!account.is_zero(), ZeroSenderAddress); + ensure!(!value.is_zero(), ZeroValue); burn::( to_runtime_origin(env.caller()), @@ -332,6 +353,29 @@ mod tests { type Asset = pallet_assets::Asset; type Metadata = pallet_assets::Metadata; + #[test] + fn transfer_reverts_with_zero_recipient_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = transferCall { token, to: Address::default(), value: U256::ZERO }; + let transfer = IFungiblesCalls::transfer(call); + assert_revert!(call_precompile::<()>(&origin, &transfer), ZeroRecipientAddress); + }); + } + + #[test] + fn transfer_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let to = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferCall { token, to, value: U256::ZERO }; + let transfer = IFungiblesCalls::transfer(call); + assert_revert!(call_precompile::<()>(&origin, &transfer), ZeroValue); + }); + } + #[test] fn transfer_works() { let token = 1; @@ -366,6 +410,59 @@ mod tests { }); } + #[test] + fn transfer_from_reverts_with_zero_sender_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { + token, + from: Address::default(), + to: Address::default(), + value: U256::ZERO, + }; + let transfer_from = IFungiblesCalls::transferFrom(call); + assert_revert!(call_precompile::<()>(&origin, &transfer_from), ZeroSenderAddress); + }); + } + + #[test] + fn transfer_from_reverts_with_zero_recipient_address() { + let token = 1; + let origin = ALICE; + let from = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { token, from, to: Address::default(), value: U256::ZERO }; + let transfer_from = IFungiblesCalls::transferFrom(call); + assert_revert!(call_precompile::<()>(&origin, &transfer_from), ZeroRecipientAddress); + }); + } + + #[test] + fn transfer_from_reverts_with_invalid_recipient() { + let token = 1; + let origin = ALICE; + let from = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { token, from, to: from, value: U256::ZERO }; + let transfer_from = IFungiblesCalls::transferFrom(call); + assert_revert!(call_precompile::<()>(&origin, &transfer_from), InvalidRecipient(from)); + }); + } + + #[test] + fn transfer_from_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let from = [255; 20].into(); + let to = [1; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = transferFromCall { token, from, to, value: U256::ZERO }; + let transfer_from = IFungiblesCalls::transferFrom(call); + assert_revert!(call_precompile::<()>(&origin, &transfer_from), ZeroValue); + }); + } + #[test] fn transfer_from_works() { let token = 1; @@ -408,6 +505,29 @@ mod tests { }); } + #[test] + fn approve_reverts_with_zero_recipient_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = approveCall { token, spender: Address::default(), value: U256::ZERO }; + let approve = IFungiblesCalls::approve(call); + assert_revert!(call_precompile::<()>(&origin, &approve), ZeroRecipientAddress); + }); + } + + #[test] + fn approve_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let spender = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = approveCall { token, spender, value: U256::ZERO }; + let approve = IFungiblesCalls::approve(call); + assert_revert!(call_precompile::<()>(&origin, &approve), ZeroValue); + }); + } + #[test] fn approve_works() { let token = 1; @@ -438,6 +558,33 @@ mod tests { }); } + #[test] + fn increase_allowance_reverts_with_zero_recipient_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = + increaseAllowanceCall { token, spender: Address::default(), value: U256::ZERO }; + let increase_allowance = IFungiblesCalls::increaseAllowance(call); + assert_revert!( + call_precompile::<()>(&origin, &increase_allowance), + ZeroRecipientAddress + ); + }); + } + + #[test] + fn increase_allowance_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let spender = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = increaseAllowanceCall { token, spender, value: U256::ZERO }; + let increase_allowance = IFungiblesCalls::increaseAllowance(call); + assert_revert!(call_precompile::<()>(&origin, &increase_allowance), ZeroValue); + }); + } + #[test] fn increase_allowance_works() { let token = 1; @@ -477,6 +624,33 @@ mod tests { }); } + #[test] + fn decrease_allowance_reverts_with_zero_recipient_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = + decreaseAllowanceCall { token, spender: Address::default(), value: U256::ZERO }; + let decrease_allowance = IFungiblesCalls::decreaseAllowance(call); + assert_revert!( + call_precompile::<()>(&origin, &decrease_allowance), + ZeroRecipientAddress + ); + }); + } + + #[test] + fn decrease_allowance_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let spender = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = decreaseAllowanceCall { token, spender, value: U256::ZERO }; + let decrease_allowance = IFungiblesCalls::decreaseAllowance(call); + assert_revert!(call_precompile::<()>(&origin, &decrease_allowance), ZeroValue); + }); + } + #[test] fn decrease_allowance_works() { let token = 1; @@ -516,6 +690,27 @@ mod tests { }); } + #[test] + fn create_reverts_with_zero_admin_address() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = createCall { admin: Address::default(), minBalance: U256::ZERO }; + let create = IFungiblesCalls::create(call); + assert_revert!(call_precompile::<()>(&origin, &create), ZeroAdminAddress); + }); + } + + #[test] + fn create_reverts_with_zero_min_balance() { + let origin = ALICE; + let admin = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = createCall { admin, minBalance: U256::ZERO }; + let create = IFungiblesCalls::create(call); + assert_revert!(call_precompile::<()>(&origin, &create), MinBalanceZero); + }); + } + #[test] fn create_works() { let token = 0; @@ -654,6 +849,29 @@ mod tests { }); } + #[test] + fn mint_reverts_with_zero_sender_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = mintCall { token, account: Address::default(), value: U256::ZERO }; + let mint = IFungiblesCalls::mint(call); + assert_revert!(call_precompile::<()>(&origin, &mint), ZeroRecipientAddress); + }); + } + + #[test] + fn mint_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let account = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = mintCall { token, account, value: U256::ZERO }; + let mint = IFungiblesCalls::mint(call); + assert_revert!(call_precompile::<()>(&origin, &mint), ZeroValue); + }); + } + #[test] fn mint_works() { let token = 1; @@ -682,6 +900,29 @@ mod tests { }); } + #[test] + fn burn_reverts_with_zero_sender_address() { + let token = 1; + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let call = burnCall { token, account: Address::default(), value: U256::ZERO }; + let burn = IFungiblesCalls::burn(call); + assert_revert!(call_precompile::<()>(&origin, &burn), ZeroSenderAddress); + }); + } + + #[test] + fn burn_reverts_with_zero_value() { + let token = 1; + let origin = ALICE; + let account = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = burnCall { token, account, value: U256::ZERO }; + let burn = IFungiblesCalls::burn(call); + assert_revert!(call_precompile::<()>(&origin, &burn), ZeroValue); + }); + } + #[test] fn burn_works() { let token = 1; @@ -875,7 +1116,7 @@ mod tests { fn call_precompile::RustType>>( origin: &AccountId, input: &IFungiblesCalls, - ) -> Result { + ) -> Result { bare_call::( RuntimeOrigin::signed(origin.clone()), ADDRESS.into(), diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index c72405f5b..16e793750 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -21,7 +21,7 @@ use pallet_revive::{ }, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, Origin, H256, U256, + AddressMapper as _, Origin, H256, }; #[cfg(feature = "runtime-benchmarks")] use { @@ -32,9 +32,14 @@ use { use { frame_support::{pallet_prelude::Weight, sp_runtime::traits::Bounded}, frame_system::pallet_prelude::OriginFor, - pallet_revive::{BalanceOf, DepositLimit, MomentOf, H160}, + pallet_revive::{ + precompiles::alloy::sol_types::{Revert, SolError}, + BalanceOf, DepositLimit, MomentOf, H160, + }, }; +#[macro_use] +mod errors; #[cfg(feature = "fungibles")] pub mod fungibles; #[cfg(test)] @@ -57,7 +62,7 @@ fn bare_call< gas_limit: Weight, storage_deposit_limit: DepositLimit>, data: Vec, -) -> Result +) -> Result where BalanceOf: Into + TryFrom + Bounded, MomentOf: Into, @@ -71,9 +76,15 @@ where storage_deposit_limit, data, ) - .result?; - assert!(!result.did_revert()); - Ok(decode::(&result.data)) + .result + .map_err(|e| Error::Error(e.into()))?; + match result.did_revert() { + true => { + let revert = Revert::abi_decode(&result.data).expect("revert data is invalid"); + Err(Error::Revert(revert)) + }, + false => Ok(decode::(&result.data)), + } } // A direct call to a precompile. diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index 964bd981a..920a16543 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -81,7 +81,7 @@ pub fn balance_of(token: TokenId, account: Address) -> U256 { /// Emits a [`Transfer`] event. #[inline] pub fn transfer(token: TokenId, to: Address, value: U256) -> Result { - ensure!(to != Address::zero(), ERC20InvalidSender(to)); + ensure!(to != Address::zero(), ERC20InvalidReceiver(to)); ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); @@ -108,7 +108,7 @@ pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { /// Emits an [`Approval`] event. #[inline] pub fn approve(token: TokenId, spender: Address, value: U256) -> Result { - ensure!(spender != Address::zero(), ERC20InvalidApprover(spender)); + ensure!(spender != Address::zero(), ERC20InvalidSpender(spender)); ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 1fc5fec8a..6ff03f79b 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -17,6 +17,8 @@ pub enum Error { ERC20InvalidReceiver(Address), /// Indicates a failure with the token `sender`. ERC20InvalidSender(Address), + /// Indicates a failure with the `spender` to be approved. + ERC20InvalidSpender(Address), } impl<'a> ink::SolEncode<'a> for Error { From 8801a08648c8f853827d7b6ef14141c9ec19172f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 12 Jul 2025 09:05:53 +0100 Subject: [PATCH 164/284] test(api): add initial error checks --- .../integration-tests/src/fungibles.rs | 177 +++++++++++++----- pop-api-vnext/src/fungibles/v0/errors.rs | 1 + pop-api-vnext/src/lib.rs | 2 +- pop-api-vnext/src/sol.rs | 2 +- 4 files changed, 129 insertions(+), 53 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 5810d19af..004d7d07f 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -1,4 +1,5 @@ use frame_support::{ + assert_noop, pallet_prelude::Encode, traits::fungibles::{ approvals::Inspect as _, metadata::Inspect as _, roles::Inspect as _, Inspect as _, @@ -9,7 +10,10 @@ use pallet_api_vnext::fungibles::precompiles::v0::IFungibles::{ decimalsCall, decreaseAllowanceCall, existsCall, increaseAllowanceCall, mintCall, nameCall, setMetadataCall, startDestroyCall, symbolCall, totalSupplyCall, transferCall, transferFromCall, }; -use pop_api::fungibles::*; +use pop_api::{ + fungibles::{Error::*, *}, + SolErrorDecode, +}; use pop_primitives::TokenId; use sp_io::hashing::twox_256; @@ -138,9 +142,11 @@ fn transfer_works() { // transfer(&addr, token, BOB, amount), // Err(Module { index: 52, error: [0, 0] }) // ); + assert_noop!(contract.transfer(token, H160::zero(), 0.into()), ZeroRecipientAddress); + assert_noop!(contract.transfer(token, to_address(&to), 0.into()), ZeroValue); // Successful transfer. let balance_before_transfer = Assets::balance(token, &to); - contract.transfer(token, to_address(&to), (amount / 2).into()); + assert_ok!(contract.transfer(token, to_address(&to), (amount / 2).into())); let balance_after_transfer = Assets::balance(token, &to); assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); // Successfully emit event. @@ -199,13 +205,31 @@ fn transfer_from_works() { // transfer_from(&addr, token, ALICE, BOB, amount + 1 * UNIT), // Err(Module { index: 52, error: [0, 0] }), // ); + assert_noop!( + contract.transfer_from(token, H160::zero(), H160::zero(), 0.into()), + ZeroSenderAddress + ); + let from = to_address(&owner); + assert_noop!( + contract.transfer_from(token, from, H160::zero(), 0.into()), + ZeroRecipientAddress + ); + assert_noop!( + contract.transfer_from(token, from, from, 0.into()), + InvalidRecipient(from) + ); + assert_noop!(contract.transfer_from(token, from, to_address(&to), 0.into()), ZeroValue); // Successful transfer. let balance_before_transfer = Assets::balance(token, &to); - contract.transfer_from(token, to_address(&owner), to_address(&to), (amount / 2).into()); + assert_ok!(contract.transfer_from( + token, + to_address(&owner), + to_address(&to), + (amount / 2).into() + )); let balance_after_transfer = Assets::balance(token, &to); assert_eq!(balance_after_transfer, balance_before_transfer + amount / 2); // Successfully emit event. - let from = to_address(&owner); let to = to_address(&to); let expected = Transfer { from, to, value: (amount / 2).into() }.encode(); assert_eq!(contract.last_event(), expected); @@ -239,9 +263,11 @@ fn approve_works() { // Err(Module { index: 52, error: [16, 0] }) // ); thaw(&owner, token); + assert_noop!(contract.approve(token, H160::zero(), 0.into()), ZeroRecipientAddress); + assert_noop!(contract.approve(token, to_address(&spender), 0.into()), ZeroValue); // Successful approvals. assert_eq!(0, Assets::allowance(token, &contract.account_id(), &spender)); - contract.approve(token, to_address(&spender), amount.into()); + assert_ok!(contract.approve(token, to_address(&spender), amount.into())); assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount); // Successfully emit event. let spender = to_address(&spender); @@ -249,7 +275,7 @@ fn approve_works() { Approval { owner: contract.address, spender, value: amount.into() }.encode(); assert_eq!(contract.last_event(), expected); // Non-additive, sets new value. - contract.approve( token, spender, (amount / 2).into()); + assert_ok!(contract.approve( token, spender, (amount / 2).into())); assert_eq!( Assets::allowance(token, &contract.account_id(), &to_account_id(&spender)), amount / 2 @@ -299,17 +325,25 @@ fn increase_allowance_works() { // Err(Module { index: 52, error: [16, 0] }) // ); thaw(&owner, token); + assert_noop!( + contract.increase_allowance(token, H160::zero(), 0.into()), + ZeroRecipientAddress + ); + assert_noop!( + contract.increase_allowance(token, to_address(&spender), 0.into()), + ZeroValue + ); // Successful approvals: assert_eq!(0, Assets::allowance(token, &contract.account_id(), &spender)); assert_eq!( contract.increase_allowance(token, to_address(&spender), amount.into()), - amount.into() + Ok(amount.into()) ); assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount); // Additive. assert_eq!( contract.increase_allowance(token, to_address(&spender), amount.into()), - (amount * 2).into() + Ok((amount * 2).into()) ); assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount * 2); // Token is not live, i.e. frozen or being destroyed. @@ -348,12 +382,20 @@ fn decrease_allowance_works() { // decrease_allowance(&addr, token, &BOB, amount * 2), // Err(Module { index: 52, error: [10, 0] }), // ); + assert_noop!( + contract.decrease_allowance(token, H160::zero(), 0.into()), + ZeroRecipientAddress + ); + assert_noop!( + contract.decrease_allowance(token, to_address(&spender), 0.into()), + ZeroValue + ); // Successfully decrease allowance. let amount = amount / 2 - 1 * UNIT; let allowance_before = Assets::allowance(token, &contract.account_id(), &spender); assert_eq!( contract.decrease_allowance(token, to_address(&spender), amount.into()), - (allowance_before - amount).into() + Ok((allowance_before - amount).into()) ); let allowance_after = Assets::allowance(token, &contract.account_id(), &spender); assert_eq!(allowance_before - allowance_after, amount); @@ -414,11 +456,12 @@ fn create_works() { // Instantiate a contract with enough balance. let mut contract = Contract::new(&owner, INIT_VALUE); - // }),); The minimal balance for a token must be non zero. - // assert_eq!(contract.create(&addr, &admin, 0), Err(Module { index: 52, error: [7, 0] }),); - // Create token successfully. + assert_noop!(contract.create(H160::zero(), 0.into()), ZeroAdminAddress); let admin = to_address(&owner); - let token = contract.create(admin, 1.into()); + // The minimal balance for a token must be non zero. + assert_noop!(contract.create(admin, 0.into()), MinBalanceZero); + // Create token successfully. + let token = contract.create(admin, 1.into()).unwrap(); assert_eq!(Assets::owner(token), Some(contract.account_id())); // Successfully emit event. let expected = Created { id: token, creator: contract.address, admin }.encode(); @@ -466,7 +509,7 @@ fn start_destroy_works() { // contract.start_destroy(&creator, token), // Err(Module { index: 52, error: [2, 0] }), // ); - let token = contract.create(to_address(&owner), 1.into()); + let token = contract.create(to_address(&owner), 1.into()).unwrap(); contract.start_destroy(token); // Successfully emit event. let expected = DestroyStarted { token }.encode(); @@ -493,7 +536,7 @@ fn set_metadata_works() { // set_metadata(&addr, token, vec![0], vec![0], 0u8), // Err(Module { index: 52, error: [2, 0] }), // ); - let token = contract.create(to_address(&owner), 1.into()); + let token = contract.create(to_address(&owner), 1.into()).unwrap(); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -545,7 +588,7 @@ fn clear_metadata_works() { // No Permission. // assert_eq!(contract.clear_metadata(token), Err(Module { index: 52, error: [2, 0] // }),); - let token = contract.create(to_address(&owner), 1.into()); + let token = contract.create(to_address(&owner), 1.into()).unwrap(); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); // assert_eq!( @@ -612,7 +655,7 @@ fn mint_works() { // Err(Module { index: 52, error: [2, 0] }) // ); // Contract must be admin in order to be able to mint. - let token = contract.create(contract.address, 2.into()); + let token = contract.create(contract.address, 2.into()).unwrap(); // Minimum balance of a token can not be zero. // assert_eq!(contract.mint(token, &account, 1.into()), Err(Token(BelowMinimum))); // Token is not live, i.e. frozen or being destroyed. @@ -622,9 +665,11 @@ fn mint_works() { // Err(Module { index: 52, error: [16, 0] }) // ); thaw(&contract.account_id(), token); + assert_noop!(contract.mint(token, H160::zero(), 0.into()), ZeroRecipientAddress); + assert_noop!(contract.mint(token, to_address(&account), 0.into()), ZeroValue); // Successful mint. let balance_before_mint = Assets::balance(token, &account); - contract.mint(token, to_address(&account), amount.into()); + assert_ok!(contract.mint(token, to_address(&account), amount.into())); let balance_after_mint = Assets::balance(token, &account); assert_eq!(balance_after_mint, balance_before_mint + amount); // Account can not hold more tokens than Balance::MAX. @@ -670,8 +715,8 @@ fn burn_works() { // Err(Module { index: 52, error: [2, 0] }) // ); // Contract must be admin in order to be able to burn. - let token = contract.create(contract.address, 1.into()); - contract.mint(token, to_address(&account), (amount * 2).into()); + let token = contract.create(contract.address, 1.into()).unwrap(); + assert_ok!(contract.mint(token, to_address(&account), (amount * 2).into())); // Token is not live, i.e. frozen or being destroyed. freeze(&contract.account_id(), token); // assert_eq!( @@ -679,9 +724,11 @@ fn burn_works() { // Err(Module { index: 52, error: [16, 0] }) // ); thaw(&contract.account_id(), token); + assert_noop!(contract.burn(token, H160::zero(), 0.into()), ZeroSenderAddress); + assert_noop!(contract.burn(token, to_address(&account), 0.into()), ZeroValue); // Successful mint. let balance_before_burn = Assets::balance(token, &account); - contract.burn(token, to_address(&account), amount.into()); + assert_ok!(contract.burn(token, to_address(&account), amount.into())); let balance_after_burn = Assets::balance(token, &account); assert_eq!(balance_after_burn, balance_before_burn - amount); // Token is not live, i.e. frozen or being destroyed. @@ -723,130 +770,158 @@ impl Contract { let owner = alloy::Address::from(owner.0); let spender = alloy::Address::from(spender.0); let call = allowanceCall { token, owner, spender }; - U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) + U256::from_little_endian( + self.call::<_, Error>(&self.creator, call, 0).unwrap().as_le_slice(), + ) } - fn approve(&mut self, token: TokenId, spender: H160, value: U256) { + fn approve(&mut self, token: TokenId, spender: H160, value: U256) -> Result<(), Error> { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = approveCall { token, spender, value }; - self.call(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn balance_of(&self, token: TokenId, owner: H160) -> U256 { let owner = alloy::Address::from(owner.0); let call = balanceOfCall { token, owner }; - U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) + U256::from_little_endian( + self.call::<_, Error>(&self.creator, call, 0).unwrap().as_le_slice(), + ) } - fn burn(&mut self, token: TokenId, account: H160, value: U256) { + fn burn(&mut self, token: TokenId, account: H160, value: U256) -> Result<(), Error> { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = burnCall { token, account, value }; - self.call(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn clear_metadata(&mut self, token: TokenId) { let call = clearMetadataCall { token }; - self.call(&self.creator, call, 0).unwrap(); + self.call::<_, Error>(&self.creator, call, 0).unwrap(); } - fn create(&mut self, admin: H160, min_balance: U256) -> TokenId { + fn create(&mut self, admin: H160, min_balance: U256) -> Result { let admin = alloy::Address::from(admin.0); let min_balance = alloy::U256::from_be_bytes(min_balance.to_big_endian()); let call = createCall { admin, minBalance: min_balance }; - self.call(&self.creator, call, 0).unwrap() + self.call(&self.creator, call, 0) } fn decimals(&self, token: TokenId) -> u8 { let call = decimalsCall { token }; - self.call(&self.creator, call, 0).unwrap() + self.call::<_, Error>(&self.creator, call, 0).unwrap() } - fn decrease_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { + fn decrease_allowance( + &mut self, + token: TokenId, + spender: H160, + value: U256, + ) -> Result { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = decreaseAllowanceCall { token, spender, value }; - U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) + Ok(U256::from_little_endian(self.call(&self.creator, call, 0)?.as_le_slice())) } fn exists(&self, token: TokenId) -> bool { let call = existsCall { token }; - self.call(&self.creator, call, 0).unwrap() + self.call::<_, Error>(&self.creator, call, 0).unwrap() } - fn increase_allowance(&mut self, token: TokenId, spender: H160, value: U256) -> U256 { + fn increase_allowance( + &mut self, + token: TokenId, + spender: H160, + value: U256, + ) -> Result { let spender = alloy::Address::from(spender.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = increaseAllowanceCall { token, spender, value }; - U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) + Ok(U256::from_little_endian(self.call(&self.creator, call, 0)?.as_le_slice())) } - fn mint(&mut self, token: TokenId, account: H160, value: U256) { + fn mint(&mut self, token: TokenId, account: H160, value: U256) -> Result<(), Error> { let account = alloy::Address::from(account.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = mintCall { token, account, value }; - self.call(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn name(&self, token: TokenId) -> String { let call = nameCall { token }; - self.call(&self.creator, call, 0).unwrap() + self.call::<_, Error>(&self.creator, call, 0).unwrap() } fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { let call = setMetadataCall { token, name, symbol, decimals }; - self.call(&self.creator, call, 0).unwrap(); + self.call::<_, Error>(&self.creator, call, 0).unwrap(); } fn start_destroy(&mut self, token: TokenId) { let call = startDestroyCall { token }; - self.call(&self.creator, call, 0).unwrap(); + self.call::<_, Error>(&self.creator, call, 0).unwrap(); } fn symbol(&self, token: TokenId) -> String { let call = symbolCall { token }; - self.call(&self.creator, call, 0).unwrap() + self.call::<_, Error>(&self.creator, call, 0).unwrap() } fn total_supply(&self, token: TokenId) -> U256 { let call = totalSupplyCall { token }; - U256::from_little_endian(self.call(&self.creator, call, 0).unwrap().as_le_slice()) + U256::from_little_endian( + self.call::<_, Error>(&self.creator, call, 0).unwrap().as_le_slice(), + ) } - fn transfer(&mut self, token: TokenId, to: H160, value: U256) { + fn transfer(&mut self, token: TokenId, to: H160, value: U256) -> Result<(), Error> { let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = transferCall { token, to, value }; - self.call(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } - fn transfer_from(&mut self, token: TokenId, from: H160, to: H160, value: U256) { + fn transfer_from( + &mut self, + token: TokenId, + from: H160, + to: H160, + value: U256, + ) -> Result<(), Error> { let from = alloy::Address::from(from.0); let to = alloy::Address::from(to.0); let value = alloy::U256::from_be_bytes(value.to_big_endian()); let call = transferFromCall { token, from, to, value }; - self.call(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn account_id(&self) -> AccountId { to_account_id(&self.address) } - fn call( + fn call( &self, origin: &AccountId, call: T, value: Balance, - ) -> Result { + ) -> Result { let origin = RuntimeOrigin::signed(origin.clone()); let dest = self.address.clone(); let data = call.abi_encode(); let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) .expect("should work"); match result.did_revert() { - true => todo!("error conversion: {:?}", String::from_utf8_lossy(&result.data)), - false => Ok(T::abi_decode_returns(&result.data).expect("unable to decode")), + true => Err(E::decode(&result.data).expect("unable to decode error value")), + false => + Ok(T::abi_decode_returns(&result.data).expect("unable to decode success value")), } } diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index 5320cb908..c32dc8582 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -2,6 +2,7 @@ use ink::sol::SolErrorEncode; use super::*; +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorDecode, ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index c69e009e2..036c2d9a1 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::Address; -pub use sol::revert; +pub use sol::{revert, SolErrorDecode}; type Pop = ink::env::DefaultEnvironment; diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index 29816e5c0..65a3c5e28 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, SolEncode}; +pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. From 896aa4f471f5753a0d78408299f855746d8bf056 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 10:46:57 +0100 Subject: [PATCH 165/284] refactor(api): improved fungibles error handling --- pallets/api-vnext/Cargo.toml | 3 +- pallets/api-vnext/src/errors.rs | 21 + pallets/api-vnext/src/fungibles.rs | 7 +- .../precompiles/interfaces/v0/IFungibles.sol | 18 + .../api-vnext/src/fungibles/precompiles/v0.rs | 173 +++++++- pop-api-vnext/Cargo.lock | 2 +- pop-api-vnext/Cargo.toml | 1 + .../contracts/fungibles/Cargo.lock | 1 + .../contracts/fungibles/lib.rs | 23 +- .../integration-tests/src/fungibles.rs | 402 ++++++++---------- pop-api-vnext/integration-tests/src/lib.rs | 9 +- pop-api-vnext/src/fungibles.rs | 2 +- .../src/fungibles/erc20/v0/errors.rs | 14 +- pop-api-vnext/src/fungibles/v0.rs | 23 +- pop-api-vnext/src/fungibles/v0/errors.rs | 128 +++++- pop-api-vnext/src/sol.rs | 12 +- 16 files changed, 566 insertions(+), 273 deletions(-) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index c56bef868..fee68851f 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -18,6 +18,7 @@ frame-benchmarking.workspace = true frame-support.workspace = true frame-system.workspace = true pallet-assets = { workspace = true, default-features = false, optional = true } +pallet-balances = { workspace = true, default-features = false, optional = true } pallet-revive = { workspace = true, default-features = false } scale-info.workspace = true @@ -28,7 +29,7 @@ sp-io.workspace = true [features] default = [ "fungibles", "std" ] -fungibles = [ "pallet-assets" ] +fungibles = [ "dep:pallet-assets", "dep:pallet-balances" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", diff --git a/pallets/api-vnext/src/errors.rs b/pallets/api-vnext/src/errors.rs index cd44ee508..4e520a2be 100644 --- a/pallets/api-vnext/src/errors.rs +++ b/pallets/api-vnext/src/errors.rs @@ -37,3 +37,24 @@ macro_rules! ensure { } }}; } + +/// Implement [`From`] for Solidity errors, which converts the error into a [`Revert`] error with +/// the reason containing a base64-encoding of the specified Solidity error. +macro_rules! impl_from_sol_error { + ($($error_type:path),+ $(,)?) => { + $( + impl From<$error_type> for Error { + fn from(error: $error_type) -> Self { + use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; + use pallet_revive::precompiles::{ + alloy::sol_types::{Revert, SolError}, + Error, + }; + + let reason = BASE64.encode(error.abi_encode().as_slice()); + Error::Revert(Revert { reason }) + } + } + )+ + }; +} diff --git a/pallets/api-vnext/src/fungibles.rs b/pallets/api-vnext/src/fungibles.rs index 829096bcf..7beb1fb22 100644 --- a/pallets/api-vnext/src/fungibles.rs +++ b/pallets/api-vnext/src/fungibles.rs @@ -244,7 +244,12 @@ fn transfer, I>( to: AccountIdOf, value: BalanceOf, ) -> DispatchResult { - >::transfer(origin, asset.into(), T::Lookup::unlookup(to.clone()), value) + >::transfer_keep_alive( + origin, + asset.into(), + T::Lookup::unlookup(to.clone()), + value, + ) } fn transfer_from, I>( diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol index caa1dfae9..92de11887 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol @@ -197,10 +197,28 @@ interface IFungibles { */ event Created(uint32 id, address creator, address admin); + /// @dev The metadata provided is invalid. + error BadMetadata(); + /// @dev Account cannot exist with the funds that would be given. + error BelowMinimum(); + /// @dev Account cannot be created. + error CannotCreate(); + /// @dev The account balance is insufficient. + error InsufficientBalance(); /// @dev The token recipient is invalid. error InvalidRecipient(address); /// @dev The minimum balance should be non-zero. error MinBalanceZero(); + /// @dev The signing account has no permission to do the operation. + error NoPermission(); + /// @dev The token is not live, and likely being destroyed.. + error NotLive(); + /// @dev The token balance overflowed. + error Overflow(); + /// @dev No approval exists that would allow the transfer. + error Unapproved(); + /// @dev The given token identifier is unknown. + error Unknown(); /// @dev The `admin` address cannot be the zero address. error ZeroAdminAddress(); /// @dev The recipient cannot be the zero address. diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 1fb78d214..bd28fe532 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -1,3 +1,8 @@ +use codec::Decode; +use frame_support::{ + sp_runtime::{ArithmeticError, DispatchError, ModuleError, TokenError}, + traits::PalletInfo, +}; pub(crate) use IFungibles::*; use super::*; @@ -18,7 +23,8 @@ impl< I, AssetId: Default + From + Into, Balance: TryConvert, - > + pallet_revive::Config + > + pallet_balances::Config + + pallet_revive::Config + Config, I: 'static, > Precompile for Fungibles @@ -49,7 +55,8 @@ where (*token).into(), env.to_account_id(&(*to.0).into()), (*value).try_convert()?, - )?; + ) + .map_err(Self::map_err)?; deposit_event(env, Transfer { token: *token, from, to: *to, value: *value })?; Ok(transferCall::abi_encode_returns(&transferReturn {})) @@ -67,7 +74,8 @@ where env.to_account_id(&(*from.0).into()), env.to_account_id(&(*to.0).into()), (*value).try_convert()?, - )?; + ) + .map_err(Self::map_err)?; let event = Transfer { token: *token, from: *from, to: *to, value: *value }; deposit_event(env, event)?; @@ -102,7 +110,7 @@ where env.gas_meter_mut() .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } - return Err(e.error.into()) + return Err(Self::map_err(e.error)); }, }; @@ -131,7 +139,8 @@ where .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } e.error - })? + }) + .map_err(Self::map_err)? .try_convert()?; let spender = *spender; @@ -168,7 +177,7 @@ where env.gas_meter_mut() .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } - return Err(e.error.into()) + return Err(Self::map_err(e.error)) }, }; @@ -186,7 +195,8 @@ where to_runtime_origin(env.caller()), env.to_account_id(&(*admin.0).into()), (*minBalance).try_convert()?, - )? + ) + .map_err(Self::map_err)? .into(); deposit_event(env, Created { id, creator, admin: *admin })?; @@ -195,7 +205,8 @@ where IFungiblesCalls::startDestroy(startDestroyCall { token }) => { env.charge(>::WeightInfo::start_destroy())?; - start_destroy::(to_runtime_origin(env.caller()), (*token).into())?; + start_destroy::(to_runtime_origin(env.caller()), (*token).into()) + .map_err(Self::map_err)?; Ok(startDestroyCall::abi_encode_returns(&startDestroyReturn {})) }, @@ -208,14 +219,16 @@ where name.as_bytes().to_vec(), symbol.as_bytes().to_vec(), *decimals, - )?; + ) + .map_err(Self::map_err)?; Ok(setMetadataCall::abi_encode_returns(&setMetadataReturn {})) }, IFungiblesCalls::clearMetadata(clearMetadataCall { token }) => { env.charge(>::WeightInfo::clear_metadata())?; - clear_metadata::(to_runtime_origin(env.caller()), (*token).into())?; + clear_metadata::(to_runtime_origin(env.caller()), (*token).into()) + .map_err(Self::map_err)?; Ok(clearMetadataCall::abi_encode_returns(&clearMetadataReturn {})) }, @@ -229,7 +242,8 @@ where (*token).into(), env.to_account_id(&(*account.0).into()), (*value).try_convert()?, - )?; + ) + .map_err(Self::map_err)?; let from = Address::default(); let to = *account; @@ -256,7 +270,8 @@ where .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); } e.error - })?; + }) + .map_err(Self::map_err)?; let to = Address::default(); let event = Transfer { token: *token, from: *account, to, value: *value }; @@ -322,11 +337,80 @@ where } } -impl, I: 'static> Fungibles { +impl + pallet_balances::Config, I: 'static> + Fungibles +{ /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) } + + // Maps select, domain-specific dispatch errors to fungibles errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_err(e: DispatchError) -> Error { + use DispatchError::*; + match e { + Arithmetic(error) => match error { + ArithmeticError::Overflow => IFungibles::Overflow.into(), + _ => e.into(), + }, + ConsumerRemaining => IFungibles::InsufficientBalance.into(), + Module(ModuleError { index, error, .. }) => { + let index = Some(index as usize); + if index == T::PalletInfo::index::>() { + use pallet_balances::{Error, Error::*}; + + match Error::::decode(&mut error.as_slice()) { + Ok(error) => match error { + InsufficientBalance => IFungibles::InsufficientBalance.into(), + _ => e.into(), + }, + _ => e.into(), + } + } else if index == T::PalletInfo::index::>() { + use pallet_assets::{Error, Error::*}; + + match Error::::decode(&mut error.as_slice()) { + Ok(error) => match error { + AssetNotLive | IncorrectStatus => IFungibles::NotLive.into(), + BalanceLow => IFungibles::InsufficientBalance.into(), + BadMetadata => IFungibles::BadMetadata.into(), + NoPermission => IFungibles::NoPermission.into(), + Unapproved => IFungibles::Unapproved.into(), + Unknown => IFungibles::Unknown.into(), + _ => e.into(), + }, + _ => e.into(), + } + } else { + e.into() + } + }, + Token(error) => { + use TokenError::*; + match error { + BelowMinimum => IFungibles::BelowMinimum.into(), + CannotCreate => IFungibles::CannotCreate.into(), + UnknownAsset => IFungibles::Unknown.into(), + _ => e.into(), + } + }, + _ => e.into(), + } + } +} + +// Encoding of custom errors via `Error(String)`. +impl_from_sol_error! { + IFungibles::BadMetadata, + IFungibles::BelowMinimum, + IFungibles::CannotCreate, + IFungibles::InsufficientBalance, + IFungibles::NoPermission, + IFungibles::NotLive, + IFungibles::Overflow, + IFungibles::Unapproved, + IFungibles::Unknown, } #[cfg(test)] @@ -376,6 +460,23 @@ mod tests { }); } + #[test] + fn transfer_reverts_with_unknown() { + let token = 1; + let origin = ALICE; + let to = [255; 20].into(); + ExtBuilder::new() + .with_assets(vec![(0, CHARLIE, true, 1)]) + .build() + .execute_with(|| { + let call = transferCall { token, to, value: U256::from(1) }; + let transfer = IFungiblesCalls::transfer(call); + let Error::Revert(revert) = Error::from(Unknown) else { panic!() }; + println!("{:?}", revert.abi_encode()); + assert_revert!(call_precompile::<()>(&origin, &transfer), Unknown); + }); + } + #[test] fn transfer_works() { let token = 1; @@ -528,6 +629,27 @@ mod tests { }); } + #[test] + fn approve_reverts_with_insufficient_balance() { + let token = 1; + let origin = ALICE; + let spender = BOB; + let value = 10_000_000; + ExtBuilder::new() + .with_assets(vec![(token, origin.clone(), false, 1)]) + .with_asset_balances(vec![(token, origin.clone(), value)]) + .build() + .execute_with(|| { + let call = approveCall { + token, + spender: to_address(&spender).0.into(), + value: U256::from(value), + }; + let approve = IFungiblesCalls::approve(call); + assert_revert!(call_precompile::<()>(&origin, &approve), InsufficientBalance); + }); + } + #[test] fn approve_works() { let token = 1; @@ -872,6 +994,18 @@ mod tests { }); } + #[test] + fn mint_reverts_with_unknown() { + let token = 1; + let origin = ALICE; + let account = [255; 20].into(); + ExtBuilder::new().build().execute_with(|| { + let call = mintCall { token, account, value: U256::from(1) }; + let mint = IFungiblesCalls::mint(call); + assert_revert!(call_precompile::<()>(&origin, &mint), Unknown); + }); + } + #[test] fn mint_works() { let token = 1; @@ -923,6 +1057,19 @@ mod tests { }); } + #[test] + fn burn_reverts_with_insufficient_balance() { + let token = 1; + let origin = ALICE; + let account = [255; 20].into(); + let endowment = 10_000_000; + ExtBuilder::new().build().execute_with(|| { + let call = burnCall { token, account, value: U256::from(endowment) }; + let burn = IFungiblesCalls::burn(call); + assert_revert!(call_precompile::<()>(&origin, &burn), InsufficientBalance); + }); + } + #[test] fn burn_works() { let token = 1; diff --git a/pop-api-vnext/Cargo.lock b/pop-api-vnext/Cargo.lock index 2cd2e5985..0333bc2e4 100644 --- a/pop-api-vnext/Cargo.lock +++ b/pop-api-vnext/Cargo.lock @@ -3535,7 +3535,7 @@ dependencies = [ name = "pop-api" version = "0.1.0" dependencies = [ - "alloy-sol-types 1.2.1", + "base64", "hex", "ink", "pop-primitives", diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index f9509eb3e..c09fdf8b1 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -6,6 +6,7 @@ name = "pop-api" version = "0.1.0" [dependencies] +base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index 639d242b3..2afa7b4ad 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -3544,6 +3544,7 @@ dependencies = [ name = "pop-api" version = "0.1.0" dependencies = [ + "base64", "ink", "pop-primitives", ] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 149530b78..f690162f5 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::{prelude::string::String, U256}; -use pop_api::fungibles::{self as api, *}; +use pop_api::fungibles::{self as api, Error, *}; #[ink::contract] pub mod fungibles { @@ -90,21 +90,30 @@ pub mod fungibles { } #[ink(message)] - fn startDestroy(&self, token: TokenId) { - api::start_destroy(token); + fn startDestroy(&self, token: TokenId) -> Result<(), Error> { + api::start_destroy(token)?; self.env().emit_event(DestroyStarted { token }); + Ok(()) } #[ink(message)] - fn setMetadata(&self, token: TokenId, name: String, symbol: String, decimals: u8) { - api::set_metadata(token, name.clone(), symbol.clone(), decimals); + fn setMetadata( + &self, + token: TokenId, + name: String, + symbol: String, + decimals: u8, + ) -> Result<(), Error> { + api::set_metadata(token, name.clone(), symbol.clone(), decimals)?; self.env().emit_event(MetadataSet { token, name, symbol, decimals }); + Ok(()) } #[ink(message)] - fn clearMetadata(&self, token: TokenId) { - api::clear_metadata(token); + fn clearMetadata(&self, token: TokenId) -> Result<(), Error> { + api::clear_metadata(token)?; self.env().emit_event(MetadataCleared { token }); + Ok(()) } #[ink(message)] diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 004d7d07f..a64372a6c 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -121,27 +121,23 @@ fn transfer_works() { let mut contract = Contract::new(&owner, 0); // Token does not exist. - // assert_eq!(transfer(&addr, 1, BOB, amount), Err(Module { index: 52, error: [3, 0] - // })); + assert_noop!(contract.transfer(TokenId::MAX, to_address(&to), 1.into()), Unknown); // Mint `amount` to contract address. mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // transfer(&addr, token, BOB, amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.transfer(token, to_address(&to), amount.into()), NotLive); thaw(&owner, token); // Not enough balance. - // assert_eq!( - // transfer(&addr, token, BOB, amount + 1 * UNIT), - // Err(Module { index: 52, error: [0, 0] }) - // ); + assert_noop!( + contract.transfer(token, to_address(&to), (amount + 1 * UNIT).into()), + InsufficientBalance + ); // Not enough balance due to ED. - // assert_eq!( - // transfer(&addr, token, BOB, amount), - // Err(Module { index: 52, error: [0, 0] }) - // ); + assert_noop!( + contract.transfer(token, to_address(&to), amount.into()), + InsufficientBalance + ); assert_noop!(contract.transfer(token, H160::zero(), 0.into()), ZeroRecipientAddress); assert_noop!(contract.transfer(token, to_address(&to), 0.into()), ZeroValue); // Successful transfer. @@ -155,16 +151,13 @@ fn transfer_works() { let expected = Transfer { from, to, value: (amount / 2).into() }.encode(); assert_eq!(contract.last_event(), expected); // Transfer token to account that does not exist. - // assert_eq!( - // contract.transfer(token, to_address(&CHARLIE), (amount / 4).into()), - // Err(Token(CannotCreate)) - // ); + assert_noop!( + contract.transfer(token, [255; 20].into(), (amount / 4).into()), + CannotCreate + ); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); - // assert_eq!( - // contract.transfer(token, BOB, amount / 4), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.transfer(token, to, amount.into()), NotLive); }); } @@ -182,34 +175,34 @@ fn transfer_from_works() { let mut contract = Contract::new(&owner, 0); // Token does not exist. - // assert_eq!( - // transfer_from(&addr, 1, ALICE, BOB, amount / 2), - // Err(Module { index: 52, error: [3, 0] }), - // ); + let from = to_address(&owner); + assert_noop!( + contract.transfer_from(TokenId::MAX, from, to_address(&to), 1.into()), + Unknown + ); // Unapproved transfer. - // assert_eq!( - // transfer_from(&addr, token, ALICE, BOB, amount / 2), - // Err(Module { index: 52, error: [10, 0] }) - // ); + assert_noop!( + contract.transfer_from(token, from, to_address(&to), amount.into()), + Unapproved + ); // Approve the contract to transfer on behalf of owner. approve(&owner, token, &contract.account_id(), amount + 1 * UNIT); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // transfer_from(&addr, token, ALICE, BOB, amount), - // Err(Module { index: 52, error: [16, 0] }), - // ); + assert_noop!( + contract.transfer_from(token, from, to_address(&to), amount.into()), + NotLive + ); thaw(&owner, token); // Not enough balance. - // assert_eq!( - // transfer_from(&addr, token, ALICE, BOB, amount + 1 * UNIT), - // Err(Module { index: 52, error: [0, 0] }), - // ); + assert_noop!( + contract.transfer_from(token, from, to_address(&to), (amount + 1).into()), + InsufficientBalance + ); assert_noop!( contract.transfer_from(token, H160::zero(), H160::zero(), 0.into()), ZeroSenderAddress ); - let from = to_address(&owner); assert_noop!( contract.transfer_from(token, from, H160::zero(), 0.into()), ZeroRecipientAddress @@ -244,24 +237,27 @@ fn approve_works() { let amount: Balance = 100 * UNIT; ExtBuilder::new() .with_assets(vec![(token, owner.clone(), false, 1)]) - //.with_asset_balances(vec![(token, owner.clone(), amount)]) + .with_asset_balances(vec![(token, owner.clone(), amount)]) .build() .execute_with(|| { - let contract = Contract::new(&owner, 0); + let mut contract = Contract::new(&owner, 0); // Token does not exist. - // assert_eq!(contract.approve(&addr, TokenId::MAX, &BOB, amount), Err(Module { index: - // 52, error: [3, 0] })); - // assert_eq!(contract.approve(&addr, token, &BOB, amount), Err(ConsumerRemaining)); + assert_noop!( + contract.approve(TokenId::MAX, to_address(&spender), amount.into()), + Unknown + ); + // Insufficient contract balance for approval deposit. + assert_noop!( + contract.approve(token, to_address(&spender), amount.into()), + InsufficientBalance + ); let mut contract = Contract::new(&owner, INIT_VALUE); // Mint `amount` to contract address. mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // contract.approve(&addr, token, &BOB, amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.approve(token, to_address(&spender), amount.into()), NotLive); thaw(&owner, token); assert_noop!(contract.approve(token, H160::zero(), 0.into()), ZeroRecipientAddress); assert_noop!(contract.approve(token, to_address(&spender), 0.into()), ZeroValue); @@ -275,7 +271,7 @@ fn approve_works() { Approval { owner: contract.address, spender, value: amount.into() }.encode(); assert_eq!(contract.last_event(), expected); // Non-additive, sets new value. - assert_ok!(contract.approve( token, spender, (amount / 2).into())); + assert_ok!(contract.approve(token, spender, (amount / 2).into())); assert_eq!( Assets::allowance(token, &contract.account_id(), &to_account_id(&spender)), amount / 2 @@ -286,10 +282,7 @@ fn approve_works() { assert_eq!(contract.last_event(), expected); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); - // assert_eq!( - // approve(&addr, token, &BOB, amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.approve(token, spender, amount.into()), NotLive); }); } @@ -304,15 +297,18 @@ fn increase_allowance_works() { .build() .execute_with(|| { // Instantiate a contract without balance - test `ConsumerRemaining. - let contract = Contract::new(&owner, 0); + let mut contract = Contract::new(&owner, 0); // Token does not exist. - // assert_eq!( - // increase_allowance(&addr, 0, &BOB, amount), - // Err(Module { index: 52, error: [3, 0] }) - // ); + assert_noop!( + contract.increase_allowance(TokenId::MAX, to_address(&spender), 1.into()), + Unknown + ); mint(&owner, token, &contract.account_id(), amount); - // assert_eq!(contract.increase_allowance(&owner, token, &delegate, amount), - // Err(ConsumerRemaining)); + // Insufficient contract balance for approval deposit. + assert_noop!( + contract.increase_allowance(token, to_address(&spender), amount.into()), + InsufficientBalance + ); // Instantiate a contract with balance. let mut contract = Contract::new(&owner, INIT_VALUE); @@ -320,10 +316,10 @@ fn increase_allowance_works() { mint(&owner, token, &contract.account_id(), amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // contract.increase_allowance(&addr, token, &BOB, amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!( + contract.increase_allowance(token, to_address(&spender), amount.into()), + NotLive + ); thaw(&owner, token); assert_noop!( contract.increase_allowance(token, H160::zero(), 0.into()), @@ -348,10 +344,10 @@ fn increase_allowance_works() { assert_eq!(Assets::allowance(token, &contract.account_id(), &spender), amount * 2); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); - // assert_eq!( - // contract.increase_allowance(&addr, token, &BOB, amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!( + contract.increase_allowance(token, to_address(&spender), amount.into()), + NotLive + ); }); } @@ -372,16 +368,16 @@ fn decrease_allowance_works() { approve(&contract.account_id(), token, &spender, amount); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // decrease_allowance(&addr, token, &BOB, amount), - // Err(Module { index: 52, error: [16, 0] }), - // ); + assert_noop!( + contract.decrease_allowance(token, to_address(&spender), amount.into()), + NotLive + ); thaw(&owner, token); // "Unapproved" error is returned if the current allowance is less than `value`. - // assert_eq!( - // decrease_allowance(&addr, token, &BOB, amount * 2), - // Err(Module { index: 52, error: [10, 0] }), - // ); + assert_noop!( + contract.decrease_allowance(token, to_address(&spender), (amount * 2).into()), + Unapproved + ); assert_noop!( contract.decrease_allowance(token, H160::zero(), 0.into()), ZeroRecipientAddress @@ -401,10 +397,10 @@ fn decrease_allowance_works() { assert_eq!(allowance_before - allowance_after, amount); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); - // assert_eq!( - // contract.decrease_allowance(&addr, token, &delegate, 1 * UNIT), - // Err(Module { index: 52, error: [16, 0] }), - // ); + assert_noop!( + contract.decrease_allowance(token, to_address(&spender), amount.into()), + NotLive + ); }); } @@ -443,21 +439,19 @@ fn create_works() { let owner = ALICE; ExtBuilder::new().build().execute_with(|| { // Instantiate a contract without balance for fees. - let contract = Contract::new(&owner, 0); + let mut contract = Contract::new(&owner, 0); // No balance to pay for fees. - // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, - // 0] }),); + let admin = to_address(&owner); + assert_noop!(contract.create(admin, 1.into()), InsufficientBalance); // Instantiate a contract with insufficient balance for deposit. - let contract = Contract::new(&owner, 100); + let mut contract = Contract::new(&owner, 100); // No balance to pay the deposit. - // assert_eq!(contract.create(&addr, TOKEN_ID, &addr, 1), Err(Module { index: 10, error: [2, - // 0] }),); + assert_noop!(contract.create(admin, 1.into()), InsufficientBalance); // Instantiate a contract with enough balance. let mut contract = Contract::new(&owner, INIT_VALUE); assert_noop!(contract.create(H160::zero(), 0.into()), ZeroAdminAddress); - let admin = to_address(&owner); // The minimal balance for a token must be non zero. assert_noop!(contract.create(admin, 0.into()), MinBalanceZero); // Create token successfully. @@ -466,11 +460,6 @@ fn create_works() { // Successfully emit event. let expected = Created { id: token, creator: contract.address, admin }.encode(); assert_eq!(contract.last_event(), expected); - // Token ID is already taken. - // assert_eq!( - // contract.create(&addr, TOKEN_ID, &BOB, 1), - // Err(Module { index: 52, error: [5, 0] }), - // ); }); } @@ -483,7 +472,7 @@ fn instantiate_and_create_fungible_works() { assert!(!Assets::asset_exists(token)); // Successfully create a token when instantiating the contract. - let mut contract = Contract::new_with_create(&owner, INIT_VALUE, 1.into()); + let contract = Contract::new_with_create(&owner, INIT_VALUE, 1.into()); assert_eq!(Assets::owner(token), Some(contract.account_id())); assert!(Assets::asset_exists(token)); // Successfully emit event. @@ -495,78 +484,77 @@ fn instantiate_and_create_fungible_works() { #[test] fn start_destroy_works() { + let token = 0; let owner = ALICE; - ExtBuilder::new().build().execute_with(|| { - let mut contract = Contract::new(&owner, INIT_VALUE); + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); - // Token does not exist. - // assert_eq!( - // contract.start_destroy(&creator, TokenId::MAX), - // Err(Module { index: 52, error: [3, 0] }), - // ); - // No Permission. - // assert_eq!( - // contract.start_destroy(&creator, token), - // Err(Module { index: 52, error: [2, 0] }), - // ); - let token = contract.create(to_address(&owner), 1.into()).unwrap(); - contract.start_destroy(token); - // Successfully emit event. - let expected = DestroyStarted { token }.encode(); - assert_eq!(contract.last_event(), expected); - }); + // Token does not exist. + assert_noop!(contract.start_destroy(TokenId::MAX), Unknown); + // No Permission. + assert_noop!(contract.start_destroy(token), NoPermission); + let token = contract.create(to_address(&owner), 1.into()).unwrap(); + assert_ok!(contract.start_destroy(token)); + // Successfully emit event. + let expected = DestroyStarted { token }.encode(); + assert_eq!(contract.last_event(), expected); + }); } #[test] fn set_metadata_works() { + let token = 0; let owner = ALICE; let name = "name".to_string(); let symbol = "symbol".to_string(); let decimals: u8 = 69; - ExtBuilder::new().build().execute_with(|| { - let mut contract = Contract::new(&owner, INIT_VALUE); + ExtBuilder::new() + .with_assets(vec![(token, owner.clone(), false, 1)]) + .build() + .execute_with(|| { + let mut contract = Contract::new(&owner, INIT_VALUE); - // Token does not exist. - // assert_eq!( - // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0u8), - // Err(Module { index: 52, error: [3, 0] }), - // ); - // No Permission. - // assert_eq!( - // set_metadata(&addr, token, vec![0], vec![0], 0u8), - // Err(Module { index: 52, error: [2, 0] }), - // ); - let token = contract.create(to_address(&owner), 1.into()).unwrap(); - // Token is not live, i.e. frozen or being destroyed. - freeze(&owner, token); - // assert_eq!( - // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0u8), - // Err(Module { index: 52, error: [16, 0] }), - // ); - thaw(&owner, token); - // TODO: calling the below with a vector of length `100_000` errors in pallet contracts - // `OutputBufferTooSmall. Added to security analysis issue #131 to revisit. - // Set bad metadata - too large values. - // assert_eq!( - // set_metadata(&addr, TOKEN_ID, vec![0; 1000], vec![0; 1000], 0u8), - // Err(Module { index: 52, error: [9, 0] }), - // ); - // Set metadata successfully. - contract.set_metadata(token, name.clone(), symbol.clone(), decimals); - assert_eq!( - (&contract.name(token), &contract.symbol(token), &contract.decimals(token)), - (&name, &symbol, &decimals) - ); - // Successfully emit event. - let expected = MetadataSet { token, name, symbol, decimals }.encode(); - assert_eq!(contract.last_event(), expected); - // Token is not live, i.e. frozen or being destroyed. - start_destroy(&contract.account_id(), token); - // assert_eq!( - // set_metadata(&addr, TOKEN_ID, vec![0], vec![0], 0), - // Err(Module { index: 52, error: [16, 0] }), - // ); - }); + // Token does not exist. + assert_noop!( + contract.set_metadata(TokenId::MAX, name.clone(), symbol.clone(), decimals), + Unknown + ); + // No Permission. + assert_noop!( + contract.set_metadata(token, name.clone(), symbol.clone(), decimals), + NoPermission + ); + let token = contract.create(to_address(&owner), 1.into()).unwrap(); + // Token is not live, i.e. frozen or being destroyed. + freeze(&owner, token); + assert_noop!( + contract.set_metadata(token, name.clone(), symbol.clone(), decimals), + NotLive + ); + thaw(&owner, token); + // TODO: calling the below with a vector of length `100_000` errors in pallet contracts + // `OutputBufferTooSmall. Added to security analysis issue #131 to revisit. + // Set bad metadata - too large values. + assert_noop!( + contract.set_metadata(token, "n".repeat(1_00), "s".repeat(1_00), decimals), + BadMetadata + ); + // Set metadata successfully. + assert_ok!(contract.set_metadata(token, name.clone(), symbol.clone(), decimals)); + assert_eq!( + (&contract.name(token), &contract.symbol(token), &contract.decimals(token)), + (&name, &symbol, &decimals) + ); + // Successfully emit event. + let expected = MetadataSet { token, name, symbol, decimals }.encode(); + assert_eq!(contract.last_event(), expected); + // Token is not live, i.e. frozen or being destroyed. + start_destroy(&contract.account_id(), token); + assert_noop!(contract.set_metadata(token, "".into(), "".into(), decimals), NotLive); + }); } #[test] @@ -583,36 +571,25 @@ fn clear_metadata_works() { let mut contract = Contract::new(&owner, INIT_VALUE); // Token does not exist. - // assert_eq!(contract.clear_metadata(TokenId::MAX), Err(Module { index: 52, error: [3, - // 0] }),); + assert_noop!(contract.clear_metadata(TokenId::MAX), Unknown); // No Permission. - // assert_eq!(contract.clear_metadata(token), Err(Module { index: 52, error: [2, 0] - // }),); + assert_noop!(contract.clear_metadata(token), NoPermission); let token = contract.create(to_address(&owner), 1.into()).unwrap(); // Token is not live, i.e. frozen or being destroyed. freeze(&owner, token); - // assert_eq!( - // contract.clear_metadata(&addr, token), - // Err(Module { index: 52, error: [16, 0] }), - // ); + assert_noop!(contract.clear_metadata(token), NotLive); thaw(&owner, token); // No metadata set. - // assert_eq!( - // contract.clear_metadata(&addr, token), - // Err(Module { index: 52, error: [3, 0] }), - // ); - contract.set_metadata(token, name, symbol, decimals); + assert_noop!(contract.clear_metadata(token), Unknown); + assert_ok!(contract.set_metadata(token, name, symbol, decimals)); // Clear metadata successfully. - contract.clear_metadata(token); + assert_ok!(contract.clear_metadata(token)); // Successfully emit event. let expected = MetadataCleared { token }.encode(); assert_eq!(contract.last_event(), expected); // Token is not live, i.e. frozen or being destroyed. start_destroy(&contract.account_id(), token); - // assert_eq!( - // contract.set_metadata(&addr, TOKEN_ID, vec![0], vec![0], decimals), - // Err(Module { index: 52, error: [16, 0] }), - // ); + assert_noop!(contract.clear_metadata(token), NotLive); }); } @@ -648,22 +625,16 @@ fn mint_works() { let mut contract = Contract::new(&owner, INIT_VALUE); // Token does not exist. - // assert_eq!(mint(&addr, TokenId::MAX, &BOB, amount), Err(Token(UnknownAsset))); + assert_noop!(contract.mint(TokenId::MAX, to_address(&account), amount.into()), Unknown); // Minting can only be done by the owner. - // assert_eq!( - // contract.mint(token, &to_address(&account), 1.into()), - // Err(Module { index: 52, error: [2, 0] }) - // ); + assert_noop!(contract.mint(token, to_address(&account), amount.into()), NoPermission); // Contract must be admin in order to be able to mint. let token = contract.create(contract.address, 2.into()).unwrap(); // Minimum balance of a token can not be zero. - // assert_eq!(contract.mint(token, &account, 1.into()), Err(Token(BelowMinimum))); + assert_noop!(contract.mint(token, to_address(&account), 1.into()), BelowMinimum); // Token is not live, i.e. frozen or being destroyed. freeze(&contract.account_id(), token); - // assert_eq!( - // contract.mint(token, to_address(&account), amount), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.mint(token, to_address(&account), amount.into()), NotLive); thaw(&contract.account_id(), token); assert_noop!(contract.mint(token, H160::zero(), 0.into()), ZeroRecipientAddress); assert_noop!(contract.mint(token, to_address(&account), 0.into()), ZeroValue); @@ -673,16 +644,10 @@ fn mint_works() { let balance_after_mint = Assets::balance(token, &account); assert_eq!(balance_after_mint, balance_before_mint + amount); // Account can not hold more tokens than Balance::MAX. - // assert_eq!( - // contract.mint(token, to_address(&account), Balance::MAX.into()), - // Err(Arithmetic(Overflow)) - // ); + assert_noop!(contract.mint(token, to_address(&account), Balance::MAX.into()), Overflow); // Token is being destroyed. start_destroy(&contract.account_id(), token); - // assert_eq!( - // contract.mint(token, to_address(&account), amount.into()), - // Err(Token(UnknownAsset)) - // ); + assert_noop!(contract.mint(token, to_address(&account), amount.into()), Unknown); }); } @@ -700,29 +665,23 @@ fn burn_works() { let mut contract = Contract::new(&owner, INIT_VALUE); // Token does not exist. - // assert_eq!( - // contract.burn(&addr, TokenId::MAX, &account, 0.into()), - // Err(Module { index: 52, error: [3, 0] }) - // ); + assert_noop!( + contract.burn(TokenId::MAX, to_address(&account), amount.into()), + InsufficientBalance // Balance is checked before burn attempt + ); // Account has no tokens. - // assert_eq!( - // contract.burn(token, to_address(&account), amount.into()), - // Err(Module { index: 52, error: [0, 0] }) - // ); + assert_noop!( + contract.burn(token, to_address(&owner), amount.into()), + InsufficientBalance + ); // Burning can only be done by the manager. - // assert_eq!( - // contract.burn(token, to_address(&account), 1.into()), - // Err(Module { index: 52, error: [2, 0] }) - // ); + assert_noop!(contract.burn(token, to_address(&account), amount.into()), NoPermission); // Contract must be admin in order to be able to burn. let token = contract.create(contract.address, 1.into()).unwrap(); assert_ok!(contract.mint(token, to_address(&account), (amount * 2).into())); // Token is not live, i.e. frozen or being destroyed. freeze(&contract.account_id(), token); - // assert_eq!( - // contract.burn(token, to_address(&account), amount.into()), - // Err(Module { index: 52, error: [16, 0] }) - // ); + assert_noop!(contract.burn(token, to_address(&account), amount.into()), NotLive); thaw(&contract.account_id(), token); assert_noop!(contract.burn(token, H160::zero(), 0.into()), ZeroSenderAddress); assert_noop!(contract.burn(token, to_address(&account), 0.into()), ZeroValue); @@ -733,10 +692,7 @@ fn burn_works() { assert_eq!(balance_after_burn, balance_before_burn - amount); // Token is not live, i.e. frozen or being destroyed. start_destroy(&contract.account_id(), token); - // assert_eq!( - // contract.burn(token, to_address(&account), amount), - // Err(Module { index: 52, error: [17, 0] }) - // ); + assert_noop!(contract.burn(token, to_address(&account), amount.into()), NotLive); }); } @@ -799,9 +755,10 @@ impl Contract { Ok(()) } - fn clear_metadata(&mut self, token: TokenId) { + fn clear_metadata(&mut self, token: TokenId) -> Result<(), Error> { let call = clearMetadataCall { token }; - self.call::<_, Error>(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn create(&mut self, admin: H160, min_balance: U256) -> Result { @@ -858,14 +815,22 @@ impl Contract { self.call::<_, Error>(&self.creator, call, 0).unwrap() } - fn set_metadata(&mut self, token: TokenId, name: String, symbol: String, decimals: u8) { + fn set_metadata( + &mut self, + token: TokenId, + name: String, + symbol: String, + decimals: u8, + ) -> Result<(), Error> { let call = setMetadataCall { token, name, symbol, decimals }; - self.call::<_, Error>(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } - fn start_destroy(&mut self, token: TokenId) { + fn start_destroy(&mut self, token: TokenId) -> Result<(), Error> { let call = startDestroyCall { token }; - self.call::<_, Error>(&self.creator, call, 0).unwrap(); + self.call(&self.creator, call, 0)?; + Ok(()) } fn symbol(&self, token: TokenId) -> String { @@ -919,7 +884,10 @@ impl Contract { let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) .expect("should work"); match result.did_revert() { - true => Err(E::decode(&result.data).expect("unable to decode error value")), + true => Err(E::decode(&result.data).expect(&format!( + "unable to decode error value from '{:?}'", + String::from_utf8_lossy(&result.data) + ))), false => Ok(T::abi_decode_returns(&result.data).expect("unable to decode success value")), } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index e55bb30bf..d8de9aa9a 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -5,10 +5,7 @@ use std::path::Path; use frame_support::{assert_ok, weights::Weight}; use pallet_assets::{Instance1, NextAssetId}; use pallet_revive::{ - precompiles::alloy::{ - primitives as alloy, - sol_types::{SolCall, SolType, SolValue}, - }, + precompiles::alloy::{primitives as alloy, sol_types::SolCall}, test_utils::{ALICE, BOB, CHARLIE}, AccountId32Mapper, AddressMapper, Code, DepositLimit, ExecReturnValue, H160, U256, }; @@ -64,10 +61,6 @@ fn blake_selector(input: &str) -> [u8; 4] { .expect("hash length > 4") } -fn decode::RustType>>(data: &[u8]) -> T { - T::abi_decode(data).expect("unable to decode") -} - // Deploy, instantiate and return contract address. fn instantiate( origin: RuntimeOrigin, diff --git a/pop-api-vnext/src/fungibles.rs b/pop-api-vnext/src/fungibles.rs index 79b5fab99..ad69a57a9 100644 --- a/pop-api-vnext/src/fungibles.rs +++ b/pop-api-vnext/src/fungibles.rs @@ -3,7 +3,7 @@ use ink::{ prelude::{string::String, vec::Vec}, U256, }; -use sol::*; +use sol::Sol; pub use v0::*; use super::*; diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 6ff03f79b..f76305331 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -3,7 +3,7 @@ use ink::sol::SolErrorEncode; use super::*; #[derive(ink::SolErrorDecode, ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal pub enum Error { /// Indicates a failure with the `spender`’s `allowance`. ERC20InsufficientAllowance(Address, U256, U256), @@ -37,24 +37,24 @@ impl<'a> ink::SolEncode<'a> for Error { fn error_encoding_works() { for (result, expected) in [ ( - ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).encode(), "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ), ( - ERC20InsufficientBalance([255u8; 20].into(), U256::MAX, U256::MAX).abi_encode(), + ERC20InsufficientBalance([255u8; 20].into(), U256::MAX, U256::MAX).encode(), "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ), - (ERC20InsufficientValue.abi_encode(),"bffe98ad"), + (ERC20InsufficientValue.encode(),"bffe98ad"), ( - ERC20InvalidApprover([255u8; 20].into()).abi_encode(), + ERC20InvalidApprover([255u8; 20].into()).encode(), "e602df05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), ( - ERC20InvalidReceiver([255u8; 20].into()).abi_encode(), + ERC20InvalidReceiver([255u8; 20].into()).encode(), "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), ( - ERC20InvalidSender([255u8; 20].into()).abi_encode(), + ERC20InvalidSender([255u8; 20].into()).encode(), "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), ] { diff --git a/pop-api-vnext/src/fungibles/v0.rs b/pop-api-vnext/src/fungibles/v0.rs index a94f77fd7..0f7ed9780 100644 --- a/pop-api-vnext/src/fungibles/v0.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -98,7 +98,7 @@ pub trait Fungibles { /// - `token` - The token to be destroyed. #[ink(message)] #[allow(non_snake_case)] - fn startDestroy(&self, token: TokenId); + fn startDestroy(&self, token: TokenId) -> Result<(), Error>; /// Set the metadata for a token. /// @@ -109,7 +109,13 @@ pub trait Fungibles { /// - `decimals`: The number of decimals this token uses to represent one unit. #[ink(message)] #[allow(non_snake_case)] - fn setMetadata(&self, token: TokenId, name: String, symbol: String, decimals: u8); + fn setMetadata( + &self, + token: TokenId, + name: String, + symbol: String, + decimals: u8, + ) -> Result<(), Error>; /// Clear the metadata for a token. /// @@ -117,7 +123,7 @@ pub trait Fungibles { /// - `token` - The token to update. #[ink(message)] #[allow(non_snake_case)] - fn clearMetadata(&self, token: TokenId); + fn clearMetadata(&self, token: TokenId) -> Result<(), Error>; /// Creates `value` amount of tokens and assigns them to `account`, increasing the total /// supply. @@ -255,7 +261,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> /// # Parameters /// - `token` - The token to update. #[inline] -pub fn clear_metadata(token: TokenId) { +pub fn clear_metadata(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.clearMetadata(token) @@ -366,7 +372,12 @@ pub fn name(token: TokenId) -> String { /// - `symbol`: The exchange symbol for this token. /// - `decimals`: The number of decimals this token uses to represent one unit. #[inline] -pub fn set_metadata(token: TokenId, name: String, symbol: String, decimals: u8) { +pub fn set_metadata( + token: TokenId, + name: String, + symbol: String, + decimals: u8, +) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.setMetadata(token, name, symbol, decimals) @@ -377,7 +388,7 @@ pub fn set_metadata(token: TokenId, name: String, symbol: String, decimals: u8) /// # Parameters /// - `token` - The token to be destroyed. #[inline] -pub fn start_destroy(token: TokenId) { +pub fn start_destroy(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.startDestroy(token) diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index c32dc8582..8a0d82d81 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -1,17 +1,38 @@ -use ink::sol::SolErrorEncode; +use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; +use ink::{ + sol::{SolErrorDecode, SolErrorEncode}, + sol_error_selector, +}; use super::*; +use crate::sol::PrecompileError; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] -#[derive(ink::SolErrorDecode, ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] +#[derive(ink::SolErrorEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal pub enum Error { + /// The metadata provided is invalid. + BadMetadata, + /// Account cannot exist with the funds that would be given. + BelowMinimum, + /// Account cannot be created. + CannotCreate, + /// The account balance is insufficient. + InsufficientBalance, /// The token recipient is invalid. InvalidRecipient(Address), /// The minimum balance should be non-zero. MinBalanceZero, /// The signing account has no permission to do the operation. NoPermission, + /// The token is not live, and likely being destroyed. + NotLive, + /// The token balance overflowed. + Overflow, + /// No approval exists that would allow the transfer. + Unapproved, + /// The given token identifier is unknown. + Unknown, /// The `admin` address cannot be the zero address. ZeroAdminAddress, /// The recipient cannot be the zero address. @@ -22,6 +43,54 @@ pub enum Error { ZeroValue, } +impl SolErrorDecode for Error { + fn decode(data: &[u8]) -> Result { + use crate::sol::{Error, ERROR}; + + if data.len() < 4 || data[..4] != ERROR { + return ::decode(data); + } + + // Decode as `Error(string)`, then via `base64::decode` and finally decode into `Error` + let error = Error::decode(data)?; + let data = BASE64.decode(error.0).map_err(|_| ink::sol::Error)?; + return ::decode(data.as_slice()); + } +} + +impl crate::sol::PrecompileError for Error { + fn decode(data: &[u8]) -> Result { + if data.len() < 4 { + return Err(ink::sol::Error); + } + + match data[..4].try_into().expect("length checked above") { + BAD_METADATA => Ok(Self::BadMetadata), + BELOW_MINIMUM => Ok(Self::BelowMinimum), + CANNOT_CREATE => Ok(Self::CannotCreate), + INSUFFICIENT_BALANCE => Ok(Self::InsufficientBalance), + INVALID_RECIPIENT => { + #[derive(ink::SolErrorDecode)] + struct InvalidRecipient(Address); + + let decoded = InvalidRecipient::decode(data)?; + Ok(Self::InvalidRecipient(decoded.0)) + }, + MIN_BALANCE_ZERO => Ok(Self::MinBalanceZero), + NO_PERMISSION => Ok(Self::NoPermission), + NOT_LIVE => Ok(Self::NotLive), + OVERFLOW => Ok(Self::Overflow), + UNAPPROVED => Ok(Self::Unapproved), + UNKNOWN => Ok(Self::Unknown), + ZERO_ADMIN_ADDRESS => Ok(Self::ZeroAdminAddress), + ZERO_RECIPIENT_ADDRESS => Ok(Self::ZeroRecipientAddress), + ZERO_SENDER_ADDRESS => Ok(Self::ZeroSenderAddress), + ZERO_VALUE => Ok(Self::ZeroValue), + _ => Err(ink::sol::Error), + } + } +} + impl<'a> ink::SolEncode<'a> for Error { type SolType = (); @@ -34,20 +103,59 @@ impl<'a> ink::SolEncode<'a> for Error { } } +const BAD_METADATA: [u8; 4] = sol_error_selector!("BadMetadata", ()); +const BELOW_MINIMUM: [u8; 4] = sol_error_selector!("BelowMinimum", ()); +const CANNOT_CREATE: [u8; 4] = sol_error_selector!("CannotCreate", ()); +const INSUFFICIENT_BALANCE: [u8; 4] = sol_error_selector!("InsufficientBalance", ()); +const INVALID_RECIPIENT: [u8; 4] = sol_error_selector!("InvalidRecipient", (Address,)); +const MIN_BALANCE_ZERO: [u8; 4] = sol_error_selector!("MinBalanceZero", ()); +const NO_PERMISSION: [u8; 4] = sol_error_selector!("NoPermission", ()); +const NOT_LIVE: [u8; 4] = sol_error_selector!("NotLive", ()); +const OVERFLOW: [u8; 4] = sol_error_selector!("Overflow", ()); +const UNAPPROVED: [u8; 4] = sol_error_selector!("Unapproved", ()); +const UNKNOWN: [u8; 4] = sol_error_selector!("Unknown", ()); +const ZERO_ADMIN_ADDRESS: [u8; 4] = sol_error_selector!("ZeroAdminAddress", ()); +const ZERO_RECIPIENT_ADDRESS: [u8; 4] = sol_error_selector!("ZeroRecipientAddress", ()); +const ZERO_SENDER_ADDRESS: [u8; 4] = sol_error_selector!("ZeroSenderAddress", ()); +const ZERO_VALUE: [u8; 4] = sol_error_selector!("ZeroValue", ()); + #[test] fn error_encoding_works() { for (result, expected) in [ ( - InvalidRecipient([255u8; 20].into()).abi_encode(), + InvalidRecipient([255u8; 20].into()).encode(), "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", ), - (MinBalanceZero.abi_encode(), "5f15618b"), - (NoPermission.abi_encode(), "9d7b369d"), - (ZeroAdminAddress.abi_encode(), "3ef39b81"), - (ZeroRecipientAddress.abi_encode(), "ceef9857"), - (ZeroSenderAddress.abi_encode(), "ff362bc4"), - (ZeroValue.abi_encode(), "7c946ed7"), + (MinBalanceZero.encode(), "5f15618b"), + (NoPermission.encode(), "9d7b369d"), + (ZeroAdminAddress.encode(), "3ef39b81"), + (ZeroRecipientAddress.encode(), "ceef9857"), + (ZeroSenderAddress.encode(), "ff362bc4"), + (ZeroValue.encode(), "7c946ed7"), ] { assert_eq!(hex::encode(result), expected) } } + +#[test] +fn selectors_work() { + for (encoded, expected) in [ + (Error::BadMetadata.encode(), BAD_METADATA), + (Error::BelowMinimum.encode(), BELOW_MINIMUM), + (Error::CannotCreate.encode(), CANNOT_CREATE), + (Error::InsufficientBalance.encode(), INSUFFICIENT_BALANCE), + (Error::InvalidRecipient(Address::default()).encode()[..4].to_vec(), INVALID_RECIPIENT), + (Error::MinBalanceZero.encode(), MIN_BALANCE_ZERO), + (Error::NoPermission.encode(), NO_PERMISSION), + (Error::NotLive.encode(), NOT_LIVE), + (Error::Overflow.encode(), OVERFLOW), + (Error::Unapproved.encode(), UNAPPROVED), + (Error::Unknown.encode(), UNKNOWN), + (Error::ZeroAdminAddress.encode(), ZERO_ADMIN_ADDRESS), + (Error::ZeroRecipientAddress.encode(), ZERO_RECIPIENT_ADDRESS), + (Error::ZeroSenderAddress.encode(), ZERO_SENDER_ADDRESS), + (Error::ZeroValue.encode(), ZERO_VALUE), + ] { + assert_eq!(encoded, expected); + } +} diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index 65a3c5e28..9713d81f4 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolEncode}; +pub use ink::{abi::Sol, prelude::string::String, primitives::sol::SolErrorDecode, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. @@ -8,3 +8,13 @@ pub fn revert(error: &impl for<'a> SolEncode<'a>) -> ! { use ink::env::{return_value_solidity, ReturnFlags}; return_value_solidity(ReturnFlags::REVERT, error) } + +// Decoding of an error from a precompile, where custom errors have been base64 encoded. +pub(crate) trait PrecompileError: Sized { + fn decode(data: &[u8]) -> Result; +} + +pub(crate) const ERROR: [u8; 4] = ink::sol_error_selector!("Error", (String,)); + +#[derive(ink::SolErrorDecode)] +pub(crate) struct Error(pub(crate) String); From 781cf6236f3a7bd8312d564d5ebf7859a525d1ec Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 13:06:13 +0100 Subject: [PATCH 166/284] refactor(api): improved erc20 error handling --- pallets/api-vnext/src/errors.rs | 3 + .../api-vnext/src/fungibles/precompiles.rs | 5 + .../src/fungibles/precompiles/erc20.rs | 2 +- .../src/fungibles/precompiles/erc20/v0.rs | 151 +++++++++++++++++- .../precompiles/interfaces/v0/IERC20.sol | 11 ++ .../api-vnext/src/fungibles/precompiles/v0.rs | 5 - pallets/api-vnext/src/lib.rs | 1 - .../src/fungibles/erc20/v0/errors.rs | 102 ++++++++++-- pop-api-vnext/src/fungibles/v0/errors.rs | 41 +---- pop-api-vnext/src/sol.rs | 43 ++++- 10 files changed, 299 insertions(+), 65 deletions(-) diff --git a/pallets/api-vnext/src/errors.rs b/pallets/api-vnext/src/errors.rs index 4e520a2be..e691bcc8e 100644 --- a/pallets/api-vnext/src/errors.rs +++ b/pallets/api-vnext/src/errors.rs @@ -3,6 +3,7 @@ /// /// Used as `assert_revert!(expression_to_assert, expected_error_expression)`. #[cfg(test)] +#[macro_export] macro_rules! assert_revert { ($x:expr, $e:expr $(,)?) => {{ use pallet_revive::precompiles::{alloy::sol_types::Revert, Error}; @@ -23,6 +24,7 @@ macro_rules! assert_revert { /// base64-encoding of the specified Solidity error. /// /// Used as `ensure!(expression_to_ensure, error_to_return_on_false)`. +#[macro_export] macro_rules! ensure { ($x:expr, $e:expr $(,)?) => {{ use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; @@ -40,6 +42,7 @@ macro_rules! ensure { /// Implement [`From`] for Solidity errors, which converts the error into a [`Revert`] error with /// the reason containing a base64-encoding of the specified Solidity error. +#[macro_export] macro_rules! impl_from_sol_error { ($($error_type:path),+ $(,)?) => { $( diff --git a/pallets/api-vnext/src/fungibles/precompiles.rs b/pallets/api-vnext/src/fungibles/precompiles.rs index baa84bf2e..566f23835 100644 --- a/pallets/api-vnext/src/fungibles/precompiles.rs +++ b/pallets/api-vnext/src/fungibles/precompiles.rs @@ -1,5 +1,10 @@ use alloc::string::String; +use codec::Decode; +use frame_support::{ + sp_runtime::{ArithmeticError, DispatchError, ModuleError, TokenError}, + traits::PalletInfo, +}; pub(super) use pallet_revive::precompiles::alloy::{ primitives::{Address, U256}, sol_types::SolCall, diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 20bf9325c..4b6415e55 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,4 +1,4 @@ -use super::{SolCall, U256}; +use super::*; /// The first version of the Erc20 API. pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index 0d941d96a..06b25c9ce 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -62,16 +62,21 @@ where }, IERC20Calls::transfer(transferCall { to, value }) => { env.charge(>::WeightInfo::transfer())?; - let from = >::to_address(env.caller().account_id()?).0.into(); + let origin = env.caller(); + let account = origin.account_id()?; + let from = >::to_address(&account).0.into(); ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); + let balance = balance::(token.clone(), &account).try_convert()?; + transfer::( - to_runtime_origin(env.caller()), + to_runtime_origin(origin), token, env.to_account_id(&(*to.0).into()), (*value).try_convert()?, - )?; + ) + .map_err(|e| Self::map_transfer_err(e, &from, value, &balance))?; deposit_event(env, Transfer { from, to: *to, value: *value })?; Ok(transferCall::abi_encode_returns(&true)) @@ -123,17 +128,24 @@ where }, IERC20Calls::transferFrom(transferFromCall { from, to, value }) => { env.charge(>::WeightInfo::transfer_from())?; + let origin = env.caller(); + let account = origin.account_id()?; ensure!(!from.is_zero(), ERC20InvalidSender { sender: *from }); ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); + let owner = env.to_account_id(&(*from.0).into()); + let spender = >::to_address(&account).0.into(); + let allowance = allowance::(token.clone(), &owner, &account).try_convert()?; + transfer_from::( - to_runtime_origin(env.caller()), + to_runtime_origin(origin), token, - env.to_account_id(&(*from.0).into()), + owner, env.to_account_id(&(*to.0).into()), (*value).try_convert()?, - )?; + ) + .map_err(|e| Self::map_transfer_from_err(e, &spender, value, &allowance))?; deposit_event(env, Transfer { from: *from, to: *to, value: *value })?; Ok(transferFromCall::abi_encode_returns(&true)) @@ -171,6 +183,69 @@ impl, I: 'static> Erc20 [u8; 20] { prefixed_address(PREFIX, id) } + + // Maps select, domain-specific dispatch errors to ERC20 errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_transfer_err(e: DispatchError, from: &Address, value: &U256, balance: &U256) -> Error { + match e { + DispatchError::Module(ModuleError { index, error, .. }) + if Some(index as usize) == + T::PalletInfo::index::>() => + { + use pallet_assets::{Error, Error::*}; + Error::::decode(&mut error.as_slice()).ok().and_then(|error| match error { + BalanceLow => Some( + IERC20::ERC20InsufficientBalance { + sender: *from, + balance: *balance, + needed: *value, + } + .into(), + ), + _ => None, + }) + }, + _ => None, + } + .unwrap_or_else(|| e.into()) + } + + // Maps select, domain-specific dispatch errors to ERC20 errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_transfer_from_err( + e: DispatchError, + spender: &Address, + value: &U256, + allowance: &U256, + ) -> Error { + match e { + DispatchError::Module(ModuleError { index, error, .. }) + if Some(index as usize) == + T::PalletInfo::index::>() => + { + use pallet_assets::{Error, Error::*}; + Error::::decode(&mut error.as_slice()).ok().and_then(|error| match error { + Unapproved => Some( + IERC20::ERC20InsufficientAllowance { + spender: *spender, + allowance: *allowance, + needed: *value, + } + .into(), + ), + _ => None, + }) + }, + _ => None, + } + .unwrap_or_else(|| e.into()) + } +} + +// Encoding of custom errors via `Error(String)`. +impl_from_sol_error! { + IERC20::ERC20InsufficientAllowance, + IERC20::ERC20InsufficientBalance, } #[cfg(test)] @@ -268,6 +343,31 @@ mod tests { }); } + #[test] + fn transfer_reverts_with_insufficient_balance() { + let token = 1; + let origin = ALICE; + let endowment = 10_000_000; + let to = BOB; + ExtBuilder::new() + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, origin.clone(), endowment)]) + .build() + .execute_with(|| { + let value = U256::from(endowment + 1); + let call = transferCall { to: to_address(&to).0.into(), value }; + let transfer = IERC20Calls::transfer(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer), + ERC20InsufficientBalance { + sender: to_address(&origin).0.into(), + balance: U256::from(endowment), + needed: value + } + ); + }); + } + #[test] fn transfer_works() { let token = 1; @@ -441,6 +541,45 @@ mod tests { }); } + #[test] + fn transfer_from_reverts_with_insufficient_allowance() { + let token = 1; + let origin = BOB; + let from = ALICE; + let endowment = 10_000_000; + let to = CHARLIE; + let allowance = endowment / 2; + ExtBuilder::new() + .with_balances(vec![(from.clone(), UNIT)]) + .with_assets(vec![(token, CHARLIE, true, 1)]) + .with_asset_balances(vec![(token, from.clone(), endowment)]) + .build() + .execute_with(|| { + assert_ok!(approve::( + RuntimeOrigin::signed(from.clone()), + token, + origin.clone(), + allowance + )); + + let value = U256::from(allowance + 1); + let call = transferFromCall { + from: to_address(&from).0.into(), + to: to_address(&to).0.into(), + value, + }; + let transfer_from = IERC20Calls::transferFrom(call); + assert_revert!( + call_precompile::<()>(&origin, token, &transfer_from), + ERC20InsufficientAllowance { + spender: to_address(&origin).0.into(), + allowance: U256::from(allowance), + needed: value + } + ); + }); + } + #[test] fn transfer_from_works() { let token = 1; diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol index 2d21c68d4..4a01b05ba 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol @@ -102,6 +102,17 @@ interface IERC20 { */ function decimals() external view returns (uint8); + /** + * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. + * @param spender Address that may be allowed to operate on tokens without being their owner. + * @param allowance Amount of tokens a `spender` is allowed to operate with. + * @param needed Minimum amount required to perform a transfer. + */ + error ERC20InsufficientAllowance( + address spender, + uint256 allowance, + uint256 needed + ); /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index bd28fe532..592306c05 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -1,8 +1,3 @@ -use codec::Decode; -use frame_support::{ - sp_runtime::{ArithmeticError, DispatchError, ModuleError, TokenError}, - traits::PalletInfo, -}; pub(crate) use IFungibles::*; use super::*; diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 16e793750..377d8d776 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -38,7 +38,6 @@ use { }, }; -#[macro_use] mod errors; #[cfg(feature = "fungibles")] pub mod fungibles; diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index f76305331..01a0cb263 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -1,8 +1,9 @@ -use ink::sol::SolErrorEncode; +use ink::{sol::SolErrorDecode, sol_error_selector}; use super::*; +use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; -#[derive(ink::SolErrorDecode, ink::SolErrorEncode)] +#[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal pub enum Error { /// Indicates a failure with the `spender`’s `allowance`. @@ -11,8 +12,6 @@ pub enum Error { ERC20InsufficientBalance(Address, U256, U256), /// Indicates an error related to a specified `value`. ERC20InsufficientValue, - /// Indicates a failure with the `approver` of a token to be approved. - ERC20InvalidApprover(Address), /// Indicates a failure with the token `receiver`. ERC20InvalidReceiver(Address), /// Indicates a failure with the token `sender`. @@ -21,20 +20,69 @@ pub enum Error { ERC20InvalidSpender(Address), } -impl<'a> ink::SolEncode<'a> for Error { - type SolType = (); +impl_sol_encoding_for_precompile!(Error); - fn encode(&'a self) -> Vec { - SolErrorEncode::encode(self) - } +impl PrecompileError for Error { + fn decode(data: &[u8]) -> Result { + if data.len() < 4 { + return Err(ink::sol::Error); + } + + match data[..4].try_into().expect("length checked above") { + INSUFFICIENT_ALLOWANCE => { + #[derive(ink::SolErrorDecode)] + struct ERC20InsufficientAllowance(Address, U256, U256); + + let decoded = ERC20InsufficientAllowance::decode(data)?; + Ok(Self::ERC20InsufficientAllowance(decoded.0, decoded.1, decoded.2)) + }, + INSUFFICIENT_BALANCE => { + #[derive(ink::SolErrorDecode)] + struct ERC20InsufficientBalance(Address, U256, U256); + + let decoded = ERC20InsufficientBalance::decode(data)?; + Ok(Self::ERC20InsufficientBalance(decoded.0, decoded.1, decoded.2)) + }, + INSUFFICIENT_VALUE => Ok(Self::ERC20InsufficientValue), + INVALID_RECEIVER => { + #[derive(ink::SolErrorDecode)] + struct ERC20InvalidReceiver(Address); - fn to_sol_type(&'a self) -> Self::SolType { - () + let decoded = ERC20InvalidReceiver::decode(data)?; + Ok(Self::ERC20InvalidReceiver(decoded.0)) + }, + INVALID_SENDER => { + #[derive(ink::SolErrorDecode)] + struct ERC20InvalidSender(Address); + + let decoded = ERC20InvalidSender::decode(data)?; + Ok(Self::ERC20InvalidSender(decoded.0)) + }, + INVALID_SPENDER => { + #[derive(ink::SolErrorDecode)] + struct ERC20InvalidSpender(Address); + + let decoded = ERC20InvalidSpender::decode(data)?; + Ok(Self::ERC20InvalidSpender(decoded.0)) + }, + _ => Err(ink::sol::Error), + } } } +const INSUFFICIENT_ALLOWANCE: [u8; 4] = + sol_error_selector!("ERC20InsufficientAllowance", (Address, U256, U256)); +const INSUFFICIENT_BALANCE: [u8; 4] = + sol_error_selector!("ERC20InsufficientBalance", (Address, U256, U256)); +const INSUFFICIENT_VALUE: [u8; 4] = sol_error_selector!("ERC20InsufficientValue", ()); +const INVALID_RECEIVER: [u8; 4] = sol_error_selector!("ERC20InvalidReceiver", (Address,)); +const INVALID_SENDER: [u8; 4] = sol_error_selector!("ERC20InvalidSender", (Address,)); +const INVALID_SPENDER: [u8; 4] = sol_error_selector!("ERC20InvalidSpender", (Address,)); + #[test] fn error_encoding_works() { + use ink::SolEncode; + for (result, expected) in [ ( ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).encode(), @@ -45,10 +93,6 @@ fn error_encoding_works() { "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ), (ERC20InsufficientValue.encode(),"bffe98ad"), - ( - ERC20InvalidApprover([255u8; 20].into()).encode(), - "e602df05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" - ), ( ERC20InvalidReceiver([255u8; 20].into()).encode(), "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" @@ -57,7 +101,35 @@ fn error_encoding_works() { ERC20InvalidSender([255u8; 20].into()).encode(), "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), + ( + ERC20InvalidSpender([255u8; 20].into()).encode(), + "94280d62000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" + ), ] { assert_eq!(hex::encode(result), expected) } } + +#[test] +fn selectors_work() { + use ink::SolEncode; + + for (encoded, expected) in [ + ( + Error::ERC20InsufficientAllowance(Address::default(), U256::default(), U256::default()) + .encode(), + INSUFFICIENT_ALLOWANCE, + ), + ( + Error::ERC20InsufficientBalance(Address::default(), U256::default(), U256::default()) + .encode(), + INSUFFICIENT_BALANCE, + ), + (Error::ERC20InsufficientValue.encode(), INSUFFICIENT_VALUE), + (Error::ERC20InvalidReceiver(Address::default()).encode(), INVALID_RECEIVER), + (Error::ERC20InvalidSender(Address::default()).encode(), INVALID_SENDER), + (Error::ERC20InvalidSpender(Address::default()).encode(), INVALID_SPENDER), + ] { + assert_eq!(encoded[..4], expected); + } +} diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index 8a0d82d81..a54b38721 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -1,11 +1,7 @@ -use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; -use ink::{ - sol::{SolErrorDecode, SolErrorEncode}, - sol_error_selector, -}; +use ink::{sol::SolErrorDecode, sol_error_selector}; use super::*; -use crate::sol::PrecompileError; +use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] @@ -43,22 +39,9 @@ pub enum Error { ZeroValue, } -impl SolErrorDecode for Error { - fn decode(data: &[u8]) -> Result { - use crate::sol::{Error, ERROR}; - - if data.len() < 4 || data[..4] != ERROR { - return ::decode(data); - } +impl_sol_encoding_for_precompile!(Error); - // Decode as `Error(string)`, then via `base64::decode` and finally decode into `Error` - let error = Error::decode(data)?; - let data = BASE64.decode(error.0).map_err(|_| ink::sol::Error)?; - return ::decode(data.as_slice()); - } -} - -impl crate::sol::PrecompileError for Error { +impl PrecompileError for Error { fn decode(data: &[u8]) -> Result { if data.len() < 4 { return Err(ink::sol::Error); @@ -91,18 +74,6 @@ impl crate::sol::PrecompileError for Error { } } -impl<'a> ink::SolEncode<'a> for Error { - type SolType = (); - - fn encode(&'a self) -> Vec { - SolErrorEncode::encode(self) - } - - fn to_sol_type(&'a self) -> Self::SolType { - () - } -} - const BAD_METADATA: [u8; 4] = sol_error_selector!("BadMetadata", ()); const BELOW_MINIMUM: [u8; 4] = sol_error_selector!("BelowMinimum", ()); const CANNOT_CREATE: [u8; 4] = sol_error_selector!("CannotCreate", ()); @@ -121,6 +92,8 @@ const ZERO_VALUE: [u8; 4] = sol_error_selector!("ZeroValue", ()); #[test] fn error_encoding_works() { + use ink::SolEncode; + for (result, expected) in [ ( InvalidRecipient([255u8; 20].into()).encode(), @@ -139,6 +112,8 @@ fn error_encoding_works() { #[test] fn selectors_work() { + use ink::SolEncode; + for (encoded, expected) in [ (Error::BadMetadata.encode(), BAD_METADATA), (Error::BelowMinimum.encode(), BELOW_MINIMUM), diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index 9713d81f4..82677b523 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, prelude::string::String, primitives::sol::SolErrorDecode, SolEncode}; +pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. @@ -14,7 +14,42 @@ pub(crate) trait PrecompileError: Sized { fn decode(data: &[u8]) -> Result; } -pub(crate) const ERROR: [u8; 4] = ink::sol_error_selector!("Error", (String,)); +#[macro_export] +macro_rules! impl_sol_encoding_for_precompile { + ($($type:ty),*) => { + $( + impl SolErrorDecode for $type { + fn decode(data: &[u8]) -> Result { + use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; + use ink::{prelude::string::String, sol_error_selector}; + use crate::sol::PrecompileError; -#[derive(ink::SolErrorDecode)] -pub(crate) struct Error(pub(crate) String); + // Check if `Error(string)` + pub(crate) const ERROR: [u8; 4] = sol_error_selector!("Error", (String,)); + if data.len() < 4 || data[..4] != ERROR { + return ::decode(data); + } + + // Decode as `Error(string)`, then via `base64::decode` and finally decode into `Error` + #[derive(ink::SolErrorDecode)] + pub(crate) struct Error(pub(crate) String); + let error = Error::decode(data)?; + let data = BASE64.decode(error.0).map_err(|_| ink::sol::Error)?; + return ::decode(data.as_slice()); + } + } + + impl<'a> ink::SolEncode<'a> for $type { + type SolType = (); + + fn encode(&'a self) -> Vec { + ink::primitives::sol::SolErrorEncode::encode(self) + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } + } + )* + }; +} From 189dcb10d8b196f4fac91834e6f813f26a70b17c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 13:13:22 +0100 Subject: [PATCH 167/284] build(deps): add missing base64 feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1e5191ee0..c5db88d2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ resolver = "2" [workspace.dependencies] anyhow = { version = "1.0.81", default-features = false } -base64 = { version = "0.22.1", default-features = false } +base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } clap = { version = "4.5.13", features = [ "derive" ] } codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [ "derive", From ea3786342a61321d49af5117bc7473650f5932ef Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 13:14:03 +0100 Subject: [PATCH 168/284] refactor: resolve missing imports/trait bounds for runtime-benchmarks --- pallets/api-vnext/src/fungibles/benchmarking.rs | 2 +- pallets/api-vnext/src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index e40b65033..d07bd1486 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -58,7 +58,7 @@ type TokenId = >::AssetId; Time: Time> >, // Fungibles - T: pallet_assets::Config + Into + Copy, Balance: TryConvert>, + T: pallet_assets::Config + Into + Copy, Balance: TryConvert> + pallet_balances::Config, alloy::U256: TryConvert, Error = Error> )] mod benchmarks { diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 377d8d776..e2815fd86 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -26,6 +26,7 @@ use pallet_revive::{ #[cfg(feature = "runtime-benchmarks")] use { frame_support::{pallet_prelude::IsType, traits::fungible::Inspect}, + pallet_revive::evm::U256, pallet_revive::precompiles::run::{CallSetup, WasmModule}, }; #[cfg(test)] From 4b4ecc9d02da2ea623fbe3dab81799edd2df9419 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 13:32:10 +0100 Subject: [PATCH 169/284] refactor(pallets/api): resolve clippy warnings --- .../api-vnext/src/fungibles/precompiles/erc20/v0.rs | 8 ++++---- pallets/api-vnext/src/fungibles/precompiles/v0.rs | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index 06b25c9ce..41a99ea73 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -64,11 +64,11 @@ where env.charge(>::WeightInfo::transfer())?; let origin = env.caller(); let account = origin.account_id()?; - let from = >::to_address(&account).0.into(); + let from = >::to_address(account).0.into(); ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); - let balance = balance::(token.clone(), &account).try_convert()?; + let balance = balance::(token.clone(), account).try_convert()?; transfer::( to_runtime_origin(origin), @@ -135,8 +135,8 @@ where ensure!(!value.is_zero(), ERC20InsufficientValue); let owner = env.to_account_id(&(*from.0).into()); - let spender = >::to_address(&account).0.into(); - let allowance = allowance::(token.clone(), &owner, &account).try_convert()?; + let spender = >::to_address(account).0.into(); + let allowance = allowance::(token.clone(), &owner, account).try_convert()?; transfer_from::( to_runtime_origin(origin), diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 592306c05..2030d858d 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -345,10 +345,7 @@ impl + pallet_balances::Config, I: fn map_err(e: DispatchError) -> Error { use DispatchError::*; match e { - Arithmetic(error) => match error { - ArithmeticError::Overflow => IFungibles::Overflow.into(), - _ => e.into(), - }, + Arithmetic(ArithmeticError::Overflow) => IFungibles::Overflow.into(), ConsumerRemaining => IFungibles::InsufficientBalance.into(), Module(ModuleError { index, error, .. }) => { let index = Some(index as usize); @@ -356,10 +353,7 @@ impl + pallet_balances::Config, I: use pallet_balances::{Error, Error::*}; match Error::::decode(&mut error.as_slice()) { - Ok(error) => match error { - InsufficientBalance => IFungibles::InsufficientBalance.into(), - _ => e.into(), - }, + Ok(InsufficientBalance) => IFungibles::InsufficientBalance.into(), _ => e.into(), } } else if index == T::PalletInfo::index::>() { From e8a2a16795c32f16e865882ce38837afe2e4d246 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 13:56:53 +0100 Subject: [PATCH 170/284] test(pallets/api): fix minimum balance consideration with transfer --- pallets/api-vnext/src/fungibles/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/tests.rs b/pallets/api-vnext/src/fungibles/tests.rs index 5c74498e4..24c7ca513 100644 --- a/pallets/api-vnext/src/fungibles/tests.rs +++ b/pallets/api-vnext/src/fungibles/tests.rs @@ -25,7 +25,7 @@ fn transfer_works() { ExtBuilder::new() .with_balances(vec![(from.clone(), ED::get()), (to.clone(), ED::get())]) .with_assets(vec![(token, from.clone(), false, 1)]) - .with_asset_balances(vec![(token, from.clone(), value)]) + .with_asset_balances(vec![(token, from.clone(), value + 1)]) .build() .execute_with(|| { for origin in vec![root(), none()] { From 547728091d7ce876c6dba5dd37c77ba922c57010 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 14:00:48 +0100 Subject: [PATCH 171/284] test(pallets/api): remove unnecessary println --- pallets/api-vnext/src/fungibles/precompiles/v0.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 2030d858d..09ede7b03 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -461,7 +461,6 @@ mod tests { let call = transferCall { token, to, value: U256::from(1) }; let transfer = IFungiblesCalls::transfer(call); let Error::Revert(revert) = Error::from(Unknown) else { panic!() }; - println!("{:?}", revert.abi_encode()); assert_revert!(call_precompile::<()>(&origin, &transfer), Unknown); }); } From 804d1a6b89da7e8583e249758ef9805aea308819 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 14:15:37 +0100 Subject: [PATCH 172/284] test(pallets/api): fix minimum balance consideration with transfer benchmark --- pallets/api-vnext/src/fungibles/benchmarking.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index d07bd1486..ece14a014 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -70,6 +70,7 @@ mod benchmarks { let token = super::create::(owner.clone()); let to = >::to_account_id(&BOB_ADDR); let value: AssetsBalance = u32::MAX.into(); + let min_balance = >::minimum_balance(token); let mut call_setup = set_up_call(); call_setup.set_origin(Origin::Signed(owner.clone())); @@ -80,8 +81,8 @@ mod benchmarks { value: value.try_convert().unwrap(), }); - >::set_balance(token, &owner, value); - assert_eq!(>::balance(token, &owner), value); + >::set_balance(token, &owner, value + min_balance); + assert_eq!(>::balance(token, &owner), value + min_balance); assert_eq!(>::balance(token, &to), 0u8.into()); #[block] @@ -89,7 +90,7 @@ mod benchmarks { assert_ok!(call_precompile::, _, ()>(&mut ext, &ADDRESS, &input)); } - assert_eq!(>::balance(token, &owner), 0u8.into()); + assert_eq!(>::balance(token, &owner), min_balance); assert_eq!(>::balance(token, &to), value); } From 3411f079f5d0401f53b91c79a6acf80f14fa63f1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 14:17:48 +0100 Subject: [PATCH 173/284] fix(api): allow removal of approval with zero value allowance --- .../api-vnext/src/fungibles/precompiles/v0.rs | 32 ++++++++++--------- .../integration-tests/src/fungibles.rs | 1 - pop-api-vnext/src/fungibles/erc20/v0.rs | 1 - pop-api-vnext/src/fungibles/v0.rs | 1 - 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 09ede7b03..1779a432a 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -80,7 +80,6 @@ where let charged = env.charge(>::WeightInfo::approve(1, 1))?; let owner = >::to_address(env.caller().account_id()?).0.into(); ensure!(!spender.is_zero(), ZeroRecipientAddress); - ensure!(!value.is_zero(), ZeroValue); match approve::( to_runtime_origin(env.caller()), @@ -605,18 +604,6 @@ mod tests { }); } - #[test] - fn approve_reverts_with_zero_value() { - let token = 1; - let origin = ALICE; - let spender = [255; 20].into(); - ExtBuilder::new().build().execute_with(|| { - let call = approveCall { token, spender, value: U256::ZERO }; - let approve = IFungiblesCalls::approve(call); - assert_revert!(call_precompile::<()>(&origin, &approve), ZeroValue); - }); - } - #[test] fn approve_reverts_with_insufficient_balance() { let token = 1; @@ -662,9 +649,24 @@ mod tests { assert_eq!(Assets::allowance(token, &origin, &spender), value); let owner = to_address(&origin).0.into(); - let spender = to_address(&spender).0.into(); - let event = Approval { token, owner, spender, value: U256::from(value) }; + let event = Approval { + token, + owner, + spender: to_address(&spender).0.into(), + value: U256::from(value), + }; assert_last_event(ADDRESS, event); + + // Remove approval + assert_ok!(call_precompile::<()>( + &origin, + &IFungiblesCalls::approve(approveCall { + token, + spender: to_address(&spender).0.into(), + value: U256::ZERO + }) + )); + assert_eq!(Assets::allowance(token, &origin, &spender), 0); }); } diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index a64372a6c..f4c0c3957 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -260,7 +260,6 @@ fn approve_works() { assert_noop!(contract.approve(token, to_address(&spender), amount.into()), NotLive); thaw(&owner, token); assert_noop!(contract.approve(token, H160::zero(), 0.into()), ZeroRecipientAddress); - assert_noop!(contract.approve(token, to_address(&spender), 0.into()), ZeroValue); // Successful approvals. assert_eq!(0, Assets::allowance(token, &contract.account_id(), &spender)); assert_ok!(contract.approve(token, to_address(&spender), amount.into())); diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index 920a16543..49f72c511 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -109,7 +109,6 @@ pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { #[inline] pub fn approve(token: TokenId, spender: Address, value: U256) -> Result { ensure!(spender != Address::zero(), ERC20InvalidSpender(spender)); - ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); diff --git a/pop-api-vnext/src/fungibles/v0.rs b/pop-api-vnext/src/fungibles/v0.rs index 0f7ed9780..0e32a2f9d 100644 --- a/pop-api-vnext/src/fungibles/v0.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -221,7 +221,6 @@ pub fn allowance(token: TokenId, owner: Address, spender: Address) -> U256 { #[inline] pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Error> { ensure!(spender != Address::zero(), ZeroRecipientAddress); - ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); From 621db5aa0566607e34b3eaeaf8d201a2895c7b62 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 17:55:06 +0100 Subject: [PATCH 174/284] refactor(api): check set_metadata result after refactoring --- pop-api-vnext/examples/fungibles/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/examples/fungibles/lib.rs b/pop-api-vnext/examples/fungibles/lib.rs index 2dba18ff2..df26ee989 100644 --- a/pop-api-vnext/examples/fungibles/lib.rs +++ b/pop-api-vnext/examples/fungibles/lib.rs @@ -46,7 +46,7 @@ pub mod fungibles { ) -> Result { let mut instance = Self { id: 0, owner: Self::env().caller() }; instance.id = api::create(instance.env().address(), min_balance)?; - api::set_metadata(instance.id, name, symbol, decimals); + api::set_metadata(instance.id, name, symbol, decimals)?; Ok(instance) } From a31d09f4beed0c7f3bf41ec05b61315a0f186e50 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 22:28:26 +0100 Subject: [PATCH 175/284] chore: update cargo.lock after rebase --- Cargo.lock | 1819 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 1680 insertions(+), 139 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f18afc53d..f01cecdc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-core" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5968f48d7a62587cd874bd84034831da4f7f577ce5de984828e376766efc0f32" +checksum = "d47400608fc869727ad81dba058d55f97b29ad8b5c5256d9598523df8f356ab6" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9135eb501feccf7f4cb8a183afd406a65483fdad7bbd7332d0470e5d725c92f" +checksum = "d9e8a436f0aad7df8bb47f144095fba61202265d9f5f09a70b0e3227881a668e" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -141,9 +141,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b26fdd571915bafe857fccba4ee1a4f352965800e46a53e4a5f50187b7776fa" +checksum = "459f98c6843f208856f338bfb25e65325467f7aff35dfeb0484d0a76e059134b" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -153,9 +153,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a326d47106039f38b811057215a92139f46eef7983a4b77b10930a0ea5685b1e" +checksum = "3cfebde8c581a5d37b678d0a48a32decb51efd7a63a08ce2517ddec26db705c8" dependencies = [ "alloy-rlp", "bytes", @@ -190,9 +190,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4be1ce1274ddd7fdfac86e5ece1b225e9bba1f2327e20fbb30ee6b9cc1423fe" +checksum = "aedac07a10d4c2027817a43cc1f038313fc53c7ac866f7363239971fd01f9f18" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e92f3708ea4e0d9139001c86c051c538af0146944a2a9c7181753bd944bf57" +checksum = "24f9a598f010f048d8b8226492b6401104f5a5c1273c2869b72af29b48bb4ba9" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afe1bd348a41f8c9b4b54dfb314886786d6201235b0b3f47198b9d910c86bb2" +checksum = "f494adf9d60e49aa6ce26dfd42c7417aa6d4343cf2ae621f20e4d92a5ad07d85" dependencies = [ "const-hex", "dunce", @@ -238,9 +238,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6195df2acd42df92a380a8db6205a5c7b41282d0ce3f4c665ecf7911ac292f1" +checksum = "52db32fbd35a9c0c0e538b58b81ebbae08a51be029e7ad60e08b60481c2ec6c3" dependencies = [ "serde", "winnow", @@ -248,9 +248,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6185e98a79cf19010722f48a74b5a65d153631d2f038cabd250f4b9e9813b8ad" +checksum = "a285b46e3e0c177887028278f04cc8262b76fd3b8e0e20e93cea0a58c35f5ac5" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -869,7 +869,7 @@ dependencies = [ "frame-system-benchmarking 38.0.0", "frame-system-rpc-runtime-api 34.0.0", "frame-try-runtime 0.44.0", - "hex-literal", + "hex-literal 0.4.1", "log", "pallet-asset-conversion 20.0.0", "pallet-asset-conversion-tx-payment 20.0.0", @@ -957,7 +957,7 @@ dependencies = [ "frame-system-benchmarking 41.0.0", "frame-system-rpc-runtime-api 37.0.0", "frame-try-runtime 0.47.0", - "hex-literal", + "hex-literal 0.4.1", "log", "pallet-asset-conversion 23.0.0", "pallet-asset-conversion-ops", @@ -976,7 +976,7 @@ dependencies = [ "pallet-nfts 35.0.0", "pallet-nfts-runtime-api 27.0.0", "pallet-proxy 41.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-session 41.0.0", "pallet-state-trie-migration 46.0.0", "pallet-timestamp 40.0.0", @@ -1082,14 +1082,14 @@ version = "0.22.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "cumulus-primitives-core 0.19.0", - "ethereum-standards", + "ethereum-standards 0.1.1", "frame-support 41.0.0", "frame-system 41.0.0", "impl-trait-for-tuples", "pallet-asset-conversion 23.0.0", "pallet-assets 43.0.0", - "pallet-revive", - "pallet-revive-uapi", + "pallet-revive 0.7.0", + "pallet-revive-uapi 0.5.0", "pallet-xcm 20.1.0", "parachains-common 22.0.0", "parity-scale-codec", @@ -1438,6 +1438,16 @@ version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +[[package]] +name = "binary-merkle-tree" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", +] + [[package]] name = "binary-merkle-tree" version = "15.0.1" @@ -1752,6 +1762,19 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee8eddd066a8825ec5570528e6880471210fd5d88cb6abbe1cfdd51ca249c33" +dependencies = [ + "jam-codec", + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bounded-vec" version = "0.7.1" @@ -2260,6 +2283,31 @@ dependencies = [ "serde", ] +[[package]] +name = "cargo-platform" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-util-schemas" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dc1a6f7b5651af85774ae5a34b4e8be397d9cf4bc063b7e6dbd99a841837830" +dependencies = [ + "semver 1.0.26", + "serde", + "serde-untagged", + "serde-value", + "thiserror 2.0.12", + "toml 0.8.22", + "unicode-xid", + "url", +] + [[package]] name = "cargo_metadata" version = "0.15.4" @@ -2267,7 +2315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", - "cargo-platform", + "cargo-platform 0.1.9", "semver 1.0.26", "serde", "serde_json", @@ -2281,7 +2329,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", - "cargo-platform", + "cargo-platform 0.1.9", + "semver 1.0.26", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "cargo_metadata" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cfca2aaa699835ba88faf58a06342a314a950d2b9686165e038286c30316868" +dependencies = [ + "camino", + "cargo-platform 0.2.0", + "cargo-util-schemas", "semver 1.0.26", "serde", "serde_json", @@ -2548,7 +2611,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "colored" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +dependencies = [ + "windows-sys 0.48.0", ] [[package]] @@ -2665,6 +2737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -2700,10 +2773,10 @@ dependencies = [ "bollard", "cargo_metadata 0.19.2", "clap", - "colored", - "contract-metadata", - "crossterm", - "duct", + "colored 2.2.0", + "contract-metadata 5.0.3", + "crossterm 0.28.1", + "duct 0.13.7", "heck 0.5.0", "hex", "impl-serde 0.5.0", @@ -2726,8 +2799,50 @@ dependencies = [ "wasm-encoder", "wasm-opt", "wasmparser 0.220.1", - "which", - "zip", + "which 7.0.3", + "zip 2.4.2", +] + +[[package]] +name = "contract-build" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/cargo-contract#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" +dependencies = [ + "alloy-json-abi", + "anyhow", + "blake2 0.10.6", + "bollard", + "cargo_metadata 0.21.0", + "clap", + "colored 3.0.0", + "contract-metadata 6.0.0-alpha.1", + "crossterm 0.29.0", + "duct 1.0.0", + "heck 0.5.0", + "hex", + "impl-serde 0.5.0", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "itertools 0.14.0", + "parity-scale-codec", + "polkavm-linker 0.26.0 (git+https://github.com/paritytech/polkavm.git)", + "regex", + "rustc_version 0.4.1", + "semver 1.0.26", + "serde", + "serde_json", + "sha3", + "tempfile", + "term_size", + "tokio", + "tokio-stream", + "toml 0.8.22", + "tracing", + "url", + "uzers", + "walkdir", + "which 8.0.0", + "zip 3.0.0", + "zip 4.3.0", ] [[package]] @@ -2743,12 +2858,34 @@ dependencies = [ "url", ] +[[package]] +name = "contract-metadata" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/cargo-contract#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" +dependencies = [ + "anyhow", + "impl-serde 0.5.0", + "semver 1.0.26", + "serde", + "serde_json", + "url", +] + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -2984,6 +3121,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags 2.9.1", + "crossterm_winapi", + "derive_more 2.0.1", + "document-features", + "mio", + "parking_lot 0.12.3", + "rustix 1.0.7", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm_winapi" version = "0.9.1" @@ -3557,7 +3712,7 @@ version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4f4b7dec3206640120013d2ce6b476cbac8be9b93335f66b40255711db81301" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "bp-xcm-bridge-hub-router 0.14.1", "cumulus-primitives-core 0.16.0", "frame-benchmarking 38.0.0", @@ -3583,7 +3738,7 @@ version = "0.21.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "approx", - "bounded-collections", + "bounded-collections 0.2.4", "bp-xcm-bridge-hub-router 0.18.0", "cumulus-primitives-core 0.19.0", "frame-benchmarking 41.0.0", @@ -4220,7 +4375,7 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -4263,6 +4418,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ + "convert_case 0.7.1", "proc-macro2", "quote", "syn 2.0.101", @@ -4388,6 +4544,15 @@ dependencies = [ "walkdir", ] +[[package]] +name = "document-features" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +dependencies = [ + "litrs", +] + [[package]] name = "downcast" version = "0.11.0" @@ -4418,6 +4583,18 @@ dependencies = [ "shared_child", ] +[[package]] +name = "duct" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ce170a0e8454fa0f9b0e5ca38a6ba17ed76a50916839d217eb5357e05cdfde" +dependencies = [ + "libc", + "os_pipe", + "shared_child", + "shared_thread", +] + [[package]] name = "dunce" version = "1.0.5" @@ -4557,7 +4734,7 @@ dependencies = [ "cumulus-primitives-core 0.19.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "pallet-asset-conversion 23.0.0", "pallet-assets 43.0.0", "pallet-balances 42.0.0", @@ -4729,6 +4906,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased-serde" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.12" @@ -4736,7 +4923,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4789,6 +4976,14 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethereum-standards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", +] + [[package]] name = "ethereum-standards" version = "0.1.1" @@ -5118,6 +5313,30 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" +[[package]] +name = "frame-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-support 28.0.0", + "frame-support-procedural 23.0.0", + "frame-system 28.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-storage 19.0.0", + "static_assertions", +] + [[package]] name = "frame-benchmarking" version = "38.0.0" @@ -5420,6 +5639,47 @@ dependencies = [ "substrate-wasm-builder 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "frame-support" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "aquamarine", + "array-bytes 6.2.3", + "binary-merkle-tree 13.0.0", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 23.0.0", + "frame-support-procedural 23.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-genesis-builder 0.8.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "sp-weights 27.0.0", + "tt-call", +] + [[package]] name = "frame-support" version = "38.2.0" @@ -5503,6 +5763,26 @@ dependencies = [ "tt-call", ] +[[package]] +name = "frame-support-procedural" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "docify", + "expander", + "frame-support-procedural-tools 10.0.0", + "itertools 0.11.0", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "syn 2.0.101", +] + [[package]] name = "frame-support-procedural" version = "30.0.6" @@ -5544,6 +5824,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "frame-support-procedural-tools" version = "13.0.1" @@ -5569,6 +5861,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" @@ -5592,22 +5894,41 @@ dependencies = [ [[package]] name = "frame-system" -version = "38.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c7fa02f8c305496d2ae52edaecdb9d165f11afa965e05686d7d7dd1ce93611" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "cfg-if", "docify", - "frame-support 38.2.0", + "frame-support 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 34.0.0", - "sp-io 38.0.2", - "sp-runtime 39.0.5", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-version 37.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "sp-weights 27.0.0", +] + +[[package]] +name = "frame-system" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c7fa02f8c305496d2ae52edaecdb9d165f11afa965e05686d7d7dd1ce93611" +dependencies = [ + "cfg-if", + "docify", + "frame-support 38.2.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 34.0.0", + "sp-io 38.0.2", + "sp-runtime 39.0.5", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-version 37.0.0", "sp-weights 31.1.0", ] @@ -6228,6 +6549,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hex-literal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" + [[package]] name = "hickory-proto" version = "0.24.4" @@ -6887,18 +7214,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15d7438a13d38fa8f4eebea8d1e7c2931058eafd0336c79f4141d4ed0162a412" dependencies = [ "derive_more 1.0.0", - "ink_env", - "ink_macro", - "ink_metadata", - "ink_prelude", - "ink_primitives", - "ink_storage", + "ink_env 5.1.1", + "ink_macro 5.1.1", + "ink_metadata 5.1.1", + "ink_prelude 5.1.1", + "ink_primitives 5.1.1", + "ink_storage 5.1.1", "pallet-contracts-uapi 9.0.0", "parity-scale-codec", "scale-info", "staging-xcm 11.0.0", ] +[[package]] +name = "ink" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "const_format", + "deranged", + "derive_more 2.0.1", + "ink_env 6.0.0-alpha.1", + "ink_macro 6.0.0-alpha.1", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_storage 6.0.0-alpha.1", + "keccak-const", + "linkme", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "scale-info", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "staging-xcm 7.0.1", + "tokio", +] + [[package]] name = "ink_allocator" version = "5.1.1" @@ -6908,6 +7261,14 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "ink_allocator" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "cfg-if", +] + [[package]] name = "ink_codegen" version = "5.1.1" @@ -6919,8 +7280,8 @@ dependencies = [ "either", "heck 0.5.0", "impl-serde 0.4.0", - "ink_ir", - "ink_primitives", + "ink_ir 5.1.1", + "ink_primitives 5.1.1", "itertools 0.12.1", "parity-scale-codec", "proc-macro2", @@ -6930,6 +7291,28 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "ink_codegen" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "blake2 0.10.6", + "derive_more 2.0.1", + "either", + "heck 0.5.0", + "impl-serde 0.5.0", + "ink_ir 6.0.0-alpha.1", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "itertools 0.14.0", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.101", +] + [[package]] name = "ink_engine" version = "5.1.1" @@ -6938,7 +7321,7 @@ checksum = "d273f2aa983d04a6476d3c5ac76ddbef07555664b88f923996e7465e261dda48" dependencies = [ "blake2 0.10.6", "derive_more 1.0.0", - "ink_primitives", + "ink_primitives 5.1.1", "pallet-contracts-uapi 9.0.0", "parity-scale-codec", "secp256k1 0.28.2", @@ -6946,6 +7329,23 @@ dependencies = [ "sha3", ] +[[package]] +name = "ink_engine" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "blake2 0.10.6", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "pallet-revive 0.1.0", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", +] + [[package]] name = "ink_env" version = "5.1.1" @@ -6956,11 +7356,11 @@ dependencies = [ "cfg-if", "const_env", "derive_more 1.0.0", - "ink_allocator", - "ink_engine", - "ink_prelude", - "ink_primitives", - "ink_storage_traits", + "ink_allocator 5.1.1", + "ink_engine 5.1.1", + "ink_prelude 5.1.1", + "ink_primitives 5.1.1", + "ink_storage_traits 5.1.1", "num-traits", "pallet-contracts-uapi 9.0.0", "parity-scale-codec", @@ -6977,6 +7377,39 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "ink_env" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "blake2 0.10.6", + "cfg-if", + "const_env", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_allocator 6.0.0-alpha.1", + "ink_engine 6.0.0-alpha.1", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_storage_traits 6.0.0-alpha.1", + "num-traits", + "pallet-revive 0.1.0", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "staging-xcm 7.0.1", + "static_assertions", +] + [[package]] name = "ink_ir" version = "5.1.1" @@ -6986,22 +7419,53 @@ dependencies = [ "blake2 0.10.6", "either", "impl-serde 0.4.0", - "ink_prelude", + "ink_prelude 5.1.1", "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.101", ] +[[package]] +name = "ink_ir" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "blake2 0.10.6", + "either", + "impl-serde 0.5.0", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "itertools 0.14.0", + "proc-macro2", + "quote", + "sha3", + "syn 2.0.101", +] + [[package]] name = "ink_macro" version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce9465553d3066a8e28bd94a94880289084c4ff12f1852312553e902fa1ffdd" dependencies = [ - "ink_codegen", - "ink_ir", - "ink_primitives", + "ink_codegen 5.1.1", + "ink_ir 5.1.1", + "ink_primitives 5.1.1", + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.101", + "synstructure 0.13.2", +] + +[[package]] +name = "ink_macro" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "ink_codegen 6.0.0-alpha.1", + "ink_ir 6.0.0-alpha.1", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", "parity-scale-codec", "proc-macro2", "quote", @@ -7017,8 +7481,8 @@ checksum = "27135c651274087ba0578d2c07866c31d8dd481ae8de5bb7295fe3931491aa80" dependencies = [ "derive_more 1.0.0", "impl-serde 0.4.0", - "ink_prelude", - "ink_primitives", + "ink_prelude 5.1.1", + "ink_primitives 5.1.1", "linkme", "parity-scale-codec", "scale-info", @@ -7026,6 +7490,36 @@ dependencies = [ "serde", ] +[[package]] +name = "ink_metadata" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "derive_more 2.0.1", + "impl-serde 0.5.0", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", +] + +[[package]] +name = "ink_metadata" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "derive_more 2.0.1", + "impl-serde 0.5.0", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", +] + [[package]] name = "ink_prelude" version = "5.1.1" @@ -7035,6 +7529,22 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "ink_prelude" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_prelude" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "cfg-if", +] + [[package]] name = "ink_primitives" version = "5.1.1" @@ -7042,7 +7552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a530c1b352a53176ea718f3a65f15003e54e0474ec12353ea0e0e5bb60b25741" dependencies = [ "derive_more 1.0.0", - "ink_prelude", + "ink_prelude 5.1.1", "parity-scale-codec", "scale-decode 0.11.1", "scale-encode 0.6.0", @@ -7050,6 +7560,62 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "ink_primitives" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "alloy-sol-types", + "cfg-if", + "derive_more 2.0.1", + "impl-trait-for-tuples", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "itertools 0.14.0", + "num-traits", + "pallet-revive 0.1.0", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "paste", + "primitive-types 0.13.1", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "sp-weights 27.0.0", + "xxhash-rust", +] + +[[package]] +name = "ink_primitives" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "alloy-sol-types", + "cfg-if", + "derive_more 2.0.1", + "impl-trait-for-tuples", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "itertools 0.14.0", + "num-traits", + "pallet-revive 0.1.0", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "paste", + "primitive-types 0.13.1", + "scale-decode 0.16.0", + "scale-encode 0.10.0", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", + "sp-weights 27.0.0", + "xxhash-rust", +] + [[package]] name = "ink_storage" version = "5.1.1" @@ -7059,27 +7625,59 @@ dependencies = [ "array-init", "cfg-if", "derive_more 1.0.0", - "ink_env", - "ink_metadata", - "ink_prelude", - "ink_primitives", - "ink_storage_traits", + "ink_env 5.1.1", + "ink_metadata 5.1.1", + "ink_prelude 5.1.1", + "ink_primitives 5.1.1", + "ink_storage_traits 5.1.1", "pallet-contracts-uapi 9.0.0", "parity-scale-codec", "scale-info", ] +[[package]] +name = "ink_storage" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "array-init", + "cfg-if", + "derive_more 2.0.1", + "ink_env 6.0.0-alpha.1", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_storage_traits 6.0.0-alpha.1", + "pallet-revive-uapi 0.1.0", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "ink_storage_traits" version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde9b3f4a1e355682e5d13fd5639e5da4d0a2029537292e05a4255ea1169663e" dependencies = [ - "ink_metadata", - "ink_prelude", - "ink_primitives", + "ink_metadata 5.1.1", + "ink_prelude 5.1.1", + "ink_primitives 5.1.1", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ink_storage_traits" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +dependencies = [ + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", "parity-scale-codec", "scale-info", + "sp-io 30.0.0", + "sp-runtime-interface 24.0.0", ] [[package]] @@ -7189,7 +7787,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.1", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -7233,7 +7831,7 @@ dependencies = [ "cumulus-primitives-core 0.19.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "ismp", "log", "pallet-ismp", @@ -7330,6 +7928,34 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jam-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d72f2fb8cfd27f6c52ea7d0528df594f7f2ed006feac153e9393ec567aafea98" +dependencies = [ + "arrayvec 0.7.6", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "jam-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "jam-codec-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09985146f40378e13af626964ac9c206d9d9b67c40c70805898d9954f709bcf5" +dependencies = [ + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "jiff" version = "0.2.13" @@ -7559,6 +8185,12 @@ dependencies = [ "sha3-asm", ] +[[package]] +name = "keccak-const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" + [[package]] name = "keccak-hash" version = "0.11.0" @@ -7575,6 +8207,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" +[[package]] +name = "konst" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "kusama-runtime-constants" version = "1.0.0" @@ -8332,6 +8979,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "litrs" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" + [[package]] name = "lock_api" version = "0.4.12" @@ -8557,6 +9210,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory-db" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +dependencies = [ + "hash-db", + "hashbrown 0.15.3", +] + [[package]] name = "memory-db" version = "0.34.0" @@ -9236,6 +9899,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + [[package]] name = "os_pipe" version = "1.2.1" @@ -9275,6 +9947,23 @@ dependencies = [ "staging-xcm 17.0.0", ] +[[package]] +name = "pallet-api-vnext" +version = "0.1.0" +dependencies = [ + "base64 0.22.1", + "frame-benchmarking 41.0.0", + "frame-support 41.0.0", + "frame-system 41.0.0", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", + "pallet-revive 0.7.0", + "pallet-timestamp 40.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "pallet-asset-conversion" version = "20.0.0" @@ -9463,13 +10152,13 @@ name = "pallet-assets" version = "43.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "ethereum-standards", + "ethereum-standards 0.1.1", "frame-benchmarking 41.0.0", "frame-support 41.0.0", "frame-system 41.0.0", "impl-trait-for-tuples", "log", - "pallet-revive", + "pallet-revive 0.7.0", "parity-scale-codec", "scale-info", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -10426,7 +11115,7 @@ dependencies = [ "frame-system 41.0.0", "hash-db", "hex", - "hex-literal", + "hex-literal 0.4.1", "ismp", "jsonrpsee", "pallet-ismp", @@ -11061,6 +11750,51 @@ dependencies = [ "sp-trie 37.0.0", ] +[[package]] +name = "pallet-revive" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", + "derive_more 0.99.20", + "environmental", + "ethereum-standards 0.1.0", + "ethereum-types 0.15.1", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "hex-literal 0.4.1", + "humantime-serde", + "impl-trait-for-tuples", + "log", + "num-bigint", + "num-integer", + "num-traits", + "pallet-revive-fixtures 0.1.0", + "pallet-revive-proc-macro 0.1.0", + "pallet-revive-uapi 0.1.0", + "pallet-transaction-payment 28.0.0", + "parity-scale-codec", + "paste", + "polkavm 0.26.0", + "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.8.5", + "ripemd", + "rlp 0.6.1", + "scale-info", + "serde", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-consensus-aura 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "substrate-bn", + "subxt-signer", +] + [[package]] name = "pallet-revive" version = "0.7.0" @@ -11069,21 +11803,21 @@ dependencies = [ "alloy-core", "derive_more 0.99.20", "environmental", - "ethereum-standards", + "ethereum-standards 0.1.1", "ethereum-types 0.15.1", "frame-benchmarking 41.0.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "humantime-serde", "impl-trait-for-tuples", "log", "num-bigint", "num-integer", "num-traits", - "pallet-revive-fixtures", - "pallet-revive-proc-macro", - "pallet-revive-uapi", + "pallet-revive-fixtures 0.4.0", + "pallet-revive-proc-macro 0.3.0", + "pallet-revive-uapi 0.5.0", "pallet-transaction-payment 41.0.0", "parity-scale-codec", "paste", @@ -11107,6 +11841,20 @@ dependencies = [ "subxt-signer", ] +[[package]] +name = "pallet-revive-fixtures" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "anyhow", + "cargo_metadata 0.15.4", + "pallet-revive-uapi 0.1.0", + "polkavm-linker 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 28.0.0", + "sp-io 30.0.0", + "toml 0.8.22", +] + [[package]] name = "pallet-revive-fixtures" version = "0.4.0" @@ -11114,13 +11862,23 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "anyhow", "cargo_metadata 0.15.4", - "pallet-revive-uapi", + "pallet-revive-uapi 0.5.0", "polkavm-linker 0.21.0", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "toml 0.8.22", ] +[[package]] +name = "pallet-revive-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "pallet-revive-proc-macro" version = "0.3.0" @@ -11131,13 +11889,25 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "pallet-revive-uapi" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bitflags 1.3.2", + "pallet-revive-proc-macro 0.1.0", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "scale-info", +] + [[package]] name = "pallet-revive-uapi" version = "0.5.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitflags 1.3.2", - "pallet-revive-proc-macro", + "pallet-revive-proc-macro 0.3.0", "parity-scale-codec", "polkavm-derive 0.21.0", "scale-info", @@ -11537,6 +12307,21 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "pallet-transaction-payment" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io 30.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "pallet-transaction-payment" version = "38.0.2" @@ -11782,7 +12567,7 @@ version = "17.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff8893d5736d085729ed6d698a727a1511dd2b787b48ad0dc2d86136f142cc3e" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "frame-benchmarking 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -11806,13 +12591,13 @@ name = "pallet-xcm" version = "20.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "frame-benchmarking 41.0.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "pallet-balances 42.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-timestamp 40.0.0", "parity-scale-codec", "scale-info", @@ -12194,7 +12979,7 @@ dependencies = [ "frame-system-benchmarking 38.0.0", "frame-system-rpc-runtime-api 34.0.0", "frame-try-runtime 0.44.0", - "hex-literal", + "hex-literal 0.4.1", "log", "pallet-asset-rate 17.0.0", "pallet-authority-discovery 38.0.0", @@ -13212,7 +13997,7 @@ version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52b5648a2e8ce1f9a0f8c41c38def670cefd91932cd793468e1a5b0b0b4e4af1" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "derive_more 0.99.20", "parity-scale-codec", "polkadot-core-primitives 15.0.0", @@ -13228,7 +14013,7 @@ name = "polkadot-parachain-primitives" version = "17.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "derive_more 0.99.20", "parity-scale-codec", "polkadot-core-primitives 18.0.0", @@ -13246,7 +14031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b57bc055fa389372ec5fc0001b99aeffd50f3fd379280ce572d935189bb58dd8" dependencies = [ "bitvec", - "hex-literal", + "hex-literal 0.4.1", "log", "parity-scale-codec", "polkadot-core-primitives 15.0.0", @@ -13273,7 +14058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bb20b75d33212150242d39890d7ededab55f1084160c337f15d0eb8ca8c3ad4" dependencies = [ "bitvec", - "hex-literal", + "hex-literal 0.4.1", "log", "parity-scale-codec", "polkadot-core-primitives 15.0.0", @@ -13299,8 +14084,8 @@ version = "19.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "bitvec", - "bounded-collections", - "hex-literal", + "bounded-collections 0.2.4", + "hex-literal 0.4.1", "log", "parity-scale-codec", "polkadot-core-primitives 18.0.0", @@ -13797,6 +14582,19 @@ dependencies = [ "polkavm-linux-raw 0.24.0", ] +[[package]] +name = "polkavm" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa028f713d0613f0f08b8b3367402cb859218854f6b96fcbe39a501862894d6f" +dependencies = [ + "libc", + "log", + "polkavm-assembler 0.26.0", + "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-linux-raw 0.26.0", +] + [[package]] name = "polkavm-assembler" version = "0.21.0" @@ -13815,6 +14613,15 @@ dependencies = [ "log", ] +[[package]] +name = "polkavm-assembler" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4859a29e1f4ad64610c4bc2bfc40bb9a535068a034933a5b56b5e7a0febf105a" +dependencies = [ + "log", +] + [[package]] name = "polkavm-common" version = "0.9.0" @@ -13848,6 +14655,22 @@ dependencies = [ "polkavm-assembler 0.24.0", ] +[[package]] +name = "polkavm-common" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a5794b695626ba70d29e66e3f4f4835767452a6723f3a0bc20884b07088fe8" +dependencies = [ + "blake3", + "log", + "polkavm-assembler 0.26.0", +] + +[[package]] +name = "polkavm-common" +version = "0.26.0" +source = "git+https://github.com/paritytech/polkavm.git#da9a904909d7770477637783c70c30b3fc6df2ac" + [[package]] name = "polkavm-derive" version = "0.9.1" @@ -13884,6 +14707,15 @@ dependencies = [ "polkavm-derive-impl-macro 0.24.0", ] +[[package]] +name = "polkavm-derive" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95282a203ae1f6828a04ff334145c3f6dc718bba6d3959805d273358b45eab93" +dependencies = [ + "polkavm-derive-impl-macro 0.26.0", +] + [[package]] name = "polkavm-derive-impl" version = "0.9.0" @@ -13932,6 +14764,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6069dc7995cde6e612b868a02ce48b54397c6d2582bd1b97b63aabbe962cd779" +dependencies = [ + "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "polkavm-derive-impl-macro" version = "0.9.0" @@ -13972,6 +14816,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581d34cafec741dc5ffafbb341933c205b6457f3d76257a9d99fb56687219c91" +dependencies = [ + "polkavm-derive-impl 0.26.0", + "syn 2.0.101", +] + [[package]] name = "polkavm-linker" version = "0.9.2" @@ -14019,6 +14873,37 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "polkavm-linker" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb896023e5bd89bba40311797d8d42490fa4a1fd5256c74820753c5722d1e67" +dependencies = [ + "dirs", + "gimli 0.31.1", + "hashbrown 0.14.5", + "log", + "object 0.36.7", + "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regalloc2 0.9.3", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linker" +version = "0.26.0" +source = "git+https://github.com/paritytech/polkavm.git#da9a904909d7770477637783c70c30b3fc6df2ac" +dependencies = [ + "dirs", + "gimli 0.31.1", + "hashbrown 0.14.5", + "log", + "object 0.36.7", + "polkavm-common 0.26.0 (git+https://github.com/paritytech/polkavm.git)", + "regalloc2 0.9.3", + "rustc-demangle", +] + [[package]] name = "polkavm-linux-raw" version = "0.21.0" @@ -14029,7 +14914,13 @@ checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" name = "polkavm-linux-raw" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec0b13e26ec7234dba213ca17118c70c562809bdce0eefe84f92613d5c8da26" +checksum = "4ec0b13e26ec7234dba213ca17118c70c562809bdce0eefe84f92613d5c8da26" + +[[package]] +name = "polkavm-linux-raw" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28919f542476f4158cc71e6c072b1051f38f4b514253594ac3ad80e3c0211fc8" [[package]] name = "polling" @@ -14091,16 +14982,25 @@ version = "0.0.0" dependencies = [ "bitflags 2.9.1", "enumflags2", - "ink", + "ink 5.1.1", "pop-primitives", "sp-io 40.0.1", ] +[[package]] +name = "pop-api" +version = "0.1.0" +dependencies = [ + "base64 0.22.1", + "ink 6.0.0-alpha.1", + "pop-primitives", +] + [[package]] name = "pop-api-integration-tests" version = "0.1.0" dependencies = [ - "contract-build", + "contract-build 5.0.3", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -14114,7 +15014,7 @@ dependencies = [ "pallet-nfts 34.1.0", "pallet-xcm 20.1.0", "parity-scale-codec", - "pop-api", + "pop-api 0.0.0", "pop-primitives", "pop-runtime-devnet", "pop-runtime-testnet", @@ -14124,11 +15024,34 @@ dependencies = [ "staging-xcm-executor 20.0.0", ] +[[package]] +name = "pop-api-vnext-integration-tests" +version = "0.1.0" +dependencies = [ + "contract-build 6.0.0-alpha.1", + "env_logger 0.11.8", + "frame-support 41.0.0", + "frame-system 41.0.0", + "hex", + "log", + "pallet-api-vnext", + "pallet-assets 43.0.0", + "pallet-balances 42.0.0", + "pallet-revive 0.7.0", + "parity-scale-codec", + "pop-api 0.1.0", + "pop-primitives", + "pop-runtime-devnet", + "pop-runtime-testnet", + "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", +] + [[package]] name = "pop-chain-extension" version = "0.1.0" dependencies = [ - "contract-build", + "contract-build 5.0.3", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -14252,7 +15175,7 @@ dependencies = [ "pallet-nfts 35.0.0", "pallet-preimage 41.0.0", "pallet-proxy 41.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-scheduler 42.0.0", "pallet-session 41.0.0", "pallet-sudo 41.0.0", @@ -14300,13 +15223,13 @@ dependencies = [ "frame-system-benchmarking 41.0.0", "frame-system-rpc-runtime-api 37.0.0", "frame-try-runtime 0.47.0", - "hex", - "hex-literal", + "hex-literal 0.4.1", "ismp", "ismp-parachain", "ismp-parachain-runtime-api", "log", "pallet-api", + "pallet-api-vnext", "pallet-assets 43.0.0", "pallet-aura 40.0.0", "pallet-authorship 41.0.0", @@ -14322,7 +15245,7 @@ dependencies = [ "pallet-nfts-runtime-api 27.0.0", "pallet-preimage 41.0.0", "pallet-proxy 41.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-scheduler 42.0.0", "pallet-session 41.0.0", "pallet-sudo 41.0.0", @@ -14347,6 +15270,7 @@ dependencies = [ "sp-genesis-builder 0.18.0", "sp-inherents 37.0.0", "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-keyring 42.0.0", "sp-mmr-primitives 37.0.0", "sp-offchain 37.0.0", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -14401,7 +15325,7 @@ dependencies = [ "pallet-nfts-runtime-api 27.0.0", "pallet-preimage 41.0.0", "pallet-proxy 41.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-scheduler 42.0.0", "pallet-session 41.0.0", "pallet-sudo 41.0.0", @@ -14468,7 +15392,7 @@ dependencies = [ "frame-system-rpc-runtime-api 37.0.0", "frame-try-runtime 0.47.0", "hex", - "hex-literal", + "hex-literal 0.4.1", "ismp", "ismp-parachain", "ismp-parachain-runtime-api", @@ -14492,7 +15416,7 @@ dependencies = [ "pallet-nfts-runtime-api 27.0.0", "pallet-preimage 41.0.0", "pallet-proxy 41.0.0", - "pallet-revive", + "pallet-revive 0.7.0", "pallet-scheduler 42.0.0", "pallet-session 41.0.0", "pallet-sudo 41.0.0", @@ -14821,7 +15745,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "itertools 0.14.0", "log", "multimap", @@ -14975,7 +15899,7 @@ dependencies = [ "once_cell", "socket2 0.5.9", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -15383,7 +16307,7 @@ dependencies = [ "frame-system-benchmarking 41.0.0", "frame-system-rpc-runtime-api 37.0.0", "frame-try-runtime 0.47.0", - "hex-literal", + "hex-literal 0.4.1", "log", "pallet-asset-rate 20.0.0", "pallet-authority-discovery 41.0.0", @@ -15649,7 +16573,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -15662,7 +16586,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -15720,7 +16644,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -17604,6 +18528,27 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-untagged" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" +dependencies = [ + "erased-serde", + "serde", + "typeid", +] + +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.17" @@ -17806,6 +18751,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "shared_thread" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a6f98357c6bb0ebace19b22220e5543801d9de90ffe77f8abb27c056bac064" + [[package]] name = "shlex" version = "1.3.0" @@ -18246,7 +19197,7 @@ dependencies = [ "ethabi-decode 1.0.0", "frame-support 38.2.0", "frame-system 38.0.0", - "hex-literal", + "hex-literal 0.4.1", "parity-scale-codec", "polkadot-parachain-primitives 14.0.0", "scale-info", @@ -18269,7 +19220,7 @@ dependencies = [ "bp-relayers", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "log", "parity-scale-codec", "polkadot-parachain-primitives 17.0.0", @@ -18294,7 +19245,7 @@ dependencies = [ "ethabi-decode 1.0.0", "ethbloom 0.13.0", "ethereum-types 0.14.1", - "hex-literal", + "hex-literal 0.4.1", "parity-bytes", "parity-scale-codec", "rlp 0.5.2", @@ -18314,7 +19265,7 @@ dependencies = [ "ethabi-decode 2.0.0", "ethbloom 0.14.1", "ethereum-types 0.15.1", - "hex-literal", + "hex-literal 0.4.1", "parity-bytes", "parity-scale-codec", "rlp 0.6.1", @@ -18350,7 +19301,7 @@ dependencies = [ "ethabi-decode 2.0.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "log", "parity-scale-codec", "polkadot-parachain-primitives 17.0.0", @@ -18396,7 +19347,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aefe74eafeac92e1d9e46b7bb76ec297f6182b4a023f7e7eb7eb8be193f93bef" dependencies = [ "frame-support 38.2.0", - "hex-literal", + "hex-literal 0.4.1", "log", "parity-scale-codec", "scale-info", @@ -18492,6 +19443,28 @@ dependencies = [ "sha1", ] +[[package]] +name = "sp-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 15.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "thiserror 1.0.69", +] + [[package]] name = "sp-api" version = "34.0.0" @@ -18560,6 +19533,20 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-api-proc-macro" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "sp-api-proc-macro" version = "20.0.0" @@ -18604,6 +19591,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-application-crypto" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-io 30.0.0", +] + [[package]] name = "sp-application-crypto" version = "38.0.0" @@ -18642,6 +19641,20 @@ dependencies = [ "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-arithmetic" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "docify", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "static_assertions", +] + [[package]] name = "sp-arithmetic" version = "26.1.0" @@ -18765,6 +19778,22 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-consensus-aura" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-timestamp 26.0.0", +] + [[package]] name = "sp-consensus-aura" version = "0.40.0" @@ -18798,6 +19827,24 @@ dependencies = [ "sp-timestamp 37.0.0", ] +[[package]] +name = "sp-consensus-babe" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-timestamp 26.0.0", +] + [[package]] name = "sp-consensus-babe" version = "0.40.0" @@ -18912,6 +19959,17 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-consensus-slots" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-timestamp 26.0.0", +] + [[package]] name = "sp-consensus-slots" version = "0.40.1" @@ -18935,6 +19993,54 @@ dependencies = [ "sp-timestamp 37.0.0", ] +[[package]] +name = "sp-core" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "ark-vrf", + "array-bytes 6.2.3", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections 0.3.2", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde 0.5.0", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot 0.12.3", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-storage 19.0.0", + "ss58-registry", + "substrate-bip39 0.4.7", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core" version = "34.0.0" @@ -18944,7 +20050,7 @@ dependencies = [ "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.2.4", "bs58", "dyn-clonable", "ed25519-zebra", @@ -18992,7 +20098,7 @@ dependencies = [ "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.2.4", "bs58", "dyn-clonable", "ed25519-zebra", @@ -19040,7 +20146,7 @@ dependencies = [ "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.2.4", "bs58", "dyn-clone", "ed25519-zebra", @@ -19088,7 +20194,7 @@ dependencies = [ "array-bytes 6.2.3", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.2.4", "bs58", "dyn-clone", "ed25519-zebra", @@ -19154,6 +20260,19 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" @@ -19175,6 +20294,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "quote", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "syn 2.0.101", +] + [[package]] name = "sp-database" version = "10.0.0" @@ -19205,6 +20334,26 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage 19.0.0", +] + [[package]] name = "sp-externalities" version = "0.29.0" @@ -19237,6 +20386,18 @@ dependencies = [ "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api 26.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "sp-genesis-builder" version = "0.15.1" @@ -19262,6 +20423,19 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-inherents" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 31.0.1", + "thiserror 1.0.69", +] + [[package]] name = "sp-inherents" version = "34.0.0" @@ -19289,6 +20463,32 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-io" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 28.0.0", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", + "tracing", + "tracing-core", +] + [[package]] name = "sp-io" version = "38.0.2" @@ -19417,6 +20617,17 @@ dependencies = [ "strum 0.26.3", ] +[[package]] +name = "sp-keystore" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.3", + "sp-core 28.0.0", + "sp-externalities 0.25.0", +] + [[package]] name = "sp-keystore" version = "0.40.0" @@ -19483,6 +20694,16 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-metadata 23.0.0", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "sp-metadata-ir" version = "0.7.0" @@ -19609,6 +20830,15 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "backtrace", + "regex", +] + [[package]] name = "sp-panic-handler" version = "13.0.2" @@ -19638,6 +20868,35 @@ dependencies = [ "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-runtime" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "binary-merkle-tree 13.0.0", + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-trie 29.0.0", + "sp-weights 27.0.0", + "tracing", + "tuplex", +] + [[package]] name = "sp-runtime" version = "39.0.5" @@ -19724,6 +20983,25 @@ dependencies = [ "tuplex", ] +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.26.0", + "primitive-types 0.13.1", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", + "static_assertions", +] + [[package]] name = "sp-runtime-interface" version = "28.0.0" @@ -19803,6 +21081,19 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" @@ -19873,6 +21164,19 @@ dependencies = [ "sp-staking 39.0.0", ] +[[package]] +name = "sp-staking" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "sp-staking" version = "34.0.0" @@ -19914,6 +21218,26 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-state-machine" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand 0.8.5", + "smallvec", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-panic-handler 13.0.0", + "sp-trie 29.0.0", + "thiserror 1.0.69", + "tracing", + "trie-db 0.30.0", +] + [[package]] name = "sp-state-machine" version = "0.43.0" @@ -20032,6 +21356,23 @@ name = "sp-std" version = "14.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-serde 0.5.0", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", +] + [[package]] name = "sp-storage" version = "21.0.0" @@ -20070,6 +21411,18 @@ dependencies = [ "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-timestamp" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "thiserror 1.0.69", +] + [[package]] name = "sp-timestamp" version = "34.0.0" @@ -20095,6 +21448,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "regex", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-tracing" version = "17.1.0" @@ -20151,6 +21516,29 @@ dependencies = [ "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "sp-trie" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "ahash 0.8.12", + "hash-db", + "memory-db 0.33.0", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "substrate-prometheus-endpoint 0.17.0", + "thiserror 1.0.69", + "tracing", + "trie-db 0.30.0", + "trie-root", +] + [[package]] name = "sp-trie" version = "37.0.0" @@ -20249,6 +21637,23 @@ dependencies = [ "trie-root", ] +[[package]] +name = "sp-version" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-serde 0.5.0", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-runtime 31.0.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-version-proc-macro 13.0.0", + "thiserror 1.0.69", +] + [[package]] name = "sp-version" version = "37.0.0" @@ -20302,6 +21707,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "sp-version-proc-macro" version = "14.0.0" @@ -20339,6 +21756,17 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + [[package]] name = "sp-wasm-interface" version = "21.0.1" @@ -20376,13 +21804,27 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-weights" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bounded-collections 0.3.2", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 23.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", +] + [[package]] name = "sp-weights" version = "31.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "parity-scale-codec", "scale-info", "serde", @@ -20397,7 +21839,7 @@ version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8a1d448faceb064bb114df31fc45ff86ea2ee8fd17810c4357a578d081f7732" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "parity-scale-codec", "scale-info", "serde", @@ -20411,7 +21853,7 @@ name = "sp-weights" version = "32.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.4", "parity-scale-codec", "scale-info", "serde", @@ -20522,6 +21964,27 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "staging-xcm" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "array-bytes 6.2.3", + "bounded-collections 0.3.2", + "derive-where", + "environmental", + "frame-support 28.0.0", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "xcm-procedural 7.0.0", +] + [[package]] name = "staging-xcm" version = "11.0.0" @@ -20529,7 +21992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aded0292274ad473250c22ed3deaf2d9ed47d15786d700e9e83ab7c1cad2ad44" dependencies = [ "array-bytes 6.2.3", - "bounded-collections", + "bounded-collections 0.2.4", "derivative", "environmental", "impl-trait-for-tuples", @@ -20548,7 +22011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f66daa99c90c4b1443696ce42f38aa9d47954ae6270301be42f049a1bf0ba5" dependencies = [ "array-bytes 6.2.3", - "bounded-collections", + "bounded-collections 0.2.4", "derivative", "environmental", "impl-trait-for-tuples", @@ -20567,11 +22030,11 @@ version = "17.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "array-bytes 6.2.3", - "bounded-collections", + "bounded-collections 0.2.4", "derive-where", "environmental", "frame-support 41.0.0", - "hex-literal", + "hex-literal 0.4.1", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -20768,6 +22231,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "substrate-bip39" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "schnorrkel 0.11.4", + "sha2 0.10.9", + "zeroize", +] + [[package]] name = "substrate-bip39" version = "0.6.0" @@ -20837,6 +22312,20 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "substrate-prometheus-endpoint" version = "0.17.2" @@ -21211,9 +22700,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c8c8f496c33dc6343dac05b4be8d9e0bca180a4caa81d7b8416b10cc2273cd" +checksum = "a7a985ff4ffd7373e10e0fb048110fb11a162e5a4c47f92ddb8787a6f766b769" dependencies = [ "paste", "proc-macro2", @@ -21343,7 +22832,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix 1.0.7", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -21921,6 +23410,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.18.0" @@ -22745,7 +24240,7 @@ dependencies = [ "frame-system-benchmarking 41.0.0", "frame-system-rpc-runtime-api 37.0.0", "frame-try-runtime 0.47.0", - "hex-literal", + "hex-literal 0.4.1", "log", "pallet-asset-rate 20.0.0", "pallet-authority-discovery 41.0.0", @@ -22864,6 +24359,17 @@ dependencies = [ "winsafe", ] +[[package]] +name = "which" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" +dependencies = [ + "env_home", + "rustix 1.0.7", + "winsafe", +] + [[package]] name = "wide" version = "0.7.32" @@ -22902,7 +24408,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -23477,6 +24983,17 @@ dependencies = [ "xcm-simulator", ] +[[package]] +name = "xcm-procedural" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "xcm-procedural" version = "8.0.0" @@ -23762,6 +25279,30 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "zip" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" +dependencies = [ + "arbitrary", + "crc32fast", + "indexmap 2.9.0", + "memchr", +] + +[[package]] +name = "zip" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aed4ac33e8eb078c89e6cbb1d5c4c7703ec6d299fc3e7c3695af8f8b423468b" +dependencies = [ + "arbitrary", + "crc32fast", + "indexmap 2.9.0", + "memchr", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" From 9372442991a42293b5ad3360c6a0a10ce06b6621 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 22:30:01 +0100 Subject: [PATCH 176/284] style: formatting after rebase --- runtime/devnet/src/config/contracts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index 140fc3dda..e72dd2216 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -9,8 +9,8 @@ use pop_runtime_common::{DepositPerByte, DepositPerItem, UNIT}; use super::api::{self, Config}; use crate::{ - config::assets::TrustBackedAssetsInstance, deposit, Balance, Balances, Perbill, Runtime, - RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, TransactionPayment, + config::assets::TrustBackedAssetsInstance, deposit, Balance, Balances, Perbill, Runtime, + RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, TransactionPayment, }; type Erc20 = From 002190803dd8c0c6629cfbbe67f2d3be1cf93571 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sat, 26 Jul 2025 22:49:20 +0100 Subject: [PATCH 177/284] chore(api): update cargo.lock for contracts --- .../contracts/fungibles/Cargo.lock | 1300 +++++++---------- .../create_token_in_constructor/Cargo.lock | 8 +- .../contracts/fungibles/Cargo.lock | 8 +- .../contracts/messaging/Cargo.lock | 8 +- .../contracts/nonfungibles/Cargo.lock | 8 +- 5 files changed, 565 insertions(+), 767 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index 2afa7b4ad..64eed54ac 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -67,28 +67,27 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-core" -version = "0.8.25" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +checksum = "d47400608fc869727ad81dba058d55f97b29ad8b5c5256d9598523df8f356ab6" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.25", - "alloy-primitives 0.8.25", + "alloy-json-abi", + "alloy-primitives", "alloy-rlp", - "alloy-sol-types 0.8.25", + "alloy-sol-types", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.25" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +checksum = "d9e8a436f0aad7df8bb47f144095fba61202265d9f5f09a70b0e3227881a668e" dependencies = [ - "alloy-json-abi 0.8.25", - "alloy-primitives 0.8.25", - "alloy-sol-type-parser 0.8.25", - "alloy-sol-types 0.8.25", - "const-hex", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", "itoa", "serde", "serde_json", @@ -97,60 +96,21 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6beff64ad0aa6ad1019a3db26fef565aefeb011736150ab73ed3366c3cfd1b" -dependencies = [ - "alloy-primitives 0.8.25", - "alloy-sol-type-parser 0.8.25", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-json-abi" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15516116086325c157c18261d768a20677f0f699348000ed391d4ad0dcb82530" +checksum = "459f98c6843f208856f338bfb25e65325467f7aff35dfeb0484d0a76e059134b" dependencies = [ - "alloy-primitives 1.2.1", - "alloy-sol-type-parser 1.2.1", + "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.4", - "indexmap", - "itoa", - "k256", - "keccak-asm", - "paste", - "proptest", - "rand 0.8.5", - "ruint", - "rustc-hash 2.1.1", - "serde", - "sha3", - "tiny-keccak", -] - -[[package]] -name = "alloy-primitives" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6177ed26655d4e84e00b65cb494d4e0b8830e7cae7ef5d63087d445a2600fb55" +checksum = "3cfebde8c581a5d37b678d0a48a32decb51efd7a63a08ce2517ddec26db705c8" dependencies = [ "alloy-rlp", "bytes", @@ -165,7 +125,7 @@ dependencies = [ "keccak-asm", "paste", "proptest", - "rand 0.9.1", + "rand 0.9.2", "ruint", "rustc-hash 2.1.1", "serde", @@ -185,57 +145,25 @@ dependencies = [ [[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 0.8.25", - "alloy-sol-macro-input 0.8.25", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "alloy-sol-macro" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a14f21d053aea4c6630687c2f4ad614bed4c81e14737a9b904798b24f30ea849" -dependencies = [ - "alloy-sol-macro-expander 1.2.1", - "alloy-sol-macro-input 1.2.1", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[package]] -name = "alloy-sol-macro-expander" -version = "0.8.25" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ad5da86c127751bc607c174d6c9fe9b85ef0889a9ca0c641735d77d4f98f26" +checksum = "aedac07a10d4c2027817a43cc1f038313fc53c7ac866f7363239971fd01f9f18" dependencies = [ - "alloy-sol-macro-input 0.8.25", - "const-hex", - "heck", - "indexmap", + "alloy-sol-macro-expander", + "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.104", - "syn-solidity 0.8.25", - "tiny-keccak", ] [[package]] name = "alloy-sol-macro-expander" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d99282e7c9ef14eb62727981a985a01869e586d1dec729d3bb33679094c100" +checksum = "24f9a598f010f048d8b8226492b6401104f5a5c1273c2869b72af29b48bb4ba9" dependencies = [ - "alloy-sol-macro-input 1.2.1", + "alloy-sol-macro-input", "const-hex", "heck", "indexmap", @@ -243,31 +171,15 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "syn-solidity 1.2.1", + "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", - "macro-string", - "proc-macro2", - "quote", - "syn 2.0.104", - "syn-solidity 0.8.25", -] - -[[package]] -name = "alloy-sol-macro-input" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda029f955b78e493360ee1d7bd11e1ab9f2a220a5715449babc79d6d0a01105" +checksum = "f494adf9d60e49aa6ce26dfd42c7417aa6d4343cf2ae621f20e4d92a5ad07d85" dependencies = [ "const-hex", "dunce", @@ -276,24 +188,14 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "syn-solidity 1.2.1", -] - -[[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", + "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10db1bd7baa35bc8d4a1b07efbf734e73e5ba09f2580fb8cee3483a36087ceb2" +checksum = "52db32fbd35a9c0c0e538b58b81ebbae08a51be029e7ad60e08b60481c2ec6c3" dependencies = [ "serde", "winnow", @@ -301,26 +203,13 @@ dependencies = [ [[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 0.8.25", - "alloy-primitives 0.8.25", - "alloy-sol-macro 0.8.25", - "const-hex", - "serde", -] - -[[package]] -name = "alloy-sol-types" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58377025a47d8b8426b3e4846a251f2c1991033b27f517aade368146f6ab1dfe" +checksum = "a285b46e3e0c177887028278f04cc8262b76fd3b8e0e20e93cea0a58c35f5ac5" dependencies = [ - "alloy-json-abi 1.2.1", - "alloy-primitives 1.2.1", - "alloy-sol-macro 1.2.1", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", "serde", ] @@ -747,6 +636,12 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.3.0" @@ -805,9 +700,8 @@ checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "binary-merkle-tree" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "hash-db", "log", @@ -821,7 +715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" dependencies = [ "bs58", - "hmac 0.12.1", + "hmac", "k256", "rand_core 0.6.4", "ripemd", @@ -966,10 +860,11 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.2.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ad8a0bed7827f0b07a5d23cec2e58cc02038a99e4ca81616cb2bb2025f804d" +checksum = "dee8eddd066a8825ec5570528e6880471210fd5d88cb6abbe1cfdd51ca249c33" dependencies = [ + "jam-codec", "log", "parity-scale-codec", "scale-info", @@ -1047,9 +942,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.27" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "shlex", ] @@ -1172,12 +1067,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -1216,16 +1105,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "crypto_secretbox" version = "0.1.1" @@ -1361,10 +1240,8 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.1", "syn 2.0.104", ] @@ -1395,7 +1272,6 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "unicode-xid", ] [[package]] @@ -1485,27 +1361,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" -[[package]] -name = "dyn-clonable" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36efbb9bfd58e1723780aa04b61aba95ace6a05d9ffabfdb0b43672552f0805" -dependencies = [ - "dyn-clonable-impl", - "dyn-clone", -] - -[[package]] -name = "dyn-clonable-impl" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "dyn-clone" version = "1.0.19" @@ -1539,9 +1394,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -1646,16 +1501,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[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" @@ -1671,6 +1516,14 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethereum-standards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", +] + [[package]] name = "ethereum-types" version = "0.15.1" @@ -1788,9 +1641,8 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "frame-benchmarking" -version = "40.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9e5fcdb30bb83b2d97d7e718127230e0fbbad82b9c32dedf63971f08709def" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-support", "frame-support-procedural", @@ -1813,23 +1665,23 @@ dependencies = [ [[package]] name = "frame-decode" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6027a409bac4fe95b4d107f965fcdbc252fc89d884a360d076b3070b6128c094" +checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" dependencies = [ - "frame-metadata 17.0.0", + "frame-metadata 21.0.0", "parity-scale-codec", - "scale-decode 0.14.0", + "scale-decode", "scale-info", "scale-type-resolver", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-metadata" -version = "17.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1838,9 +1690,20 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "20.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +checksum = "20dfd1d7eae1d94e32e869e2fb272d81f52dd8db57820a373adb83ea24d7d862" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1850,9 +1713,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c7c272704856cc88a86aef689a778050e59f89d7ec1e4ffb3a9e8e04e6b10" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "aquamarine", "array-bytes", @@ -1860,7 +1722,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -1892,9 +1754,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "33.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcb3c16c8fe1b4edc6df122212b50f776dfce31a94fa63305100841ba4eb7c93" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "cfg-expr", @@ -1907,15 +1768,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "syn 2.0.104", ] [[package]] name = "frame-support-procedural-tools" -version = "13.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1926,9 +1786,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -1937,9 +1796,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc20d95c35bad22eb8b8d7ef91197a439483458237b176e621d9210f2fbff15" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "cfg-if", "docify", @@ -2134,6 +1992,25 @@ dependencies = [ "subtle", ] +[[package]] +name = "h2" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hash-db" version = "0.16.0" @@ -2175,6 +2052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" dependencies = [ "allocator-api2", + "equivalent", "foldhash", "serde", ] @@ -2229,32 +2107,108 @@ checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" [[package]] name = "hmac" -version = "0.8.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "digest 0.10.7", ] [[package]] -name = "hmac" -version = "0.12.1" +name = "http" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ - "digest 0.10.7", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +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 = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", ] [[package]] @@ -2353,8 +2307,8 @@ dependencies = [ [[package]] name = "ink" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "const_format", "deranged", @@ -2369,25 +2323,26 @@ dependencies = [ "linkme", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.22.0", + "polkavm-derive", "scale-info", "sp-io", "sp-runtime-interface", "staging-xcm", + "tokio", ] [[package]] name = "ink_allocator" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "cfg-if", ] [[package]] name = "ink_codegen" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2398,7 +2353,7 @@ dependencies = [ "ink_primitives", "itertools 0.14.0", "parity-scale-codec", - "polkavm-derive 0.22.0", + "polkavm-derive", "proc-macro2", "quote", "serde", @@ -2408,8 +2363,8 @@ dependencies = [ [[package]] name = "ink_engine" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2425,8 +2380,8 @@ dependencies = [ [[package]] name = "ink_env" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "cfg-if", @@ -2442,9 +2397,9 @@ dependencies = [ "pallet-revive", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.22.0", - "scale-decode 0.16.0", - "scale-encode 0.10.0", + "polkavm-derive", + "scale-decode", + "scale-encode", "scale-info", "schnorrkel", "secp256k1 0.30.0", @@ -2458,8 +2413,8 @@ dependencies = [ [[package]] name = "ink_ir" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "either", @@ -2474,8 +2429,8 @@ dependencies = [ [[package]] name = "ink_macro" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "ink_codegen", "ink_ir", @@ -2489,8 +2444,8 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2504,18 +2459,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ - "alloy-sol-types 1.2.1", + "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", @@ -2527,8 +2482,8 @@ dependencies = [ "parity-scale-codec", "paste", "primitive-types 0.13.1", - "scale-decode 0.16.0", - "scale-encode 0.10.0", + "scale-decode", + "scale-encode", "scale-info", "serde", "sp-core", @@ -2540,8 +2495,8 @@ dependencies = [ [[package]] name = "ink_storage" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "array-init", "cfg-if", @@ -2558,8 +2513,8 @@ dependencies = [ [[package]] name = "ink_storage_traits" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "ink_metadata", "ink_prelude", @@ -2588,6 +2543,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + [[package]] name = "itertools" version = "0.10.5" @@ -2630,6 +2596,34 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jam-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d72f2fb8cfd27f6c52ea7d0528df594f7f2ed006feac153e9393ec567aafea98" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "jam-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "jam-codec-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09985146f40378e13af626964ac9c206d9d9b67c40c70805898d9954f709bcf5" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "k256" version = "0.13.4" @@ -2717,9 +2711,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" dependencies = [ "bitflags 2.9.1", "libc", @@ -2734,14 +2728,12 @@ dependencies = [ "arrayref", "base64", "digest 0.9.0", - "hmac-drbg", "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.8.5", "serde", "sha2 0.9.9", - "typenum", ] [[package]] @@ -2910,11 +2902,12 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memory-db" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", + "hashbrown 0.15.4", ] [[package]] @@ -2938,6 +2931,17 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + [[package]] name = "nalgebra" version = "0.33.2" @@ -3077,40 +3081,21 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "pallet-asset-conversion" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e063e39ad8ecd3c2b00c963f50cdf79e614c819a01e1c1ce9993287075b1b4d9" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", -] - [[package]] name = "pallet-revive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895fe6f50f621a69132697b8b43d29d1db4d9ff445eec410bf1fc98cd7e9412c" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "alloy-core", "derive_more 0.99.20", "environmental", - "ethabi-decode", + "ethereum-standards", "ethereum-types", "frame-benchmarking", "frame-support", "frame-system", "hex-literal 0.4.1", + "humantime-serde", "impl-trait-for-tuples", "log", "num-bigint", @@ -3123,7 +3108,7 @@ dependencies = [ "parity-scale-codec", "paste", "polkavm", - "polkavm-common 0.21.0", + "polkavm-common", "rand 0.8.5", "ripemd", "rlp 0.6.1", @@ -3137,17 +3122,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "staging-xcm", - "staging-xcm-builder", "substrate-bn", "subxt-signer", ] [[package]] name = "pallet-revive-fixtures" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279282bb5f8e1da5a22f0e74aabbe31d62e158b7700e102fd9447a971f90d383" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "anyhow", "cargo_metadata", @@ -3160,9 +3142,8 @@ dependencies = [ [[package]] name = "pallet-revive-proc-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c2dc2fc6961da23fefc54689ce81a8e006f6988bc465dcc9ab9db905d31766" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -3171,22 +3152,20 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb8f45102c6279f59f55e0051fc6c26b996619d7842800dfaf3a2583459a1c7" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", "parity-scale-codec", - "polkavm-derive 0.21.0", + "polkavm-derive", "scale-info", ] [[package]] name = "pallet-transaction-payment" -version = "40.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8ebd61b64848e39e5615832c964dc10b63bcebff26a9ec1cb867b4087240a03" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-benchmarking", "frame-support", @@ -3194,7 +3173,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", "sp-io", "sp-runtime", ] @@ -3294,7 +3272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", - "hmac 0.12.1", + "hmac", "password-hash", ] @@ -3331,203 +3309,91 @@ dependencies = [ "spki", ] -[[package]] -name = "polkadot-core-primitives" -version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7c519ee804fd08d7464871bd2fe164e8f0683501ea59d2a10f5ef214dacb3b" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "16.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72943c0948c686b47bacb1a03e59baff63bfba2e16e208d77f0f8615827f8564" -dependencies = [ - "bounded-collections", - "derive_more 0.99.20", - "parity-scale-codec", - "polkadot-core-primitives", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-weights", -] - -[[package]] -name = "polkadot-sdk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" -dependencies = [ - "sp-crypto-hashing", -] - [[package]] name = "polkavm" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd34e2f74206fff33482ae1718e275f11365ef8c4de7f0e69217f8845303867" +checksum = "fa028f713d0613f0f08b8b3367402cb859218854f6b96fcbe39a501862894d6f" dependencies = [ "libc", "log", "polkavm-assembler", - "polkavm-common 0.21.0", + "polkavm-common", "polkavm-linux-raw", ] [[package]] name = "polkavm-assembler" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f512bc80cb10439391a7c13a9eb2d37cf66b7305e7df0a06d662eff4f5b07625" +checksum = "4859a29e1f4ad64610c4bc2bfc40bb9a535068a034933a5b56b5e7a0febf105a" dependencies = [ "log", ] [[package]] -name = "polkavm-common" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" - -[[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", -] - -[[package]] -name = "polkavm-common" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538810ffdaa629113b9f436f43ba487a6cceacc04a769ac3cdcd32fcf87351cd" - -[[package]] -name = "polkavm-derive" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" -dependencies = [ - "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]] -name = "polkavm-derive" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e819eaea986d6a3de2a08840f0cc188db3c318b30f9bb1deb416d8c4beb2ed14" -dependencies = [ - "polkavm-derive-impl-macro 0.22.0", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" -dependencies = [ - "polkavm-common 0.18.0", - "proc-macro2", - "quote", - "syn 2.0.104", -] - -[[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.104", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.22.0" +name = "polkavm-common" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414507a0a7c9451cc81336ef1f5ccbab8fa4aeda402668735aa28331867bd3ef" +checksum = "49a5794b695626ba70d29e66e3f4f4835767452a6723f3a0bc20884b07088fe8" dependencies = [ - "polkavm-common 0.22.0", - "proc-macro2", - "quote", - "syn 2.0.104", + "blake3", + "log", + "polkavm-assembler", ] [[package]] -name = "polkavm-derive-impl-macro" -version = "0.18.0" +name = "polkavm-derive" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" +checksum = "95282a203ae1f6828a04ff334145c3f6dc718bba6d3959805d273358b45eab93" dependencies = [ - "polkavm-derive-impl 0.18.1", - "syn 2.0.104", + "polkavm-derive-impl-macro", ] [[package]] -name = "polkavm-derive-impl-macro" -version = "0.21.0" +name = "polkavm-derive-impl" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36837f6b7edfd6f4498f8d25d81da16cf03bd6992c3e56f3d477dfc90f4fefca" +checksum = "6069dc7995cde6e612b868a02ce48b54397c6d2582bd1b97b63aabbe962cd779" dependencies = [ - "polkavm-derive-impl 0.21.0", + "polkavm-common", + "proc-macro2", + "quote", "syn 2.0.104", ] [[package]] name = "polkavm-derive-impl-macro" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a5df4cc6466a219386b04d8bd267ba772f9458a8e9aa7539757ca5b11e2aa" +checksum = "581d34cafec741dc5ffafbb341933c205b6457f3d76257a9d99fb56687219c91" dependencies = [ - "polkavm-derive-impl 0.22.0", + "polkavm-derive-impl", "syn 2.0.104", ] [[package]] name = "polkavm-linker" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bc764986c4a63f9ab9890c3f4eb9b4c13b6ff80d79685bd48ade147234aab4" +checksum = "beb896023e5bd89bba40311797d8d42490fa4a1fd5256c74820753c5722d1e67" dependencies = [ "dirs", "gimli", "hashbrown 0.14.5", "log", "object", - "polkavm-common 0.21.0", + "polkavm-common", "regalloc2", "rustc-demangle", ] [[package]] name = "polkavm-linux-raw" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" +checksum = "28919f542476f4158cc71e6c072b1051f38f4b514253594ac3ad80e3c0211fc8" [[package]] name = "poly1305" @@ -3574,9 +3440,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", "syn 2.0.104", @@ -3683,6 +3549,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror 1.0.69", +] + [[package]] name = "proptest" version = "1.7.0" @@ -3694,7 +3574,7 @@ dependencies = [ "bitflags 2.9.1", "lazy_static", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax 0.8.5", @@ -3739,14 +3619,13 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", - "serde", ] [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -3809,9 +3688,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" dependencies = [ "bitflags 2.9.1", ] @@ -3910,7 +3789,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac 0.12.1", + "hmac", "subtle", ] @@ -3962,7 +3841,7 @@ dependencies = [ "primitive-types 0.12.2", "proptest", "rand 0.8.5", - "rand 0.9.1", + "rand 0.9.2", "rlp 0.5.2", "ruint-macro", "serde", @@ -4020,15 +3899,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -4082,18 +3961,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-bits" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" -dependencies = [ - "parity-scale-codec", - "scale-info", - "scale-type-resolver", - "serde", -] - [[package]] name = "scale-bits" version = "0.7.0" @@ -4101,22 +3968,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" dependencies = [ "parity-scale-codec", + "scale-info", "scale-type-resolver", -] - -[[package]] -name = "scale-decode" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" -dependencies = [ - "derive_more 1.0.0", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode-derive 0.14.0", - "scale-type-resolver", - "smallvec", + "serde", ] [[package]] @@ -4126,25 +3980,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" dependencies = [ "parity-scale-codec", - "scale-bits 0.7.0", - "scale-decode-derive 0.16.0", + "primitive-types 0.13.1", + "scale-bits", + "scale-decode-derive", "scale-type-resolver", "smallvec", "thiserror 2.0.12", ] -[[package]] -name = "scale-decode-derive" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "scale-decode-derive" version = "0.16.0" @@ -4157,21 +4000,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "scale-encode" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" -dependencies = [ - "derive_more 1.0.0", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-encode-derive 0.8.0", - "scale-type-resolver", - "smallvec", -] - [[package]] name = "scale-encode" version = "0.10.0" @@ -4179,25 +4007,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" dependencies = [ "parity-scale-codec", - "scale-encode-derive 0.10.0", + "primitive-types 0.13.1", + "scale-bits", + "scale-encode-derive", "scale-type-resolver", "smallvec", "thiserror 2.0.12", ] -[[package]] -name = "scale-encode-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" -dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "scale-encode-derive" version = "0.10.0" @@ -4250,18 +4067,17 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +checksum = "8ca8b26b451ecb7fd7b62b259fa28add63d12ec49bbcac0e01fcb4b5ae0c09aa" dependencies = [ - "derive_more 1.0.0", "either", "parity-scale-codec", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", - "scale-info", + "scale-bits", + "scale-decode", + "scale-encode", "scale-type-resolver", + "thiserror 2.0.12", ] [[package]] @@ -4301,9 +4117,9 @@ dependencies = [ [[package]] name = "schnorrkel" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +checksum = "6e9fcb6c2e176e86ec703e22560d99d65a5ee9056ae45a08e13e84ebf796296f" dependencies = [ "aead", "arrayref", @@ -4357,7 +4173,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "secp256k1-sys 0.8.1", + "secp256k1-sys 0.8.2", ] [[package]] @@ -4382,9 +4198,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" dependencies = [ "cc", ] @@ -4494,9 +4310,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "itoa", "memchr", @@ -4630,10 +4446,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] -name = "sp-api" -version = "36.0.1" +name = "socket2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541da427f47dfb97f3dd0556fa3272bdc5dfa0d4c1ad53a22670a9bae4db63d7" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "sp-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "docify", "hash-db", @@ -4654,9 +4479,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "22.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cedafdeaf15c774433ad8f5b00883bdf7d86e7c8b8e050e3439d4ae422114096" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "blake2", @@ -4669,9 +4493,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba375ab65a76f7413d1bfe48122fd347ce7bd2047e36ecbbd78f12f5adaed121" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4682,9 +4505,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "26.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "docify", "integer-sqrt", @@ -4697,9 +4519,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f3b3414e7620ad72d0000b520e0570dca38dc63e160c95164ff3f789020cc1" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -4714,9 +4535,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b54310103ae4f0e3228e217e2a9ccaca0d7c3502d3aa276623febf4c722ca397" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -4733,9 +4553,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc83d9e7b1d58e1d020c20d7208b00d21fa73dcf92721114eae432b9f01e62d5" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4745,9 +4564,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "36.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "ark-vrf", "array-bytes", @@ -4755,7 +4573,7 @@ dependencies = [ "blake2", "bounded-collections", "bs58", - "dyn-clonable", + "dyn-clone", "ed25519-zebra", "futures", "hash-db", @@ -4777,7 +4595,8 @@ dependencies = [ "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "sp-crypto-hashing", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", @@ -4805,22 +4624,33 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "quote", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "syn 2.0.104", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -4829,9 +4659,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "environmental", "parity-scale-codec", @@ -4840,9 +4669,8 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb0d996dfce9afb8879bdfbba9cb9a7d06f29fda38168b91e90419b3b92c42e" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4853,9 +4681,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb09ff07946f3e1ecdd4bfb40b2cceba60188215ceb941b5b07230294d7aee1" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -4867,9 +4694,8 @@ dependencies = [ [[package]] name = "sp-io" -version = "40.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bytes", "docify", @@ -4877,11 +4703,11 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive", "rustversion", "secp256k1 0.28.2", "sp-core", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "sp-externalities", "sp-keystore", "sp-runtime-interface", @@ -4894,9 +4720,8 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "parking_lot", @@ -4906,20 +4731,18 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d1db25e362edbf5531b427d4bdfc2562bec6a031c3eb2a9145c0a0a01a572d" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "parity-scale-codec", "scale-info", ] [[package]] name = "sp-panic-handler" -version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "backtrace", "regex", @@ -4927,9 +4750,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "41.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "binary-merkle-tree", "docify", @@ -4957,14 +4779,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "29.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive", "primitive-types 0.13.1", "sp-externalities", "sp-runtime-interface-proc-macro", @@ -4977,9 +4798,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "expander", @@ -4991,9 +4811,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "38.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8f9c0a32836e3c8842b0aec0813077654885d45d83b618210fbb730ea63545" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5005,9 +4824,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "hash-db", "log", @@ -5027,14 +4845,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" [[package]] name = "sp-storage" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5045,9 +4861,8 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176c77326c15425a15e085261161a9435f9a3c0d4bf61dae6dccf05b957a51c6" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -5058,11 +4873,11 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", + "regex", "tracing", "tracing-core", "tracing-subscriber", @@ -5070,9 +4885,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "39.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "ahash", "hash-db", @@ -5085,6 +4899,7 @@ dependencies = [ "schnellru", "sp-core", "sp-externalities", + "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing", "trie-db", @@ -5093,9 +4908,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "39.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5111,9 +4925,8 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -5124,9 +4937,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -5136,9 +4948,8 @@ dependencies = [ [[package]] name = "sp-weights" -version = "31.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -5188,9 +4999,8 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "16.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0126278d7fc6d7dec55e5a109f838bbf401dd084aecf2597e4e11ea07515a0a" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "array-bytes", "bounded-collections", @@ -5208,52 +5018,6 @@ dependencies = [ "xcm-procedural", ] -[[package]] -name = "staging-xcm-builder" -version = "20.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f031952c1496cf7f86d19ab38e3264be9a54b7d8eecb25ba69f977cc7549d08" -dependencies = [ - "environmental", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "pallet-asset-conversion", - "pallet-transaction-payment", - "parity-scale-codec", - "polkadot-parachain-primitives", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-executor", - "tracing", -] - -[[package]] -name = "staging-xcm-executor" -version = "19.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9bc315e8c7018fcfe0371ce4b7e726fb699e37b2acc3e5effb87a7d131a3ff" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-weights", - "staging-xcm", - "tracing", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -5268,11 +5032,10 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "substrate-bip39" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ - "hmac 0.12.1", + "hmac", "pbkdf2", "schnorrkel", "sha2 0.10.9", @@ -5292,6 +5055,20 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "subtle" version = "2.6.1" @@ -5300,52 +5077,54 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subxt-core" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7a1bc6c9c1724971636a66e3225a7253cdb35bb6efb81524a6c71c04f08c59" +checksum = "66ef00be9d64885ec94e478a58e4e39d222024b20013ae7df4fc6ece545391aa" dependencies = [ "base58", "blake2", "derive-where", "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "hex", "impl-serde", "keccak-hash", "parity-scale-codec", - "polkadot-sdk", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", "scale-value", "serde", "serde_json", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", + "thiserror 2.0.12", "tracing", ] [[package]] name = "subxt-metadata" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacd4e7484fef58deaa2dcb32d94753a864b208a668c0dd0c28be1d8abeeadb2" +checksum = "fff4591673600c4388e21305788282414d26c791b4dee21b7cb0b19c10076f98" dependencies = [ "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "parity-scale-codec", - "polkadot-sdk", "scale-info", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 2.0.12", ] [[package]] name = "subxt-signer" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" +checksum = "4a2370298a210ed1df26152db7209a85e0ed8cfbce035309c3b37f7b61755377" dependencies = [ "base64", "bip32", @@ -5353,11 +5132,10 @@ dependencies = [ "cfg-if", "crypto_secretbox", "hex", - "hmac 0.12.1", + "hmac", "keccak-hash", "parity-scale-codec", "pbkdf2", - "polkadot-sdk", "regex", "schnorrkel", "scrypt", @@ -5366,7 +5144,9 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", + "thiserror 2.0.12", "zeroize", ] @@ -5394,21 +5174,9 @@ dependencies = [ [[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.104", -] - -[[package]] -name = "syn-solidity" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ac494e7266fcdd2ad80bf4375d55d27a117ea5c866c26d0e97fe5b3caeeb75" +checksum = "a7a985ff4ffd7373e10e0fb048110fb11a162e5a4c47f92ddb8787a6f766b769" dependencies = [ "paste", "proc-macro2", @@ -5559,6 +5327,37 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "slab", + "socket2", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.23" @@ -6150,9 +5949,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -6177,9 +5976,8 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "11.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d3d21c65cbf847ae0b1a8e6411b614d269d3108c6c649b039bffcf225e89aa4" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "proc-macro2", diff --git a/pop-api/integration-tests/contracts/create_token_in_constructor/Cargo.lock b/pop-api/integration-tests/contracts/create_token_in_constructor/Cargo.lock index dd0e00d82..3f1b9cf9f 100644 --- a/pop-api/integration-tests/contracts/create_token_in_constructor/Cargo.lock +++ b/pop-api/integration-tests/contracts/create_token_in_constructor/Cargo.lock @@ -1928,9 +1928,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", "bitvec", @@ -1945,9 +1945,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", diff --git a/pop-api/integration-tests/contracts/fungibles/Cargo.lock b/pop-api/integration-tests/contracts/fungibles/Cargo.lock index d3cc173ca..54544517d 100644 --- a/pop-api/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api/integration-tests/contracts/fungibles/Cargo.lock @@ -1928,9 +1928,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", "bitvec", @@ -1945,9 +1945,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", diff --git a/pop-api/integration-tests/contracts/messaging/Cargo.lock b/pop-api/integration-tests/contracts/messaging/Cargo.lock index 3abae3911..a717eb46e 100644 --- a/pop-api/integration-tests/contracts/messaging/Cargo.lock +++ b/pop-api/integration-tests/contracts/messaging/Cargo.lock @@ -1928,9 +1928,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", "bitvec", @@ -1945,9 +1945,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", diff --git a/pop-api/integration-tests/contracts/nonfungibles/Cargo.lock b/pop-api/integration-tests/contracts/nonfungibles/Cargo.lock index cf3ad145e..05c4c5a97 100644 --- a/pop-api/integration-tests/contracts/nonfungibles/Cargo.lock +++ b/pop-api/integration-tests/contracts/nonfungibles/Cargo.lock @@ -1948,9 +1948,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", "bitvec", @@ -1965,9 +1965,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", From 9623a6ced6d73b7a9214db31d9bb8acd475e0468 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 27 Jul 2025 10:16:14 +0100 Subject: [PATCH 178/284] docs(api): remove todos --- pop-api-vnext/src/fungibles/erc20/v0/errors.rs | 2 +- pop-api-vnext/src/fungibles/v0/errors.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 01a0cb263..915465187 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -4,7 +4,7 @@ use super::*; use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[derive(ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// Indicates a failure with the `spender`’s `allowance`. ERC20InsufficientAllowance(Address, U256, U256), diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index a54b38721..e5a472a00 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -5,7 +5,7 @@ use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// The metadata provided is invalid. BadMetadata, From ea3101f92e8b1339f9db80365b4a2fa51af2c497 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 27 Jul 2025 11:13:34 +0100 Subject: [PATCH 179/284] ci: enable global cache disabling --- .github/actions/init/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index 00e111ce6..fb389a1b1 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -1,6 +1,9 @@ name: Initialize description: This action initializes a runner for use in other actions. inputs: + cache: + description: Whether to enable Rust caching. Defaults to true. + default: "true" cache-all-crates: description: Whether all crates should be cached, or only dependent crates. Defaults to true. default: "true" @@ -33,6 +36,7 @@ runs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Rust Cache + if: ${{ inputs.cache == 'true' }} uses: Swatinem/rust-cache@v2.8.0 with: cache-all-crates: ${{ inputs.cache-all-crates }} From 663e7deff770ffc36a76a1e9f6b6af5ef52a655d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 27 Jul 2025 11:15:48 +0100 Subject: [PATCH 180/284] ci: reenable crate caching --- .github/workflows/ci.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9facc8ab7..359859d9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,9 +51,6 @@ jobs: - uses: actions/checkout@v4 - uses: "./.github/actions/init" - with: - # TODO: remove once pallet-revive-fixtures build cache issue resolved - cache-all-crates: false - name: Check Build run: | @@ -64,10 +61,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: "./.github/actions/init" - with: - # TODO: remove once pallet-revive-fixtures build cache issue resolved - cache-all-crates: false + - name: Check Build with ISMP run: | cargo check --release --locked --workspace --exclude integration-tests --features=ismp,runtime-benchmarks,try-runtime @@ -208,9 +204,6 @@ jobs: - uses: actions/checkout@v4 - uses: "./.github/actions/init" - with: - # TODO: remove once pallet-revive-fixtures build cache issue resolved - cache-all-crates: false - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov From 71e8abfbefb6ceed95ddb696b2434e69cfcf3440 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 22:03:29 +0100 Subject: [PATCH 181/284] docs(pallets/api): remove token id size todo after discussion --- .../src/fungibles/precompiles/interfaces/v0/IFungibles.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol index 92de11887..f81093f17 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol @@ -6,7 +6,6 @@ pragma solidity ^0.8.30; * tokens. The goal is to provide a simplified, consistent API that adheres to standards in the * smart contract space. */ -// TODO: consider size of id -> uint256 (word) interface IFungibles { /** * @notice Transfers `value` amount of tokens from the caller's account to account `to`. From 181d1ef0a56b5036ac058486d903147fe33ea540 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 22:23:40 +0100 Subject: [PATCH 182/284] test(api): relocate and reduce initial value, gas and storage limits --- .../integration-tests/src/fungibles.rs | 25 ++++++++++++++++--- pop-api-vnext/integration-tests/src/lib.rs | 9 +++---- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index f4c0c3957..3bab53eb3 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -20,6 +20,9 @@ use sp_io::hashing::twox_256; use super::*; const CONTRACT: &str = "contracts/fungibles/target/ink/fungibles.polkavm"; +const GAS_LIMIT: Weight = Weight::from_parts(6_000_000_000, 100_000); +const INIT_VALUE: Balance = 11 * UNIT; +const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(1 * UNIT); #[test] fn total_supply_works() { @@ -707,8 +710,15 @@ impl Contract { let data = vec![]; // Default solidity constructor let salt = twox_256(&value.to_le_bytes()); - let address = - instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); + let address = instantiate( + RuntimeOrigin::signed(origin.clone()), + CONTRACT, + value, + GAS_LIMIT, + STORAGE_DEPOSIT_LIMIT, + data, + Some(salt), + ); Self { address, creator: origin.clone() } } @@ -716,8 +726,15 @@ impl Contract { fn new_with_create(origin: &AccountId, value: Balance, min_balance: U256) -> Self { let data = [blake_selector("create").to_vec(), min_balance.encode()].concat(); // Additional constructor via ink abi let salt = twox_256(&value.to_le_bytes()); - let address = - instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); + let address = instantiate( + RuntimeOrigin::signed(origin.clone()), + CONTRACT, + value, + GAS_LIMIT, + STORAGE_DEPOSIT_LIMIT, + data, + Some(salt), + ); Self { address, creator: origin.clone() } } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index d8de9aa9a..d6e6ac9e4 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -17,10 +17,7 @@ use sp_runtime::{BuildStorage, DispatchError}; mod fungibles; -const GAS_LIMIT: Weight = Weight::from_parts(500_000_000_000, 3 * 1024 * 1024); const INIT_AMOUNT: Balance = 100_000_000 * UNIT; -const INIT_VALUE: Balance = 100 * UNIT; -const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(Balance::MAX); type TokenId = u32; @@ -66,6 +63,8 @@ fn instantiate( origin: RuntimeOrigin, contract: impl AsRef, value: Balance, + gas_limit: Weight, + storage_deposit_limit: DepositLimit, data: Vec, salt: Option<[u8; 32]>, ) -> H160 { @@ -74,8 +73,8 @@ fn instantiate( let result = Revive::bare_instantiate( origin, value, - GAS_LIMIT, - DepositLimit::Balance(Balance::MAX), + gas_limit, + storage_deposit_limit, Code::Upload(binary), data, salt, From f031bd24addac57ec6e93076074bdcb35cdfafc5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 21:37:33 +0100 Subject: [PATCH 183/284] refactor(pallets/api): ensure all errors apart from insufficient gas result in revert --- .../api-vnext/src/fungibles/benchmarking.rs | 7 +- .../api-vnext/src/fungibles/precompiles.rs | 6 +- .../src/fungibles/precompiles/erc20.rs | 1 + .../src/fungibles/precompiles/erc20/v0.rs | 232 +++++++-- .../precompiles/interfaces/v0/IERC20.sol | 164 ++++++- .../precompiles/interfaces/v0/IFungibles.sol | 157 +++++- .../api-vnext/src/fungibles/precompiles/v0.rs | 462 +++++++++++------- pallets/api-vnext/src/lib.rs | 10 +- 8 files changed, 773 insertions(+), 266 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/benchmarking.rs b/pallets/api-vnext/src/fungibles/benchmarking.rs index ece14a014..56c307fc4 100644 --- a/pallets/api-vnext/src/fungibles/benchmarking.rs +++ b/pallets/api-vnext/src/fungibles/benchmarking.rs @@ -8,7 +8,7 @@ use alloc::{ use frame_benchmarking::v2::*; use frame_support::{ assert_ok, - pallet_prelude::IsType, + pallet_prelude::{DispatchError, IsType}, traits::{ fungible::{Inspect, Mutate}, fungibles::{ @@ -24,7 +24,6 @@ use pallet_revive::{ precompiles::{ alloy::primitives as alloy, run::{H256, U256}, - Error, }, test_utils::{ALICE_ADDR, BOB_ADDR, CHARLIE_ADDR}, AddressMapper as _, Origin, @@ -58,8 +57,8 @@ type TokenId = >::AssetId; Time: Time> >, // Fungibles - T: pallet_assets::Config + Into + Copy, Balance: TryConvert> + pallet_balances::Config, - alloy::U256: TryConvert, Error = Error> + T: pallet_assets::Config + Into + Copy, Balance: TryConvert> + pallet_balances::Config, + alloy::U256: TryConvert, Error = DispatchError> )] mod benchmarks { use super::*; diff --git a/pallets/api-vnext/src/fungibles/precompiles.rs b/pallets/api-vnext/src/fungibles/precompiles.rs index 566f23835..ca4308fa9 100644 --- a/pallets/api-vnext/src/fungibles/precompiles.rs +++ b/pallets/api-vnext/src/fungibles/precompiles.rs @@ -1,10 +1,7 @@ use alloc::string::String; use codec::Decode; -use frame_support::{ - sp_runtime::{ArithmeticError, DispatchError, ModuleError, TokenError}, - traits::PalletInfo, -}; +use frame_support::{sp_runtime::ModuleError, traits::PalletInfo}; pub(super) use pallet_revive::precompiles::alloy::{ primitives::{Address, U256}, sol_types::SolCall, @@ -18,4 +15,5 @@ use super::*; pub mod erc20; /// The first version of the Fungibles API. +#[allow(ambiguous_associated_items)] pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs index 4b6415e55..1d1bde96b 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20.rs @@ -1,4 +1,5 @@ use super::*; /// The first version of the Erc20 API. +#[allow(ambiguous_associated_items)] pub mod v0; diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index 41a99ea73..2c9ad566e 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -1,6 +1,6 @@ use alloc::{string::String, vec::Vec}; -use frame_support::sp_runtime::traits::AtLeast32Bit; +use frame_support::{pallet_prelude as frame, sp_runtime::traits::AtLeast32Bit}; use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; use AddressMatcher::Prefix; @@ -21,13 +21,13 @@ impl< + pallet_assets::Config< I, AssetId: AtLeast32Bit, - Balance: TryConvert, + Balance: TryConvert, > + pallet_revive::Config + Config, I: 'static, > Precompile for Erc20 where - U256: TryConvert<>::Balance, Error = Error>, + U256: TryConvert<>::Balance, Error = frame::DispatchError>, { type Interface = IERC20Calls; type T = T; @@ -48,7 +48,8 @@ where IERC20Calls::totalSupply(_) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = total_supply::(token).try_convert()?; + let total_supply = + total_supply::(token).try_convert().map_err(Self::map_err)?; Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, @@ -56,25 +57,27 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*account.0).into()); - let balance = balance::(token, &account).try_convert()?; + let balance = + balance::(token, &account).try_convert().map_err(Self::map_err)?; Ok(balanceOfCall::abi_encode_returns(&balance)) }, IERC20Calls::transfer(transferCall { to, value }) => { env.charge(>::WeightInfo::transfer())?; - let origin = env.caller(); - let account = origin.account_id()?; - let from = >::to_address(account).0.into(); ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); - let balance = balance::(token.clone(), account).try_convert()?; + let origin = env.caller(); + let account = origin.account_id().map_err(Self::map_err)?; + let from = >::to_address(account).0.into(); + let balance = + balance::(token.clone(), account).try_convert().map_err(Self::map_err)?; transfer::( to_runtime_origin(origin), token, env.to_account_id(&(*to.0).into()), - (*value).try_convert()?, + (*value).try_convert().map_err(Self::map_err)?, ) .map_err(|e| Self::map_transfer_err(e, &from, value, &balance))?; @@ -86,57 +89,67 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); - let remaining = allowance::(token, &owner, &spender).try_convert()?; + let remaining = allowance::(token, &owner, &spender) + .try_convert() + .map_err(Self::map_err)?; Ok(allowanceCall::abi_encode_returns(&remaining)) }, IERC20Calls::approve(approveCall { spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; - let owner = >::to_address(env.caller().account_id()?).0.into(); ensure!(!spender.is_zero(), ERC20InvalidSpender { spender: *spender }); ensure!(!value.is_zero(), ERC20InsufficientValue); - match approve::( - to_runtime_origin(env.caller()), - token, - env.to_account_id(&(*spender.0).into()), - (*value).try_convert()?, - ) { - Ok(result) => { - // Adjust weight - if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - }, - Err(e) => { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - return Err(e.error.into()) - }, - }; + let owner = (|| { + let owner = >::to_address(env.caller().account_id()?).0.into(); + + match approve::( + to_runtime_origin(env.caller()), + token, + env.to_account_id(&(*spender.0).into()), + (*value).try_convert()?, + ) { + Ok(result) => { + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error) + }, + }; + + Ok(owner) + })() + .map_err(Self::map_err)?; deposit_event(env, Approval { owner, spender: *spender, value: *value })?; Ok(approveCall::abi_encode_returns(&true)) }, IERC20Calls::transferFrom(transferFromCall { from, to, value }) => { env.charge(>::WeightInfo::transfer_from())?; - let origin = env.caller(); - let account = origin.account_id()?; ensure!(!from.is_zero(), ERC20InvalidSender { sender: *from }); ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); + let origin = env.caller(); + let account = origin.account_id().map_err(Self::map_err)?; let owner = env.to_account_id(&(*from.0).into()); let spender = >::to_address(account).0.into(); - let allowance = allowance::(token.clone(), &owner, account).try_convert()?; + let allowance = allowance::(token.clone(), &owner, account) + .try_convert() + .map_err(Self::map_err)?; transfer_from::( to_runtime_origin(origin), @@ -184,11 +197,30 @@ impl, I: 'static> Erc20 Error { + // Maps generic runtime errors. + fn map_err(e: frame::DispatchError) -> Error { + use frame::DispatchError::*; + match e { + Arithmetic(error) => self::Arithmetic::from(error).into(), + Module(ModuleError { index, error, .. }) => + self::Module { index, error: error.into() }.into(), + Token(error) => self::Token::from(error).into(), + Transactional(error) => self::Transactional::from(error).into(), + Trie(error) => self::Trie::from(error).into(), + other => self::Dispatch::from(other).into(), + } + } + + // Maps select, domain-specific dispatch errors to ERC20 errors. All others are mapped to + // more generic runtime errors. + fn map_transfer_err( + e: frame::DispatchError, + from: &Address, + value: &U256, + balance: &U256, + ) -> Error { match e { - DispatchError::Module(ModuleError { index, error, .. }) + frame::DispatchError::Module(ModuleError { index, error, .. }) if Some(index as usize) == T::PalletInfo::index::>() => { @@ -207,19 +239,19 @@ impl, I: 'static> Erc20 None, } - .unwrap_or_else(|| e.into()) + .unwrap_or_else(|| Self::map_err(e)) } - // Maps select, domain-specific dispatch errors to ERC20 errors. Anything not mapped results - // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + // Maps select, domain-specific dispatch errors to ERC20 errors. All others are mapped to + // more generic runtime errors. fn map_transfer_from_err( - e: DispatchError, + e: frame::DispatchError, spender: &Address, value: &U256, allowance: &U256, ) -> Error { match e { - DispatchError::Module(ModuleError { index, error, .. }) + frame::DispatchError::Module(ModuleError { index, error, .. }) if Some(index as usize) == T::PalletInfo::index::>() => { @@ -238,14 +270,112 @@ impl, I: 'static> Erc20 None, } - .unwrap_or_else(|| e.into()) + .unwrap_or_else(|| Self::map_err(e)) } } // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { + // ERC20 IERC20::ERC20InsufficientAllowance, IERC20::ERC20InsufficientBalance, + // Generic + Arithmetic, + Dispatch, + Module, + Token, + Transactional, + Trie +} + +impl From for Arithmetic { + fn from(error: frame_support::sp_runtime::ArithmeticError) -> Self { + use frame_support::sp_runtime::ArithmeticError::*; + Self(match error { + Underflow => ArithmeticError::Underflow, + Overflow => ArithmeticError::Overflow, + DivisionByZero => ArithmeticError::DivisionByZero, + }) + } +} + +impl From for Dispatch { + fn from(error: frame::DispatchError) -> Self { + use frame::DispatchError::*; + Self(match error { + Other(_) => DispatchError::Other, + CannotLookup => DispatchError::CannotLookup, + BadOrigin => DispatchError::BadOrigin, + Module(_) => DispatchError::Module, + ConsumerRemaining => DispatchError::ConsumerRemaining, + NoProviders => DispatchError::NoProviders, + TooManyConsumers => DispatchError::TooManyConsumers, + Token(_) => DispatchError::Token, + Arithmetic(_) => DispatchError::Arithmetic, + Transactional(_) => DispatchError::Transactional, + Exhausted => DispatchError::Exhausted, + Corruption => DispatchError::Corruption, + Unavailable => DispatchError::Unavailable, + RootNotAllowed => DispatchError::RootNotAllowed, + Trie(_) => DispatchError::Trie, + }) + } +} + +impl From for Module { + fn from(error: frame_support::sp_runtime::ModuleError) -> Self { + Self { index: error.index, error: error.error.into() } + } +} + +impl From for Token { + fn from(error: frame_support::sp_runtime::TokenError) -> Self { + use frame_support::sp_runtime::TokenError::*; + Self(match error { + FundsUnavailable => TokenError::FundsUnavailable, + OnlyProvider => TokenError::OnlyProvider, + BelowMinimum => TokenError::BelowMinimum, + CannotCreate => TokenError::CannotCreate, + UnknownAsset => TokenError::Unknown, + Frozen => TokenError::Frozen, + Unsupported => TokenError::Unsupported, + CannotCreateHold => TokenError::CannotCreateHold, + NotExpendable => TokenError::NotExpendable, + Blocked => TokenError::Blocked, + }) + } +} + +impl From for Transactional { + fn from(error: frame_support::sp_runtime::TransactionalError) -> Self { + use frame_support::sp_runtime::TransactionalError::*; + Self(match error { + LimitReached => TransactionalError::LimitReached, + NoLayer => TransactionalError::NoLayer, + }) + } +} + +impl From for Trie { + fn from(error: frame_support::traits::TrieError) -> Self { + use frame_support::traits::TrieError::*; + Self(match error { + InvalidStateRoot => TrieError::InvalidStateRoot, + IncompleteDatabase => TrieError::IncompleteDatabase, + ValueAtIncompleteKey => TrieError::ValueAtIncompleteKey, + DecoderError => TrieError::DecoderError, + InvalidHash => TrieError::InvalidHash, + DuplicateKey => TrieError::DuplicateKey, + ExtraneousNode => TrieError::ExtraneousNode, + ExtraneousValue => TrieError::ExtraneousValue, + ExtraneousHashReference => TrieError::ExtraneousHashReference, + InvalidChildReference => TrieError::InvalidChildReference, + ValueMismatch => TrieError::ValueMismatch, + IncompleteProof => TrieError::IncompleteProof, + RootMismatch => TrieError::RootMismatch, + DecodeError => TrieError::DecodeError, + }) + } } #[cfg(test)] diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol index 4a01b05ba..bbc876db2 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IERC20.sol @@ -2,18 +2,18 @@ pragma solidity ^0.8.30; /** - * @dev Interface of the ERC-20 standard as defined in the ERC. + * @title Interface of the ERC-20 standard as defined in the ERC. * Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol */ interface IERC20 { /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). + * @notice Emitted when `value` tokens are moved from one account (`from`) to another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. + * @notice Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. * `value` is the new allowance. */ event Approval( @@ -23,17 +23,17 @@ interface IERC20 { ); /** - * @dev Returns the value of tokens in existence. + * @notice Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** - * @dev Returns the value of tokens owned by `account`. + * @notice Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** - * @dev Moves a `value` amount of tokens from the caller's account to `to`. + * @notice Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * @@ -42,7 +42,7 @@ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); /** - * @dev Returns the remaining number of tokens that `spender` will be allowed to spend on + * @notice Returns the remaining number of tokens that `spender` will be allowed to spend on * behalf of `owner` through {transferFrom}. This is zero by default. * * This value changes when {approve} or {transferFrom} are called. @@ -53,7 +53,7 @@ interface IERC20 { ) external view returns (uint256); /** - * @dev Sets a `value` amount of tokens as the allowance of `spender` over the caller's + * @notice Sets a `value` amount of tokens as the allowance of `spender` over the caller's * tokens. * * Returns a boolean value indicating whether the operation succeeded. @@ -69,7 +69,7 @@ interface IERC20 { function approve(address spender, uint256 value) external returns (bool); /** - * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. + * @notice Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. * `value` is then deducted from the caller's allowance. * * Returns a boolean value indicating whether the operation succeeded. @@ -88,22 +88,22 @@ interface IERC20 { // Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol /** - * @dev Returns the name of the token. + * @notice Returns the name of the token. */ function name() external view returns (string memory); /** - * @dev Returns the symbol of the token. + * @notice Returns the symbol of the token. */ function symbol() external view returns (string memory); /** - * @dev Returns the decimals places of the token. + * @notice Returns the decimals places of the token. */ function decimals() external view returns (uint8); /** - * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. + * @notice Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. @@ -114,7 +114,7 @@ interface IERC20 { uint256 needed ); /** - * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. + * @notice Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. @@ -124,21 +124,149 @@ interface IERC20 { uint256 balance, uint256 needed ); - /// @dev Indicates an error related to a specified `value`. + /// @notice Indicates an error related to a specified `value`. error ERC20InsufficientValue(); /** - * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @notice Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** - * @dev Indicates a failure with the token `sender`. Used in transfers. + * @notice Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** - * @dev Indicates a failure with the `spender` to be approved. Used in approvals. + * @notice Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } + + +/// @notice An arithmetic error. +error Arithmetic(ArithmeticError); +/// @title Arithmetic errors. +enum ArithmeticError { + /// @notice Underflow. + Underflow, + /// @notice Overflow. + Overflow, + /// @notice Division by zero. + DivisionByZero +} + +/// @notice Reason why a dispatch call failed. +error Dispatch(DispatchError); +/// @title Reason why a dispatch call failed. +enum DispatchError { + /// @notice Some error occurred. + Other, + /// @notice Failed to lookup some data. + CannotLookup, + /// @notice A bad origin. + BadOrigin, + /// @notice A custom error in a module. + Module, + /// @notice At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// @notice There are no providers so the account cannot be created. + NoProviders, + /// @notice There are too many consumers so the account cannot be created. + TooManyConsumers, + /// @notice An error to do with tokens. + Token, + /// @notice An arithmetic error. + Arithmetic, + /// @notice The number of transactional layers has been reached, or we are not in a + /// transactional layer. + Transactional, + /// @notice Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// @notice The state is corrupt; this is generally not going to fix itself. + Corruption, + /// @notice Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// @notice Root origin is not allowed. + RootNotAllowed, + /// @notice An error with tries. + Trie +} + +/** + * @notice Reason why a pallet call failed. + * @param index Module index, matching the metadata module index. + * @param error Module specific error value. + */ +error Module(uint8 index, bytes4 error); + +/// @notice An error to do with tokens. +error Token(TokenError); +/// @title Description of what went wrong when trying to complete an operation on a token. +enum TokenError { + /// @notice Funds are unavailable. + FundsUnavailable, + /// @notice Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved. + OnlyProvider, + /// @notice Account cannot exist with the funds that would be given. + BelowMinimum, + /// @notice Account cannot be created. + CannotCreate, + /// @notice The token in question is unknown. + Unknown, + /// @notice Funds exist but are frozen. + Frozen, + /// @notice Operation is not supported by the token. + Unsupported, + /// @notice Account cannot be created for a held balance. + CannotCreateHold, + /// @notice Withdrawal would cause unwanted loss of account. + NotExpendable, + /// @notice Account cannot receive the tokens. + Blocked +} + +/// @notice The number of transactional layers has been reached, or we are not in a transactional layer. +error Transactional(TransactionalError); +/// @title Errors related to transactional storage layers. +enum TransactionalError { + /// @notice Too many transactional layers have been spawned. + LimitReached, + /// @notice A transactional layer was expected, but does not exist. + NoLayer +} + +/// @notice An error with tries. +error Trie(TrieError); +/// @title A runtime friendly error type for tries. +enum TrieError { + /// @notice Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// @notice Trie item not found in the database, + IncompleteDatabase, + /// @notice A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// @notice Corrupt Trie item. + DecoderError, + /// @notice Hash is not value. + InvalidHash, + /// @notice The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// @notice The proof contains at least one extraneous node. + ExtraneousNode, + /// @notice The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// @notice The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// @notice The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// @notice The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// @notice The proof is missing trie nodes required to verify. + IncompleteProof, + /// @notice The root hash computed from the proof is incorrect. + RootMismatch, + /// @notice One of the proof nodes could not be decoded. + DecodeError, +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol index f81093f17..2d58bc158 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol +++ b/pallets/api-vnext/src/fungibles/precompiles/interfaces/v0/IFungibles.sol @@ -196,34 +196,155 @@ interface IFungibles { */ event Created(uint32 id, address creator, address admin); - /// @dev The metadata provided is invalid. + /// @notice The metadata provided is invalid. error BadMetadata(); - /// @dev Account cannot exist with the funds that would be given. - error BelowMinimum(); - /// @dev Account cannot be created. - error CannotCreate(); - /// @dev The account balance is insufficient. + /// @notice The account balance is insufficient. error InsufficientBalance(); - /// @dev The token recipient is invalid. + /// @notice The token recipient is invalid. error InvalidRecipient(address); - /// @dev The minimum balance should be non-zero. + /// @notice The minimum balance should be non-zero. error MinBalanceZero(); - /// @dev The signing account has no permission to do the operation. + /// @notice The signing account has no permission to do the operation. error NoPermission(); - /// @dev The token is not live, and likely being destroyed.. + /// @notice The token is not live, and likely being destroyed.. error NotLive(); - /// @dev The token balance overflowed. - error Overflow(); - /// @dev No approval exists that would allow the transfer. + /// @notice No approval exists that would allow the transfer. error Unapproved(); - /// @dev The given token identifier is unknown. + /// @notice The given token identifier is unknown. error Unknown(); - /// @dev The `admin` address cannot be the zero address. + /// @notice The `admin` address cannot be the zero address. error ZeroAdminAddress(); - /// @dev The recipient cannot be the zero address. + /// @notice The recipient cannot be the zero address. error ZeroRecipientAddress(); - /// @dev The sender cannot be the zero address. + /// @notice The sender cannot be the zero address. error ZeroSenderAddress(); - /// @dev The specified `value` cannot be zero. + /// @notice The specified `value` cannot be zero. error ZeroValue(); } + +/// @notice An arithmetic error. +error Arithmetic(ArithmeticError); +/// @title Arithmetic errors. +enum ArithmeticError { + /// @notice Underflow. + Underflow, + /// @notice Overflow. + Overflow, + /// @notice Division by zero. + DivisionByZero +} + +/// @notice Reason why a dispatch call failed. +error Dispatch(DispatchError); +/// @title Reason why a dispatch call failed. +enum DispatchError { + /// @notice Some error occurred. + Other, + /// @notice Failed to lookup some data. + CannotLookup, + /// @notice A bad origin. + BadOrigin, + /// @notice A custom error in a module. + Module, + /// @notice At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// @notice There are no providers so the account cannot be created. + NoProviders, + /// @notice There are too many consumers so the account cannot be created. + TooManyConsumers, + /// @notice An error to do with tokens. + Token, + /// @notice An arithmetic error. + Arithmetic, + /// @notice The number of transactional layers has been reached, or we are not in a + /// transactional layer. + Transactional, + /// @notice Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// @notice The state is corrupt; this is generally not going to fix itself. + Corruption, + /// @notice Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// @notice Root origin is not allowed. + RootNotAllowed, + /// @notice An error with tries. + Trie +} + +/** + * @notice Reason why a pallet call failed. + * @param index Module index, matching the metadata module index. + * @param error Module specific error value. + */ +error Module(uint8 index, bytes4 error); + +/// @notice An error to do with tokens. +error Token(TokenError); +/// @title Description of what went wrong when trying to complete an operation on a token. +enum TokenError { + /// @notice Funds are unavailable. + FundsUnavailable, + /// @notice Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved. + OnlyProvider, + /// @notice Account cannot exist with the funds that would be given. + BelowMinimum, + /// @notice Account cannot be created. + CannotCreate, + /// @notice The token in question is unknown. + Unknown, + /// @notice Funds exist but are frozen. + Frozen, + /// @notice Operation is not supported by the token. + Unsupported, + /// @notice Account cannot be created for a held balance. + CannotCreateHold, + /// @notice Withdrawal would cause unwanted loss of account. + NotExpendable, + /// @notice Account cannot receive the tokens. + Blocked +} + +/// @notice The number of transactional layers has been reached, or we are not in a transactional layer. +error Transactional(TransactionalError); +/// @title Errors related to transactional storage layers. +enum TransactionalError { + /// @notice Too many transactional layers have been spawned. + LimitReached, + /// @notice A transactional layer was expected, but does not exist. + NoLayer +} + +/// @notice An error with tries. +error Trie(TrieError); +/// @title A runtime friendly error type for tries. +enum TrieError { + /// @notice Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// @notice Trie item not found in the database, + IncompleteDatabase, + /// @notice A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// @notice Corrupt Trie item. + DecoderError, + /// @notice Hash is not value. + InvalidHash, + /// @notice The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// @notice The proof contains at least one extraneous node. + ExtraneousNode, + /// @notice The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// @notice The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// @notice The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// @notice The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// @notice The proof is missing trie nodes required to verify. + IncompleteProof, + /// @notice The root hash computed from the proof is incorrect. + RootMismatch, + /// @notice One of the proof nodes could not be decoded. + DecodeError, +} diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 1779a432a..9ff071fc6 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -1,3 +1,4 @@ +use frame_support::pallet_prelude as frame; pub(crate) use IFungibles::*; use super::*; @@ -17,14 +18,14 @@ impl< + pallet_assets::Config< I, AssetId: Default + From + Into, - Balance: TryConvert, + Balance: TryConvert, > + pallet_balances::Config + pallet_revive::Config + Config, I: 'static, > Precompile for Fungibles where - U256: TryConvert<>::Balance, Error = Error>, + U256: TryConvert<>::Balance, Error = frame::DispatchError>, { type Interface = IFungiblesCalls; type T = T; @@ -41,16 +42,21 @@ where match input { IFungiblesCalls::transfer(transferCall { token, to, value }) => { env.charge(>::WeightInfo::transfer())?; - let from = >::to_address(env.caller().account_id()?).0.into(); ensure!(!to.is_zero(), ZeroRecipientAddress); ensure!(!value.is_zero(), ZeroValue); - transfer::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*to.0).into()), - (*value).try_convert()?, - ) + let from = (|| { + let from = >::to_address(env.caller().account_id()?).0.into(); + + transfer::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*to.0).into()), + (*value).try_convert()?, + )?; + + Ok(from) + })() .map_err(Self::map_err)?; deposit_event(env, Transfer { token: *token, from, to: *to, value: *value })?; @@ -63,13 +69,15 @@ where ensure!(to != from, InvalidRecipient(*to)); ensure!(!value.is_zero(), ZeroValue); - transfer_from::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*from.0).into()), - env.to_account_id(&(*to.0).into()), - (*value).try_convert()?, - ) + (|| { + transfer_from::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*from.0).into()), + env.to_account_id(&(*to.0).into()), + (*value).try_convert()?, + ) + })() .map_err(Self::map_err)?; let event = Transfer { token: *token, from: *from, to: *to, value: *value }; @@ -78,35 +86,41 @@ where }, IFungiblesCalls::approve(approveCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; - let owner = >::to_address(env.caller().account_id()?).0.into(); ensure!(!spender.is_zero(), ZeroRecipientAddress); - match approve::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*spender.0).into()), - (*value).try_convert()?, - ) { - Ok(result) => { - // Adjust weight - if let Some(actual_weight) = result.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - }, - Err(e) => { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - return Err(Self::map_err(e.error)); - }, - }; + let owner = (|| { + let owner = >::to_address(env.caller().account_id()?).0.into(); + + match approve::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), + (*value).try_convert()?, + ) { + Ok(result) => { + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error); + }, + }; + + Ok(owner) + })() + .map_err(Self::map_err)?; let event = Approval { token: *token, owner, spender: *spender, value: *value }; deposit_event(env, event)?; @@ -114,28 +128,33 @@ where }, IFungiblesCalls::increaseAllowance(increaseAllowanceCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 0))?; - let owner = >::to_address(env.caller().account_id()?).0.into(); ensure!(!spender.is_zero(), ZeroRecipientAddress); ensure!(!value.is_zero(), ZeroValue); - let value = increase_allowance::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*spender.0).into()), - (*value).try_convert()?, - ) - .map_err(|e| { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - e.error - }) - .map_err(Self::map_err)? - .try_convert()?; + let (owner, value) = (|| { + let owner = >::to_address(env.caller().account_id()?).0.into(); + + let value = increase_allowance::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), + (*value).try_convert()?, + ) + .map_err(|e| { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + e.error + })? + .try_convert()?; + + Ok((owner, value)) + })() + .map_err(Self::map_err)?; let spender = *spender; deposit_event(env, Approval { token: *token, owner, spender, value })?; @@ -143,37 +162,43 @@ where }, IFungiblesCalls::decreaseAllowance(decreaseAllowanceCall { token, spender, value }) => { let charged = env.charge(>::WeightInfo::approve(1, 1))?; - let owner = >::to_address(env.caller().account_id()?).0.into(); ensure!(!spender.is_zero(), ZeroRecipientAddress); ensure!(!value.is_zero(), ZeroValue); - let value = match decrease_allowance::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*spender.0).into()), - (*value).try_convert()?, - ) { - Ok((value, weight)) => { - // Adjust weight - if let Some(actual_weight) = weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - value.try_convert()? - }, - Err(e) => { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - return Err(Self::map_err(e.error)) - }, - }; + let (owner, value) = (|| { + let owner = >::to_address(env.caller().account_id()?).0.into(); + + let value = match decrease_allowance::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*spender.0).into()), + (*value).try_convert()?, + ) { + Ok((value, weight)) => { + // Adjust weight + if let Some(actual_weight) = weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + value.try_convert()? + }, + Err(e) => { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + return Err(e.error) + }, + }; + + Ok((owner, value)) + })() + .map_err(Self::map_err)?; let spender = *spender; deposit_event(env, Approval { token: *token, owner, spender, value })?; @@ -181,17 +206,23 @@ where }, IFungiblesCalls::create(createCall { admin, minBalance }) => { env.charge(>::WeightInfo::create())?; - let creator = >::to_address(env.caller().account_id()?).0.into(); ensure!(!admin.is_zero(), ZeroAdminAddress); ensure!(!minBalance.is_zero(), MinBalanceZero); - let id = create::( - to_runtime_origin(env.caller()), - env.to_account_id(&(*admin.0).into()), - (*minBalance).try_convert()?, - ) - .map_err(Self::map_err)? - .into(); + let (creator, id) = (|| { + let creator = + >::to_address(env.caller().account_id()?).0.into(); + + let id = create::( + to_runtime_origin(env.caller()), + env.to_account_id(&(*admin.0).into()), + (*minBalance).try_convert()?, + )? + .into(); + + Ok((creator, id)) + })() + .map_err(Self::map_err)?; deposit_event(env, Created { id, creator, admin: *admin })?; Ok(createCall::abi_encode_returns(&id)) @@ -231,12 +262,14 @@ where ensure!(!account.is_zero(), ZeroRecipientAddress); ensure!(!value.is_zero(), ZeroValue); - mint::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*account.0).into()), - (*value).try_convert()?, - ) + (|| { + mint::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*account.0).into()), + (*value).try_convert()?, + ) + })() .map_err(Self::map_err)?; let from = Address::default(); @@ -249,22 +282,24 @@ where ensure!(!account.is_zero(), ZeroSenderAddress); ensure!(!value.is_zero(), ZeroValue); - burn::( - to_runtime_origin(env.caller()), - (*token).into(), - env.to_account_id(&(*account.0).into()), - (*value).try_convert()?, - ) - .map_err(|e| { - // Adjust weight - if let Some(actual_weight) = e.post_info.actual_weight { - // TODO: replace with `env.adjust_gas(charged, result.weight);` once - // #8693 lands - env.gas_meter_mut() - .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); - } - e.error - }) + (|| { + burn::( + to_runtime_origin(env.caller()), + (*token).into(), + env.to_account_id(&(*account.0).into()), + (*value).try_convert()?, + ) + .map_err(|e| { + // Adjust weight + if let Some(actual_weight) = e.post_info.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + e.error + }) + })() .map_err(Self::map_err)?; let to = Address::default(); @@ -275,7 +310,8 @@ where IFungiblesCalls::totalSupply(totalSupplyCall { token }) => { env.charge(>::WeightInfo::total_supply())?; - let total_supply = total_supply::((*token).into()).try_convert()?; + let total_supply = + total_supply::((*token).into()).try_convert().map_err(Self::map_err)?; Ok(totalSupplyCall::abi_encode_returns(&total_supply)) }, @@ -283,7 +319,9 @@ where env.charge(>::WeightInfo::balance_of())?; let account = env.to_account_id(&(*owner.0).into()); - let balance = balance::((*token).into(), &account).try_convert()?; + let balance = balance::((*token).into(), &account) + .try_convert() + .map_err(Self::map_err)?; Ok(balanceOfCall::abi_encode_returns(&balance)) }, @@ -293,7 +331,7 @@ where let owner = env.to_account_id(&(*owner.0).into()); let spender = env.to_account_id(&(*spender.0).into()); let allowance = allowance::((*token).into(), &owner, &spender); - let remaining = allowance.try_convert()?; + let remaining = allowance.try_convert().map_err(Self::map_err)?; Ok(allowanceCall::abi_encode_returns(&remaining)) }, @@ -339,66 +377,161 @@ impl + pallet_balances::Config, I: fixed_address(FIXED) } - // Maps select, domain-specific dispatch errors to fungibles errors. Anything not mapped results - // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. - fn map_err(e: DispatchError) -> Error { - use DispatchError::*; + // Maps select, domain-specific dispatch errors to fungibles errors. All others are mapped to + // more generic runtime errors. + fn map_err(e: frame::DispatchError) -> Error { + use frame::DispatchError::*; match e { - Arithmetic(ArithmeticError::Overflow) => IFungibles::Overflow.into(), + Arithmetic(error) => self::Arithmetic::from(error).into(), ConsumerRemaining => IFungibles::InsufficientBalance.into(), Module(ModuleError { index, error, .. }) => { - let index = Some(index as usize); - if index == T::PalletInfo::index::>() { - use pallet_balances::{Error, Error::*}; - - match Error::::decode(&mut error.as_slice()) { - Ok(InsufficientBalance) => IFungibles::InsufficientBalance.into(), - _ => e.into(), - } - } else if index == T::PalletInfo::index::>() { - use pallet_assets::{Error, Error::*}; - - match Error::::decode(&mut error.as_slice()) { - Ok(error) => match error { - AssetNotLive | IncorrectStatus => IFungibles::NotLive.into(), - BalanceLow => IFungibles::InsufficientBalance.into(), - BadMetadata => IFungibles::BadMetadata.into(), - NoPermission => IFungibles::NoPermission.into(), - Unapproved => IFungibles::Unapproved.into(), - Unknown => IFungibles::Unknown.into(), - _ => e.into(), - }, - _ => e.into(), + { + let index = Some(index as usize); + if index == T::PalletInfo::index::>() { + use pallet_balances::{Error, Error::*}; + + match Error::::decode(&mut error.as_slice()) { + Ok(InsufficientBalance) => + return IFungibles::InsufficientBalance.into(), + _ => {}, + } + } else if index == T::PalletInfo::index::>() { + use pallet_assets::{Error, Error::*}; + + match Error::::decode(&mut error.as_slice()) { + Ok(error) => match error { + AssetNotLive | IncorrectStatus => return IFungibles::NotLive.into(), + BalanceLow => return IFungibles::InsufficientBalance.into(), + BadMetadata => return IFungibles::BadMetadata.into(), + NoPermission => return IFungibles::NoPermission.into(), + Unapproved => return IFungibles::Unapproved.into(), + Unknown => return IFungibles::Unknown.into(), + _ => {}, + }, + _ => {}, + } } - } else { - e.into() } + + self::Module { index, error: error.into() }.into() }, - Token(error) => { - use TokenError::*; - match error { - BelowMinimum => IFungibles::BelowMinimum.into(), - CannotCreate => IFungibles::CannotCreate.into(), - UnknownAsset => IFungibles::Unknown.into(), - _ => e.into(), - } + Token(error) => match error { + frame_support::sp_runtime::TokenError::UnknownAsset => IFungibles::Unknown.into(), + _ => self::Token::from(error).into(), }, - _ => e.into(), + Transactional(error) => self::Transactional::from(error).into(), + Trie(error) => self::Trie::from(error).into(), + other => self::Dispatch::from(other).into(), } } } // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { + // Fungibles IFungibles::BadMetadata, - IFungibles::BelowMinimum, - IFungibles::CannotCreate, IFungibles::InsufficientBalance, IFungibles::NoPermission, IFungibles::NotLive, - IFungibles::Overflow, IFungibles::Unapproved, IFungibles::Unknown, + // Generic + Arithmetic, + Dispatch, + Module, + Token, + Transactional, + Trie +} + +impl From for Arithmetic { + fn from(error: frame_support::sp_runtime::ArithmeticError) -> Self { + use frame_support::sp_runtime::ArithmeticError::*; + Self(match error { + Underflow => ArithmeticError::Underflow, + Overflow => ArithmeticError::Overflow, + DivisionByZero => ArithmeticError::DivisionByZero, + }) + } +} + +impl From for Dispatch { + fn from(error: frame::DispatchError) -> Self { + use frame::DispatchError::*; + Self(match error { + Other(_) => DispatchError::Other, + CannotLookup => DispatchError::CannotLookup, + BadOrigin => DispatchError::BadOrigin, + Module(_) => DispatchError::Module, + ConsumerRemaining => DispatchError::ConsumerRemaining, + NoProviders => DispatchError::NoProviders, + TooManyConsumers => DispatchError::TooManyConsumers, + Token(_) => DispatchError::Token, + Arithmetic(_) => DispatchError::Arithmetic, + Transactional(_) => DispatchError::Transactional, + Exhausted => DispatchError::Exhausted, + Corruption => DispatchError::Corruption, + Unavailable => DispatchError::Unavailable, + RootNotAllowed => DispatchError::RootNotAllowed, + Trie(_) => DispatchError::Trie, + }) + } +} + +impl From for Module { + fn from(error: frame_support::sp_runtime::ModuleError) -> Self { + Self { index: error.index, error: error.error.into() } + } +} + +impl From for Token { + fn from(error: frame_support::sp_runtime::TokenError) -> Self { + use frame_support::sp_runtime::TokenError::*; + Self(match error { + FundsUnavailable => TokenError::FundsUnavailable, + OnlyProvider => TokenError::OnlyProvider, + BelowMinimum => TokenError::BelowMinimum, + CannotCreate => TokenError::CannotCreate, + UnknownAsset => TokenError::Unknown, + Frozen => TokenError::Frozen, + Unsupported => TokenError::Unsupported, + CannotCreateHold => TokenError::CannotCreateHold, + NotExpendable => TokenError::NotExpendable, + Blocked => TokenError::Blocked, + }) + } +} + +impl From for Transactional { + fn from(error: frame_support::sp_runtime::TransactionalError) -> Self { + use frame_support::sp_runtime::TransactionalError::*; + Self(match error { + LimitReached => TransactionalError::LimitReached, + NoLayer => TransactionalError::NoLayer, + }) + } +} + +impl From for Trie { + fn from(error: frame_support::traits::TrieError) -> Self { + use frame_support::traits::TrieError::*; + Self(match error { + InvalidStateRoot => TrieError::InvalidStateRoot, + IncompleteDatabase => TrieError::IncompleteDatabase, + ValueAtIncompleteKey => TrieError::ValueAtIncompleteKey, + DecoderError => TrieError::DecoderError, + InvalidHash => TrieError::InvalidHash, + DuplicateKey => TrieError::DuplicateKey, + ExtraneousNode => TrieError::ExtraneousNode, + ExtraneousValue => TrieError::ExtraneousValue, + ExtraneousHashReference => TrieError::ExtraneousHashReference, + InvalidChildReference => TrieError::InvalidChildReference, + ValueMismatch => TrieError::ValueMismatch, + IncompleteProof => TrieError::IncompleteProof, + RootMismatch => TrieError::RootMismatch, + DecodeError => TrieError::DecodeError, + }) + } } #[cfg(test)] @@ -459,7 +592,6 @@ mod tests { .execute_with(|| { let call = transferCall { token, to, value: U256::from(1) }; let transfer = IFungiblesCalls::transfer(call); - let Error::Revert(revert) = Error::from(Unknown) else { panic!() }; assert_revert!(call_precompile::<()>(&origin, &transfer), Unknown); }); } diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index e2815fd86..3a709a846 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -196,19 +196,17 @@ pub trait TryConvert { } impl TryConvert for u128 { - type Error = Error; + type Error = DispatchError; fn try_convert(self) -> Result { - self.try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow).into()) + self.try_into().map_err(|_| DispatchError::from(ArithmeticError::Overflow)) } } impl> TryConvert for alloy::U256 { - type Error = Error; + type Error = DispatchError; fn try_convert(self) -> Result { - self.try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow).into()) + self.try_into().map_err(|_| DispatchError::from(ArithmeticError::Overflow)) } } From 22cd1f738ac47f1728a55e2308481c24ed52ed86 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 21:52:13 +0100 Subject: [PATCH 184/284] refactor(api): ensure full error coverage --- pop-api-vnext/src/errors.rs | 138 +++++++++++++++ .../src/fungibles/erc20/v0/errors.rs | 157 +++++++++++++++++- pop-api-vnext/src/fungibles/v0/errors.rs | 156 ++++++++++++++--- pop-api-vnext/src/lib.rs | 2 + 4 files changed, 429 insertions(+), 24 deletions(-) create mode 100644 pop-api-vnext/src/errors.rs diff --git a/pop-api-vnext/src/errors.rs b/pop-api-vnext/src/errors.rs new file mode 100644 index 000000000..93f26a4f2 --- /dev/null +++ b/pop-api-vnext/src/errors.rs @@ -0,0 +1,138 @@ +pub type FixedBytes = ink::SolBytes<[u8; N]>; + +/// Arithmetic errors. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub enum ArithmeticError { + /// Underflow. + Underflow, + /// Overflow. + Overflow, + /// Division by zero. + DivisionByZero, +} + +/// @Reason why a dispatch call failed. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub enum DispatchError { + /// Some error occurred. + Other, + /// Failed to lookup some data. + CannotLookup, + /// A bad origin. + BadOrigin, + /// A custom error in a module. + Module, + /// At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// There are no providers so the account cannot be created. + NoProviders, + /// There are too many consumers so the account cannot be created. + TooManyConsumers, + /// An error to do with tokens. + Token, + /// An arithmetic error. + Arithmetic, + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional, + /// Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// The state is corrupt; this is generally not going to fix itself. + Corruption, + /// Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// Root origin is not allowed. + RootNotAllowed, + /// An error with tries. + Trie, +} + +/// Reason why a pallet call failed. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub struct ModuleError { + /// Module index, matching the metadata module index. + pub index: u8, + /// Module specific error value. + pub error: FixedBytes<4>, +} + +/// Description of what went wrong when trying to complete an operation on a token. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub enum TokenError { + /// Funds are unavailable. + FundsUnavailable, + /// Some part of the balance gives the only provider reference to the account and thus cannot + /// be (re)moved. + OnlyProvider, + /// Account cannot exist with the funds that would be given. + BelowMinimum, + /// Account cannot be created. + CannotCreate, + /// The token in question is unknown. + Unknown, + /// Funds exist but are frozen. + Frozen, + /// Operation is not supported by the token. + Unsupported, + /// Account cannot be created for a held balance. + CannotCreateHold, + /// Withdrawal would cause unwanted loss of account. + NotExpendable, + /// Account cannot receive the tokens. + Blocked, +} + +/// @Errors related to transactional storage layers. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub enum TransactionalError { + /// Too many transactional layers have been spawned. + LimitReached, + /// A transactional layer was expected, but does not exist. + NoLayer, +} + +/// A runtime friendly error type for tries. +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub enum TrieError { + /// Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// Trie item not found in the database, + IncompleteDatabase, + /// A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// Corrupt Trie item. + DecoderError, + /// Hash is not value. + InvalidHash, + /// The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// The proof contains at least one extraneous node. + ExtraneousNode, + /// The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// The proof is missing trie nodes required to verify. + IncompleteProof, + /// The root hash computed from the proof is incorrect. + RootMismatch, + /// One of the proof nodes could not be decoded. + DecodeError, +} diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 915465187..73ae6e127 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -1,11 +1,26 @@ -use ink::{sol::SolErrorDecode, sol_error_selector}; +use ink::{ + sol::{SolDecode, SolErrorDecode}, + sol_error_selector, +}; use super::*; -use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; +use crate::{ + errors::{ + ArithmeticError, DispatchError, FixedBytes, ModuleError, TokenError, TransactionalError, + TrieError, + }, + impl_sol_encoding_for_precompile, + sol::PrecompileError, +}; +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { + /// An arithmetic error occurred. + Arithmetic(ArithmeticError), + /// Reason why a dispatch call failed. + Dispatch(DispatchError), /// Indicates a failure with the `spender`’s `allowance`. ERC20InsufficientAllowance(Address, U256, U256), /// Indicates an error related to the current `balance` of a `sender`. @@ -18,6 +33,20 @@ pub enum Error { ERC20InvalidSender(Address), /// Indicates a failure with the `spender` to be approved. ERC20InvalidSpender(Address), + /// Reason why a pallet call failed. + Module { + /// Module index, matching the metadata module index. + index: u8, + /// Module specific error value. + error: FixedBytes<4>, + }, + /// An error to do with tokens. + Token(TokenError), + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional(TransactionalError), + /// An error with tries. + Trie(TrieError), } impl_sol_encoding_for_precompile!(Error); @@ -29,6 +58,8 @@ impl PrecompileError for Error { } match data[..4].try_into().expect("length checked above") { + ARITHMETIC => Ok(Self::Arithmetic(ArithmeticError::decode(&data[4..])?)), + DISPATCH => Ok(Self::Dispatch(DispatchError::decode(&data[4..])?)), INSUFFICIENT_ALLOWANCE => { #[derive(ink::SolErrorDecode)] struct ERC20InsufficientAllowance(Address, U256, U256); @@ -65,11 +96,20 @@ impl PrecompileError for Error { let decoded = ERC20InvalidSpender::decode(data)?; Ok(Self::ERC20InvalidSpender(decoded.0)) }, + MODULE => { + let ModuleError { index, error } = ModuleError::decode(&data[4..])?; + Ok(Self::Module { index, error }) + }, + TOKEN => Ok(Self::Token(TokenError::decode(&data[4..])?)), + TRANSACTIONAL => Ok(Self::Transactional(TransactionalError::decode(&data[4..])?)), + TRIE => Ok(Self::Trie(TrieError::decode(&data[4..])?)), _ => Err(ink::sol::Error), } } } +const ARITHMETIC: [u8; 4] = sol_error_selector!("Arithmetic", (u8,)); +const DISPATCH: [u8; 4] = sol_error_selector!("Dispatch", (u8,)); const INSUFFICIENT_ALLOWANCE: [u8; 4] = sol_error_selector!("ERC20InsufficientAllowance", (Address, U256, U256)); const INSUFFICIENT_BALANCE: [u8; 4] = @@ -78,12 +118,92 @@ const INSUFFICIENT_VALUE: [u8; 4] = sol_error_selector!("ERC20InsufficientValue" const INVALID_RECEIVER: [u8; 4] = sol_error_selector!("ERC20InvalidReceiver", (Address,)); const INVALID_SENDER: [u8; 4] = sol_error_selector!("ERC20InvalidSender", (Address,)); const INVALID_SPENDER: [u8; 4] = sol_error_selector!("ERC20InvalidSpender", (Address,)); +const MODULE: [u8; 4] = sol_error_selector!("Module", (u8, FixedBytes<4>)); +const TOKEN: [u8; 4] = sol_error_selector!("Token", (u8,)); +const TRANSACTIONAL: [u8; 4] = sol_error_selector!("Transactional", (u8,)); +const TRIE: [u8; 4] = sol_error_selector!("Trie", (u8,)); + +#[test] +fn error_decoding_works() { + use ink::SolBytes; + + for (encoded, expected) in [ + ( + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + Arithmetic(ArithmeticError::Overflow), + ), + ( + "20c5a2a9000000000000000000000000000000000000000000000000000000000000000d", + Dispatch(DispatchError::RootNotAllowed), + ), + ( + "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + ERC20InsufficientAllowance( + [255; 20].into(), + U256::MAX, + U256::MAX, + ), + ), + ( + "e450d38c000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + ERC20InsufficientBalance( + [255; 20].into(), + U256::MAX, + U256::MAX, + ), + ), + ( + "bffe98ad", + ERC20InsufficientValue, + ), + ( + "ec442f05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + ERC20InvalidReceiver([255; 20].into()), + ), + ( + "96c6fd1e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + ERC20InvalidSender([255; 20].into()), + ), + ( + "94280d62000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + ERC20InvalidSpender([255; 20].into()), + ), + ( + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + Module { index: 255, error: SolBytes([255; 4]) }, + ), + ( + "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", + Token(TokenError::Blocked), + ), + ( + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + Transactional(TransactionalError::NoLayer), + ), + ( + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + Trie(TrieError::DecodeError), + ), + ] { + let data = hex::decode(encoded).unwrap(); + let decoded = ::decode(data.as_slice()).expect(&format!("unable to decode {encoded}")); + assert_eq!(decoded, expected) + } +} #[test] fn error_encoding_works() { - use ink::SolEncode; + use ink::{SolBytes, SolEncode}; for (result, expected) in [ + ( + Arithmetic(ArithmeticError::Overflow).encode(), + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + ), + ( + Dispatch(DispatchError::BadOrigin).encode(), + "20c5a2a90000000000000000000000000000000000000000000000000000000000000002", + ), ( ERC20InsufficientAllowance([255u8; 20].into(), U256::MAX, U256::MAX).encode(), "fb8f41b2000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" @@ -105,6 +225,26 @@ fn error_encoding_works() { ERC20InvalidSpender([255u8; 20].into()).encode(), "94280d62000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), + ( + Module{ index: 255, error: SolBytes([255; 4]) }.encode(), + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + ), + ( + Token(TokenError::Unknown).encode(), + "57fdc3d80000000000000000000000000000000000000000000000000000000000000004", + ), + ( + Token(TokenError::BelowMinimum).encode(), + "57fdc3d80000000000000000000000000000000000000000000000000000000000000002", + ), + ( + Transactional(TransactionalError::NoLayer).encode(), + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + ), + ( + Trie(TrieError::DecodeError).encode(), + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + ), ] { assert_eq!(hex::encode(result), expected) } @@ -112,9 +252,11 @@ fn error_encoding_works() { #[test] fn selectors_work() { - use ink::SolEncode; + use ink::{SolBytes, SolEncode}; for (encoded, expected) in [ + (Error::Arithmetic(ArithmeticError::Overflow).encode()[..4].to_vec(), ARITHMETIC), + (Error::Dispatch(DispatchError::BadOrigin).encode()[..4].to_vec(), DISPATCH), ( Error::ERC20InsufficientAllowance(Address::default(), U256::default(), U256::default()) .encode(), @@ -129,6 +271,13 @@ fn selectors_work() { (Error::ERC20InvalidReceiver(Address::default()).encode(), INVALID_RECEIVER), (Error::ERC20InvalidSender(Address::default()).encode(), INVALID_SENDER), (Error::ERC20InvalidSpender(Address::default()).encode(), INVALID_SPENDER), + (Error::Module { index: 255, error: SolBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), + (Error::Token(TokenError::Unknown).encode()[..4].to_vec(), TOKEN), + ( + Error::Transactional(TransactionalError::LimitReached).encode()[..4].to_vec(), + TRANSACTIONAL, + ), + (Error::Trie(TrieError::DecodeError).encode()[..4].to_vec(), TRIE), ] { assert_eq!(encoded[..4], expected); } diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index e5a472a00..a32b76257 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -1,30 +1,52 @@ -use ink::{sol::SolErrorDecode, sol_error_selector}; +use ink::{ + sol::{SolDecode, SolErrorDecode}, + sol_error_selector, +}; use super::*; -use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; +use crate::{ + errors::{ + ArithmeticError, DispatchError, FixedBytes, ModuleError, TokenError, TransactionalError, + TrieError, + }, + impl_sol_encoding_for_precompile, + sol::PrecompileError, +}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { + /// An arithmetic error occurred. + Arithmetic(ArithmeticError), /// The metadata provided is invalid. BadMetadata, - /// Account cannot exist with the funds that would be given. - BelowMinimum, - /// Account cannot be created. - CannotCreate, + /// Reason why a dispatch call failed. + Dispatch(DispatchError), /// The account balance is insufficient. InsufficientBalance, /// The token recipient is invalid. InvalidRecipient(Address), /// The minimum balance should be non-zero. MinBalanceZero, + /// Reason why a pallet call failed. + Module { + /// Module index, matching the metadata module index. + index: u8, + /// Module specific error value. + error: FixedBytes<4>, + }, /// The signing account has no permission to do the operation. NoPermission, /// The token is not live, and likely being destroyed. NotLive, - /// The token balance overflowed. - Overflow, + /// An error to do with tokens. + Token(TokenError), + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional(TransactionalError), + /// An error with tries. + Trie(TrieError), /// No approval exists that would allow the transfer. Unapproved, /// The given token identifier is unknown. @@ -48,21 +70,27 @@ impl PrecompileError for Error { } match data[..4].try_into().expect("length checked above") { + ARITHMETIC => Ok(Self::Arithmetic(ArithmeticError::decode(&data[4..])?)), BAD_METADATA => Ok(Self::BadMetadata), - BELOW_MINIMUM => Ok(Self::BelowMinimum), - CANNOT_CREATE => Ok(Self::CannotCreate), + DISPATCH => Ok(Self::Dispatch(DispatchError::decode(&data[4..])?)), INSUFFICIENT_BALANCE => Ok(Self::InsufficientBalance), INVALID_RECIPIENT => { #[derive(ink::SolErrorDecode)] struct InvalidRecipient(Address); - let decoded = InvalidRecipient::decode(data)?; + let decoded = InvalidRecipient::decode(&data)?; Ok(Self::InvalidRecipient(decoded.0)) }, MIN_BALANCE_ZERO => Ok(Self::MinBalanceZero), + MODULE => { + let ModuleError { index, error } = ModuleError::decode(&data[4..])?; + Ok(Self::Module { index, error }) + }, NO_PERMISSION => Ok(Self::NoPermission), NOT_LIVE => Ok(Self::NotLive), - OVERFLOW => Ok(Self::Overflow), + TOKEN => Ok(Self::Token(TokenError::decode(&data[4..])?)), + TRANSACTIONAL => Ok(Self::Transactional(TransactionalError::decode(&data[4..])?)), + TRIE => Ok(Self::Trie(TrieError::decode(&data[4..])?)), UNAPPROVED => Ok(Self::Unapproved), UNKNOWN => Ok(Self::Unknown), ZERO_ADMIN_ADDRESS => Ok(Self::ZeroAdminAddress), @@ -74,15 +102,18 @@ impl PrecompileError for Error { } } +const ARITHMETIC: [u8; 4] = sol_error_selector!("Arithmetic", (u8,)); const BAD_METADATA: [u8; 4] = sol_error_selector!("BadMetadata", ()); -const BELOW_MINIMUM: [u8; 4] = sol_error_selector!("BelowMinimum", ()); -const CANNOT_CREATE: [u8; 4] = sol_error_selector!("CannotCreate", ()); +const DISPATCH: [u8; 4] = sol_error_selector!("Dispatch", (u8,)); const INSUFFICIENT_BALANCE: [u8; 4] = sol_error_selector!("InsufficientBalance", ()); const INVALID_RECIPIENT: [u8; 4] = sol_error_selector!("InvalidRecipient", (Address,)); const MIN_BALANCE_ZERO: [u8; 4] = sol_error_selector!("MinBalanceZero", ()); +const MODULE: [u8; 4] = sol_error_selector!("Module", (u8, FixedBytes<4>)); const NO_PERMISSION: [u8; 4] = sol_error_selector!("NoPermission", ()); const NOT_LIVE: [u8; 4] = sol_error_selector!("NotLive", ()); -const OVERFLOW: [u8; 4] = sol_error_selector!("Overflow", ()); +const TOKEN: [u8; 4] = sol_error_selector!("Token", (u8,)); +const TRANSACTIONAL: [u8; 4] = sol_error_selector!("Transactional", (u8,)); +const TRIE: [u8; 4] = sol_error_selector!("Trie", (u8,)); const UNAPPROVED: [u8; 4] = sol_error_selector!("Unapproved", ()); const UNKNOWN: [u8; 4] = sol_error_selector!("Unknown", ()); const ZERO_ADMIN_ADDRESS: [u8; 4] = sol_error_selector!("ZeroAdminAddress", ()); @@ -90,17 +121,96 @@ const ZERO_RECIPIENT_ADDRESS: [u8; 4] = sol_error_selector!("ZeroRecipientAddres const ZERO_SENDER_ADDRESS: [u8; 4] = sol_error_selector!("ZeroSenderAddress", ()); const ZERO_VALUE: [u8; 4] = sol_error_selector!("ZeroValue", ()); +#[test] +fn error_decoding_works() { + use ink::SolBytes; + + for (encoded, expected) in [ + ( + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + Arithmetic(ArithmeticError::Overflow), + ), + ("1ab2b983", BadMetadata), + ( + "20c5a2a9000000000000000000000000000000000000000000000000000000000000000d", + Dispatch(DispatchError::RootNotAllowed), + ), + ("f4d678b8", InsufficientBalance), + ( + "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + InvalidRecipient([255; 20].into()), + ), + ("5f15618b", MinBalanceZero), + ( + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + Module { index: 255, error: SolBytes([255; 4]) }, + ), + ("9d7b369d", NoPermission), + ("baf13b3f", NotLive), + ( + "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", + Token(TokenError::Blocked), + ), + ( + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + Transactional(TransactionalError::NoLayer), + ), + ( + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + Trie(TrieError::DecodeError), + ), + ("91a7df1a", Unapproved), + ("0cf64598", Unknown), + ("3ef39b81", ZeroAdminAddress), + ("ceef9857", ZeroRecipientAddress), + ("ff362bc4", ZeroSenderAddress), + ("7c946ed7", ZeroValue), + ] { + let data = hex::decode(encoded).unwrap(); + let decoded = ::decode(data.as_slice()).expect(&format!("unable to decode {encoded}")); + assert_eq!(decoded, expected) + } +} + #[test] fn error_encoding_works() { - use ink::SolEncode; + use ink::{SolBytes, SolEncode}; for (result, expected) in [ + ( + Arithmetic(ArithmeticError::Overflow).encode(), + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + ), + ( + Dispatch(DispatchError::BadOrigin).encode(), + "20c5a2a90000000000000000000000000000000000000000000000000000000000000002", + ), ( InvalidRecipient([255u8; 20].into()).encode(), "17858bbe000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", ), (MinBalanceZero.encode(), "5f15618b"), + ( + Module{ index: 255, error: SolBytes([255; 4]) }.encode(), + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + ), (NoPermission.encode(), "9d7b369d"), + ( + Token(TokenError::Unknown).encode(), + "57fdc3d80000000000000000000000000000000000000000000000000000000000000004", + ), + ( + Token(TokenError::BelowMinimum).encode(), + "57fdc3d80000000000000000000000000000000000000000000000000000000000000002", + ), + ( + Transactional(TransactionalError::NoLayer).encode(), + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + ), + ( + Trie(TrieError::DecodeError).encode(), + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + ), (ZeroAdminAddress.encode(), "3ef39b81"), (ZeroRecipientAddress.encode(), "ceef9857"), (ZeroSenderAddress.encode(), "ff362bc4"), @@ -112,18 +222,24 @@ fn error_encoding_works() { #[test] fn selectors_work() { - use ink::SolEncode; + use ink::{SolBytes, SolEncode}; for (encoded, expected) in [ + (Error::Arithmetic(ArithmeticError::Overflow).encode()[..4].to_vec(), ARITHMETIC), (Error::BadMetadata.encode(), BAD_METADATA), - (Error::BelowMinimum.encode(), BELOW_MINIMUM), - (Error::CannotCreate.encode(), CANNOT_CREATE), + (Error::Dispatch(DispatchError::BadOrigin).encode()[..4].to_vec(), DISPATCH), (Error::InsufficientBalance.encode(), INSUFFICIENT_BALANCE), (Error::InvalidRecipient(Address::default()).encode()[..4].to_vec(), INVALID_RECIPIENT), (Error::MinBalanceZero.encode(), MIN_BALANCE_ZERO), + (Error::Module { index: 255, error: SolBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), (Error::NoPermission.encode(), NO_PERMISSION), (Error::NotLive.encode(), NOT_LIVE), - (Error::Overflow.encode(), OVERFLOW), + (Error::Token(TokenError::Unknown).encode()[..4].to_vec(), TOKEN), + ( + Error::Transactional(TransactionalError::LimitReached).encode()[..4].to_vec(), + TRANSACTIONAL, + ), + (Error::Trie(TrieError::DecodeError).encode()[..4].to_vec(), TRIE), (Error::Unapproved.encode(), UNAPPROVED), (Error::Unknown.encode(), UNKNOWN), (Error::ZeroAdminAddress.encode(), ZERO_ADMIN_ADDRESS), diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index 036c2d9a1..6c20e0b80 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -5,6 +5,8 @@ pub use sol::{revert, SolErrorDecode}; type Pop = ink::env::DefaultEnvironment; +/// The various general errors which may occur. +pub mod errors; /// APIs for fungible tokens. #[cfg(feature = "fungibles")] pub mod fungibles; From 05295ce2a92de617fe862ba57636a3ea510d318b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 21:53:29 +0100 Subject: [PATCH 185/284] test(api): update expected errors --- pop-api-vnext/integration-tests/src/fungibles.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/fungibles.rs b/pop-api-vnext/integration-tests/src/fungibles.rs index 3bab53eb3..455fda2cf 100644 --- a/pop-api-vnext/integration-tests/src/fungibles.rs +++ b/pop-api-vnext/integration-tests/src/fungibles.rs @@ -11,6 +11,7 @@ use pallet_api_vnext::fungibles::precompiles::v0::IFungibles::{ setMetadataCall, startDestroyCall, symbolCall, totalSupplyCall, transferCall, transferFromCall, }; use pop_api::{ + errors::{ArithmeticError, TokenError}, fungibles::{Error::*, *}, SolErrorDecode, }; @@ -20,7 +21,7 @@ use sp_io::hashing::twox_256; use super::*; const CONTRACT: &str = "contracts/fungibles/target/ink/fungibles.polkavm"; -const GAS_LIMIT: Weight = Weight::from_parts(6_000_000_000, 100_000); +const GAS_LIMIT: Weight = Weight::from_parts(6_000_000_000, 110_000); const INIT_VALUE: Balance = 11 * UNIT; const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(1 * UNIT); @@ -156,7 +157,7 @@ fn transfer_works() { // Transfer token to account that does not exist. assert_noop!( contract.transfer(token, [255; 20].into(), (amount / 4).into()), - CannotCreate + Token(TokenError::CannotCreate) ); // Token is not live, i.e. frozen or being destroyed. start_destroy(&owner, token); @@ -633,7 +634,10 @@ fn mint_works() { // Contract must be admin in order to be able to mint. let token = contract.create(contract.address, 2.into()).unwrap(); // Minimum balance of a token can not be zero. - assert_noop!(contract.mint(token, to_address(&account), 1.into()), BelowMinimum); + assert_noop!( + contract.mint(token, to_address(&account), 1.into()), + Token(TokenError::BelowMinimum) + ); // Token is not live, i.e. frozen or being destroyed. freeze(&contract.account_id(), token); assert_noop!(contract.mint(token, to_address(&account), amount.into()), NotLive); @@ -646,7 +650,10 @@ fn mint_works() { let balance_after_mint = Assets::balance(token, &account); assert_eq!(balance_after_mint, balance_before_mint + amount); // Account can not hold more tokens than Balance::MAX. - assert_noop!(contract.mint(token, to_address(&account), Balance::MAX.into()), Overflow); + assert_noop!( + contract.mint(token, to_address(&account), Balance::MAX.into()), + Arithmetic(ArithmeticError::Overflow) + ); // Token is being destroyed. start_destroy(&contract.account_id(), token); assert_noop!(contract.mint(token, to_address(&account), amount.into()), Unknown); From 1ef302d6a10d3f71529b4472c0e6502161b786e4 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 21:53:53 +0100 Subject: [PATCH 186/284] chore(api): update cargo.lock --- pop-api-vnext/Cargo.lock | 1209 +++++++---------- .../contracts/fungibles/Cargo.lock | 24 +- 2 files changed, 510 insertions(+), 723 deletions(-) diff --git a/pop-api-vnext/Cargo.lock b/pop-api-vnext/Cargo.lock index 0333bc2e4..c25783bfc 100644 --- a/pop-api-vnext/Cargo.lock +++ b/pop-api-vnext/Cargo.lock @@ -67,85 +67,45 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-core" -version = "0.8.25" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +checksum = "ad31216895d27d307369daa1393f5850b50bbbd372478a9fa951c095c210627e" dependencies = [ "alloy-dyn-abi", - "alloy-json-abi 0.8.25", - "alloy-primitives 0.8.25", + "alloy-json-abi", + "alloy-primitives", "alloy-rlp", - "alloy-sol-types 0.8.25", + "alloy-sol-types", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.25" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +checksum = "7b95b3deca680efc7e9cba781f1a1db352fa1ea50e6384a514944dcf4419e652" dependencies = [ - "alloy-json-abi 0.8.25", - "alloy-primitives 0.8.25", - "alloy-sol-type-parser 0.8.25", - "alloy-sol-types 0.8.25", - "const-hex", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", "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 0.8.25", - "alloy-sol-type-parser 0.8.25", - "serde", - "serde_json", -] - [[package]] name = "alloy-json-abi" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15516116086325c157c18261d768a20677f0f699348000ed391d4ad0dcb82530" dependencies = [ - "alloy-primitives 1.2.1", - "alloy-sol-type-parser 1.2.1", + "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.4", - "indexmap", - "itoa", - "k256", - "keccak-asm", - "paste", - "proptest", - "rand 0.8.5", - "ruint", - "rustc-hash 2.1.1", - "serde", - "sha3", - "tiny-keccak", -] - [[package]] name = "alloy-primitives" version = "1.2.1" @@ -183,59 +143,27 @@ dependencies = [ "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 0.8.25", - "alloy-sol-macro-input 0.8.25", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "alloy-sol-macro" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a14f21d053aea4c6630687c2f4ad614bed4c81e14737a9b904798b24f30ea849" dependencies = [ - "alloy-sol-macro-expander 1.2.1", - "alloy-sol-macro-input 1.2.1", + "alloy-sol-macro-expander", + "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.104", ] -[[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 0.8.25", - "const-hex", - "heck", - "indexmap", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.104", - "syn-solidity 0.8.25", - "tiny-keccak", -] - [[package]] name = "alloy-sol-macro-expander" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34d99282e7c9ef14eb62727981a985a01869e586d1dec729d3bb33679094c100" dependencies = [ - "alloy-sol-macro-input 1.2.1", + "alloy-sol-macro-input", "const-hex", "heck", "indexmap", @@ -243,26 +171,10 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "syn-solidity 1.2.1", + "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", - "macro-string", - "proc-macro2", - "quote", - "syn 2.0.104", - "syn-solidity 0.8.25", -] - [[package]] name = "alloy-sol-macro-input" version = "1.2.1" @@ -276,17 +188,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "syn-solidity 1.2.1", -] - -[[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", + "syn-solidity", ] [[package]] @@ -299,28 +201,15 @@ dependencies = [ "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 0.8.25", - "alloy-primitives 0.8.25", - "alloy-sol-macro 0.8.25", - "const-hex", - "serde", -] - [[package]] name = "alloy-sol-types" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58377025a47d8b8426b3e4846a251f2c1991033b27f517aade368146f6ab1dfe" dependencies = [ - "alloy-json-abi 1.2.1", - "alloy-primitives 1.2.1", - "alloy-sol-macro 1.2.1", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", "serde", ] @@ -747,6 +636,12 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.3.0" @@ -805,9 +700,8 @@ checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "binary-merkle-tree" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "181f5380e435b8ba6d901f8b16fc8908c6f0f8bea8973113d1c8718d89bb1809" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "hash-db", "log", @@ -821,7 +715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" dependencies = [ "bs58", - "hmac 0.12.1", + "hmac", "k256", "rand_core 0.6.4", "ripemd", @@ -966,10 +860,11 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.2.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ad8a0bed7827f0b07a5d23cec2e58cc02038a99e4ca81616cb2bb2025f804d" +checksum = "dee8eddd066a8825ec5570528e6880471210fd5d88cb6abbe1cfdd51ca249c33" dependencies = [ + "jam-codec", "log", "parity-scale-codec", "scale-info", @@ -1172,12 +1067,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -1216,16 +1105,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "crypto_secretbox" version = "0.1.1" @@ -1361,10 +1240,8 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.1", "syn 2.0.104", ] @@ -1395,7 +1272,6 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "unicode-xid", ] [[package]] @@ -1485,27 +1361,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" -[[package]] -name = "dyn-clonable" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36efbb9bfd58e1723780aa04b61aba95ace6a05d9ffabfdb0b43672552f0805" -dependencies = [ - "dyn-clonable-impl", - "dyn-clone", -] - -[[package]] -name = "dyn-clonable-impl" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "dyn-clone" version = "1.0.19" @@ -1646,16 +1501,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[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" @@ -1671,6 +1516,14 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethereum-standards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", +] + [[package]] name = "ethereum-types" version = "0.15.1" @@ -1788,9 +1641,8 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "frame-benchmarking" -version = "40.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9e5fcdb30bb83b2d97d7e718127230e0fbbad82b9c32dedf63971f08709def" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-support", "frame-support-procedural", @@ -1813,23 +1665,23 @@ dependencies = [ [[package]] name = "frame-decode" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6027a409bac4fe95b4d107f965fcdbc252fc89d884a360d076b3070b6128c094" +checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" dependencies = [ - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "parity-scale-codec", - "scale-decode 0.14.0", + "scale-decode", "scale-info", "scale-type-resolver", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-metadata" -version = "17.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1838,9 +1690,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1850,9 +1702,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c7c272704856cc88a86aef689a778050e59f89d7ec1e4ffb3a9e8e04e6b10" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "aquamarine", "array-bytes", @@ -1860,7 +1711,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -1892,9 +1743,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "33.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcb3c16c8fe1b4edc6df122212b50f776dfce31a94fa63305100841ba4eb7c93" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "cfg-expr", @@ -1907,15 +1757,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "syn 2.0.104", ] [[package]] name = "frame-support-procedural-tools" -version = "13.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a088fd6fda5f53ff0c17fc7551ce8bd0ead14ba742228443c8196296a7369b" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1926,9 +1775,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -1937,9 +1785,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc20d95c35bad22eb8b8d7ef91197a439483458237b176e621d9210f2fbff15" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "cfg-if", "docify", @@ -2125,6 +1972,25 @@ dependencies = [ "subtle", ] +[[package]] +name = "h2" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hash-db" version = "0.16.0" @@ -2166,6 +2032,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" dependencies = [ "allocator-api2", + "equivalent", "foldhash", "serde", ] @@ -2220,32 +2087,108 @@ checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" [[package]] name = "hmac" -version = "0.8.1" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "hmac" -version = "0.12.1" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "digest 0.10.7", + "bytes", + "http", ] [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +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 = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", ] [[package]] @@ -2344,8 +2287,8 @@ dependencies = [ [[package]] name = "ink" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "const_format", "deranged", @@ -2360,25 +2303,26 @@ dependencies = [ "linkme", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.22.0", + "polkavm-derive", "scale-info", "sp-io", "sp-runtime-interface", "staging-xcm", + "tokio", ] [[package]] name = "ink_allocator" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "cfg-if", ] [[package]] name = "ink_codegen" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2389,7 +2333,7 @@ dependencies = [ "ink_primitives", "itertools 0.14.0", "parity-scale-codec", - "polkavm-derive 0.22.0", + "polkavm-derive", "proc-macro2", "quote", "serde", @@ -2399,8 +2343,8 @@ dependencies = [ [[package]] name = "ink_engine" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2416,8 +2360,8 @@ dependencies = [ [[package]] name = "ink_env" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "cfg-if", @@ -2433,9 +2377,9 @@ dependencies = [ "pallet-revive", "pallet-revive-uapi", "parity-scale-codec", - "polkavm-derive 0.22.0", - "scale-decode 0.16.0", - "scale-encode 0.10.0", + "polkavm-derive", + "scale-decode", + "scale-encode", "scale-info", "schnorrkel", "secp256k1 0.30.0", @@ -2449,8 +2393,8 @@ dependencies = [ [[package]] name = "ink_ir" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "either", @@ -2465,8 +2409,8 @@ dependencies = [ [[package]] name = "ink_macro" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "ink_codegen", "ink_ir", @@ -2480,8 +2424,8 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2495,18 +2439,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ - "alloy-sol-types 1.2.1", + "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", @@ -2518,8 +2462,8 @@ dependencies = [ "parity-scale-codec", "paste", "primitive-types 0.13.1", - "scale-decode 0.16.0", - "scale-encode 0.10.0", + "scale-decode", + "scale-encode", "scale-info", "serde", "sp-core", @@ -2531,8 +2475,8 @@ dependencies = [ [[package]] name = "ink_storage" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "array-init", "cfg-if", @@ -2549,8 +2493,8 @@ dependencies = [ [[package]] name = "ink_storage_traits" -version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink#39690b3cb7e62b3d80487120f189ecfbe3ea52f5" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "ink_metadata", "ink_prelude", @@ -2579,6 +2523,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + [[package]] name = "itertools" version = "0.10.5" @@ -2621,6 +2576,34 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jam-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d72f2fb8cfd27f6c52ea7d0528df594f7f2ed006feac153e9393ec567aafea98" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "jam-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "jam-codec-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09985146f40378e13af626964ac9c206d9d9b67c40c70805898d9954f709bcf5" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "k256" version = "0.13.4" @@ -2725,14 +2708,12 @@ dependencies = [ "arrayref", "base64", "digest 0.9.0", - "hmac-drbg", "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.8.5", "serde", "sha2 0.9.9", - "typenum", ] [[package]] @@ -2901,11 +2882,12 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memory-db" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", + "hashbrown 0.15.4", ] [[package]] @@ -2929,6 +2911,17 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + [[package]] name = "nalgebra" version = "0.33.2" @@ -3068,40 +3061,21 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "pallet-asset-conversion" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e063e39ad8ecd3c2b00c963f50cdf79e614c819a01e1c1ce9993287075b1b4d9" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", -] - [[package]] name = "pallet-revive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895fe6f50f621a69132697b8b43d29d1db4d9ff445eec410bf1fc98cd7e9412c" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "alloy-core", "derive_more 0.99.20", "environmental", - "ethabi-decode", + "ethereum-standards", "ethereum-types", "frame-benchmarking", "frame-support", "frame-system", "hex-literal 0.4.1", + "humantime-serde", "impl-trait-for-tuples", "log", "num-bigint", @@ -3114,7 +3088,7 @@ dependencies = [ "parity-scale-codec", "paste", "polkavm", - "polkavm-common 0.21.0", + "polkavm-common", "rand 0.8.5", "ripemd", "rlp 0.6.1", @@ -3128,17 +3102,14 @@ dependencies = [ "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 = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1df19ca809f036d6ddf1632039e9db312f92dbe8f9390e6722ad808cd95377" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "anyhow", "cargo_metadata", @@ -3151,9 +3122,8 @@ dependencies = [ [[package]] name = "pallet-revive-proc-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c2dc2fc6961da23fefc54689ce81a8e006f6988bc465dcc9ab9db905d31766" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -3162,22 +3132,20 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb8f45102c6279f59f55e0051fc6c26b996619d7842800dfaf3a2583459a1c7" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", "parity-scale-codec", - "polkavm-derive 0.21.0", + "polkavm-derive", "scale-info", ] [[package]] name = "pallet-transaction-payment" -version = "40.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8ebd61b64848e39e5615832c964dc10b63bcebff26a9ec1cb867b4087240a03" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "frame-benchmarking", "frame-support", @@ -3185,7 +3153,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", "sp-io", "sp-runtime", ] @@ -3285,7 +3252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", - "hmac 0.12.1", + "hmac", "password-hash", ] @@ -3322,203 +3289,91 @@ dependencies = [ "spki", ] -[[package]] -name = "polkadot-core-primitives" -version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7c519ee804fd08d7464871bd2fe164e8f0683501ea59d2a10f5ef214dacb3b" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "16.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72943c0948c686b47bacb1a03e59baff63bfba2e16e208d77f0f8615827f8564" -dependencies = [ - "bounded-collections", - "derive_more 0.99.20", - "parity-scale-codec", - "polkadot-core-primitives", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-weights", -] - -[[package]] -name = "polkadot-sdk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" -dependencies = [ - "sp-crypto-hashing", -] - [[package]] name = "polkavm" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd34e2f74206fff33482ae1718e275f11365ef8c4de7f0e69217f8845303867" +checksum = "fa028f713d0613f0f08b8b3367402cb859218854f6b96fcbe39a501862894d6f" dependencies = [ "libc", "log", "polkavm-assembler", - "polkavm-common 0.21.0", - "polkavm-linux-raw", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff33982a807d8567645d4784b9b5d7ab87bcb494f534a57cadd9012688e102" - -[[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", -] - -[[package]] -name = "polkavm-common" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538810ffdaa629113b9f436f43ba487a6cceacc04a769ac3cdcd32fcf87351cd" - -[[package]] -name = "polkavm-derive" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2eb703f3b6404c13228402e98a5eae063fd16b8f58afe334073ec105ee4117e" -dependencies = [ - "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]] -name = "polkavm-derive" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e819eaea986d6a3de2a08840f0cc188db3c318b30f9bb1deb416d8c4beb2ed14" -dependencies = [ - "polkavm-derive-impl-macro 0.22.0", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2116a92e6e96220a398930f4c8a6cda1264206f3e2034fc9982bfd93f261f7" -dependencies = [ - "polkavm-common 0.18.0", - "proc-macro2", - "quote", - "syn 2.0.104", + "polkavm-common", + "polkavm-linux-raw", ] [[package]] -name = "polkavm-derive-impl" -version = "0.21.0" +name = "polkavm-assembler" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fd6c6215450c3e57511df5c38a82eb4bde208de15ee15046ac33852f3c3eaa" +checksum = "4859a29e1f4ad64610c4bc2bfc40bb9a535068a034933a5b56b5e7a0febf105a" dependencies = [ - "polkavm-common 0.21.0", - "proc-macro2", - "quote", - "syn 2.0.104", + "log", ] [[package]] -name = "polkavm-derive-impl" -version = "0.22.0" +name = "polkavm-common" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414507a0a7c9451cc81336ef1f5ccbab8fa4aeda402668735aa28331867bd3ef" +checksum = "49a5794b695626ba70d29e66e3f4f4835767452a6723f3a0bc20884b07088fe8" dependencies = [ - "polkavm-common 0.22.0", - "proc-macro2", - "quote", - "syn 2.0.104", + "blake3", + "log", + "polkavm-assembler", ] [[package]] -name = "polkavm-derive-impl-macro" -version = "0.18.0" +name = "polkavm-derive" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" +checksum = "95282a203ae1f6828a04ff334145c3f6dc718bba6d3959805d273358b45eab93" dependencies = [ - "polkavm-derive-impl 0.18.1", - "syn 2.0.104", + "polkavm-derive-impl-macro", ] [[package]] -name = "polkavm-derive-impl-macro" -version = "0.21.0" +name = "polkavm-derive-impl" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36837f6b7edfd6f4498f8d25d81da16cf03bd6992c3e56f3d477dfc90f4fefca" +checksum = "6069dc7995cde6e612b868a02ce48b54397c6d2582bd1b97b63aabbe962cd779" dependencies = [ - "polkavm-derive-impl 0.21.0", + "polkavm-common", + "proc-macro2", + "quote", "syn 2.0.104", ] [[package]] name = "polkavm-derive-impl-macro" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a5df4cc6466a219386b04d8bd267ba772f9458a8e9aa7539757ca5b11e2aa" +checksum = "581d34cafec741dc5ffafbb341933c205b6457f3d76257a9d99fb56687219c91" dependencies = [ - "polkavm-derive-impl 0.22.0", + "polkavm-derive-impl", "syn 2.0.104", ] [[package]] name = "polkavm-linker" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bc764986c4a63f9ab9890c3f4eb9b4c13b6ff80d79685bd48ade147234aab4" +checksum = "beb896023e5bd89bba40311797d8d42490fa4a1fd5256c74820753c5722d1e67" dependencies = [ "dirs", "gimli", "hashbrown 0.14.5", "log", "object", - "polkavm-common 0.21.0", + "polkavm-common", "regalloc2", "rustc-demangle", ] [[package]] name = "polkavm-linux-raw" -version = "0.21.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be6cd1d48c5e7814d287a3e12a339386a5dfa2f3ac72f932335f4cf56467f1b3" +checksum = "28919f542476f4158cc71e6c072b1051f38f4b514253594ac3ad80e3c0211fc8" [[package]] name = "poly1305" @@ -3676,6 +3531,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror 1.0.69", +] + [[package]] name = "proptest" version = "1.7.0" @@ -3732,7 +3601,6 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", - "serde", ] [[package]] @@ -3903,7 +3771,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac 0.12.1", + "hmac", "subtle", ] @@ -4075,18 +3943,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-bits" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" -dependencies = [ - "parity-scale-codec", - "scale-info", - "scale-type-resolver", - "serde", -] - [[package]] name = "scale-bits" version = "0.7.0" @@ -4094,22 +3950,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" dependencies = [ "parity-scale-codec", + "scale-info", "scale-type-resolver", -] - -[[package]] -name = "scale-decode" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ae9cc099ae85ff28820210732b00f019546f36f33225f509fe25d5816864a0" -dependencies = [ - "derive_more 1.0.0", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode-derive 0.14.0", - "scale-type-resolver", - "smallvec", + "serde", ] [[package]] @@ -4119,25 +3962,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" dependencies = [ "parity-scale-codec", - "scale-bits 0.7.0", - "scale-decode-derive 0.16.0", + "primitive-types 0.13.1", + "scale-bits", + "scale-decode-derive", "scale-type-resolver", "smallvec", "thiserror 2.0.12", ] -[[package]] -name = "scale-decode-derive" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed9401effa946b493f9f84dc03714cca98119b230497df6f3df6b84a2b03648" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "scale-decode-derive" version = "0.16.0" @@ -4150,21 +3982,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "scale-encode" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9271284d05d0749c40771c46180ce89905fd95aa72a2a2fddb4b7c0aa424db" -dependencies = [ - "derive_more 1.0.0", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-encode-derive 0.8.0", - "scale-type-resolver", - "smallvec", -] - [[package]] name = "scale-encode" version = "0.10.0" @@ -4172,25 +3989,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" dependencies = [ "parity-scale-codec", - "scale-encode-derive 0.10.0", + "primitive-types 0.13.1", + "scale-bits", + "scale-encode-derive", "scale-type-resolver", "smallvec", "thiserror 2.0.12", ] -[[package]] -name = "scale-encode-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102fbc6236de6c53906c0b262f12c7aa69c2bdc604862c12728f5f4d370bc137" -dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "scale-encode-derive" version = "0.10.0" @@ -4243,18 +4049,17 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e0ef2a0ee1e02a69ada37feb87ea1616ce9808aca072befe2d3131bf28576e" +checksum = "8ca8b26b451ecb7fd7b62b259fa28add63d12ec49bbcac0e01fcb4b5ae0c09aa" dependencies = [ - "derive_more 1.0.0", "either", "parity-scale-codec", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", - "scale-info", + "scale-bits", + "scale-decode", + "scale-encode", "scale-type-resolver", + "thiserror 2.0.12", ] [[package]] @@ -4623,10 +4428,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] -name = "sp-api" -version = "36.0.1" +name = "socket2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541da427f47dfb97f3dd0556fa3272bdc5dfa0d4c1ad53a22670a9bae4db63d7" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "sp-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "docify", "hash-db", @@ -4647,9 +4461,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "22.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cedafdeaf15c774433ad8f5b00883bdf7d86e7c8b8e050e3439d4ae422114096" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "blake2", @@ -4662,9 +4475,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "40.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba375ab65a76f7413d1bfe48122fd347ce7bd2047e36ecbbd78f12f5adaed121" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4675,9 +4487,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "26.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9971b30935cea3858664965039dabd80f67aca74cc6cc6dd42ff1ab14547bc53" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "docify", "integer-sqrt", @@ -4690,9 +4501,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f3b3414e7620ad72d0000b520e0570dca38dc63e160c95164ff3f789020cc1" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -4707,9 +4517,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b54310103ae4f0e3228e217e2a9ccaca0d7c3502d3aa276623febf4c722ca397" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -4726,9 +4535,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc83d9e7b1d58e1d020c20d7208b00d21fa73dcf92721114eae432b9f01e62d5" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4738,9 +4546,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "36.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbb58c21e6b27f2aadf3ff0c8b20a8ead13b9dfe63f46717fd59334517f3b4" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "ark-vrf", "array-bytes", @@ -4748,7 +4555,7 @@ dependencies = [ "blake2", "bounded-collections", "bs58", - "dyn-clonable", + "dyn-clone", "ed25519-zebra", "futures", "hash-db", @@ -4770,7 +4577,8 @@ dependencies = [ "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "sp-crypto-hashing", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", @@ -4798,22 +4606,33 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "quote", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "syn 2.0.104", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "proc-macro2", "quote", @@ -4822,9 +4641,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "environmental", "parity-scale-codec", @@ -4833,9 +4651,8 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb0d996dfce9afb8879bdfbba9cb9a7d06f29fda38168b91e90419b3b92c42e" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "scale-info", @@ -4846,9 +4663,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb09ff07946f3e1ecdd4bfb40b2cceba60188215ceb941b5b07230294d7aee1" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -4860,9 +4676,8 @@ dependencies = [ [[package]] name = "sp-io" -version = "40.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e41d010bcc515d119901ff7ac83150c335d543c7f6c03be5c8fe08430b8a03b" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bytes", "docify", @@ -4870,11 +4685,11 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive", "rustversion", "secp256k1 0.28.2", "sp-core", - "sp-crypto-hashing", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", "sp-externalities", "sp-keystore", "sp-runtime-interface", @@ -4887,9 +4702,8 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "parking_lot", @@ -4899,20 +4713,18 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d1db25e362edbf5531b427d4bdfc2562bec6a031c3eb2a9145c0a0a01a572d" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ - "frame-metadata 20.0.0", + "frame-metadata 23.0.0", "parity-scale-codec", "scale-info", ] [[package]] name = "sp-panic-handler" -version = "13.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b52e69a577cbfdea62bfaf16f59eb884422ce98f78b5cd8d9bf668776bced1" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "backtrace", "regex", @@ -4920,9 +4732,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "41.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3864101a28faba3d8eca026e3f56ea20dd1d979ce1bcc20152e86c9d82be52bf" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "binary-merkle-tree", "docify", @@ -4950,14 +4761,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "29.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99db36a7aff44c335f5d5b36c182a3e0cac61de2fefbe2eeac6af5fb13f63bf" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.18.0", + "polkavm-derive", "primitive-types 0.13.1", "sp-externalities", "sp-runtime-interface-proc-macro", @@ -4970,9 +4780,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "expander", @@ -4984,9 +4793,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "38.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8f9c0a32836e3c8842b0aec0813077654885d45d83b618210fbb730ea63545" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -4998,9 +4806,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206508475c01ae2e14f171d35d7fc3eaa7278140d7940416591d49a784792ed6" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "hash-db", "log", @@ -5020,14 +4827,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" [[package]] name = "sp-storage" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3b70ca340e41cde9d2e069d354508a6e37a6573d66f7cc38f11549002f64ec" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5038,9 +4843,8 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "36.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176c77326c15425a15e085261161a9435f9a3c0d4bf61dae6dccf05b957a51c6" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "async-trait", "parity-scale-codec", @@ -5051,11 +4855,11 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6147a5b8c98b9ed4bf99dc033fab97a468b4645515460974c8784daeb7c35433" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", + "regex", "tracing", "tracing-core", "tracing-subscriber", @@ -5063,9 +4867,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "39.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a555bf4c42ca89e2e7bf2f11308806dad13cdbd7f8fd60cf2649f12b6ee809bf" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "ahash", "hash-db", @@ -5078,6 +4881,7 @@ dependencies = [ "schnellru", "sp-core", "sp-externalities", + "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing", "trie-db", @@ -5086,9 +4890,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "39.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd736a15ff2ea0a67c5a3bbdfd842d88f11f0774d7701a8d8a316f8deba276c5" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5104,9 +4907,8 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cabc8279e835cd9c608d70cb00e693bddec94fe8478e9f3104dad1da5f93ca" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -5117,9 +4919,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -5129,9 +4930,8 @@ dependencies = [ [[package]] name = "sp-weights" -version = "31.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515aa194eabac059041df2dbee75b059b99981213ec680e9de85b45b6988346a" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -5181,9 +4981,8 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "16.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0126278d7fc6d7dec55e5a109f838bbf401dd084aecf2597e4e11ea07515a0a" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "array-bytes", "bounded-collections", @@ -5201,52 +5000,6 @@ dependencies = [ "xcm-procedural", ] -[[package]] -name = "staging-xcm-builder" -version = "20.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f031952c1496cf7f86d19ab38e3264be9a54b7d8eecb25ba69f977cc7549d08" -dependencies = [ - "environmental", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "pallet-asset-conversion", - "pallet-transaction-payment", - "parity-scale-codec", - "polkadot-parachain-primitives", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-executor", - "tracing", -] - -[[package]] -name = "staging-xcm-executor" -version = "19.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9bc315e8c7018fcfe0371ce4b7e726fb699e37b2acc3e5effb87a7d131a3ff" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-weights", - "staging-xcm", - "tracing", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -5261,11 +5014,10 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "substrate-bip39" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ - "hmac 0.12.1", + "hmac", "pbkdf2", "schnorrkel", "sha2 0.10.9", @@ -5285,6 +5037,20 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "subtle" version = "2.6.1" @@ -5293,52 +5059,54 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subxt-core" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7a1bc6c9c1724971636a66e3225a7253cdb35bb6efb81524a6c71c04f08c59" +checksum = "66ef00be9d64885ec94e478a58e4e39d222024b20013ae7df4fc6ece545391aa" dependencies = [ "base58", "blake2", "derive-where", "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "hex", "impl-serde", "keccak-hash", "parity-scale-codec", - "polkadot-sdk", "primitive-types 0.13.1", - "scale-bits 0.6.0", - "scale-decode 0.14.0", - "scale-encode 0.8.0", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", "scale-value", "serde", "serde_json", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", + "thiserror 2.0.12", "tracing", ] [[package]] name = "subxt-metadata" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacd4e7484fef58deaa2dcb32d94753a864b208a668c0dd0c28be1d8abeeadb2" +checksum = "fff4591673600c4388e21305788282414d26c791b4dee21b7cb0b19c10076f98" dependencies = [ "frame-decode", - "frame-metadata 17.0.0", + "frame-metadata 20.0.0", "hashbrown 0.14.5", "parity-scale-codec", - "polkadot-sdk", "scale-info", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 2.0.12", ] [[package]] name = "subxt-signer" -version = "0.38.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" +checksum = "4a2370298a210ed1df26152db7209a85e0ed8cfbce035309c3b37f7b61755377" dependencies = [ "base64", "bip32", @@ -5346,11 +5114,10 @@ dependencies = [ "cfg-if", "crypto_secretbox", "hex", - "hmac 0.12.1", + "hmac", "keccak-hash", "parity-scale-codec", "pbkdf2", - "polkadot-sdk", "regex", "schnorrkel", "scrypt", @@ -5359,7 +5126,9 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", + "thiserror 2.0.12", "zeroize", ] @@ -5385,18 +5154,6 @@ 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.104", -] - [[package]] name = "syn-solidity" version = "1.2.1" @@ -5552,6 +5309,37 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "slab", + "socket2", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.23" @@ -6170,9 +5958,8 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "11.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d3d21c65cbf847ae0b1a8e6411b614d269d3108c6c649b039bffcf225e89aa4" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "Inflector", "proc-macro2", diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index 64eed54ac..a27272318 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "const_format", "deranged", @@ -2334,7 +2334,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "cfg-if", ] @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2364,7 +2364,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2381,7 +2381,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "cfg-if", @@ -2414,7 +2414,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "blake2", "either", @@ -2430,7 +2430,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "ink_codegen", "ink_ir", @@ -2445,7 +2445,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2460,7 +2460,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "cfg-if", ] @@ -2468,7 +2468,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2496,7 +2496,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "array-init", "cfg-if", @@ -2514,7 +2514,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "ink_metadata", "ink_prelude", From daf531aa799945774b15ae1947cedd6b4710b0d4 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 21:54:03 +0100 Subject: [PATCH 187/284] chore: update cargo.lock --- Cargo.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f01cecdc8..8c9fd5433 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2611,7 +2611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -2620,7 +2620,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -2806,7 +2806,7 @@ dependencies = [ [[package]] name = "contract-build" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/cargo-contract#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" +source = "git+https://github.com/use-ink/cargo-contract#785ff495a0ed3040eea93edd1ac5771468edda2c" dependencies = [ "alloy-json-abi", "anyhow", @@ -2861,7 +2861,7 @@ dependencies = [ [[package]] name = "contract-metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/cargo-contract#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" +source = "git+https://github.com/use-ink/cargo-contract#785ff495a0ed3040eea93edd1ac5771468edda2c" dependencies = [ "anyhow", "impl-serde 0.5.0", @@ -4923,7 +4923,7 @@ 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]] @@ -6787,7 +6787,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -7493,7 +7493,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "derive_more 2.0.1", "impl-serde 0.5.0", @@ -7532,7 +7532,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "cfg-if", ] @@ -7563,7 +7563,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" dependencies = [ "alloy-sol-types", "cfg-if", @@ -7787,7 +7787,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.1", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -15746,7 +15746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck 0.4.1", - "itertools 0.14.0", + "itertools 0.12.1", "log", "multimap", "once_cell", @@ -15779,7 +15779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.101", @@ -15899,7 +15899,7 @@ dependencies = [ "once_cell", "socket2 0.5.9", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -16573,7 +16573,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -16586,7 +16586,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -16644,7 +16644,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -22832,7 +22832,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix 1.0.7", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -24408,7 +24408,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] From 194c9de6f81fa8c694eeae937d6b24b204c628fd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 22:55:55 +0100 Subject: [PATCH 188/284] refactor(pallets/api): simplify origin --- .../src/fungibles/precompiles/erc20/v0.rs | 26 +++++----- .../api-vnext/src/fungibles/precompiles/v0.rs | 26 +++++----- pallets/api-vnext/src/lib.rs | 47 +++++++++++++++++-- 3 files changed, 71 insertions(+), 28 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index 2c9ad566e..bd459b8c5 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -67,14 +67,14 @@ where ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); - let origin = env.caller(); - let account = origin.account_id().map_err(Self::map_err)?; - let from = >::to_address(account).0.into(); - let balance = - balance::(token.clone(), account).try_convert().map_err(Self::map_err)?; + let origin = Origin::try_from(env.caller()).map_err(Self::map_err)?; + let from = origin.address(); + let balance = balance::(token.clone(), &origin.account) + .try_convert() + .map_err(Self::map_err)?; transfer::( - to_runtime_origin(origin), + origin.into(), token, env.to_account_id(&(*to.0).into()), (*value).try_convert().map_err(Self::map_err)?, @@ -101,10 +101,11 @@ where ensure!(!value.is_zero(), ERC20InsufficientValue); let owner = (|| { - let owner = >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let owner = origin.address(); match approve::( - to_runtime_origin(env.caller()), + origin.into(), token, env.to_account_id(&(*spender.0).into()), (*value).try_convert()?, @@ -143,16 +144,15 @@ where ensure!(!to.is_zero(), ERC20InvalidReceiver { receiver: *to }); ensure!(!value.is_zero(), ERC20InsufficientValue); - let origin = env.caller(); - let account = origin.account_id().map_err(Self::map_err)?; + let origin = Origin::try_from(env.caller()).map_err(Self::map_err)?; let owner = env.to_account_id(&(*from.0).into()); - let spender = >::to_address(account).0.into(); - let allowance = allowance::(token.clone(), &owner, account) + let spender = origin.address(); + let allowance = allowance::(token.clone(), &owner, &origin.account) .try_convert() .map_err(Self::map_err)?; transfer_from::( - to_runtime_origin(origin), + origin.into(), token, owner, env.to_account_id(&(*to.0).into()), diff --git a/pallets/api-vnext/src/fungibles/precompiles/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/v0.rs index 9ff071fc6..6a827be60 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/v0.rs @@ -46,10 +46,11 @@ where ensure!(!value.is_zero(), ZeroValue); let from = (|| { - let from = >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let from = origin.address(); transfer::( - to_runtime_origin(env.caller()), + origin.into(), (*token).into(), env.to_account_id(&(*to.0).into()), (*value).try_convert()?, @@ -89,10 +90,11 @@ where ensure!(!spender.is_zero(), ZeroRecipientAddress); let owner = (|| { - let owner = >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let owner = origin.address(); match approve::( - to_runtime_origin(env.caller()), + origin.into(), (*token).into(), env.to_account_id(&(*spender.0).into()), (*value).try_convert()?, @@ -132,10 +134,11 @@ where ensure!(!value.is_zero(), ZeroValue); let (owner, value) = (|| { - let owner = >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let owner = origin.address(); let value = increase_allowance::( - to_runtime_origin(env.caller()), + origin.into(), (*token).into(), env.to_account_id(&(*spender.0).into()), (*value).try_convert()?, @@ -166,10 +169,11 @@ where ensure!(!value.is_zero(), ZeroValue); let (owner, value) = (|| { - let owner = >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let owner = origin.address(); let value = match decrease_allowance::( - to_runtime_origin(env.caller()), + origin.into(), (*token).into(), env.to_account_id(&(*spender.0).into()), (*value).try_convert()?, @@ -210,11 +214,11 @@ where ensure!(!minBalance.is_zero(), MinBalanceZero); let (creator, id) = (|| { - let creator = - >::to_address(env.caller().account_id()?).0.into(); + let origin = Origin::try_from(env.caller())?; + let creator = origin.address(); let id = create::( - to_runtime_origin(env.caller()), + origin.into(), env.to_account_id(&(*admin.0).into()), (*minBalance).try_convert()?, )? diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 3a709a846..9464f0f9d 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -5,6 +5,7 @@ extern crate alloc; use alloc::vec::Vec; use core::{convert::Into, marker::PhantomData, num::NonZero}; +use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ dispatch::RawOrigin, pallet_prelude::DispatchError, @@ -21,8 +22,9 @@ use pallet_revive::{ }, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, Origin, H256, + AddressMapper as _, H256, }; +use scale_info::TypeInfo; #[cfg(feature = "runtime-benchmarks")] use { frame_support::{pallet_prelude::IsType, traits::fungible::Inspect}, @@ -178,11 +180,48 @@ fn topics(event: &impl SolEvent) -> Vec { event.encode_topics().into_iter().map(|t| (*t.0).into()).collect() } +/// The origin of a call. +#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] +#[scale_info(skip_type_params(T))] +pub struct Origin { + address: H160, + account: T::AccountId, +} + +impl Origin { + /// Returns the address of the origin. + pub fn address(&self) -> pallet_revive::precompiles::alloy::primitives::Address { + self.address.0.into() + } + + /// Converts the origin into a `RuntimeOrigin`. + pub fn into(self) -> T::RuntimeOrigin { + frame_system::RawOrigin::Signed(self.account).into() + } +} + +impl TryFrom> for Origin { + type Error = DispatchError; + + fn try_from(origin: pallet_revive::Origin) -> Result { + use pallet_revive::Origin::*; + let account = match origin { + Signed(id) => Ok(id), + Root => Err(DispatchError::RootNotAllowed), + }?; + let address = ::AddressMapper::to_address(&account); + Ok(Self { address, account }) + } +} + /// Creates a new `RuntimeOrigin` from an ['Origin']. -pub fn to_runtime_origin(o: Origin) -> T::RuntimeOrigin { +pub fn to_runtime_origin( + o: pallet_revive::Origin, +) -> T::RuntimeOrigin { + use pallet_revive::Origin::*; match o { - Origin::Root => RawOrigin::Root.into(), - Origin::Signed(account) => RawOrigin::Signed(account).into(), + Root => RawOrigin::Root.into(), + Signed(account) => RawOrigin::Signed(account).into(), } } From 926f44767f7f52787a505ffb89ff77ea9b50b443 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 23:21:58 +0100 Subject: [PATCH 189/284] refactor(pallets/api): fix imports --- pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs | 2 +- pallets/api-vnext/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs index bd459b8c5..eef0d57f9 100644 --- a/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs +++ b/pallets/api-vnext/src/fungibles/precompiles/erc20/v0.rs @@ -2,7 +2,7 @@ use alloc::{string::String, vec::Vec}; use frame_support::{pallet_prelude as frame, sp_runtime::traits::AtLeast32Bit}; use pallet_assets::precompiles::{AssetIdExtractor, InlineAssetIdExtractor}; -use pallet_revive::{precompiles::RuntimeCosts, AddressMapper as _}; +use pallet_revive::precompiles::RuntimeCosts; use AddressMatcher::Prefix; use IERC20::*; diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 9464f0f9d..e4838c15c 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -22,7 +22,7 @@ use pallet_revive::{ }, AddressMatcher, Error, Ext, Precompile, }, - AddressMapper as _, H256, + AddressMapper as _, H160, H256, }; use scale_info::TypeInfo; #[cfg(feature = "runtime-benchmarks")] @@ -37,7 +37,7 @@ use { frame_system::pallet_prelude::OriginFor, pallet_revive::{ precompiles::alloy::sol_types::{Revert, SolError}, - BalanceOf, DepositLimit, MomentOf, H160, + BalanceOf, DepositLimit, MomentOf, }, }; From 9f75182bccb08a360fb6cf8f8612571511150350 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 7 Jul 2025 21:49:16 +0100 Subject: [PATCH 190/284] feat(pallets/api): add messaging precompiles --- pallets/api-vnext/Cargo.toml | 27 +- pallets/api-vnext/src/lib.rs | 2 + pallets/api-vnext/src/messaging.rs | 815 ++++++++++++++++++ pallets/api-vnext/src/messaging/deposits.rs | 70 ++ .../api-vnext/src/messaging/precompiles.rs | 20 + .../precompiles/interfaces/v0/IISMP.sol | 190 ++++ .../precompiles/interfaces/v0/IMessaging.sol | 55 ++ .../precompiles/interfaces/v0/IXCM.sol | 153 ++++ .../src/messaging/precompiles/ismp.rs | 4 + .../src/messaging/precompiles/ismp/v0.rs | 577 +++++++++++++ .../api-vnext/src/messaging/precompiles/v0.rs | 237 +++++ .../src/messaging/precompiles/xcm.rs | 4 + .../src/messaging/precompiles/xcm/v0.rs | 480 +++++++++++ pallets/api-vnext/src/messaging/transports.rs | 6 + .../src/messaging/transports/ismp.rs | 291 +++++++ .../api-vnext/src/messaging/transports/xcm.rs | 96 +++ pallets/api-vnext/src/messaging/weights.rs | 61 ++ pallets/api-vnext/src/mock.rs | 298 ++++++- 18 files changed, 3376 insertions(+), 10 deletions(-) create mode 100644 pallets/api-vnext/src/messaging.rs create mode 100644 pallets/api-vnext/src/messaging/deposits.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol create mode 100644 pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol create mode 100644 pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol create mode 100644 pallets/api-vnext/src/messaging/precompiles/ismp.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles/v0.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles/xcm.rs create mode 100644 pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs create mode 100644 pallets/api-vnext/src/messaging/transports.rs create mode 100644 pallets/api-vnext/src/messaging/transports/ismp.rs create mode 100644 pallets/api-vnext/src/messaging/transports/xcm.rs create mode 100644 pallets/api-vnext/src/messaging/weights.rs diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index fee68851f..9c1e2a553 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -12,15 +12,23 @@ version = "0.1.0" doctest = false [dependencies] +anyhow = { workspace = true, optional = true } base64.workspace = true codec.workspace = true frame-benchmarking.workspace = true frame-support.workspace = true frame-system.workspace = true +ismp = { workspace = true, optional = true } +log = { workspace = true, optional = true } pallet-assets = { workspace = true, default-features = false, optional = true } pallet-balances = { workspace = true, default-features = false, optional = true } +pallet-ismp = { workspace = true, optional = true } pallet-revive = { workspace = true, default-features = false } +pallet-xcm = { workspace = true, optional = true } scale-info.workspace = true +sp-runtime = { workspace = true, optional = true } +xcm = { workspace = true, optional = true } +xcm-builder = { workspace = true, optional = true } [dev-dependencies] pallet-balances.workspace = true @@ -28,24 +36,41 @@ pallet-timestamp.workspace = true sp-io.workspace = true [features] -default = [ "fungibles", "std" ] +default = [ "fungibles", "messaging", "std" ] fungibles = [ "dep:pallet-assets", "dep:pallet-balances" ] +messaging = [ + "dep:anyhow", + "dep:ismp", + "dep:log", + "dep:pallet-ismp", + "dep:pallet-xcm", + "dep:sp-runtime", + "dep:xcm", + "dep:xcm-builder", +] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-revive/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", ] std = [ "codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", + "ismp?/std", "pallet-assets?/std", "pallet-balances/std", + "pallet-ismp?/std", "pallet-revive/std", "pallet-timestamp/std", + "pallet-xcm?/std", "scale-info/std", "sp-io/std", + "sp-runtime?/std", + "xcm-builder?/std", + "xcm?/std", ] diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index e4838c15c..beb9ea254 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -44,6 +44,8 @@ use { mod errors; #[cfg(feature = "fungibles")] pub mod fungibles; +#[cfg(feature = "messaging")] +pub mod messaging; #[cfg(test)] mod mock; diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs new file mode 100644 index 000000000..70e8214fe --- /dev/null +++ b/pallets/api-vnext/src/messaging.rs @@ -0,0 +1,815 @@ +use deposits::*; +use frame_support::{ + dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, + pallet_prelude::*, + storage::KeyLenOf, + traits::{ + tokens::{ + fungible::{hold::Mutate as HoldMutate, Balanced, Credit, Inspect, Mutate}, + Fortitude, Precision, Preservation, + }, + Get, OnUnbalanced, + }, + weights::WeightToFee, + BoundedSlice, +}; +use frame_system::pallet_prelude::*; +pub use pallet::{Error, *}; +use pallet_revive::sp_runtime::traits::{SaturatedConversion, Saturating, TryConvert}; +use sp_runtime::ArithmeticError; +use transports::{ + ismp::IsmpDispatcher, + xcm::{Location, NotifyQueryHandler, QueryId, Response}, +}; +use weights::WeightInfo; + +use super::*; + +mod deposits; +/// The messaging precompiles offer a streamlined interface for cross-chain messaging. +pub mod precompiles; +/// Messaging transports. +pub mod transports; +mod weights; + +type BalanceOf = <::Fungibles as Inspect>>::Balance; +type BlockNumberOf = BlockNumberFor; +// TODO: consider u32 (e.g. a message per contract/block) +pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - U256?; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// The type responsible for executing callbacks. + type CallbackExecutor: CallbackExecutor; + /// Where the callback fees or response fees are charged to. + type FeeHandler: OnUnbalanced>; + /// The deposit + fee mechanism. + type Fungibles: HoldMutate + + Mutate + + Balanced; + /// The ISMP message dispatcher. + type IsmpDispatcher: IsmpDispatcher>; + /// The implementation of Keccak used for commitment hashes. + type Keccak256: ::ismp::messaging::Keccak256; + /// The maximum length of any additional application-specific metadata relating to a + /// request. + #[pallet::constant] + type MaxContextLen: Get; + /// The maximum length of outbound (posted) data. + #[pallet::constant] + type MaxDataLen: Get; + /// The maximum byte length for a single key of an ismp request. + #[pallet::constant] + type MaxKeyLen: Get; + /// The maximum amount of key for an outbound request. + #[pallet::constant] + type MaxKeys: Get; + /// The maximum number of messages which can be removed at a time. + #[pallet::constant] + type MaxRemovals: Get; + /// The maximum length for a response. + #[pallet::constant] + type MaxResponseLen: Get; + /// SAFETY: Recommended this is small as is used to updated a message status in the hooks. + /// The maximum number of xcm timeout updates that can be processed per block. + #[pallet::constant] + type MaxXcmQueryTimeoutsPerBlock: Get; + /// The base byte fee for data stored offchain. + #[pallet::constant] + type OffChainByteFee: Get>; + /// The base byte fee for data stored onchain. + #[pallet::constant] + type OnChainByteFee: Get>; + /// A converter for conversion of a call origin to a location. + type OriginConverter: TryConvert; + /// The overarching hold reason for deposits. + type RuntimeHoldReason: From; + /// The type responsible for converting between weight and balance, commonly transaction + /// payment. + type WeightToFee: WeightToFee>; + /// Pallet weights. + type WeightInfo: WeightInfo; + /// A handler for the creation of a XCM query notification. + type Xcm: NotifyQueryHandler; + /// The origin of the response for xcm. + type XcmResponseOrigin: EnsureOrigin; + } + + #[pallet::error] + pub enum Error { + /// The message is invalid. + InvalidMessage, + /// The query is invalid. + InvalidQuery, + /// Failed to convert origin. + OriginConversionFailed, + /// The message already exists. + MessageExists, + /// The request is pending. + RequestPending, + /// dispatching a call via ISMP falied + IsmpDispatchFailed, + /// The message was not found + MessageNotFound, + /// The request has timed out + RequestTimedOut, + /// Timeouts must be in the future. + FutureTimeoutMandatory, + /// Message block limit has been reached for this expiry block. Try a different timeout. + MaxMessageTimeoutPerBlockReached, + /// This callback cannot be processed due to lack of blockspace. Please poll the response. + BlockspaceAllowanceReached, + /// This is not possible as the message has completed. + MessageCompleted, + /// No callback has been found for this query. + NoCallbackFound, + /// Weight cannot be zero. + ZeroWeight, + /// The number of messages exceeds the limit. + TooManyMessages, + } + + /// A reason for the pallet placing a hold on funds. + #[pallet::composite_enum] + pub enum HoldReason { + /// Held for the duration of a message's lifespan. + #[codec(index = 0)] + Messaging, + #[codec(index = 1)] + CallbackGas, + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_initialize(_n: BlockNumberOf) -> Weight { + todo!() + } + } + + // TODO: docs + // Messages are keyed by the originating account to ensure that only that account can remove the + // message. + #[pallet::storage] + pub(crate) type Messages = StorageDoubleMap< + _, + Blake2_128Concat, + T::AccountId, + Blake2_128Concat, + MessageId, + Message, + >; + + /// The next message identifier for each account. + /// + /// Also serves as a count of the number of messages sent by each account. + #[pallet::storage] + pub(crate) type NextMessageId = + StorageMap<_, Blake2_128Concat, T::AccountId, MessageId, ValueQuery>; + + // TODO: docs + #[pallet::storage] + pub(super) type IsmpRequests = + StorageMap<_, Identity, H256, (T::AccountId, MessageId), OptionQuery>; + + // TODO: docs + #[pallet::storage] + pub(super) type XcmQueries = + StorageMap<_, Identity, QueryId, (T::AccountId, MessageId), OptionQuery>; + + // TODO: docs + #[pallet::storage] + pub(super) type XcmQueryTimeouts = StorageMap< + _, + Identity, + BlockNumberOf, + BoundedVec<(T::AccountId, MessageId), T::MaxXcmQueryTimeoutsPerBlock>, + ValueQuery, + >; + + /// The events that can be emitted. + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// A callback has been executed successfully. + CallbackExecuted { + /// The origin of the callback. + origin: T::AccountId, + /// The identifier specified for the request. + id: MessageId, + /// The successful callback. + callback: Callback, + }, + /// A callback has failed. + CallbackFailed { + /// The origin of the callback. + origin: T::AccountId, + /// The identifier specified for the request. + id: MessageId, + /// The callback which failed. + callback: Callback, + /// The error which occurred. + error: DispatchErrorWithPostInfo, + }, + /// A response to a GET has been received via ISMP. + IsmpGetResponseReceived { + /// The destination of the response. + dest: T::AccountId, + /// The identifier specified for the request. + id: MessageId, + /// The ISMP request commitment. + commitment: H256, + }, + /// A response to a POST has been received via ISMP. + IsmpPostResponseReceived { + /// The destination of the response. + dest: T::AccountId, + /// The identifier specified for the request. + id: MessageId, + /// The ISMP request commitment. + commitment: H256, + }, + /// An ISMP message has timed out. + IsmpTimedOut { commitment: H256 }, + /// An error has occured while attempting to refund weight. + WeightRefundErrored { message_id: MessageId, error: DispatchError }, + /// A response to a XCM query has been received. + XcmResponseReceived { + /// The destination of the response. + dest: T::AccountId, + /// The identifier specified for the request. + id: MessageId, + /// The identifier of the XCM query. + query_id: QueryId, + /// The query response. + response: Response, + }, + } + + #[pallet::call] + impl Pallet { + /// Handle a response to a previous XCM query. + /// + /// Executes a stored callback or updates the state with the received response. + /// + /// # Parameters + /// - `origin`: The XCM responder origin. + /// - `query_id`: The ID of the XCM query being responded to. + /// - `xcm_response`: The response data. + #[pallet::call_index(0)] + #[pallet::weight({ + // This is only used to check against max_weight field in the OnResponse implementation in pallet-xcm. + T::WeightInfo::xcm_response() + })] + pub fn xcm_response( + origin: OriginFor, + query_id: QueryId, + xcm_response: Response, + ) -> DispatchResult { + T::XcmResponseOrigin::ensure_origin(origin)?; + + let extrinsic_weight = T::WeightInfo::xcm_response() + .saturating_add(T::CallbackExecutor::execution_weight()); + + ensure!( + frame_system::BlockWeight::::get() + .checked_accrue(extrinsic_weight, DispatchClass::Normal) + .is_ok(), + Error::::BlockspaceAllowanceReached + ); + + // Manually adjust weight ahead of fallible execution. + // The fees of which should have been paid. + frame_system::Pallet::::register_extra_weight_unchecked( + T::WeightInfo::xcm_response() + .saturating_add(T::CallbackExecutor::execution_weight()), + DispatchClass::Normal, + ); + + let (initiating_origin, id) = + XcmQueries::::get(query_id).ok_or(Error::::MessageNotFound)?; + let xcm_query_message = + Messages::::get(&initiating_origin, id).ok_or(Error::::MessageNotFound)?; + + let (query_id, callback, message_deposit) = match &xcm_query_message { + Message::XcmQuery { query_id, callback, message_deposit } => + (query_id, callback, message_deposit), + Message::XcmTimeout { .. } => return Err(Error::::RequestTimedOut.into()), + _ => return Err(Error::::InvalidMessage.into()), + }; + + // Emit event before possible callback execution. + Self::deposit_event(Event::::XcmResponseReceived { + dest: initiating_origin.clone(), + id, + query_id: *query_id, + response: xcm_response.clone(), + }); + + if let Some(callback) = callback { + // Attempt callback with response if specified. + log::debug!(target: "pop-api::extension", "xcm callback={:?}, response={:?}", callback, xcm_response); + // Never roll back state if call fails. + // Ensure that the response can be polled. + if call::(&initiating_origin, *callback, &id, &xcm_response).is_ok() { + Messages::::remove(&initiating_origin, id); + XcmQueries::::remove(query_id); + T::Fungibles::release( + &HoldReason::Messaging.into(), + &initiating_origin, + *message_deposit, + Precision::Exact, + )?; + + return Ok(()) + } + } + // No callback is executed, + Messages::::insert( + &initiating_origin, + id, + Message::XcmResponse { + query_id: *query_id, + message_deposit: *message_deposit, + response: xcm_response, + }, + ); + Ok(().into()) + } + } +} + +/// Executes a registered callback with the given input data and manually charges block +/// weight. +/// +/// This function is responsible for handling the full lifecycle of a callback invocation: +/// - Calculating the total weight cost of the callback. +/// - Ensuring that sufficient blockspace is available before execution. +/// - Executing the callback via the configured `CallbackExecutor`. +/// - Registering the actual weight used with the runtime. +/// - Managing any associated weight fee refund logic. +/// +/// # Parameters +/// +/// - `initiating_origin`: The account that triggered the callback. This will be passed to the +/// executor and used for fee management and event attribution. +/// - `callback`: The callback definition. +/// - `id`: The message ID associated with this callback's message. +/// - `data`: The encoded payload to send to the callback. +/// +/// # Weight Handling +/// +/// - Before executing the callback, this function checks whether the total expected weight +/// (`callback.weight`) can be accommodated in the current block. +/// - If the block is saturated, the function returns early with an error and does not mutate state. +/// - After execution, the actual weight used by the callback is determined using +/// [`Self::process_callback_weight`] and registered via +/// [`frame_system::Pallet::::register_extra_weight_unchecked`]. +pub(crate) fn call( + initiating_origin: &AccountIdOf, + callback: Callback, + id: &MessageId, + data: &impl Encode, +) -> DispatchResult { + // This is the total weight that should be deducted from the blockspace for callback + // execution. + let max_weight = callback.weight; + + // Dont mutate state if blockspace will be saturated. + ensure!( + frame_system::BlockWeight::::get() + .checked_accrue(max_weight, DispatchClass::Normal) + .is_ok(), + Error::::BlockspaceAllowanceReached + ); + + // Execute callback. + // Its important to note that we must still ensure that the weight used is accounted for + // in frame_system. Hence all calls after this must not return an err and state + // should not be rolled back. + let data = match callback.encoding { + Encoding::Scale => [callback.selector.to_vec(), (id, data).encode()].concat(), + Encoding::SolidityAbi => todo!(), + }; + let result = T::CallbackExecutor::execute( + initiating_origin, + callback.destination, + data, + callback.weight, + ); + + log::debug!(target: "pop-api::extension", "callback weight={:?}, result={result:?}", callback.weight); + deposit_callback_event::(initiating_origin, *id, &callback, &result); + let callback_weight_used = process_callback_weight(&result, callback.weight); + + // Manually adjust callback weight. + frame_system::Pallet::::register_extra_weight_unchecked( + callback_weight_used, + DispatchClass::Normal, + ); + + match manage_fees::(&initiating_origin, callback_weight_used, callback.weight) { + Ok(_) => (), + // Dont return early, we must register the weight used by the callback. + Err(error) => + >::deposit_event(Event::WeightRefundErrored { message_id: *id, error }), + } + Ok(()) +} + +/// Deposits an event indicating the outcome of a callback execution. +/// +/// This function is intended to be called after attempting to dispatch a callback. +/// It emits either a `CallbackExecuted` or `CallbackFailed` event based on the result. +/// +/// # Parameters +/// +/// - `initiating_origin`: The account that originally initiated the message. +/// - `message_id`: The unique identifier associated with the message that triggered the callback. +/// - `callback`: The callback object that was attempted to be executed. +/// - `result`: The outcome of the callback execution, containing either success or failure. +pub(crate) fn deposit_callback_event( + initiating_origin: &T::AccountId, + message_id: MessageId, + callback: &Callback, + result: &DispatchResultWithPostInfo, +) { + match result { + Ok(_) => { + >::deposit_event(Event::::CallbackExecuted { + origin: initiating_origin.clone(), + id: message_id, + callback: callback.clone(), + }); + }, + Err(error) => { + >::deposit_event(Event::::CallbackFailed { + origin: initiating_origin.clone(), + id: message_id, + callback: callback.clone(), + error: error.clone(), + }); + }, + } +} + +fn get(id: (&T::AccountId, &MessageId)) -> Vec { + use Message::*; + Messages::::get(id.0, id.1) + .and_then(|m| match m { + Ismp { .. } | IsmpTimeout { .. } | XcmQuery { .. } | XcmTimeout { .. } => None, + IsmpResponse { response, .. } => Some(response.into_inner()), + XcmResponse { response, .. } => Some(response.encode()), + }) + .unwrap_or_default() +} + +/// Handles fee management and refund logic for callback execution. +/// +/// This function is intended to balance the fees collected upfront for a callback +/// against the actual weight used during execution. If the callback uses less weight +/// than originally reserved, the surplus is refunded to the user, and the remainder +/// is transferred as an execution reward to the fee collector account. +/// +/// # Parameters +/// +/// - `initiating_origin`: The account that initially paid for the callback execution. +/// - `weight_used`: The actual weight consumed by the callback. +/// - `max_weight`: The maximum weight that was budgeted and paid for in advance. +pub(crate) fn manage_fees( + initiating_origin: &AccountIdOf, + weight_used: Weight, + max_weight: Weight, +) -> DispatchResult { + let weight_to_refund = max_weight.saturating_sub(weight_used); + let total_deposit = T::WeightToFee::weight_to_fee(&max_weight); + let reason = HoldReason::CallbackGas.into(); + + let to_reward = if weight_to_refund.any_gt(Zero::zero()) { + let returnable_deposit = T::WeightToFee::weight_to_fee(&weight_to_refund); + let execution_reward = total_deposit.saturating_sub(returnable_deposit); + + execution_reward + } else { + total_deposit + }; + + // Release the deposit. + T::Fungibles::release(&reason, initiating_origin, total_deposit, Precision::Exact)?; + + // Withdraw assets. + let credit = T::Fungibles::withdraw( + &initiating_origin, + to_reward, + Precision::Exact, + Preservation::Preserve, + Fortitude::Polite, + )?; + + // Handle assets. + T::FeeHandler::on_unbalanced(credit); + Ok(()) +} + +fn next_message_id(origin: &T::AccountId) -> Result { + // TODO: work into storage deposit? A global identifier might be better for a number of reasons, + // but will require removal protection by storing the originating account in the message rather + // than key + NextMessageId::::try_mutate(&origin, |next| { + let id = *next; + *next = next.checked_add(One::one()).ok_or(ArithmeticError::Overflow)?; + Ok(id) + }) +} + +fn poll_status(message: (&T::AccountId, &MessageId)) -> MessageStatus { + >::get(message.0, message.1) + .map_or(MessageStatus::NotFound, |m| MessageStatus::from(&m)) +} + +/// Determines the actual weight consumed by a callback execution, falling back to the +/// maximum if unknown. +/// +/// This function is used to calculate the weight to be accounted for after attempting to +/// dispatch a callback. It ensures that even if the callback execution fails or does not +/// report actual weight, the worst-case (`max_weight`) is used to avoid under-accounting. +/// +/// # Parameters +/// +/// - `result`: The result of the callback dispatch, including any `PostDispatchInfo` if successful. +/// - `max_weight`: The maximum weight budgeted for the callback execution. +/// +/// # Rationale +/// +/// - Protects against underestimating weight in cases where `actual_weight` is missing or the +/// dispatch fails. +/// - Ensures conservative accounting to avoid exceeding block or message limits. +pub(crate) fn process_callback_weight( + result: &DispatchResultWithPostInfo, + max_weight: Weight, +) -> Weight { + match result { + // callback has succeded. + Ok(post_info) => { + match post_info.actual_weight { + Some(w) => w, + // return the worst case if the callback executor does not populate the + // actual weight. + None => max_weight, + } + }, + // callback has failed. + Err(_) => { + // return the maximum weight. + max_weight + }, + } +} + +/// Remove a batch of completed or timed-out messages. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `origin`: The account removing its messages. +/// - `messages`: List of message IDs to remove (bounded by `MaxRemovals`). +fn remove(origin: &T::AccountId, messages: &[MessageId]) -> DispatchResult { + for id in >::try_from(messages) + .map_err(|_| >::TooManyMessages)? + { + let Some(message) = Messages::::get(&origin, id) else { + return Err(Error::::MessageNotFound.into()); + }; + + let (message_deposit, maybe_callback_deposit) = match message { + Message::Ismp { .. } | Message::XcmQuery { .. } => Err(Error::::RequestPending), + Message::IsmpResponse { message_deposit, commitment, .. } => { + Messages::::remove(&origin, id); + IsmpRequests::::remove(commitment); + Ok((message_deposit, None)) + }, + Message::IsmpTimeout { message_deposit, commitment, callback_deposit, .. } => { + Messages::::remove(&origin, id); + IsmpRequests::::remove(commitment); + Ok((message_deposit, callback_deposit)) + }, + Message::XcmResponse { message_deposit, query_id, .. } => { + Messages::::remove(&origin, id); + XcmQueries::::remove(query_id); + Ok((message_deposit, None)) + }, + Message::XcmTimeout { query_id, message_deposit, callback_deposit, .. } => { + Messages::::remove(&origin, id); + XcmQueries::::remove(query_id); + Ok((message_deposit, callback_deposit)) + }, + }?; + + T::Fungibles::release( + &HoldReason::Messaging.into(), + &origin, + message_deposit, + Precision::Exact, + )?; + if let Some(callback_deposit) = maybe_callback_deposit { + T::Fungibles::release( + &HoldReason::CallbackGas.into(), + &origin, + callback_deposit, + Precision::Exact, + )?; + } + } + Ok(()) +} + +/// A message callback. +#[derive( + Copy, + Clone, + Debug, + Decode, + DecodeWithMemTracking, + Encode, + Eq, + MaxEncodedLen, + PartialEq, + TypeInfo, +)] +#[scale_info(skip_type_params(T))] +pub struct Callback { + /// The contract address to which the callback should be sent. + pub destination: H160, + /// The encoding used for the data going to the contract. + pub encoding: Encoding, + /// The message selector to be used for the callback. + pub selector: [u8; 4], + /// The pre-paid weight used as a gas limit for the callback. + pub weight: Weight, +} + +impl Callback { + /// A new message callback. + /// + /// # Parameters + /// - `destination`: The contract address to which the callback should be sent. + /// - `encoding`: The encoding used for the data going to the contract. + /// - `selector`: The message selector to be used for the callback. + /// - `weight`: The pre-paid weight used as a gas limit for the callback. + pub(crate) fn new( + destination: H160, + encoding: Encoding, + selector: [u8; 4], + weight: Weight, + ) -> Self { + Self { destination, encoding, selector, weight } + } +} + +/// The trait responsible for executing callbacks in response to cross-chain messages. +/// +/// Implementors of this trait define the mechanism by which callback data is executed +/// for a given account, along with the expected weight cost of this operation. +/// +/// This trait enables customizable and extensible behavior for handling asynchronous +/// responses via optional callback logic — e.g., invoking a runtime call or a smart contract. +pub trait CallbackExecutor { + /// Execute the callback logic for a specific account with the given encoded payload. + /// + /// # Parameters + /// - `account`: The account that initiated the original cross-chain request. + /// - `destination`: The contract address to which the callback should be sent. + /// - `data`: Encoded callback data, typically ABI-encoded input including selector and + /// parameters. + /// - `weight`: The maximum weight allowed for executing this callback. + fn execute( + account: &T::AccountId, + destination: H160, + data: Vec, + weight: Weight, + ) -> DispatchResultWithPostInfo; + + /// Returns the baseline weight required for a single callback execution. + /// + /// This serves as an overhead estimate, useful for pallet-level weight calculations. + fn execution_weight() -> Weight; +} + +/// The specificiation of how data must be encoded before being sent to a contract. +#[derive( + Copy, + Clone, + Debug, + Decode, + DecodeWithMemTracking, + Encode, + Eq, + MaxEncodedLen, + PartialEq, + TypeInfo, +)] +pub enum Encoding { + /// SCALE (Simple Concatenated Aggregate Little-Endian) encoding. + Scale, + /// Solidity ABI (Application Binary Interface) encoding, + SolidityAbi, +} + +/// Represents a cross-chain message in the system. +/// +/// Each variant of this enum captures a different state or type of message lifecycle: +/// - A request in progress. +/// - A response received. +/// - A timeout occurred. +/// +/// This is used internally to track, manage, and clean up messages, along with any +/// associated deposits and optional callback metadata. +#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] +#[scale_info(skip_type_params(T))] +pub(crate) enum Message { + /// Represents a pending ISMP request. + /// + /// # Fields + /// - `commitment`: The cryptographic commitment of the request payload. + /// - `callback`: An optional callback to invoke upon receiving a response. + /// - `deposit`: The total deposit held to cover message and callback fees. + Ismp { commitment: H256, callback: Option, message_deposit: BalanceOf }, + + /// Represents a pending XCM query request. + /// + /// # Fields + /// - `query_id`: Unique identifier for the XCM query. + /// - `callback`: An optional callback for handling the response. + /// - `deposit`: The deposit held to cover fees for query execution and callback. + XcmQuery { query_id: QueryId, callback: Option, message_deposit: BalanceOf }, + + /// Represents a received ISMP response. + /// + /// # Fields + /// - `commitment`: The original commitment for the request. + /// - `deposit`: The held deposit for the message, which may be released or burned. + /// - `response`: The encoded response payload, size-bounded by `T::MaxResponseLen`. + IsmpResponse { + commitment: H256, + message_deposit: BalanceOf, + response: BoundedVec, + }, + + /// Represents a received XCM response. + /// + /// # Fields + /// - `query_id`: Identifier that matches a previously sent XCM query. + /// - `deposit`: The deposit originally held for this message. + /// - `response`: The deserialized response payload. + XcmResponse { query_id: QueryId, message_deposit: BalanceOf, response: Response }, + + /// Represents an ISMP request that timed out before a response was received. + /// + /// # Fields + /// - `commitment`: The original commitment of the request. + /// - `deposit`: The deposit held for the request, which may be reclaimed. + IsmpTimeout { + commitment: H256, + message_deposit: BalanceOf, + callback_deposit: Option>, + }, + + /// Represents an XCM query that timed out before a response was received. + /// + /// # Fields + /// - `query_id`: The original query ID that timed out. + /// - `deposit`: The deposit held for the query, which may be reclaimed. + XcmTimeout { + query_id: QueryId, + message_deposit: BalanceOf, + callback_deposit: Option>, + }, +} + +/// The related message status of a Message. +#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] +pub enum MessageStatus { + NotFound, + Pending, + Complete, + Timeout, +} + +impl From<&Message> for MessageStatus { + fn from(value: &Message) -> Self { + match *value { + Message::Ismp { .. } => MessageStatus::Pending, + Message::XcmQuery { .. } => MessageStatus::Pending, + Message::IsmpResponse { .. } => MessageStatus::Complete, + Message::XcmResponse { .. } => MessageStatus::Complete, + Message::IsmpTimeout { .. } => MessageStatus::Timeout, + Message::XcmTimeout { .. } => MessageStatus::Timeout, + } + } +} diff --git a/pallets/api-vnext/src/messaging/deposits.rs b/pallets/api-vnext/src/messaging/deposits.rs new file mode 100644 index 000000000..8c677ba9b --- /dev/null +++ b/pallets/api-vnext/src/messaging/deposits.rs @@ -0,0 +1,70 @@ +use super::*; + +#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] +pub enum ProtocolStorageDeposit { + XcmQueries, + IsmpRequests, +} + +/// Calculate the deposit required for the space used for a specific protocol. +pub fn calculate_protocol_deposit>>( + p: ProtocolStorageDeposit, +) -> BalanceOf { + let base: usize = match p { + ProtocolStorageDeposit::XcmQueries => (KeyLenOf::>::get() as usize) + .saturating_add(AccountIdOf::::max_encoded_len()) + .saturating_add(MessageId::max_encoded_len()) + .saturating_add(Option::::max_encoded_len()), + + ProtocolStorageDeposit::IsmpRequests => (KeyLenOf::>::get() as usize) + .saturating_add(AccountIdOf::::max_encoded_len()) + .saturating_add(MessageId::max_encoded_len()), + }; + ByteFee::get().saturating_mul(base.saturated_into()) +} + +/// Calculate the deposit for the storage used for the Message enum. +pub fn calculate_message_deposit>>() -> BalanceOf { + ByteFee::get().saturating_mul( + (KeyLenOf::>::get() as usize + Message::::max_encoded_len()) + .saturated_into(), + ) +} + +/// Blanket implementation of generating the deposit for a type that implements MaxEncodedLen. +pub fn calculate_deposit_of>, U: MaxEncodedLen>( +) -> BalanceOf { + ByteFee::get().saturating_mul(U::max_encoded_len().saturated_into()) +} + +#[cfg(test)] +mod tests { + use frame_support::pallet_prelude::Get; + + use super::*; + use crate::mock::*; + + struct Two; + impl Get for Two { + fn get() -> u128 { + 2 + } + } + + #[test] + fn calculate_deposit_of_works() { + ExtBuilder::new().build().execute_with(|| { + // 4 + 4 bytes. + #[derive( + Copy, Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo, + )] + struct Data { + pub a: u32, + pub b: u32, + } + + // 8 * 2 = 16 units + assert_eq!(calculate_deposit_of::(), 16); + }) + } +} diff --git a/pallets/api-vnext/src/messaging/precompiles.rs b/pallets/api-vnext/src/messaging/precompiles.rs new file mode 100644 index 000000000..4a4e55846 --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles.rs @@ -0,0 +1,20 @@ +use alloc::vec; + +pub(super) use pallet_revive::precompiles::{ + alloy::{ + primitives::{ruint::UintTryTo, U256}, + sol_types::SolCall, + }, + AddressMatcher::Fixed, + RuntimeCosts, +}; + +use super::*; + +/// APIs for cross-chain messaging using the Interoperable State Machine Protocol (ISMP).. +pub mod ismp; +/// APIs for cross-chain messaging using Polkadot's Cross-Consensus Messaging (XCM). +pub mod xcm; + +/// The first version of the Messaging API. +pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol new file mode 100644 index 000000000..f3354deaa --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.30; + +/** + * @title The ISMP precompile offers a streamlined interface for messaging using the Interoperable State Machine Protocol. + */ +interface IISMP { + /** + * @notice Submit a new ISMP `Get` request. + * @dev Sends a `Get` request through ISMP. + * @param request The ISMP `Get` message containing query details. + * @param fee The fee to be paid to relayers. + * @return id A unique message identifier. + */ + function get( + Get calldata request, + uint256 fee + ) external returns (uint64 id); + + /** + * @notice Submit a new ISMP `Get` request. + * @dev Sends a `Get` request through ISMP with a callback to handle the response. + * @param fee The fee to be paid to relayers. + * @param callback The callback to execute upon receiving a response. + * @return id A unique message identifier. + */ + function get( + Get calldata request, + uint256 fee, + Callback calldata callback + ) external returns (uint64 id); + + /** + * @notice Returns the response to a message (if any). + * @dev A non-existent message identifier will return an empty response, which could also be a valid response depending on the source message. + * @param message The message identifier. + * @return response The response to a message. + */ + function getResponse(uint64 message) external returns (bytes memory response); + + /** + * @notice Polls the status of a message. + * @param message The message identifier to poll. + * @return status The status of the message. + */ + function pollStatus(uint64 message) external returns (MessageStatus status); + + /** + * @notice Submit a new ISMP `Post` request. + * @dev Sends a `Post` message through ISMP with arbitrary data. + * @param request The ISMP `Post` message containing the payload. + * @param fee The fee to be paid to relayers. + * @return id A unique message identifier. + */ + function post( + Post calldata request, + uint256 fee + ) external returns (uint64 id); + + /** + * @notice Submit a new ISMP `Post` request. + * @dev Sends a `Post` message through ISMP with arbitrary data and a callback. + * @param request The ISMP `Post` message containing the payload. + * @param fee The fee to be paid to relayers. + * @param callback The callback to execute upon receiving a response. + * @return id A unique message identifier. + */ + function post( + Post calldata request, + uint256 fee, + Callback calldata callback + ) external returns (uint64 id); + + /** + * @notice Remove a completed or timed-out message. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param message The message identifier to remove. + */ + function remove(uint64 message) external; + + /** + * @notice Remove a batch of completed or timed-out messages. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param messages A set of message identifiers to remove (bounded by `MaxRemovals`). + */ + function remove(uint64[] calldata messages) external; + + /// @notice A GET request, intended to be used for sending outgoing requests + struct Get { + /// @custom:property The destination state machine of this request. + uint32 destination; + /// @custom:property Height at which to read the state machine. + uint32 height; + /// @custom:property Relative from the current timestamp at which this request expires in seconds. + uint64 timeout; + /// @custom:property Some application-specific metadata relating to this request. + bytes context; + /// @custom:property Raw Storage keys that would be used to fetch the values from the counterparty. + bytes[] keys; + } + + /// @notice A POST request, intended to be used for sending outgoing requests. + struct Post { + /// @custom:property The destination state machine of this request. + uint32 destination; + /// @custom:property Relative from the current timestamp at which this request expires in seconds. + uint64 timeout; + /// @custom:property Encoded request data. + bytes data; + } + + /** + * @notice A GET has been dispatched via ISMP. + * @param origin The origin of the request. + * @param id The identifier of the message. + * @param commitment The ISMP request commitment. + */ + event GetDispatched(address origin, uint64 id, bytes32 commitment); + + /** + * @notice A GET has been dispatched via ISMP. + * @param origin The origin of the request. + * @param id The identifier of the message. + * @param commitment The ISMP request commitment. + * @param callback The callback to be used to return the response. + */ + event GetDispatched(address origin, uint64 id, bytes32 commitment, Callback callback); + + /** + * @notice A POST has been dispatched via ISMP. + * @param origin The origin of the request. + * @param id The identifier of the message. + * @param commitment The ISMP request commitment. + */ + event PostDispatched(address origin, uint64 id, bytes32 commitment); + + /** + * @notice A POST has been dispatched via ISMP. + * @param origin The origin of the request. + * @param id The identifier of the message. + * @param commitment The ISMP request commitment. + * @param callback The callback to be used to return the response. + */ + event PostDispatched(address origin, uint64 id, bytes32 commitment, Callback callback); +} + +/// @notice A message callback. +struct Callback { + /// @custom:property The contract address to which the callback should be sent. + address destination; + /// @custom:property The encoding used for the data going to the contract. + Encoding encoding; + /// @custom:property The message selector to be used for the callback. + bytes4 selector; + /// @custom:property The pre-paid weight used as a gas limit for the callback. + Weight weight; +} + +/** + * @notice The specificiation of how data must be encoded before being sent to a contract. + */ +enum Encoding { + Scale, + SolidityAbi +} + +/** + * @notice The status of a message. + */ +enum MessageStatus { + NotFound, + Pending, + Complete, + Timeout +} + +/** + * @notice One or more messages have been removed for the account. + * @param account The origin of the messages. + * @param messages The messages which were removed. + */ +event Removed(address account, uint64[] messages); + +/// @notice The weight of/for a transaction. +struct Weight { + /// @custom:property The weight of computational time used based on some reference hardware. + uint64 refTime; + /// @custom:property The weight of storage space used by proof of validity. + uint64 proofSize; +} diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol new file mode 100644 index 000000000..e8d578c3e --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.30; + +/** + * @title The messaging precompile offers a general interface for cross-chain messaging operations. + */ +interface IMessaging { + /** + * @notice Returns the response to a message (if any). + * @dev A non-existent message identifier will return an empty response, which could also be a valid response depending on the source message. + * @param message The message identifier. + * @return response The response to a message. + */ + function getResponse( + uint64 message + ) external returns (bytes memory response); + + /** + * @notice Polls the status of a message. + * @param message The message identifier to poll. + * @return status The status of the message. + */ + function pollStatus(uint64 message) external returns (MessageStatus status); + + /** + * @notice Remove a completed or timed-out message. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param message The identifier of the message to remove. + */ + function remove(uint64 message) external; + + /** + * @notice Remove a batch of completed or timed-out messages. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param messages A set of identifiers of messages to remove (bounded by `MaxRemovals`). + */ + function remove(uint64[] calldata messages) external; + + /** + * @notice The status of a message. + */ + enum MessageStatus { + NotFound, + Pending, + Complete, + Timeout + } + + /** + * @notice One or more messages have been removed for the account. + * @param account The origin of the messages. + * @param messages The messages which were removed. + */ + event Removed(address account, uint64[] messages); +} diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol new file mode 100644 index 000000000..dc16a2166 --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.30; + +/** + * @title The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus Messaging (XCM). + * @dev An extension of https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/precompiles/IXcm.sol + */ +interface IXCM { + + /** + * @notice The current block number. + */ + function blockNumber() external view returns (uint32 result); + + /** + * @notice Execute an XCM message from a local, signed, origin. + * @param message A SCALE-encoded versioned XCM message. + * @param weight The maximum allowed weight for execution. + * @return result A SCALE-encoded dispatch result. + */ + function execute( + bytes calldata message, + Weight calldata weight + ) external returns (bytes memory result); + + /** + * @notice Returns the response to a message (if any). + * @dev A non-existent message identifier will return an empty response, which could also be a valid response depending on the source message. + * @param message The message identifier. + * @return response The response to a message. + */ + function getResponse(uint64 message) external returns (bytes memory response); + + /** + * @notice Initiate a new XCM query. + * @dev Starts a query using the XCM interface, specifying a responder and timeout block. + * @param responder A SCALE-encoded versioned location of the XCM responder. + * @param timeout Block number after which the query should timeout. A future block number is required. + * @return id A unique message identifier. + */ + function newQuery( + bytes calldata responder, + uint32 timeout + ) external returns (uint64 id); + + /** + * @notice Initiate a new XCM query. + * @dev Starts a query using the XCM interface, specifying a responder and timeout block. + * @param responder A SCALE-encoded versioned location of the XCM responder. + * @param timeout Block number after which the query should timeout. A future block number is required. + * @param callback The callback to execute upon receiving a response. + * @return id A unique message identifier. + */ + function newQuery( + bytes calldata responder, + uint32 timeout, + Callback calldata callback + ) external returns (uint64 id); + + /** + * @notice Polls the status of a message. + * @param message The message identifier to poll. + * @return status The status of the message. + */ + function pollStatus(uint64 message) external returns (MessageStatus status); + + /** + * @notice Remove a completed or timed-out message. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param message The message identifier to remove. + */ + function remove(uint64 message) external; + + /** + * @notice Remove a batch of completed or timed-out messages. + * @dev Allows users to clean up storage and reclaim deposits for messages that have concluded. + * @param messages A set of message identifiers to remove (bounded by `MaxRemovals`). + */ + function remove(uint64[] calldata messages) external; + + /** + * @notice Send an XCM from a given origin. + * @param destination The SCALE-encoded versioned location for the destination of the message. + * @param message A SCALE-encoded versioned XCM message. + * @return result A SCALE-encoded dispatch result. + */ + function send( + bytes calldata destination, + bytes calldata message + ) external returns (bytes memory result); + + /** + * @notice A XCM query has been created. + * @param account The origin of the request. + * @param id The identifier of the message. + * @param queryId The identifier of the created XCM query. + */ + event QueryCreated(address account, uint64 id, uint64 queryId); + + /** + * @notice A XCM query has been created. + * @param account The origin of the request. + * @param id The identifier of the message. + * @param queryId The identifier of the created XCM query. + * @param callback The callback to be used to return the response. + */ + event QueryCreated(address account, uint64 id, uint64 queryId, Callback callback); +} + +/// @notice A message callback. +struct Callback { + /// @custom:property The contract address to which the callback should be sent. + address destination; + /// @custom:property The encoding used for the data going to the contract. + Encoding encoding; + /// @custom:property The message selector to be used for the callback. + bytes4 selector; + /// @custom:property The pre-paid weight used as a gas limit for the callback. + Weight weight; +} + +/** + * @notice The specificiation of how data must be encoded before being sent to a contract. + */ +enum Encoding { + Scale, + SolidityAbi +} + +/** + * @notice One or more messages have been removed for the account. + * @param account The origin of the messages. + * @param messages The messages which were removed. + */ +event Removed(address account, uint64[] messages); + +/** + * @notice The status of a message. + */ +enum MessageStatus { + NotFound, + Pending, + Complete, + Timeout +} + +/// @notice The weight of/for a transaction. +struct Weight { + /// @custom:property The weight of computational time used based on some reference hardware. + uint64 refTime; + /// @custom:property The weight of storage space used by proof of validity. + uint64 proofSize; +} diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp.rs b/pallets/api-vnext/src/messaging/precompiles/ismp.rs new file mode 100644 index 000000000..56efdbd99 --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/ismp.rs @@ -0,0 +1,4 @@ +use super::*; + +/// The first version of the ISMP messaging API. +pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs new file mode 100644 index 000000000..2c08d1eb4 --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -0,0 +1,577 @@ +use ::ismp::{ + dispatcher::{DispatchGet, DispatchPost}, + host::StateMachine, +}; +use frame_support::traits::Get as _; +pub(crate) use IISMP::{Get, *}; + +use super::*; +use crate::messaging::transports::ismp::{get, post, ID}; + +sol!( + #![sol(extra_derives(Debug, PartialEq))] + "src/messaging/precompiles/interfaces/v0/IISMP.sol" +); + +/// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State +/// Machine Protocol. +pub struct Ismp(PhantomData); +impl Precompile + for Ismp +where + U256: UintTryTo>, +{ + type Interface = IISMPCalls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Fixed(NonZero::new(FIXED).expect("expected non-zero precompile address")); + + fn call( + _address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, pallet_revive::precompiles::Error> { + match input { + IISMPCalls::get_0(get_0Call { request, fee }) => { + env.charge(::WeightInfo::ismp_get( + request + .context + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request + .keys + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + 0, + ))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let message = try_get::(request)?; + + let (id, commitment) = get::(origin, message, fee.saturating_to(), None)?; + + let origin = AddressMapper::::to_address(origin).0.into(); + let event = GetDispatched_0 { origin, id, commitment: commitment.0.into() }; + deposit_event(env, event)?; + Ok(get_0Call::abi_encode_returns(&id)) + }, + IISMPCalls::get_1(get_1Call { request, fee, callback }) => { + env.charge(::WeightInfo::ismp_get( + request + .context + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request + .keys + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + 1, + ))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let message = try_get::(request)?; + + let (id, commitment) = get::( + env.caller().account_id()?, + message, + fee.saturating_to(), + Some(callback.into()), + )?; + + let origin = AddressMapper::::to_address(origin).0.into(); + let commitment = commitment.0.into(); + let event = GetDispatched_1 { origin, id, commitment, callback: callback.clone() }; + deposit_event(env, event)?; + Ok(get_0Call::abi_encode_returns(&id)) + }, + IISMPCalls::getResponse(getResponseCall { message }) => { + env.charge(::WeightInfo::get_response())?; + + let response = super::get::((env.caller().account_id()?, message)).into(); + + Ok(getResponseCall::abi_encode_returns(&response)) + }, + IISMPCalls::pollStatus(pollStatusCall { message }) => { + env.charge(::WeightInfo::poll_status())?; + + let status = poll_status::((env.caller().account_id()?, message)).into(); + + Ok(pollStatusCall::abi_encode_returns(&status)) + }, + IISMPCalls::post_0(post_0Call { request, fee }) => { + env.charge(::WeightInfo::ismp_post( + request + .data + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + 0, + ))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let message = try_post::(request)?; + + let (id, commitment) = post::(origin, message, fee.saturating_to(), None)?; + + let origin = AddressMapper::::to_address(origin).0.into(); + let event = PostDispatched_0 { origin, id, commitment: commitment.0.into() }; + deposit_event(env, event)?; + Ok(post_0Call::abi_encode_returns(&id)) + }, + IISMPCalls::post_1(post_1Call { request, fee, callback }) => { + env.charge(::WeightInfo::ismp_post( + request + .data + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + 1, + ))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let message = try_post::(request)?; + + let (id, commitment) = post::( + env.caller().account_id()?, + message, + fee.saturating_to(), + Some(callback.into()), + )?; + + let origin = AddressMapper::::to_address(origin).0.into(); + let commitment = commitment.0.into(); + let event = PostDispatched_1 { origin, id, commitment, callback: callback.clone() }; + deposit_event(env, event)?; + Ok(post_0Call::abi_encode_returns(&id)) + }, + IISMPCalls::remove_0(remove_0Call { message }) => { + env.charge(::WeightInfo::remove(1))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, &[*message])?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: vec![*message] })?; + Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) + }, + IISMPCalls::remove_1(remove_1Call { messages }) => { + let messages_len = messages + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + env.charge(::WeightInfo::remove(messages_len))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, messages)?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: messages.clone() })?; + Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) + }, + } + } +} + +fn try_get(value: &Get) -> Result { + // TODO: additional error variants vs revive::DecodingFailed + ensure!(value.context.len() as u32 <= T::MaxContextLen::get(), Error::::TooManyMessages); + ensure!(value.keys.len() as u32 <= T::MaxKeys::get(), Error::::TooManyMessages); + ensure!( + value.keys.iter().all(|k| k.len() as u32 <= T::MaxKeyLen::get()), + Error::::TooManyMessages + ); + Ok(DispatchGet { + dest: StateMachine::Polkadot(value.destination), + from: ID.into(), + keys: value.keys.iter().map(|key| key.to_vec()).collect(), + height: value.height.into(), + context: value.context.to_vec(), + timeout: value.timeout, + }) +} + +fn try_post(value: &Post) -> Result { + // TODO: additional error variants vs revive::DecodingFailed + ensure!(value.data.len() as u32 <= T::MaxDataLen::get(), Error::::TooManyMessages); + Ok(DispatchPost { + dest: StateMachine::Polkadot(value.destination), + from: ID.into(), + to: ID.into(), + timeout: value.timeout, + body: value.data.to_vec(), + }) +} + +impl From<&Callback> for super::Callback { + fn from(callback: &Callback) -> Self { + Self::new( + (*callback.destination.0).into(), + (&callback.encoding).into(), + callback.selector.0, + (&callback.weight).into(), + ) + } +} + +impl From<&Encoding> for super::Encoding { + fn from(encoding: &Encoding) -> Self { + match encoding { + Encoding::Scale => Self::Scale, + Encoding::SolidityAbi => Self::SolidityAbi, + // TODO + Encoding::__Invalid => unimplemented!(), + } + } +} + +impl From for self::MessageStatus { + fn from(value: messaging::MessageStatus) -> Self { + use messaging::MessageStatus::*; + match value { + NotFound => Self::NotFound, + Pending => Self::Pending, + Complete => Self::Complete, + Timeout => Self::Timeout, + } + } +} + +impl From<&Weight> for super::Weight { + fn from(weight: &Weight) -> Self { + Self::from_parts(weight.refTime, weight.proofSize) + } +} + +#[cfg(test)] +mod tests { + use ::ismp::router::{GetRequest, PostRequest, Request}; + use frame_support::{assert_ok, traits::UnixTime, weights::Weight}; + use mock::{ExtBuilder, *}; + use pallet_revive::{ + precompiles::alloy::sol_types::{SolInterface, SolType}, + test_utils::ALICE, + }; + use sp_io::hashing::keccak_256; + + use super::{ + super::Message::{Ismp, *}, + IISMPCalls::*, + MessageStatus::*, + *, + }; + + type Messages = crate::messaging::Messages; + + const ADDRESS: [u8; 20] = fixed_address(ISMP); + const MESSAGE_DEPOSIT: u128 = 129_540; + + #[test] + fn get_works() { + let origin = ALICE; + let message = 1; + let request = IISMP::Get { + destination: 1_000, + height: u32::MAX, + timeout: u64::MAX, + context: vec![255u8; 64].into(), + keys: vec![vec![255u8; 32].into()].into(), + }; + let fee = U256::from(100); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .build() + .execute_with(|| { + let commitment = get_hash(&request); + + assert_eq!( + call_precompile::(&origin, &get_0(get_0Call { request, fee })).unwrap(), + message + ); + + let event = GetDispatched_0 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into() }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::Ismp { commitment: c, callback, message_deposit }) + if c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn get_with_callback_works() { + let origin = ALICE; + let message = 1; + let request = IISMP::Get { + destination: 1_000, + height: u32::MAX, + timeout: u64::MAX, + context: vec![255u8; 64].into(), + keys: vec![vec![255u8; 32].into()].into(), + }; + let fee = U256::from(100); + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .build() + .execute_with(|| { + let commitment = get_hash(&request); + + assert_eq!( + call_precompile::(&origin, &get_1(get_1Call { request, fee, callback: callback.clone() })).unwrap(), + message + ); + + let event = GetDispatched_1 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::Ismp { commitment: c, callback: cb, message_deposit }) + if c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn get_response_works() { + let origin = ALICE; + let message = 1; + let response = b"ismp response".to_vec(); + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + IsmpResponse { + commitment: H256::default(), + message_deposit: 0, + response: BoundedVec::truncate_from(response.clone()), + }, + )]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::>(&origin, &getResponse(getResponseCall { message })) + .unwrap(), + response + ); + }); + } + + #[test] + fn poll_status_works() { + let origin = ALICE; + let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; + let messages = [ + (1, Ismp { commitment: H256::default(), callback: None, message_deposit: 0 }), + ( + 2, + IsmpResponse { + commitment: H256::default(), + message_deposit: 0, + response: BoundedVec::default(), + }, + ), + ( + 3, + IsmpTimeout { + commitment: H256::default(), + message_deposit: 0, + callback_deposit: None, + }, + ), + ]; + ExtBuilder::new() + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .build() + .execute_with(|| { + for (message, expected) in expected { + assert_eq!( + call_precompile::( + &origin, + &pollStatus(pollStatusCall { message }) + ) + .unwrap(), + expected.into() + ); + } + }); + } + + #[test] + fn post_works() { + let origin = ALICE; + let message = 1; + let request = + IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; + let fee = U256::from(100); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .build() + .execute_with(|| { + let commitment = post_hash(&request); + + assert_eq!( + call_precompile::(&origin, &post_0(post_0Call { request, fee })).unwrap(), + message + ); + + let event = PostDispatched_0 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into() }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::Ismp { commitment: c, callback, message_deposit }) + if c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn post_with_callback_works() { + let origin = ALICE; + let message = 1; + let request = + IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; + let fee = U256::from(100); + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .build() + .execute_with(|| { + let commitment = post_hash(&request); + + assert_eq!( + call_precompile::(&origin, &post_1(post_1Call { request, fee, callback: callback.clone() })).unwrap(), + message + ); + + let event = PostDispatched_1 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::Ismp { commitment: c, callback: cb, message_deposit }) + if c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn remove_works() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + IsmpResponse { + commitment: H256::default(), + message_deposit: 0, + response: BoundedVec::default(), + }, + )]) + .build() + .execute_with(|| { + assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); + }); + } + + #[test] + fn remove_many_works() { + let origin = ALICE; + let messages = 10; + let message = IsmpResponse { + commitment: H256::default(), + message_deposit: 0, + response: BoundedVec::default(), + }; + ExtBuilder::new() + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .build() + .execute_with(|| { + let messages: Vec<_> = (0..messages).collect(); + assert_ok!(call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: messages.clone() }) + )); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages }); + }); + } + + fn call_precompile::RustType>>( + origin: &AccountId, + input: &IISMPCalls, + ) -> Result { + bare_call::( + RuntimeOrigin::signed(origin.clone()), + ADDRESS.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) + } + + fn get_hash(request: &IISMP::Get) -> H256 { + keccak_256( + Request::Get(GetRequest { + source: StateMachine::Polkadot(2_000), + dest: StateMachine::Polkadot(request.destination), + nonce: pallet_ismp::Nonce::::get(), + from: ID.to_vec(), + keys: request.keys.iter().map(|key| key.to_vec()).collect(), + height: request.height as u64, + context: request.context.to_vec(), + timeout_timestamp: Timestamp::now().as_secs() + request.timeout, + }) + .encode() + .as_ref(), + ) + .into() + } + + fn post_hash(request: &IISMP::Post) -> H256 { + keccak_256( + Request::Post(PostRequest { + source: StateMachine::Polkadot(2_000), + dest: StateMachine::Polkadot(request.destination), + nonce: pallet_ismp::Nonce::::get(), + from: ID.to_vec(), + // TODO: check this is correct: https://github.com/r0gue-io/pop-node/blob/messaging-base/pallets/api/src/messaging/transports/ismp.rs#L105 + to: ID.to_vec(), + timeout_timestamp: Timestamp::now().as_secs() + request.timeout, + body: request.data.to_vec(), + }) + .encode() + .as_ref(), + ) + .into() + } +} diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs new file mode 100644 index 000000000..1548d994a --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -0,0 +1,237 @@ +pub(crate) use IMessaging::*; + +use super::*; +use crate::messaging::{ + self, + precompiles::v0::IMessaging::{ + getResponseCall, pollStatusCall, remove_0Call, remove_0Return, remove_1Call, + IMessagingCalls, + }, + Config, +}; + +sol!( + #![sol(extra_derives(Debug, PartialEq))] + "src/messaging/precompiles/interfaces/v0/IMessaging.sol" +); + +pub struct Messaging(PhantomData); +impl Precompile + for Messaging +{ + type Interface = IMessagingCalls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Fixed(NonZero::new(FIXED).expect("expected non-zero precompile address")); + + fn call( + _address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, pallet_revive::precompiles::Error> { + match input { + IMessagingCalls::getResponse(getResponseCall { message }) => { + env.charge(::WeightInfo::get_response())?; + + let response = get::((env.caller().account_id()?, message)).into(); + + Ok(getResponseCall::abi_encode_returns(&response)) + }, + IMessagingCalls::pollStatus(pollStatusCall { message }) => { + env.charge(::WeightInfo::poll_status())?; + + let status = poll_status::((env.caller().account_id()?, message)).into(); + + Ok(pollStatusCall::abi_encode_returns(&status)) + }, + IMessagingCalls::remove_0(remove_0Call { message }) => { + env.charge(::WeightInfo::remove(1))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, &[*message])?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: vec![*message] })?; + Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) + }, + IMessagingCalls::remove_1(remove_1Call { messages }) => { + let messages_len = messages + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + env.charge(::WeightInfo::remove(messages_len))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, messages)?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: messages.clone() })?; + Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) + }, + } + } +} + +impl From for IMessaging::MessageStatus { + fn from(value: messaging::MessageStatus) -> Self { + use messaging::MessageStatus::*; + match value { + NotFound => Self::NotFound, + Pending => Self::Pending, + Complete => Self::Complete, + Timeout => Self::Timeout, + } + } +} + +#[cfg(test)] +mod tests { + use ::xcm::latest::Response; + use frame_support::{assert_noop, assert_ok, weights::Weight, BoundedVec}; + use mock::{ExtBuilder, *}; + use pallet_revive::{ + precompiles::alloy::sol_types::{SolInterface, SolType}, + test_utils::ALICE, + }; + + use super::{ + super::{Message::*, MessageStatus::*}, + IMessagingCalls::*, + *, + }; + + type Error = crate::messaging::Error; + + const ADDRESS: [u8; 20] = fixed_address(MESSAGING); + + #[test] + fn get_response_works() { + let origin = ALICE; + let expected = + [(0, Vec::default()), (1, b"ismp response".to_vec()), (2, Response::Null.encode())]; + let messages = [ + ( + 1, + IsmpResponse { + commitment: H256::default(), + message_deposit: 0, + response: BoundedVec::truncate_from(b"ismp response".to_vec()), + }, + ), + (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), + ]; + ExtBuilder::new() + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .build() + .execute_with(|| { + for (message, expected) in expected { + let input = getResponse(getResponseCall { message }); + assert_eq!(call_precompile::>(&origin, &input).unwrap(), expected); + } + }); + } + + #[test] + fn poll_status_works() { + let origin = ALICE; + let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; + let messages = [ + (1, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }), + (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), + (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), + ]; + ExtBuilder::new() + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .build() + .execute_with(|| { + for (message, expected) in expected { + assert_eq!( + call_precompile::( + &origin, + &pollStatus(pollStatusCall { message }) + ) + .unwrap(), + expected.into() + ); + } + }); + } + + #[test] + fn remove_fails_when_message_pending() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .build() + .execute_with(|| { + assert_noop!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + Error::RequestPending + ); + }); + } + + #[test] + fn remove_works() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + )]) + .build() + .execute_with(|| { + assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); + }); + } + + #[test] + fn remove_many_works() { + let origin = ALICE; + let messages = 10; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + ExtBuilder::new() + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .build() + .execute_with(|| { + let messages: Vec<_> = (0..messages).collect(); + assert_ok!(call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: messages.clone() }) + )); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages }); + }); + } + + fn call_precompile::RustType>>( + origin: &AccountId, + input: &IMessagingCalls, + ) -> Result { + bare_call::( + RuntimeOrigin::signed(origin.clone()), + ADDRESS.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) + } +} diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm.rs b/pallets/api-vnext/src/messaging/precompiles/xcm.rs new file mode 100644 index 000000000..6a16df035 --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/xcm.rs @@ -0,0 +1,4 @@ +use super::*; + +/// The first version of the XCM messaging API. +pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs new file mode 100644 index 000000000..0fd528b4d --- /dev/null +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -0,0 +1,480 @@ +use ::xcm::{VersionedLocation, VersionedXcm, MAX_XCM_DECODE_DEPTH}; +use codec::{DecodeAll, DecodeLimit}; +use pallet_xcm::WeightInfo as _; +use sp_runtime::traits::{Block, Header}; +pub(crate) use IXCM::*; + +use super::*; +use crate::messaging::{transports::xcm::new_query, Config}; + +sol!( + #![sol(extra_derives(Debug, PartialEq))] + "src/messaging/precompiles/interfaces/v0/IXCM.sol" +); + +type BlockNumberOf = <<::Block as Block>::Header as Header>::Number; + +/// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus +/// Messaging (XCM). +pub struct Xcm(PhantomData); +impl< + const FIXED: u16, + T: frame_system::Config + pallet_revive::Config + pallet_xcm::Config + Config, + > Precompile for Xcm +where + BlockNumberOf: From, + u32: From>, +{ + type Interface = IXCMCalls; + type T = T; + + const HAS_CONTRACT_INFO: bool = false; + const MATCHER: AddressMatcher = + Fixed(NonZero::new(FIXED).expect("expected non-zero precompile address")); + + fn call( + _address: &[u8; 20], + input: &Self::Interface, + env: &mut impl Ext, + ) -> Result, pallet_revive::precompiles::Error> { + match input { + IXCMCalls::blockNumber(blockNumberCall {}) => { + env.charge(::WeightInfo::block_number())?; + + let block_number = u32::from(frame_system::Pallet::::block_number()); + + Ok(blockNumberCall::abi_encode_returns(&block_number)) + }, + IXCMCalls::execute(executeCall { message, weight }) => { + // Based on https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/precompiles.rs + let weight = weight.into(); + let charged = env.charge(weight)?; + let message = VersionedXcm::decode_all_with_depth_limit( + MAX_XCM_DECODE_DEPTH, + &mut &message[..], + ) + .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .into(); + + let result = >::execute( + ::RuntimeOrigin::signed( + env.caller().account_id()?.clone(), + ), + message, + weight, + ); + + if let Ok(result) = result { + // Adjust weight + if let Some(actual_weight) = result.actual_weight { + // TODO: replace with `env.adjust_gas(charged, result.weight);` once + // #8693 lands + env.gas_meter_mut() + .adjust_gas(charged, RuntimeCosts::Precompile(actual_weight)); + } + } + + Ok(executeCall::abi_encode_returns(&result.encode().into())) + }, + IXCMCalls::getResponse(getResponseCall { message }) => { + env.charge(::WeightInfo::get_response())?; + + let response = get::((env.caller().account_id()?, message)).into(); + + Ok(getResponseCall::abi_encode_returns(&response)) + }, + IXCMCalls::newQuery_0(newQuery_0Call { responder, timeout }) => { + env.charge(::WeightInfo::xcm_new_query(0))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let location = Location::decode(&mut &responder[..]) + .map_err(|_| pallet_revive::Error::::DecodingFailed)?; + + let (id, query_id) = new_query::(origin, location, (*timeout).into(), None)?; + + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, QueryCreated_0 { account, id, queryId: query_id })?; + Ok(newQuery_0Call::abi_encode_returns(&id)) + }, + IXCMCalls::newQuery_1(newQuery_1Call { responder, timeout, callback }) => { + env.charge(::WeightInfo::xcm_new_query(1))?; + let origin = env.caller(); + let origin = origin.account_id()?; + let location = Location::decode(&mut &responder[..]) + .map_err(|_| pallet_revive::Error::::DecodingFailed)?; + + let (id, query_id) = + new_query::(origin, location, (*timeout).into(), Some(callback.into()))?; + + let account = AddressMapper::::to_address(origin).0.into(); + let event = + QueryCreated_1 { account, id, callback: callback.clone(), queryId: query_id }; + deposit_event(env, event)?; + Ok(newQuery_0Call::abi_encode_returns(&id)) + }, + IXCMCalls::pollStatus(pollStatusCall { message }) => { + env.charge(::WeightInfo::poll_status())?; + + let status = poll_status::((env.caller().account_id()?, message)).into(); + + Ok(pollStatusCall::abi_encode_returns(&status)) + }, + IXCMCalls::remove_0(remove_0Call { message }) => { + env.charge(::WeightInfo::remove(1))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, &[*message])?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: vec![*message] })?; + Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) + }, + IXCMCalls::remove_1(remove_1Call { messages }) => { + let messages_len = messages + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + env.charge(::WeightInfo::remove(messages_len))?; + let origin = env.caller(); + let origin = origin.account_id()?; + + remove::(origin, messages)?; + + // TODO: is the precompile emitting the event, or the pallet + let account = AddressMapper::::to_address(origin).0.into(); + deposit_event(env, Removed { account, messages: messages.clone() })?; + Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) + }, + IXCMCalls::send(sendCall { destination, message }) => { + // Based on https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/precompiles.rs + env.charge(::WeightInfo::send())?; + let destination = VersionedLocation::decode_all(&mut &destination[..]) + .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .into(); + let message = VersionedXcm::decode_all_with_depth_limit( + MAX_XCM_DECODE_DEPTH, + &mut &message[..], + ) + .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .into(); + + let result = >::send( + ::RuntimeOrigin::signed( + env.caller().account_id()?.clone(), + ), + destination, + message, + ); + + Ok(sendCall::abi_encode_returns(&result.encode().into())) + }, + } + } +} + +impl From<&Callback> for super::Callback { + fn from(callback: &Callback) -> Self { + Self::new( + (*callback.destination.0).into(), + (&callback.encoding).into(), + callback.selector.0, + (&callback.weight).into(), + ) + } +} + +impl From<&Encoding> for super::Encoding { + fn from(encoding: &Encoding) -> Self { + match encoding { + Encoding::Scale => Self::Scale, + Encoding::SolidityAbi => Self::SolidityAbi, + // TODO + Encoding::__Invalid => unimplemented!(), + } + } +} + +impl From for self::MessageStatus { + fn from(value: messaging::MessageStatus) -> Self { + use messaging::MessageStatus::*; + match value { + NotFound => Self::NotFound, + Pending => Self::Pending, + Complete => Self::Complete, + Timeout => Self::Timeout, + } + } +} + +impl From<&Weight> for super::Weight { + fn from(weight: &Weight) -> Self { + Self::from_parts(weight.refTime, weight.proofSize) + } +} + +impl From for Weight { + fn from(weight: super::Weight) -> Self { + Self { refTime: weight.ref_time(), proofSize: weight.proof_size() } + } +} + +#[cfg(test)] +mod tests { + use ::xcm::{ + latest::{Junction::Parachain, Response, Xcm}, + v5::WeightLimit, + }; + use frame_support::{assert_ok, dispatch::PostDispatchInfo, weights::Weight}; + use mock::{messaging::RESPONSE_LOCATION, ExtBuilder, *}; + use pallet_revive::{ + precompiles::alloy::sol_types::{SolInterface, SolType}, + test_utils::ALICE, + }; + use pallet_xcm::ExecutionError; + + use super::{super::Message::*, IXCMCalls::*, MessageStatus::*, *}; + + type Messages = crate::messaging::Messages; + + const ADDRESS: [u8; 20] = fixed_address(XCM); + const MESSAGE_DEPOSIT: u128 = 129_720; + + #[test] + fn block_number_works() { + let origin = ALICE; + let block_number = 1; + ExtBuilder::new().build().execute_with(|| { + assert_eq!( + call_precompile::(&origin, &blockNumber(blockNumberCall {})).unwrap(), + block_number + ); + }); + } + + #[test] + fn execute_works() { + let origin = ALICE; + let asset = (Location::here(), 100); + let xcm = Xcm::<()>::builder() + .withdraw_asset(asset.clone()) + .buy_execution(asset, WeightLimit::Unlimited) + .build(); + let versioned_xcm = VersionedXcm::V5(xcm); + let message = versioned_xcm.encode().into(); + let weight = Weight::from_parts(100_000, 100_000).into(); + ExtBuilder::new().build().execute_with(|| { + let call = execute(executeCall { message, weight }); + let response = call_precompile::>(&origin, &call).unwrap(); + let result = Result::::decode( + &mut response.as_slice(), + ) + .unwrap(); + + // No xcm-executor currently configured in mock runtime + assert_eq!( + result, + Err(DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some(Weight::from_parts(100_000_000, 0)), + pays_fee: Pays::Yes + }, + error: pallet_xcm::Error::::LocalExecutionIncompleteWithError { + index: 0, + error: ExecutionError::Unimplemented + } + .into() + }) + ); + }); + } + + #[test] + fn get_response_works() { + let origin = ALICE; + let message = 1; + let response = Response::Null; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmResponse { query_id: 0, message_deposit: 0, response: response.clone() }, + )]) + .build() + .execute_with(|| { + assert_eq!( + call_precompile::>(&origin, &getResponse(getResponseCall { message })) + .unwrap(), + response.encode() + ); + }); + } + + #[test] + fn new_query_works() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 100; + let message = 1; + let query_id = 2; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .with_query_id(query_id) + .build() + .execute_with(|| { + let call = newQuery_0(newQuery_0Call { responder, timeout }); + assert_eq!( + call_precompile::(&origin,&call).unwrap(), + message + ); + + let account = to_address(&origin).0.into(); + let event = QueryCreated_0 { account, id: message, queryId: query_id }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::XcmQuery { query_id: id, callback, message_deposit }) + if id == query_id && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn new_query_with_callback_works() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 100; + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + let message = 1; + let query_id = 2; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit + .with_message_id(&origin, message) + .with_query_id(query_id) + .build() + .execute_with(|| { + let call = newQuery_1(newQuery_1Call { responder, timeout, callback: callback.clone() }); + assert_eq!( + call_precompile::(&origin, &call).unwrap(), + message + ); + + let account = to_address(&origin).0.into(); + let event = QueryCreated_1 { account, id: message, queryId: query_id, callback: callback.clone() }; + assert_last_event(ADDRESS, event); + assert!(matches!( + Messages::get(&origin, message), + Some(Message::XcmQuery { query_id: id, callback: cb, message_deposit }) + if id == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + ); + }); + } + + #[test] + fn poll_status_works() { + let origin = ALICE; + let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; + let messages = [ + (1, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }), + (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), + (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), + ]; + ExtBuilder::new() + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .build() + .execute_with(|| { + for (message, expected) in expected { + assert_eq!( + call_precompile::( + &origin, + &pollStatus(pollStatusCall { message }) + ) + .unwrap(), + expected.into() + ); + } + }); + } + + #[test] + fn remove_works() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + )]) + .build() + .execute_with(|| { + assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); + }); + } + + #[test] + fn remove_many_works() { + let origin = ALICE; + let messages = 10; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + ExtBuilder::new() + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .build() + .execute_with(|| { + let messages: Vec<_> = (0..messages).collect(); + assert_ok!(call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: messages.clone() }) + )); + + let account = to_address(&origin).0.into(); + assert_last_event(ADDRESS, Removed { account, messages }); + }); + } + + #[test] + fn send_works() { + let origin = ALICE; + let destination = Location::new(1, [Parachain(1000).into()]); + let versioned_location = VersionedLocation::V5(destination); + let destination = versioned_location.encode().into(); + let asset = (Location::here(), 100); + let xcm = Xcm::<()>::builder() + .withdraw_asset(asset.clone()) + .buy_execution(asset, WeightLimit::Unlimited) + .build(); + let versioned_xcm = VersionedXcm::V5(xcm); + let message = versioned_xcm.encode().into(); + ExtBuilder::new().build().execute_with(|| { + let call = send(sendCall { destination, message }); + let response = call_precompile::>(&origin, &call).unwrap(); + let result = Result::<(), DispatchError>::decode(&mut response.as_slice()).unwrap(); + // No xcm router currently configured in mock runtime + assert_eq!(result, Err(pallet_xcm::Error::::Unreachable.into())); + }); + } + + fn call_precompile::RustType>>( + origin: &AccountId, + input: &IXCMCalls, + ) -> Result { + bare_call::( + RuntimeOrigin::signed(origin.clone()), + ADDRESS.into(), + 0, + Weight::MAX, + DepositLimit::Balance(u128::MAX), + input.abi_encode(), + ) + } +} diff --git a/pallets/api-vnext/src/messaging/transports.rs b/pallets/api-vnext/src/messaging/transports.rs new file mode 100644 index 000000000..3053ef330 --- /dev/null +++ b/pallets/api-vnext/src/messaging/transports.rs @@ -0,0 +1,6 @@ +use super::*; + +/// Messaging using the Interoperable State Machine Protocol (ISMP). +pub mod ismp; +/// Messaging using Polkadot's Cross-Consensus Messaging (XCM). +pub mod xcm; diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs new file mode 100644 index 000000000..61844d07d --- /dev/null +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -0,0 +1,291 @@ +pub(crate) use ::ismp::dispatcher::{FeeMetadata, IsmpDispatcher}; +use ::ismp::{ + dispatcher::{ + DispatchGet, DispatchPost, + DispatchRequest::{self}, + }, + messaging::hash_request, + module::IsmpModule, + router::{GetResponse, PostRequest, PostResponse, Request, Response, Timeout}, +}; +use frame_support::{ + ensure, + pallet_prelude::Weight, + traits::{fungible::MutateHold, tokens::Precision::Exact, Get as _}, +}; +use pallet_ismp::weights::IsmpModuleWeight; + +use super::*; + +type DbWeightOf = ::DbWeight; + +pub const ID: [u8; 3] = *b"pop"; + +/// Submit a new ISMP `Get` request. +/// +/// This sends a `Get` request through ISMP, optionally with a callback to handle the +/// response. +/// +/// # Parameters +/// - `origin`: The account submitting the request. +/// - `message`: The ISMP `Get` message containing query details. +/// - `fee`: The fee to be paid to relayers. +/// - `callback`: Optional callback to execute upon receiving a response. +/// +/// # Returns +/// A unique identifier for the message. +pub(crate) fn get( + origin: &T::AccountId, + message: DispatchGet, + fee: BalanceOf, + callback: Option, +) -> Result<(MessageId, H256), DispatchError> { + // Take deposits and fees. + let message_deposit = + calculate_protocol_deposit::(ProtocolStorageDeposit::IsmpRequests) + .saturating_add(calculate_message_deposit::()) + // TODO: include length of `DispatchGet` as own `Get` no longer required + // .saturating_add(calculate_deposit_of::>()) + ; + + T::Fungibles::hold(&HoldReason::Messaging.into(), &origin, message_deposit)?; + + if let Some(cb) = callback.as_ref() { + T::Fungibles::hold( + &HoldReason::CallbackGas.into(), + &origin, + T::WeightToFee::weight_to_fee(&cb.weight), + )?; + } + + // Process message by dispatching request via ISMP. + let commitment = match T::IsmpDispatcher::default() + .dispatch_request(DispatchRequest::Get(message), FeeMetadata { payer: origin.clone(), fee }) + { + Ok(commitment) => Ok::(commitment), + Err(e) => { + if let Ok(err) = e.downcast::<::ismp::Error>() { + log::error!("ISMP Dispatch failed!! {:?}", err); + } + return Err(Error::::IsmpDispatchFailed.into()); + }, + }?; + // Store commitment for lookup on response, message for querying, + // response/timeout handling. + let id = next_message_id::(origin)?; + IsmpRequests::::insert(commitment, (&origin, id)); + Messages::::insert(&origin, id, Message::Ismp { commitment, callback, message_deposit }); + Ok((id, commitment)) +} + +/// Submit a new ISMP `Post` request. +/// +/// Sends a `Post` message through ISMP with arbitrary data and an optional callback. +/// +/// # Parameters +/// - `origin`: The account submitting the request. +/// - `message`: The ISMP `Post` message containing the payload. +/// - `fee`: The fee to be paid to relayers. +/// - `callback`: Optional callback to execute upon receiving a response. +/// +/// # Returns +/// A unique identifier for the message. +pub(crate) fn post( + origin: &T::AccountId, + message: DispatchPost, + fee: BalanceOf, + callback: Option, +) -> Result<(MessageId, H256), DispatchError> { + // Take deposits and fees. + let message_deposit = + calculate_protocol_deposit::(ProtocolStorageDeposit::IsmpRequests) + .saturating_add(calculate_message_deposit::()) + // TODO: include length of `DispatchGet` as own `Get` no longer required + // .saturating_add(calculate_deposit_of::>()) + ; + + T::Fungibles::hold(&HoldReason::Messaging.into(), origin, message_deposit)?; + + if let Some(cb) = callback.as_ref() { + T::Fungibles::hold( + &HoldReason::CallbackGas.into(), + origin, + T::WeightToFee::weight_to_fee(&cb.weight), + )?; + } + + // Process message by dispatching request via ISMP. + let commitment = T::IsmpDispatcher::default() + .dispatch_request( + DispatchRequest::Post(message), + FeeMetadata { payer: origin.clone(), fee }, + ) + .map_err(|_| Error::::IsmpDispatchFailed)?; + + // Store commitment for lookup on response, message for querying, + // response/timeout handling. + let id = next_message_id::(origin)?; + IsmpRequests::::insert(commitment, (origin, id)); + Messages::::insert(origin, id, Message::Ismp { commitment, callback, message_deposit }); + Ok((id, commitment)) +} + +pub(crate) fn process_response( + commitment: &H256, + response_data: &impl Encode, + event: impl Fn(AccountIdOf, MessageId) -> Event, +) -> Result<(), anyhow::Error> { + ensure!( + response_data.encoded_size() <= T::MaxResponseLen::get() as usize, + ::ismp::Error::Custom("Response length exceeds maximum allowed length.".into()) + ); + + let (initiating_origin, id) = IsmpRequests::::get(commitment) + .ok_or(::ismp::Error::Custom("Request not found.".into()))?; + + let Some(super::super::Message::Ismp { commitment, callback, message_deposit }) = + Messages::::get(&initiating_origin, id) + else { + return Err(::ismp::Error::Custom("Message must be an ismp request.".into()).into()); + }; + + // Deposit that the message has been recieved before a potential callback execution. + Pallet::::deposit_event(event(initiating_origin.clone(), id)); + + // Attempt callback with result if specified. + if let Some(callback) = callback { + if call::(&initiating_origin, callback, &id, response_data).is_ok() { + // Clean storage, return deposit + Messages::::remove(&initiating_origin, id); + IsmpRequests::::remove(commitment); + T::Fungibles::release( + &HoldReason::Messaging.into(), + &initiating_origin, + message_deposit, + Exact, + ) + .map_err(|_| ::ismp::Error::Custom("failed to release message deposit.".into()))?; + + return Ok(()); + } + } + + // No callback or callback error: store response for manual retrieval and removal. + let encoded_response: BoundedVec = response_data + .encode() + .try_into() + .map_err(|_| ::ismp::Error::Custom("response exceeds max".into()))?; + Messages::::insert( + &initiating_origin, + id, + super::super::Message::IsmpResponse { + commitment, + message_deposit, + response: encoded_response, + }, + ); + Ok(()) +} + +pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), anyhow::Error> { + let key = IsmpRequests::::get(commitment).ok_or(::ismp::Error::Custom( + "Request commitment not found while processing timeout.".into(), + ))?; + Messages::::try_mutate(key.0, key.1, |message| { + let Some(super::super::Message::Ismp { commitment, message_deposit, callback }) = message + else { + return Err(::ismp::Error::Custom("Invalid message".into())); + }; + let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); + *message = Some(super::super::Message::IsmpTimeout { + message_deposit: *message_deposit, + commitment: *commitment, + callback_deposit, + }); + Ok(()) + })?; + + crate::messaging::Pallet::::deposit_event(Event::::IsmpTimedOut { + commitment: *commitment, + }); + Ok(()) +} + +pub struct Handler(PhantomData); +impl Default for Handler { + fn default() -> Self { + Self::new() + } +} + +impl Handler { + pub fn new() -> Self { + Self(PhantomData) + } +} + +impl IsmpModule for Handler { + fn on_accept(&self, _request: PostRequest) -> Result<(), anyhow::Error> { + Ok(()) + } + + fn on_response(&self, response: Response) -> Result<(), anyhow::Error> { + // Hash request to determine key for message lookup. + match response { + Response::Get(GetResponse { get, values }) => { + log::debug!(target: "pop-api::extension", "StorageValue={:?}", values); + let commitment = hash_request::(&Request::Get(get)); + process_response(&commitment, &values, |dest, id| { + Event::::IsmpGetResponseReceived { dest, id, commitment } + }) + }, + Response::Post(PostResponse { post, response, .. }) => { + let commitment = hash_request::(&Request::Post(post)); + process_response(&commitment, &response, |dest, id| { + Event::::IsmpPostResponseReceived { dest, id, commitment } + }) + }, + } + } + + fn on_timeout(&self, timeout: Timeout) -> Result<(), anyhow::Error> { + match timeout { + Timeout::Request(request) => { + // hash request to determine key for original request id lookup + let commitment = hash_request::(&request); + timeout_commitment::(&commitment) + }, + Timeout::Response(PostResponse { post, .. }) => { + let commitment = hash_request::(&Request::Post(post)); + timeout_commitment::(&commitment) + }, + } + } +} + +impl IsmpModuleWeight for Pallet { + // Static as not in use. + fn on_accept(&self, _request: &PostRequest) -> Weight { + DbWeightOf::::get().reads_writes(1, 1) + } + + fn on_timeout(&self, timeout: &Timeout) -> Weight { + let x = match timeout { + Timeout::Request(Request::Post(_)) => 0u32, + Timeout::Request(Request::Get(_)) => 1u32, + Timeout::Response(_) => 2u32, + }; + T::WeightInfo::ismp_on_timeout(x) + } + + // todo: test + fn on_response(&self, response: &Response) -> Weight { + let x = match response { + Response::Get(_) => 1, + Response::Post(_) => 0, + }; + + T::WeightInfo::ismp_on_response(x).saturating_add(T::CallbackExecutor::execution_weight()) + // Also add actual weight consumed by contract env. + } +} diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs new file mode 100644 index 000000000..ca4e0734f --- /dev/null +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -0,0 +1,96 @@ +pub(crate) use ::xcm::latest::{Location, QueryId, Response}; +use xcm_builder::QueryControllerWeightInfo; + +use super::*; +use crate::messaging::{pallet::Call, BlockNumberOf, Config}; + +/// Initiate a new XCM query. +/// +/// Starts a query using the XCM interface, specifying a responder and timeout block. +/// +/// # Parameters +/// - `origin`: The account initiating the query. +/// - `id`: A unique message ID. +/// - `responder`: Location of the XCM responder. +/// - `timeout`: Block number after which the query should timeout. +/// - `callback`: Optional callback for handling the response. +/// +/// # Returns +/// A unique identifier for the message. +pub(crate) fn new_query( + origin: &T::AccountId, + responder: Location, + timeout: BlockNumberOf, + callback: Option, +) -> Result<(MessageId, QueryId), DispatchError> { + let querier_location = + T::OriginConverter::try_convert(T::RuntimeOrigin::signed(origin.clone())) + .map_err(|_| Error::::OriginConversionFailed)?; + + let current_block = frame_system::Pallet::::block_number(); + ensure!(current_block < timeout, Error::::FutureTimeoutMandatory); + + let id = next_message_id::(origin)?; + XcmQueryTimeouts::::try_mutate(current_block.saturating_add(timeout), |bounded_vec| { + bounded_vec + .try_push((origin.clone(), id)) + .map_err(|_| Error::::MaxMessageTimeoutPerBlockReached) + })?; + + // Take deposits and fees. + let message_deposit = + calculate_protocol_deposit::(ProtocolStorageDeposit::XcmQueries) + .saturating_add(calculate_message_deposit::()); + T::Fungibles::hold(&HoldReason::Messaging.into(), &origin, message_deposit)?; + + let mut callback_execution_weight = Weight::zero(); + + if let Some(cb) = callback.as_ref() { + T::Fungibles::hold( + &HoldReason::CallbackGas.into(), + &origin, + T::WeightToFee::weight_to_fee(&cb.weight), + )?; + + callback_execution_weight = T::CallbackExecutor::execution_weight(); + } + + let response_prepayment_amount = T::WeightToFee::weight_to_fee( + &T::WeightInfo::xcm_response().saturating_add(callback_execution_weight), + ); + + let credit = T::Fungibles::withdraw( + &origin, + response_prepayment_amount, + Precision::Exact, + Preservation::Preserve, + Fortitude::Polite, + )?; + + T::FeeHandler::on_unbalanced(credit); + + // Process message by creating new query via XCM. + // Xcm only uses/stores pallet, index - i.e. (u8,u8), hence the fields in xcm_response + // are ignored. + let notify = Call::::xcm_response { query_id: 0, xcm_response: Default::default() }; + let query_id = T::Xcm::new_notify_query(responder, notify, timeout, querier_location); + + // Store query id for later lookup on response, message for querying status, + // response/timeout handling. + XcmQueries::::insert(query_id, (&origin, id)); + Messages::::insert(&origin, id, Message::XcmQuery { query_id, callback, message_deposit }); + Ok((id, query_id)) +} + +/// A handler for the creation of a XCM query notification. +pub trait NotifyQueryHandler { + type WeightInfo: QueryControllerWeightInfo; + /// Attempt to create a new query ID and register it as a query that is yet to respond, and + /// which will call a dispatchable when a response happens. + fn new_notify_query( + responder: impl Into, + notify: Call, + timeout: BlockNumberOf, + match_querier: impl Into, + ) -> QueryId; +} diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs new file mode 100644 index 000000000..81f1d16e1 --- /dev/null +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -0,0 +1,61 @@ +use frame_support::pallet_prelude::Weight; + +pub trait WeightInfo { + fn block_number() -> Weight; + fn get_response() -> Weight; + fn poll_status() -> Weight; + fn remove(x: u32) -> Weight; + fn xcm_new_query(x: u32) -> Weight; + fn xcm_response() -> Weight; + fn ismp_on_response(x: u32) -> Weight; + fn ismp_on_timeout(x: u32) -> Weight; + fn ismp_get(x: u32, y: u32, a: u32) -> Weight; + fn ismp_post(x: u32, y: u32) -> Weight; + fn top_up_callback_weight() -> Weight; +} + +impl WeightInfo for () { + fn block_number() -> Weight { + Default::default() + } + + fn get_response() -> Weight { + Default::default() + } + + fn poll_status() -> Weight { + Default::default() + } + + fn remove(_x: u32) -> Weight { + Default::default() + } + + fn xcm_new_query(_x: u32) -> Weight { + Default::default() + } + + fn xcm_response() -> Weight { + Default::default() + } + + fn ismp_on_response(_x: u32) -> Weight { + Default::default() + } + + fn ismp_on_timeout(_x: u32) -> Weight { + Default::default() + } + + fn ismp_get(_x: u32, _y: u32, _a: u32) -> Weight { + Default::default() + } + + fn ismp_post(_x: u32, _y: u32) -> Weight { + Default::default() + } + + fn top_up_callback_weight() -> Weight { + Default::default() + } +} diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 1c8b74ef0..d8881eed9 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -1,8 +1,11 @@ use codec::Compact; use frame_support::{ derive_impl, + pallet_prelude::ConstU32, + parameter_types, sp_runtime::{traits::AccountIdLookup, AccountId32, BuildStorage}, traits::{AsEnsureOriginWithArg, Get}, + PalletId, }; use frame_system::{EnsureRoot, EnsureSigned}; use pallet_assets::AutoIncAssetId; @@ -12,14 +15,20 @@ use super::fungibles; pub(crate) type AccountId = AccountId32; pub(crate) type Balance = u128; -type Block = frame_system::mocking::MockBlock; +type Block = frame_system::mocking::MockBlockU32; pub(crate) type ExistentialDeposit = ::ExistentialDeposit; // For terminology in tests. pub(crate) type TokenId = u32; pub(crate) const ERC20: u16 = 2; pub(crate) const FUNGIBLES: u16 = 1; +#[cfg(feature = "messaging")] +pub(crate) const ISMP: u16 = 4; +#[cfg(feature = "messaging")] +pub(crate) const MESSAGING: u16 = 3; pub(crate) const UNIT: Balance = 10_000_000_000; +#[cfg(feature = "messaging")] +pub(crate) const XCM: u16 = 5; #[frame_support::runtime] mod runtime { @@ -45,11 +54,21 @@ mod runtime { #[runtime::pallet_index(2)] pub type Contracts = pallet_revive::Pallet; #[runtime::pallet_index(3)] - pub type System = frame_system::Pallet; + pub type Fungibles = fungibles::Pallet; #[runtime::pallet_index(4)] - pub type Timestamp = pallet_timestamp::Pallet; + #[runtime::disable_unsigned] + #[cfg(feature = "messaging")] + pub type Ismp = pallet_ismp::Pallet; #[runtime::pallet_index(5)] - pub type Fungibles = fungibles::Pallet; + #[cfg(feature = "messaging")] + pub type Messaging = crate::messaging::Pallet; + #[runtime::pallet_index(6)] + pub type System = frame_system::Pallet; + #[runtime::pallet_index(7)] + pub type Timestamp = pallet_timestamp::Pallet; + #[runtime::pallet_index(8)] + #[cfg(feature = "messaging")] + pub type Xcm = pallet_xcm::Pallet; } #[derive_impl(pallet_assets::config_preludes::TestDefaultConfig)] @@ -76,11 +95,218 @@ impl pallet_revive::Config for Test { type Precompiles = ( fungibles::precompiles::v0::Fungibles, fungibles::precompiles::erc20::v0::Erc20, + messaging::precompiles::v0::Messaging, + messaging::precompiles::ismp::v0::Ismp, + messaging::precompiles::xcm::v0::Xcm, ); type Time = Timestamp; type UploadOrigin = EnsureSigned; } +impl fungibles::Config for Test { + type WeightInfo = (); +} + +#[cfg(feature = "messaging")] +pub(super) mod messaging { + use ::ismp::{host::StateMachine, module::IsmpModule, router::IsmpRouter}; + use ::xcm::latest::{ + InteriorLocation, Junction, Junction::Parachain, Junctions, Location, NetworkId, + }; + use frame_support::{ + dispatch::PostDispatchInfo, + pallet_prelude::{DispatchResultWithPostInfo, EnsureOrigin, Pays, Weight}, + traits::{tokens::imbalance::ResolveTo, Everything, NeverEnsureOrigin, OriginTrait}, + weights::WeightToFee, + }; + use frame_system::EnsureRoot; + use sp_runtime::traits::{AccountIdConversion, TryConvert}; + use xcm_builder::{EnsureXcmOrigin, FixedWeightBounds, SignedToAccountId32}; + + use super::*; + pub(super) use crate::messaging::*; + use crate::{messaging::transports::xcm::NotifyQueryHandler, H160}; + + pub(crate) const RESPONSE_LOCATION: Location = + Location { parents: 1, interior: Junctions::Here }; + + parameter_types! { + pub const MaxInstructions: u32 = 100; + pub const MaxXcmQueryTimeoutsPerBlock: u32 = 10; + pub const OnChainByteFee: Balance = 10; + pub const OffChainByteFee: Balance = 5; + pub const RelayNetwork: Option = Some(NetworkId::Polkadot); + pub Treasury: AccountId = PalletId(*b"py/trsry").into_account_truncating(); + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); + pub UniversalLocation: InteriorLocation = Parachain(2_000).into(); + } + + impl pallet_ismp::Config for Test { + type AdminOrigin = EnsureRoot; + type Balance = Balance; + type ConsensusClients = (); + type Coprocessor = Coprocessor; + type Currency = Balances; + type HostStateMachine = HostStateMachine; + type OffchainDB = (); + type Router = AlwaysErrorRouter; + type RuntimeEvent = RuntimeEvent; + type TimestampProvider = Timestamp; + type WeightProvider = (); + } + + #[derive(Default)] + pub struct AlwaysErrorRouter; + impl IsmpRouter for AlwaysErrorRouter { + fn module_for_id(&self, _bytes: Vec) -> Result, anyhow::Error> { + Err(anyhow::anyhow!("not implemented")) + } + } + + pub struct Coprocessor; + impl Get> for Coprocessor { + fn get() -> Option { + Some(HostStateMachine::get()) + } + } + + pub struct HostStateMachine; + impl Get for HostStateMachine { + fn get() -> StateMachine { + StateMachine::Polkadot(2000) + } + } + + impl crate::messaging::Config for Test { + type CallbackExecutor = AlwaysSuccessfullCallbackExecutor; + type FeeHandler = ResolveTo; + type Fungibles = Balances; + type IsmpDispatcher = pallet_ismp::Pallet; + type Keccak256 = Ismp; + type MaxContextLen = ConstU32<64>; + type MaxDataLen = ConstU32<1024>; + type MaxKeyLen = ConstU32<32>; + type MaxKeys = ConstU32<10>; + type MaxRemovals = ConstU32<1024>; + type MaxResponseLen = ConstU32<1024>; + type MaxXcmQueryTimeoutsPerBlock = MaxXcmQueryTimeoutsPerBlock; + type OffChainByteFee = OffChainByteFee; + type OnChainByteFee = OnChainByteFee; + type OriginConverter = AccountToLocation; + type RuntimeHoldReason = RuntimeHoldReason; + type WeightInfo = (); + type WeightToFee = RefTimePlusProofTime; + type Xcm = QueryHandler; + type XcmResponseOrigin = EnsureRootWithResponseSuccess; + } + + pub struct AccountToLocation; + impl TryConvert for AccountToLocation { + fn try_convert(origin: RuntimeOrigin) -> Result { + let signer = origin.into_signer(); + let l = Junctions::from(Junction::AccountId32 { + network: None, + id: signer.expect("No account id, required.").into(), + }) + .into_location(); + Ok(l) + } + } + + /// Will return half of the weight in the post info. + /// Mocking a successfull execution, with refund. + pub struct AlwaysSuccessfullCallbackExecutor(T); + impl CallbackExecutor for AlwaysSuccessfullCallbackExecutor { + fn execute( + _account: &::AccountId, + _contract: H160, + _data: Vec, + weight: sp_runtime::Weight, + ) -> frame_support::dispatch::DispatchResultWithPostInfo { + DispatchResultWithPostInfo::Ok(PostDispatchInfo { + actual_weight: Some(weight / 2), + pays_fee: Pays::Yes, + }) + } + + // Will be used for prepayment of response fees. + fn execution_weight() -> Weight { + Weight::from_parts(100_000u64, 100_000u64) + } + } + + pub struct EnsureRootWithResponseSuccess; + impl EnsureOrigin for EnsureRootWithResponseSuccess { + type Success = Location; + + fn try_origin(o: RuntimeOrigin) -> Result { + if EnsureRoot::::ensure_origin(o.clone()).is_ok() { + Ok(RESPONSE_LOCATION) + } else { + Err(o) + } + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(RuntimeOrigin::root()) + } + } + + pub struct QueryHandler; + impl NotifyQueryHandler for QueryHandler { + type WeightInfo = pallet_xcm::Pallet; + + fn new_notify_query( + responder: impl Into, + notify: messaging::Call, + timeout: u32, + match_querier: impl Into, + ) -> u64 { + Xcm::new_notify_query(responder, notify, timeout, match_querier) + } + } + + pub struct RefTimePlusProofTime; + impl WeightToFee for RefTimePlusProofTime { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + (weight.ref_time() + weight.proof_size()) as u128 + } + } + + type LocalOriginToLocation = SignedToAccountId32; + + impl pallet_xcm::Config for Test { + type AdminOrigin = NeverEnsureOrigin<()>; + type AdvertisedXcmVersion = (); + type AuthorizedAliasConsideration = (); + type Currency = Balances; + type CurrencyMatcher = (); + type ExecuteXcmOrigin = EnsureXcmOrigin; + type MaxLockers = (); + type MaxRemoteLockConsumers = (); + type RemoteLockConsumerIdentifier = (); + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type SendXcmOrigin = EnsureXcmOrigin; + type SovereignAccountOf = (); + type TrustedLockers = (); + type UniversalLocation = UniversalLocation; + type Weigher = FixedWeightBounds; + type WeightInfo = pallet_xcm::TestWeightInfo; + type XcmExecuteFilter = Everything; + type XcmExecutor = (); + type XcmReserveTransferFilter = (); + type XcmRouter = (); + type XcmTeleportFilter = (); + + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 0; + } +} + #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; @@ -92,15 +318,17 @@ impl frame_system::Config for Test { #[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)] impl pallet_timestamp::Config for Test {} -impl fungibles::Config for Test { - type WeightInfo = (); -} - pub(crate) struct ExtBuilder { assets: Option>, asset_accounts: Option>, asset_metadata: Option, Vec, u8)>>, balances: Vec<(AccountId, Balance)>, + #[cfg(feature = "messaging")] + messages: Option)>>, + #[cfg(feature = "messaging")] + next_message_id: Option<(AccountId, messaging::MessageId)>, + #[cfg(feature = "messaging")] + query_id: Option, } impl ExtBuilder { pub(crate) fn new() -> Self { @@ -109,6 +337,12 @@ impl ExtBuilder { asset_accounts: None, asset_metadata: None, balances: vec![(ALICE, ExistentialDeposit::get())], + #[cfg(feature = "messaging")] + messages: None, + #[cfg(feature = "messaging")] + next_message_id: None, + #[cfg(feature = "messaging")] + query_id: None, } } @@ -138,6 +372,27 @@ impl ExtBuilder { self } + #[cfg(feature = "messaging")] + pub(crate) fn with_messages( + mut self, + messages: Vec<(AccountId, messaging::MessageId, messaging::Message)>, + ) -> Self { + self.messages = Some(messages); + self + } + + #[cfg(feature = "messaging")] + pub(crate) fn with_message_id(mut self, origin: &AccountId, id: messaging::MessageId) -> Self { + self.next_message_id = Some((origin.clone(), id)); + self + } + + #[cfg(feature = "messaging")] + pub(crate) fn with_query_id(mut self, query_id: ::xcm::latest::QueryId) -> Self { + self.query_id = Some(query_id); + self + } + pub(crate) fn build(mut self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); @@ -155,7 +410,32 @@ impl ExtBuilder { .unwrap(); let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); + ext.execute_with(|| { + System::set_block_number(1); + + #[cfg(feature = "messaging")] + { + if let Some(messages) = self.messages.take() { + for (account, id, message) in messages { + messaging::Messages::::insert(account, id, message); + } + } + + if let Some((account, id)) = self.next_message_id.take() { + crate::messaging::NextMessageId::::set(account, id); + } + + if let Some(query_id) = self.query_id.take() { + use frame_support::pallet_prelude::ValueQuery; + use xcm::latest::QueryId; + + #[frame_support::storage_alias] + type QueryCounter = StorageValue; + + QueryCounter::set(query_id); + } + } + }); ext } From 01d46cc4244ef491192be25745345ddfa3b21f7a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 7 Jul 2025 21:50:44 +0100 Subject: [PATCH 191/284] feat(devnet): add messaging pallet --- runtime/devnet/Cargo.toml | 2 +- runtime/devnet/src/config/api/mod.rs | 151 ++++++++++++++++++++++++++- runtime/devnet/src/lib.rs | 32 +++++- 3 files changed, 175 insertions(+), 10 deletions(-) diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index 1262c52f4..c88fde03c 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -25,7 +25,7 @@ smallvec.workspace = true # Local pallet-api.workspace = true -pallet-api-vnext = { workspace = true, features = [ "fungibles" ] } +pallet-api-vnext = { workspace = true, features = [ "fungibles", "messaging" ] } pallet-nfts.workspace = true pop-chain-extension.workspace = true pop-primitives.workspace = true diff --git a/runtime/devnet/src/config/api/mod.rs b/runtime/devnet/src/config/api/mod.rs index b93d3691a..7d48b8ce6 100644 --- a/runtime/devnet/src/config/api/mod.rs +++ b/runtime/devnet/src/config/api/mod.rs @@ -3,16 +3,22 @@ use core::marker::PhantomData; use codec::Decode; use cumulus_primitives_core::Weight; -use frame_support::traits::Contains; +use frame_support::{ + dispatch::PostDispatchInfo, + pallet_prelude::{DispatchResultWithPostInfo, EnsureOrigin, Pays}, + parameter_types, + sp_runtime::DispatchError, + traits::Contains, +}; pub(crate) use pallet_api::Extension; use pallet_api::{extension::*, Read}; -use sp_core::ConstU8; -use sp_runtime::DispatchError; +use sp_core::{ConstU32, ConstU8}; use versioning::*; use crate::{ config::assets::{TrustBackedAssetsInstance, TrustBackedNftsInstance}, - fungibles, nonfungibles, Runtime, RuntimeCall, + fungibles, nonfungibles, AccountId, Balances, BlockNumber, DealWithFees, Ismp, Runtime, + RuntimeCall, RuntimeHoldReason, TransactionByteFee, H160, }; mod versioning; @@ -222,6 +228,143 @@ impl pallet_api_vnext::fungibles::Config for Runtime type WeightInfo = (); } +mod messaging { + use pallet_api_vnext::messaging; + use pallet_xcm::Origin; + use xcm::latest::Location; + + use super::*; + use crate::config::xcm::LocalOriginToLocation; + + parameter_types! { + pub const MaxXcmQueryTimeoutsPerBlock: u32 = 100; + } + + impl messaging::Config for Runtime { + type CallbackExecutor = CallbackExecutor; + type FeeHandler = DealWithFees; + type Fungibles = Balances; + type IsmpDispatcher = Ismp; + type Keccak256 = Ismp; + type MaxContextLen = ConstU32<64>; + type MaxDataLen = ConstU32<512>; + type MaxKeyLen = ConstU32<8>; + type MaxKeys = ConstU32<10>; + // TODO: size appropriately + type MaxRemovals = ConstU32<100>; + // TODO: ensure within the contract buffer bounds + type MaxResponseLen = ConstU32<512>; + type MaxXcmQueryTimeoutsPerBlock = MaxXcmQueryTimeoutsPerBlock; + type OffChainByteFee = TransactionByteFee; + type OnChainByteFee = TransactionByteFee; + type OriginConverter = LocalOriginToLocation; + type RuntimeHoldReason = RuntimeHoldReason; + type WeightInfo = (); + type WeightToFee = ::WeightToFee; + type Xcm = QueryHandler; + type XcmResponseOrigin = EnsureResponse; + } + + pub struct CallbackExecutor; + #[cfg(not(feature = "runtime-benchmarks"))] + impl messaging::CallbackExecutor for CallbackExecutor { + fn execute( + account: &AccountId, + contract: H160, + data: Vec, + weight: Weight, + ) -> DispatchResultWithPostInfo { + use frame_support::dispatch::DispatchErrorWithPostInfo; + use pallet_revive::DepositLimit; + + use crate::{Revive, RuntimeOrigin}; + + let mut output = Revive::bare_call( + RuntimeOrigin::signed(account.clone()), + contract, + Default::default(), + weight, + // TODO: expose? + DepositLimit::Balance(Default::default()), + data, + ); + + log::debug!(target: "pop-api", "callback weight consumed={:?}, weight required={:?}", output.gas_consumed, output.gas_required); + if let Ok(return_value) = &output.result { + let pallet_revive::ExecReturnValue { flags: _, data } = return_value; + log::debug!(target: "pop-api::extension", "return data={:?}", data); + if return_value.did_revert() { + output.result = Err(pallet_revive::Error::::ContractReverted.into()); + } + } + + let post_info = + PostDispatchInfo { actual_weight: Some(output.gas_consumed), pays_fee: Pays::No }; + + output + .result + .map(|_| post_info) + .map_err(|e| DispatchErrorWithPostInfo { post_info, error: e }) + } + + fn execution_weight() -> Weight { + use pallet_revive::WeightInfo; + ::WeightInfo::call() + } + } + #[cfg(feature = "runtime-benchmarks")] + impl messaging::CallbackExecutor for CallbackExecutor { + /// A successfull callback is the most expensive case. + fn execute( + _account: &AccountId, + _contract: H160, + _data: Vec, + weight: sp_runtime::Weight, + ) -> frame_support::dispatch::DispatchResultWithPostInfo { + DispatchResultWithPostInfo::Ok(PostDispatchInfo { + actual_weight: Some(weight / 2), + pays_fee: Pays::Yes, + }) + } + + fn execution_weight() -> sp_runtime::Weight { + Default::default() + } + } + + pub struct EnsureResponse; + impl> + From> EnsureOrigin for EnsureResponse { + type Success = Location; + + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + Origin::Response(location) => Ok(location), + r => Err(O::from(r)), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(Origin::Response(Location { parents: 1, interior: xcm::latest::Junctions::Here }) + .into()) + } + } + + pub struct QueryHandler; + impl messaging::transports::xcm::NotifyQueryHandler for QueryHandler { + type WeightInfo = pallet_xcm::Pallet; + + fn new_notify_query( + responder: impl Into, + notify: messaging::Call, + timeout: BlockNumber, + match_querier: impl Into, + ) -> u64 { + crate::PolkadotXcm::new_notify_query(responder, notify, timeout, match_querier) + } + } +} + #[cfg(test)] mod tests { use codec::Encode; diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index cb417f41a..68b7ae81c 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -33,9 +33,12 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ - fungible::HoldConsideration, tokens::nonfungibles_v2::Inspect, ConstBool, ConstU32, - ConstU64, ConstU8, Contains, EitherOfDiverse, EqualPrivilegeOnly, EverythingBut, - LinearStoragePrice, TransformOrigin, VariantCountOf, + fungible, + fungible::HoldConsideration, + tokens::{imbalance::ResolveTo, nonfungibles_v2::Inspect}, + ConstBool, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, EqualPrivilegeOnly, + EverythingBut, Imbalance, LinearStoragePrice, OnUnbalanced, TransformOrigin, + VariantCountOf, }, weights::{ ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, @@ -74,7 +77,7 @@ use sp_core::{crypto::KeyTypeId, Get, OpaqueMetadata, H256, U256}; pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, impl_opaque_keys, - traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, + traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -382,12 +385,29 @@ impl pallet_balances::Config for Runtime { parameter_types! { /// Relay Chain `TransactionByteFee` / 10 pub const TransactionByteFee: Balance = 10 * MICRO_UNIT; + pub Treasury: AccountId = PalletId(*b"py/trsry").into_account_truncating(); +} + +/// DealWithFees is used to handle fees and tips in the OnChargeTransaction trait, +/// by implementing OnUnbalanced. +pub struct DealWithFees; +impl OnUnbalanced> for DealWithFees { + fn on_unbalanceds( + mut fees_then_tips: impl Iterator>, + ) { + if let Some(mut fees) = fees_then_tips.next() { + if let Some(tips) = fees_then_tips.next() { + tips.merge_into(&mut fees); + } + ResolveTo::::on_unbalanced(fees); + } + } } impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type LengthToFee = ConstantMultiplier; - type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; + type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; type OperationalFeeMultiplier = ConstU8<5>; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); @@ -708,6 +728,8 @@ mod runtime { pub type NonFungibles = nonfungibles::Pallet; #[runtime::pallet_index(152)] pub type FungiblesvNext = pallet_api_vnext::fungibles::Pallet; + #[runtime::pallet_index(153)] + pub type Messaging = pallet_api_vnext::messaging::Pallet; } #[cfg(feature = "runtime-benchmarks")] From 36d39125e114559e86a205dfcc7ed75d78043ba9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 7 Jul 2025 21:52:55 +0100 Subject: [PATCH 192/284] feat(api): add initial messaging apis --- pop-api-vnext/src/lib.rs | 13 + pop-api-vnext/src/messaging.rs | 54 +++++ pop-api-vnext/src/messaging/ismp.rs | 9 + pop-api-vnext/src/messaging/ismp/v0.rs | 316 +++++++++++++++++++++++++ pop-api-vnext/src/messaging/v0.rs | 214 +++++++++++++++++ pop-api-vnext/src/messaging/xcm.rs | 10 + pop-api-vnext/src/messaging/xcm/v0.rs | 215 +++++++++++++++++ 7 files changed, 831 insertions(+) create mode 100644 pop-api-vnext/src/messaging.rs create mode 100644 pop-api-vnext/src/messaging/ismp.rs create mode 100644 pop-api-vnext/src/messaging/ismp/v0.rs create mode 100644 pop-api-vnext/src/messaging/v0.rs create mode 100644 pop-api-vnext/src/messaging/xcm.rs create mode 100644 pop-api-vnext/src/messaging/xcm/v0.rs diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index 6c20e0b80..8bb26d409 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -1,8 +1,18 @@ +//! The `pop-api` crate provides an API for smart contracts to interact with the Pop Network +//! runtime. +//! +//! This crate abstracts away complexities to deliver a streamlined developer experience while +//! supporting multiple API versions to ensure backward compatibility. It is designed with a focus +//! on stability, future-proofing, and storage efficiency, allowing developers to easily integrate +//! powerful runtime features into their contracts without unnecessary overhead. + #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::Address; pub use sol::{revert, SolErrorDecode}; +/// An index to a block. +pub type BlockNumber = u32; type Pop = ink::env::DefaultEnvironment; /// The various general errors which may occur. @@ -10,6 +20,9 @@ pub mod errors; /// APIs for fungible tokens. #[cfg(feature = "fungibles")] pub mod fungibles; +/// APIs for cross-chain messaging. +#[cfg(feature = "messaging")] +pub mod messaging; mod sol; #[macro_export] diff --git a/pop-api-vnext/src/messaging.rs b/pop-api-vnext/src/messaging.rs new file mode 100644 index 000000000..237e36dbb --- /dev/null +++ b/pop-api-vnext/src/messaging.rs @@ -0,0 +1,54 @@ +pub use ink::primitives::Weight; +use ink::{ + contract_ref, + env::hash::{Blake2x256, CryptoHash}, + prelude::vec::Vec, + primitives::AccountId, + scale::{Compact, Encode}, + U256, +}; +use sol::*; +pub use v0::*; + +use super::*; + +/// APIs for messaging using the Interoperable State Machine Protocol (ISMP). +pub mod ismp; +/// APIs for messaging using Polkadot's Cross-Consensus Messaging (XCM). +pub mod xcm; + +/// The first version of the Messaging API. +pub mod v0; + +pub type Bytes = Vec; +pub type MessageId = u64; + +// todo: docs +pub fn hashed_account(para_id: u32, account_id: AccountId) -> AccountId { + let location = ( + b"SiblingChain", + Compact::::from(para_id), + Encode::encode(&(b"AccountId32", account_id.0)), + ) + .encode(); + let mut output = [0u8; 32]; + Blake2x256::hash(&location, &mut output); + AccountId::from(output) +} + +#[test] +fn hashed_account_works() { + let account_id: [u8; 32] = [ + 27, 2, 24, 17, 104, 5, 173, 98, 25, 32, 36, 0, 82, 159, 11, 212, 178, 11, 39, 219, 14, 178, + 226, 179, 216, 62, 19, 85, 226, 17, 80, 179, + ]; + let location = ( + b"SiblingChain", + Compact::::from(4001), + Encode::encode(&(b"AccountId32", account_id)), + ) + .encode(); + let mut output = [0u8; 32]; + Blake2x256::hash(&location, &mut output); + println!("{output:?}") +} diff --git a/pop-api-vnext/src/messaging/ismp.rs b/pop-api-vnext/src/messaging/ismp.rs new file mode 100644 index 000000000..8fac9059e --- /dev/null +++ b/pop-api-vnext/src/messaging/ismp.rs @@ -0,0 +1,9 @@ +pub use v0::*; + +use super::{ + contract_ref, fixed_address, BlockNumber, Bytes, MessageId, MessageStatus, Pop, Sol, SolDecode, + SolEncode, Vec, U256, +}; + +/// The first version of the ISMP API. +pub mod v0; diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs new file mode 100644 index 000000000..acfe5d293 --- /dev/null +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -0,0 +1,316 @@ +use super::{super::v0::Callback, *}; + +// Precompile index within the runtime +const PRECOMPILE: u16 = 4; + +/// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State +/// Machine Protocol. +#[ink::trait_definition] +pub trait Ismp { + /// Submit a new ISMP `Get` request. + /// + /// # Parameters + /// - `request` - The ISMP `Get` message containing query details. + /// - `fee` - The fee to be paid to relayers. + /// + /// # Returns + /// A unique message identifier. + #[ink(message)] + fn get(&self, request: Get, fee: U256) -> MessageId; + + /// Submit a new ISMP `Get` request. + /// + /// # Parameters + /// - `request` - The ISMP `Get` message containing query details. + /// - `fee` - The fee to be paid to relayers. + /// - `callback` - The callback to execute upon receiving a response. + /// + /// # Returns + /// A unique message identifier. + #[ink(message, selector = 0x39f75435)] + fn get_with_callback(&self, request: Get, fee: U256, callback: Callback) -> MessageId; + + /// Returns the response to a message. + /// + /// A non-existent message identifier will return an empty response, which could also be a valid + /// response depending on the source message. + /// + /// # Parameters + /// - `message` - The message identifier. + #[ink(message, selector = 0xada86798)] + fn get_response(&self, message: MessageId) -> Bytes; + + /// Polls the status of a message. + /// + /// # Parameters + /// - `message` - The message identifier to poll. + #[ink(message)] + fn pollStatus(&self, message: MessageId) -> MessageStatus; + + /// Submit a new ISMP `Post` request. + /// + /// Sends a `Post` message through ISMP with arbitrary data. + /// + /// # Parameters + /// - `request` - The ISMP `Post` message containing the payload. + /// - `fee` - The fee to be paid to relayers. + /// + /// # Returns + /// A unique message identifier. + #[ink(message)] + fn post(&self, request: Post, fee: U256) -> MessageId; + + /// Submit a new ISMP `Post` request. + /// + /// Sends a `Post` message through ISMP with arbitrary data. + /// + /// # Parameters + /// - `request` - The ISMP `Post` message containing the payload. + /// - `fee` - The fee to be paid to relayers. + /// - `callback` - The callback to execute upon receiving a response. + /// + /// # Returns + /// A unique message identifier. + #[ink(message, selector = 0xeb0f21f1)] + fn post_with_callback(&self, request: Post, fee: U256, callback: Callback) -> MessageId; + + /// Remove a completed or timed-out message. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `message` - The identifier of the message to remove. + #[ink(message)] + fn remove(&self, message: MessageId); + + /// Remove a batch of completed or timed-out messages. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). + #[ink(message, selector = 0xcdd80f3b)] + fn remove_many(&self, messages: Vec); +} + +/// Submit a new ISMP `Get` request. +/// +/// # Parameters +/// - `request` - The ISMP `Get` message containing query details. +/// - `fee` - The fee to be paid to relayers. +/// - `callback` - An optional callback to execute upon receiving a response. +/// +/// # Returns +/// A unique message identifier. +#[inline] +pub fn get(request: Get, fee: U256, callback: Option) -> MessageId { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + match callback { + None => precompile.get(request, fee), + Some(callback) => precompile.get_with_callback(request, fee, callback), + } +} + +/// Returns the response to a message. +/// +/// A non-existent message identifier will return an empty response, which could also be a valid +/// response depending on the source message. +/// +/// # Parameters +/// - `message` - The message identifier. +#[inline] +pub fn get_response(message: MessageId) -> Bytes { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + precompile.get_response(message) +} + +/// Polls the status of a message. +/// +/// # Parameters +/// - `message` - The message identifier to poll. +#[inline] +pub fn poll_status(message: MessageId) -> MessageStatus { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + precompile.pollStatus(message) +} + +/// Submit a new ISMP `Post` request. +/// +/// Sends a `Post` message through ISMP with arbitrary data. +/// +/// # Parameters +/// - `request` - The ISMP `Post` message containing the payload. +/// - `fee` - The fee to be paid to relayers. +/// - `callback` - An optional callback to execute upon receiving a response. +/// +/// # Returns +/// A unique message identifier. +#[inline] +pub fn post(request: Post, fee: U256, callback: Option) -> MessageId { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + match callback { + None => precompile.post(request, fee), + Some(callback) => precompile.post_with_callback(request, fee, callback), + } +} + +/// Remove a completed or timed-out message. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `message` - The identifier of the message to remove. +#[inline] +pub fn remove(message: MessageId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + precompile.remove(message) +} + +/// Remove a batch of completed or timed-out messages. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). +#[inline] +pub fn remove_many(messages: Vec) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + precompile.remove_many(messages) +} + +/// A GET request, intended to be used for sending outgoing requests +#[ink::scale_derive(Encode, Decode, TypeInfo)] +pub struct Get { + /// The destination state machine of this request. + pub destination: u32, + /// Height at which to read the state machine. + pub height: BlockNumber, + /// Relative from the current timestamp at which this request expires in seconds. + pub timeout: u64, + /// Some application-specific metadata relating to this request. + pub context: Vec, + /// Raw Storage keys that would be used to fetch the values from the counterparty. + pub keys: Vec>, +} + +impl Get { + // TODO: docs + pub fn new( + destination: u32, + height: BlockNumber, + timeout: u64, + context: Vec, + keys: Vec>, + ) -> Self { + Self { destination, height, timeout, context, keys } + } +} + +impl SolDecode for Get { + type SolType = (u32, BlockNumber, u64, Vec, Vec>); + + fn from_sol_type(value: Self::SolType) -> Self { + Self { + destination: value.0, + height: value.1, + timeout: value.2, + context: value.3, + keys: value.4, + } + } +} +impl<'a> SolEncode<'a> for Get { + type SolType = (&'a u32, &'a BlockNumber, &'a u64, &'a Vec, &'a Vec>); + + fn to_sol_type(&'a self) -> Self::SolType { + (&self.destination, &self.height, &self.timeout, &self.context, &self.keys) + } +} + +/// A POST request, intended to be used for sending outgoing requests. +#[ink::scale_derive(Encode, Decode, TypeInfo)] +pub struct Post { + /// The destination state machine of this request. + pub destination: u32, + /// Relative from the current timestamp at which this request expires in seconds. + pub timeout: u64, + /// Encoded request data. + pub data: Vec, +} + +impl Post { + // TODO: docs + pub fn new(destination: u32, timeout: u64, data: Vec) -> Self { + Self { destination, timeout, data } + } +} + +impl SolDecode for Post { + type SolType = (u32, u64, Vec); + + fn from_sol_type(value: Self::SolType) -> Self { + Self { destination: value.0, timeout: value.1, data: value.2 } + } +} +impl<'a> SolEncode<'a> for Post { + type SolType = (&'a u32, &'a u64, &'a Vec); + + fn to_sol_type(&'a self) -> Self::SolType { + (&self.destination, &self.timeout, &self.data) + } +} + +/// A verified storage value. +#[ink::scale_derive(Encode, Decode, TypeInfo)] +#[derive(Debug)] +pub struct StorageValue { + /// The request storage key. + pub key: Vec, + /// The verified value. + pub value: Option>, +} + +impl SolDecode for StorageValue { + type SolType = (Vec, (bool, Vec)); + + fn from_sol_type(value: Self::SolType) -> Self { + let key = value.0; + let value = match value.1 .0 { + true => Some(value.1 .1), + false => None, + }; + Self { key, value } + } +} +impl<'a> SolEncode<'a> for StorageValue { + type SolType = (&'a Vec, bool, &'a [u8]); + + fn to_sol_type(&'a self) -> Self::SolType { + const EMPTY: [u8; 0] = []; + ( + &self.key, + self.value.is_some(), + &self.value.as_ref().map_or(EMPTY.as_slice(), |v| v.as_slice()), + ) + } +} + +#[ink::trait_definition] +pub trait OnGetResponse { + // pop-api::messaging::ismp::OnGetResponse::on_response + #[ink(message, selector = 0x57ad942b)] + fn on_response(&mut self, id: MessageId, values: Vec); +} + +#[ink::trait_definition] +pub trait OnPostResponse { + // pop-api::messaging::ismp::OnPostResponse::on_response + #[ink(message, selector = 0xcfb0a1d2)] + fn on_response(&mut self, id: MessageId, response: Vec); +} diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs new file mode 100644 index 000000000..d123a6a80 --- /dev/null +++ b/pop-api-vnext/src/messaging/v0.rs @@ -0,0 +1,214 @@ +use super::*; + +// Precompile index within the runtime +const PRECOMPILE: u16 = 3; + +/// The messaging precompile offers a general interface for cross-chain messaging operations. +#[ink::trait_definition] +pub trait Messaging { + /// Returns the response to a message. + /// + /// A non-existent message identifier will return an empty response, which could also be a valid + /// response depending on the source message. + /// + /// # Parameters + /// - `message` - The message identifier. + #[ink(message)] + fn getResponse(&self, message: MessageId) -> Bytes; + + /// Polls the status of a message. + /// + /// # Parameters + /// - `message` - The message identifier to poll. + #[ink(message)] + fn pollStatus(&self, message: MessageId) -> MessageStatus; + + /// Remove a completed or timed-out message. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `message` - The identifier of the message to remove. + #[ink(message)] + fn remove(&self, message: MessageId); + + /// Remove a batch of completed or timed-out messages. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). + #[ink(message, selector = 0xcdd80f3b)] + fn remove_many(&self, messages: Vec); +} + +/// A message callback. +#[ink::scale_derive(Decode, Encode, TypeInfo)] +pub struct Callback { + /// The contract address to which the callback should be sent. + destination: Address, + /// The encoding used for the data going to the contract. + encoding: Encoding, + /// The message selector to be used for the callback. + selector: [u8; 4], + /// The pre-paid weight used as a gas limit for the callback. + weight: Weight, +} + +impl Callback { + /// Creates a new callback with the specified encoding, selector, and weight. + /// + /// # Parameters + /// - `destination` - The contract address to which the callback should be sent. + /// - `encoding` - The encoding used for the data going to the contract. + /// - `selector` - The message selector to be used for the callback. + /// - `weight` - The pre-paid weight used as a gas limit for the callback. + pub fn new(destination: Address, encoding: Encoding, selector: u32, weight: Weight) -> Self { + Self { destination, encoding, selector: selector.to_be_bytes(), weight } + } +} + +impl SolDecode for Callback { + type SolType = (u8, [u8; 4], (u64, u64)); + + fn from_sol_type(value: Self::SolType) -> Self { + Self { + encoding: Encoding::from_sol_type(value.0), + selector: value.1, + weight: Weight::from_sol_type(value.2), + } + } +} +impl<'a> SolEncode<'a> for Callback { + type SolType = (u8, &'a [u8; 4], (u64, u64)); + + fn to_sol_type(&'a self) -> Self::SolType { + (self.encoding as u8, &self.selector, (self.weight.ref_time(), self.weight.proof_size())) + } +} + +/// The specificiation of how data must be encoded before being sent to a contract. +#[derive(Copy, Clone)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +#[repr(u8)] +pub enum Encoding { + /// SCALE (Simple Concatenated Aggregate Little-Endian) encoding. + Scale, + /// Solidity ABI (Application Binary Interface) encoding, + SolidityAbi, +} + +impl SolDecode for Encoding { + type SolType = u8; + + fn from_sol_type(value: Self::SolType) -> Self { + match value { + 0 => Self::Scale, + 1 => Self::SolidityAbi, + _ => unimplemented!(), + } + } +} +impl<'a> SolEncode<'a> for Encoding { + type SolType = u8; + + fn to_sol_type(&'a self) -> Self::SolType { + *self as u8 + } +} + +/// The status of a message. +#[derive(Copy, Clone, PartialEq)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +#[repr(u8)] +pub enum MessageStatus { + NotFound = 0, + Pending = 1, + Complete = 2, + Timeout = 3, +} + +impl SolDecode for MessageStatus { + type SolType = u8; + + fn from_sol_type(value: Self::SolType) -> Self { + match value { + 0 => Self::NotFound, + 1 => Self::Pending, + 2 => Self::Complete, + 3 => Self::Timeout, + _ => unimplemented!(), + } + } +} +impl<'a> SolEncode<'a> for MessageStatus { + type SolType = u8; + + fn to_sol_type(&'a self) -> Self::SolType { + *self as u8 + } +} + +/// One or more messages have been removed for the account. +#[ink::event] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct Removed { + /// The origin of the messages. + #[ink(topic)] + pub account: Address, + /// The messages which were removed. + #[ink(topic)] + pub messages: Vec, +} + +/// Returns the response to a message. +/// +/// A non-existent message identifier will return an empty response, which could also be a valid +/// response depending on the source message. +/// +/// # Parameters +/// - `message` - The message identifier. +#[inline] +pub fn get_response(message: MessageId) -> Bytes { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + precompile.getResponse(message) +} + +/// Polls the status of a message. +/// +/// # Parameters +/// - `message` - The message identifier to poll. +#[inline] +pub fn poll_status(message: MessageId) -> MessageStatus { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + precompile.pollStatus(message) +} + +/// Remove a completed or timed-out message. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `message` - The identifier of the message to remove. +#[inline] +pub fn remove(message: MessageId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + precompile.remove(message) +} + +/// Remove a batch of completed or timed-out messages. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). +#[inline] +pub fn remove_many(messages: Vec) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + precompile.remove_many(messages) +} diff --git a/pop-api-vnext/src/messaging/xcm.rs b/pop-api-vnext/src/messaging/xcm.rs new file mode 100644 index 000000000..cc4cf533c --- /dev/null +++ b/pop-api-vnext/src/messaging/xcm.rs @@ -0,0 +1,10 @@ +use ink::scale::Encode; +pub use v0::*; + +use super::{ + contract_ref, fixed_address, BlockNumber, Bytes, MessageId, MessageStatus, Pop, Sol, Vec, + Weight, +}; + +/// The first version of the XCM API. +pub mod v0; diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs new file mode 100644 index 000000000..5cdb4390b --- /dev/null +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -0,0 +1,215 @@ +pub use ink::xcm::prelude::{VersionedLocation, VersionedResponse, VersionedXcm}; + +use super::{super::v0::Callback, *}; + +pub type QueryId = u64; + +// Precompile index within the runtime +const PRECOMPILE: u16 = 5; + +/// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus +/// Messaging (XCM). +#[ink::trait_definition] +pub trait Xcm { + /// Execute an XCM message from a local, signed, origin. + /// + /// # Parameters + /// - `message` - A SCALE-encoded versioned XCM message. + /// - `weight` - The maximum allowed weight for execution. + /// + /// # Returns + /// A SCALE-encoded dispatch result. + #[ink(message)] + fn execute(&self, message: Bytes, weight: Weight) -> Bytes; + + /// Returns the response to a message. + /// + /// A non-existent message identifier will return an empty response, which could also be a valid + /// response depending on the source message. + /// + /// # Parameters + /// - `message` - The message identifier. + #[ink(message)] + fn getResponse(&self, message: MessageId) -> Bytes; + + /// Initiate a new XCM query. + /// + /// Starts a query using the XCM interface, specifying a responder and timeout block. + /// + /// # Parameters + /// - `responder` - A SCALE-encoded versioned location of the XCM responder. + /// - `timeout` - Block number after which the query should timeout. + /// + /// # Returns + /// A unique query identifier. + #[ink(message, selector = 0x5a8db3bd)] + fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> QueryId; + + /// Initiate a new XCM query. + /// + /// Starts a query using the XCM interface, specifying a responder and timeout block. + /// + /// # Parameters + /// - `responder` - A SCALE-encoded versioned location of the XCM responder. + /// - `timeout` - Block number after which the query should timeout. + /// - `callback` - The callback to execute upon receiving a response. + /// + /// # Returns + /// A unique query identifier. + #[ink(message, selector = 0xc0ca060b)] + fn new_query_with_callback( + &self, + responder: Bytes, + timeout: BlockNumber, + callback: Callback, + ) -> QueryId; + + /// Polls the status of a message. + /// + /// # Parameters + /// - `message` - The message identifier to poll. + #[ink(message)] + fn pollStatus(&self, message: MessageId) -> MessageStatus; + + /// Remove a completed or timed-out message. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `message` - The identifier of the message to remove. + #[ink(message)] + fn remove(&self, message: MessageId); + + /// Remove a batch of completed or timed-out messages. + /// + /// Allows users to clean up storage and reclaim deposits for messages that have concluded. + /// + /// # Parameters + /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). + #[ink(message, selector = 0xcdd80f3b)] + fn remove_many(&self, messages: Vec); + + /// Send an XCM from a given origin. + /// + /// # Parameters + /// - `destination` - The SCALE-encoded versioned location for the destination of the message. + /// - `message` - A SCALE-encoded versioned XCM message. + /// + /// # Returns + /// A SCALE-encoded dispatch result. + #[ink(message)] + fn send(&self, destination: Bytes, message: Bytes) -> Bytes; +} + +/// Execute an XCM message from a local, signed, origin. +/// +/// # Parameters +/// - `message` - A XCM message. +/// - `weight` - The maximum allowed weight for execution. +/// +/// # Returns +/// A SCALE-encoded dispatch result. +#[inline] +pub fn execute(message: VersionedXcm, weight: Weight) -> Bytes { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.execute(message.encode(), weight) +} + +/// Returns the response to a message. +/// +/// A non-existent message identifier will return an empty response, which could also be a valid +/// response depending on the source message. +/// +/// # Parameters +/// - `message` - The message identifier. +#[inline] +pub fn get_response(message: MessageId) -> Bytes { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.getResponse(message) +} + +/// Initiate a new XCM query. +/// +/// Starts a query using the XCM interface, specifying a responder and timeout block. +/// +/// # Parameters +/// - `responder` - The location of the XCM responder. +/// - `timeout` - Block number after which the query should timeout. +/// - `callback` - An optional callback to execute upon receiving a response. +/// +/// # Returns +/// A unique query identifier. +#[inline] +pub fn new_query( + responder: VersionedLocation, + timeout: BlockNumber, + callback: Option, +) -> QueryId { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + match callback { + None => precompile.new_query(responder.encode(), timeout), + Some(callback) => precompile.new_query_with_callback(responder.encode(), timeout, callback), + } +} + +/// Polls the status of a message. +/// +/// # Parameters +/// - `message` - The message identifier to poll. +#[inline] +pub fn poll_status(message: MessageId) -> MessageStatus { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.pollStatus(message) +} + +/// Remove a completed or timed-out message. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `message` - The identifier of the message to remove. +#[inline] +pub fn remove(message: MessageId) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.remove(message) +} + +/// Remove a batch of completed or timed-out messages. +/// +/// Allows users to clean up storage and reclaim deposits for messages that have concluded. +/// +/// # Parameters +/// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). +#[inline] +pub fn remove_many(messages: Vec) { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.remove_many(messages) +} + +/// Send an XCM from a given origin. +/// +/// # Parameters +/// - `destination` - The destination of the message. +/// - `message` - A XCM message. +/// +/// # Returns +/// A SCALE-encoded dispatch result. +#[inline] +pub fn send(destination: VersionedLocation, message: VersionedXcm) -> Bytes { + let address = fixed_address(PRECOMPILE); + let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + precompile.send(destination.encode(), message.encode()) +} + +#[ink::trait_definition] +pub trait OnResponse { + // pop-api::messaging::xcm::OnResponse::on_response + #[ink(message, selector = 0x641b0b03)] + fn on_response(&mut self, id: MessageId, response: Bytes); +} From 8365e73411635f4401c2438d4cebd36c8a82d34f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 7 Jul 2025 22:00:18 +0100 Subject: [PATCH 193/284] feat(api): add messaging example --- pop-api-vnext/examples/messaging/Cargo.toml | 27 +++ pop-api-vnext/examples/messaging/lib.rs | 238 ++++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 pop-api-vnext/examples/messaging/Cargo.toml create mode 100644 pop-api-vnext/examples/messaging/lib.rs diff --git a/pop-api-vnext/examples/messaging/Cargo.toml b/pop-api-vnext/examples/messaging/Cargo.toml new file mode 100644 index 000000000..29455eed2 --- /dev/null +++ b/pop-api-vnext/examples/messaging/Cargo.toml @@ -0,0 +1,27 @@ +[package] +authors = [ "R0GUE " ] +edition = "2021" +name = "messaging" +version = "0.1.0" + +[package.metadata.ink-lang] +abi = "sol" + +[lib] +path = "lib.rs" + +[dependencies] +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } + +[dev-dependencies] +scale-info = { version = "2" } + +[features] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] + +[lints.rust.unexpected_cfgs] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +level = "warn" diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs new file mode 100644 index 000000000..b134cc296 --- /dev/null +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -0,0 +1,238 @@ +#![cfg_attr(not(feature = "std"), no_std, no_main)] + +use ink::{ + env::hash::{Blake2x256, CryptoHash}, + prelude::vec::Vec, + scale::{DecodeAll, Encode}, + xcm::{ + prelude::{ + AccountId32, All, Asset, Junction::Parachain, Location, OriginKind, QueryId, + QueryResponseInfo, WeightLimit, Xcm, XcmHash, + }, + DoubleEncoded, VersionedXcm, + }, + U256, +}; +use pop_api::{ + messaging::{ + self as api, hashed_account, ismp, + ismp::{Get, StorageValue}, + xcm::VersionedLocation, + Bytes, Callback, Encoding, MessageId, + MessageStatus::Complete, + Weight, + }, + revert, +}; + +#[ink::contract] +mod messaging { + + use super::*; + + // TODO: use manifest metadata to determine + const ENCODING: Encoding = Encoding::SolidityAbi; + const UNAUTHORIZED: u32 = u32::MAX; + + #[ink(storage)] + #[derive(Default)] + pub struct Messaging { + para: u32, + id: MessageId, + } + + impl Messaging { + #[ink(constructor, payable)] + pub fn new(para: u32) -> Self { + Self { para, id: 0 } + } + + #[ink(message)] + pub fn get(&mut self, key: Vec, height: u32) { + // self.id = self.id.saturating_add(1); + let id = ismp::get( + Get::new(self.para, height, 0, Vec::default(), Vec::from([key.clone()])), + U256::zero(), + Some(Callback::new( + self.env().address(), + ENCODING, + 0x57ad942b, + Weight::from_parts(800_000_000, 500_000), + )), + ); + self.env().emit_event(IsmpRequested { id: self.id, key, height }); + } + + #[ink(message, payable)] + pub fn fund(&mut self) { + let dest = Location::new(1, Parachain(self.para)); + + // Reserve transfer specified assets to contract account on destination. + let asset: Asset = + (Location::parent(), u128::try_from(self.env().transferred_value()).unwrap()) + .into(); + let beneficiary = hashed_account(4_001, self.env().account_id()); // todo: para id getter + let message: Xcm<()> = Xcm::builder_unsafe() + .withdraw_asset(asset.clone()) + .initiate_reserve_withdraw( + asset.clone(), + dest.clone(), + Xcm::builder_unsafe() + .buy_execution(asset.clone(), WeightLimit::Unlimited) + .deposit_asset( + All, + Location::new(0, AccountId32 { network: None, id: beneficiary.0 }), + ) + .build(), + ) + .build(); + let result = api::xcm::execute(VersionedXcm::V5(message), Weight::MAX); + // TODO: check result + + self.env().emit_event(Funded { + account_id: beneficiary, + value: self.env().transferred_value(), + }); + } + + #[ink(message, payable)] + pub fn transact(&mut self, call: Vec, weight: Weight) { + let dest = Location::new(1, Parachain(self.para)); + let call = DoubleEncoded::<()>::decode_all(&mut &call[..]).unwrap(); + + // Register a new query for receiving a response, used to report transact status. + self.id = self.id.saturating_add(1); + let query_id = api::xcm::new_query( + VersionedLocation::V5(dest.clone()), + self.env().block_number().saturating_add(100), + Some(Callback::new( + self.env().address(), + ENCODING, + 0x641b0b03, + Weight::from_parts(800_000_000, 500_000), + )), + ); + + // TODO: provide an api function for determining the local para id and max weight value + // for processing the reported transact status on the local chain. + let response = QueryResponseInfo { + // Route back to this parachain. + destination: Location::new(1, Parachain(4_001)), + query_id, + max_weight: Weight::from_parts(1_000_000, 5_000), + }; + + // Send transact message. + let fees: Asset = + (Location::parent(), u128::try_from(self.env().transferred_value()).unwrap()) + .into(); + let message: Xcm<()> = self._transact(call, weight, fees, response); + let mut hash = [0u8; 32]; + Blake2x256::hash(&message.encode(), &mut hash); + let result = api::xcm::send(dest.into_versioned(), VersionedXcm::V5(message)); + + self.env().emit_event(XcmRequested { id: self.id, query_id, hash }); + } + + #[ink(message)] + pub fn complete(&mut self, id: MessageId) { + if api::poll_status(id) == Complete { + let result = api::get_response(id); + api::remove(id); + self.env().emit_event(Completed { id, result }); + } + } + + fn _transact( + &self, + call: DoubleEncoded<()>, + weight: Weight, + fees: Asset, + response: QueryResponseInfo, + ) -> Xcm<()> { + let beneficiary = hashed_account(4_001, self.env().account_id()); // todo: para id getter + Xcm::builder_unsafe() + .withdraw_asset(fees.clone()) + .buy_execution(fees, WeightLimit::Unlimited) + .set_appendix( + Xcm::builder_unsafe() + .refund_surplus() + .deposit_asset( + All, + Location::new(0, AccountId32 { network: None, id: beneficiary.0 }), + ) + .build(), + ) + .set_error_handler(Xcm::builder_unsafe().report_error(response.clone()).build()) + .transact(OriginKind::SovereignAccount, weight, call) + .report_transact_status(response) + .build() + } + } + + impl api::ismp::OnGetResponse for Messaging { + #[ink(message)] + fn on_response(&mut self, id: MessageId, values: Vec) { + if self.env().caller() != self.env().address() { + revert(&UNAUTHORIZED); + } + self.env().emit_event(GetCompleted { id, values }); + } + } + + impl api::xcm::OnResponse for Messaging { + #[ink(message)] + fn on_response(&mut self, id: MessageId, response: Vec) { + if self.env().caller() != self.env().address() { + revert(&UNAUTHORIZED); + } + self.env().emit_event(XcmCompleted { id, result: response }); + } + } + + #[ink::event] + pub struct IsmpRequested { + #[ink(topic)] + pub id: MessageId, + pub key: Vec, + pub height: BlockNumber, + } + + #[ink::event] + pub struct Funded { + #[ink(topic)] + pub account_id: AccountId, + pub value: U256, + } + + #[ink::event] + pub struct XcmRequested { + #[ink(topic)] + pub id: MessageId, + #[ink(topic)] + pub query_id: QueryId, + #[ink(topic)] + pub hash: XcmHash, + } + + #[ink::event] + pub struct Completed { + #[ink(topic)] + pub id: MessageId, + pub result: Vec, + } + + #[ink::event] + pub struct XcmCompleted { + #[ink(topic)] + pub id: MessageId, + pub result: Bytes, + } + + #[ink::event] + pub struct GetCompleted { + #[ink(topic)] + pub id: MessageId, + pub values: Vec, + } +} From ef237b8ad991dbb0cf12993a5cf44db66733d426 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 7 Jul 2025 22:00:57 +0100 Subject: [PATCH 194/284] refactor(api): update callback encoding --- pop-api-vnext/src/messaging/v0.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index d123a6a80..a028a3797 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -69,21 +69,27 @@ impl Callback { } impl SolDecode for Callback { - type SolType = (u8, [u8; 4], (u64, u64)); + type SolType = ([u8; 20], u8, [u8; 4], (u64, u64)); fn from_sol_type(value: Self::SolType) -> Self { Self { - encoding: Encoding::from_sol_type(value.0), - selector: value.1, - weight: Weight::from_sol_type(value.2), + destination: value.0.into(), + encoding: Encoding::from_sol_type(value.1), + selector: value.2, + weight: Weight::from_sol_type(value.3), } } } impl<'a> SolEncode<'a> for Callback { - type SolType = (u8, &'a [u8; 4], (u64, u64)); + type SolType = (&'a [u8; 20], u8, &'a [u8; 4], (u64, u64)); fn to_sol_type(&'a self) -> Self::SolType { - (self.encoding as u8, &self.selector, (self.weight.ref_time(), self.weight.proof_size())) + ( + &self.destination.0, + self.encoding as u8, + &self.selector, + (self.weight.ref_time(), self.weight.proof_size()), + ) } } From 6328d4abdcc0f8bbfaa43d785de500def6930e9e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 8 Jul 2025 11:32:25 +0100 Subject: [PATCH 195/284] build(pallets/api): add empty ismp feature --- pallets/api-vnext/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index 9c1e2a553..ca4e8a588 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -38,6 +38,8 @@ sp-io.workspace = true [features] default = [ "fungibles", "messaging", "std" ] fungibles = [ "dep:pallet-assets", "dep:pallet-balances" ] +# Empty feature to satisfy clashes with ismp dependency during workspace builds using the "ismp" feature +ismp = [ ] messaging = [ "dep:anyhow", "dep:ismp", From 97b47c1accb68b951f4bf9f83b589177b4908305 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 8 Jul 2025 11:45:33 +0100 Subject: [PATCH 196/284] refactor: port on_initialize hook implementation --- pallets/api-vnext/src/messaging.rs | 45 +++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 70e8214fe..f0ebde757 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -34,6 +34,7 @@ mod weights; type BalanceOf = <::Fungibles as Inspect>>::Balance; type BlockNumberOf = BlockNumberFor; +type DbWeightOf = ::DbWeight; // TODO: consider u32 (e.g. a message per contract/block) pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - U256?; @@ -148,8 +149,34 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(_n: BlockNumberOf) -> Weight { - todo!() + fn on_initialize(n: BlockNumberOf) -> Weight { + // As of polkadot-2412 XCM timeouts are not handled by the implementation of OnResponse + // in pallet-xcm. As a result, we must handle timeouts in the pallet. + // Iterate through the queries that have expired and update their status. + let mut weight: Weight = Zero::zero(); + let mut query_ids = Vec::new(); + for (origin, message_id) in XcmQueryTimeouts::::get(n) { + weight = weight.saturating_add(DbWeightOf::::get().reads_writes(2, 1)); + Messages::::mutate(origin, message_id, |maybe_message| { + if let Some(Message::XcmQuery { query_id, message_deposit, callback }) = + maybe_message.as_mut() + { + let callback_deposit = + callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); + query_ids.push(*query_id); + *maybe_message = Some(Message::XcmTimeout { + query_id: *query_id, + message_deposit: *message_deposit, + callback_deposit, + }); + } + }) + } + + if !query_ids.is_empty() { + Self::deposit_event(Event::::XcmQueriesTimedOut { query_ids }) + } + weight } } @@ -239,6 +266,8 @@ pub mod pallet { IsmpTimedOut { commitment: H256 }, /// An error has occured while attempting to refund weight. WeightRefundErrored { message_id: MessageId, error: DispatchError }, + /// A collection of xcm queries have timed out. + XcmQueriesTimedOut { query_ids: Vec }, /// A response to a XCM query has been received. XcmResponseReceived { /// The destination of the response. @@ -298,8 +327,9 @@ pub mod pallet { Messages::::get(&initiating_origin, id).ok_or(Error::::MessageNotFound)?; let (query_id, callback, message_deposit) = match &xcm_query_message { - Message::XcmQuery { query_id, callback, message_deposit } => - (query_id, callback, message_deposit), + Message::XcmQuery { query_id, callback, message_deposit } => { + (query_id, callback, message_deposit) + }, Message::XcmTimeout { .. } => return Err(Error::::RequestTimedOut.into()), _ => return Err(Error::::InvalidMessage.into()), }; @@ -327,7 +357,7 @@ pub mod pallet { Precision::Exact, )?; - return Ok(()) + return Ok(()); } } // No callback is executed, @@ -417,8 +447,9 @@ pub(crate) fn call( match manage_fees::(&initiating_origin, callback_weight_used, callback.weight) { Ok(_) => (), // Dont return early, we must register the weight used by the callback. - Err(error) => - >::deposit_event(Event::WeightRefundErrored { message_id: *id, error }), + Err(error) => { + >::deposit_event(Event::WeightRefundErrored { message_id: *id, error }) + }, } Ok(()) } From 9b26b3570cba9b6ec50e0054fb0d024ff3cf29e3 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 8 Jul 2025 11:51:19 +0100 Subject: [PATCH 197/284] style: formatting --- pallets/api-vnext/src/messaging.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index f0ebde757..9c1b11b42 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -327,9 +327,8 @@ pub mod pallet { Messages::::get(&initiating_origin, id).ok_or(Error::::MessageNotFound)?; let (query_id, callback, message_deposit) = match &xcm_query_message { - Message::XcmQuery { query_id, callback, message_deposit } => { - (query_id, callback, message_deposit) - }, + Message::XcmQuery { query_id, callback, message_deposit } => + (query_id, callback, message_deposit), Message::XcmTimeout { .. } => return Err(Error::::RequestTimedOut.into()), _ => return Err(Error::::InvalidMessage.into()), }; @@ -447,9 +446,8 @@ pub(crate) fn call( match manage_fees::(&initiating_origin, callback_weight_used, callback.weight) { Ok(_) => (), // Dont return early, we must register the weight used by the callback. - Err(error) => { - >::deposit_event(Event::WeightRefundErrored { message_id: *id, error }) - }, + Err(error) => + >::deposit_event(Event::WeightRefundErrored { message_id: *id, error }), } Ok(()) } From 70511894698080486686d037874d0fb3b81e62d1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 8 Jul 2025 11:58:20 +0100 Subject: [PATCH 198/284] build(pallets/api): adjust ismp feature --- pallets/api-vnext/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index ca4e8a588..88227e10e 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -39,7 +39,7 @@ sp-io.workspace = true default = [ "fungibles", "messaging", "std" ] fungibles = [ "dep:pallet-assets", "dep:pallet-balances" ] # Empty feature to satisfy clashes with ismp dependency during workspace builds using the "ismp" feature -ismp = [ ] +ismp = [ "dep:ismp" ] messaging = [ "dep:anyhow", "dep:ismp", From ed8e10201f534404bbc962f3c2ba8b62458fc8f8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 12:38:40 +0100 Subject: [PATCH 199/284] feat(pallets/api): add messaging benchmarks --- pallets/api-vnext/Cargo.toml | 6 +- pallets/api-vnext/src/lib.rs | 5 + pallets/api-vnext/src/messaging.rs | 2 + .../api-vnext/src/messaging/benchmarking.rs | 539 ++++++++++++++++++ .../api-vnext/src/messaging/precompiles.rs | 5 +- .../src/messaging/precompiles/ismp/v0.rs | 42 +- .../api-vnext/src/messaging/precompiles/v0.rs | 9 +- .../src/messaging/precompiles/xcm/v0.rs | 10 +- .../src/messaging/transports/ismp.rs | 34 +- pallets/api-vnext/src/messaging/weights.rs | 385 +++++++++++-- runtime/devnet/src/config/ismp.rs | 8 +- runtime/devnet/src/lib.rs | 1 + 12 files changed, 965 insertions(+), 81 deletions(-) create mode 100644 pallets/api-vnext/src/messaging/benchmarking.rs diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index 88227e10e..b2a3125f7 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -24,16 +24,16 @@ pallet-assets = { workspace = true, default-features = false, optional = true } pallet-balances = { workspace = true, default-features = false, optional = true } pallet-ismp = { workspace = true, optional = true } pallet-revive = { workspace = true, default-features = false } +pallet-timestamp = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } scale-info.workspace = true +sp-io = { workspace = true, optional = true } sp-runtime = { workspace = true, optional = true } xcm = { workspace = true, optional = true } xcm-builder = { workspace = true, optional = true } [dev-dependencies] pallet-balances.workspace = true -pallet-timestamp.workspace = true -sp-io.workspace = true [features] default = [ "fungibles", "messaging", "std" ] @@ -51,6 +51,8 @@ messaging = [ "dep:xcm-builder", ] runtime-benchmarks = [ + "dep:pallet-timestamp", + "dep:sp-io", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index beb9ea254..1e0f12807 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -31,6 +31,11 @@ use { pallet_revive::evm::U256, pallet_revive::precompiles::run::{CallSetup, WasmModule}, }; +#[cfg(feature = "runtime-benchmarks")] +use { + frame_support::{pallet_prelude::IsType, traits::fungible::Inspect}, + pallet_revive::precompiles::run::{CallSetup, WasmModule}, +}; #[cfg(test)] use { frame_support::{pallet_prelude::Weight, sp_runtime::traits::Bounded}, diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 9c1b11b42..bf5b42547 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -25,6 +25,8 @@ use weights::WeightInfo; use super::*; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; mod deposits; /// The messaging precompiles offer a streamlined interface for cross-chain messaging. pub mod precompiles; diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs new file mode 100644 index 000000000..93a2d766f --- /dev/null +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -0,0 +1,539 @@ +//! Benchmarking setup for pallet_api::messaging + +use alloc::{vec, vec::Vec}; +use core::u64; + +use ::ismp::{ + dispatcher::{DispatchGet, DispatchPost}, + host::StateMachine, + module::IsmpModule, + router::{ + GetRequest, GetResponse, PostRequest, PostResponse, Request, Response, StorageValue, + Timeout, + }, +}; +use ::xcm::latest::{Junctions, Location, Response::ExecutionResult}; +use codec::Encode; +use frame_benchmarking::v2::*; +use frame_support::{ + assert_ok, + pallet_prelude::{IsType, Weight}, + traits::{ + fungible::{Inspect, Mutate, MutateHold}, + EnsureOrigin, Get, Time, + }, +}; +use pallet_revive::{ + precompiles::{ + alloy::primitives as alloy, + run::{H256, U256}, + }, + test_utils::ALICE_ADDR, + AddressMapper as _, Origin, +}; +use sp_io::hashing::blake2_256; +use sp_runtime::{traits::Bounded, BoundedVec}; + +use super::{ + call_precompile, + precompiles::{ + ismp::v0::{self as ismp, IISMPCalls, IISMP}, + v0::{IMessaging, IMessagingCalls}, + xcm::v0::{self as xcm, BlockNumberOf, IXCMCalls, IXCM}, + }, + set_up_call, + transports::{ + ismp::{get, post, Handler, ID}, + xcm::new_query, + }, + Call, Callback, Config, Encoding, Event, HoldReason, IsmpRequests, Message, MessageId, + Messages, Pallet, +}; +use crate::messaging::BalanceOf; +#[cfg(test)] +use crate::mock::{ExtBuilder, Test}; + +type AddressMapper = ::AddressMapper; +type Balances = ::Fungibles; +type HostStateMachine = ::HostStateMachine; +type Ismp = super::precompiles::ismp::v0::Ismp<4, T>; +type Messaging = super::precompiles::v0::Messaging<3, T>; +type Xcm = super::precompiles::xcm::v0::Xcm<5, T>; + +#[benchmarks( + where + // Precompiles + T: pallet_revive::Config< + Currency: Inspect<::AccountId, Balance: Into + TryFrom + TryFrom>, + Hash: IsType, + Time: Time> + >, + // Messaging + BalanceOf: Bounded + TryFrom + TryInto, + T: pallet_ismp::Config + pallet_xcm::Config, + u32: From>, + // Timestamp + T: pallet_timestamp::Config +)] +mod benchmarks { + use super::*; + + #[benchmark] + fn block_number() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let input = IXCMCalls::blockNumber(IXCM::blockNumberCall {}); + + #[block] + { + assert_ok!(call_precompile::, _, u32>(&mut ext, &Xcm::::address(), &input)); + } + } + + #[benchmark] + fn get_response() { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let message = 1; + + Messages::::insert( + &origin, + message, + Message::IsmpResponse { + commitment: [255; 32].into(), + message_deposit: BalanceOf::::max_value(), + response: BoundedVec::try_from(vec![255; T::MaxResponseLen::get() as usize]) + .unwrap(), + }, + ); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(origin)); + let mut ext = call_setup.ext().0; + let input = IMessagingCalls::getResponse(IMessaging::getResponseCall { message }); + + #[block] + { + assert_ok!(call_precompile::, _, u32>( + &mut ext, + &Messaging::::address(), + &input + )); + } + } + + /// Sends a `Get` request using ISMP with varying context and key sizes. + /// + /// # Parameters + /// - `y`: `Linear<0, { T::MaxContextLen::get() }>` Length of the context field (in bytes). + /// - `z`: `Linear<0, { T::MaxKeys::get() }>` Number of keys in the outer keys array. + /// - `a`: `Linear<0, 1>` Whether a callback is attached: + /// - `0`: No callback + /// - `1`: Callback attached + // IMPORTANT NOTE: `skip_meta` and `pov_mode = Measured` currently used due to an issue with the + // usage of the `RequestCommitments` storage item within `pallet_ismp`'s child trie, which + // results in massive proof size values resulting from complexity parameters, preventing + // compilation of the resulting weights. Reducing max limits on pallet config also avoids the + // issue, but results in values which are too small to be useful. See `pallet-contracts` and + // `pallet-revive` benchmarks for similar usage with contract child tries. + #[benchmark(skip_meta, pov_mode = Measured)] + fn ismp_get( + x: Linear<0, { T::MaxContextLen::get() }>, + y: Linear<0, { T::MaxKeys::get() }>, + a: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let request = ismp::Get { + destination: u32::MAX, + height: u32::MAX, + timeout: u64::MAX, + context: vec![255; x as usize].into(), + keys: vec![vec![255u8; T::MaxKeyLen::get() as usize].into(); y as usize].into(), + }; + let fee = >::minimum_balance() + .try_into() + .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; + + silence_timestamp_genesis_warnings::(); + >::set_balance(&origin, >::total_issuance() / 2u32.into()); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(origin.clone())); + let mut ext = call_setup.ext().0; + let input = if x == 0 { + IISMPCalls::get_0(IISMP::get_0Call { request, fee }) + } else { + let callback = ismp::Callback { + destination: [255; 20].into(), + encoding: ismp::Encoding::SolidityAbi, + selector: [255; 4].into(), + weight: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + }; + IISMPCalls::get_1(IISMP::get_1Call { request, fee, callback }) + }; + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &Ismp::::address(), &input)); + } + + Ok(()) + } + + /// Handles a response to a previously submitted ISMP request. + /// + /// # Parameters + /// - `x`: `Linear<0, 1>` The type of ISMP response: + /// - `0`: `GetResponse` + /// - `1`: `PostResponse` + #[benchmark] + fn ismp_on_response(x: Linear<0, 1>) { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let fee = >::minimum_balance(); + let callback = Callback::new( + [255; 20].into(), + Encoding::Scale, + [255; 4], + Weight::from_parts(100_000, 100_000), + ); + let handler = Handler::::new(); + + silence_timestamp_genesis_warnings::(); + >::set_balance(&origin, u32::MAX.into()); + + let (id, commitment, response) = ismp_request::(x, &origin, fee, callback); + + #[block] + { + handler.on_response(response).unwrap() + } + + let event = match x { + 0 => Event::IsmpGetResponseReceived { dest: origin, id, commitment }, + _ => Event::IsmpPostResponseReceived { dest: origin, id, commitment }, + }; + assert_has_event::(event.into()) + } + + /// Handles timeout of a pending ISMP request or response. + /// + /// # Parameters + /// - `x`: `Linear<0, 2>` Type of item that timed out: + /// - `0`: `GetRequest` + /// - `1`: `PostRequest` + /// - `2`: `PostResponse` + #[benchmark] + fn ismp_on_timeout(x: Linear<0, 2>) -> Result<(), BenchmarkError> { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let fee = >::minimum_balance(); + let callback = Callback::new( + [255; 20].into(), + Encoding::Scale, + [255; 4], + Weight::from_parts(100_000, 100_000), + ); + let handler = Handler::::new(); + + silence_timestamp_genesis_warnings::(); + >::set_balance(&origin, u32::MAX.into()); + + let (_, commitment, response) = ismp_request::(x, &origin, fee, callback); + let timeout = match x { + 0 => { + let Response::Get(response) = response else { + return Err(BenchmarkError::Stop("unexpected response")); + }; + Timeout::Request(Request::Get(response.get)) + }, + _ => { + let Response::Post(response) = response else { + return Err(BenchmarkError::Stop("unexpected response")); + }; + match x { + 1 => Timeout::Request(Request::Post(response.post)), + _ => Timeout::Response(response), + } + }, + }; + + #[block] + { + handler.on_timeout(timeout).unwrap() + } + + assert_has_event::(Event::::IsmpTimedOut { commitment }.into()); + Ok(()) + } + + /// Sends a `Post` request using ISMP with a variable-sized data payload. + /// + /// # Parameters + /// - `x`: `Linear<0, { T::MaxDataLen::get() }>` Length of the `data` field (in bytes). + /// - `y`: `Linear<0, 1>` Whether a callback is attached: + /// - `0`: No callback + /// - `1`: Callback attached + // IMPORTANT NOTE: `skip_meta` and `pov_mode = Measured` currently used due to an issue with the + // usage of the `RequestCommitments` storage item within `pallet_ismp`'s child trie, which + // results in massive proof size values resulting from complexity parameters, preventing + // compilation of the resulting weights. Reducing max limits on pallet config also avoids the + // issue, but results in values which are too small to be useful. See `pallet-contracts` and + // `pallet-revive` benchmarks for similar usage with contract child tries. + #[benchmark(skip_meta, pov_mode = Measured)] + fn ismp_post( + x: Linear<0, { T::MaxDataLen::get() }>, + y: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let request = ismp::Post { + destination: u32::MAX, + timeout: u64::MAX, + data: vec![255; x as usize].into(), + }; + let fee = >::minimum_balance() + .try_into() + .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; + + silence_timestamp_genesis_warnings::(); + >::set_balance(&origin, >::total_issuance() / 2u32.into()); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(origin)); + let mut ext = call_setup.ext().0; + let input = if y == 0 { + IISMPCalls::post_0(IISMP::post_0Call { request, fee }) + } else { + let callback = ismp::Callback { + destination: [255; 20].into(), + encoding: ismp::Encoding::SolidityAbi, + selector: [255; 4].into(), + weight: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + }; + IISMPCalls::post_1(IISMP::post_1Call { request, fee, callback }) + }; + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &Ismp::::address(), &input)); + } + + Ok(()) + } + + #[benchmark] + fn poll_status() { + let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let message = 1; + + Messages::::insert( + &origin, + message, + Message::IsmpResponse { + commitment: [255; 32].into(), + message_deposit: BalanceOf::::max_value(), + response: BoundedVec::try_from(vec![255; T::MaxResponseLen::get() as usize]) + .unwrap(), + }, + ); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(origin)); + let mut ext = call_setup.ext().0; + let input = IMessagingCalls::pollStatus(IMessaging::pollStatusCall { message }); + + #[block] + { + assert_ok!(call_precompile::, _, u32>( + &mut ext, + &Messaging::::address(), + &input + )); + } + } + + /// # Parameters + /// - `x`: `Linear<1, { T::MaxRemovals::get() }>` The number of message removals to perform + /// (bounded by `MaxRemovals`). + #[benchmark] + fn remove(x: Linear<1, { T::MaxRemovals::get() }>) { + let message_deposit = 50_000u32.into(); + let callback_deposit = 100_000u32.into(); + let owner = >::to_account_id(&ALICE_ADDR); + let messages: Vec = (0..x as MessageId).collect(); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + + >::set_balance(&owner, u32::MAX.into()); + for i in &messages { + T::Fungibles::hold(&HoldReason::Messaging.into(), &owner, message_deposit).unwrap(); + T::Fungibles::hold(&HoldReason::CallbackGas.into(), &owner, callback_deposit).unwrap(); + + let commitment = H256::from(blake2_256(&(i.to_le_bytes()))); + + // Timeout messages release callback deposit hence, are most expensive case for now. + let good_message = Message::IsmpTimeout { + commitment: commitment.clone(), + message_deposit, + callback_deposit: Some(callback_deposit), + }; + + Messages::::insert(&owner, &i, &good_message); + IsmpRequests::::insert(&commitment, (&owner, i)); + } + + let input = + IMessagingCalls::remove_1(IMessaging::remove_1Call { messages: messages.into() }); + + #[block] + { + assert_ok!(call_precompile::, _, ()>( + &mut ext, + &Messaging::::address(), + &input + )); + } + } + + /// Submits a new XCM query message with an optional callback. + /// + /// # Parameters + /// - `x`: `Linear<0, 1>` Whether a callback is supplied: + /// - `0`: No callback + /// - `1`: Callback attached + #[benchmark] + fn xcm_new_query(x: Linear<0, 1>) { + let owner = >::to_account_id(&ALICE_ADDR); + let responder = Location { parents: 1, interior: Junctions::Here }.encode().into(); + let timeout = u32::from(frame_system::Pallet::::block_number()) + 1_000; + + >::set_balance(&owner, u32::MAX.into()); + + let mut call_setup = set_up_call(); + call_setup.set_origin(Origin::Signed(owner.clone())); + let mut ext = call_setup.ext().0; + let input = if x == 0 { + IXCMCalls::newQuery_0(IXCM::newQuery_0Call { responder, timeout }) + } else { + let callback = xcm::Callback { + destination: [255; 20].into(), + encoding: xcm::Encoding::SolidityAbi, + selector: [0; 4].into(), + weight: xcm::Weight { refTime: 100, proofSize: 100 }, + }; + IXCMCalls::newQuery_1(IXCM::newQuery_1Call { responder, timeout, callback }) + }; + + #[block] + { + assert_ok!(call_precompile::, _, ()>(&mut ext, &Xcm::::address(), &input)); + } + } + + /// Handles a response from an XCM query and executes a callback if present. + /// + /// No benchmark input parameters. A mock response is created and processed. + #[benchmark] + fn xcm_response() { + let owner = >::to_account_id(&ALICE_ADDR); + let responder = Location { parents: 1, interior: Junctions::Here }; + let timeout = frame_system::Pallet::::block_number() + 1u8.into(); + let callback = Some(Callback { + destination: [255; 20].into(), + encoding: Encoding::Scale, + selector: [0; 4], + weight: Weight::from_parts(100, 100), + }); + let response_origin = T::XcmResponseOrigin::try_successful_origin().unwrap(); + let response = ExecutionResult(None); + + >::set_balance(&owner, u32::MAX.into()); + + let (id, query_id) = new_query::(&owner, responder, timeout, callback).unwrap(); + + #[extrinsic_call] + Pallet::::xcm_response(response_origin, query_id, response.clone()); + + assert_has_event::( + Event::XcmResponseReceived { dest: owner.clone(), id, query_id, response }.into(), + ); + } + + impl_benchmark_test_suite!(Pallet, ExtBuilder::new().build(), Test); +} + +// See if `generic_event` has been emitted. +fn assert_has_event(generic_event: ::RuntimeEvent) { + frame_system::Pallet::::assert_has_event(generic_event.into()); +} + +fn ismp_request( + x: u32, + origin: &T::AccountId, + fee: BalanceOf, + callback: Callback, +) -> (MessageId, H256, Response) { + if x == 0 { + // get response + let request = DispatchGet { + dest: StateMachine::Polkadot(u32::MAX), + from: ID.to_vec(), + keys: vec![vec![255u8; T::MaxKeyLen::get() as usize]; T::MaxKeys::get() as usize], + height: u64::MAX, + context: vec![255u8; T::MaxContextLen::get() as usize], + timeout: u64::MAX, + }; + + let value = StorageValue { key: vec![255u8; 1], value: Some(vec![255u8; 1]) }; + let response = GetResponse { + get: GetRequest { + source: HostStateMachine::::get(), + dest: request.dest, + nonce: 0, + from: request.from.clone(), + keys: request.keys.clone(), + height: request.height, + context: request.context.clone(), + timeout_timestamp: request.timeout, + }, + values: (0..(T::MaxResponseLen::get() as usize / value.encoded_size()) + .saturating_sub(1)) + .map(|_| value.clone()) + .collect::>(), + }; + + let (id, commitment) = get::(origin, request, fee, Some(callback)).unwrap(); + (id, commitment, Response::Get(response)) + } else { + // post response + let request = DispatchPost { + dest: StateMachine::Polkadot(u32::MAX), + from: ID.to_vec(), + to: ID.to_vec(), + timeout: u64::MAX, + body: vec![255u8; T::MaxDataLen::get() as usize], + }; + + let response = PostResponse { + post: PostRequest { + source: HostStateMachine::::get(), + dest: request.dest, + nonce: 0, + from: request.from.clone(), + to: request.to.clone(), + timeout_timestamp: request.timeout, + body: request.body.clone(), + }, + response: vec![255u8; T::MaxResponseLen::get() as usize - 2], + timeout_timestamp: request.timeout, + }; + + let (id, commitment) = post::(origin, request, fee, Some(callback)).unwrap(); + (id, commitment, Response::Post(response)) + } +} + +// Silence ``pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0` +// warnings +fn silence_timestamp_genesis_warnings() { + pallet_timestamp::Pallet::::set_timestamp(1u32.into()); +} diff --git a/pallets/api-vnext/src/messaging/precompiles.rs b/pallets/api-vnext/src/messaging/precompiles.rs index 4a4e55846..fc5c15992 100644 --- a/pallets/api-vnext/src/messaging/precompiles.rs +++ b/pallets/api-vnext/src/messaging/precompiles.rs @@ -1,10 +1,7 @@ use alloc::vec; pub(super) use pallet_revive::precompiles::{ - alloy::{ - primitives::{ruint::UintTryTo, U256}, - sol_types::SolCall, - }, + alloy::{primitives::U256, sol_types::SolCall}, AddressMatcher::Fixed, RuntimeCosts, }; diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 2c08d1eb4..82a7ce68e 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -19,7 +19,7 @@ pub struct Ismp(PhantomData); impl Precompile for Ismp where - U256: UintTryTo>, + BalanceOf: TryFrom, { type Interface = IISMPCalls; type T = T; @@ -51,8 +51,11 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_get::(request)?; + let fee = (*fee) + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = get::(origin, message, fee.saturating_to(), None)?; + let (id, commitment) = get::(origin, message, fee, None)?; let origin = AddressMapper::::to_address(origin).0.into(); let event = GetDispatched_0 { origin, id, commitment: commitment.0.into() }; @@ -76,19 +79,17 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_get::(request)?; + let fee = (*fee) + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = get::( - env.caller().account_id()?, - message, - fee.saturating_to(), - Some(callback.into()), - )?; + let (id, commitment) = get::(origin, message, fee, Some(callback.into()))?; let origin = AddressMapper::::to_address(origin).0.into(); let commitment = commitment.0.into(); let event = GetDispatched_1 { origin, id, commitment, callback: callback.clone() }; deposit_event(env, event)?; - Ok(get_0Call::abi_encode_returns(&id)) + Ok(get_1Call::abi_encode_returns(&id)) }, IISMPCalls::getResponse(getResponseCall { message }) => { env.charge(::WeightInfo::get_response())?; @@ -116,8 +117,11 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_post::(request)?; + let fee = (*fee) + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = post::(origin, message, fee.saturating_to(), None)?; + let (id, commitment) = post::(origin, message, fee, None)?; let origin = AddressMapper::::to_address(origin).0.into(); let event = PostDispatched_0 { origin, id, commitment: commitment.0.into() }; @@ -136,13 +140,12 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_post::(request)?; + let fee = (*fee) + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = post::( - env.caller().account_id()?, - message, - fee.saturating_to(), - Some(callback.into()), - )?; + let (id, commitment) = + post::(env.caller().account_id()?, message, fee, Some(callback.into()))?; let origin = AddressMapper::::to_address(origin).0.into(); let commitment = commitment.0.into(); @@ -182,6 +185,13 @@ where } } +impl Ismp { + /// The address of the precompile. + pub const fn address() -> [u8; 20] { + fixed_address(FIXED) + } +} + fn try_get(value: &Get) -> Result { // TODO: additional error variants vs revive::DecodingFailed ensure!(value.context.len() as u32 <= T::MaxContextLen::get(), Error::::TooManyMessages); diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 1548d994a..d340a8661 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -1,11 +1,11 @@ pub(crate) use IMessaging::*; +pub(crate) use IMessagingCalls; use super::*; use crate::messaging::{ self, precompiles::v0::IMessaging::{ getResponseCall, pollStatusCall, remove_0Call, remove_0Return, remove_1Call, - IMessagingCalls, }, Config, }; @@ -78,6 +78,13 @@ impl } } +impl Messaging { + /// The address of the precompile. + pub const fn address() -> [u8; 20] { + fixed_address(FIXED) + } +} + impl From for IMessaging::MessageStatus { fn from(value: messaging::MessageStatus) -> Self { use messaging::MessageStatus::*; diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 0fd528b4d..90bfdb5e1 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -12,7 +12,8 @@ sol!( "src/messaging/precompiles/interfaces/v0/IXCM.sol" ); -type BlockNumberOf = <<::Block as Block>::Header as Header>::Number; +pub(crate) type BlockNumberOf = + <<::Block as Block>::Header as Header>::Number; /// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus /// Messaging (XCM). @@ -174,6 +175,13 @@ where } } +impl Xcm { + /// The address of the precompile. + pub const fn address() -> [u8; 20] { + fixed_address(FIXED) + } +} + impl From<&Callback> for super::Callback { fn from(callback: &Callback) -> Self { Self::new( diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 61844d07d..8ee09b554 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -15,7 +15,10 @@ use frame_support::{ }; use pallet_ismp::weights::IsmpModuleWeight; -use super::*; +use super::{ + super::{Message, Pallet}, + *, +}; type DbWeightOf = ::DbWeight; @@ -143,7 +146,7 @@ pub(crate) fn process_response( let (initiating_origin, id) = IsmpRequests::::get(commitment) .ok_or(::ismp::Error::Custom("Request not found.".into()))?; - let Some(super::super::Message::Ismp { commitment, callback, message_deposit }) = + let Some(Message::Ismp { commitment, callback, message_deposit }) = Messages::::get(&initiating_origin, id) else { return Err(::ismp::Error::Custom("Message must be an ismp request.".into()).into()); @@ -178,11 +181,7 @@ pub(crate) fn process_response( Messages::::insert( &initiating_origin, id, - super::super::Message::IsmpResponse { - commitment, - message_deposit, - response: encoded_response, - }, + Message::IsmpResponse { commitment, message_deposit, response: encoded_response }, ); Ok(()) } @@ -192,12 +191,11 @@ pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), any "Request commitment not found while processing timeout.".into(), ))?; Messages::::try_mutate(key.0, key.1, |message| { - let Some(super::super::Message::Ismp { commitment, message_deposit, callback }) = message - else { + let Some(Message::Ismp { commitment, message_deposit, callback }) = message else { return Err(::ismp::Error::Custom("Invalid message".into())); }; let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); - *message = Some(super::super::Message::IsmpTimeout { + *message = Some(Message::IsmpTimeout { message_deposit: *message_deposit, commitment: *commitment, callback_deposit, @@ -205,9 +203,7 @@ pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), any Ok(()) })?; - crate::messaging::Pallet::::deposit_event(Event::::IsmpTimedOut { - commitment: *commitment, - }); + Pallet::::deposit_event(Event::::IsmpTimedOut { commitment: *commitment }); Ok(()) } @@ -233,7 +229,7 @@ impl IsmpModule for Handler { // Hash request to determine key for message lookup. match response { Response::Get(GetResponse { get, values }) => { - log::debug!(target: "pop-api::extension", "StorageValue={:?}", values); + log::debug!(target: "pop-api::messaging::ismp", "StorageValue={:?}", values); let commitment = hash_request::(&Request::Get(get)); process_response(&commitment, &values, |dest, id| { Event::::IsmpGetResponseReceived { dest, id, commitment } @@ -271,8 +267,8 @@ impl IsmpModuleWeight for Pallet { fn on_timeout(&self, timeout: &Timeout) -> Weight { let x = match timeout { - Timeout::Request(Request::Post(_)) => 0u32, - Timeout::Request(Request::Get(_)) => 1u32, + Timeout::Request(Request::Get(_)) => 0u32, + Timeout::Request(Request::Post(_)) => 1u32, Timeout::Response(_) => 2u32, }; T::WeightInfo::ismp_on_timeout(x) @@ -281,11 +277,11 @@ impl IsmpModuleWeight for Pallet { // todo: test fn on_response(&self, response: &Response) -> Weight { let x = match response { - Response::Get(_) => 1, - Response::Post(_) => 0, + Response::Get(_) => 0, + Response::Post(_) => 1, }; - T::WeightInfo::ismp_on_response(x).saturating_add(T::CallbackExecutor::execution_weight()) // Also add actual weight consumed by contract env. + T::WeightInfo::ismp_on_response(x).saturating_add(T::CallbackExecutor::execution_weight()) } } diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index 81f1d16e1..dad11c5d3 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -1,61 +1,374 @@ -use frame_support::pallet_prelude::Weight; +//! Autogenerated weights for `pallet_api_vnext::messaging` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-07-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `R0GUE`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` + +// Executed Command: +// ./target/release/pop-node +// benchmark +// pallet +// --chain=pop-devnet-dev +// --wasm-execution=compiled +// --pallet=pallet-api-vnext::messaging +// --steps=50 +// --repeat=20 +// --json +// --template=./scripts/templates/pallet-weight-template.hbs +// --output=./pallets/api-vnext/src/messaging/weights.rs +// --extrinsic= + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use core::marker::PhantomData; + +/// Weight functions needed for `pallet_api_vnext::messaging`. pub trait WeightInfo { fn block_number() -> Weight; fn get_response() -> Weight; + fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight; + fn ismp_on_response(x: u32, ) -> Weight; + fn ismp_on_timeout(x: u32, ) -> Weight; + fn ismp_post(x: u32, y: u32, ) -> Weight; fn poll_status() -> Weight; - fn remove(x: u32) -> Weight; - fn xcm_new_query(x: u32) -> Weight; + fn remove(x: u32, ) -> Weight; + fn xcm_new_query(x: u32, ) -> Weight; fn xcm_response() -> Weight; - fn ismp_on_response(x: u32) -> Weight; - fn ismp_on_timeout(x: u32) -> Weight; - fn ismp_get(x: u32, y: u32, a: u32) -> Weight; - fn ismp_post(x: u32, y: u32) -> Weight; - fn top_up_callback_weight() -> Weight; } -impl WeightInfo for () { +/// Weights for `pallet_api_vnext::messaging` using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { fn block_number() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) } - + /// Storage: `Messaging::Messages` (r:1 w:0) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) fn get_response() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `740` + // Estimated: `16283` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 16283) + .saturating_add(T::DbWeight::get().reads(1_u64)) } - + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 64]`. + /// The range of component `y` is `[0, 10]`. + /// The range of component `a` is `[0, 1]`. + fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `771` + // Estimated: `771` + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(97_276_764, 771) + // Standard Error: 3_693 + .saturating_add(Weight::from_parts(40_699, 0).saturating_mul(x.into())) + // Standard Error: 22_658 + .saturating_add(Weight::from_parts(208_784, 0).saturating_mul(y.into())) + // Standard Error: 152_716 + .saturating_add(Weight::from_parts(186_089, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + } + /// Storage: `Messaging::IsmpRequests` (r:1 w:1) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// The range of component `x` is `[0, 1]`. + fn ismp_on_response(_x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `610` + // Estimated: `16283` + // Minimum execution time: 65_000_000 picoseconds. + Weight::from_parts(76_175_510, 16283) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Messaging::IsmpRequests` (r:1 w:0) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// The range of component `x` is `[0, 2]`. + fn ismp_on_timeout(_x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `395` + // Estimated: `16283` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_209_116, 16283) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 512]`. + /// The range of component `y` is `[0, 1]`. + fn ismp_post(x: u32, y: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `771` + // Estimated: `771` + // Minimum execution time: 75_000_000 picoseconds. + Weight::from_parts(77_228_752, 771) + // Standard Error: 299 + .saturating_add(Weight::from_parts(3_834, 0).saturating_mul(x.into())) + // Standard Error: 99_842 + .saturating_add(Weight::from_parts(23_740_891, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + } + /// Storage: `Messaging::Messages` (r:1 w:0) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) fn poll_status() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `740` + // Estimated: `16283` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 16283) + .saturating_add(T::DbWeight::get().reads(1_u64)) } - - fn remove(_x: u32) -> Weight { - Default::default() + /// Storage: `Messaging::Messages` (r:100 w:100) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `Messaging::IsmpRequests` (r:0 w:100) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 100]`. + fn remove(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `431 + x * (97 ±0)` + // Estimated: `3694 + x * (15293 ±0)` + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(16_254_511, 3694) + // Standard Error: 45_155 + .saturating_add(Weight::from_parts(40_645_291, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 15293).saturating_mul(x.into())) } - - fn xcm_new_query(_x: u32) -> Weight { - Default::default() + /// Storage: `Messaging::NextMessageId` (r:1 w:1) + /// Proof: `Messaging::NextMessageId` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Messaging::XcmQueryTimeouts` (r:1 w:1) + /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(4006), added: 6481, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messaging::XcmQueries` (r:0 w:1) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:0 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 1]`. + fn xcm_new_query(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `309` + // Estimated: `7471` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(49_516_326, 7471) + // Standard Error: 158_346 + .saturating_add(Weight::from_parts(14_483_673, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } - + /// Storage: `Messaging::XcmQueries` (r:1 w:1) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn xcm_response() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `569` + // Estimated: `16283` + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(57_000_000, 16283) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } +} - fn ismp_on_response(_x: u32) -> Weight { - Default::default() +// For backwards compatibility and tests. +impl WeightInfo for () { + fn block_number() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) } - - fn ismp_on_timeout(_x: u32) -> Weight { - Default::default() + /// Storage: `Messaging::Messages` (r:1 w:0) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + fn get_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `740` + // Estimated: `16283` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 16283) + .saturating_add(RocksDbWeight::get().reads(1_u64)) } - - fn ismp_get(_x: u32, _y: u32, _a: u32) -> Weight { - Default::default() + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 64]`. + /// The range of component `y` is `[0, 10]`. + /// The range of component `a` is `[0, 1]`. + fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `771` + // Estimated: `771` + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(97_276_764, 771) + // Standard Error: 3_693 + .saturating_add(Weight::from_parts(40_699, 0).saturating_mul(x.into())) + // Standard Error: 22_658 + .saturating_add(Weight::from_parts(208_784, 0).saturating_mul(y.into())) + // Standard Error: 152_716 + .saturating_add(Weight::from_parts(186_089, 0).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } - - fn ismp_post(_x: u32, _y: u32) -> Weight { - Default::default() + /// Storage: `Messaging::IsmpRequests` (r:1 w:1) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// The range of component `x` is `[0, 1]`. + fn ismp_on_response(_x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `610` + // Estimated: `16283` + // Minimum execution time: 65_000_000 picoseconds. + Weight::from_parts(76_175_510, 16283) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } - - fn top_up_callback_weight() -> Weight { - Default::default() + /// Storage: `Messaging::IsmpRequests` (r:1 w:0) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// The range of component `x` is `[0, 2]`. + fn ismp_on_timeout(_x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `395` + // Estimated: `16283` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_209_116, 16283) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 512]`. + /// The range of component `y` is `[0, 1]`. + fn ismp_post(x: u32, y: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `771` + // Estimated: `771` + // Minimum execution time: 75_000_000 picoseconds. + Weight::from_parts(77_228_752, 771) + // Standard Error: 299 + .saturating_add(Weight::from_parts(3_834, 0).saturating_mul(x.into())) + // Standard Error: 99_842 + .saturating_add(Weight::from_parts(23_740_891, 0).saturating_mul(y.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) + } + /// Storage: `Messaging::Messages` (r:1 w:0) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + fn poll_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `740` + // Estimated: `16283` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 16283) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: `Messaging::Messages` (r:100 w:100) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `Messaging::IsmpRequests` (r:0 w:100) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 100]`. + fn remove(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `431 + x * (97 ±0)` + // Estimated: `3694 + x * (15293 ±0)` + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(16_254_511, 3694) + // Standard Error: 45_155 + .saturating_add(Weight::from_parts(40_645_291, 0).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 15293).saturating_mul(x.into())) + } + /// Storage: `Messaging::NextMessageId` (r:1 w:1) + /// Proof: `Messaging::NextMessageId` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Messaging::XcmQueryTimeouts` (r:1 w:1) + /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(4006), added: 6481, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Messaging::XcmQueries` (r:0 w:1) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:0 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[0, 1]`. + fn xcm_new_query(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `309` + // Estimated: `7471` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(49_516_326, 7471) + // Standard Error: 158_346 + .saturating_add(Weight::from_parts(14_483_673, 0).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) + } + /// Storage: `Messaging::XcmQueries` (r:1 w:1) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Messaging::Messages` (r:1 w:1) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn xcm_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `569` + // Estimated: `16283` + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(57_000_000, 16283) + .saturating_add(RocksDbWeight::get().reads(4_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } } + diff --git a/runtime/devnet/src/config/ismp.rs b/runtime/devnet/src/config/ismp.rs index 3b0693e8c..3ee7b815d 100644 --- a/runtime/devnet/src/config/ismp.rs +++ b/runtime/devnet/src/config/ismp.rs @@ -2,7 +2,7 @@ use alloc::{boxed::Box, vec::Vec}; use frame_support::traits::Get; use frame_system::EnsureRoot; -use ismp::{host::StateMachine, module::IsmpModule, router::IsmpRouter}; +use ismp::{error::Error, host::StateMachine, module::IsmpModule, router::IsmpRouter}; use ismp_parachain::ParachainConsensusClient; use crate::{ @@ -47,6 +47,10 @@ impl Get for HostStateMachine { pub struct Router; impl IsmpRouter for Router { fn module_for_id(&self, id: Vec) -> Result, anyhow::Error> { - Err(anyhow::anyhow!("Module not found: {:?}", id)) + use pallet_api_vnext::messaging::transports::ismp::*; + if id == ID { + return Ok(Box::new(Handler::::new())); + } + Err(Error::ModuleNotFound(id).into()) } } diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 68b7ae81c..409cd4b89 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -749,6 +749,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [cumulus_pallet_weight_reclaim, WeightReclaim] [pallet_api_vnext::fungibles, FungiblesvNext] + [pallet_api_vnext::messaging, Messaging] ); } From 4a3c8c6301b55338a295596b0f0bbb80033eb3fd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 10 Jul 2025 12:56:53 +0100 Subject: [PATCH 200/284] refactor(ismp): use u64 height Destination state machine could use larger type, so standardise on the same type provided by ismp. --- pallets/api-vnext/src/messaging/benchmarking.rs | 2 +- .../src/messaging/precompiles/interfaces/v0/IISMP.sol | 2 +- pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs | 6 +++--- pop-api-vnext/examples/messaging/lib.rs | 4 ++-- pop-api-vnext/src/messaging/ismp.rs | 4 ++-- pop-api-vnext/src/messaging/ismp/v0.rs | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 93a2d766f..3a895b0e3 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -144,7 +144,7 @@ mod benchmarks { let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); let request = ismp::Get { destination: u32::MAX, - height: u32::MAX, + height: u64::MAX, timeout: u64::MAX, context: vec![255; x as usize].into(), keys: vec![vec![255u8; T::MaxKeyLen::get() as usize].into(); y as usize].into(), diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index f3354deaa..5f026c56a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -90,7 +90,7 @@ interface IISMP { /// @custom:property The destination state machine of this request. uint32 destination; /// @custom:property Height at which to read the state machine. - uint32 height; + uint64 height; /// @custom:property Relative from the current timestamp at which this request expires in seconds. uint64 timeout; /// @custom:property Some application-specific metadata relating to this request. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 82a7ce68e..2e74039b5 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -291,7 +291,7 @@ mod tests { let message = 1; let request = IISMP::Get { destination: 1_000, - height: u32::MAX, + height: u64::MAX, timeout: u64::MAX, context: vec![255u8; 64].into(), keys: vec![vec![255u8; 32].into()].into(), @@ -325,7 +325,7 @@ mod tests { let message = 1; let request = IISMP::Get { destination: 1_000, - height: u32::MAX, + height: u64::MAX, timeout: u64::MAX, context: vec![255u8; 64].into(), keys: vec![vec![255u8; 32].into()].into(), @@ -557,7 +557,7 @@ mod tests { nonce: pallet_ismp::Nonce::::get(), from: ID.to_vec(), keys: request.keys.iter().map(|key| key.to_vec()).collect(), - height: request.height as u64, + height: request.height, context: request.context.to_vec(), timeout_timestamp: Timestamp::now().as_secs() + request.timeout, }) diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index b134cc296..d4de5254b 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -48,7 +48,7 @@ mod messaging { } #[ink(message)] - pub fn get(&mut self, key: Vec, height: u32) { + pub fn get(&mut self, key: Vec, height: u64) { // self.id = self.id.saturating_add(1); let id = ismp::get( Get::new(self.para, height, 0, Vec::default(), Vec::from([key.clone()])), @@ -195,7 +195,7 @@ mod messaging { #[ink(topic)] pub id: MessageId, pub key: Vec, - pub height: BlockNumber, + pub height: u64, } #[ink::event] diff --git a/pop-api-vnext/src/messaging/ismp.rs b/pop-api-vnext/src/messaging/ismp.rs index 8fac9059e..81c2b5029 100644 --- a/pop-api-vnext/src/messaging/ismp.rs +++ b/pop-api-vnext/src/messaging/ismp.rs @@ -1,8 +1,8 @@ pub use v0::*; use super::{ - contract_ref, fixed_address, BlockNumber, Bytes, MessageId, MessageStatus, Pop, Sol, SolDecode, - SolEncode, Vec, U256, + contract_ref, fixed_address, Bytes, MessageId, MessageStatus, Pop, Sol, SolDecode, SolEncode, + Vec, U256, }; /// The first version of the ISMP API. diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index acfe5d293..93f17d5b9 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -190,7 +190,7 @@ pub struct Get { /// The destination state machine of this request. pub destination: u32, /// Height at which to read the state machine. - pub height: BlockNumber, + pub height: u64, /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Some application-specific metadata relating to this request. @@ -203,7 +203,7 @@ impl Get { // TODO: docs pub fn new( destination: u32, - height: BlockNumber, + height: u64, timeout: u64, context: Vec, keys: Vec>, @@ -213,7 +213,7 @@ impl Get { } impl SolDecode for Get { - type SolType = (u32, BlockNumber, u64, Vec, Vec>); + type SolType = (u32, u64, u64, Vec, Vec>); fn from_sol_type(value: Self::SolType) -> Self { Self { @@ -226,7 +226,7 @@ impl SolDecode for Get { } } impl<'a> SolEncode<'a> for Get { - type SolType = (&'a u32, &'a BlockNumber, &'a u64, &'a Vec, &'a Vec>); + type SolType = (&'a u32, &'a u64, &'a u64, &'a Vec, &'a Vec>); fn to_sol_type(&'a self) -> Self::SolType { (&self.destination, &self.height, &self.timeout, &self.context, &self.keys) From 46526f10808b2d77c60084944fb7fe67d2f87511 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 15:31:12 +0100 Subject: [PATCH 201/284] refactor(api): update imports after rebase --- pallets/api-vnext/src/messaging.rs | 6 +++++- pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs | 2 +- pop-api-vnext/src/messaging.rs | 2 +- pop-api-vnext/src/sol.rs | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index bf5b42547..47505e1bd 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -1,6 +1,7 @@ use deposits::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, + ensure, pallet_prelude::*, storage::KeyLenOf, traits::{ @@ -15,7 +16,10 @@ use frame_support::{ }; use frame_system::pallet_prelude::*; pub use pallet::{Error, *}; -use pallet_revive::sp_runtime::traits::{SaturatedConversion, Saturating, TryConvert}; +use pallet_revive::{ + sp_runtime::traits::{SaturatedConversion, Saturating, TryConvert}, + H160, +}; use sp_runtime::ArithmeticError; use transports::{ ismp::IsmpDispatcher, diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 2e74039b5..d67f9b281 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -2,7 +2,7 @@ use ::ismp::{ dispatcher::{DispatchGet, DispatchPost}, host::StateMachine, }; -use frame_support::traits::Get as _; +use frame_support::{ensure, traits::Get as _}; pub(crate) use IISMP::{Get, *}; use super::*; diff --git a/pop-api-vnext/src/messaging.rs b/pop-api-vnext/src/messaging.rs index 237e36dbb..f6a5d7fa2 100644 --- a/pop-api-vnext/src/messaging.rs +++ b/pop-api-vnext/src/messaging.rs @@ -7,7 +7,7 @@ use ink::{ scale::{Compact, Encode}, U256, }; -use sol::*; +use sol::{Sol, SolDecode, SolEncode}; pub use v0::*; use super::*; diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index 82677b523..cad0a93f2 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolEncode}; +pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolDecode, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. From 3e468d0611c620436328ac4324d83fa1e95850d6 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 15:40:26 +0100 Subject: [PATCH 202/284] style: formatting after rebase --- pallets/api-vnext/Cargo.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index b2a3125f7..8b23b617e 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -41,14 +41,14 @@ fungibles = [ "dep:pallet-assets", "dep:pallet-balances" ] # Empty feature to satisfy clashes with ismp dependency during workspace builds using the "ismp" feature ismp = [ "dep:ismp" ] messaging = [ - "dep:anyhow", - "dep:ismp", - "dep:log", - "dep:pallet-ismp", - "dep:pallet-xcm", - "dep:sp-runtime", - "dep:xcm", - "dep:xcm-builder", + "dep:anyhow", + "dep:ismp", + "dep:log", + "dep:pallet-ismp", + "dep:pallet-xcm", + "dep:sp-runtime", + "dep:xcm", + "dep:xcm-builder", ] runtime-benchmarks = [ "dep:pallet-timestamp", From a77d726d7f4902a76af9acb8a085b850dfa9d4cd Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 17:51:28 +0100 Subject: [PATCH 203/284] fix: remove duplicate imports after rebase --- pallets/api-vnext/src/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 1e0f12807..beb9ea254 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -31,11 +31,6 @@ use { pallet_revive::evm::U256, pallet_revive::precompiles::run::{CallSetup, WasmModule}, }; -#[cfg(feature = "runtime-benchmarks")] -use { - frame_support::{pallet_prelude::IsType, traits::fungible::Inspect}, - pallet_revive::precompiles::run::{CallSetup, WasmModule}, -}; #[cfg(test)] use { frame_support::{pallet_prelude::Weight, sp_runtime::traits::Bounded}, From b3be44ae8ad1b6234a2fa9d17c26b069087d8a37 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 14 Jul 2025 21:15:55 +0100 Subject: [PATCH 204/284] refactor(api): add initial messaging error handling --- pallets/api-vnext/src/messaging.rs | 13 ++-- .../api-vnext/src/messaging/precompiles.rs | 6 +- .../precompiles/interfaces/v0/IISMP.sol | 16 ++++ .../precompiles/interfaces/v0/IMessaging.sol | 7 ++ .../precompiles/interfaces/v0/IXCM.sol | 22 +++++- .../src/messaging/precompiles/ismp/v0.rs | 74 ++++++++++++++----- .../api-vnext/src/messaging/precompiles/v0.rs | 54 +++++++++++--- .../src/messaging/precompiles/xcm/v0.rs | 71 ++++++++++++++---- pallets/api-vnext/src/messaging/transports.rs | 2 + pop-api-vnext/examples/messaging/lib.rs | 23 +++--- pop-api-vnext/src/lib.rs | 1 + pop-api-vnext/src/messaging/ismp/v0.rs | 35 ++++++--- pop-api-vnext/src/messaging/ismp/v0/errors.rs | 53 +++++++++++++ pop-api-vnext/src/messaging/v0.rs | 14 +++- pop-api-vnext/src/messaging/v0/errors.rs | 37 ++++++++++ pop-api-vnext/src/messaging/xcm/v0.rs | 11 ++- pop-api-vnext/src/messaging/xcm/v0/errors.rs | 54 ++++++++++++++ pop-api-vnext/src/sol.rs | 2 +- 18 files changed, 414 insertions(+), 81 deletions(-) create mode 100644 pop-api-vnext/src/messaging/ismp/v0/errors.rs create mode 100644 pop-api-vnext/src/messaging/v0/errors.rs create mode 100644 pop-api-vnext/src/messaging/xcm/v0/errors.rs diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 47505e1bd..5bab0278b 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -1,7 +1,6 @@ use deposits::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, - ensure, pallet_prelude::*, storage::KeyLenOf, traits::{ @@ -46,6 +45,8 @@ pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - #[frame_support::pallet] pub mod pallet { + use frame_support::ensure; + use super::*; #[pallet::pallet] @@ -75,7 +76,7 @@ pub mod pallet { /// The maximum byte length for a single key of an ismp request. #[pallet::constant] type MaxKeyLen: Get; - /// The maximum amount of key for an outbound request. + /// The maximum number of keys for an outbound request. #[pallet::constant] type MaxKeys: Get; /// The maximum number of messages which can be removed at a time. @@ -121,11 +122,11 @@ pub mod pallet { MessageExists, /// The request is pending. RequestPending, - /// dispatching a call via ISMP falied + /// Dispatching a call via ISMP failed. IsmpDispatchFailed, - /// The message was not found + /// The message was not found. MessageNotFound, - /// The request has timed out + /// The request has timed out. RequestTimedOut, /// Timeouts must be in the future. FutureTimeoutMandatory, @@ -417,7 +418,7 @@ pub(crate) fn call( let max_weight = callback.weight; // Dont mutate state if blockspace will be saturated. - ensure!( + frame_support::ensure!( frame_system::BlockWeight::::get() .checked_accrue(max_weight, DispatchClass::Normal) .is_ok(), diff --git a/pallets/api-vnext/src/messaging/precompiles.rs b/pallets/api-vnext/src/messaging/precompiles.rs index fc5c15992..073595198 100644 --- a/pallets/api-vnext/src/messaging/precompiles.rs +++ b/pallets/api-vnext/src/messaging/precompiles.rs @@ -1,9 +1,13 @@ use alloc::vec; +use frame_support::{ + sp_runtime::{ArithmeticError, DispatchError, ModuleError}, + traits::PalletInfo, +}; pub(super) use pallet_revive::precompiles::{ alloy::{primitives::U256, sol_types::SolCall}, AddressMatcher::Fixed, - RuntimeCosts, + Error, RuntimeCosts, }; use super::*; diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index 5f026c56a..d27374381 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -142,6 +142,15 @@ interface IISMP { * @param callback The callback to be used to return the response. */ event PostDispatched(address origin, uint64 id, bytes32 commitment, Callback callback); + + /// @dev The context exceeds the maximum allowed size. + error MaxContextExceeded(); + /// @dev The data exceeds the maximum allowed size. + error MaxDataExceeded(); + /// @dev A key exceeds the maximum allowed size. + error MaxKeyExceeded(); + /// @dev The number of keys exceeds the maximum allowed size. + error MaxKeysExceeded(); } /// @notice A message callback. @@ -188,3 +197,10 @@ struct Weight { /// @custom:property The weight of storage space used by proof of validity. uint64 proofSize; } + +/// @dev The message was not found. +error MessageNotFound(); +/// @dev The request is pending. +error RequestPending(); +/// @dev The number of messages exceeds the limit. +error TooManyMessages(); diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol index e8d578c3e..d5b509b20 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol @@ -52,4 +52,11 @@ interface IMessaging { * @param messages The messages which were removed. */ event Removed(address account, uint64[] messages); + + /// @dev The message was not found. + error MessageNotFound(); + /// @dev The request is pending. + error RequestPending(); + /// @dev The number of messages exceeds the limit. + error TooManyMessages(); } diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index dc16a2166..aeb325c69 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -37,11 +37,12 @@ interface IXCM { * @param responder A SCALE-encoded versioned location of the XCM responder. * @param timeout Block number after which the query should timeout. A future block number is required. * @return id A unique message identifier. + * @return queryId The XCM query identifier. */ function newQuery( bytes calldata responder, uint32 timeout - ) external returns (uint64 id); + ) external returns (uint64 id, uint64 queryId); /** * @notice Initiate a new XCM query. @@ -50,12 +51,13 @@ interface IXCM { * @param timeout Block number after which the query should timeout. A future block number is required. * @param callback The callback to execute upon receiving a response. * @return id A unique message identifier. + * @return queryId The XCM query identifier. */ function newQuery( bytes calldata responder, uint32 timeout, Callback calldata callback - ) external returns (uint64 id); + ) external returns (uint64 id, uint64 queryId); /** * @notice Polls the status of a message. @@ -105,6 +107,15 @@ interface IXCM { * @param callback The callback to be used to return the response. */ event QueryCreated(address account, uint64 id, uint64 queryId, Callback callback); + + /// @dev The input failed to decode. + error DecodingFailed(); + /// @dev Timeouts must be in the future. + error FutureTimeoutMandatory(); + /// @dev Message block limit has been reached for this expiry block. Try a different timeout. + error MaxMessageTimeoutPerBlockReached(); + /// @dev Failed to convert origin. + error OriginConversionFailed(); } /// @notice A message callback. @@ -151,3 +162,10 @@ struct Weight { /// @custom:property The weight of storage space used by proof of validity. uint64 proofSize; } + +/// @dev The message was not found. +error MessageNotFound(); +/// @dev The request is pending. +error RequestPending(); +/// @dev The number of messages exceeds the limit. +error TooManyMessages(); diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index d67f9b281..00da004ee 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -55,7 +55,8 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = get::(origin, message, fee, None)?; + let (id, commitment) = + get::(origin, message, fee, None).map_err(Self::map_err)?; let origin = AddressMapper::::to_address(origin).0.into(); let event = GetDispatched_0 { origin, id, commitment: commitment.0.into() }; @@ -83,7 +84,8 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = get::(origin, message, fee, Some(callback.into()))?; + let (id, commitment) = + get::(origin, message, fee, Some(callback.into())).map_err(Self::map_err)?; let origin = AddressMapper::::to_address(origin).0.into(); let commitment = commitment.0.into(); @@ -121,7 +123,8 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; - let (id, commitment) = post::(origin, message, fee, None)?; + let (id, commitment) = + post::(origin, message, fee, None).map_err(Self::map_err)?; let origin = AddressMapper::::to_address(origin).0.into(); let event = PostDispatched_0 { origin, id, commitment: commitment.0.into() }; @@ -145,7 +148,8 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; let (id, commitment) = - post::(env.caller().account_id()?, message, fee, Some(callback.into()))?; + post::(env.caller().account_id()?, message, fee, Some(callback.into())) + .map_err(Self::map_err)?; let origin = AddressMapper::::to_address(origin).0.into(); let commitment = commitment.0.into(); @@ -158,7 +162,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, &[*message])?; + remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -174,7 +178,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, messages)?; + remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -185,20 +189,54 @@ where } } -impl Ismp { +impl Ismp { /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) } + + // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_err(e: DispatchError) -> Error { + use DispatchError::*; + match e { + Module(ModuleError { index, error, .. }) => { + let index = Some(index as usize); + if index == T::PalletInfo::index::>() { + use messaging::Error::{self, *}; + + match Error::::decode(&mut error.as_slice()) { + Ok(MessageNotFound) => self::MessageNotFound.into(), + Ok(RequestPending) => self::RequestPending.into(), + Ok(TooManyMessages) => self::TooManyMessages.into(), + _ => e.into(), + } + } else { + e.into() + } + }, + _ => e.into(), + } + } +} + +// Encoding of custom errors via `Error(String)`. +impl_from_sol_error! { + IISMP::MaxContextExceeded, + IISMP::MaxDataExceeded, + IISMP::MaxKeyExceeded, + IISMP::MaxKeysExceeded, + MessageNotFound, + RequestPending, + TooManyMessages, } -fn try_get(value: &Get) -> Result { - // TODO: additional error variants vs revive::DecodingFailed - ensure!(value.context.len() as u32 <= T::MaxContextLen::get(), Error::::TooManyMessages); - ensure!(value.keys.len() as u32 <= T::MaxKeys::get(), Error::::TooManyMessages); +fn try_get(value: &Get) -> Result { + ensure!(value.context.len() as u32 <= T::MaxContextLen::get(), IISMP::MaxContextExceeded); + ensure!(value.keys.len() as u32 <= T::MaxKeys::get(), IISMP::MaxKeysExceeded); ensure!( value.keys.iter().all(|k| k.len() as u32 <= T::MaxKeyLen::get()), - Error::::TooManyMessages + IISMP::MaxKeyExceeded ); Ok(DispatchGet { dest: StateMachine::Polkadot(value.destination), @@ -210,9 +248,8 @@ fn try_get(value: &Get) -> Result { }) } -fn try_post(value: &Post) -> Result { - // TODO: additional error variants vs revive::DecodingFailed - ensure!(value.data.len() as u32 <= T::MaxDataLen::get(), Error::::TooManyMessages); +fn try_post(value: &Post) -> Result { + ensure!(value.data.len() as u32 <= T::MaxDataLen::get(), IISMP::MaxDataExceeded); Ok(DispatchPost { dest: StateMachine::Polkadot(value.destination), from: ID.into(), @@ -268,7 +305,10 @@ mod tests { use frame_support::{assert_ok, traits::UnixTime, weights::Weight}; use mock::{ExtBuilder, *}; use pallet_revive::{ - precompiles::alloy::sol_types::{SolInterface, SolType}, + precompiles::{ + alloy::sol_types::{SolInterface, SolType}, + Error, + }, test_utils::ALICE, }; use sp_io::hashing::keccak_256; @@ -538,7 +578,7 @@ mod tests { fn call_precompile::RustType>>( origin: &AccountId, input: &IISMPCalls, - ) -> Result { + ) -> Result { bare_call::( RuntimeOrigin::signed(origin.clone()), ADDRESS.into(), diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index d340a8661..75e097ee9 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -51,7 +51,7 @@ impl let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, &[*message])?; + remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -67,7 +67,7 @@ impl let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, messages)?; + remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -78,11 +78,42 @@ impl } } -impl Messaging { +impl Messaging { /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) } + + // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_err(e: DispatchError) -> Error { + use DispatchError::*; + match e { + Module(ModuleError { index, error, .. }) => { + let index = Some(index as usize); + if index == T::PalletInfo::index::>() { + use messaging::Error::{self, *}; + + match Error::::decode(&mut error.as_slice()) { + Ok(MessageNotFound) => IMessaging::MessageNotFound.into(), + Ok(RequestPending) => IMessaging::RequestPending.into(), + Ok(TooManyMessages) => IMessaging::TooManyMessages.into(), + _ => e.into(), + } + } else { + e.into() + } + }, + _ => e.into(), + } + } +} + +// Encoding of custom errors via `Error(String)`. +impl_from_sol_error! { + IMessaging::MessageNotFound, + IMessaging::RequestPending, + IMessaging::TooManyMessages, } impl From for IMessaging::MessageStatus { @@ -100,10 +131,13 @@ impl From for IMessaging::MessageStatus { #[cfg(test)] mod tests { use ::xcm::latest::Response; - use frame_support::{assert_noop, assert_ok, weights::Weight, BoundedVec}; + use frame_support::{assert_ok, weights::Weight, BoundedVec}; use mock::{ExtBuilder, *}; use pallet_revive::{ - precompiles::alloy::sol_types::{SolInterface, SolType}, + precompiles::{ + alloy::sol_types::{SolInterface, SolType}, + Error, + }, test_utils::ALICE, }; @@ -113,8 +147,6 @@ mod tests { *, }; - type Error = crate::messaging::Error; - const ADDRESS: [u8; 20] = fixed_address(MESSAGING); #[test] @@ -171,7 +203,7 @@ mod tests { } #[test] - fn remove_fails_when_message_pending() { + fn remove_reverts_when_message_pending() { let origin = ALICE; let message = 1; ExtBuilder::new() @@ -182,9 +214,9 @@ mod tests { )]) .build() .execute_with(|| { - assert_noop!( + assert_revert!( call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), - Error::RequestPending + RequestPending ); }); } @@ -231,7 +263,7 @@ mod tests { fn call_precompile::RustType>>( origin: &AccountId, input: &IMessagingCalls, - ) -> Result { + ) -> Result { bare_call::( RuntimeOrigin::signed(origin.clone()), ADDRESS.into(), diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 90bfdb5e1..f4f5643af 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -37,7 +37,7 @@ where _address: &[u8; 20], input: &Self::Interface, env: &mut impl Ext, - ) -> Result, pallet_revive::precompiles::Error> { + ) -> Result, Error> { match input { IXCMCalls::blockNumber(blockNumberCall {}) => { env.charge(::WeightInfo::block_number())?; @@ -54,7 +54,7 @@ where MAX_XCM_DECODE_DEPTH, &mut &message[..], ) - .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .map_err(|_| Error::from(IXCM::DecodingFailed))? .into(); let result = >::execute( @@ -89,29 +89,30 @@ where let origin = env.caller(); let origin = origin.account_id()?; let location = Location::decode(&mut &responder[..]) - .map_err(|_| pallet_revive::Error::::DecodingFailed)?; + .map_err(|_| Error::from(IXCM::DecodingFailed))?; let (id, query_id) = new_query::(origin, location, (*timeout).into(), None)?; let account = AddressMapper::::to_address(origin).0.into(); deposit_event(env, QueryCreated_0 { account, id, queryId: query_id })?; - Ok(newQuery_0Call::abi_encode_returns(&id)) + Ok(newQuery_0Call::abi_encode_returns(&newQuery_0Return { id, queryId: query_id })) }, IXCMCalls::newQuery_1(newQuery_1Call { responder, timeout, callback }) => { env.charge(::WeightInfo::xcm_new_query(1))?; let origin = env.caller(); let origin = origin.account_id()?; let location = Location::decode(&mut &responder[..]) - .map_err(|_| pallet_revive::Error::::DecodingFailed)?; + .map_err(|_| Error::from(IXCM::DecodingFailed))?; let (id, query_id) = - new_query::(origin, location, (*timeout).into(), Some(callback.into()))?; + new_query::(origin, location, (*timeout).into(), Some(callback.into())) + .map_err(Self::map_err)?; let account = AddressMapper::::to_address(origin).0.into(); let event = QueryCreated_1 { account, id, callback: callback.clone(), queryId: query_id }; deposit_event(env, event)?; - Ok(newQuery_0Call::abi_encode_returns(&id)) + Ok(newQuery_1Call::abi_encode_returns(&newQuery_1Return { id, queryId: query_id })) }, IXCMCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; @@ -125,7 +126,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, &[*message])?; + remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -141,7 +142,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; - remove::(origin, messages)?; + remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet let account = AddressMapper::::to_address(origin).0.into(); @@ -152,13 +153,13 @@ where // Based on https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/precompiles.rs env.charge(::WeightInfo::send())?; let destination = VersionedLocation::decode_all(&mut &destination[..]) - .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .map_err(|_| Error::from(IXCM::DecodingFailed))? .into(); let message = VersionedXcm::decode_all_with_depth_limit( MAX_XCM_DECODE_DEPTH, &mut &message[..], ) - .map_err(|_| pallet_revive::Error::::DecodingFailed)? + .map_err(|_| Error::from(IXCM::DecodingFailed))? .into(); let result = >::send( @@ -175,11 +176,50 @@ where } } -impl Xcm { +impl Xcm { /// The address of the precompile. pub const fn address() -> [u8; 20] { fixed_address(FIXED) } + + // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results + // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. + fn map_err(e: DispatchError) -> Error { + use DispatchError::*; + match e { + Module(ModuleError { index, error, .. }) => { + let index = Some(index as usize); + if index == T::PalletInfo::index::>() { + use messaging::Error::{self, *}; + + match Error::::decode(&mut error.as_slice()) { + Ok(FutureTimeoutMandatory) => IXCM::FutureTimeoutMandatory.into(), + Ok(MaxMessageTimeoutPerBlockReached) => + IXCM::MaxMessageTimeoutPerBlockReached.into(), + Ok(MessageNotFound) => self::MessageNotFound.into(), + Ok(OriginConversionFailed) => IXCM::OriginConversionFailed.into(), + Ok(RequestPending) => self::RequestPending.into(), + Ok(TooManyMessages) => self::TooManyMessages.into(), + _ => e.into(), + } + } else { + e.into() + } + }, + _ => e.into(), + } + } +} + +// Encoding of custom errors via `Error(String)`. +impl_from_sol_error! { + IXCM::DecodingFailed, + IXCM::FutureTimeoutMandatory, + IXCM::MaxMessageTimeoutPerBlockReached, + IXCM::OriginConversionFailed, + MessageNotFound, + RequestPending, + TooManyMessages, } impl From<&Callback> for super::Callback { @@ -237,7 +277,10 @@ mod tests { use frame_support::{assert_ok, dispatch::PostDispatchInfo, weights::Weight}; use mock::{messaging::RESPONSE_LOCATION, ExtBuilder, *}; use pallet_revive::{ - precompiles::alloy::sol_types::{SolInterface, SolType}, + precompiles::{ + alloy::sol_types::{SolInterface, SolType}, + Error, + }, test_utils::ALICE, }; use pallet_xcm::ExecutionError; @@ -475,7 +518,7 @@ mod tests { fn call_precompile::RustType>>( origin: &AccountId, input: &IXCMCalls, - ) -> Result { + ) -> Result { bare_call::( RuntimeOrigin::signed(origin.clone()), ADDRESS.into(), diff --git a/pallets/api-vnext/src/messaging/transports.rs b/pallets/api-vnext/src/messaging/transports.rs index 3053ef330..b46f189f9 100644 --- a/pallets/api-vnext/src/messaging/transports.rs +++ b/pallets/api-vnext/src/messaging/transports.rs @@ -1,3 +1,5 @@ +use frame_support::ensure; + use super::*; /// Messaging using the Interoperable State Machine Protocol (ISMP). diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index d4de5254b..e7fce4db0 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -18,7 +18,7 @@ use pop_api::{ self as api, hashed_account, ismp, ismp::{Get, StorageValue}, xcm::VersionedLocation, - Bytes, Callback, Encoding, MessageId, + Bytes, Callback, Encoding, Error, MessageId, MessageStatus::Complete, Weight, }, @@ -38,18 +38,16 @@ mod messaging { #[derive(Default)] pub struct Messaging { para: u32, - id: MessageId, } impl Messaging { #[ink(constructor, payable)] pub fn new(para: u32) -> Self { - Self { para, id: 0 } + Self { para } } #[ink(message)] - pub fn get(&mut self, key: Vec, height: u64) { - // self.id = self.id.saturating_add(1); + pub fn get(&mut self, key: Vec, height: u64) -> Result<(), ismp::Error> { let id = ismp::get( Get::new(self.para, height, 0, Vec::default(), Vec::from([key.clone()])), U256::zero(), @@ -59,8 +57,9 @@ mod messaging { 0x57ad942b, Weight::from_parts(800_000_000, 500_000), )), - ); - self.env().emit_event(IsmpRequested { id: self.id, key, height }); + )?; + self.env().emit_event(IsmpRequested { id, key, height }); + Ok(()) } #[ink(message, payable)] @@ -101,8 +100,7 @@ mod messaging { let call = DoubleEncoded::<()>::decode_all(&mut &call[..]).unwrap(); // Register a new query for receiving a response, used to report transact status. - self.id = self.id.saturating_add(1); - let query_id = api::xcm::new_query( + let (id, query_id) = api::xcm::new_query( VersionedLocation::V5(dest.clone()), self.env().block_number().saturating_add(100), Some(Callback::new( @@ -131,16 +129,17 @@ mod messaging { Blake2x256::hash(&message.encode(), &mut hash); let result = api::xcm::send(dest.into_versioned(), VersionedXcm::V5(message)); - self.env().emit_event(XcmRequested { id: self.id, query_id, hash }); + self.env().emit_event(XcmRequested { id, query_id, hash }); } #[ink(message)] - pub fn complete(&mut self, id: MessageId) { + pub fn complete(&mut self, id: MessageId) -> Result<(), Error> { if api::poll_status(id) == Complete { let result = api::get_response(id); - api::remove(id); + api::remove(id)?; self.env().emit_event(Completed { id, result }); } + Ok(()) } fn _transact( diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index 8bb26d409..cc7d8963f 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -50,6 +50,7 @@ fn fixed_address(n: u16) -> Address { } /// Calculates the address of a precompile at index `n` and with some additional prefix. +#[cfg(feature = "fungibles")] #[inline] fn prefixed_address(n: u16, prefix: u32) -> Address { let mut address = fixed_address(n); diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index 93f17d5b9..8033e2fa7 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -1,5 +1,9 @@ +pub use errors::{Error, Error::*}; + use super::{super::v0::Callback, *}; +mod errors; + // Precompile index within the runtime const PRECOMPILE: u16 = 4; @@ -16,7 +20,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn get(&self, request: Get, fee: U256) -> MessageId; + fn get(&self, request: Get, fee: U256) -> Result; /// Submit a new ISMP `Get` request. /// @@ -28,7 +32,12 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message, selector = 0x39f75435)] - fn get_with_callback(&self, request: Get, fee: U256, callback: Callback) -> MessageId; + fn get_with_callback( + &self, + request: Get, + fee: U256, + callback: Callback, + ) -> Result; /// Returns the response to a message. /// @@ -45,6 +54,7 @@ pub trait Ismp { /// # Parameters /// - `message` - The message identifier to poll. #[ink(message)] + #[allow(non_snake_case)] fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Submit a new ISMP `Post` request. @@ -58,7 +68,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&self, request: Post, fee: U256) -> MessageId; + fn post(&self, request: Post, fee: U256) -> Result; /// Submit a new ISMP `Post` request. /// @@ -72,7 +82,12 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message, selector = 0xeb0f21f1)] - fn post_with_callback(&self, request: Post, fee: U256, callback: Callback) -> MessageId; + fn post_with_callback( + &self, + request: Post, + fee: U256, + callback: Callback, + ) -> Result; /// Remove a completed or timed-out message. /// @@ -81,7 +96,7 @@ pub trait Ismp { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&self, message: MessageId); + fn remove(&self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -90,7 +105,7 @@ pub trait Ismp { /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec); + fn remove_many(&self, messages: Vec) -> Result<(), Error>; } /// Submit a new ISMP `Get` request. @@ -103,7 +118,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[inline] -pub fn get(request: Get, fee: U256, callback: Option) -> MessageId { +pub fn get(request: Get, fee: U256, callback: Option) -> Result { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); match callback { @@ -149,7 +164,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// # Returns /// A unique message identifier. #[inline] -pub fn post(request: Post, fee: U256, callback: Option) -> MessageId { +pub fn post(request: Post, fee: U256, callback: Option) -> Result { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); match callback { @@ -165,7 +180,7 @@ pub fn post(request: Post, fee: U256, callback: Option) -> MessageId { /// # Parameters /// - `message` - The identifier of the message to remove. #[inline] -pub fn remove(message: MessageId) { +pub fn remove(message: MessageId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); precompile.remove(message) @@ -178,7 +193,7 @@ pub fn remove(message: MessageId) { /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] -pub fn remove_many(messages: Vec) { +pub fn remove_many(messages: Vec) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); precompile.remove_many(messages) diff --git a/pop-api-vnext/src/messaging/ismp/v0/errors.rs b/pop-api-vnext/src/messaging/ismp/v0/errors.rs new file mode 100644 index 000000000..d35363fd5 --- /dev/null +++ b/pop-api-vnext/src/messaging/ismp/v0/errors.rs @@ -0,0 +1,53 @@ +use ink::sol_error_selector; + +use super::*; +use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; + +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(ink::SolErrorEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +pub enum Error { + /// The context exceeds the maximum allowed size. + MaxContextExceeded, + /// The data exceeds the maximum allowed size. + MaxDataExceeded, + /// A key exceeds the maximum allowed size. + MaxKeyExceeded, + /// The number of keys exceeds the maximum allowed size. + MaxKeysExceeded, + /// The message was not found. + MessageNotFound, + /// The request is pending. + RequestPending, + /// The number of messages exceeds the limit. + TooManyMessages, +} + +impl_sol_encoding_for_precompile!(Error); + +impl PrecompileError for Error { + fn decode(data: &[u8]) -> Result { + if data.len() < 4 { + return Err(ink::sol::Error); + } + + match data[..4].try_into().expect("length checked above") { + MAX_CONTEXT_EXCEEDED => Ok(Self::MaxContextExceeded), + MAX_DATA_EXCEEDED => Ok(Self::MaxDataExceeded), + MAX_KEY_EXCEEDED => Ok(Self::MaxKeyExceeded), + MAX_KEYS_EXCEEDED => Ok(Self::MaxKeysExceeded), + MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + REQUEST_PENDING => Ok(Self::RequestPending), + TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + _ => Err(ink::sol::Error), + } + } +} + +const MAX_CONTEXT_EXCEEDED: [u8; 4] = sol_error_selector!("MaxContextExceeded", ()); +const MAX_DATA_EXCEEDED: [u8; 4] = sol_error_selector!("MaxDataExceeded", ()); +const MAX_KEY_EXCEEDED: [u8; 4] = sol_error_selector!("MaxKeyExceeded", ()); +const MAX_KEYS_EXCEEDED: [u8; 4] = sol_error_selector!("MaxKeysExceeded", ()); +const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); +const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); +const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index a028a3797..339d1cdb2 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -1,5 +1,9 @@ +pub use errors::{Error, Error::*}; + use super::*; +mod errors; + // Precompile index within the runtime const PRECOMPILE: u16 = 3; @@ -14,6 +18,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The message identifier. #[ink(message)] + #[allow(non_snake_case)] fn getResponse(&self, message: MessageId) -> Bytes; /// Polls the status of a message. @@ -21,6 +26,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The message identifier to poll. #[ink(message)] + #[allow(non_snake_case)] fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. @@ -30,7 +36,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&self, message: MessageId); + fn remove(&self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -39,7 +45,7 @@ pub trait Messaging { /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec); + fn remove_many(&self, messages: Vec) -> Result<(), Error>; } /// A message callback. @@ -200,7 +206,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// # Parameters /// - `message` - The identifier of the message to remove. #[inline] -pub fn remove(message: MessageId) { +pub fn remove(message: MessageId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); precompile.remove(message) @@ -213,7 +219,7 @@ pub fn remove(message: MessageId) { /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] -pub fn remove_many(messages: Vec) { +pub fn remove_many(messages: Vec) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); precompile.remove_many(messages) diff --git a/pop-api-vnext/src/messaging/v0/errors.rs b/pop-api-vnext/src/messaging/v0/errors.rs new file mode 100644 index 000000000..ceb8cc57f --- /dev/null +++ b/pop-api-vnext/src/messaging/v0/errors.rs @@ -0,0 +1,37 @@ +use ink::sol_error_selector; + +use super::*; +use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; + +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(ink::SolErrorEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +pub enum Error { + /// The message was not found. + MessageNotFound, + /// The request is pending. + RequestPending, + /// The number of messages exceeds the limit. + TooManyMessages, +} + +impl_sol_encoding_for_precompile!(Error); + +impl PrecompileError for Error { + fn decode(data: &[u8]) -> Result { + if data.len() < 4 { + return Err(ink::sol::Error); + } + + match data[..4].try_into().expect("length checked above") { + MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + REQUEST_PENDING => Ok(Self::RequestPending), + TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + _ => Err(ink::sol::Error), + } + } +} + +const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); +const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); +const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index 5cdb4390b..bf6d31c5c 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -1,7 +1,10 @@ +pub use errors::{Error, Error::*}; pub use ink::xcm::prelude::{VersionedLocation, VersionedResponse, VersionedXcm}; use super::{super::v0::Callback, *}; +mod errors; + pub type QueryId = u64; // Precompile index within the runtime @@ -30,6 +33,7 @@ pub trait Xcm { /// # Parameters /// - `message` - The message identifier. #[ink(message)] + #[allow(non_snake_case)] fn getResponse(&self, message: MessageId) -> Bytes; /// Initiate a new XCM query. @@ -43,7 +47,7 @@ pub trait Xcm { /// # Returns /// A unique query identifier. #[ink(message, selector = 0x5a8db3bd)] - fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> QueryId; + fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId); /// Initiate a new XCM query. /// @@ -62,13 +66,14 @@ pub trait Xcm { responder: Bytes, timeout: BlockNumber, callback: Callback, - ) -> QueryId; + ) -> (MessageId, QueryId); /// Polls the status of a message. /// /// # Parameters /// - `message` - The message identifier to poll. #[ink(message)] + #[allow(non_snake_case)] fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. @@ -146,7 +151,7 @@ pub fn new_query( responder: VersionedLocation, timeout: BlockNumber, callback: Option, -) -> QueryId { +) -> (MessageId, QueryId) { let address = fixed_address(PRECOMPILE); let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); match callback { diff --git a/pop-api-vnext/src/messaging/xcm/v0/errors.rs b/pop-api-vnext/src/messaging/xcm/v0/errors.rs new file mode 100644 index 000000000..539f5886a --- /dev/null +++ b/pop-api-vnext/src/messaging/xcm/v0/errors.rs @@ -0,0 +1,54 @@ +use ink::sol_error_selector; + +use super::*; +use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; + +#[cfg_attr(feature = "std", derive(Debug, PartialEq))] +#[derive(ink::SolErrorEncode)] +#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +pub enum Error { + /// The input failed to decode. + DecodingFailed, + /// Timeouts must be in the future. + FutureTimeoutMandatory, + /// Message block limit has been reached for this expiry block. Try a different timeout. + MaxMessageTimeoutPerBlockReached, + /// The message was not found. + MessageNotFound, + /// Failed to convert origin. + OriginConversionFailed, + /// The request is pending. + RequestPending, + /// The number of messages exceeds the limit. + TooManyMessages, +} + +impl_sol_encoding_for_precompile!(Error); + +impl PrecompileError for Error { + fn decode(data: &[u8]) -> Result { + if data.len() < 4 { + return Err(ink::sol::Error); + } + + match data[..4].try_into().expect("length checked above") { + DECODING_FAILED => Ok(Self::DecodingFailed), + FUTURE_TIMEOUT_MANDATORY => Ok(Self::FutureTimeoutMandatory), + MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED => Ok(Self::MaxMessageTimeoutPerBlockReached), + MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + ORIGIN_CONVERSION_FAILED => Ok(Self::OriginConversionFailed), + REQUEST_PENDING => Ok(Self::RequestPending), + TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + _ => Err(ink::sol::Error), + } + } +} + +const DECODING_FAILED: [u8; 4] = sol_error_selector!("DecodingFailed", ()); +const FUTURE_TIMEOUT_MANDATORY: [u8; 4] = sol_error_selector!("FutureTimeoutMandatory", ()); +const MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED: [u8; 4] = + sol_error_selector!("MaxMessageTimeoutPerBlockReached", ()); +const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); +const ORIGIN_CONVERSION_FAILED: [u8; 4] = sol_error_selector!("OriginConversionFailed", ()); +const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); +const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index cad0a93f2..e89c56071 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -18,7 +18,7 @@ pub(crate) trait PrecompileError: Sized { macro_rules! impl_sol_encoding_for_precompile { ($($type:ty),*) => { $( - impl SolErrorDecode for $type { + impl ink::sol::SolErrorDecode for $type { fn decode(data: &[u8]) -> Result { use base64::{engine::general_purpose::STANDARD as BASE64, Engine as _}; use ink::{prelude::string::String, sol_error_selector}; From 6f8c485e1776b81a5940d8fbdefb49e1809fccf9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 15 Jul 2025 18:04:30 +0200 Subject: [PATCH 205/284] test(api): add error tests --- .../precompiles/interfaces/v0/IXCM.sol | 2 + .../src/messaging/precompiles/ismp/v0.rs | 169 ++++++++++- .../api-vnext/src/messaging/precompiles/v0.rs | 78 +++++ .../src/messaging/precompiles/xcm/v0.rs | 271 +++++++++++++++++- 4 files changed, 517 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index aeb325c69..13a3e8dee 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -112,6 +112,8 @@ interface IXCM { error DecodingFailed(); /// @dev Timeouts must be in the future. error FutureTimeoutMandatory(); + /// @dev Timeouts must be in the future. + error FundsUnavailable(); /// @dev Message block limit has been reached for this expiry block. Try a different timeout. error MaxMessageTimeoutPerBlockReached(); /// @dev Failed to convert origin. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 00da004ee..31d0c2d1c 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -302,7 +302,11 @@ impl From<&Weight> for super::Weight { #[cfg(test)] mod tests { use ::ismp::router::{GetRequest, PostRequest, Request}; - use frame_support::{assert_ok, traits::UnixTime, weights::Weight}; + use frame_support::{ + assert_ok, + traits::{Get, UnixTime}, + weights::Weight, + }; use mock::{ExtBuilder, *}; use pallet_revive::{ precompiles::{ @@ -320,11 +324,64 @@ mod tests { *, }; + type MaxContextLen = ::MaxContextLen; + type MaxDataLen = ::MaxDataLen; + type MaxKeyLen = ::MaxKeyLen; + type MaxKeys = ::MaxKeys; + type MaxRemovals = ::MaxRemovals; type Messages = crate::messaging::Messages; const ADDRESS: [u8; 20] = fixed_address(ISMP); const MESSAGE_DEPOSIT: u128 = 129_540; + #[test] + fn get_reverts_when_max_context_exceeded() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let request = IISMP::Get { + destination: 0, + height: u64::default(), + timeout: u64::default(), + context: vec![255u8; >::get() as usize + 1].into(), + keys: Vec::default(), + }; + let input = get_0(get_0Call { request, fee: U256::ZERO }); + assert_revert!(call_precompile::(&origin, &input), MaxContextExceeded); + }); + } + + #[test] + fn get_reverts_when_max_keys_exceeded() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let request = IISMP::Get { + destination: 0, + height: u64::default(), + timeout: u64::default(), + context: Vec::default().into(), + keys: vec![vec![].into(); >::get() as usize + 1], + }; + let input = get_0(get_0Call { request, fee: U256::ZERO }); + assert_revert!(call_precompile::(&origin, &input), MaxKeysExceeded); + }); + } + + #[test] + fn get_reverts_when_max_key_exceeded() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let request = IISMP::Get { + destination: 0, + height: u64::default(), + timeout: u64::default(), + context: Vec::default().into(), + keys: vec![vec![0u8; >::get() as usize + 1].into()], + }; + let input = get_0(get_0Call { request, fee: U256::ZERO }); + assert_revert!(call_precompile::(&origin, &input), MaxKeyExceeded); + }); + } + #[test] fn get_works() { let origin = ALICE; @@ -464,6 +521,21 @@ mod tests { }); } + #[test] + fn post_reverts_when_max_data_exceeded() { + let origin = ALICE; + let request = IISMP::Post { + destination: 0, + timeout: u64::default(), + data: vec![255u8; >::get() as usize + 1].into(), + }; + let fee = U256::from(100); + ExtBuilder::new().build().execute_with(|| { + let input = post_0(post_0Call { request, fee }); + assert_revert!(call_precompile::(&origin, &input), MaxDataExceeded); + }); + } + #[test] fn post_works() { let origin = ALICE; @@ -528,6 +600,37 @@ mod tests { }); } + #[test] + fn remove_reverts_when_message_pending() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + RequestPending + ); + }); + } + + #[test] + fn remove_reverts_when_message_not_found() { + let origin = ALICE; + let message = 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + MessageNotFound + ); + }); + } + #[test] fn remove_works() { let origin = ALICE; @@ -551,6 +654,70 @@ mod tests { }); } + #[test] + fn remove_many_reverts_when_message_pending() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1) + .map(|i| (origin.clone(), i, message.clone())) + .chain(vec![( + origin.clone(), + messages, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_message_not_found() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_too_many_messages() { + let origin = ALICE; + let messages = >::get() as u64 + 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + TooManyMessages + ); + }); + } + #[test] fn remove_many_works() { let origin = ALICE; diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 75e097ee9..96fac60cf 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -149,6 +149,8 @@ mod tests { const ADDRESS: [u8; 20] = fixed_address(MESSAGING); + type MaxRemovals = ::MaxRemovals; + #[test] fn get_response_works() { let origin = ALICE; @@ -221,6 +223,18 @@ mod tests { }); } + #[test] + fn remove_reverts_when_message_not_found() { + let origin = ALICE; + let message = 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + MessageNotFound + ); + }); + } + #[test] fn remove_works() { let origin = ALICE; @@ -240,6 +254,70 @@ mod tests { }); } + #[test] + fn remove_many_reverts_when_message_pending() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1) + .map(|i| (origin.clone(), i, message.clone())) + .chain(vec![( + origin.clone(), + messages, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_message_not_found() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_too_many_messages() { + let origin = ALICE; + let messages = >::get() as u64 + 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + TooManyMessages + ); + }); + } + #[test] fn remove_many_works() { let origin = ALICE; diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index f4f5643af..64ed6db60 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -1,7 +1,10 @@ use ::xcm::{VersionedLocation, VersionedXcm, MAX_XCM_DECODE_DEPTH}; use codec::{DecodeAll, DecodeLimit}; use pallet_xcm::WeightInfo as _; -use sp_runtime::traits::{Block, Header}; +use sp_runtime::{ + traits::{Block, Header}, + TokenError, +}; pub(crate) use IXCM::*; use super::*; @@ -91,7 +94,8 @@ where let location = Location::decode(&mut &responder[..]) .map_err(|_| Error::from(IXCM::DecodingFailed))?; - let (id, query_id) = new_query::(origin, location, (*timeout).into(), None)?; + let (id, query_id) = new_query::(origin, location, (*timeout).into(), None) + .map_err(Self::map_err)?; let account = AddressMapper::::to_address(origin).0.into(); deposit_event(env, QueryCreated_0 { account, id, queryId: query_id })?; @@ -206,6 +210,7 @@ impl Xcm { e.into() } }, + Token(TokenError::FundsUnavailable) => IXCM::FundsUnavailable.into(), _ => e.into(), } } @@ -214,6 +219,7 @@ impl Xcm { // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { IXCM::DecodingFailed, + IXCM::FundsUnavailable, IXCM::FutureTimeoutMandatory, IXCM::MaxMessageTimeoutPerBlockReached, IXCM::OriginConversionFailed, @@ -287,7 +293,10 @@ mod tests { use super::{super::Message::*, IXCMCalls::*, MessageStatus::*, *}; + type MaxXcmQueryTimeoutsPerBlock = ::MaxXcmQueryTimeoutsPerBlock; + type MaxRemovals = ::MaxRemovals; type Messages = crate::messaging::Messages; + type XcmQueryTimeouts = crate::messaging::XcmQueryTimeouts; const ADDRESS: [u8; 20] = fixed_address(XCM); const MESSAGE_DEPOSIT: u128 = 129_720; @@ -304,6 +313,17 @@ mod tests { }); } + #[test] + fn execute_reverts_when_decoding_failed() { + let origin = ALICE; + let message = Vec::default().into(); + let weight = Weight::default().into(); + ExtBuilder::new().build().execute_with(|| { + let input = execute(executeCall { message, weight }); + assert_revert!(call_precompile::<()>(&origin, &input), DecodingFailed); + }); + } + #[test] fn execute_works() { let origin = ALICE; @@ -362,6 +382,61 @@ mod tests { }); } + #[test] + fn new_query_reverts_when_decoding_failed() { + let origin = ALICE; + let responder = Vec::default().into(); + let timeout = 100; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_0(newQuery_0Call { responder, timeout }); + assert_revert!(call_precompile::<()>(&origin, &input), DecodingFailed); + }); + } + + #[test] + fn new_query_reverts_when_timeout_passed() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 0; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_0(newQuery_0Call { responder, timeout }); + assert_revert!(call_precompile::<()>(&origin, &input), FutureTimeoutMandatory); + }); + } + + #[test] + fn new_query_reverts_when_max_query_timeouts_reached() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 2; + ExtBuilder::new().build().execute_with(|| { + let current_block = frame_system::Pallet::::block_number(); + XcmQueryTimeouts::set( + current_block + timeout, + vec![(origin.clone(), 0); MaxXcmQueryTimeoutsPerBlock::get() as usize] + .try_into() + .unwrap(), + ); + + let input = newQuery_0(newQuery_0Call { responder, timeout }); + assert_revert!( + call_precompile::<()>(&origin, &input), + MaxMessageTimeoutPerBlockReached + ); + }); + } + + #[test] + fn new_query_reverts_when_funds_unavailable() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 2; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_0(newQuery_0Call { responder, timeout }); + assert_revert!(call_precompile::<()>(&origin, &input), FundsUnavailable); + }); + } + #[test] fn new_query_works() { let origin = ALICE; @@ -392,6 +467,85 @@ mod tests { }); } + #[test] + fn new_query_with_callback_reverts_when_decoding_failed() { + let origin = ALICE; + let responder = Vec::default().into(); + let timeout = 100; + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); + assert_revert!(call_precompile::<()>(&origin, &input), DecodingFailed); + }); + } + + #[test] + fn new_query_with_callback_reverts_when_timeout_passed() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 0; + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); + assert_revert!(call_precompile::<()>(&origin, &input), FutureTimeoutMandatory); + }); + } + + #[test] + fn new_query_with_callback_reverts_when_max_query_timeouts_reached() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 2; + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new().build().execute_with(|| { + let current_block = frame_system::Pallet::::block_number(); + XcmQueryTimeouts::set( + current_block + timeout, + vec![(origin.clone(), 0); MaxXcmQueryTimeoutsPerBlock::get() as usize] + .try_into() + .unwrap(), + ); + + let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); + assert_revert!( + call_precompile::<()>(&origin, &input), + MaxMessageTimeoutPerBlockReached + ); + }); + } + + #[test] + fn new_query_with_callback_reverts_when_funds_unavailable() { + let origin = ALICE; + let responder = RESPONSE_LOCATION.encode().into(); + let timeout = 2; + let callback = Callback { + destination: [255u8; 20].into(), + encoding: super::Encoding::Scale, + selector: [255u8; 4].into(), + weight: super::Weight { refTime: 100, proofSize: 10 }, + }; + ExtBuilder::new().build().execute_with(|| { + let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); + assert_revert!(call_precompile::<()>(&origin, &input), FundsUnavailable); + }); + } + #[test] fn new_query_with_callback_works() { let origin = ALICE; @@ -454,6 +608,37 @@ mod tests { }); } + #[test] + fn remove_reverts_when_message_pending() { + let origin = ALICE; + let message = 1; + ExtBuilder::new() + .with_messages(vec![( + origin.clone(), + message, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + RequestPending + ); + }); + } + + #[test] + fn remove_reverts_when_message_not_found() { + let origin = ALICE; + let message = 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + MessageNotFound + ); + }); + } + #[test] fn remove_works() { let origin = ALICE; @@ -473,6 +658,70 @@ mod tests { }); } + #[test] + fn remove_many_reverts_when_message_pending() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1) + .map(|i| (origin.clone(), i, message.clone())) + .chain(vec![( + origin.clone(), + messages, + XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + )]) + .collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_message_not_found() { + let origin = ALICE; + let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let messages = >::get() as u64; + ExtBuilder::new() + .with_messages( + (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + ) + .build() + .execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + MessageNotFound + ); + }); + } + + #[test] + fn remove_many_reverts_when_too_many_messages() { + let origin = ALICE; + let messages = >::get() as u64 + 1; + ExtBuilder::new().build().execute_with(|| { + assert_revert!( + call_precompile::<()>( + &origin, + &remove_1(remove_1Call { messages: (0..messages).collect() }) + ), + TooManyMessages + ); + }); + } + #[test] fn remove_many_works() { let origin = ALICE; @@ -493,6 +742,24 @@ mod tests { }); } + #[test] + fn send_reverts_when_decoding_failed() { + let origin = ALICE; + let destination = Location::new(1, [Parachain(1000).into()]); + let versioned_location = VersionedLocation::V5(destination); + let destination = versioned_location.encode().into(); + ExtBuilder::new().build().execute_with(|| { + let input = send(sendCall { + destination: Vec::default().into(), + message: Vec::default().into(), + }); + assert_revert!(call_precompile::<()>(&origin, &input), DecodingFailed); + + let input = send(sendCall { destination, message: Vec::default().into() }); + assert_revert!(call_precompile::<()>(&origin, &input), DecodingFailed); + }); + } + #[test] fn send_works() { let origin = ALICE; From a2ee14707bdf3acda8867fd15fbb54639b497537 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 15 Jul 2025 22:48:33 +0200 Subject: [PATCH 206/284] test(pallets/api): add remove tests --- pallets/api-vnext/src/messaging.rs | 12 + .../src/messaging/precompiles/ismp/v0.rs | 12 +- .../api-vnext/src/messaging/precompiles/v0.rs | 13 +- .../src/messaging/precompiles/xcm/v0.rs | 12 +- pallets/api-vnext/src/messaging/tests.rs | 332 ++++++++++++++++++ pallets/api-vnext/src/mock.rs | 18 +- 6 files changed, 381 insertions(+), 18 deletions(-) create mode 100644 pallets/api-vnext/src/messaging/tests.rs diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 5bab0278b..4930ea27c 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -33,6 +33,8 @@ mod benchmarking; mod deposits; /// The messaging precompiles offer a streamlined interface for cross-chain messaging. pub mod precompiles; +#[cfg(test)] +mod tests; /// Messaging transports. pub mod transports; mod weights; @@ -828,6 +830,16 @@ pub(crate) enum Message { }, } +impl Message { + fn ismp_response( + commitment: H256, + message_deposit: BalanceOf, + response: BoundedVec, + ) -> Self { + Self::IsmpResponse { commitment, message_deposit, response } + } +} + /// The related message status of a Message. #[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] pub enum MessageStatus { diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 31d0c2d1c..da8c3bf9a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -470,6 +470,7 @@ mod tests { message_deposit: 0, response: BoundedVec::truncate_from(response.clone()), }, + 0, )]) .build() .execute_with(|| { @@ -505,7 +506,7 @@ mod tests { ), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { @@ -609,6 +610,7 @@ mod tests { origin.clone(), message, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .build() .execute_with(|| { @@ -644,6 +646,7 @@ mod tests { message_deposit: 0, response: BoundedVec::default(), }, + 0, )]) .build() .execute_with(|| { @@ -662,11 +665,12 @@ mod tests { ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone())) + .map(|i| (origin.clone(), i, message.clone(), 0)) .chain(vec![( origin.clone(), messages, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .collect(), ) @@ -689,7 +693,7 @@ mod tests { let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), ) .build() .execute_with(|| { @@ -728,7 +732,7 @@ mod tests { response: BoundedVec::default(), }; ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 96fac60cf..1ee73bf53 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -168,7 +168,7 @@ mod tests { (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { @@ -188,7 +188,7 @@ mod tests { (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { @@ -213,6 +213,7 @@ mod tests { origin.clone(), message, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .build() .execute_with(|| { @@ -244,6 +245,7 @@ mod tests { origin.clone(), message, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + 0, )]) .build() .execute_with(|| { @@ -262,11 +264,12 @@ mod tests { ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone())) + .map(|i| (origin.clone(), i, message.clone(), 0)) .chain(vec![( origin.clone(), messages, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .collect(), ) @@ -289,7 +292,7 @@ mod tests { let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), ) .build() .execute_with(|| { @@ -324,7 +327,7 @@ mod tests { let messages = 10; let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 64ed6db60..7938042be 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -371,6 +371,7 @@ mod tests { origin.clone(), message, XcmResponse { query_id: 0, message_deposit: 0, response: response.clone() }, + 0, )]) .build() .execute_with(|| { @@ -592,7 +593,7 @@ mod tests { (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { @@ -617,6 +618,7 @@ mod tests { origin.clone(), message, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .build() .execute_with(|| { @@ -648,6 +650,7 @@ mod tests { origin.clone(), message, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + 0, )]) .build() .execute_with(|| { @@ -666,11 +669,12 @@ mod tests { ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone())) + .map(|i| (origin.clone(), i, message.clone(), 0)) .chain(vec![( origin.clone(), messages, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + 0, )]) .collect(), ) @@ -693,7 +697,7 @@ mod tests { let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone())).collect(), + (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), ) .build() .execute_with(|| { @@ -728,7 +732,7 @@ mod tests { let messages = 10; let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone())).collect()) + .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs new file mode 100644 index 000000000..2032835f9 --- /dev/null +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -0,0 +1,332 @@ +use frame_support::{ + assert_noop, assert_ok, + storage::{with_transaction, TransactionOutcome}, + traits::fungible::InspectHold, +}; +use HoldReason::*; + +use super::*; +use crate::mock::*; + +type Error = super::Error; +type Fungibles = ::Fungibles; +type IsmpRequests = super::IsmpRequests; +type Messages = super::Messages; +type XcmQueries = super::XcmQueries; + +mod remove { + use super::*; + + #[test] + fn message_not_found() { + let origin = ALICE; + let message = 0; + ExtBuilder::new().build().execute_with(|| { + assert_noop!(remove(&origin, &[message]), Error::MessageNotFound); + }) + } + + #[test] + fn multiple_messages_remove_works() { + let origin = ALICE; + let deposit: Balance = 100; + // An ismp response can always be removed. + let message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); + let messages = 3; + let endowment = existential_deposit() + deposit * messages as Balance; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_messages( + (0..messages).map(|i| (origin.clone(), i, message.clone(), deposit)).collect(), + ) + .build() + .execute_with(|| { + let messages = (0..messages).collect::>(); + assert_ok!(remove(&origin, &messages)); + + for id in messages { + assert!( + Messages::get(&origin, id).is_none(), + "message should have been removed." + ); + } + }); + } + + #[test] + fn deposit_is_returned_if_try_remove_is_ok() { + let origin = ALICE; + let deposit: Balance = 100; + // An ismp response can always be removed. + let message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); + let id = 1; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .with_messages(vec![(origin.clone(), id, message, deposit)]) + .build() + .execute_with(|| { + let free_balance = Balances::free_balance(&origin); + + assert_ok!(remove(&origin, &[id])); + + assert_eq!(Balances::free_balance(&origin), free_balance + deposit); + }); + } + + #[test] + fn deposit_is_not_returned_if_try_remove_is_noop() { + let origin = ALICE; + let deposit: Balance = 100; + let message = + Message::Ismp { commitment: H256::default(), callback: None, message_deposit: deposit }; + let id = 1; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .with_messages(vec![(origin.clone(), id, message, deposit)]) + .build() + .execute_with(|| { + let free_balance = Balances::free_balance(&origin); + + assert_noop!(remove(&origin, &[id]), Error::RequestPending); + + assert_eq!(Balances::free_balance(&origin), free_balance); + }); + } + + #[test] + fn multiple_messages_rolls_back_if_one_fails() { + let origin = ALICE; + let deposit: Balance = 100; + let good_message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); + let erroneous_message = + Message::Ismp { commitment: H256::default(), callback: None, message_deposit: deposit }; + let messages = 5; + let endowment = existential_deposit() + deposit * messages as Balance; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_messages( + (0..messages - 1) + .map(|i| (origin.clone(), i, good_message.clone(), deposit)) + .chain([(origin.clone(), messages - 1, erroneous_message, deposit)]) + .collect(), + ) + .build() + .execute_with(|| { + let messages = (0..messages).collect::>(); + let free_balance = Balances::free_balance(&origin); + + assert_noop!(remove(&origin, &messages), Error::RequestPending); + + for message in messages { + assert!(Messages::get(&origin, message).is_some()); + } + assert_eq!(Balances::free_balance(&origin), free_balance); + }); + } + + // Basic remove tests to ensure storage is cleaned. + #[test] + fn remove_ismp_message() { + let origin = ALICE; + let commitment = H256::default(); + let id = 1; + let deposit = 100; + let message = Message::Ismp { commitment, callback: None, message_deposit: deposit }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .build() + .execute_with(|| { + Messages::insert(&origin, id, &message); + IsmpRequests::insert(commitment, (&origin, &id)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + + assert_noop!(remove(&origin, &[id]), Error::RequestPending); + + assert!( + Messages::get(origin, id).is_some(), + "Message should not have been removed but has." + ); + assert!( + IsmpRequests::get(commitment).is_some(), + "Message should not have been removed but has." + ); + }) + } + + #[test] + fn remove_ismp_response() { + let origin = ALICE; + let commitment = H256::default(); + let id = 1; + let deposit = 100; + let message = Message::ismp_response(commitment, deposit, BoundedVec::default()); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .build() + .execute_with(|| { + Messages::insert(&origin, id, &message); + IsmpRequests::insert(commitment, (&origin, &id)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + + assert_ok!(remove(&origin, &[id])); + + assert!( + Messages::get(&origin, id).is_none(), + "Message should have been removed but hasnt." + ); + assert!( + IsmpRequests::get(commitment).is_none(), + "Request should have been removed but hasnt." + ); + }) + } + + #[test] + fn remove_ismp_timeout() { + let origin = ALICE; + let commitment = H256::default(); + let deposit = 100; + let callback_deposit = 100_000; + let id = 1; + let message = Message::IsmpTimeout { + commitment, + message_deposit: deposit, + callback_deposit: Some(callback_deposit), + }; + let endowment = existential_deposit() + deposit + callback_deposit; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, callback_deposit)); + + Messages::insert(&origin, id, &message); + IsmpRequests::insert(commitment, (&origin, &id)); + + assert_ok!(remove(&origin, &[id])); + + assert!( + Messages::get(&origin, id).is_none(), + "Message should have been removed but hasnt." + ); + assert!( + IsmpRequests::get(commitment).is_none(), + "Request should have been removed but hasnt." + ); + assert_eq!(Balances::total_balance_on_hold(&origin), 0); + }) + } + + #[test] + fn remove_xcm_query() { + let origin = ALICE; + let query_id = 42; + let id = 1; + let deposit = 100; + let message = Message::XcmQuery { query_id, callback: None, message_deposit: deposit }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .build() + .execute_with(|| { + Messages::insert(&origin, id, &message); + XcmQueries::insert(query_id, (&origin, &id)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + + assert_noop!(remove(&origin, &[id]), Error::RequestPending); + assert!( + Messages::get(&origin, id).is_some(), + "Message should not have been removed but has" + ); + assert!( + XcmQueries::get(query_id).is_some(), + "Message should not have been removed but has." + ); + }) + } + + #[test] + fn remove_xcm_response() { + let origin = ALICE; + let query_id = 42; + let id = 1; + let message_deposit = 100; + let message = + Message::XcmResponse { query_id, message_deposit, response: Response::default() }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + message_deposit)]) + .build() + .execute_with(|| { + Messages::insert(&origin, id, &message); + XcmQueries::insert(query_id, (&origin, &id)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); + + assert_ok!(remove(&origin, &[id])); + + assert!( + Messages::get(ALICE, id).is_none(), + "Message should have been removed but hasnt" + ); + assert!( + XcmQueries::get(query_id).is_none(), + "Message should have been removed but hasnt." + ); + }) + } + + #[test] + fn remove_xcm_timeout() { + let origin = ALICE; + let query_id = 42; + let id = 1; + let message_deposit = 100; + let callback_deposit = 100_000; + let message = Message::XcmTimeout { + query_id, + message_deposit, + callback_deposit: Some(callback_deposit), + }; + let endowment = existential_deposit() + message_deposit + callback_deposit; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, callback_deposit)); + + Messages::insert(&origin, id, &message); + XcmQueries::insert(query_id, (&origin, id)); + + assert_ok!(remove(&origin, &[id])); + + assert!( + Messages::get(ALICE, id).is_none(), + "Message should have been removed but hasnt" + ); + assert!( + XcmQueries::get(query_id).is_none(), + "Message should have been removed but hasnt." + ); + + // Assert that all holds specified have been released + assert_eq!(Balances::total_balance_on_hold(&ALICE), 0); + }) + } + + // `remove` is no longer a dispatchable and only callable via a precompile, hence we simply + // wrap calls to it in a transaction to simulate. See additional precompiles tests for + // further assurances. + fn remove(origin: &AccountId, messages: &[MessageId]) -> DispatchResult { + with_transaction(|| -> TransactionOutcome { + let result = super::remove::(origin, messages); + match &result { + Ok(_) => TransactionOutcome::Commit(result), + Err(_) => TransactionOutcome::Rollback(result), + } + }) + } +} + +fn existential_deposit() -> Balance { + >::get() +} diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index d8881eed9..d9a4e1407 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -1,6 +1,6 @@ use codec::Compact; use frame_support::{ - derive_impl, + assert_ok, derive_impl, pallet_prelude::ConstU32, parameter_types, sp_runtime::{traits::AccountIdLookup, AccountId32, BuildStorage}, @@ -324,7 +324,7 @@ pub(crate) struct ExtBuilder { asset_metadata: Option, Vec, u8)>>, balances: Vec<(AccountId, Balance)>, #[cfg(feature = "messaging")] - messages: Option)>>, + messages: Option, Balance)>>, #[cfg(feature = "messaging")] next_message_id: Option<(AccountId, messaging::MessageId)>, #[cfg(feature = "messaging")] @@ -375,7 +375,7 @@ impl ExtBuilder { #[cfg(feature = "messaging")] pub(crate) fn with_messages( mut self, - messages: Vec<(AccountId, messaging::MessageId, messaging::Message)>, + messages: Vec<(AccountId, messaging::MessageId, messaging::Message, Balance)>, ) -> Self { self.messages = Some(messages); self @@ -416,8 +416,16 @@ impl ExtBuilder { #[cfg(feature = "messaging")] { if let Some(messages) = self.messages.take() { - for (account, id, message) in messages { - messaging::Messages::::insert(account, id, message); + for (account, id, message, deposit) in messages { + messaging::Messages::::insert(&account, id, message); + + use frame_support::traits::fungible::MutateHold; + use messaging::HoldReason; + assert_ok!(::Fungibles::hold( + &HoldReason::Messaging.into(), + &account, + deposit + )); } } From 838580b16faef9b879311082ab00ec725d7debf8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 17 Jul 2025 23:41:28 +0200 Subject: [PATCH 207/284] test(pallets/api): add new_query tests --- .../api-vnext/src/messaging/transports/xcm.rs | 258 ++++++++++++++++++ pallets/api-vnext/src/mock.rs | 22 +- 2 files changed, 274 insertions(+), 6 deletions(-) diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs index ca4e0734f..00df43a58 100644 --- a/pallets/api-vnext/src/messaging/transports/xcm.rs +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -94,3 +94,261 @@ pub trait NotifyQueryHandler { match_querier: impl Into, ) -> QueryId; } + +#[cfg(test)] +mod tests { + use frame_support::{ + assert_noop, assert_ok, + storage::{with_transaction, TransactionOutcome}, + traits::fungible::InspectHold, + weights::WeightToFee as _, + }; + + use super::{ + super::{Callback, Encoding, HoldReason::*}, + mock::{messaging::*, *}, + CallbackExecutor as _, WeightInfo as _, *, + }; + + type CallbackExecutor = ::CallbackExecutor; + type Error = super::Error; + type Event = super::Event; + type Fungibles = ::Fungibles; + type Messages = super::Messages; + type OnChainByteFee = ::OnChainByteFee; + type WeightInfo = ::WeightInfo; + type WeightToFee = ::WeightToFee; + type XcmQueries = super::XcmQueries; + + #[test] + fn ensure_xcm_response_has_weight() { + assert_ne!( + WeightInfo::xcm_response(), + Weight::zero(), + "Please set a weight for xcm_response to run these tests." + ); + } + + #[test] + fn ensure_xcm_response_fee() { + assert_ne!(WeightToFee::weight_to_fee(&(WeightInfo::xcm_response())), 0); + assert_ne!(WeightToFee::weight_to_fee(&(CallbackExecutor::execution_weight())), 0); + } + + #[test] + fn ensure_callback_executor_has_weight() { + assert_ne!( + CallbackExecutor::execution_weight(), + Weight::zero(), + "Please set a weight for CallbackExecutor::execution_weight to run these tests." + ); + } + + #[test] + fn takes_response_fee_no_callback() { + let origin = ALICE; + let response_fee = WeightToFee::weight_to_fee(&(WeightInfo::xcm_response())); + let callback = None; + let endowment = existential_deposit() + deposit() + response_fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + let balance_pre_transfer = Balances::free_balance(&origin); + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, callback)); + + let balance_post_transfer = Balances::free_balance(&origin); + let total_balance_on_hold = Balances::total_balance_on_hold(&origin); + assert_eq!( + balance_pre_transfer - balance_post_transfer - total_balance_on_hold, + response_fee + ); + }) + } + + #[test] + fn takes_response_fee_with_callback() { + let origin = ALICE; + let response_fee = xcm_response_fee(); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Weight::zero()); + let endowment = existential_deposit() + deposit() + response_fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + assert_ne!(response_fee, 0); + let balance_pre_query = Balances::free_balance(&ALICE); + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback),)); + + let balance_post_query = Balances::free_balance(&ALICE); + let total_balance_on_hold = Balances::total_balance_on_hold(&ALICE); + + assert_eq!( + balance_pre_query - balance_post_query - total_balance_on_hold, + response_fee + ); + }) + } + + #[test] + fn takes_callback_hold() { + let origin = ALICE; + let weight = Weight::from_parts(100_000_000, 100_000_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback_deposit = WeightToFee::weight_to_fee(&weight); + let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_deposit; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + let held_balance_pre_query = + Fungibles::balance_on_hold(&CallbackGas.into(), &origin); + assert_eq!(held_balance_pre_query, 0); + assert_ne!(callback_deposit, 0); + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + + let held_balance_post_query = + Fungibles::balance_on_hold(&CallbackGas.into(), &origin); + assert_eq!(held_balance_post_query, callback_deposit); + }) + } + + #[test] + fn takes_messaging_hold() { + let origin = ALICE; + let expected_deposit = deposit(); + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + let held_balance_pre_hold = Fungibles::balance_on_hold(&Messaging.into(), &origin); + assert_ne!( + expected_deposit, 0, + "set an onchain byte fee with T::OnChainByteFee to run this test." + ); + assert_eq!(held_balance_pre_hold, 0); + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None,)); + + let held_balance_post_hold = Fungibles::balance_on_hold(&Messaging.into(), &origin); + assert_eq!(held_balance_post_hold, expected_deposit); + }); + } + + #[test] + fn assert_state() { + let origin = ALICE; + let weight = Weight::from_parts(100_000_000, 100_000_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback_deposit = WeightToFee::weight_to_fee(&weight); + let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_deposit; + let id = 1; + let query_id = 42; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin.clone(), id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + + let message = + Messages::get(&origin, id).expect("should exist after xcm_new_query."); + let Message::XcmQuery { query_id: qid, callback: c, .. } = message else { + panic!("Wrong message type.") + }; + assert_eq!(qid, query_id); + assert_eq!(c, Some(callback)); + assert_eq!(XcmQueries::get(query_id), Some((origin, id))); + }) + } + + #[test] + fn xcm_timeouts_must_be_in_the_future() { + let origin = ALICE; + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let timeout = System::block_number(); + + assert_noop!( + new_query(&origin, RESPONSE_LOCATION, timeout, None), + Error::FutureTimeoutMandatory + ); + }) + } + + #[test] + fn xcm_queries_expire_on_expiry_block() { + let origin = ALICE; + let messages = 2; + let query_id = 42; + let endowment = + existential_deposit() + (deposit() + xcm_response_fee()) * messages as Balance; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 10; + for _ in 0..messages { + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + } + + run_to(timeout + 1); + + for id in 0..messages { + let Some(Message::XcmTimeout { .. }) = Messages::get(&origin, id) else { + panic!("Message should be timed out!") + }; + } + let query_ids = (0..messages).map(|id| query_id + id).collect(); + System::assert_has_event(Event::XcmQueriesTimedOut { query_ids }.into()); + }) + } + + fn deposit() -> Balance { + calculate_protocol_deposit::(ProtocolStorageDeposit::XcmQueries) + + calculate_message_deposit::() + } + + fn existential_deposit() -> Balance { + >::get() + } + + // `new_query` is no longer a dispatchable and only callable via a precompile, hence we simply + // wrap calls to it in a transaction to simulate. See additional precompiles tests for + // further assurances. + fn new_query( + origin: &AccountId, + responder: Location, + timeout: u32, + callback: Option, + ) -> Result<(MessageId, QueryId), DispatchError> { + with_transaction(|| { + let result = super::new_query::(origin, responder, timeout, callback); + match &result { + Ok(_) => TransactionOutcome::Commit(result), + Err(_) => TransactionOutcome::Rollback(result), + } + }) + } + + fn xcm_response_fee() -> Balance { + WeightToFee::weight_to_fee( + &(WeightInfo::xcm_response() + CallbackExecutor::execution_weight()), + ) + } +} diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index d9a4e1407..846bf24e9 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -4,7 +4,7 @@ use frame_support::{ pallet_prelude::ConstU32, parameter_types, sp_runtime::{traits::AccountIdLookup, AccountId32, BuildStorage}, - traits::{AsEnsureOriginWithArg, Get}, + traits::{AsEnsureOriginWithArg, Get, OnInitialize}, PalletId, }; use frame_system::{EnsureRoot, EnsureSigned}; @@ -460,14 +460,24 @@ impl ExtBuilder { } } -pub(crate) fn signed(account: AccountId) -> RuntimeOrigin { - RuntimeOrigin::signed(account) +pub(crate) fn next_block() { + let next_block: u32 = System::block_number() + 1; + System::set_block_number(next_block); + Messaging::on_initialize(next_block); } +pub(crate) fn none() -> RuntimeOrigin { + RuntimeOrigin::none() +} + +pub(crate) fn run_to(block_number: u32) { + while System::block_number() < block_number { + next_block(); + } +} pub(crate) fn root() -> RuntimeOrigin { RuntimeOrigin::root() } - -pub(crate) fn none() -> RuntimeOrigin { - RuntimeOrigin::none() +pub(crate) fn signed(account: AccountId) -> RuntimeOrigin { + RuntimeOrigin::signed(account) } From 3baef17374efff525890feddf3cb57b0354a7154 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 17 Jul 2025 23:57:32 +0200 Subject: [PATCH 208/284] test(pallets/api): add call tests --- pallets/api-vnext/src/messaging/tests.rs | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index 2032835f9..a628837c2 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -2,7 +2,9 @@ use frame_support::{ assert_noop, assert_ok, storage::{with_transaction, TransactionOutcome}, traits::fungible::InspectHold, + weights::WeightToFee as _, }; +use sp_runtime::TokenError::FundsUnavailable; use HoldReason::*; use super::*; @@ -327,6 +329,61 @@ mod remove { } } +mod call { + use super::*; + + type BlockWeight = frame_system::pallet::BlockWeight; + + #[test] + fn assert_error_event() { + let origin = ALICE; + let weight = Weight::from_parts(100_000, 100_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); + let message_id = 1; + let data = [100u8; 5]; + ExtBuilder::new().build().execute_with(|| { + assert_ok!(call::(&origin, callback, &message_id, &data)); + + System::assert_last_event( + Event::WeightRefundErrored { + message_id, + error: DispatchError::Token(FundsUnavailable), + } + .into(), + ); + }) + } + + // AlwaysSuccessfullCallbackExecutor should return half the weight of the callback.weight + // TODO: there may be a better way of handling this case. + #[test] + fn block_weight_mutation_happens() { + let origin = ALICE; + let weight = Weight::from_parts(10_000_000, 10_000_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); + let id = 1; + let data = [100u8; 5]; + let callback_fee = ::WeightToFee::weight_to_fee(&weight); + let endowment = existential_deposit() + callback_fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let block_weight_pre_call = + BlockWeight::get().get(DispatchClass::Normal).to_owned(); + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, callback_fee)); + + assert_ok!(call::(&origin, callback, &id, &data)); + + let block_weight_post_call = + BlockWeight::get().get(DispatchClass::Normal).to_owned(); + assert_ne!(block_weight_post_call, Zero::zero()); + // callback weight used in tests is total / 2. + assert_eq!(block_weight_post_call - block_weight_pre_call, weight / 2); + }) + } +} + fn existential_deposit() -> Balance { >::get() } From 640e9a6b4b289dd0d52564793740109b3e798e1c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 18 Jul 2025 13:08:41 +0200 Subject: [PATCH 209/284] test(pallets/api): add process_callback_weight tests --- pallets/api-vnext/src/messaging/tests.rs | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index a628837c2..50bab8e8e 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -1,5 +1,6 @@ use frame_support::{ assert_noop, assert_ok, + dispatch::PostDispatchInfo, storage::{with_transaction, TransactionOutcome}, traits::fungible::InspectHold, weights::WeightToFee as _, @@ -384,6 +385,41 @@ mod call { } } +mod process_callback_weight { + use super::*; + + #[test] + fn ok_with_weight_returns_weight() { + let weight = Weight::from_parts(100_000, 100_000); + let result = DispatchResultWithPostInfo::Ok(PostDispatchInfo { + actual_weight: Some(weight), + pays_fee: Pays::Yes, + }); + let max_weight = Weight::zero(); + assert_eq!(process_callback_weight(&result, max_weight), weight); + } + + #[test] + fn ok_without_weight_returns_max_weight() { + let result = DispatchResultWithPostInfo::Ok(PostDispatchInfo { + actual_weight: None, + pays_fee: Pays::Yes, + }); + let max_weight = Weight::from_parts(200_000, 200_000); + assert_eq!(process_callback_weight(&result, max_weight), max_weight); + } + + #[test] + fn err_returns_max_weight() { + let result = DispatchResultWithPostInfo::Err(DispatchErrorWithPostInfo { + post_info: Default::default(), + error: Error::InvalidMessage.into(), + }); + let max_weight = Weight::from_parts(200_000, 200_000); + assert_eq!(process_callback_weight(&result, max_weight), max_weight); + } +} + fn existential_deposit() -> Balance { >::get() } From 2796c91e8d0d163d1c149bebeabd55effc003888 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 18 Jul 2025 15:28:21 +0200 Subject: [PATCH 210/284] test(pallets/api): add deposit_callback_event tests --- pallets/api-vnext/src/messaging/tests.rs | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index 50bab8e8e..a70ec2f09 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -420,6 +420,53 @@ mod process_callback_weight { } } +mod deposit_callback_event { + use super::*; + + #[test] + fn emits_callback_executed_event_on_success() { + let origin = ALICE; + let message_id = 1; + let weight = Weight::from_parts(100_000, 100_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight); + let result: DispatchResultWithPostInfo = Ok(PostDispatchInfo { + actual_weight: Some(Weight::from_parts(1_000, 0)), + pays_fee: Default::default(), + }); + ExtBuilder::new().build().execute_with(|| { + deposit_callback_event::(&origin, message_id, &callback, &result); + System::assert_last_event( + Event::::CallbackExecuted { origin, id: message_id, callback }.into(), + ); + }); + } + + #[test] + fn emits_callback_failed_event_on_error() { + let origin = BOB; + let message_id = 2; + let weight = Weight::from_parts(100_000, 100_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight); + let result = DispatchResultWithPostInfo::Err(DispatchErrorWithPostInfo { + post_info: Default::default(), + error: Error::InvalidMessage.into(), + }); + ExtBuilder::new().build().execute_with(|| { + deposit_callback_event::(&origin, message_id, &callback, &result); + + System::assert_last_event( + Event::CallbackFailed { + origin, + id: message_id, + callback, + error: result.unwrap_err(), + } + .into(), + ); + }); + } +} + fn existential_deposit() -> Balance { >::get() } From 035a846221bfafd42ec314d297302abab755b914 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 18 Jul 2025 15:42:23 +0200 Subject: [PATCH 211/284] test(pallets/api): add fee management test --- pallets/api-vnext/src/messaging/tests.rs | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index a70ec2f09..2cd48e4c4 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -467,6 +467,54 @@ mod deposit_callback_event { } } +mod manage_fees { + use mock::messaging::Treasury; + + use super::*; + + type WeightToFee = ::WeightToFee; + + #[test] + fn assert_payback_when_execution_weight_is_less_than_deposit_held() { + let origin = ALICE; + let actual_weight_executed = Weight::from_parts(50_000_000, 70_000_000); + let callback_weight_reserved = Weight::from_parts(100_000_000, 100_000_000); + let deposit = WeightToFee::weight_to_fee(&callback_weight_reserved); + assert!(deposit != 0, "Please set an appropriate weight to fee implementation."); + let endowment = existential_deposit() + deposit; + let fee_account = Treasury::get(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + // Artificially take the deposit + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, deposit)); + + let expected_refund = deposit - WeightToFee::weight_to_fee(&actual_weight_executed); + assert!(expected_refund != 0); + + let fee_pot_payment = deposit - expected_refund; + + let fee_account_pre_handle = Balances::free_balance(&fee_account); + let origin_balance_pre_handle = Balances::free_balance(&origin); + + assert_ok!(manage_fees::( + &origin, + actual_weight_executed, + callback_weight_reserved + )); + + // origin should have been refunded by the tune of expected refund. + // the fee pot should have been increased by fee_pot_payment. + let fee_account_post_handle = Balances::free_balance(&fee_account); + let origin_balance_post_handle = Balances::free_balance(&origin); + + assert_eq!(origin_balance_post_handle - origin_balance_pre_handle, expected_refund); + assert_eq!(fee_account_post_handle, fee_account_pre_handle + fee_pot_payment); + }) + } +} + fn existential_deposit() -> Balance { >::get() } From 818358a648b66f534a227ad01ad1db5143629fe1 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 18 Jul 2025 16:23:23 +0200 Subject: [PATCH 212/284] test(pallets/api): add xcm_response tests --- pallets/api-vnext/src/messaging/tests.rs | 232 +++++++++++++++++- .../api-vnext/src/messaging/transports/xcm.rs | 8 +- 2 files changed, 233 insertions(+), 7 deletions(-) diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index 2cd48e4c4..2397695e1 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -8,13 +8,17 @@ use frame_support::{ use sp_runtime::TokenError::FundsUnavailable; use HoldReason::*; -use super::*; +use super::{CallbackExecutor as _, WeightInfo as _, *}; use crate::mock::*; +type CallbackExecutor = ::CallbackExecutor; type Error = super::Error; type Fungibles = ::Fungibles; type IsmpRequests = super::IsmpRequests; +type Message = super::Message; type Messages = super::Messages; +type WeightInfo = ::WeightInfo; +type WeightToFee = ::WeightToFee; type XcmQueries = super::XcmQueries; mod remove { @@ -330,6 +334,219 @@ mod remove { } } +mod xcm_response { + use transports::xcm::tests::{deposit, new_query, xcm_response_fee}; + + use super::{ + mock::{messaging::*, Messaging}, + *, + }; + + type BlockWeight = frame_system::BlockWeight; + type Pallet = Messaging; + + #[test] + fn message_not_found() { + ExtBuilder::new().build().execute_with(|| { + assert_noop!( + Pallet::xcm_response(root(), 0, Default::default()), + Error::MessageNotFound + ); + }) + } + + #[test] + fn timeout_messages_are_noop() { + let origin = ALICE; + let message_id = 1; + let query_id = 42; + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, message_id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + + // Update the message to XcmTimedOut + Messages::mutate(ALICE, message_id, |message| { + let Some(Message::XcmQuery { query_id, message_deposit, .. }): &mut Option< + Message, + > = message + else { + panic!("No message!"); + }; + *message = Some(Message::XcmTimeout { + query_id: *query_id, + message_deposit: *message_deposit, + callback_deposit: None, + }); + }); + + assert_noop!( + Pallet::xcm_response(root(), query_id, Default::default()), + Error::RequestTimedOut + ); + }) + } + + #[test] + fn assert_event_no_callback() { + let origin = ALICE; + let id = 1; + let query_id = 42; + let response = Response::Null; + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + + assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); + + assert!(events().contains(&Event::XcmResponseReceived { + dest: origin, + id, + query_id, + response + })); + }) + } + + #[test] + fn assert_message_is_stored_for_polling_no_callback() { + let origin = ALICE; + let id = 1; + let query_id = 42; + let response = Response::ExecutionResult(None); + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + + assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); + + let Some(Message::XcmResponse { query_id: q, response: r, .. }): Option = + Messages::get(&origin, id) + else { + panic!("wrong message type"); + }; + + assert_eq!(q, query_id); + assert_eq!(r, response); + }) + } + + #[test] + fn message_is_removed_after_successfull_callback_execution() { + let origin = ALICE; + let id = 1; + let query_id = 42; + let response = Response::ExecutionResult(None); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into()); + let callback_fee = WeightToFee::weight_to_fee(&callback.weight); + let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + + assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); + + assert!(Messages::get(&origin, id).is_none()); + assert!(XcmQueries::get(query_id).is_none()); + }) + } + + #[test] + fn message_deposit_returned_after_successfull_callback_execution() { + let origin = ALICE; + let id = 1; + let query_id = 42; + let response = Response::ExecutionResult(None); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Zero::zero()); + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + + let held_balance_pre_release = Balances::total_balance_on_hold(&origin); + assert_ne!(held_balance_pre_release, 0); + + assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); + + let held_balance_post_release = Balances::total_balance_on_hold(&origin); + assert_eq!(held_balance_post_release, 0); + }) + } + + // Dont include any callback weight so we can test the xcm_response blockweight mutation. + #[test] + fn assert_blockweight_mutation_no_callback() { + let origin = ALICE; + let id = 1; + let query_id = 42; + let xcm_response = Response::ExecutionResult(None); + let endowment = existential_deposit() + deposit() + xcm_response_fee(); + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .with_query_id(query_id) + .build() + .execute_with(|| { + let timeout = System::block_number() + 1; + + let block_weight_pre_call = + BlockWeight::get().get(DispatchClass::Normal).to_owned(); + + assert_ne!( + CallbackExecutor::execution_weight(), + Zero::zero(), + "Please set a callback executor execution_weight to run this test." + ); + assert_ne!( + WeightInfo::xcm_response(), + Zero::zero(), + "Please set an T::WeightInfo::xcm_response() to run this test." + ); + assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + + assert_ok!(Pallet::xcm_response(root(), query_id, xcm_response.clone())); + + let block_weight_post_call = + BlockWeight::get().get(DispatchClass::Normal).to_owned(); + + assert_eq!( + block_weight_post_call - block_weight_pre_call, + WeightInfo::xcm_response() + CallbackExecutor::execution_weight() + ) + }) + } +} + mod call { use super::*; @@ -472,8 +689,6 @@ mod manage_fees { use super::*; - type WeightToFee = ::WeightToFee; - #[test] fn assert_payback_when_execution_weight_is_less_than_deposit_held() { let origin = ALICE; @@ -515,6 +730,17 @@ mod manage_fees { } } +pub fn events() -> Vec> { + let result = System::events() + .into_iter() + .map(|r| r.event) + .filter_map(|e| if let RuntimeEvent::Messaging(inner) = e { Some(inner) } else { None }) + .collect(); + + System::reset_events(); + result +} + fn existential_deposit() -> Balance { >::get() } diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs index 00df43a58..6e72bba45 100644 --- a/pallets/api-vnext/src/messaging/transports/xcm.rs +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -96,7 +96,7 @@ pub trait NotifyQueryHandler { } #[cfg(test)] -mod tests { +pub(crate) mod tests { use frame_support::{ assert_noop, assert_ok, storage::{with_transaction, TransactionOutcome}, @@ -319,7 +319,7 @@ mod tests { }) } - fn deposit() -> Balance { + pub(crate) fn deposit() -> Balance { calculate_protocol_deposit::(ProtocolStorageDeposit::XcmQueries) + calculate_message_deposit::() } @@ -331,7 +331,7 @@ mod tests { // `new_query` is no longer a dispatchable and only callable via a precompile, hence we simply // wrap calls to it in a transaction to simulate. See additional precompiles tests for // further assurances. - fn new_query( + pub(crate) fn new_query( origin: &AccountId, responder: Location, timeout: u32, @@ -346,7 +346,7 @@ mod tests { }) } - fn xcm_response_fee() -> Balance { + pub(crate) fn xcm_response_fee() -> Balance { WeightToFee::weight_to_fee( &(WeightInfo::xcm_response() + CallbackExecutor::execution_weight()), ) From 5b5bb7b255baa9ac13b7f08f9b864c0753e99522 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 18 Jul 2025 21:01:11 +0200 Subject: [PATCH 213/284] test(pallets/api): add ismp tests --- .../src/messaging/transports/ismp.rs | 374 ++++++++++++++++++ 1 file changed, 374 insertions(+) diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 8ee09b554..3687375c4 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -285,3 +285,377 @@ impl IsmpModuleWeight for Pallet { T::WeightInfo::ismp_on_response(x).saturating_add(T::CallbackExecutor::execution_weight()) } } + +#[cfg(test)] +mod tests { + use ::ismp::{host::StateMachine, module::IsmpModule, Error as IsmpError}; + use frame_support::{assert_ok, traits::fungible::InspectHold, weights::WeightToFee as _}; + + use super::{super::tests::events, messaging::HoldReason::*, mock::*, *}; + + type Fungibles = ::Fungibles; + type IsmpRequests = super::IsmpRequests; + type MaxResponseLen = ::MaxResponseLen; + type Messages = super::Messages; + type OnChainByteFee = ::OnChainByteFee; + type WeightToFee = ::WeightToFee; + + mod get { + use super::*; + + #[test] + fn takes_deposit() { + let origin = ALICE; + let weight = Weight::from_parts(100_000_000, 100_000_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback_deposit = WeightToFee::weight_to_fee(&weight); + let fee: Balance = u32::MAX.into(); + let expected_deposit = calculate_protocol_deposit::( + ProtocolStorageDeposit::IsmpRequests, + ) + calculate_message_deposit::() + + // TODO + // calculate_deposit_of::>() + + callback_deposit; + let endowment = existential_deposit() + expected_deposit + fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let held_balance_pre_hold = Balances::total_balance_on_hold(&ALICE); + assert_eq!(held_balance_pre_hold, 0); + assert!(expected_deposit != 0); + + assert_ok!(get::(&origin, message(), fee, Some(callback))); + + let held_balance_post_hold = Balances::total_balance_on_hold(&ALICE); + assert_eq!(held_balance_post_hold, expected_deposit); + }) + } + + #[test] + fn assert_state() { + let origin = ALICE; + let id = 1; + let fee: Balance = u32::MAX.into(); + let callback = None; + let deposit = calculate_protocol_deposit::( + ProtocolStorageDeposit::IsmpRequests, + ) + calculate_message_deposit::(); + let endowment = existential_deposit() + deposit + fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .build() + .execute_with(|| { + let (id, commitment) = get::(&origin, message(), fee, callback).unwrap(); + + assert_eq!(IsmpRequests::get(commitment), Some((origin.clone(), id))); + let Some(Message::Ismp { commitment: c, callback: cb, message_deposit: d }) = + Messages::get(origin, id) + else { + panic!("wrong message type"); + }; + assert_eq!((c, cb, d), (commitment, callback, deposit)) + }) + } + + fn message() -> DispatchGet { + DispatchGet { + dest: StateMachine::Polkadot(2_000), + from: ID.to_vec(), + keys: Vec::default(), + height: 10, + context: Vec::default(), + timeout: 100, + } + } + } + + mod post { + use super::*; + + #[test] + fn takes_deposit() { + let origin = ALICE; + let weight = Weight::from_parts(100_000_000, 100_000_000); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback_deposit = ::WeightToFee::weight_to_fee(&weight); + let fee: Balance = u32::MAX.into(); + let expected_deposit = calculate_protocol_deposit::::OnChainByteFee>( + ProtocolStorageDeposit::IsmpRequests, + ) + calculate_message_deposit::::OnChainByteFee>() + + // TODO + //calculate_deposit_of::>() + + callback_deposit; + let endowment = existential_deposit() + expected_deposit + fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .build() + .execute_with(|| { + let held_balance_pre_hold = Balances::total_balance_on_hold(&origin); + assert_eq!(held_balance_pre_hold, 0); + assert_ne!(callback_deposit, 0); + assert_ne!(expected_deposit, 0); + + assert_ok!(post::(&origin, message(), fee, Some(callback))); + + let held_balance_post_hold = Balances::total_balance_on_hold(&origin); + assert_eq!(held_balance_post_hold, expected_deposit); + }) + } + + #[test] + fn assert_state() { + let origin = ALICE; + let id = 1; + let fee: Balance = u32::MAX.into(); + let callback = None; + let deposit = calculate_protocol_deposit::( + ProtocolStorageDeposit::IsmpRequests, + ) + calculate_message_deposit::(); + let endowment = existential_deposit() + deposit + fee; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), endowment)]) + .with_message_id(&origin, id) + .build() + .execute_with(|| { + let (id, commitment) = post::(&origin, message(), fee, callback).unwrap(); + + assert_eq!(IsmpRequests::get(commitment).unwrap(), (origin.clone(), id)); + let Some(Message::Ismp { commitment: c, callback: cb, message_deposit: d }) = + Messages::get(origin, id) + else { + panic!("wrong message type"); + }; + assert_eq!((c, cb, d), (commitment, callback, deposit)) + }) + } + + fn message() -> DispatchPost { + DispatchPost { + dest: StateMachine::Polkadot(2_000), + from: ID.to_vec(), + to: ID.to_vec(), + timeout: 100, + body: Vec::default(), + } + } + } + + mod ismp_hooks { + use super::*; + + mod on_accept { + use super::*; + + /// The on_accept must return Ok even when not in use. + /// If an error is returned the receipt is not removed and a replay attack is possible. + #[test] + fn is_ok() { + let handler = handler(); + ExtBuilder::new() + .build() + .execute_with(|| assert!(handler.on_accept(post_request(100usize)).is_ok())) + } + } + + mod timeout_commitment { + use super::*; + + #[test] + fn request_not_found() { + ExtBuilder::new().build().execute_with(|| { + let err = timeout_commitment::(&Default::default()).unwrap_err(); + assert_eq!( + err.downcast::().unwrap(), + IsmpError::Custom( + "Request commitment not found while processing timeout.".into() + ) + ) + }) + } + + #[test] + fn invalid_request() { + let origin = ALICE; + let id = 1; + let commitment: H256 = [1u8; 32].into(); + let message = + Message::XcmQuery { query_id: 0, callback: None, message_deposit: 100 }; + ExtBuilder::new().build().execute_with(|| { + IsmpRequests::insert(commitment, (&origin, id)); + Messages::insert(origin, id, &message); + + let err = timeout_commitment::(&commitment).unwrap_err(); + assert_eq!( + err.downcast::().unwrap(), + IsmpError::Custom("Invalid message".into()) + ) + }) + } + + #[test] + fn actually_timesout_assert_event() { + let origin = ALICE; + let id = 1; + let commitment: H256 = [1u8; 32].into(); + let message_deposit = 100; + let message = Message::Ismp { commitment, callback: None, message_deposit }; + ExtBuilder::new().build().execute_with(|| { + IsmpRequests::insert(commitment, (&origin, id)); + Messages::insert(&origin, id, &message); + + let res = timeout_commitment::(&commitment); + + assert!(res.is_ok(), "{:?}", res.unwrap_err().downcast::().unwrap()); + + if let Some(Message::IsmpTimeout { commitment, .. }) = + Messages::get(&origin, id) + { + assert!(events().contains(&Event::IsmpTimedOut { commitment })) + } else { + panic!("Message not timed out.") + } + }) + } + + #[test] + fn success_callback_releases_deposit() { + let origin = ALICE; + let response = vec![1u8]; + let commitment = H256::default(); + let id = 1; + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into()); + let message_deposit = 100; + let message = + Message::Ismp { commitment, callback: Some(callback), message_deposit }; + ExtBuilder::new() + .with_balances(vec![(origin.clone(), existential_deposit() + message_deposit)]) + .build() + .execute_with(|| { + assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); + let post_hold = Balances::free_balance(&origin); + + IsmpRequests::insert(commitment, (origin.clone(), id)); + Messages::insert(&origin, id, message); + + let res = process_response::(&commitment, &response, |dest, id| { + Event::IsmpGetResponseReceived { dest, id, commitment } + }); + + assert!(res.is_ok(), "process_response failed"); + + let post_process = Balances::free_balance(&origin); + assert_eq!(post_process - message_deposit, post_hold); + }) + } + } + + mod process_response { + use sp_runtime::bounded_vec; + + use super::*; + + #[test] + fn response_exceeds_max_encoded_len_limit() { + let commitment = H256::zero(); + let response = vec![1u8; >::get() as usize + 1usize]; + ExtBuilder::new().build().execute_with(|| { + let err = process_response::(&commitment, &response, |dest, id| { + Event::IsmpGetResponseReceived { dest, id, commitment } + }) + .unwrap_err(); + + assert_eq!( + err.downcast::().unwrap(), + IsmpError::Custom( + "Response length exceeds maximum allowed length.".to_string() + ) + ); + }) + } + + #[test] + fn request_not_found() { + let commitment = H256::zero(); + let response = vec![1u8]; + ExtBuilder::new().build().execute_with(|| { + let err = process_response::(&commitment, &response, |dest, id| { + Event::IsmpGetResponseReceived { dest, id, commitment } + }) + .unwrap_err(); + + assert_eq!( + err.downcast::().unwrap(), + IsmpError::Custom("Request not found.".to_string()) + ); + }) + } + + #[test] + fn message_must_be_ismp_request() { + let origin = ALICE; + let response = bounded_vec![1u8]; + let commitment = H256::default(); + let id = 1; + let message = Message::ismp_response(commitment, 100, response); + ExtBuilder::new().build().execute_with(|| { + IsmpRequests::insert(commitment, (&origin, id)); + Messages::insert(&origin, id, message); + + let err = process_response::(&commitment, &vec![1u8], |dest, id| { + Event::IsmpGetResponseReceived { dest, id, commitment } + }) + .unwrap_err(); + assert_eq!( + err.downcast::().unwrap(), + IsmpError::Custom("Message must be an ismp request.".to_string()) + ); + }) + } + + #[test] + fn no_callback_saves_response() { + let origin = ALICE; + let response = vec![1u8]; + let commitment = H256::default(); + let id = 1; + let message = Message::Ismp { commitment, callback: None, message_deposit: 100 }; + ExtBuilder::new().build().execute_with(|| { + IsmpRequests::insert(commitment, (origin.clone(), id)); + Messages::insert(&origin, id, message); + + let res = process_response::(&commitment, &response, |dest, id| { + Event::IsmpGetResponseReceived { dest, id, commitment } + }); + + assert!(res.is_ok(), "process_response failed"); + + let Some(Message::IsmpResponse { .. }) = Messages::get(&origin, id) else { + panic!("wrong message type.") + }; + }) + } + } + + fn handler() -> ismp::Handler { + ismp::Handler::::new() + } + + fn post_request(body_len: usize) -> PostRequest { + PostRequest { + source: StateMachine::Polkadot(2000), + dest: StateMachine::Polkadot(2001), + nonce: 100u64, + from: [1u8; 32].to_vec(), + to: [1u8; 32].to_vec(), + timeout_timestamp: 100_000, + body: vec![1u8; body_len], + } + } + } + + fn existential_deposit() -> Balance { + >::get() + } +} From 48216b736960d89b1fa760fcca669930bbb82b4f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 20 Jul 2025 15:23:32 +0100 Subject: [PATCH 214/284] refactor: limit ismp_response helper to tests --- pallets/api-vnext/src/messaging.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 4930ea27c..b17c207e2 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -831,6 +831,7 @@ pub(crate) enum Message { } impl Message { + #[cfg(test)] fn ismp_response( commitment: H256, message_deposit: BalanceOf, From d90c80145703007a6d1f74a3740d203a3fa76632 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 20 Jul 2025 15:25:18 +0100 Subject: [PATCH 215/284] refactor(pallets/api): use try_convert --- .../api-vnext/src/messaging/benchmarking.rs | 10 +++--- .../src/messaging/precompiles/ismp/v0.rs | 36 ++++++++++--------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 3a895b0e3..c2e113e77 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -27,6 +27,7 @@ use pallet_revive::{ precompiles::{ alloy::primitives as alloy, run::{H256, U256}, + Error, }, test_utils::ALICE_ADDR, AddressMapper as _, Origin, @@ -49,9 +50,9 @@ use super::{ Call, Callback, Config, Encoding, Event, HoldReason, IsmpRequests, Message, MessageId, Messages, Pallet, }; -use crate::messaging::BalanceOf; #[cfg(test)] use crate::mock::{ExtBuilder, Test}; +use crate::{messaging::BalanceOf, TryConvert}; type AddressMapper = ::AddressMapper; type Balances = ::Fungibles; @@ -69,7 +70,8 @@ type Xcm = super::precompiles::xcm::v0::Xcm<5, T>; Time: Time> >, // Messaging - BalanceOf: Bounded + TryFrom + TryInto, + T: Config>>, + alloy::U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, T: pallet_ismp::Config + pallet_xcm::Config, u32: From>, // Timestamp @@ -150,7 +152,7 @@ mod benchmarks { keys: vec![vec![255u8; T::MaxKeyLen::get() as usize].into(); y as usize].into(), }; let fee = >::minimum_balance() - .try_into() + .try_convert() .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; silence_timestamp_genesis_warnings::(); @@ -289,7 +291,7 @@ mod benchmarks { data: vec![255; x as usize].into(), }; let fee = >::minimum_balance() - .try_into() + .try_convert() .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; silence_timestamp_genesis_warnings::(); diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index da8c3bf9a..d015a53d8 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -2,11 +2,17 @@ use ::ismp::{ dispatcher::{DispatchGet, DispatchPost}, host::StateMachine, }; -use frame_support::{ensure, traits::Get as _}; +use frame_support::{ + ensure, + traits::{tokens::fungible::Inspect, Get as _}, +}; pub(crate) use IISMP::{Get, *}; use super::*; -use crate::messaging::transports::ismp::{get, post, ID}; +use crate::{ + messaging::transports::ismp::{get, post, ID}, + TryConvert, +}; sol!( #![sol(extra_derives(Debug, PartialEq))] @@ -16,10 +22,14 @@ sol!( /// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State /// Machine Protocol. pub struct Ismp(PhantomData); -impl Precompile - for Ismp +impl< + const FIXED: u16, + T: frame_system::Config + + pallet_revive::Config + + Config>>, + > Precompile for Ismp where - BalanceOf: TryFrom, + U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, { type Interface = IISMPCalls; type T = T; @@ -51,9 +61,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_get::(request)?; - let fee = (*fee) - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let fee = (*fee).try_convert()?; let (id, commitment) = get::(origin, message, fee, None).map_err(Self::map_err)?; @@ -80,9 +88,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_get::(request)?; - let fee = (*fee) - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let fee = (*fee).try_convert()?; let (id, commitment) = get::(origin, message, fee, Some(callback.into())).map_err(Self::map_err)?; @@ -119,9 +125,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_post::(request)?; - let fee = (*fee) - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let fee = (*fee).try_convert()?; let (id, commitment) = post::(origin, message, fee, None).map_err(Self::map_err)?; @@ -143,9 +147,7 @@ where let origin = env.caller(); let origin = origin.account_id()?; let message = try_post::(request)?; - let fee = (*fee) - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let fee = (*fee).try_convert()?; let (id, commitment) = post::(env.caller().account_id()?, message, fee, Some(callback.into())) From 1a40485c712dc9b3ebec620708bc1a3a1c28484f Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Sun, 20 Jul 2025 15:25:53 +0100 Subject: [PATCH 216/284] refactor(pallets/api): update messaging weights --- pallets/api-vnext/src/messaging/weights.rs | 134 ++++++++++----------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index dad11c5d3..946ba624c 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_api_vnext::messaging` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-07-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-07-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `R0GUE`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` @@ -50,7 +50,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. + // Minimum execution time: 1_000_000 picoseconds. Weight::from_parts(1_000_000, 0) } /// Storage: `Messaging::Messages` (r:1 w:0) @@ -59,8 +59,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `16283` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 16283) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 16283) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -72,14 +72,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 78_000_000 picoseconds. - Weight::from_parts(97_276_764, 771) - // Standard Error: 3_693 - .saturating_add(Weight::from_parts(40_699, 0).saturating_mul(x.into())) - // Standard Error: 22_658 - .saturating_add(Weight::from_parts(208_784, 0).saturating_mul(y.into())) - // Standard Error: 152_716 - .saturating_add(Weight::from_parts(186_089, 0).saturating_mul(a.into())) + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(140_218_301, 771) + // Standard Error: 4_902 + .saturating_add(Weight::from_parts(45_681, 0).saturating_mul(x.into())) + // Standard Error: 30_072 + .saturating_add(Weight::from_parts(219_280, 0).saturating_mul(y.into())) + // Standard Error: 202_682 + .saturating_add(Weight::from_parts(610_542, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -96,8 +96,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `610` // Estimated: `16283` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(76_175_510, 16283) + // Minimum execution time: 91_000_000 picoseconds. + Weight::from_parts(106_000_000, 16283) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -110,8 +110,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `395` // Estimated: `16283` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_209_116, 16283) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 16283) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -123,12 +123,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 75_000_000 picoseconds. - Weight::from_parts(77_228_752, 771) - // Standard Error: 299 - .saturating_add(Weight::from_parts(3_834, 0).saturating_mul(x.into())) - // Standard Error: 99_842 - .saturating_add(Weight::from_parts(23_740_891, 0).saturating_mul(y.into())) + // Minimum execution time: 107_000_000 picoseconds. + Weight::from_parts(111_947_631, 771) + // Standard Error: 224 + .saturating_add(Weight::from_parts(4_530, 0).saturating_mul(x.into())) + // Standard Error: 74_946 + .saturating_add(Weight::from_parts(31_797_390, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -138,8 +138,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `16283` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 16283) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 16283) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Messaging::Messages` (r:100 w:100) @@ -153,10 +153,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `431 + x * (97 ±0)` // Estimated: `3694 + x * (15293 ±0)` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(16_254_511, 3694) - // Standard Error: 45_155 - .saturating_add(Weight::from_parts(40_645_291, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(12_914_106, 3694) + // Standard Error: 16_773 + .saturating_add(Weight::from_parts(55_544_739, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -182,10 +182,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `309` // Estimated: `7471` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(49_516_326, 7471) - // Standard Error: 158_346 - .saturating_add(Weight::from_parts(14_483_673, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(71_000_000, 7471) + // Standard Error: 13_579 + .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -201,8 +201,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `569` // Estimated: `16283` - // Minimum execution time: 57_000_000 picoseconds. - Weight::from_parts(57_000_000, 16283) + // Minimum execution time: 82_000_000 picoseconds. + Weight::from_parts(83_000_000, 16283) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -214,7 +214,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. + // Minimum execution time: 1_000_000 picoseconds. Weight::from_parts(1_000_000, 0) } /// Storage: `Messaging::Messages` (r:1 w:0) @@ -223,8 +223,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `740` // Estimated: `16283` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 16283) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 16283) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -236,14 +236,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 78_000_000 picoseconds. - Weight::from_parts(97_276_764, 771) - // Standard Error: 3_693 - .saturating_add(Weight::from_parts(40_699, 0).saturating_mul(x.into())) - // Standard Error: 22_658 - .saturating_add(Weight::from_parts(208_784, 0).saturating_mul(y.into())) - // Standard Error: 152_716 - .saturating_add(Weight::from_parts(186_089, 0).saturating_mul(a.into())) + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(140_218_301, 771) + // Standard Error: 4_902 + .saturating_add(Weight::from_parts(45_681, 0).saturating_mul(x.into())) + // Standard Error: 30_072 + .saturating_add(Weight::from_parts(219_280, 0).saturating_mul(y.into())) + // Standard Error: 202_682 + .saturating_add(Weight::from_parts(610_542, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -260,8 +260,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `610` // Estimated: `16283` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(76_175_510, 16283) + // Minimum execution time: 91_000_000 picoseconds. + Weight::from_parts(106_000_000, 16283) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -274,8 +274,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `395` // Estimated: `16283` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_209_116, 16283) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 16283) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -287,12 +287,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 75_000_000 picoseconds. - Weight::from_parts(77_228_752, 771) - // Standard Error: 299 - .saturating_add(Weight::from_parts(3_834, 0).saturating_mul(x.into())) - // Standard Error: 99_842 - .saturating_add(Weight::from_parts(23_740_891, 0).saturating_mul(y.into())) + // Minimum execution time: 107_000_000 picoseconds. + Weight::from_parts(111_947_631, 771) + // Standard Error: 224 + .saturating_add(Weight::from_parts(4_530, 0).saturating_mul(x.into())) + // Standard Error: 74_946 + .saturating_add(Weight::from_parts(31_797_390, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -302,8 +302,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `740` // Estimated: `16283` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 16283) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 16283) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Messaging::Messages` (r:100 w:100) @@ -317,10 +317,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `431 + x * (97 ±0)` // Estimated: `3694 + x * (15293 ±0)` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(16_254_511, 3694) - // Standard Error: 45_155 - .saturating_add(Weight::from_parts(40_645_291, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(12_914_106, 3694) + // Standard Error: 16_773 + .saturating_add(Weight::from_parts(55_544_739, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -346,10 +346,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `309` // Estimated: `7471` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(49_516_326, 7471) - // Standard Error: 158_346 - .saturating_add(Weight::from_parts(14_483_673, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(71_000_000, 7471) + // Standard Error: 13_579 + .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -365,8 +365,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `569` // Estimated: `16283` - // Minimum execution time: 57_000_000 picoseconds. - Weight::from_parts(57_000_000, 16283) + // Minimum execution time: 82_000_000 picoseconds. + Weight::from_parts(83_000_000, 16283) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } From ec822ad89ce67dd7fdded460343ce805576936ea Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 21 Jul 2025 22:32:56 +0100 Subject: [PATCH 217/284] refactor(pallets/api): use global message identifier Stores contract address in message to ensure authorised removal. Additional benefits beyond reduced storage requirements are that any contract can poll and use responses until originator removes. --- pallets/api-vnext/src/messaging.rs | 262 ++++++++++----- .../api-vnext/src/messaging/benchmarking.rs | 117 +++---- .../src/messaging/precompiles/ismp/v0.rs | 232 ++++++------- .../api-vnext/src/messaging/precompiles/v0.rs | 113 ++++--- .../src/messaging/precompiles/xcm/v0.rs | 152 ++++----- pallets/api-vnext/src/messaging/tests.rs | 310 +++++++++--------- .../src/messaging/transports/ismp.rs | 187 ++++++----- .../api-vnext/src/messaging/transports/xcm.rs | 93 +++--- pallets/api-vnext/src/mock.rs | 14 +- 9 files changed, 812 insertions(+), 668 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index b17c207e2..07a3376ba 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -1,7 +1,7 @@ use deposits::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, - pallet_prelude::*, + pallet_prelude::{DispatchError::BadOrigin, *}, storage::KeyLenOf, traits::{ tokens::{ @@ -42,7 +42,6 @@ mod weights; type BalanceOf = <::Fungibles as Inspect>>::Balance; type BlockNumberOf = BlockNumberFor; type DbWeightOf = ::DbWeight; -// TODO: consider u32 (e.g. a message per contract/block) pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - U256?; #[frame_support::pallet] @@ -164,16 +163,17 @@ pub mod pallet { // Iterate through the queries that have expired and update their status. let mut weight: Weight = Zero::zero(); let mut query_ids = Vec::new(); - for (origin, message_id) in XcmQueryTimeouts::::get(n) { + for message_id in XcmQueryTimeouts::::get(n) { weight = weight.saturating_add(DbWeightOf::::get().reads_writes(2, 1)); - Messages::::mutate(origin, message_id, |maybe_message| { - if let Some(Message::XcmQuery { query_id, message_deposit, callback }) = + Messages::::mutate(message_id, |maybe_message| { + if let Some(Message::XcmQuery { origin, query_id, message_deposit, callback }) = maybe_message.as_mut() { let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); query_ids.push(*query_id); *maybe_message = Some(Message::XcmTimeout { + origin: origin.address, query_id: *query_id, message_deposit: *message_deposit, callback_deposit, @@ -189,43 +189,31 @@ pub mod pallet { } } - // TODO: docs - // Messages are keyed by the originating account to ensure that only that account can remove the - // message. + /// The message queue. #[pallet::storage] - pub(crate) type Messages = StorageDoubleMap< - _, - Blake2_128Concat, - T::AccountId, - Blake2_128Concat, - MessageId, - Message, - >; + pub(crate) type Messages = StorageMap<_, Twox64Concat, MessageId, Message>; - /// The next message identifier for each account. + /// The next message identifier. /// - /// Also serves as a count of the number of messages sent by each account. + /// Also serves as a count of the total number of messages sent. #[pallet::storage] - pub(crate) type NextMessageId = - StorageMap<_, Blake2_128Concat, T::AccountId, MessageId, ValueQuery>; + pub(crate) type NextMessageId = StorageValue<_, MessageId, ValueQuery>; - // TODO: docs + /// The active ISMP requests, mapped to the originating message identifier. #[pallet::storage] - pub(super) type IsmpRequests = - StorageMap<_, Identity, H256, (T::AccountId, MessageId), OptionQuery>; + pub(super) type IsmpRequests = StorageMap<_, Identity, H256, MessageId>; - // TODO: docs + /// The active XCM queries, mapped to the originating message identifier. #[pallet::storage] - pub(super) type XcmQueries = - StorageMap<_, Identity, QueryId, (T::AccountId, MessageId), OptionQuery>; + pub(super) type XcmQueries = StorageMap<_, Twox64Concat, QueryId, MessageId>; - // TODO: docs + /// The timeouts of XCM queries, by block number. #[pallet::storage] pub(super) type XcmQueryTimeouts = StorageMap< _, - Identity, + Twox64Concat, BlockNumberOf, - BoundedVec<(T::AccountId, MessageId), T::MaxXcmQueryTimeoutsPerBlock>, + BoundedVec, ValueQuery, >; @@ -256,7 +244,7 @@ pub mod pallet { /// A response to a GET has been received via ISMP. IsmpGetResponseReceived { /// The destination of the response. - dest: T::AccountId, + dest: H160, /// The identifier specified for the request. id: MessageId, /// The ISMP request commitment. @@ -265,7 +253,7 @@ pub mod pallet { /// A response to a POST has been received via ISMP. IsmpPostResponseReceived { /// The destination of the response. - dest: T::AccountId, + dest: H160, /// The identifier specified for the request. id: MessageId, /// The ISMP request commitment. @@ -280,7 +268,7 @@ pub mod pallet { /// A response to a XCM query has been received. XcmResponseReceived { /// The destination of the response. - dest: T::AccountId, + dest: H160, /// The identifier specified for the request. id: MessageId, /// The identifier of the XCM query. @@ -330,21 +318,19 @@ pub mod pallet { DispatchClass::Normal, ); - let (initiating_origin, id) = - XcmQueries::::get(query_id).ok_or(Error::::MessageNotFound)?; - let xcm_query_message = - Messages::::get(&initiating_origin, id).ok_or(Error::::MessageNotFound)?; + let id = XcmQueries::::get(query_id).ok_or(Error::::MessageNotFound)?; + let xcm_query_message = Messages::::get(id).ok_or(Error::::MessageNotFound)?; - let (query_id, callback, message_deposit) = match &xcm_query_message { - Message::XcmQuery { query_id, callback, message_deposit } => - (query_id, callback, message_deposit), + let (origin, query_id, callback, message_deposit) = match &xcm_query_message { + Message::XcmQuery { origin, query_id, callback, message_deposit } => + (origin, query_id, callback, message_deposit), Message::XcmTimeout { .. } => return Err(Error::::RequestTimedOut.into()), _ => return Err(Error::::InvalidMessage.into()), }; // Emit event before possible callback execution. Self::deposit_event(Event::::XcmResponseReceived { - dest: initiating_origin.clone(), + dest: origin.address, id, query_id: *query_id, response: xcm_response.clone(), @@ -355,12 +341,12 @@ pub mod pallet { log::debug!(target: "pop-api::extension", "xcm callback={:?}, response={:?}", callback, xcm_response); // Never roll back state if call fails. // Ensure that the response can be polled. - if call::(&initiating_origin, *callback, &id, &xcm_response).is_ok() { - Messages::::remove(&initiating_origin, id); + if call::(&origin.account, *callback, &id, &xcm_response).is_ok() { + Messages::::remove(id); XcmQueries::::remove(query_id); T::Fungibles::release( &HoldReason::Messaging.into(), - &initiating_origin, + &origin.account, *message_deposit, Precision::Exact, )?; @@ -370,9 +356,9 @@ pub mod pallet { } // No callback is executed, Messages::::insert( - &initiating_origin, id, Message::XcmResponse { + origin: origin.address, query_id: *query_id, message_deposit: *message_deposit, response: xcm_response, @@ -436,14 +422,14 @@ pub(crate) fn call( Encoding::SolidityAbi => todo!(), }; let result = T::CallbackExecutor::execute( - initiating_origin, + &initiating_origin, callback.destination, data, callback.weight, ); log::debug!(target: "pop-api::extension", "callback weight={:?}, result={result:?}", callback.weight); - deposit_callback_event::(initiating_origin, *id, &callback, &result); + deposit_callback_event::(initiating_origin.clone(), *id, &callback, &result); let callback_weight_used = process_callback_weight(&result, callback.weight); // Manually adjust callback weight. @@ -473,7 +459,7 @@ pub(crate) fn call( /// - `callback`: The callback object that was attempted to be executed. /// - `result`: The outcome of the callback execution, containing either success or failure. pub(crate) fn deposit_callback_event( - initiating_origin: &T::AccountId, + initiating_origin: T::AccountId, message_id: MessageId, callback: &Callback, result: &DispatchResultWithPostInfo, @@ -481,14 +467,14 @@ pub(crate) fn deposit_callback_event( match result { Ok(_) => { >::deposit_event(Event::::CallbackExecuted { - origin: initiating_origin.clone(), + origin: initiating_origin, id: message_id, callback: callback.clone(), }); }, Err(error) => { >::deposit_event(Event::::CallbackFailed { - origin: initiating_origin.clone(), + origin: initiating_origin, id: message_id, callback: callback.clone(), error: error.clone(), @@ -497,9 +483,9 @@ pub(crate) fn deposit_callback_event( } } -fn get(id: (&T::AccountId, &MessageId)) -> Vec { +fn get(id: &MessageId) -> Vec { use Message::*; - Messages::::get(id.0, id.1) + Messages::::get(id) .and_then(|m| match m { Ismp { .. } | IsmpTimeout { .. } | XcmQuery { .. } | XcmTimeout { .. } => None, IsmpResponse { response, .. } => Some(response.into_inner()), @@ -543,7 +529,7 @@ pub(crate) fn manage_fees( // Withdraw assets. let credit = T::Fungibles::withdraw( - &initiating_origin, + initiating_origin, to_reward, Precision::Exact, Preservation::Preserve, @@ -555,20 +541,16 @@ pub(crate) fn manage_fees( Ok(()) } -fn next_message_id(origin: &T::AccountId) -> Result { - // TODO: work into storage deposit? A global identifier might be better for a number of reasons, - // but will require removal protection by storing the originating account in the message rather - // than key - NextMessageId::::try_mutate(&origin, |next| { +fn next_message_id() -> Result { + NextMessageId::::try_mutate(|next| { let id = *next; *next = next.checked_add(One::one()).ok_or(ArithmeticError::Overflow)?; Ok(id) }) } -fn poll_status(message: (&T::AccountId, &MessageId)) -> MessageStatus { - >::get(message.0, message.1) - .map_or(MessageStatus::NotFound, |m| MessageStatus::from(&m)) +fn poll_status(id: &MessageId) -> MessageStatus { + >::get(id).map_or(MessageStatus::NotFound, |m| MessageStatus::from(&m)) } /// Determines the actual weight consumed by a callback execution, falling back to the @@ -617,33 +599,49 @@ pub(crate) fn process_callback_weight( /// # Parameters /// - `origin`: The account removing its messages. /// - `messages`: List of message IDs to remove (bounded by `MaxRemovals`). -fn remove(origin: &T::AccountId, messages: &[MessageId]) -> DispatchResult { +fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { for id in >::try_from(messages) .map_err(|_| >::TooManyMessages)? { - let Some(message) = Messages::::get(&origin, id) else { + let Some(message) = Messages::::get(id) else { return Err(Error::::MessageNotFound.into()); }; let (message_deposit, maybe_callback_deposit) = match message { Message::Ismp { .. } | Message::XcmQuery { .. } => Err(Error::::RequestPending), - Message::IsmpResponse { message_deposit, commitment, .. } => { - Messages::::remove(&origin, id); + Message::IsmpResponse { origin: initiator, message_deposit, commitment, .. } => { + frame_support::ensure!(origin.address == initiator, BadOrigin); + Messages::::remove(id); IsmpRequests::::remove(commitment); Ok((message_deposit, None)) }, - Message::IsmpTimeout { message_deposit, commitment, callback_deposit, .. } => { - Messages::::remove(&origin, id); + Message::IsmpTimeout { + origin: initiator, + message_deposit, + commitment, + callback_deposit, + .. + } => { + frame_support::ensure!(origin.address == initiator, BadOrigin); + Messages::::remove(id); IsmpRequests::::remove(commitment); Ok((message_deposit, callback_deposit)) }, - Message::XcmResponse { message_deposit, query_id, .. } => { - Messages::::remove(&origin, id); + Message::XcmResponse { origin: initiator, message_deposit, query_id, .. } => { + frame_support::ensure!(origin.address == initiator, BadOrigin); + Messages::::remove(id); XcmQueries::::remove(query_id); Ok((message_deposit, None)) }, - Message::XcmTimeout { query_id, message_deposit, callback_deposit, .. } => { - Messages::::remove(&origin, id); + Message::XcmTimeout { + origin: initiator, + query_id, + message_deposit, + callback_deposit, + .. + } => { + frame_support::ensure!(origin.address == initiator, BadOrigin); + Messages::::remove(id); XcmQueries::::remove(query_id); Ok((message_deposit, callback_deposit)) }, @@ -651,14 +649,14 @@ fn remove(origin: &T::AccountId, messages: &[MessageId]) -> DispatchR T::Fungibles::release( &HoldReason::Messaging.into(), - &origin, + &origin.account, message_deposit, Precision::Exact, )?; if let Some(callback_deposit) = maybe_callback_deposit { T::Fungibles::release( &HoldReason::CallbackGas.into(), - &origin, + &origin.account, callback_deposit, Precision::Exact, )?; @@ -774,26 +772,40 @@ pub(crate) enum Message { /// Represents a pending ISMP request. /// /// # Fields + /// - `origin`: The origin of the request. /// - `commitment`: The cryptographic commitment of the request payload. /// - `callback`: An optional callback to invoke upon receiving a response. /// - `deposit`: The total deposit held to cover message and callback fees. - Ismp { commitment: H256, callback: Option, message_deposit: BalanceOf }, + Ismp { + origin: Origin, + commitment: H256, + callback: Option, + message_deposit: BalanceOf, + }, /// Represents a pending XCM query request. /// /// # Fields + /// - `origin`: The origin of the request. /// - `query_id`: Unique identifier for the XCM query. /// - `callback`: An optional callback for handling the response. /// - `deposit`: The deposit held to cover fees for query execution and callback. - XcmQuery { query_id: QueryId, callback: Option, message_deposit: BalanceOf }, + XcmQuery { + origin: Origin, + query_id: QueryId, + callback: Option, + message_deposit: BalanceOf, + }, /// Represents a received ISMP response. /// /// # Fields + /// - `origin`: The origin of the request. /// - `commitment`: The original commitment for the request. /// - `deposit`: The held deposit for the message, which may be released or burned. /// - `response`: The encoded response payload, size-bounded by `T::MaxResponseLen`. IsmpResponse { + origin: H160, commitment: H256, message_deposit: BalanceOf, response: BoundedVec, @@ -802,17 +814,25 @@ pub(crate) enum Message { /// Represents a received XCM response. /// /// # Fields + /// - `origin`: The origin of the request. /// - `query_id`: Identifier that matches a previously sent XCM query. /// - `deposit`: The deposit originally held for this message. /// - `response`: The deserialized response payload. - XcmResponse { query_id: QueryId, message_deposit: BalanceOf, response: Response }, + XcmResponse { + origin: H160, + query_id: QueryId, + message_deposit: BalanceOf, + response: Response, + }, /// Represents an ISMP request that timed out before a response was received. /// /// # Fields + /// - `origin`: The origin of the request. /// - `commitment`: The original commitment of the request. /// - `deposit`: The deposit held for the request, which may be reclaimed. IsmpTimeout { + origin: H160, commitment: H256, message_deposit: BalanceOf, callback_deposit: Option>, @@ -821,9 +841,11 @@ pub(crate) enum Message { /// Represents an XCM query that timed out before a response was received. /// /// # Fields + /// - `origin`: The origin of the request. /// - `query_id`: The original query ID that timed out. /// - `deposit`: The deposit held for the query, which may be reclaimed. XcmTimeout { + origin: H160, query_id: QueryId, message_deposit: BalanceOf, callback_deposit: Option>, @@ -832,12 +854,63 @@ pub(crate) enum Message { impl Message { #[cfg(test)] + fn ismp( + origin: Origin, + commitment: H256, + callback: Option, + message_deposit: BalanceOf, + ) -> Self { + Self::Ismp { origin, commitment, callback, message_deposit } + } + + #[cfg(any(test, feature = "runtime-benchmarks"))] fn ismp_response( + origin: H160, commitment: H256, message_deposit: BalanceOf, response: BoundedVec, ) -> Self { - Self::IsmpResponse { commitment, message_deposit, response } + Self::IsmpResponse { origin, commitment, message_deposit, response } + } + + #[cfg(any(test, feature = "runtime-benchmarks"))] + fn ismp_timeout( + origin: H160, + commitment: H256, + message_deposit: BalanceOf, + callback_deposit: Option>, + ) -> Self { + Self::IsmpTimeout { origin, commitment, message_deposit, callback_deposit } + } + + #[cfg(test)] + fn xcm_query( + origin: Origin, + query_id: QueryId, + callback: Option, + message_deposit: BalanceOf, + ) -> Self { + Self::XcmQuery { origin, query_id, callback, message_deposit } + } + + #[cfg(test)] + fn xcm_response( + origin: H160, + query_id: QueryId, + message_deposit: BalanceOf, + response: Response, + ) -> Self { + Self::XcmResponse { origin, query_id, message_deposit, response } + } + + #[cfg(test)] + fn xcm_timeout( + origin: H160, + query_id: QueryId, + message_deposit: BalanceOf, + callback_deposit: Option>, + ) -> Self { + Self::XcmTimeout { origin, query_id, message_deposit, callback_deposit } } } @@ -862,3 +935,40 @@ impl From<&Message> for MessageStatus { } } } + +/// The origin of a request. +#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] +#[scale_info(skip_type_params(Account))] +pub(super) struct Origin { + address: H160, + account: Account, +} + +#[cfg(test)] +impl From<(H160, Account)> for Origin { + fn from((address, account): (H160, Account)) -> Self { + Self { address, account } + } +} + +#[cfg(feature = "runtime-benchmarks")] +impl Origin { + pub fn from_address>(address: H160) -> Self { + let account = ::AddressMapper::to_account_id(&address); + Self { address, account } + } +} + +impl TryFrom> for Origin { + type Error = pallet_revive::precompiles::Error; + + fn try_from(origin: pallet_revive::Origin) -> Result { + use pallet_revive::Origin::*; + let account = match origin { + Signed(id) => Ok(id), + Root => Err(DispatchError::RootNotAllowed), + }?; + let address = ::AddressMapper::to_address(&account); + Ok(Self { address, account }) + } +} diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index c2e113e77..e3ae8ee9a 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -18,6 +18,7 @@ use frame_benchmarking::v2::*; use frame_support::{ assert_ok, pallet_prelude::{IsType, Weight}, + testing_prelude::bounded_vec, traits::{ fungible::{Inspect, Mutate, MutateHold}, EnsureOrigin, Get, Time, @@ -30,10 +31,10 @@ use pallet_revive::{ Error, }, test_utils::ALICE_ADDR, - AddressMapper as _, Origin, + Origin::Signed, }; use sp_io::hashing::blake2_256; -use sp_runtime::{traits::Bounded, BoundedVec}; +use sp_runtime::traits::Bounded; use super::{ call_precompile, @@ -48,13 +49,12 @@ use super::{ xcm::new_query, }, Call, Callback, Config, Encoding, Event, HoldReason, IsmpRequests, Message, MessageId, - Messages, Pallet, + Messages, Origin, Pallet, }; #[cfg(test)] use crate::mock::{ExtBuilder, Test}; use crate::{messaging::BalanceOf, TryConvert}; -type AddressMapper = ::AddressMapper; type Balances = ::Fungibles; type HostStateMachine = ::HostStateMachine; type Ismp = super::precompiles::ismp::v0::Ismp<4, T>; @@ -94,22 +94,21 @@ mod benchmarks { #[benchmark] fn get_response() { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let message = 1; Messages::::insert( - &origin, message, - Message::IsmpResponse { - commitment: [255; 32].into(), - message_deposit: BalanceOf::::max_value(), - response: BoundedVec::try_from(vec![255; T::MaxResponseLen::get() as usize]) - .unwrap(), - }, + Message::ismp_response( + origin.address, + [255; 32].into(), + BalanceOf::::max_value(), + bounded_vec![255; T::MaxResponseLen::get() as usize], + ), ); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(origin)); + call_setup.set_origin(Signed(origin.account)); let mut ext = call_setup.ext().0; let input = IMessagingCalls::getResponse(IMessaging::getResponseCall { message }); @@ -143,7 +142,7 @@ mod benchmarks { y: Linear<0, { T::MaxKeys::get() }>, a: Linear<0, 1>, ) -> Result<(), BenchmarkError> { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let request = ismp::Get { destination: u32::MAX, height: u64::MAX, @@ -156,10 +155,10 @@ mod benchmarks { .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; silence_timestamp_genesis_warnings::(); - >::set_balance(&origin, >::total_issuance() / 2u32.into()); + >::set_balance(&origin.account, >::total_issuance() / 2u32.into()); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(origin.clone())); + call_setup.set_origin(Signed(origin.account)); let mut ext = call_setup.ext().0; let input = if x == 0 { IISMPCalls::get_0(IISMP::get_0Call { request, fee }) @@ -189,7 +188,7 @@ mod benchmarks { /// - `1`: `PostResponse` #[benchmark] fn ismp_on_response(x: Linear<0, 1>) { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let fee = >::minimum_balance(); let callback = Callback::new( [255; 20].into(), @@ -200,9 +199,9 @@ mod benchmarks { let handler = Handler::::new(); silence_timestamp_genesis_warnings::(); - >::set_balance(&origin, u32::MAX.into()); + >::set_balance(&origin.account, u32::MAX.into()); - let (id, commitment, response) = ismp_request::(x, &origin, fee, callback); + let (id, commitment, response) = ismp_request::(x, origin.clone(), fee, callback); #[block] { @@ -210,8 +209,8 @@ mod benchmarks { } let event = match x { - 0 => Event::IsmpGetResponseReceived { dest: origin, id, commitment }, - _ => Event::IsmpPostResponseReceived { dest: origin, id, commitment }, + 0 => Event::IsmpGetResponseReceived { dest: origin.address, id, commitment }, + _ => Event::IsmpPostResponseReceived { dest: origin.address, id, commitment }, }; assert_has_event::(event.into()) } @@ -225,7 +224,7 @@ mod benchmarks { /// - `2`: `PostResponse` #[benchmark] fn ismp_on_timeout(x: Linear<0, 2>) -> Result<(), BenchmarkError> { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let fee = >::minimum_balance(); let callback = Callback::new( [255; 20].into(), @@ -236,9 +235,9 @@ mod benchmarks { let handler = Handler::::new(); silence_timestamp_genesis_warnings::(); - >::set_balance(&origin, u32::MAX.into()); + >::set_balance(&origin.account, u32::MAX.into()); - let (_, commitment, response) = ismp_request::(x, &origin, fee, callback); + let (_, commitment, response) = ismp_request::(x, origin, fee, callback); let timeout = match x { 0 => { let Response::Get(response) = response else { @@ -284,7 +283,7 @@ mod benchmarks { x: Linear<0, { T::MaxDataLen::get() }>, y: Linear<0, 1>, ) -> Result<(), BenchmarkError> { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let request = ismp::Post { destination: u32::MAX, timeout: u64::MAX, @@ -295,10 +294,10 @@ mod benchmarks { .map_err(|_| BenchmarkError::Stop("failed to convert minimum balance to fee"))?; silence_timestamp_genesis_warnings::(); - >::set_balance(&origin, >::total_issuance() / 2u32.into()); + >::set_balance(&origin.account, >::total_issuance() / 2u32.into()); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(origin)); + call_setup.set_origin(Signed(origin.account)); let mut ext = call_setup.ext().0; let input = if y == 0 { IISMPCalls::post_0(IISMP::post_0Call { request, fee }) @@ -322,22 +321,21 @@ mod benchmarks { #[benchmark] fn poll_status() { - let origin: T::AccountId = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let message = 1; Messages::::insert( - &origin, message, - Message::IsmpResponse { - commitment: [255; 32].into(), - message_deposit: BalanceOf::::max_value(), - response: BoundedVec::try_from(vec![255; T::MaxResponseLen::get() as usize]) - .unwrap(), - }, + Message::ismp_response( + origin.address, + [255; 32].into(), + BalanceOf::::max_value(), + bounded_vec![255; T::MaxResponseLen::get() as usize], + ), ); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(origin)); + call_setup.set_origin(Signed(origin.account)); let mut ext = call_setup.ext().0; let input = IMessagingCalls::pollStatus(IMessaging::pollStatusCall { message }); @@ -358,29 +356,38 @@ mod benchmarks { fn remove(x: Linear<1, { T::MaxRemovals::get() }>) { let message_deposit = 50_000u32.into(); let callback_deposit = 100_000u32.into(); - let owner = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let messages: Vec = (0..x as MessageId).collect(); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(owner.clone())); + call_setup.set_origin(Signed(origin.account.clone())); let mut ext = call_setup.ext().0; - >::set_balance(&owner, u32::MAX.into()); + >::set_balance(&origin.account, u32::MAX.into()); for i in &messages { - T::Fungibles::hold(&HoldReason::Messaging.into(), &owner, message_deposit).unwrap(); - T::Fungibles::hold(&HoldReason::CallbackGas.into(), &owner, callback_deposit).unwrap(); + assert_ok!(T::Fungibles::hold( + &HoldReason::Messaging.into(), + &origin.account, + message_deposit + )); + assert_ok!(T::Fungibles::hold( + &HoldReason::CallbackGas.into(), + &origin.account, + callback_deposit + )); let commitment = H256::from(blake2_256(&(i.to_le_bytes()))); // Timeout messages release callback deposit hence, are most expensive case for now. - let good_message = Message::IsmpTimeout { - commitment: commitment.clone(), + let good_message = Message::ismp_timeout( + origin.address, + commitment.clone(), message_deposit, - callback_deposit: Some(callback_deposit), - }; + Some(callback_deposit), + ); - Messages::::insert(&owner, &i, &good_message); - IsmpRequests::::insert(&commitment, (&owner, i)); + Messages::::insert(&i, &good_message); + IsmpRequests::::insert(&commitment, i); } let input = @@ -404,14 +411,14 @@ mod benchmarks { /// - `1`: Callback attached #[benchmark] fn xcm_new_query(x: Linear<0, 1>) { - let owner = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let responder = Location { parents: 1, interior: Junctions::Here }.encode().into(); let timeout = u32::from(frame_system::Pallet::::block_number()) + 1_000; - >::set_balance(&owner, u32::MAX.into()); + >::set_balance(&origin.account, u32::MAX.into()); let mut call_setup = set_up_call(); - call_setup.set_origin(Origin::Signed(owner.clone())); + call_setup.set_origin(Signed(origin.account)); let mut ext = call_setup.ext().0; let input = if x == 0 { IXCMCalls::newQuery_0(IXCM::newQuery_0Call { responder, timeout }) @@ -436,7 +443,7 @@ mod benchmarks { /// No benchmark input parameters. A mock response is created and processed. #[benchmark] fn xcm_response() { - let owner = >::to_account_id(&ALICE_ADDR); + let origin = Origin::from_address::(ALICE_ADDR); let responder = Location { parents: 1, interior: Junctions::Here }; let timeout = frame_system::Pallet::::block_number() + 1u8.into(); let callback = Some(Callback { @@ -448,15 +455,15 @@ mod benchmarks { let response_origin = T::XcmResponseOrigin::try_successful_origin().unwrap(); let response = ExecutionResult(None); - >::set_balance(&owner, u32::MAX.into()); + >::set_balance(&origin.account, u32::MAX.into()); - let (id, query_id) = new_query::(&owner, responder, timeout, callback).unwrap(); + let (id, query_id) = new_query::(origin.clone(), responder, timeout, callback).unwrap(); #[extrinsic_call] Pallet::::xcm_response(response_origin, query_id, response.clone()); assert_has_event::( - Event::XcmResponseReceived { dest: owner.clone(), id, query_id, response }.into(), + Event::XcmResponseReceived { dest: origin.address, id, query_id, response }.into(), ); } @@ -470,7 +477,7 @@ fn assert_has_event(generic_event: ::Runti fn ismp_request( x: u32, - origin: &T::AccountId, + origin: Origin, fee: BalanceOf, callback: Callback, ) -> (MessageId, H256, Response) { diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index d015a53d8..87716f85b 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -58,15 +58,15 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 0, ))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; let message = try_get::(request)?; let fee = (*fee).try_convert()?; + let address = origin.address; let (id, commitment) = get::(origin, message, fee, None).map_err(Self::map_err)?; - let origin = AddressMapper::::to_address(origin).0.into(); + let origin = address.0.into(); let event = GetDispatched_0 { origin, id, commitment: commitment.0.into() }; deposit_event(env, event)?; Ok(get_0Call::abi_encode_returns(&id)) @@ -85,15 +85,15 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 1, ))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; let message = try_get::(request)?; let fee = (*fee).try_convert()?; + let address = origin.address; let (id, commitment) = get::(origin, message, fee, Some(callback.into())).map_err(Self::map_err)?; - let origin = AddressMapper::::to_address(origin).0.into(); + let origin = address.0.into(); let commitment = commitment.0.into(); let event = GetDispatched_1 { origin, id, commitment, callback: callback.clone() }; deposit_event(env, event)?; @@ -102,14 +102,14 @@ where IISMPCalls::getResponse(getResponseCall { message }) => { env.charge(::WeightInfo::get_response())?; - let response = super::get::((env.caller().account_id()?, message)).into(); + let response = super::get::(message).into(); Ok(getResponseCall::abi_encode_returns(&response)) }, IISMPCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; - let status = poll_status::((env.caller().account_id()?, message)).into(); + let status = poll_status::(message).into(); Ok(pollStatusCall::abi_encode_returns(&status)) }, @@ -122,15 +122,15 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 0, ))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin: Origin<_> = env.caller().try_into()?; let message = try_post::(request)?; let fee = (*fee).try_convert()?; + let address = origin.address; let (id, commitment) = post::(origin, message, fee, None).map_err(Self::map_err)?; - let origin = AddressMapper::::to_address(origin).0.into(); + let origin = address.0.into(); let event = PostDispatched_0 { origin, id, commitment: commitment.0.into() }; deposit_event(env, event)?; Ok(post_0Call::abi_encode_returns(&id)) @@ -144,16 +144,15 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 1, ))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin: Origin<_> = env.caller().try_into()?; let message = try_post::(request)?; let fee = (*fee).try_convert()?; + let address = origin.address; - let (id, commitment) = - post::(env.caller().account_id()?, message, fee, Some(callback.into())) - .map_err(Self::map_err)?; + let (id, commitment) = post::(origin, message, fee, Some(callback.into())) + .map_err(Self::map_err)?; - let origin = AddressMapper::::to_address(origin).0.into(); + let origin = address.0.into(); let commitment = commitment.0.into(); let event = PostDispatched_1 { origin, id, commitment, callback: callback.clone() }; deposit_event(env, event)?; @@ -161,13 +160,13 @@ where }, IISMPCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -177,13 +176,13 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, @@ -315,16 +314,11 @@ mod tests { alloy::sol_types::{SolInterface, SolType}, Error, }, - test_utils::ALICE, + test_utils::{ALICE, ALICE_ADDR}, }; use sp_io::hashing::keccak_256; - use super::{ - super::Message::{Ismp, *}, - IISMPCalls::*, - MessageStatus::*, - *, - }; + use super::{super::messaging::Origin, IISMPCalls::*, MessageStatus::*, *}; type MaxContextLen = ::MaxContextLen; type MaxDataLen = ::MaxDataLen; @@ -334,7 +328,7 @@ mod tests { type Messages = crate::messaging::Messages; const ADDRESS: [u8; 20] = fixed_address(ISMP); - const MESSAGE_DEPOSIT: u128 = 129_540; + const MESSAGE_DEPOSIT: u128 = 129_180; #[test] fn get_reverts_when_max_context_exceeded() { @@ -386,7 +380,7 @@ mod tests { #[test] fn get_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let request = IISMP::Get { destination: 1_000, @@ -397,30 +391,30 @@ mod tests { }; let fee = U256::from(100); ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .build() .execute_with(|| { let commitment = get_hash(&request); assert_eq!( - call_precompile::(&origin, &get_0(get_0Call { request, fee })).unwrap(), + call_precompile::(&origin.account, &get_0(get_0Call { request, fee })).unwrap(), message ); - let event = GetDispatched_0 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into() }; + let event = GetDispatched_0 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into() }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::Ismp { commitment: c, callback, message_deposit }) - if c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + Messages::get(message), + Some(Message::Ismp { origin: o, commitment: c, callback, message_deposit }) + if o == origin && c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) ); }); } #[test] fn get_with_callback_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let request = IISMP::Get { destination: 1_000, @@ -437,48 +431,52 @@ mod tests { weight: super::Weight { refTime: 100, proofSize: 10 }, }; ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .build() .execute_with(|| { let commitment = get_hash(&request); assert_eq!( - call_precompile::(&origin, &get_1(get_1Call { request, fee, callback: callback.clone() })).unwrap(), + call_precompile::(&origin.account, &get_1(get_1Call { request, fee, callback: callback.clone() })).unwrap(), message ); - let event = GetDispatched_1 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + let event = GetDispatched_1 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::Ismp { commitment: c, callback: cb, message_deposit }) - if c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + Messages::get(message), + Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) + if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) ); }); } #[test] fn get_response_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let response = b"ismp response".to_vec(); ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - IsmpResponse { - commitment: H256::default(), - message_deposit: 0, - response: BoundedVec::truncate_from(response.clone()), - }, + Message::ismp_response( + origin.address, + H256::default(), + 0, + response.clone().try_into().unwrap(), + ), 0, )]) .build() .execute_with(|| { assert_eq!( - call_precompile::>(&origin, &getResponse(getResponseCall { message })) - .unwrap(), + call_precompile::>( + &origin.account, + &getResponse(getResponseCall { message }) + ) + .unwrap(), response ); }); @@ -486,35 +484,21 @@ mod tests { #[test] fn poll_status_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; let messages = [ - (1, Ismp { commitment: H256::default(), callback: None, message_deposit: 0 }), - ( - 2, - IsmpResponse { - commitment: H256::default(), - message_deposit: 0, - response: BoundedVec::default(), - }, - ), - ( - 3, - IsmpTimeout { - commitment: H256::default(), - message_deposit: 0, - callback_deposit: None, - }, - ), + (1, Message::ismp(origin.clone(), H256::default(), None, 0)), + (2, Message::ismp_response(origin.address, H256::default(), 0, BoundedVec::default())), + (3, Message::ismp_timeout(origin.address, H256::default(), 0, None)), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.account.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { assert_eq!( call_precompile::( - &origin, + &origin.account, &pollStatus(pollStatusCall { message }) ) .unwrap(), @@ -541,36 +525,36 @@ mod tests { #[test] fn post_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let request = IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; let fee = U256::from(100); ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .build() .execute_with(|| { let commitment = post_hash(&request); assert_eq!( - call_precompile::(&origin, &post_0(post_0Call { request, fee })).unwrap(), + call_precompile::(&origin.account, &post_0(post_0Call { request, fee })).unwrap(), message ); - let event = PostDispatched_0 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into() }; + let event = PostDispatched_0 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into() }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::Ismp { commitment: c, callback, message_deposit }) - if c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + Messages::get( message), + Some(Message::Ismp { origin: o, commitment: c, callback, message_deposit }) + if o == origin && c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) ); }); } #[test] fn post_with_callback_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let request = IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; @@ -582,42 +566,42 @@ mod tests { weight: super::Weight { refTime: 100, proofSize: 10 }, }; ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .build() .execute_with(|| { let commitment = post_hash(&request); assert_eq!( - call_precompile::(&origin, &post_1(post_1Call { request, fee, callback: callback.clone() })).unwrap(), + call_precompile::(&origin.account, &post_1(post_1Call { request, fee, callback: callback.clone() })).unwrap(), message ); - let event = PostDispatched_1 { origin: to_address(&origin).0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + let event = PostDispatched_1 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::Ismp { commitment: c, callback: cb, message_deposit }) - if c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + Messages::get(message), + Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) + if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) ); }); } #[test] fn remove_reverts_when_message_pending() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .build() .execute_with(|| { assert_revert!( - call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + call_precompile::<()>(&origin.account, &remove_0(remove_0Call { message })), RequestPending ); }); @@ -637,41 +621,40 @@ mod tests { #[test] fn remove_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - IsmpResponse { - commitment: H256::default(), - message_deposit: 0, - response: BoundedVec::default(), - }, + Message::ismp_response(origin.address, H256::default(), 0, BoundedVec::default()), 0, )]) .build() .execute_with(|| { - assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + assert_ok!(call_precompile::<()>( + &origin.account, + &remove_0(remove_0Call { message }) + )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } #[test] fn remove_many_reverts_when_message_pending() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone(), 0)) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) .chain(vec![( - origin.clone(), + origin.account.clone(), messages, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .collect(), @@ -680,7 +663,7 @@ mod tests { .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -690,18 +673,20 @@ mod tests { #[test] fn remove_many_reverts_when_message_not_found() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), + (0..messages - 1) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) + .collect(), ) .build() .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -726,24 +711,23 @@ mod tests { #[test] fn remove_many_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let messages = 10; - let message = IsmpResponse { - commitment: H256::default(), - message_deposit: 0, - response: BoundedVec::default(), - }; + let message = + Message::ismp_response(origin.address, H256::default(), 0, BoundedVec::default()); ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) + .with_messages( + (0..messages).map(|i| (origin.account.clone(), i, message.clone(), 0)).collect(), + ) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); assert_ok!(call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 1ee73bf53..b5bf73131 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -35,26 +35,26 @@ impl IMessagingCalls::getResponse(getResponseCall { message }) => { env.charge(::WeightInfo::get_response())?; - let response = get::((env.caller().account_id()?, message)).into(); + let response = get::(message).into(); Ok(getResponseCall::abi_encode_returns(&response)) }, IMessagingCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; - let status = poll_status::((env.caller().account_id()?, message)).into(); + let status = poll_status::(message).into(); Ok(pollStatusCall::abi_encode_returns(&status)) }, IMessagingCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -64,13 +64,13 @@ impl .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, @@ -131,7 +131,7 @@ impl From for IMessaging::MessageStatus { #[cfg(test)] mod tests { use ::xcm::latest::Response; - use frame_support::{assert_ok, weights::Weight, BoundedVec}; + use frame_support::{assert_ok, weights::Weight}; use mock::{ExtBuilder, *}; use pallet_revive::{ precompiles::{ @@ -141,11 +141,7 @@ mod tests { test_utils::ALICE, }; - use super::{ - super::{Message::*, MessageStatus::*}, - IMessagingCalls::*, - *, - }; + use super::{super::MessageStatus::*, IMessagingCalls::*, *}; const ADDRESS: [u8; 20] = fixed_address(MESSAGING); @@ -153,48 +149,52 @@ mod tests { #[test] fn get_response_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let expected = [(0, Vec::default()), (1, b"ismp response".to_vec()), (2, Response::Null.encode())]; let messages = [ ( 1, - IsmpResponse { - commitment: H256::default(), - message_deposit: 0, - response: BoundedVec::truncate_from(b"ismp response".to_vec()), - }, + Message::ismp_response( + origin.address, + H256::default(), + 0, + b"ismp response".to_vec().try_into().unwrap(), + ), ), - (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), + (2, Message::xcm_response(origin.address, 0, 0, Response::Null)), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.account.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { let input = getResponse(getResponseCall { message }); - assert_eq!(call_precompile::>(&origin, &input).unwrap(), expected); + assert_eq!( + call_precompile::>(&origin.account, &input).unwrap(), + expected + ); } }); } #[test] fn poll_status_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; let messages = [ - (1, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }), - (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), - (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), + (1, Message::xcm_query(origin.clone(), 0, None, 0)), + (2, Message::xcm_response(origin.address, 0, 0, Response::Null)), + (3, Message::xcm_timeout(origin.address, 0, 0, None)), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.account.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { assert_eq!( call_precompile::( - &origin, + &origin.account, &pollStatus(pollStatusCall { message }) ) .unwrap(), @@ -206,19 +206,19 @@ mod tests { #[test] fn remove_reverts_when_message_pending() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .build() .execute_with(|| { assert_revert!( - call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + call_precompile::<()>(&origin.account, &remove_0(remove_0Call { message })), RequestPending ); }); @@ -238,37 +238,40 @@ mod tests { #[test] fn remove_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + Message::xcm_response(origin.address, 0, 0, Response::Null), 0, )]) .build() .execute_with(|| { - assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + assert_ok!(call_precompile::<()>( + &origin.account, + &remove_0(remove_0Call { message }) + )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } #[test] fn remove_many_reverts_when_message_pending() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone(), 0)) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) .chain(vec![( - origin.clone(), + origin.account.clone(), messages, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .collect(), @@ -277,7 +280,7 @@ mod tests { .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -287,18 +290,20 @@ mod tests { #[test] fn remove_many_reverts_when_message_not_found() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), + (0..messages - 1) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) + .collect(), ) .build() .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -323,20 +328,22 @@ mod tests { #[test] fn remove_many_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let messages = 10; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) + .with_messages( + (0..messages).map(|i| (origin.account.clone(), i, message.clone(), 0)).collect(), + ) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); assert_ok!(call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 7938042be..b086c51cb 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -83,36 +83,36 @@ where IXCMCalls::getResponse(getResponseCall { message }) => { env.charge(::WeightInfo::get_response())?; - let response = get::((env.caller().account_id()?, message)).into(); + let response = get::(message).into(); Ok(getResponseCall::abi_encode_returns(&response)) }, IXCMCalls::newQuery_0(newQuery_0Call { responder, timeout }) => { env.charge(::WeightInfo::xcm_new_query(0))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin: Origin<_> = env.caller().try_into()?; let location = Location::decode(&mut &responder[..]) .map_err(|_| Error::from(IXCM::DecodingFailed))?; + let address = origin.address; let (id, query_id) = new_query::(origin, location, (*timeout).into(), None) .map_err(Self::map_err)?; - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, QueryCreated_0 { account, id, queryId: query_id })?; Ok(newQuery_0Call::abi_encode_returns(&newQuery_0Return { id, queryId: query_id })) }, IXCMCalls::newQuery_1(newQuery_1Call { responder, timeout, callback }) => { env.charge(::WeightInfo::xcm_new_query(1))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin: Origin<_> = env.caller().try_into()?; let location = Location::decode(&mut &responder[..]) .map_err(|_| Error::from(IXCM::DecodingFailed))?; + let address = origin.address; let (id, query_id) = new_query::(origin, location, (*timeout).into(), Some(callback.into())) .map_err(Self::map_err)?; - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); let event = QueryCreated_1 { account, id, callback: callback.clone(), queryId: query_id }; deposit_event(env, event)?; @@ -121,19 +121,19 @@ where IXCMCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; - let status = poll_status::((env.caller().account_id()?, message)).into(); + let status = poll_status::(message).into(); Ok(pollStatusCall::abi_encode_returns(&status)) }, IXCMCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, &[*message]).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -143,13 +143,13 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = env.caller(); - let origin = origin.account_id()?; + let origin = Origin::try_from(env.caller())?; + let address = origin.address; remove::(origin, messages).map_err(Self::map_err)?; // TODO: is the precompile emitting the event, or the pallet - let account = AddressMapper::::to_address(origin).0.into(); + let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, @@ -291,7 +291,7 @@ mod tests { }; use pallet_xcm::ExecutionError; - use super::{super::Message::*, IXCMCalls::*, MessageStatus::*, *}; + use super::{IXCMCalls::*, MessageStatus::*, *}; type MaxXcmQueryTimeoutsPerBlock = ::MaxXcmQueryTimeoutsPerBlock; type MaxRemovals = ::MaxRemovals; @@ -299,7 +299,7 @@ mod tests { type XcmQueryTimeouts = crate::messaging::XcmQueryTimeouts; const ADDRESS: [u8; 20] = fixed_address(XCM); - const MESSAGE_DEPOSIT: u128 = 129_720; + const MESSAGE_DEPOSIT: u128 = 129_440; #[test] fn block_number_works() { @@ -363,21 +363,24 @@ mod tests { #[test] fn get_response_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; let response = Response::Null; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmResponse { query_id: 0, message_deposit: 0, response: response.clone() }, + Message::xcm_response(origin.address, 0, 0, response.clone()), 0, )]) .build() .execute_with(|| { assert_eq!( - call_precompile::>(&origin, &getResponse(getResponseCall { message })) - .unwrap(), + call_precompile::>( + &origin.account, + &getResponse(getResponseCall { message }) + ) + .unwrap(), response.encode() ); }); @@ -414,9 +417,7 @@ mod tests { let current_block = frame_system::Pallet::::block_number(); XcmQueryTimeouts::set( current_block + timeout, - vec![(origin.clone(), 0); MaxXcmQueryTimeoutsPerBlock::get() as usize] - .try_into() - .unwrap(), + vec![0; MaxXcmQueryTimeoutsPerBlock::get() as usize].try_into().unwrap(), ); let input = newQuery_0(newQuery_0Call { responder, timeout }); @@ -440,30 +441,30 @@ mod tests { #[test] fn new_query_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let responder = RESPONSE_LOCATION.encode().into(); let timeout = 100; let message = 1; let query_id = 2; ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .with_query_id(query_id) .build() .execute_with(|| { let call = newQuery_0(newQuery_0Call { responder, timeout }); assert_eq!( - call_precompile::(&origin,&call).unwrap(), + call_precompile::(&origin.account, &call).unwrap(), message ); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); let event = QueryCreated_0 { account, id: message, queryId: query_id }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::XcmQuery { query_id: id, callback, message_deposit }) - if id == query_id && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + Messages::get(message), + Some(Message::XcmQuery { origin: o, query_id: id, callback, message_deposit }) + if o == origin && id == query_id && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) ); }); } @@ -517,9 +518,7 @@ mod tests { let current_block = frame_system::Pallet::::block_number(); XcmQueryTimeouts::set( current_block + timeout, - vec![(origin.clone(), 0); MaxXcmQueryTimeoutsPerBlock::get() as usize] - .try_into() - .unwrap(), + vec![0; MaxXcmQueryTimeoutsPerBlock::get() as usize].try_into().unwrap(), ); let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); @@ -549,7 +548,7 @@ mod tests { #[test] fn new_query_with_callback_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let responder = RESPONSE_LOCATION.encode().into(); let timeout = 100; let callback = Callback { @@ -561,45 +560,45 @@ mod tests { let message = 1; let query_id = 2; ExtBuilder::new() - .with_balances(vec![(origin.clone(), 1 * UNIT)]) // message deposit - .with_message_id(&origin, message) + .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit + .with_message_id(message) .with_query_id(query_id) .build() .execute_with(|| { let call = newQuery_1(newQuery_1Call { responder, timeout, callback: callback.clone() }); assert_eq!( - call_precompile::(&origin, &call).unwrap(), + call_precompile::(&origin.account, &call).unwrap(), message ); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); let event = QueryCreated_1 { account, id: message, queryId: query_id, callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( - Messages::get(&origin, message), - Some(Message::XcmQuery { query_id: id, callback: cb, message_deposit }) - if id == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + Messages::get(message), + Some(Message::XcmQuery { origin: o, query_id: id, callback: cb, message_deposit }) + if o == origin && id == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) ); }); } #[test] fn poll_status_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let expected = [(0, NotFound), (1, Pending), (2, Complete), (3, Timeout)]; let messages = [ - (1, XcmQuery { query_id: 0, callback: None, message_deposit: 0 }), - (2, XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }), - (3, XcmTimeout { query_id: 0, message_deposit: 0, callback_deposit: None }), + (1, Message::xcm_query(origin.clone(), 0, None, 0)), + (2, Message::xcm_response(origin.address, 0, 0, Response::Null)), + (3, Message::xcm_timeout(origin.address, 0, 0, None)), ]; ExtBuilder::new() - .with_messages(messages.map(|(i, m)| (origin.clone(), i, m, 0)).to_vec()) + .with_messages(messages.map(|(i, m)| (origin.account.clone(), i, m, 0)).to_vec()) .build() .execute_with(|| { for (message, expected) in expected { assert_eq!( call_precompile::( - &origin, + &origin.account, &pollStatus(pollStatusCall { message }) ) .unwrap(), @@ -611,19 +610,19 @@ mod tests { #[test] fn remove_reverts_when_message_pending() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .build() .execute_with(|| { assert_revert!( - call_precompile::<()>(&origin, &remove_0(remove_0Call { message })), + call_precompile::<()>(&origin.account, &remove_0(remove_0Call { message })), RequestPending ); }); @@ -643,37 +642,40 @@ mod tests { #[test] fn remove_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; ExtBuilder::new() .with_messages(vec![( - origin.clone(), + origin.account.clone(), message, - XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }, + Message::xcm_response(origin.address, 0, 0, Response::Null), 0, )]) .build() .execute_with(|| { - assert_ok!(call_precompile::<()>(&origin, &remove_0(remove_0Call { message }))); + assert_ok!(call_precompile::<()>( + &origin.account, + &remove_0(remove_0Call { message }) + )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } #[test] fn remove_many_reverts_when_message_pending() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, message.clone(), 0)) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) .chain(vec![( - origin.clone(), + origin.account.clone(), messages, - XcmQuery { query_id: 0, callback: None, message_deposit: 0 }, + Message::xcm_query(origin.clone(), 0, None, 0), 0, )]) .collect(), @@ -682,7 +684,7 @@ mod tests { .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -692,18 +694,20 @@ mod tests { #[test] fn remove_many_reverts_when_message_not_found() { - let origin = ALICE; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let origin = Origin::from((ALICE_ADDR, ALICE)); + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); let messages = >::get() as u64; ExtBuilder::new() .with_messages( - (0..messages - 1).map(|i| (origin.clone(), i, message.clone(), 0)).collect(), + (0..messages - 1) + .map(|i| (origin.account.clone(), i, message.clone(), 0)) + .collect(), ) .build() .execute_with(|| { assert_revert!( call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: (0..messages).collect() }) ), MessageNotFound @@ -728,20 +732,22 @@ mod tests { #[test] fn remove_many_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let messages = 10; - let message = XcmResponse { query_id: 0, message_deposit: 0, response: Response::Null }; + let message = Message::xcm_response(origin.address, 0, 0, Response::Null); ExtBuilder::new() - .with_messages((0..messages).map(|i| (origin.clone(), i, message.clone(), 0)).collect()) + .with_messages( + (0..messages).map(|i| (origin.account.clone(), i, message.clone(), 0)).collect(), + ) .build() .execute_with(|| { let messages: Vec<_> = (0..messages).collect(); assert_ok!(call_precompile::<()>( - &origin, + &origin.account, &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = to_address(&origin).0.into(); + let account = origin.address.0.into(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index 2397695e1..a17583fc9 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -26,131 +26,161 @@ mod remove { #[test] fn message_not_found() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 0; ExtBuilder::new().build().execute_with(|| { - assert_noop!(remove(&origin, &[message]), Error::MessageNotFound); + assert_noop!(remove(origin, &[message]), Error::MessageNotFound); }) } + #[test] + fn only_originator_can_remove() { + let origin = Origin::from((ALICE_ADDR, ALICE)); + let messages = [ + Message::ismp_response(origin.address, H256::zero(), 0, BoundedVec::default()), + Message::ismp_timeout(origin.address, H256::zero(), 0, None), + Message::xcm_response(origin.address, 0, 0, Response::Null), + Message::xcm_timeout(origin.address, 0, 0, None), + ]; + let messages_len = messages.len(); + let caller = Origin::from((BOB_ADDR, BOB)); + ExtBuilder::new() + .with_messages( + messages + .into_iter() + .enumerate() + .map(|(i, m)| (origin.account.clone(), i as MessageId, m, 0)) + .collect(), + ) + .build() + .execute_with(|| { + for message in 0..messages_len { + assert_noop!( + remove(caller.clone(), &[message as MessageId]), + DispatchError::BadOrigin + ); + } + }) + } + #[test] fn multiple_messages_remove_works() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let deposit: Balance = 100; // An ismp response can always be removed. - let message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); + let message = + Message::ismp_response(origin.address, H256::default(), deposit, BoundedVec::default()); let messages = 3; let endowment = existential_deposit() + deposit * messages as Balance; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .with_messages( - (0..messages).map(|i| (origin.clone(), i, message.clone(), deposit)).collect(), + (0..messages) + .map(|i| (origin.account.clone(), i, message.clone(), deposit)) + .collect(), ) .build() .execute_with(|| { let messages = (0..messages).collect::>(); - assert_ok!(remove(&origin, &messages)); + assert_ok!(remove(origin, &messages)); for id in messages { - assert!( - Messages::get(&origin, id).is_none(), - "message should have been removed." - ); + assert!(Messages::get(id).is_none(), "message should have been removed."); } }); } #[test] fn deposit_is_returned_if_try_remove_is_ok() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let deposit: Balance = 100; // An ismp response can always be removed. - let message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); + let message = + Message::ismp_response(origin.address, H256::default(), deposit, BoundedVec::default()); let id = 1; ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) - .with_messages(vec![(origin.clone(), id, message, deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + deposit)]) + .with_messages(vec![(origin.account.clone(), id, message, deposit)]) .build() .execute_with(|| { - let free_balance = Balances::free_balance(&origin); + let free_balance = Balances::free_balance(&origin.account); - assert_ok!(remove(&origin, &[id])); + assert_ok!(remove(origin.clone(), &[id])); - assert_eq!(Balances::free_balance(&origin), free_balance + deposit); + assert_eq!(Balances::free_balance(&origin.account), free_balance + deposit); }); } #[test] fn deposit_is_not_returned_if_try_remove_is_noop() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let deposit: Balance = 100; - let message = - Message::Ismp { commitment: H256::default(), callback: None, message_deposit: deposit }; + let message = Message::ismp(origin.clone(), H256::default(), None, deposit); let id = 1; ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) - .with_messages(vec![(origin.clone(), id, message, deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + deposit)]) + .with_messages(vec![(origin.account.clone(), id, message, deposit)]) .build() .execute_with(|| { - let free_balance = Balances::free_balance(&origin); + let free_balance = Balances::free_balance(&origin.account); - assert_noop!(remove(&origin, &[id]), Error::RequestPending); + assert_noop!(remove(origin.clone(), &[id]), Error::RequestPending); - assert_eq!(Balances::free_balance(&origin), free_balance); + assert_eq!(Balances::free_balance(&origin.account), free_balance); }); } #[test] fn multiple_messages_rolls_back_if_one_fails() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let deposit: Balance = 100; - let good_message = Message::ismp_response(H256::default(), deposit, BoundedVec::default()); - let erroneous_message = - Message::Ismp { commitment: H256::default(), callback: None, message_deposit: deposit }; + let good_message = + Message::ismp_response(origin.address, H256::default(), deposit, BoundedVec::default()); + let erroneous_message = Message::ismp(origin.clone(), H256::default(), None, deposit); let messages = 5; let endowment = existential_deposit() + deposit * messages as Balance; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .with_messages( (0..messages - 1) - .map(|i| (origin.clone(), i, good_message.clone(), deposit)) - .chain([(origin.clone(), messages - 1, erroneous_message, deposit)]) + .map(|i| (origin.account.clone(), i, good_message.clone(), deposit)) + .chain([(origin.account.clone(), messages - 1, erroneous_message, deposit)]) .collect(), ) .build() .execute_with(|| { let messages = (0..messages).collect::>(); - let free_balance = Balances::free_balance(&origin); + let free_balance = Balances::free_balance(&origin.account); - assert_noop!(remove(&origin, &messages), Error::RequestPending); + assert_noop!(remove(origin.clone(), &messages), Error::RequestPending); for message in messages { - assert!(Messages::get(&origin, message).is_some()); + assert!(Messages::get(message).is_some()); } - assert_eq!(Balances::free_balance(&origin), free_balance); + assert_eq!(Balances::free_balance(&origin.account), free_balance); }); } // Basic remove tests to ensure storage is cleaned. #[test] fn remove_ismp_message() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let commitment = H256::default(); let id = 1; let deposit = 100; - let message = Message::Ismp { commitment, callback: None, message_deposit: deposit }; + let message = Message::ismp(origin.clone(), commitment, None, deposit); ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + deposit)]) .build() .execute_with(|| { - Messages::insert(&origin, id, &message); - IsmpRequests::insert(commitment, (&origin, &id)); - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + Messages::insert(id, &message); + IsmpRequests::insert(commitment, &id); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, deposit)); - assert_noop!(remove(&origin, &[id]), Error::RequestPending); + assert_noop!(remove(origin.clone(), &[id]), Error::RequestPending); assert!( - Messages::get(origin, id).is_some(), + Messages::get(id).is_some(), "Message should not have been removed but has." ); assert!( @@ -162,25 +192,23 @@ mod remove { #[test] fn remove_ismp_response() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let commitment = H256::default(); let id = 1; let deposit = 100; - let message = Message::ismp_response(commitment, deposit, BoundedVec::default()); + let message = + Message::ismp_response(origin.address, commitment, deposit, BoundedVec::default()); ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + deposit)]) .build() .execute_with(|| { - Messages::insert(&origin, id, &message); - IsmpRequests::insert(commitment, (&origin, &id)); - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + Messages::insert(id, &message); + IsmpRequests::insert(commitment, &id); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, deposit)); - assert_ok!(remove(&origin, &[id])); + assert_ok!(remove(origin, &[id])); - assert!( - Messages::get(&origin, id).is_none(), - "Message should have been removed but hasnt." - ); + assert!(Messages::get(id).is_none(), "Message should have been removed but hasnt."); assert!( IsmpRequests::get(commitment).is_none(), "Request should have been removed but hasnt." @@ -190,59 +218,53 @@ mod remove { #[test] fn remove_ismp_timeout() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let commitment = H256::default(); let deposit = 100; let callback_deposit = 100_000; let id = 1; - let message = Message::IsmpTimeout { - commitment, - message_deposit: deposit, - callback_deposit: Some(callback_deposit), - }; + let message = + Message::ismp_timeout(origin.address, commitment, deposit, Some(callback_deposit)); let endowment = existential_deposit() + deposit + callback_deposit; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); - assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, callback_deposit)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, deposit)); + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin.account, callback_deposit)); - Messages::insert(&origin, id, &message); - IsmpRequests::insert(commitment, (&origin, &id)); + Messages::insert(id, &message); + IsmpRequests::insert(commitment, id); - assert_ok!(remove(&origin, &[id])); + assert_ok!(remove(origin.clone(), &[id])); - assert!( - Messages::get(&origin, id).is_none(), - "Message should have been removed but hasnt." - ); + assert!(Messages::get(id).is_none(), "Message should have been removed but hasnt."); assert!( IsmpRequests::get(commitment).is_none(), "Request should have been removed but hasnt." ); - assert_eq!(Balances::total_balance_on_hold(&origin), 0); + assert_eq!(Balances::total_balance_on_hold(&origin.account), 0); }) } #[test] fn remove_xcm_query() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let query_id = 42; let id = 1; let deposit = 100; - let message = Message::XcmQuery { query_id, callback: None, message_deposit: deposit }; + let message = Message::xcm_query(origin.clone(), query_id, None, deposit); ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + deposit)]) .build() .execute_with(|| { - Messages::insert(&origin, id, &message); - XcmQueries::insert(query_id, (&origin, &id)); - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, deposit)); + Messages::insert(id, &message); + XcmQueries::insert(query_id, &id); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, deposit)); - assert_noop!(remove(&origin, &[id]), Error::RequestPending); + assert_noop!(remove(origin, &[id]), Error::RequestPending); assert!( - Messages::get(&origin, id).is_some(), + Messages::get(id).is_some(), "Message should not have been removed but has" ); assert!( @@ -254,26 +276,23 @@ mod remove { #[test] fn remove_xcm_response() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let query_id = 42; let id = 1; let message_deposit = 100; let message = - Message::XcmResponse { query_id, message_deposit, response: Response::default() }; + Message::xcm_response(origin.address, query_id, message_deposit, Response::default()); ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + message_deposit)]) + .with_balances(vec![(origin.account.clone(), existential_deposit() + message_deposit)]) .build() .execute_with(|| { - Messages::insert(&origin, id, &message); - XcmQueries::insert(query_id, (&origin, &id)); - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); + Messages::insert(id, &message); + XcmQueries::insert(query_id, &id); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, message_deposit)); - assert_ok!(remove(&origin, &[id])); + assert_ok!(remove(origin, &[id])); - assert!( - Messages::get(ALICE, id).is_none(), - "Message should have been removed but hasnt" - ); + assert!(Messages::get(id).is_none(), "Message should have been removed but hasnt"); assert!( XcmQueries::get(query_id).is_none(), "Message should have been removed but hasnt." @@ -283,47 +302,41 @@ mod remove { #[test] fn remove_xcm_timeout() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let query_id = 42; let id = 1; let message_deposit = 100; let callback_deposit = 100_000; - let message = Message::XcmTimeout { - query_id, - message_deposit, - callback_deposit: Some(callback_deposit), - }; + let message = + Message::xcm_timeout(origin.address, query_id, message_deposit, Some(callback_deposit)); let endowment = existential_deposit() + message_deposit + callback_deposit; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); - assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin, callback_deposit)); + assert_ok!(Fungibles::hold(&Messaging.into(), &origin.account, message_deposit)); + assert_ok!(Fungibles::hold(&CallbackGas.into(), &origin.account, callback_deposit)); - Messages::insert(&origin, id, &message); - XcmQueries::insert(query_id, (&origin, id)); + Messages::insert(id, &message); + XcmQueries::insert(query_id, id); - assert_ok!(remove(&origin, &[id])); + assert_ok!(remove(origin.clone(), &[id])); - assert!( - Messages::get(ALICE, id).is_none(), - "Message should have been removed but hasnt" - ); + assert!(Messages::get(id).is_none(), "Message should have been removed but hasnt"); assert!( XcmQueries::get(query_id).is_none(), "Message should have been removed but hasnt." ); // Assert that all holds specified have been released - assert_eq!(Balances::total_balance_on_hold(&ALICE), 0); + assert_eq!(Balances::total_balance_on_hold(&origin.account), 0); }) } // `remove` is no longer a dispatchable and only callable via a precompile, hence we simply // wrap calls to it in a transaction to simulate. See additional precompiles tests for // further assurances. - fn remove(origin: &AccountId, messages: &[MessageId]) -> DispatchResult { + fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { with_transaction(|| -> TransactionOutcome { let result = super::remove::(origin, messages); match &result { @@ -357,33 +370,34 @@ mod xcm_response { #[test] fn timeout_messages_are_noop() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let message_id = 1; let query_id = 42; let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, message_id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(message_id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + assert_ok!(new_query(origin, RESPONSE_LOCATION, timeout, None)); // Update the message to XcmTimedOut - Messages::mutate(ALICE, message_id, |message| { - let Some(Message::XcmQuery { query_id, message_deposit, .. }): &mut Option< + Messages::mutate(message_id, |message| { + let Some(Message::XcmQuery { origin, query_id, message_deposit, .. }): &mut Option< Message, > = message else { panic!("No message!"); }; - *message = Some(Message::XcmTimeout { - query_id: *query_id, - message_deposit: *message_deposit, - callback_deposit: None, - }); + *message = Some(Message::xcm_timeout( + origin.address, + *query_id, + *message_deposit, + None, + )); }); assert_noop!( @@ -395,24 +409,24 @@ mod xcm_response { #[test] fn assert_event_no_callback() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let query_id = 42; let response = Response::Null; let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, None)); assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); assert!(events().contains(&Event::XcmResponseReceived { - dest: origin, + dest: origin.address, id, query_id, response @@ -422,24 +436,24 @@ mod xcm_response { #[test] fn assert_message_is_stored_for_polling_no_callback() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let query_id = 42; let response = Response::ExecutionResult(None); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + assert_ok!(new_query(origin, RESPONSE_LOCATION, timeout, None)); assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); let Some(Message::XcmResponse { query_id: q, response: r, .. }): Option = - Messages::get(&origin, id) + Messages::get(id) else { panic!("wrong message type"); }; @@ -451,7 +465,7 @@ mod xcm_response { #[test] fn message_is_removed_after_successfull_callback_execution() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let query_id = 42; let response = Response::ExecutionResult(None); @@ -459,46 +473,46 @@ mod xcm_response { let callback_fee = WeightToFee::weight_to_fee(&callback.weight); let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + assert_ok!(new_query(origin, RESPONSE_LOCATION, timeout, Some(callback))); assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); - assert!(Messages::get(&origin, id).is_none()); + assert!(Messages::get(id).is_none()); assert!(XcmQueries::get(query_id).is_none()); }) } #[test] fn message_deposit_returned_after_successfull_callback_execution() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let query_id = 42; let response = Response::ExecutionResult(None); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Zero::zero()); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, Some(callback))); - let held_balance_pre_release = Balances::total_balance_on_hold(&origin); + let held_balance_pre_release = Balances::total_balance_on_hold(&origin.account); assert_ne!(held_balance_pre_release, 0); assert_ok!(Pallet::xcm_response(root(), query_id, response.clone())); - let held_balance_post_release = Balances::total_balance_on_hold(&origin); + let held_balance_post_release = Balances::total_balance_on_hold(&origin.account); assert_eq!(held_balance_post_release, 0); }) } @@ -506,14 +520,14 @@ mod xcm_response { // Dont include any callback weight so we can test the xcm_response blockweight mutation. #[test] fn assert_blockweight_mutation_no_callback() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let query_id = 42; let xcm_response = Response::ExecutionResult(None); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { @@ -532,7 +546,7 @@ mod xcm_response { Zero::zero(), "Please set an T::WeightInfo::xcm_response() to run this test." ); - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + assert_ok!(new_query(origin, RESPONSE_LOCATION, timeout, None)); assert_ok!(Pallet::xcm_response(root(), query_id, xcm_response.clone())); @@ -651,7 +665,7 @@ mod deposit_callback_event { pays_fee: Default::default(), }); ExtBuilder::new().build().execute_with(|| { - deposit_callback_event::(&origin, message_id, &callback, &result); + deposit_callback_event::(origin.clone(), message_id, &callback, &result); System::assert_last_event( Event::::CallbackExecuted { origin, id: message_id, callback }.into(), ); @@ -669,7 +683,7 @@ mod deposit_callback_event { error: Error::InvalidMessage.into(), }); ExtBuilder::new().build().execute_with(|| { - deposit_callback_event::(&origin, message_id, &callback, &result); + deposit_callback_event::(origin.clone(), message_id, &callback, &result); System::assert_last_event( Event::CallbackFailed { diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 3687375c4..c9fe69ae6 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -38,7 +38,7 @@ pub const ID: [u8; 3] = *b"pop"; /// # Returns /// A unique identifier for the message. pub(crate) fn get( - origin: &T::AccountId, + origin: Origin, message: DispatchGet, fee: BalanceOf, callback: Option, @@ -51,20 +51,21 @@ pub(crate) fn get( // .saturating_add(calculate_deposit_of::>()) ; - T::Fungibles::hold(&HoldReason::Messaging.into(), &origin, message_deposit)?; + T::Fungibles::hold(&HoldReason::Messaging.into(), &origin.account, message_deposit)?; if let Some(cb) = callback.as_ref() { T::Fungibles::hold( &HoldReason::CallbackGas.into(), - &origin, + &origin.account, T::WeightToFee::weight_to_fee(&cb.weight), )?; } // Process message by dispatching request via ISMP. - let commitment = match T::IsmpDispatcher::default() - .dispatch_request(DispatchRequest::Get(message), FeeMetadata { payer: origin.clone(), fee }) - { + let commitment = match T::IsmpDispatcher::default().dispatch_request( + DispatchRequest::Get(message), + FeeMetadata { payer: origin.account.clone(), fee }, + ) { Ok(commitment) => Ok::(commitment), Err(e) => { if let Ok(err) = e.downcast::<::ismp::Error>() { @@ -75,9 +76,9 @@ pub(crate) fn get( }?; // Store commitment for lookup on response, message for querying, // response/timeout handling. - let id = next_message_id::(origin)?; - IsmpRequests::::insert(commitment, (&origin, id)); - Messages::::insert(&origin, id, Message::Ismp { commitment, callback, message_deposit }); + let id = next_message_id::()?; + IsmpRequests::::insert(commitment, id); + Messages::::insert(id, Message::Ismp { origin, commitment, callback, message_deposit }); Ok((id, commitment)) } @@ -94,7 +95,7 @@ pub(crate) fn get( /// # Returns /// A unique identifier for the message. pub(crate) fn post( - origin: &T::AccountId, + origin: Origin, message: DispatchPost, fee: BalanceOf, callback: Option, @@ -107,12 +108,12 @@ pub(crate) fn post( // .saturating_add(calculate_deposit_of::>()) ; - T::Fungibles::hold(&HoldReason::Messaging.into(), origin, message_deposit)?; + T::Fungibles::hold(&HoldReason::Messaging.into(), &origin.account, message_deposit)?; if let Some(cb) = callback.as_ref() { T::Fungibles::hold( &HoldReason::CallbackGas.into(), - origin, + &origin.account, T::WeightToFee::weight_to_fee(&cb.weight), )?; } @@ -121,49 +122,49 @@ pub(crate) fn post( let commitment = T::IsmpDispatcher::default() .dispatch_request( DispatchRequest::Post(message), - FeeMetadata { payer: origin.clone(), fee }, + FeeMetadata { payer: origin.account.clone(), fee }, ) .map_err(|_| Error::::IsmpDispatchFailed)?; // Store commitment for lookup on response, message for querying, // response/timeout handling. - let id = next_message_id::(origin)?; - IsmpRequests::::insert(commitment, (origin, id)); - Messages::::insert(origin, id, Message::Ismp { commitment, callback, message_deposit }); + let id = next_message_id::()?; + IsmpRequests::::insert(commitment, id); + Messages::::insert(id, Message::Ismp { origin, commitment, callback, message_deposit }); Ok((id, commitment)) } pub(crate) fn process_response( commitment: &H256, response_data: &impl Encode, - event: impl Fn(AccountIdOf, MessageId) -> Event, + event: impl Fn(H160, MessageId) -> Event, ) -> Result<(), anyhow::Error> { ensure!( response_data.encoded_size() <= T::MaxResponseLen::get() as usize, ::ismp::Error::Custom("Response length exceeds maximum allowed length.".into()) ); - let (initiating_origin, id) = IsmpRequests::::get(commitment) + let id = IsmpRequests::::get(commitment) .ok_or(::ismp::Error::Custom("Request not found.".into()))?; - let Some(Message::Ismp { commitment, callback, message_deposit }) = - Messages::::get(&initiating_origin, id) + let Some(Message::Ismp { origin, commitment, callback, message_deposit }) = + Messages::::get(id) else { return Err(::ismp::Error::Custom("Message must be an ismp request.".into()).into()); }; // Deposit that the message has been recieved before a potential callback execution. - Pallet::::deposit_event(event(initiating_origin.clone(), id)); + Pallet::::deposit_event(event(origin.address, id)); // Attempt callback with result if specified. if let Some(callback) = callback { - if call::(&initiating_origin, callback, &id, response_data).is_ok() { + if call::(&origin.account, callback, &id, response_data).is_ok() { // Clean storage, return deposit - Messages::::remove(&initiating_origin, id); + Messages::::remove(id); IsmpRequests::::remove(commitment); T::Fungibles::release( &HoldReason::Messaging.into(), - &initiating_origin, + &origin.account, message_deposit, Exact, ) @@ -174,14 +175,13 @@ pub(crate) fn process_response( } // No callback or callback error: store response for manual retrieval and removal. - let encoded_response: BoundedVec = response_data + let response: BoundedVec = response_data .encode() .try_into() .map_err(|_| ::ismp::Error::Custom("response exceeds max".into()))?; Messages::::insert( - &initiating_origin, id, - Message::IsmpResponse { commitment, message_deposit, response: encoded_response }, + Message::IsmpResponse { origin: origin.address, commitment, message_deposit, response }, ); Ok(()) } @@ -190,12 +190,13 @@ pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), any let key = IsmpRequests::::get(commitment).ok_or(::ismp::Error::Custom( "Request commitment not found while processing timeout.".into(), ))?; - Messages::::try_mutate(key.0, key.1, |message| { - let Some(Message::Ismp { commitment, message_deposit, callback }) = message else { + Messages::::try_mutate(key, |message| { + let Some(Message::Ismp { origin, commitment, message_deposit, callback }) = message else { return Err(::ismp::Error::Custom("Invalid message".into())); }; let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); *message = Some(Message::IsmpTimeout { + origin: origin.address, message_deposit: *message_deposit, commitment: *commitment, callback_deposit, @@ -305,7 +306,7 @@ mod tests { #[test] fn takes_deposit() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); let callback_deposit = WeightToFee::weight_to_fee(&weight); @@ -318,23 +319,23 @@ mod tests { callback_deposit; let endowment = existential_deposit() + expected_deposit + fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { - let held_balance_pre_hold = Balances::total_balance_on_hold(&ALICE); + let held_balance_pre_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!(held_balance_pre_hold, 0); assert!(expected_deposit != 0); - assert_ok!(get::(&origin, message(), fee, Some(callback))); + assert_ok!(get::(origin.clone(), message(), fee, Some(callback))); - let held_balance_post_hold = Balances::total_balance_on_hold(&ALICE); + let held_balance_post_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!(held_balance_post_hold, expected_deposit); }) } #[test] fn assert_state() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let fee: Balance = u32::MAX.into(); let callback = None; @@ -343,19 +344,24 @@ mod tests { ) + calculate_message_deposit::(); let endowment = existential_deposit() + deposit + fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .build() .execute_with(|| { - let (id, commitment) = get::(&origin, message(), fee, callback).unwrap(); - - assert_eq!(IsmpRequests::get(commitment), Some((origin.clone(), id))); - let Some(Message::Ismp { commitment: c, callback: cb, message_deposit: d }) = - Messages::get(origin, id) + let (id, commitment) = + get::(origin.clone(), message(), fee, callback).unwrap(); + + assert_eq!(IsmpRequests::get(commitment), Some(id)); + let Some(Message::Ismp { + origin: o, + commitment: c, + callback: cb, + message_deposit: d, + }) = Messages::get(id) else { panic!("wrong message type"); }; - assert_eq!((c, cb, d), (commitment, callback, deposit)) + assert_eq!((o, c, cb, d), (origin, commitment, callback, deposit)) }) } @@ -376,7 +382,7 @@ mod tests { #[test] fn takes_deposit() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); let callback_deposit = ::WeightToFee::weight_to_fee(&weight); @@ -389,24 +395,24 @@ mod tests { callback_deposit; let endowment = existential_deposit() + expected_deposit + fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { - let held_balance_pre_hold = Balances::total_balance_on_hold(&origin); + let held_balance_pre_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!(held_balance_pre_hold, 0); assert_ne!(callback_deposit, 0); assert_ne!(expected_deposit, 0); - assert_ok!(post::(&origin, message(), fee, Some(callback))); + assert_ok!(post::(origin.clone(), message(), fee, Some(callback))); - let held_balance_post_hold = Balances::total_balance_on_hold(&origin); + let held_balance_post_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!(held_balance_post_hold, expected_deposit); }) } #[test] fn assert_state() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let fee: Balance = u32::MAX.into(); let callback = None; @@ -415,19 +421,24 @@ mod tests { ) + calculate_message_deposit::(); let endowment = existential_deposit() + deposit + fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin, id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .build() .execute_with(|| { - let (id, commitment) = post::(&origin, message(), fee, callback).unwrap(); - - assert_eq!(IsmpRequests::get(commitment).unwrap(), (origin.clone(), id)); - let Some(Message::Ismp { commitment: c, callback: cb, message_deposit: d }) = - Messages::get(origin, id) + let (id, commitment) = + post::(origin.clone(), message(), fee, callback).unwrap(); + + assert_eq!(IsmpRequests::get(commitment), Some(id)); + let Some(Message::Ismp { + origin: o, + commitment: c, + callback: cb, + message_deposit: d, + }) = Messages::get(id) else { panic!("wrong message type"); }; - assert_eq!((c, cb, d), (commitment, callback, deposit)) + assert_eq!((o, c, cb, d), (origin, commitment, callback, deposit)) }) } @@ -477,14 +488,13 @@ mod tests { #[test] fn invalid_request() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let commitment: H256 = [1u8; 32].into(); - let message = - Message::XcmQuery { query_id: 0, callback: None, message_deposit: 100 }; + let message = Message::xcm_query(origin, 0, None, 100); ExtBuilder::new().build().execute_with(|| { - IsmpRequests::insert(commitment, (&origin, id)); - Messages::insert(origin, id, &message); + IsmpRequests::insert(commitment, id); + Messages::insert(id, &message); let err = timeout_commitment::(&commitment).unwrap_err(); assert_eq!( @@ -496,22 +506,20 @@ mod tests { #[test] fn actually_timesout_assert_event() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let id = 1; let commitment: H256 = [1u8; 32].into(); let message_deposit = 100; - let message = Message::Ismp { commitment, callback: None, message_deposit }; + let message = Message::ismp(origin, commitment, None, message_deposit); ExtBuilder::new().build().execute_with(|| { - IsmpRequests::insert(commitment, (&origin, id)); - Messages::insert(&origin, id, &message); + IsmpRequests::insert(commitment, id); + Messages::insert(id, &message); let res = timeout_commitment::(&commitment); assert!(res.is_ok(), "{:?}", res.unwrap_err().downcast::().unwrap()); - if let Some(Message::IsmpTimeout { commitment, .. }) = - Messages::get(&origin, id) - { + if let Some(Message::IsmpTimeout { commitment, .. }) = Messages::get(id) { assert!(events().contains(&Event::IsmpTimedOut { commitment })) } else { panic!("Message not timed out.") @@ -521,23 +529,30 @@ mod tests { #[test] fn success_callback_releases_deposit() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let response = vec![1u8]; let commitment = H256::default(); let id = 1; let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into()); let message_deposit = 100; let message = - Message::Ismp { commitment, callback: Some(callback), message_deposit }; + Message::ismp(origin.clone(), commitment, Some(callback), message_deposit); ExtBuilder::new() - .with_balances(vec![(origin.clone(), existential_deposit() + message_deposit)]) + .with_balances(vec![( + origin.account.clone(), + existential_deposit() + message_deposit, + )]) .build() .execute_with(|| { - assert_ok!(Fungibles::hold(&Messaging.into(), &origin, message_deposit)); - let post_hold = Balances::free_balance(&origin); + assert_ok!(Fungibles::hold( + &Messaging.into(), + &origin.account, + message_deposit + )); + let post_hold = Balances::free_balance(&origin.account); - IsmpRequests::insert(commitment, (origin.clone(), id)); - Messages::insert(&origin, id, message); + IsmpRequests::insert(commitment, id); + Messages::insert(id, message); let res = process_response::(&commitment, &response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } @@ -545,7 +560,7 @@ mod tests { assert!(res.is_ok(), "process_response failed"); - let post_process = Balances::free_balance(&origin); + let post_process = Balances::free_balance(&origin.account); assert_eq!(post_process - message_deposit, post_hold); }) } @@ -594,14 +609,14 @@ mod tests { #[test] fn message_must_be_ismp_request() { - let origin = ALICE; + let origin = (ALICE_ADDR, ALICE); let response = bounded_vec![1u8]; let commitment = H256::default(); let id = 1; - let message = Message::ismp_response(commitment, 100, response); + let message = Message::ismp_response(origin.0, commitment, 100, response); ExtBuilder::new().build().execute_with(|| { - IsmpRequests::insert(commitment, (&origin, id)); - Messages::insert(&origin, id, message); + IsmpRequests::insert(commitment, id); + Messages::insert(id, message); let err = process_response::(&commitment, &vec![1u8], |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } @@ -616,14 +631,14 @@ mod tests { #[test] fn no_callback_saves_response() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let response = vec![1u8]; let commitment = H256::default(); let id = 1; - let message = Message::Ismp { commitment, callback: None, message_deposit: 100 }; + let message = Message::ismp(origin, commitment, None, 100); ExtBuilder::new().build().execute_with(|| { - IsmpRequests::insert(commitment, (origin.clone(), id)); - Messages::insert(&origin, id, message); + IsmpRequests::insert(commitment, id); + Messages::insert(id, message); let res = process_response::(&commitment, &response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } @@ -631,7 +646,7 @@ mod tests { assert!(res.is_ok(), "process_response failed"); - let Some(Message::IsmpResponse { .. }) = Messages::get(&origin, id) else { + let Some(Message::IsmpResponse { .. }) = Messages::get(id) else { panic!("wrong message type.") }; }) diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs index 6e72bba45..f64699b3c 100644 --- a/pallets/api-vnext/src/messaging/transports/xcm.rs +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -18,22 +18,22 @@ use crate::messaging::{pallet::Call, BlockNumberOf, Config}; /// # Returns /// A unique identifier for the message. pub(crate) fn new_query( - origin: &T::AccountId, + origin: Origin, responder: Location, timeout: BlockNumberOf, callback: Option, ) -> Result<(MessageId, QueryId), DispatchError> { let querier_location = - T::OriginConverter::try_convert(T::RuntimeOrigin::signed(origin.clone())) + T::OriginConverter::try_convert(T::RuntimeOrigin::signed(origin.account.clone())) .map_err(|_| Error::::OriginConversionFailed)?; let current_block = frame_system::Pallet::::block_number(); ensure!(current_block < timeout, Error::::FutureTimeoutMandatory); - let id = next_message_id::(origin)?; + let id = next_message_id::()?; XcmQueryTimeouts::::try_mutate(current_block.saturating_add(timeout), |bounded_vec| { bounded_vec - .try_push((origin.clone(), id)) + .try_push(id) .map_err(|_| Error::::MaxMessageTimeoutPerBlockReached) })?; @@ -41,14 +41,14 @@ pub(crate) fn new_query( let message_deposit = calculate_protocol_deposit::(ProtocolStorageDeposit::XcmQueries) .saturating_add(calculate_message_deposit::()); - T::Fungibles::hold(&HoldReason::Messaging.into(), &origin, message_deposit)?; + T::Fungibles::hold(&HoldReason::Messaging.into(), &origin.account, message_deposit)?; let mut callback_execution_weight = Weight::zero(); if let Some(cb) = callback.as_ref() { T::Fungibles::hold( &HoldReason::CallbackGas.into(), - &origin, + &origin.account, T::WeightToFee::weight_to_fee(&cb.weight), )?; @@ -60,7 +60,7 @@ pub(crate) fn new_query( ); let credit = T::Fungibles::withdraw( - &origin, + &origin.account, response_prepayment_amount, Precision::Exact, Preservation::Preserve, @@ -77,8 +77,8 @@ pub(crate) fn new_query( // Store query id for later lookup on response, message for querying status, // response/timeout handling. - XcmQueries::::insert(query_id, (&origin, id)); - Messages::::insert(&origin, id, Message::XcmQuery { query_id, callback, message_deposit }); + XcmQueries::::insert(query_id, id); + Messages::::insert(id, Message::XcmQuery { origin, query_id, callback, message_deposit }); Ok((id, query_id)) } @@ -146,21 +146,21 @@ pub(crate) mod tests { #[test] fn takes_response_fee_no_callback() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let response_fee = WeightToFee::weight_to_fee(&(WeightInfo::xcm_response())); let callback = None; let endowment = existential_deposit() + deposit() + response_fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { let timeout = System::block_number() + 1; - let balance_pre_transfer = Balances::free_balance(&origin); + let balance_pre_transfer = Balances::free_balance(&origin.account); - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, callback)); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, callback)); - let balance_post_transfer = Balances::free_balance(&origin); - let total_balance_on_hold = Balances::total_balance_on_hold(&origin); + let balance_post_transfer = Balances::free_balance(&origin.account); + let total_balance_on_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!( balance_pre_transfer - balance_post_transfer - total_balance_on_hold, response_fee @@ -170,22 +170,22 @@ pub(crate) mod tests { #[test] fn takes_response_fee_with_callback() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let response_fee = xcm_response_fee(); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Weight::zero()); let endowment = existential_deposit() + deposit() + response_fee; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { let timeout = System::block_number() + 1; assert_ne!(response_fee, 0); - let balance_pre_query = Balances::free_balance(&ALICE); + let balance_pre_query = Balances::free_balance(&origin.account); - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback),)); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, Some(callback))); - let balance_post_query = Balances::free_balance(&ALICE); - let total_balance_on_hold = Balances::total_balance_on_hold(&ALICE); + let balance_post_query = Balances::free_balance(&origin.account); + let total_balance_on_hold = Balances::total_balance_on_hold(&origin.account); assert_eq!( balance_pre_query - balance_post_query - total_balance_on_hold, @@ -196,56 +196,58 @@ pub(crate) mod tests { #[test] fn takes_callback_hold() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); let callback_deposit = WeightToFee::weight_to_fee(&weight); let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_deposit; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { let timeout = System::block_number() + 1; let held_balance_pre_query = - Fungibles::balance_on_hold(&CallbackGas.into(), &origin); + Fungibles::balance_on_hold(&CallbackGas.into(), &origin.account); assert_eq!(held_balance_pre_query, 0); assert_ne!(callback_deposit, 0); - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, Some(callback))); let held_balance_post_query = - Fungibles::balance_on_hold(&CallbackGas.into(), &origin); + Fungibles::balance_on_hold(&CallbackGas.into(), &origin.account); assert_eq!(held_balance_post_query, callback_deposit); }) } #[test] fn takes_messaging_hold() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let expected_deposit = deposit(); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { let timeout = System::block_number() + 1; - let held_balance_pre_hold = Fungibles::balance_on_hold(&Messaging.into(), &origin); + let held_balance_pre_hold = + Fungibles::balance_on_hold(&Messaging.into(), &origin.account); assert_ne!( expected_deposit, 0, "set an onchain byte fee with T::OnChainByteFee to run this test." ); assert_eq!(held_balance_pre_hold, 0); - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None,)); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, None)); - let held_balance_post_hold = Fungibles::balance_on_hold(&Messaging.into(), &origin); + let held_balance_post_hold = + Fungibles::balance_on_hold(&Messaging.into(), &origin.account); assert_eq!(held_balance_post_hold, expected_deposit); }); } #[test] fn assert_state() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); let callback_deposit = WeightToFee::weight_to_fee(&weight); @@ -253,38 +255,37 @@ pub(crate) mod tests { let id = 1; let query_id = 42; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) - .with_message_id(&origin.clone(), id) + .with_balances(vec![(origin.account.clone(), endowment)]) + .with_message_id(id) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 1; - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, Some(callback))); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, Some(callback))); - let message = - Messages::get(&origin, id).expect("should exist after xcm_new_query."); + let message = Messages::get(id).expect("should exist after xcm_new_query."); let Message::XcmQuery { query_id: qid, callback: c, .. } = message else { panic!("Wrong message type.") }; assert_eq!(qid, query_id); assert_eq!(c, Some(callback)); - assert_eq!(XcmQueries::get(query_id), Some((origin, id))); + assert_eq!(XcmQueries::get(query_id), Some(id)); }) } #[test] fn xcm_timeouts_must_be_in_the_future() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .build() .execute_with(|| { let timeout = System::block_number(); assert_noop!( - new_query(&origin, RESPONSE_LOCATION, timeout, None), + new_query(origin, RESPONSE_LOCATION, timeout, None), Error::FutureTimeoutMandatory ); }) @@ -292,25 +293,25 @@ pub(crate) mod tests { #[test] fn xcm_queries_expire_on_expiry_block() { - let origin = ALICE; + let origin = Origin::from((ALICE_ADDR, ALICE)); let messages = 2; let query_id = 42; let endowment = existential_deposit() + (deposit() + xcm_response_fee()) * messages as Balance; ExtBuilder::new() - .with_balances(vec![(origin.clone(), endowment)]) + .with_balances(vec![(origin.account.clone(), endowment)]) .with_query_id(query_id) .build() .execute_with(|| { let timeout = System::block_number() + 10; for _ in 0..messages { - assert_ok!(new_query(&origin, RESPONSE_LOCATION, timeout, None)); + assert_ok!(new_query(origin.clone(), RESPONSE_LOCATION, timeout, None)); } run_to(timeout + 1); for id in 0..messages { - let Some(Message::XcmTimeout { .. }) = Messages::get(&origin, id) else { + let Some(Message::XcmTimeout { .. }) = Messages::get(id) else { panic!("Message should be timed out!") }; } @@ -332,7 +333,7 @@ pub(crate) mod tests { // wrap calls to it in a transaction to simulate. See additional precompiles tests for // further assurances. pub(crate) fn new_query( - origin: &AccountId, + origin: Origin, responder: Location, timeout: u32, callback: Option, diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 846bf24e9..023d42ba7 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -9,7 +9,7 @@ use frame_support::{ }; use frame_system::{EnsureRoot, EnsureSigned}; use pallet_assets::AutoIncAssetId; -pub(crate) use pallet_revive::test_utils::{ALICE, BOB, CHARLIE}; +pub(crate) use pallet_revive::test_utils::{ALICE, ALICE_ADDR, BOB, BOB_ADDR, CHARLIE}; use super::fungibles; @@ -326,7 +326,7 @@ pub(crate) struct ExtBuilder { #[cfg(feature = "messaging")] messages: Option, Balance)>>, #[cfg(feature = "messaging")] - next_message_id: Option<(AccountId, messaging::MessageId)>, + next_message_id: Option, #[cfg(feature = "messaging")] query_id: Option, } @@ -382,8 +382,8 @@ impl ExtBuilder { } #[cfg(feature = "messaging")] - pub(crate) fn with_message_id(mut self, origin: &AccountId, id: messaging::MessageId) -> Self { - self.next_message_id = Some((origin.clone(), id)); + pub(crate) fn with_message_id(mut self, id: messaging::MessageId) -> Self { + self.next_message_id = Some(id); self } @@ -417,7 +417,7 @@ impl ExtBuilder { { if let Some(messages) = self.messages.take() { for (account, id, message, deposit) in messages { - messaging::Messages::::insert(&account, id, message); + messaging::Messages::::insert(id, message); use frame_support::traits::fungible::MutateHold; use messaging::HoldReason; @@ -429,8 +429,8 @@ impl ExtBuilder { } } - if let Some((account, id)) = self.next_message_id.take() { - crate::messaging::NextMessageId::::set(account, id); + if let Some(id) = self.next_message_id.take() { + crate::messaging::NextMessageId::::set(id); } if let Some(query_id) = self.query_id.take() { From e8baf0cf0e8e52f9e817da21e3f5e8d014b6dffb Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 21 Jul 2025 22:37:09 +0100 Subject: [PATCH 218/284] refactor(pallets/api): update weights after benchmarking --- pallets/api-vnext/src/messaging/weights.rs | 242 ++++++++++----------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index 946ba624c..896898336 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_api_vnext::messaging` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-07-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-07-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `R0GUE`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` @@ -54,13 +54,13 @@ impl WeightInfo for SubstrateWeight { Weight::from_parts(1_000_000, 0) } /// Storage: `Messaging::Messages` (r:1 w:0) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) fn get_response() -> Weight { // Proof Size summary in bytes: - // Measured: `740` - // Estimated: `16283` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 16283) + // Measured: `703` + // Estimated: `16247` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 16247) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -72,21 +72,21 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(140_218_301, 771) - // Standard Error: 4_902 - .saturating_add(Weight::from_parts(45_681, 0).saturating_mul(x.into())) - // Standard Error: 30_072 - .saturating_add(Weight::from_parts(219_280, 0).saturating_mul(y.into())) - // Standard Error: 202_682 - .saturating_add(Weight::from_parts(610_542, 0).saturating_mul(a.into())) + // Minimum execution time: 107_000_000 picoseconds. + Weight::from_parts(133_792_052, 771) + // Standard Error: 4_653 + .saturating_add(Weight::from_parts(40_591, 0).saturating_mul(x.into())) + // Standard Error: 28_544 + .saturating_add(Weight::from_parts(191_420, 0).saturating_mul(y.into())) + // Standard Error: 192_383 + .saturating_add(Weight::from_parts(761_947, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `Messaging::IsmpRequests` (r:1 w:1) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) @@ -94,24 +94,24 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[0, 1]`. fn ismp_on_response(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `610` - // Estimated: `16283` - // Minimum execution time: 91_000_000 picoseconds. - Weight::from_parts(106_000_000, 16283) + // Measured: `563` + // Estimated: `16247` + // Minimum execution time: 90_000_000 picoseconds. + Weight::from_parts(101_597_959, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `Messaging::IsmpRequests` (r:1 w:0) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 2]`. fn ismp_on_timeout(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `395` - // Estimated: `16283` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 16283) + // Measured: `348` + // Estimated: `16247` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 16247) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -123,86 +123,86 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 107_000_000 picoseconds. - Weight::from_parts(111_947_631, 771) - // Standard Error: 224 - .saturating_add(Weight::from_parts(4_530, 0).saturating_mul(x.into())) - // Standard Error: 74_946 - .saturating_add(Weight::from_parts(31_797_390, 0).saturating_mul(y.into())) + // Minimum execution time: 106_000_000 picoseconds. + Weight::from_parts(105_509_867, 771) + // Standard Error: 248 + .saturating_add(Weight::from_parts(5_317, 0).saturating_mul(x.into())) + // Standard Error: 82_941 + .saturating_add(Weight::from_parts(31_155_528, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `Messaging::Messages` (r:1 w:0) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) fn poll_status() -> Weight { // Proof Size summary in bytes: - // Measured: `740` - // Estimated: `16283` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 16283) + // Measured: `703` + // Estimated: `16247` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 16247) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Messaging::Messages` (r:100 w:100) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `Messaging::IsmpRequests` (r:0 w:100) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 100]`. fn remove(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + x * (97 ±0)` - // Estimated: `3694 + x * (15293 ±0)` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(12_914_106, 3694) - // Standard Error: 16_773 - .saturating_add(Weight::from_parts(55_544_739, 0).saturating_mul(x.into())) + // Measured: `388 + x * (109 ±0)` + // Estimated: `3694 + x * (15257 ±0)` + // Minimum execution time: 65_000_000 picoseconds. + Weight::from_parts(21_874_449, 3694) + // Standard Error: 68_112 + .saturating_add(Weight::from_parts(52_491_354, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 15293).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 15257).saturating_mul(x.into())) } /// Storage: `Messaging::NextMessageId` (r:1 w:1) - /// Proof: `Messaging::NextMessageId` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Proof: `Messaging::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `Messaging::XcmQueryTimeouts` (r:1 w:1) - /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(4006), added: 6481, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(814), added: 3289, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Messaging::XcmQueries` (r:0 w:1) - /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:0 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::Queries` (r:0 w:1) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 1]`. fn xcm_new_query(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `309` - // Estimated: `7471` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(71_000_000, 7471) - // Standard Error: 13_579 - .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(x.into())) + // Estimated: `4279` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_638_775, 4279) + // Standard Error: 152_811 + .saturating_add(Weight::from_parts(20_261_224, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `Messaging::XcmQueries` (r:1 w:1) - /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn xcm_response() -> Weight { // Proof Size summary in bytes: - // Measured: `569` - // Estimated: `16283` - // Minimum execution time: 82_000_000 picoseconds. - Weight::from_parts(83_000_000, 16283) + // Measured: `531` + // Estimated: `16247` + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(81_000_000, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -218,13 +218,13 @@ impl WeightInfo for () { Weight::from_parts(1_000_000, 0) } /// Storage: `Messaging::Messages` (r:1 w:0) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) fn get_response() -> Weight { // Proof Size summary in bytes: - // Measured: `740` - // Estimated: `16283` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 16283) + // Measured: `703` + // Estimated: `16247` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -236,21 +236,21 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(140_218_301, 771) - // Standard Error: 4_902 - .saturating_add(Weight::from_parts(45_681, 0).saturating_mul(x.into())) - // Standard Error: 30_072 - .saturating_add(Weight::from_parts(219_280, 0).saturating_mul(y.into())) - // Standard Error: 202_682 - .saturating_add(Weight::from_parts(610_542, 0).saturating_mul(a.into())) + // Minimum execution time: 107_000_000 picoseconds. + Weight::from_parts(133_792_052, 771) + // Standard Error: 4_653 + .saturating_add(Weight::from_parts(40_591, 0).saturating_mul(x.into())) + // Standard Error: 28_544 + .saturating_add(Weight::from_parts(191_420, 0).saturating_mul(y.into())) + // Standard Error: 192_383 + .saturating_add(Weight::from_parts(761_947, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: `Messaging::IsmpRequests` (r:1 w:1) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) @@ -258,24 +258,24 @@ impl WeightInfo for () { /// The range of component `x` is `[0, 1]`. fn ismp_on_response(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `610` - // Estimated: `16283` - // Minimum execution time: 91_000_000 picoseconds. - Weight::from_parts(106_000_000, 16283) + // Measured: `563` + // Estimated: `16247` + // Minimum execution time: 90_000_000 picoseconds. + Weight::from_parts(101_597_959, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: `Messaging::IsmpRequests` (r:1 w:0) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 2]`. fn ismp_on_timeout(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `395` - // Estimated: `16283` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 16283) + // Measured: `348` + // Estimated: `16247` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -287,86 +287,86 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `771` // Estimated: `771` - // Minimum execution time: 107_000_000 picoseconds. - Weight::from_parts(111_947_631, 771) - // Standard Error: 224 - .saturating_add(Weight::from_parts(4_530, 0).saturating_mul(x.into())) - // Standard Error: 74_946 - .saturating_add(Weight::from_parts(31_797_390, 0).saturating_mul(y.into())) + // Minimum execution time: 106_000_000 picoseconds. + Weight::from_parts(105_509_867, 771) + // Standard Error: 248 + .saturating_add(Weight::from_parts(5_317, 0).saturating_mul(x.into())) + // Standard Error: 82_941 + .saturating_add(Weight::from_parts(31_155_528, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: `Messaging::Messages` (r:1 w:0) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) fn poll_status() -> Weight { // Proof Size summary in bytes: - // Measured: `740` - // Estimated: `16283` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 16283) + // Measured: `703` + // Estimated: `16247` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Messaging::Messages` (r:100 w:100) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `Messaging::IsmpRequests` (r:0 w:100) - /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 100]`. fn remove(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + x * (97 ±0)` - // Estimated: `3694 + x * (15293 ±0)` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(12_914_106, 3694) - // Standard Error: 16_773 - .saturating_add(Weight::from_parts(55_544_739, 0).saturating_mul(x.into())) + // Measured: `388 + x * (109 ±0)` + // Estimated: `3694 + x * (15257 ±0)` + // Minimum execution time: 65_000_000 picoseconds. + Weight::from_parts(21_874_449, 3694) + // Standard Error: 68_112 + .saturating_add(Weight::from_parts(52_491_354, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 15293).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 15257).saturating_mul(x.into())) } /// Storage: `Messaging::NextMessageId` (r:1 w:1) - /// Proof: `Messaging::NextMessageId` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Proof: `Messaging::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// Storage: `Messaging::XcmQueryTimeouts` (r:1 w:1) - /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(4006), added: 6481, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueryTimeouts` (`max_values`: None, `max_size`: Some(814), added: 3289, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Messaging::XcmQueries` (r:0 w:1) - /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:0 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::Queries` (r:0 w:1) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 1]`. fn xcm_new_query(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `309` - // Estimated: `7471` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(71_000_000, 7471) - // Standard Error: 13_579 - .saturating_add(Weight::from_parts(20_900_000, 0).saturating_mul(x.into())) + // Estimated: `4279` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_638_775, 4279) + // Standard Error: 152_811 + .saturating_add(Weight::from_parts(20_261_224, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: `Messaging::XcmQueries` (r:1 w:1) - /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `Messaging::XcmQueries` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) - /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12818), added: 15293, mode: `MaxEncodedLen`) + /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// Storage: `Balances::Holds` (r:1 w:1) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn xcm_response() -> Weight { // Proof Size summary in bytes: - // Measured: `569` - // Estimated: `16283` - // Minimum execution time: 82_000_000 picoseconds. - Weight::from_parts(83_000_000, 16283) + // Measured: `531` + // Estimated: `16247` + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(81_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } From 3564e7ba6561affac4f953abbf3481257eb3300d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 22 Jul 2025 17:02:02 +0100 Subject: [PATCH 219/284] fix(pallets/api): replace bounded_vec! usage within benchmarks --- pallets/api-vnext/src/messaging/benchmarking.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index e3ae8ee9a..d3a9f083a 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -18,7 +18,6 @@ use frame_benchmarking::v2::*; use frame_support::{ assert_ok, pallet_prelude::{IsType, Weight}, - testing_prelude::bounded_vec, traits::{ fungible::{Inspect, Mutate, MutateHold}, EnsureOrigin, Get, Time, @@ -103,7 +102,7 @@ mod benchmarks { origin.address, [255; 32].into(), BalanceOf::::max_value(), - bounded_vec![255; T::MaxResponseLen::get() as usize], + vec![255; T::MaxResponseLen::get() as usize].try_into().unwrap(), ), ); @@ -330,7 +329,7 @@ mod benchmarks { origin.address, [255; 32].into(), BalanceOf::::max_value(), - bounded_vec![255; T::MaxResponseLen::get() as usize], + vec![255; T::MaxResponseLen::get() as usize].try_into().unwrap(), ), ); From d5a58499d545b22e97bf37d7c7a8d7445869547d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:13:08 +0100 Subject: [PATCH 220/284] refactor(pallets/api): callback response interfaces and encoding --- pallets/api-vnext/src/messaging.rs | 34 ++++++++++--- .../precompiles/interfaces/v0/IISMP.sol | 40 +++++++++++++++ .../precompiles/interfaces/v0/IXCM.sol | 12 +++++ .../src/messaging/precompiles/ismp/v0.rs | 50 +++++++++++++++++++ .../src/messaging/precompiles/xcm/v0.rs | 19 +++++++ .../src/messaging/transports/ismp.rs | 12 ++--- 6 files changed, 153 insertions(+), 14 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 07a3376ba..3f45e22f1 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -369,6 +369,16 @@ pub mod pallet { } } +impl Pallet { + /// Get a message by its identifier. + /// + /// # Parameters + /// - `id`: The message identifier. + pub fn get(id: MessageId) -> Option> { + >::get(id) + } +} + /// Executes a registered callback with the given input data and manually charges block /// weight. /// @@ -399,7 +409,7 @@ pub(crate) fn call( initiating_origin: &AccountIdOf, callback: Callback, id: &MessageId, - data: &impl Encode, + data: &impl EncodeCallback, ) -> DispatchResult { // This is the total weight that should be deducted from the blockspace for callback // execution. @@ -417,10 +427,7 @@ pub(crate) fn call( // Its important to note that we must still ensure that the weight used is accounted for // in frame_system. Hence all calls after this must not return an err and state // should not be rolled back. - let data = match callback.encoding { - Encoding::Scale => [callback.selector.to_vec(), (id, data).encode()].concat(), - Encoding::SolidityAbi => todo!(), - }; + let data = data.encode(callback.encoding, callback.selector, *id); let result = T::CallbackExecutor::execute( &initiating_origin, callback.destination, @@ -489,7 +496,7 @@ fn get(id: &MessageId) -> Vec { .and_then(|m| match m { Ismp { .. } | IsmpTimeout { .. } | XcmQuery { .. } | XcmTimeout { .. } => None, IsmpResponse { response, .. } => Some(response.into_inner()), - XcmResponse { response, .. } => Some(response.encode()), + XcmResponse { response, .. } => Some(codec::Encode::encode(&response)), }) .unwrap_or_default() } @@ -757,6 +764,17 @@ pub enum Encoding { SolidityAbi, } +/// Trait for encoding a response callback. +pub(crate) trait EncodeCallback { + /// Encodes the data using the specified encoding. + /// + /// # Parameters + /// - `encoding`: The encoding to use. + /// - `selector`: The message selector to be used for the callback. + /// - `id`: The originating message identifier. + fn encode(&self, encoding: Encoding, selector: [u8; 4], id: MessageId) -> Vec; +} + /// Represents a cross-chain message in the system. /// /// Each variant of this enum captures a different state or type of message lifecycle: @@ -768,7 +786,7 @@ pub enum Encoding { /// associated deposits and optional callback metadata. #[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] #[scale_info(skip_type_params(T))] -pub(crate) enum Message { +pub enum Message { /// Represents a pending ISMP request. /// /// # Fields @@ -939,7 +957,7 @@ impl From<&Message> for MessageStatus { /// The origin of a request. #[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] #[scale_info(skip_type_params(Account))] -pub(super) struct Origin { +pub struct Origin { address: H160, account: Account, } diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index d27374381..b6f86ba2b 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -109,6 +109,22 @@ interface IISMP { bytes data; } + /// @notice A verified storage value. + struct StorageValue{ + /// @custom:property The request storage key. + bytes key; + /// @custom:property The verified value. + Value value; + } + + /// @notice A verified storage value. + struct Value { + /// @custom:property Whether a value exists. + bool exists; + /// @custom:property The verified value. + bytes value; + } + /** * @notice A GET has been dispatched via ISMP. * @param origin The origin of the request. @@ -153,6 +169,30 @@ interface IISMP { error MaxKeysExceeded(); } +/** + * @title A callback for handling responses to ISMP `Get` requests. + */ +interface IGetResponse { + /** + * @notice Handles a response to an ISMP `Get` request. + * @param id The identifier of the originating message. + * @param response The values derived from the state proof. + */ + function onResponse(uint64 id, IISMP.StorageValue[] memory response) external; +} + +/** + * @title A callback for handling responses to ISMP `Post` requests. + */ +interface IPostResponse { + /** + * @notice Handles a response to an ISMP `Post` request. + * @param id The identifier of the originating message. + * @param response The response message. + */ + function onResponse(uint64 id, bytes memory response) external; +} + /// @notice A message callback. struct Callback { /// @custom:property The contract address to which the callback should be sent. diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index 13a3e8dee..9c516d637 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -120,6 +120,18 @@ interface IXCM { error OriginConversionFailed(); } +/** + * @title A callback for handling responses to XCM queries. + */ +interface IQueryResponse { + /** + * @notice Handles a response to an ISMP `Post` request. + * @param id The identifier of the originating message. + * @param response The response message. + */ + function onResponse(uint64 id, bytes memory response) external; +} + /// @notice A message callback. struct Callback { /// @custom:property The contract address to which the callback should be sent. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 87716f85b..9bf7577f2 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -260,6 +260,56 @@ fn try_post(value: &Post) -> Result { }) } +impl EncodeCallback for Vec<::ismp::router::StorageValue> { + fn encode(&self, encoding: messaging::Encoding, selector: [u8; 4], id: MessageId) -> Vec { + use messaging::Encoding::*; + match encoding { + Scale => [selector.to_vec(), (id, self).encode()].concat(), + SolidityAbi => { + // Use interface to encode call data + let call = IGetResponse::onResponseCall { + id, + // TODO: address clones + response: self + .into_iter() + .map(|v| IISMP::StorageValue { + key: v.key.clone().into(), + value: v.value.as_ref().map_or_else( + || IISMP::Value { exists: false, value: Default::default() }, + |v| IISMP::Value { exists: true, value: v.clone().into() }, + ), + }) + .collect(), + }; + let mut data = call.abi_encode(); + debug_assert_eq!(data[..4], selector); + // Replace selector with that provided at request + data.splice(0..4, selector); + data + }, + } + } +} + +impl EncodeCallback for Vec { + fn encode(&self, encoding: messaging::Encoding, selector: [u8; 4], id: MessageId) -> Vec { + use messaging::Encoding::*; + match encoding { + Scale => [selector.to_vec(), (id, self).encode()].concat(), + SolidityAbi => { + // Use interface to encode call data + // TODO: address clone + let call = IPostResponse::onResponseCall { id, response: self.clone().into() }; + let mut data = call.abi_encode(); + debug_assert_eq!(data[..4], selector); + // Replace selector with that provided at request + data.splice(0..4, selector); + data + }, + } + } +} + impl From<&Callback> for super::Callback { fn from(callback: &Callback) -> Self { Self::new( diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index b086c51cb..31af237a5 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -228,6 +228,25 @@ impl_from_sol_error! { TooManyMessages, } +impl EncodeCallback for Response { + fn encode(&self, encoding: messaging::Encoding, selector: [u8; 4], id: MessageId) -> Vec { + use messaging::Encoding::*; + // XCM responses are always SCALE-encoded. + let response = codec::Encode::encode(&self); + match encoding { + Scale => [selector.to_vec(), (id, response).encode()].concat(), + SolidityAbi => { + let call = IQueryResponse::onResponseCall { id, response: response.into() }; + let mut data = call.abi_encode(); + debug_assert_eq!(data[..4], selector); + // Replace selector with that provided at request + data.splice(0..4, selector); + data + }, + } + } +} + impl From<&Callback> for super::Callback { fn from(callback: &Callback) -> Self { Self::new( diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index c9fe69ae6..8b05e5d63 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -136,9 +136,10 @@ pub(crate) fn post( pub(crate) fn process_response( commitment: &H256, - response_data: &impl Encode, + response_data: impl Encode + EncodeCallback, event: impl Fn(H160, MessageId) -> Event, ) -> Result<(), anyhow::Error> { + // TODO: handle Solidity encoding size ensure!( response_data.encoded_size() <= T::MaxResponseLen::get() as usize, ::ismp::Error::Custom("Response length exceeds maximum allowed length.".into()) @@ -158,7 +159,7 @@ pub(crate) fn process_response( // Attempt callback with result if specified. if let Some(callback) = callback { - if call::(&origin.account, callback, &id, response_data).is_ok() { + if call::(&origin.account, callback, &id, &response_data).is_ok() { // Clean storage, return deposit Messages::::remove(id); IsmpRequests::::remove(commitment); @@ -175,8 +176,7 @@ pub(crate) fn process_response( } // No callback or callback error: store response for manual retrieval and removal. - let response: BoundedVec = response_data - .encode() + let response: BoundedVec = codec::Encode::encode(&response_data) .try_into() .map_err(|_| ::ismp::Error::Custom("response exceeds max".into()))?; Messages::::insert( @@ -232,13 +232,13 @@ impl IsmpModule for Handler { Response::Get(GetResponse { get, values }) => { log::debug!(target: "pop-api::messaging::ismp", "StorageValue={:?}", values); let commitment = hash_request::(&Request::Get(get)); - process_response(&commitment, &values, |dest, id| { + process_response(&commitment, values, |dest, id| { Event::::IsmpGetResponseReceived { dest, id, commitment } }) }, Response::Post(PostResponse { post, response, .. }) => { let commitment = hash_request::(&Request::Post(post)); - process_response(&commitment, &response, |dest, id| { + process_response(&commitment, response, |dest, id| { Event::::IsmpPostResponseReceived { dest, id, commitment } }) }, From b02fdc90d7873924c3376701c2dbc3d79b078b95 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:24:09 +0100 Subject: [PATCH 221/284] refactor(api): precompile and callback trait and type encoding improvements --- pop-api-vnext/src/lib.rs | 10 +- pop-api-vnext/src/messaging.rs | 7 +- pop-api-vnext/src/messaging/ismp.rs | 5 +- pop-api-vnext/src/messaging/ismp/v0.rs | 239 ++++++++++++------------- pop-api-vnext/src/messaging/v0.rs | 88 ++------- pop-api-vnext/src/messaging/xcm/v0.rs | 99 +++++----- pop-api-vnext/src/sol.rs | 2 +- 7 files changed, 192 insertions(+), 258 deletions(-) diff --git a/pop-api-vnext/src/lib.rs b/pop-api-vnext/src/lib.rs index cc7d8963f..cc2f37d78 100644 --- a/pop-api-vnext/src/lib.rs +++ b/pop-api-vnext/src/lib.rs @@ -13,7 +13,8 @@ pub use sol::{revert, SolErrorDecode}; /// An index to a block. pub type BlockNumber = u32; -type Pop = ink::env::DefaultEnvironment; +/// The onchain environment provided by Pop. +pub type Pop = ink::env::DefaultEnvironment; /// The various general errors which may occur. pub mod errors; @@ -23,7 +24,8 @@ pub mod fungibles; /// APIs for cross-chain messaging. #[cfg(feature = "messaging")] pub mod messaging; -mod sol; +/// Types and utilities for working with Solidity ABI encoding. +pub mod sol; #[macro_export] macro_rules! ensure { @@ -36,7 +38,7 @@ macro_rules! ensure { /// Calculates the address of a precompile at index `n`. #[inline] -fn fixed_address(n: u16) -> Address { +const fn fixed_address(n: u16) -> Address { let shifted = (n as u32) << 16; let suffix = shifted.to_be_bytes(); @@ -46,7 +48,7 @@ fn fixed_address(n: u16) -> Address { address[i] = suffix[i - 16]; i = i + 1; } - address.into() + ink::H160(address) } /// Calculates the address of a precompile at index `n` and with some additional prefix. diff --git a/pop-api-vnext/src/messaging.rs b/pop-api-vnext/src/messaging.rs index f6a5d7fa2..90444c6a9 100644 --- a/pop-api-vnext/src/messaging.rs +++ b/pop-api-vnext/src/messaging.rs @@ -5,9 +5,9 @@ use ink::{ prelude::vec::Vec, primitives::AccountId, scale::{Compact, Encode}, - U256, + SolBytes, U256, }; -use sol::{Sol, SolDecode, SolEncode}; +use sol::Sol; pub use v0::*; use super::*; @@ -20,7 +20,8 @@ pub mod xcm; /// The first version of the Messaging API. pub mod v0; -pub type Bytes = Vec; +pub type Bytes = SolBytes>; +pub type FixedBytes = SolBytes<[u8; N]>; pub type MessageId = u64; // todo: docs diff --git a/pop-api-vnext/src/messaging/ismp.rs b/pop-api-vnext/src/messaging/ismp.rs index 81c2b5029..bcd481020 100644 --- a/pop-api-vnext/src/messaging/ismp.rs +++ b/pop-api-vnext/src/messaging/ismp.rs @@ -1,9 +1,6 @@ pub use v0::*; -use super::{ - contract_ref, fixed_address, Bytes, MessageId, MessageStatus, Pop, Sol, SolDecode, SolEncode, - Vec, U256, -}; +use super::{contract_ref, fixed_address, Bytes, MessageId, MessageStatus, Pop, Sol, Vec, U256}; /// The first version of the ISMP API. pub mod v0; diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index 8033e2fa7..11f13a153 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -1,4 +1,5 @@ pub use errors::{Error, Error::*}; +use ink::{Address, SolBytes}; use super::{super::v0::Callback, *}; @@ -6,6 +7,8 @@ mod errors; // Precompile index within the runtime const PRECOMPILE: u16 = 4; +/// The address of the ISMP precompile. +pub const PRECOMPILE_ADDRESS: Address = fixed_address(PRECOMPILE); /// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State /// Machine Protocol. @@ -22,40 +25,35 @@ pub trait Ismp { #[ink(message)] fn get(&self, request: Get, fee: U256) -> Result; - /// Submit a new ISMP `Get` request. + /// Submit a new ISMP `Post` request. + /// + /// Sends a `Post` message through ISMP with arbitrary data. /// /// # Parameters - /// - `request` - The ISMP `Get` message containing query details. + /// - `request` - The ISMP `Post` message containing the payload. /// - `fee` - The fee to be paid to relayers. - /// - `callback` - The callback to execute upon receiving a response. /// /// # Returns /// A unique message identifier. - #[ink(message, selector = 0x39f75435)] - fn get_with_callback( - &self, - request: Get, - fee: U256, - callback: Callback, - ) -> Result; + #[ink(message)] + fn post(&self, request: Post, fee: U256) -> Result; +} - /// Returns the response to a message. - /// - /// A non-existent message identifier will return an empty response, which could also be a valid - /// response depending on the source message. +/// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State +/// Machine Protocol. +#[ink::trait_definition] +pub trait IsmpCallback { + /// Submit a new ISMP `Get` request. /// /// # Parameters - /// - `message` - The message identifier. - #[ink(message, selector = 0xada86798)] - fn get_response(&self, message: MessageId) -> Bytes; - - /// Polls the status of a message. + /// - `request` - The ISMP `Get` message containing query details. + /// - `fee` - The fee to be paid to relayers. + /// - `callback` - The callback to execute upon receiving a response. /// - /// # Parameters - /// - `message` - The message identifier to poll. + /// # Returns + /// A unique message identifier. #[ink(message)] - #[allow(non_snake_case)] - fn pollStatus(&self, message: MessageId) -> MessageStatus; + fn get(&self, request: Get, fee: U256, callback: Callback) -> Result; /// Submit a new ISMP `Post` request. /// @@ -64,30 +62,38 @@ pub trait Ismp { /// # Parameters /// - `request` - The ISMP `Post` message containing the payload. /// - `fee` - The fee to be paid to relayers. + /// - `callback` - The callback to execute upon receiving a response. /// /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&self, request: Post, fee: U256) -> Result; + fn post(&self, request: Post, fee: U256, callback: Callback) -> Result; +} - /// Submit a new ISMP `Post` request. +/// The messaging interface of the ISMP precompile offers a general interface for cross-chain +/// messaging operations. +/// +/// This convenience trait simply provides access to general cross-chain messaging operations via +/// the ISMP precompile, so that users need only use a single precompile if desired. +#[ink::trait_definition] +pub trait Messaging { + /// Returns the response to a message. /// - /// Sends a `Post` message through ISMP with arbitrary data. + /// A non-existent message identifier will return an empty response, which could also be a valid + /// response depending on the source message. /// /// # Parameters - /// - `request` - The ISMP `Post` message containing the payload. - /// - `fee` - The fee to be paid to relayers. - /// - `callback` - The callback to execute upon receiving a response. + /// - `message` - The message identifier. + #[ink(message, selector = 0xada86798)] + fn get_response(&self, message: MessageId) -> Bytes; + + /// Polls the status of a message. /// - /// # Returns - /// A unique message identifier. - #[ink(message, selector = 0xeb0f21f1)] - fn post_with_callback( - &self, - request: Post, - fee: U256, - callback: Callback, - ) -> Result; + /// # Parameters + /// - `message` - The message identifier to poll. + #[ink(message)] + #[allow(non_snake_case)] + fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -119,11 +125,15 @@ pub trait Ismp { /// A unique message identifier. #[inline] pub fn get(request: Get, fee: U256, callback: Option) -> Result { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); match callback { - None => precompile.get(request, fee), - Some(callback) => precompile.get_with_callback(request, fee, callback), + None => { + let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.get(request, fee) + }, + Some(callback) => { + let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.get(request, fee, callback) + }, } } @@ -136,8 +146,7 @@ pub fn get(request: Get, fee: U256, callback: Option) -> Result Bytes { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.get_response(message) } @@ -147,8 +156,7 @@ pub fn get_response(message: MessageId) -> Bytes { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -165,11 +173,15 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// A unique message identifier. #[inline] pub fn post(request: Post, fee: U256, callback: Option) -> Result { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); match callback { - None => precompile.post(request, fee), - Some(callback) => precompile.post_with_callback(request, fee, callback), + None => { + let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.post(request, fee) + }, + Some(callback) => { + let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.post(request, fee, callback) + }, } } @@ -181,8 +193,7 @@ pub fn post(request: Post, fee: U256, callback: Option) -> Result Result<(), Error> { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -194,13 +205,13 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Ismp, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove_many(messages) } /// A GET request, intended to be used for sending outgoing requests #[ink::scale_derive(Encode, Decode, TypeInfo)] +#[derive(ink::SolDecode, ink::SolEncode)] pub struct Get { /// The destination state machine of this request. pub destination: u32, @@ -209,9 +220,9 @@ pub struct Get { /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Some application-specific metadata relating to this request. - pub context: Vec, + pub context: Bytes, /// Raw Storage keys that would be used to fetch the values from the counterparty. - pub keys: Vec>, + pub keys: Vec, } impl Get { @@ -223,33 +234,19 @@ impl Get { context: Vec, keys: Vec>, ) -> Self { - Self { destination, height, timeout, context, keys } - } -} - -impl SolDecode for Get { - type SolType = (u32, u64, u64, Vec, Vec>); - - fn from_sol_type(value: Self::SolType) -> Self { Self { - destination: value.0, - height: value.1, - timeout: value.2, - context: value.3, - keys: value.4, + destination, + height, + timeout, + context: SolBytes(context), + keys: keys.into_iter().map(SolBytes).collect(), } } } -impl<'a> SolEncode<'a> for Get { - type SolType = (&'a u32, &'a u64, &'a u64, &'a Vec, &'a Vec>); - - fn to_sol_type(&'a self) -> Self::SolType { - (&self.destination, &self.height, &self.timeout, &self.context, &self.keys) - } -} /// A POST request, intended to be used for sending outgoing requests. #[ink::scale_derive(Encode, Decode, TypeInfo)] +#[derive(ink::SolDecode, ink::SolEncode)] pub struct Post { /// The destination state machine of this request. pub destination: u32, @@ -266,66 +263,58 @@ impl Post { } } -impl SolDecode for Post { - type SolType = (u32, u64, Vec); - - fn from_sol_type(value: Self::SolType) -> Self { - Self { destination: value.0, timeout: value.1, data: value.2 } - } -} -impl<'a> SolEncode<'a> for Post { - type SolType = (&'a u32, &'a u64, &'a Vec); - - fn to_sol_type(&'a self) -> Self::SolType { - (&self.destination, &self.timeout, &self.data) - } -} - /// A verified storage value. #[ink::scale_derive(Encode, Decode, TypeInfo)] -#[derive(Debug)] +#[derive(Debug, ink::SolDecode, ink::SolEncode)] pub struct StorageValue { /// The request storage key. - pub key: Vec, + pub key: Bytes, /// The verified value. - pub value: Option>, -} - -impl SolDecode for StorageValue { - type SolType = (Vec, (bool, Vec)); - - fn from_sol_type(value: Self::SolType) -> Self { - let key = value.0; - let value = match value.1 .0 { - true => Some(value.1 .1), - false => None, - }; - Self { key, value } - } -} -impl<'a> SolEncode<'a> for StorageValue { - type SolType = (&'a Vec, bool, &'a [u8]); - - fn to_sol_type(&'a self) -> Self::SolType { - const EMPTY: [u8; 0] = []; - ( - &self.key, - self.value.is_some(), - &self.value.as_ref().map_or(EMPTY.as_slice(), |v| v.as_slice()), - ) - } + pub value: Option, } +/// A callback for handling responses to ISMP `Get` requests. #[ink::trait_definition] pub trait OnGetResponse { - // pop-api::messaging::ismp::OnGetResponse::on_response - #[ink(message, selector = 0x57ad942b)] - fn on_response(&mut self, id: MessageId, values: Vec); + /// Handles a response to an ISMP `Get` request. + /// + /// # Parameters + /// - `id` - The identifier of the originating message. + /// - `response` - The values derived from the state proof. + #[ink(message)] + #[allow(non_snake_case)] + fn onResponse(&mut self, id: MessageId, response: Vec); } +/// A callback for handling responses to ISMP `Post` requests. #[ink::trait_definition] pub trait OnPostResponse { - // pop-api::messaging::ismp::OnPostResponse::on_response - #[ink(message, selector = 0xcfb0a1d2)] - fn on_response(&mut self, id: MessageId, response: Vec); + /// Handles a response to an ISMP `Post` request. + /// + /// # Parameters + /// - `id` - The identifier of the originating message. + /// - `response` - The response message. + #[ink(message)] + #[allow(non_snake_case)] + fn onResponse(&mut self, id: MessageId, response: Bytes); +} + +/// Event emitted when a ISMP `Get` request is completed. +#[ink::event] +pub struct IsmpGetCompleted { + /// The identifier of the originating message. + #[ink(topic)] + pub id: MessageId, + /// The values derived from the state proof. + pub response: Vec, +} + +/// Event emitted when a ISMP `Post` request is completed. +#[ink::event] +pub struct IsmpPostCompleted { + /// The identifier of the originating message. + #[ink(topic)] + pub id: MessageId, + /// The response message. + pub response: Bytes, } diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index 339d1cdb2..bb3fb57d6 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -6,6 +6,8 @@ mod errors; // Precompile index within the runtime const PRECOMPILE: u16 = 3; +/// The address of the messaging precompile. +pub const PRECOMPILE_ADDRESS: Address = fixed_address(PRECOMPILE); /// The messaging precompile offers a general interface for cross-chain messaging operations. #[ink::trait_definition] @@ -50,13 +52,14 @@ pub trait Messaging { /// A message callback. #[ink::scale_derive(Decode, Encode, TypeInfo)] +#[derive(ink::SolDecode, ink::SolEncode)] pub struct Callback { /// The contract address to which the callback should be sent. destination: Address, /// The encoding used for the data going to the contract. encoding: Encoding, /// The message selector to be used for the callback. - selector: [u8; 4], + selector: FixedBytes<4>, /// The pre-paid weight used as a gas limit for the callback. weight: Weight, } @@ -70,37 +73,12 @@ impl Callback { /// - `selector` - The message selector to be used for the callback. /// - `weight` - The pre-paid weight used as a gas limit for the callback. pub fn new(destination: Address, encoding: Encoding, selector: u32, weight: Weight) -> Self { - Self { destination, encoding, selector: selector.to_be_bytes(), weight } - } -} - -impl SolDecode for Callback { - type SolType = ([u8; 20], u8, [u8; 4], (u64, u64)); - - fn from_sol_type(value: Self::SolType) -> Self { - Self { - destination: value.0.into(), - encoding: Encoding::from_sol_type(value.1), - selector: value.2, - weight: Weight::from_sol_type(value.3), - } - } -} -impl<'a> SolEncode<'a> for Callback { - type SolType = (&'a [u8; 20], u8, &'a [u8; 4], (u64, u64)); - - fn to_sol_type(&'a self) -> Self::SolType { - ( - &self.destination.0, - self.encoding as u8, - &self.selector, - (self.weight.ref_time(), self.weight.proof_size()), - ) + Self { destination, encoding, selector: SolBytes(selector.to_be_bytes()), weight } } } /// The specificiation of how data must be encoded before being sent to a contract. -#[derive(Copy, Clone)] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] #[repr(u8)] pub enum Encoding { @@ -110,27 +88,8 @@ pub enum Encoding { SolidityAbi, } -impl SolDecode for Encoding { - type SolType = u8; - - fn from_sol_type(value: Self::SolType) -> Self { - match value { - 0 => Self::Scale, - 1 => Self::SolidityAbi, - _ => unimplemented!(), - } - } -} -impl<'a> SolEncode<'a> for Encoding { - type SolType = u8; - - fn to_sol_type(&'a self) -> Self::SolType { - *self as u8 - } -} - /// The status of a message. -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, ink::SolDecode, ink::SolEncode, PartialEq)] #[ink::scale_derive(Decode, Encode, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug))] #[repr(u8)] @@ -141,27 +100,6 @@ pub enum MessageStatus { Timeout = 3, } -impl SolDecode for MessageStatus { - type SolType = u8; - - fn from_sol_type(value: Self::SolType) -> Self { - match value { - 0 => Self::NotFound, - 1 => Self::Pending, - 2 => Self::Complete, - 3 => Self::Timeout, - _ => unimplemented!(), - } - } -} -impl<'a> SolEncode<'a> for MessageStatus { - type SolType = u8; - - fn to_sol_type(&'a self) -> Self::SolType { - *self as u8 - } -} - /// One or more messages have been removed for the account. #[ink::event] #[cfg_attr(feature = "std", derive(Debug))] @@ -183,8 +121,7 @@ pub struct Removed { /// - `message` - The message identifier. #[inline] pub fn get_response(message: MessageId) -> Bytes { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -194,8 +131,7 @@ pub fn get_response(message: MessageId) -> Bytes { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -207,8 +143,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) -> Result<(), Error> { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -220,7 +155,6 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Messaging, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove_many(messages) } diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index bf6d31c5c..f52019721 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -1,5 +1,6 @@ pub use errors::{Error, Error::*}; pub use ink::xcm::prelude::{VersionedLocation, VersionedResponse, VersionedXcm}; +use ink::{Address, SolBytes}; use super::{super::v0::Callback, *}; @@ -9,6 +10,8 @@ pub type QueryId = u64; // Precompile index within the runtime const PRECOMPILE: u16 = 5; +/// The address of the XCM precompile. +pub const PRECOMPILE_ADDRESS: Address = fixed_address(PRECOMPILE); /// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus /// Messaging (XCM). @@ -25,17 +28,6 @@ pub trait Xcm { #[ink(message)] fn execute(&self, message: Bytes, weight: Weight) -> Bytes; - /// Returns the response to a message. - /// - /// A non-existent message identifier will return an empty response, which could also be a valid - /// response depending on the source message. - /// - /// # Parameters - /// - `message` - The message identifier. - #[ink(message)] - #[allow(non_snake_case)] - fn getResponse(&self, message: MessageId) -> Bytes; - /// Initiate a new XCM query. /// /// Starts a query using the XCM interface, specifying a responder and timeout block. @@ -68,6 +60,36 @@ pub trait Xcm { callback: Callback, ) -> (MessageId, QueryId); + /// Send an XCM from a given origin. + /// + /// # Parameters + /// - `destination` - The SCALE-encoded versioned location for the destination of the message. + /// - `message` - A SCALE-encoded versioned XCM message. + /// + /// # Returns + /// A SCALE-encoded dispatch result. + #[ink(message)] + fn send(&self, destination: Bytes, message: Bytes) -> Bytes; +} + +/// The messaging interface of the XCM precompile offers a general interface for cross-chain +/// messaging operations. +/// +/// This convenience trait simply provides access to general cross-chain messaging operations via +/// the XCM precompile, so that users need only use a single precompile if desired. +#[ink::trait_definition] +pub trait Messaging { + /// Returns the response to a message. + /// + /// A non-existent message identifier will return an empty response, which could also be a valid + /// response depending on the source message. + /// + /// # Parameters + /// - `message` - The message identifier. + #[ink(message)] + #[allow(non_snake_case)] + fn getResponse(&self, message: MessageId) -> Bytes; + /// Polls the status of a message. /// /// # Parameters @@ -93,17 +115,6 @@ pub trait Xcm { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message, selector = 0xcdd80f3b)] fn remove_many(&self, messages: Vec); - - /// Send an XCM from a given origin. - /// - /// # Parameters - /// - `destination` - The SCALE-encoded versioned location for the destination of the message. - /// - `message` - A SCALE-encoded versioned XCM message. - /// - /// # Returns - /// A SCALE-encoded dispatch result. - #[ink(message)] - fn send(&self, destination: Bytes, message: Bytes) -> Bytes; } /// Execute an XCM message from a local, signed, origin. @@ -116,9 +127,8 @@ pub trait Xcm { /// A SCALE-encoded dispatch result. #[inline] pub fn execute(message: VersionedXcm, weight: Weight) -> Bytes { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); - precompile.execute(message.encode(), weight) + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.execute(SolBytes(message.encode()), weight) } /// Returns the response to a message. @@ -130,8 +140,7 @@ pub fn execute(message: VersionedXcm, weight: Weight) -> Byt /// - `message` - The message identifier. #[inline] pub fn get_response(message: MessageId) -> Bytes { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -152,11 +161,11 @@ pub fn new_query( timeout: BlockNumber, callback: Option, ) -> (MessageId, QueryId) { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let responder = SolBytes(responder.encode()); match callback { - None => precompile.new_query(responder.encode(), timeout), - Some(callback) => precompile.new_query_with_callback(responder.encode(), timeout, callback), + None => precompile.new_query(responder, timeout), + Some(callback) => precompile.new_query_with_callback(responder, timeout, callback), } } @@ -166,8 +175,7 @@ pub fn new_query( /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -179,8 +187,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -192,8 +199,7 @@ pub fn remove(message: MessageId) { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove_many(messages) } @@ -207,14 +213,19 @@ pub fn remove_many(messages: Vec) { /// A SCALE-encoded dispatch result. #[inline] pub fn send(destination: VersionedLocation, message: VersionedXcm) -> Bytes { - let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Xcm, Pop, Sol) = address.into(); - precompile.send(destination.encode(), message.encode()) + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.send(SolBytes(destination.encode()), SolBytes(message.encode())) } +/// A callback for handling responses to XCM queries. #[ink::trait_definition] -pub trait OnResponse { - // pop-api::messaging::xcm::OnResponse::on_response - #[ink(message, selector = 0x641b0b03)] - fn on_response(&mut self, id: MessageId, response: Bytes); +pub trait OnQueryResponse { + /// Handles a response to a XCM query. + /// + /// # Parameters + /// - `id` - The identifier of the originating message. + /// - `response` - The response message. + #[ink(message)] + #[allow(non_snake_case)] + fn onResponse(&mut self, id: MessageId, response: Bytes); } diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index e89c56071..c15740f12 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolDecode, SolEncode}; +pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolBytes, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. From 938bb7d4b0882c1cf5b9fd2b2480069eaaf73907 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:25:04 +0100 Subject: [PATCH 222/284] feat(devnet): add messaging precompiles --- runtime/devnet/src/config/contracts.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runtime/devnet/src/config/contracts.rs b/runtime/devnet/src/config/contracts.rs index e72dd2216..8e7b3e831 100644 --- a/runtime/devnet/src/config/contracts.rs +++ b/runtime/devnet/src/config/contracts.rs @@ -17,6 +17,11 @@ type Erc20 = pallet_api_vnext::fungibles::precompiles::erc20::v0::Erc20; type Fungibles = pallet_api_vnext::fungibles::precompiles::v0::Fungibles; +type Ismp = + pallet_api_vnext::messaging::precompiles::ismp::v0::Ismp; +type Messaging = + pallet_api_vnext::messaging::precompiles::v0::Messaging; +type Xcm = pallet_api_vnext::messaging::precompiles::xcm::v0::Xcm; fn schedule() -> pallet_contracts::Schedule { pallet_contracts::Schedule { @@ -112,6 +117,12 @@ impl pallet_revive::Config for Runtime { Fungibles<1, TrustBackedAssetsInstance>, // 2: `Erc20` precompile v0 using `TrustBackedAssetsInstance` instances Erc20<2, TrustBackedAssetsInstance>, + // 3: `Messaging` precompile v0 + Messaging<3>, + // 4: `Ismp` precompile v0 + Ismp<4>, + // 5: `Xcm` precompile v0 + Xcm<5>, ); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; From e84e6dc684c385251821bd2ed8c672603beb8e65 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:28:33 +0100 Subject: [PATCH 223/284] test(api): add initial messaging integration tests --- pop-api-vnext/Cargo.toml | 2 +- pop-api-vnext/integration-tests/Cargo.toml | 8 +- .../contracts/messaging/Cargo.lock | 6040 +++++++++++++++++ .../contracts/messaging/Cargo.toml | 29 + .../contracts/messaging/lib.rs | 140 + pop-api-vnext/integration-tests/src/lib.rs | 4 +- .../integration-tests/src/messaging.rs | 303 + runtime/devnet/src/config/mod.rs | 3 +- 8 files changed, 6524 insertions(+), 5 deletions(-) create mode 100644 pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock create mode 100644 pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml create mode 100644 pop-api-vnext/integration-tests/contracts/messaging/lib.rs create mode 100644 pop-api-vnext/integration-tests/src/messaging.rs diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index c09fdf8b1..0ef1e2b18 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index df6e98d7c..0b595865e 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -16,12 +16,14 @@ env_logger.workspace = true frame-support = { workspace = true, default-features = false } frame-system = { workspace = true, default-features = false } hex.workspace = true +ismp.workspace = true log.workspace = true -pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles" ] } +pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles", "messaging" ] } pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } +pallet-ismp = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } -pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } +pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles", "messaging" ] } pop-primitives = { workspace = true, default-features = false } pop-runtime-devnet.workspace = true pop-runtime-testnet.workspace = true @@ -35,9 +37,11 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", + "ismp/std", "pallet-api-vnext/std", "pallet-assets/std", "pallet-balances/std", + "pallet-ismp/std", "pallet-revive/std", "pop-api/std", "pop-primitives/std", diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock new file mode 100644 index 000000000..a26b241f5 --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock @@ -0,0 +1,6040 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy-core" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d47400608fc869727ad81dba058d55f97b29ad8b5c5256d9598523df8f356ab6" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8a436f0aad7df8bb47f144095fba61202265d9f5f09a70b0e3227881a668e" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-json-abi" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459f98c6843f208856f338bfb25e65325467f7aff35dfeb0484d0a76e059134b" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-primitives" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cfebde8c581a5d37b678d0a48a32decb51efd7a63a08ce2517ddec26db705c8" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.9.2", + "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", + "bytes", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedac07a10d4c2027817a43cc1f038313fc53c7ac866f7363239971fd01f9f18" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24f9a598f010f048d8b8226492b6401104f5a5c1273c2869b72af29b48bb4ba9" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f494adf9d60e49aa6ce26dfd42c7417aa6d4343cf2ae621f20e4d92a5ad07d85" +dependencies = [ + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52db32fbd35a9c0c0e538b58b81ebbae08a51be029e7ad60e08b60481c2ec6c3" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a285b46e3e0c177887028278f04cc8262b76fd3b8e0e20e93cea0a58c35f5ac5" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1786b2e3832f6f0f7c8d62d5d5a282f6952a1ab99981c54cd52b6ac1d8f02df5" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c1c928edb9d8ff24cb5dcb7651d3a98494fff3099eee95c2404cd813a9139f" +dependencies = [ + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + +[[package]] +name = "ark-vrf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9501da18569b2afe0eb934fb7afd5a247d238b94116155af4dd068f319adfe6d" +dependencies = [ + "ark-bls12-381 0.5.0", + "ark-ec 0.5.0", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "digest 0.10.7", + "rand_chacha 0.3.1", + "sha2 0.10.9", + "w3f-ring-proof", + "zeroize", +] + +[[package]] +name = "array-bytes" +version = "6.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[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.104", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "binary-merkle-tree" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", +] + +[[package]] +name = "bip32" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69" +dependencies = [ + "bs58", + "hmac", + "k256", + "rand_core 0.6.4", + "ripemd", + "secp256k1 0.27.0", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "bip39" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d193de1f7487df1914d3a568b772458861d33f9c54249612cc2893d6915054" +dependencies = [ + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative 0.1.2", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative 0.2.1", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bounded-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee8eddd066a8825ec5570528e6880471210fd5d88cb6abbe1cfdd51ca249c33" +dependencies = [ + "jam-codec", + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.9", + "tinyvec", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "bytemuck" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "camino" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.26", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "const_env" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9e4f72c6e3398ca6da372abd9affd8f89781fe728869bbf986206e9af9627e" +dependencies = [ + "const_env_impl", +] + +[[package]] +name = "const_env_impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f51209740b5e1589e702b3044cdd4562cef41b6da404904192ffffb852d62" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.104", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive-where" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "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]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.104", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "docify" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a772b62b1837c8f060432ddcc10b17aae1453ef17617a99bc07789252d2a5896" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e6be249b0a462a14784a99b19bf35a667bb5e09de611738bb7362fa4c95ff7" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.104", + "termcolor", + "toml", + "walkdir", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[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", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-standards" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", +] + +[[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", + "primitive-types 0.13.1", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "expander" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" +dependencies = [ + "blake2", + "file-guard", + "fs-err", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "frame-benchmarking" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-storage", + "static_assertions", +] + +[[package]] +name = "frame-decode" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" +dependencies = [ + "frame-metadata 21.0.0", + "parity-scale-codec", + "scale-decode", + "scale-info", + "scale-type-resolver", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "frame-metadata" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26de808fa6461f2485dc51811aefed108850064994fb4a62b3ac21ffa62ac8df" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dfd1d7eae1d94e32e869e2fb272d81f52dd8db57820a373adb83ea24d7d862" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-support" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "aquamarine", + "array-bytes", + "binary-merkle-tree", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 23.0.0", + "frame-support-procedural", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-weights", + "tt-call", +] + +[[package]] +name = "frame-support-procedural" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "docify", + "expander", + "frame-support-procedural-tools", + "itertools 0.11.0", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "frame-system" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "cfg-if", + "docify", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-version", + "sp-weights", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand 0.8.5", + "rand_core 0.6.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hex-literal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +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 = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d40b9d5e17727407e55028eafc22b2dc68781786e6d7eb8a21103f5058e3a14" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-num-traits" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" +dependencies = [ + "integer-sqrt", + "num-traits", + "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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "ink" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "const_format", + "deranged", + "derive_more 2.0.1", + "ink_env", + "ink_macro", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage", + "keccak-const", + "linkme", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive", + "scale-info", + "sp-io", + "sp-runtime-interface", + "staging-xcm", +] + +[[package]] +name = "ink_allocator" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_codegen" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "either", + "heck", + "impl-serde", + "ink_ir", + "ink_primitives", + "itertools 0.14.0", + "parity-scale-codec", + "polkavm-derive", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.104", +] + +[[package]] +name = "ink_engine" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "blake2", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_primitives", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", +] + +[[package]] +name = "ink_env" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "blake2", + "cfg-if", + "const_env", + "derive_more 2.0.1", + "hex-literal 1.0.0", + "ink_allocator", + "ink_engine", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "polkavm-derive", + "scale-decode", + "scale-encode", + "scale-info", + "schnorrkel", + "secp256k1 0.30.0", + "sha2 0.10.9", + "sha3", + "sp-io", + "sp-runtime-interface", + "staging-xcm", + "static_assertions", +] + +[[package]] +name = "ink_ir" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "blake2", + "either", + "impl-serde", + "ink_prelude", + "itertools 0.14.0", + "proc-macro2", + "quote", + "sha3", + "syn 2.0.104", +] + +[[package]] +name = "ink_macro" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "ink_codegen", + "ink_ir", + "ink_primitives", + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "ink_metadata" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "derive_more 2.0.1", + "impl-serde", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", +] + +[[package]] +name = "ink_prelude" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_primitives" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "alloy-sol-types", + "cfg-if", + "derive_more 2.0.1", + "impl-trait-for-tuples", + "ink_prelude", + "itertools 0.14.0", + "num-traits", + "pallet-revive", + "pallet-revive-uapi", + "parity-scale-codec", + "paste", + "primitive-types 0.13.1", + "scale-decode", + "scale-encode", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime-interface", + "sp-weights", + "xxhash-rust", +] + +[[package]] +name = "ink_storage" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "array-init", + "cfg-if", + "derive_more 2.0.1", + "ink_env", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "pallet-revive-uapi", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ink_storage_traits" +version = "6.0.0-alpha.1" +source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +dependencies = [ + "ink_metadata", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime-interface", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jam-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d72f2fb8cfd27f6c52ea7d0528df594f7f2ed006feac153e9393ec567aafea98" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "jam-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "jam-codec-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09985146f40378e13af626964ac9c206d9d9b67c40c70805898d9954f709bcf5" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.9", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +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-const" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" + +[[package]] +name = "keccak-hash" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" +dependencies = [ + "primitive-types 0.13.1", + "tiny-keccak", +] + +[[package]] +name = "konst" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" +dependencies = [ + "bitflags 2.9.1", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linkme" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1b1703c00b2a6a70738920544aa51652532cacddfec2e162d2e29eae01e665c" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "linregress" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eda9dcf4f2a99787827661f312ac3219292549c2ee992bf9a6248ffb066bf7" +dependencies = [ + "nalgebra", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[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.104", +] + +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memory-db" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +dependencies = [ + "hash-db", + "hashbrown 0.15.4", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "messaging" +version = "0.1.0" +dependencies = [ + "ink", + "pop-api", + "scale-info", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "nalgebra" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" +dependencies = [ + "approx", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-revive" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "alloy-core", + "derive_more 0.99.20", + "environmental", + "ethereum-standards", + "ethereum-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal 0.4.1", + "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", + "polkavm-common", + "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", + "substrate-bn", + "subxt-signer", +] + +[[package]] +name = "pallet-revive-fixtures" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "anyhow", + "cargo_metadata", + "pallet-revive-uapi", + "polkavm-linker", + "sp-core", + "sp-io", + "toml", +] + +[[package]] +name = "pallet-revive-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "pallet-revive-uapi" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bitflags 1.3.2", + "pallet-revive-proc-macro", + "parity-scale-codec", + "polkavm-derive", + "scale-info", +] + +[[package]] +name = "pallet-transaction-payment" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "bytes", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", +] + +[[package]] +name = "pest" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "polkavm" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa028f713d0613f0f08b8b3367402cb859218854f6b96fcbe39a501862894d6f" +dependencies = [ + "libc", + "log", + "polkavm-assembler", + "polkavm-common", + "polkavm-linux-raw", +] + +[[package]] +name = "polkavm-assembler" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4859a29e1f4ad64610c4bc2bfc40bb9a535068a034933a5b56b5e7a0febf105a" +dependencies = [ + "log", +] + +[[package]] +name = "polkavm-common" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a5794b695626ba70d29e66e3f4f4835767452a6723f3a0bc20884b07088fe8" +dependencies = [ + "blake3", + "log", + "polkavm-assembler", +] + +[[package]] +name = "polkavm-derive" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95282a203ae1f6828a04ff334145c3f6dc718bba6d3959805d273358b45eab93" +dependencies = [ + "polkavm-derive-impl-macro", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6069dc7995cde6e612b868a02ce48b54397c6d2582bd1b97b63aabbe962cd779" +dependencies = [ + "polkavm-common", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581d34cafec741dc5ffafbb341933c205b6457f3d76257a9d99fb56687219c91" +dependencies = [ + "polkavm-derive-impl", + "syn 2.0.104", +] + +[[package]] +name = "polkavm-linker" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb896023e5bd89bba40311797d8d42490fa4a1fd5256c74820753c5722d1e67" +dependencies = [ + "dirs", + "gimli", + "hashbrown 0.14.5", + "log", + "object", + "polkavm-common", + "regalloc2", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linux-raw" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28919f542476f4158cc71e6c072b1051f38f4b514253594ac3ad80e3c0211fc8" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "pop-api" +version = "0.1.0" +dependencies = [ + "base64", + "ink", + "pop-primitives", +] + +[[package]] +name = "pop-primitives" +version = "0.0.0" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +dependencies = [ + "proc-macro2", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +dependencies = [ + "fixed-hash", + "impl-codec 0.7.1", + "impl-num-traits", + "impl-rlp", + "impl-serde", + "scale-info", + "uint 0.10.0", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro-warning" +version = "1.84.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75eea531cfcd120e0851a3f8aed42c4841f78c889eefafd96339c72677ae42c3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror 1.0.69", +] + +[[package]] +name = "proptest" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.9.1", + "lazy_static", + "num-traits", + "rand 0.9.2", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash 1.1.0", + "slice-group-by", + "smallvec", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[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 = "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.2", + "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.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-hex" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "rustversion" +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 = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-bits" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" +dependencies = [ + "parity-scale-codec", + "scale-info", + "scale-type-resolver", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" +dependencies = [ + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits", + "scale-decode-derive", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-decode-derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-encode" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" +dependencies = [ + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits", + "scale-encode-derive", + "scale-type-resolver", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "scale-encode-derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more 1.0.0", + "parity-scale-codec", + "scale-info-derive", + "schemars", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" +dependencies = [ + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-value" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca8b26b451ecb7fd7b62b259fa28add63d12ec49bbcac0e01fcb4b5ae0c09aa" +dependencies = [ + "either", + "parity-scale-codec", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-type-resolver", + "thiserror 2.0.12", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.104", +] + +[[package]] +name = "schnellru" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "schnorrkel" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9fcb6c2e176e86ec703e22560d99d65a5ee9056ae45a08e13e84ebf796296f" +dependencies = [ + "aead", + "arrayref", + "arrayvec", + "curve25519-dalek", + "getrandom_or_panic", + "merlin", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "password-hash", + "pbkdf2", + "salsa20", + "sha2 0.10.9", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.2", +] + +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "secp256k1-sys 0.9.2", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes 0.14.0", + "rand 0.8.5", + "secp256k1-sys 0.10.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "secrecy" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_json" +version = "1.0.141" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simba" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simple-mermaid" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp-api" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", + "sp-metadata-ir", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-trie", + "sp-version", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-api-proc-macro" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "blake2", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-application-crypto" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", +] + +[[package]] +name = "sp-arithmetic" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "docify", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "static_assertions", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-timestamp", +] + +[[package]] +name = "sp-core" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "ark-vrf", + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clone", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types 0.13.1", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1 0.28.2", + "secrecy 0.8.0", + "serde", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror 1.0.69", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.9", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "quote", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "syn 2.0.104", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde_json", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "sp-inherents" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-io" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive", + "rustversion", + "secp256k1 0.28.2", + "sp-core", + "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-tracing", + "sp-trie", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "parking_lot", + "sp-core", + "sp-externalities", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "frame-metadata 23.0.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "backtrace", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "binary-merkle-tree", + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-trie", + "sp-weights", + "tracing", + "tuplex", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive", + "primitive-types 0.13.1", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-staking" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sp-state-machine" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", + "thiserror 1.0.69", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", +] + +[[package]] +name = "sp-timestamp" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "regex", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-trie" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "ahash", + "hash-db", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core", + "sp-externalities", + "substrate-prometheus-endpoint", + "thiserror 1.0.69", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", + "thiserror 1.0.69", +] + +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "parity-scale-codec", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + +[[package]] +name = "sp-weights" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-debug-derive", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-xcm" +version = "7.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "array-bytes", + "bounded-collections", + "derive-where", + "environmental", + "frame-support", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-weights", + "xcm-procedural", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "substrate-bip39" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "hmac", + "pbkdf2", + "schnorrkel", + "sha2 0.10.9", + "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-prometheus-endpoint" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "http-body-util", + "hyper", + "hyper-util", + "log", + "prometheus", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subxt-core" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66ef00be9d64885ec94e478a58e4e39d222024b20013ae7df4fc6ece545391aa" +dependencies = [ + "base58", + "blake2", + "derive-where", + "frame-decode", + "frame-metadata 20.0.0", + "hashbrown 0.14.5", + "hex", + "impl-serde", + "keccak-hash", + "parity-scale-codec", + "primitive-types 0.13.1", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subxt-metadata", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "subxt-metadata" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff4591673600c4388e21305788282414d26c791b4dee21b7cb0b19c10076f98" +dependencies = [ + "frame-decode", + "frame-metadata 20.0.0", + "hashbrown 0.14.5", + "parity-scale-codec", + "scale-info", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 2.0.12", +] + +[[package]] +name = "subxt-signer" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a2370298a210ed1df26152db7209a85e0ed8cfbce035309c3b37f7b61755377" +dependencies = [ + "base64", + "bip32", + "bip39", + "cfg-if", + "crypto_secretbox", + "hex", + "hmac", + "keccak-hash", + "parity-scale-codec", + "pbkdf2", + "regex", + "schnorrkel", + "scrypt", + "secp256k1 0.30.0", + "secrecy 0.10.3", + "serde", + "serde_json", + "sha2 0.10.9", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subxt-core", + "thiserror 2.0.12", + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a985ff4ffd7373e10e0fb048110fb11a162e5a4c47f92ddb8787a6f766b769" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.46.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "slab", + "socket2", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trie-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c0670ab45a6b7002c7df369fee950a27cf29ae0474343fd3a15aa15f691e7a6" +dependencies = [ + "hash-db", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db", +] + +[[package]] +name = "tt-call" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" + +[[package]] +name = "tuplex" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "676ac81d5454c4dcf37955d34fa8626ede3490f744b86ca14a7b90168d2a08aa" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "w3f-bls" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6bfb937b3d12077654a9e43e32a4e9c20177dd9fea0f3aba673e7840bb54f32" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", + "arrayref", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.9", + "sha3", + "zeroize", +] + +[[package]] +name = "w3f-pcs" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbe7a8d5c914b69392ab3b267f679a2e546fe29afaddce47981772ac71bd02e1" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "merlin", +] + +[[package]] +name = "w3f-plonk-common" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca389e494fe08c5c108b512e2328309036ee1c0bc7bdfdb743fef54d448c8c" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "getrandom_or_panic", + "rand_core 0.6.4", + "w3f-pcs", +] + +[[package]] +name = "w3f-ring-proof" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a639379402ad51504575dbd258740383291ac8147d3b15859bdf1ea48c677de" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "ark-transcript", + "w3f-pcs", + "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 = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wide" +version = "0.7.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xcm-procedural" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml new file mode 100644 index 000000000..48d93f080 --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml @@ -0,0 +1,29 @@ +[package] +authors = [ "R0GUE " ] +edition = "2021" +name = "messaging" +version = "0.1.0" + +[package.metadata.ink-lang] +abi = "sol" + +[workspace] + +[dependencies] +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } + +[dev-dependencies] +scale-info = { version = "2" } + +[lib] +path = "lib.rs" + +[features] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] + +[lints.rust.unexpected_cfgs] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +level = "warn" diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs new file mode 100644 index 000000000..0696c49bb --- /dev/null +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -0,0 +1,140 @@ +#![cfg_attr(not(feature = "std"), no_std, no_main)] + +use ink::{abi::Sol, contract_ref, prelude::vec::Vec, U256}; +use pop_api::{ + messaging::{self as api, ismp::*, xcm::*, Error, *}, + Pop, +}; + +#[ink::contract] +pub mod messaging { + use pop_api::messaging::ismp::Ismp; + + use super::*; + + #[ink(storage)] + pub struct Messaging; + + impl Messaging { + #[ink(constructor, default, payable)] + #[allow(clippy::new_without_default)] + pub fn new() -> Self { + Self {} + } + } + + impl api::Messaging for Messaging { + #[ink(message)] + fn getResponse(&self, message: MessageId) -> Bytes { + api::get_response(message) + } + + #[ink(message)] + fn pollStatus(&self, message: MessageId) -> MessageStatus { + api::poll_status(message) + } + + #[ink(message)] + fn remove(&self, message: MessageId) -> Result<(), Error> { + api::remove(message) + } + + #[ink(message, selector = 0xcdd80f3b)] + fn remove_many(&self, messages: Vec) -> Result<(), Error> { + api::remove_many(messages) + } + } + + impl Ismp for Messaging { + #[ink(message)] + fn get(&self, request: Get, fee: U256) -> Result { + ismp::get(request, fee, None) + } + + #[ink(message)] + fn post(&self, request: Post, fee: U256) -> Result { + ismp::post(request, fee, None) + } + } + + impl IsmpCallback for Messaging { + #[ink(message)] + fn get( + &self, + request: Get, + fee: U256, + callback: Callback, + ) -> Result { + ismp::get(request, fee, Some(callback)) + } + + #[ink(message)] + fn post( + &self, + request: Post, + fee: U256, + callback: Callback, + ) -> Result { + ismp::post(request, fee, Some(callback)) + } + } + + impl api::ismp::OnGetResponse for Messaging { + #[ink(message)] + fn onResponse(&mut self, id: MessageId, response: Vec) { + self.env().emit_event(IsmpGetCompleted { id, response }); + } + } + + // impl api::ismp::OnPostResponse for Messaging { + // #[ink(message)] + // fn onResponse(&mut self, id: MessageId, response: Bytes) { + // self.env().emit_event(IsmpPostCompleted { id, response }); + // } + // } + + impl xcm::Xcm for Messaging { + #[ink(message)] + fn execute(&self, message: Bytes, weight: Weight) -> Bytes { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.execute(message, weight) + } + + #[ink(message, selector = 0x5a8db3bd)] + fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId) { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.new_query(responder, timeout) + } + + #[ink(message, selector = 0xc0ca060b)] + fn new_query_with_callback( + &self, + responder: Bytes, + timeout: BlockNumber, + callback: Callback, + ) -> (MessageId, QueryId) { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.new_query_with_callback(responder, timeout, callback) + } + + #[ink(message)] + fn send(&self, destination: Bytes, message: Bytes) -> Bytes { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.send(destination, message) + } + } + + // impl api::xcm::OnQueryResponse for Messaging { + // #[ink(message)] + // fn onResponse(&mut self, id: MessageId, response: Bytes) { + // self.env().emit_event(XcmCompleted { id, result: response }); + // } + // } + + #[ink::event] + pub struct XcmCompleted { + #[ink(topic)] + pub id: MessageId, + pub result: Bytes, + } +} diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index d6e6ac9e4..1d56ea08d 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -11,11 +11,13 @@ use pallet_revive::{ }; #[cfg(feature = "devnet")] use pop_runtime_devnet::{ - AccountId, Assets, Balance, Revive, Runtime, RuntimeOrigin, System, UNIT, + AccountId, Assets, Balance, Messaging, Revive, Runtime, RuntimeEvent, RuntimeOrigin, System, + UNIT, }; use sp_runtime::{BuildStorage, DispatchError}; mod fungibles; +mod messaging; const INIT_AMOUNT: Balance = 100_000_000 * UNIT; diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs new file mode 100644 index 000000000..c24f2dd9c --- /dev/null +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -0,0 +1,303 @@ +use codec::{Decode, Encode}; +use pallet_api_vnext::messaging::{ + precompiles::v0::IMessaging::{getResponseCall, pollStatusCall, remove_0Call, MessageStatus}, + Event::CallbackExecuted, + Message, MessageId, +}; +use pallet_revive::precompiles::alloy::sol_types::SolEvent; +use pop_api::{ + messaging::{Bytes, Error}, + sol::SolBytes, + SolErrorDecode, +}; +use sp_io::{ + hashing::{keccak_256, twox_256}, + TestExternalities, +}; + +use super::*; + +const ASSET_HUB: u32 = 1_000; +const CONTRACT: &str = "contracts/messaging/target/ink/messaging.polkavm"; +const HYPERBRIDGE: u32 = 4_009; + +mod ismp { + use ::ismp::{ + host::StateMachine, + router::{GetResponse, IsmpRouter, Request, Response, StorageValue}, + }; + use pallet_api_vnext::messaging::{ + precompiles::ismp::v0::{ + Callback, Encoding, Weight, + IISMP::{get_0Call, get_1Call, Get, GetDispatched_0, GetDispatched_1}, + }, + transports::ismp::ID as ISMP_MODULE_ID, + Event::IsmpGetResponseReceived, + }; + use pallet_ismp::offchain::Leaf; + use pop_api::messaging::ismp::{IsmpGetCompleted, PRECOMPILE_ADDRESS}; + #[cfg(feature = "devnet")] + use pop_runtime_devnet::config::ismp::Router; + use sp_runtime::offchain::OffchainOverlayedChange; + + use super::*; + + #[test] + fn get_works() { + let origin = ALICE; + let key = b"some_key".to_vec(); + let timeout = 100_000u64; + let height = 0u64; + let request = Get { + destination: ASSET_HUB, + height, + timeout, + context: b"some_context".to_vec().into(), + keys: vec![key.clone().into()].into(), + }; + let response = vec![StorageValue { key, value: Some(b"some_value".to_vec()) }]; + + // Create a get request. + let mut ext = ExtBuilder::new().build(); + let (contract, id, commitment) = ext.execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + let id = contract.get(request, U256::zero(), None).unwrap(); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let Some(Message::Ismp{ commitment, .. }) = Messaging::get(id) else { panic!() }; + let expected = GetDispatched_0 { origin: contract.address.0.into(), id, commitment: commitment.0.into() }.encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + assert!(System::events().iter().any(|e| { + matches!(e.event, + RuntimeEvent::Ismp(pallet_ismp::Event::Request { dest_chain, source_chain , ..}) + if dest_chain == StateMachine::Polkadot(ASSET_HUB) && source_chain == StateMachine::Polkadot(100) + )})); + + (contract, id, commitment) + }); + + // Look up the request within offchain state in order to provide a response. + let Request::Get(get) = get_ismp_request(&mut ext) else { panic!() }; + + // Provide a response. + ext.execute_with(|| { + let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); + module + .on_response(Response::Get(GetResponse { get, values: response.clone() })) + .unwrap(); + System::assert_has_event( + IsmpGetResponseReceived { dest: contract.address, id, commitment }.into(), + ); + + assert_eq!(contract.poll_status(id), MessageStatus::Complete); + assert_eq!(contract.get_response(id), SolBytes(response.encode())); + assert_ok!(contract.remove(id)); + }); + } + + #[test] + fn get_with_callback_works() { + let origin = ALICE; + let key = b"some_key".to_vec(); + let timeout = 100_000u64; + let height = 0u64; + let request = Get { + destination: ASSET_HUB, + height, + timeout, + context: b"some_context".to_vec().into(), + keys: vec![key.clone().into()].into(), + }; + let response = vec![StorageValue { key, value: Some(b"some_value".to_vec()) }]; + + // Create a get request with callback. + let mut ext = ExtBuilder::new().build(); + let (contract, id, commitment) = ext.execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + let callback = Callback { + destination: contract.address.0.into(), + encoding: Encoding::SolidityAbi, + selector: 0x7c3a1c0c.into(), + weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + }; + let id = contract.get(request, U256::zero(), Some(callback.clone())).unwrap(); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let Some(Message::Ismp { commitment, .. }) = Messaging::get(id) else { panic!() }; + let expected = GetDispatched_1 { + origin: contract.address.0.into(), + id, + commitment: commitment.0.into(), + callback, + } + .encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + assert!(System::events().iter().any(|e| { + matches!(e.event, + RuntimeEvent::Ismp(pallet_ismp::Event::Request { dest_chain, source_chain , ..}) + if dest_chain == StateMachine::Polkadot(ASSET_HUB) && source_chain == StateMachine::Polkadot(100) ) + })); + + (contract, id, commitment) + }); + + // Look up the request within offchain state in order to provide a response. + let Request::Get(get) = get_ismp_request(&mut ext) else { panic!() }; + + // Provide a response. + ext.execute_with(|| { + let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); + // let commitment = H256::from(keccak_256(&Request::Get(get.clone()).encode())); + module + .on_response(Response::Get(GetResponse { get, values: response.clone() })) + .unwrap(); + System::assert_has_event( + IsmpGetResponseReceived { dest: contract.address, id, commitment }.into(), + ); + + assert_eq!( + contract.last_event(), + IsmpGetCompleted { + id, + response: response + .into_iter() + .map(|v| pop_api::messaging::ismp::StorageValue { + key: SolBytes(v.key), + value: v.value.map(|v| SolBytes(v)) + }) + .collect() + } + .encode() + ); + assert_eq!(contract.poll_status(id), MessageStatus::NotFound); + assert!(System::events().iter().any(|e| { + matches!(&e.event, + RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) + if origin == &contract.account_id() && *message_id == id + ) + })); + }); + } + + impl Contract { + fn get( + &self, + request: Get, + fee: U256, + callback: Option, + ) -> Result { + let fee = alloy::U256::from_be_bytes(fee.to_big_endian()); + match callback { + None => { + let call = get_0Call { request, fee }; + self.call(&self.creator, call, 0) + }, + Some(callback) => { + let call = get_1Call { request, fee, callback }; + self.call(&self.creator, call, 0) + }, + } + } + } + + // Get the last ismp request. + fn get_ismp_request(ext: &mut TestExternalities) -> Request { + // Get commitment from last ismp request event. + let commitment = ext.execute_with(|| { + System::read_events_for_pallet::>() + .iter() + .filter_map(|e| match e { + pallet_ismp::Event::::Request { commitment, .. } => + Some(commitment.clone()), + _ => None, + }) + .last() + .unwrap() + }); + // Read value from offchain storage overlay, stored via `NoOpMmrTree`. + let key = ("storage".as_bytes().to_vec(), (b"no_op", commitment).encode()); + let request = ext + .overlayed_changes() + .offchain() + .overlay() + .changes() + .filter_map(|c| { + (c.0 == &key).then(|| match c.1.value_ref() { + OffchainOverlayedChange::SetValue(value) => { + match Leaf::decode(&mut &value[..]).unwrap() { + Leaf::Request(req) => Some(req), + Leaf::Response(_) => None, + } + }, + _ => None, + }) + }) + .last() + .flatten() + .unwrap(); + // Ensure the request matches the commitment. + assert_eq!(commitment.0, keccak_256(&request.encode())); + request + } +} + +// A simple, strongly typed wrapper for the contract. +struct Contract { + address: H160, + creator: AccountId, +} +impl Contract { + // Create a new instance of the contract through on-chain instantiation. + fn new(origin: &AccountId, value: Balance) -> Self { + let data = vec![]; // Default solidity constructor + let salt = twox_256(&value.to_le_bytes()); + let address = + instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); + Self { address, creator: origin.clone() } + } + + fn get_response(&self, message: MessageId) -> Bytes { + let call = getResponseCall { message }; + SolBytes(self.call::<_, Error>(&self.creator, call, 0).unwrap().0.into()) + } + + fn poll_status(&self, message: MessageId) -> MessageStatus { + let call = pollStatusCall { message }; + self.call::<_, Error>(&self.creator, call, 0).unwrap() + } + + fn remove(&self, message: MessageId) -> Result<(), Error> { + let call = remove_0Call { message }; + self.call(&self.creator, call, 0)?; + Ok(()) + } + + fn account_id(&self) -> AccountId { + to_account_id(&self.address) + } + + fn call( + &self, + origin: &AccountId, + call: T, + value: Balance, + ) -> Result { + let origin = RuntimeOrigin::signed(origin.clone()); + let dest = self.address.clone(); + let data = call.abi_encode(); + let result = bare_call(origin, dest, value, GAS_LIMIT, STORAGE_DEPOSIT_LIMIT, data) + .expect("should work"); + match result.did_revert() { + true => Err(E::decode(&result.data).expect(&format!( + "unable to decode error value from '{:?}'", + String::from_utf8_lossy(&result.data) + ))), + false => + Ok(T::abi_decode_returns(&result.data).expect("unable to decode success value")), + } + } + + fn last_event(&self) -> Vec { + last_contract_event(&self.address) + } +} diff --git a/runtime/devnet/src/config/mod.rs b/runtime/devnet/src/config/mod.rs index 61ae08273..6f684efda 100644 --- a/runtime/devnet/src/config/mod.rs +++ b/runtime/devnet/src/config/mod.rs @@ -2,7 +2,8 @@ mod api; // Public due to pop api integration tests crate. pub mod assets; mod contracts; -mod ismp; +// Public due to pop api integration tests crate. +pub mod ismp; mod proxy; // Public due to integration tests crate. pub mod xcm; From dbd86fdc81d108d45bb16c35fb47dd760eaed61a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:29:07 +0100 Subject: [PATCH 224/284] test(api): update ink dependency --- pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index ab09c3088..3a3493f63 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] From 51116c970e7110ab808918aac27e3d689f5c74d8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:29:38 +0100 Subject: [PATCH 225/284] refactor(api): update ink dependency --- pop-api-vnext/examples/fungibles/Cargo.toml | 2 +- pop-api-vnext/examples/messaging/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 9f89d7e4e..23d66ee88 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/examples/messaging/Cargo.toml b/pop-api-vnext/examples/messaging/Cargo.toml index 29455eed2..a5da919e7 100644 --- a/pop-api-vnext/examples/messaging/Cargo.toml +++ b/pop-api-vnext/examples/messaging/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } [dev-dependencies] From f239707585a446b942c4d4660bb49beff5ed6db5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 12:37:48 +0100 Subject: [PATCH 226/284] test(api): restore onpostresponse handler --- .../integration-tests/contracts/messaging/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index 0696c49bb..a2bbf9561 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -86,12 +86,12 @@ pub mod messaging { } } - // impl api::ismp::OnPostResponse for Messaging { - // #[ink(message)] - // fn onResponse(&mut self, id: MessageId, response: Bytes) { - // self.env().emit_event(IsmpPostCompleted { id, response }); - // } - // } + impl api::ismp::OnPostResponse for Messaging { + #[ink(message)] + fn onResponse(&mut self, id: MessageId, response: Bytes) { + self.env().emit_event(IsmpPostCompleted { id, response }); + } + } impl xcm::Xcm for Messaging { #[ink(message)] From fd341cae6f70ba8cb36c5cbcad1eb1e68cccb46d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 13:19:37 +0100 Subject: [PATCH 227/284] test(pallets/api): fix tests after refactor --- pallets/api-vnext/src/messaging/precompiles/v0.rs | 7 +++++-- pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs | 2 +- pallets/api-vnext/src/messaging/tests.rs | 4 ++-- pallets/api-vnext/src/messaging/transports/ismp.rs | 10 +++++----- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index b5bf73131..bf3de94b5 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -150,8 +150,11 @@ mod tests { #[test] fn get_response_works() { let origin = Origin::from((ALICE_ADDR, ALICE)); - let expected = - [(0, Vec::default()), (1, b"ismp response".to_vec()), (2, Response::Null.encode())]; + let expected = [ + (0, Vec::default()), + (1, b"ismp response".to_vec()), + (2, Encode::encode(&Response::Null)), + ]; let messages = [ ( 1, diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 31af237a5..388e8fe99 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -400,7 +400,7 @@ mod tests { &getResponse(getResponseCall { message }) ) .unwrap(), - response.encode() + Encode::encode(&response) ); }); } diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index a17583fc9..f498b4f04 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -572,7 +572,7 @@ mod call { let weight = Weight::from_parts(100_000, 100_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); let message_id = 1; - let data = [100u8; 5]; + let data = vec![100u8; 5]; ExtBuilder::new().build().execute_with(|| { assert_ok!(call::(&origin, callback, &message_id, &data)); @@ -594,7 +594,7 @@ mod call { let weight = Weight::from_parts(10_000_000, 10_000_000); let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); let id = 1; - let data = [100u8; 5]; + let data = vec![100u8; 5]; let callback_fee = ::WeightToFee::weight_to_fee(&weight); let endowment = existential_deposit() + callback_fee; ExtBuilder::new() diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 8b05e5d63..1c0ae6603 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -554,7 +554,7 @@ mod tests { IsmpRequests::insert(commitment, id); Messages::insert(id, message); - let res = process_response::(&commitment, &response, |dest, id| { + let res = process_response::(&commitment, response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } }); @@ -576,7 +576,7 @@ mod tests { let commitment = H256::zero(); let response = vec![1u8; >::get() as usize + 1usize]; ExtBuilder::new().build().execute_with(|| { - let err = process_response::(&commitment, &response, |dest, id| { + let err = process_response::(&commitment, response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } }) .unwrap_err(); @@ -595,7 +595,7 @@ mod tests { let commitment = H256::zero(); let response = vec![1u8]; ExtBuilder::new().build().execute_with(|| { - let err = process_response::(&commitment, &response, |dest, id| { + let err = process_response::(&commitment, response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } }) .unwrap_err(); @@ -618,7 +618,7 @@ mod tests { IsmpRequests::insert(commitment, id); Messages::insert(id, message); - let err = process_response::(&commitment, &vec![1u8], |dest, id| { + let err = process_response::(&commitment, vec![1u8], |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } }) .unwrap_err(); @@ -640,7 +640,7 @@ mod tests { IsmpRequests::insert(commitment, id); Messages::insert(id, message); - let res = process_response::(&commitment, &response, |dest, id| { + let res = process_response::(&commitment, response, |dest, id| { Event::IsmpGetResponseReceived { dest, id, commitment } }); From e83b6a78665ddfb9471dccc927fd373382da7d29 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 14:19:50 +0100 Subject: [PATCH 228/284] test(api): add ismp post integration tests --- .../integration-tests/src/messaging.rs | 154 ++++++++++++++++-- pop-api-vnext/src/messaging/ismp/v0.rs | 22 ++- 2 files changed, 160 insertions(+), 16 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index c24f2dd9c..ff5b684fe 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -24,18 +24,21 @@ const HYPERBRIDGE: u32 = 4_009; mod ismp { use ::ismp::{ host::StateMachine, - router::{GetResponse, IsmpRouter, Request, Response, StorageValue}, + router::{GetResponse, IsmpRouter, PostResponse, Request, Response, StorageValue}, }; use pallet_api_vnext::messaging::{ precompiles::ismp::v0::{ Callback, Encoding, Weight, - IISMP::{get_0Call, get_1Call, Get, GetDispatched_0, GetDispatched_1}, + IISMP::{ + get_0Call, get_1Call, post_0Call, post_1Call, Get, GetDispatched_0, + GetDispatched_1, Post, PostDispatched_0, PostDispatched_1, + }, }, transports::ismp::ID as ISMP_MODULE_ID, - Event::IsmpGetResponseReceived, + Event::{IsmpGetResponseReceived, IsmpPostResponseReceived}, }; use pallet_ismp::offchain::Leaf; - use pop_api::messaging::ismp::{IsmpGetCompleted, PRECOMPILE_ADDRESS}; + use pop_api::messaging::ismp::{IsmpGetCompleted, IsmpPostCompleted, PRECOMPILE_ADDRESS}; #[cfg(feature = "devnet")] use pop_runtime_devnet::config::ismp::Router; use sp_runtime::offchain::OffchainOverlayedChange; @@ -82,9 +85,9 @@ mod ismp { // Provide a response. ext.execute_with(|| { let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); - module - .on_response(Response::Get(GetResponse { get, values: response.clone() })) - .unwrap(); + assert_ok!( + module.on_response(Response::Get(GetResponse { get, values: response.clone() })) + ); System::assert_has_event( IsmpGetResponseReceived { dest: contract.address, id, commitment }.into(), ); @@ -147,10 +150,9 @@ mod ismp { // Provide a response. ext.execute_with(|| { let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); - // let commitment = H256::from(keccak_256(&Request::Get(get.clone()).encode())); - module - .on_response(Response::Get(GetResponse { get, values: response.clone() })) - .unwrap(); + assert_ok!( + module.on_response(Response::Get(GetResponse { get, values: response.clone() })) + ); System::assert_has_event( IsmpGetResponseReceived { dest: contract.address, id, commitment }.into(), ); @@ -179,6 +181,117 @@ mod ismp { }); } + #[test] + fn post_works() { + let origin = ALICE; + let timeout = 100_000u64; + let request = + Post { destination: HYPERBRIDGE, timeout, data: b"some_data".to_vec().into() }; + let response = b"some_value".to_vec(); + + // Create a post request. + let mut ext = ExtBuilder::new().build(); + let (contract, id, commitment) = ext.execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + let id = contract.post(request, U256::zero(), None).unwrap(); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let Some(Message::Ismp{ commitment, .. }) = Messaging::get(id) else { panic!() }; + let expected = PostDispatched_0 { origin: contract.address.0.into(), id, commitment: commitment.0.into() }.encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + assert!(System::events().iter().any(|e| { + matches!(e.event, + RuntimeEvent::Ismp(pallet_ismp::Event::Request { dest_chain, source_chain , ..}) + if dest_chain == StateMachine::Polkadot(HYPERBRIDGE) && source_chain == StateMachine::Polkadot(100) + ) + })); + + (contract,id, commitment) + }); + + // Look up the request within offchain state in order to provide a response. + let Request::Post(post) = get_ismp_request(&mut ext) else { panic!() }; + + // Provide a response. + ext.execute_with(|| { + let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); + assert_ok!(module.on_response(Response::Post(PostResponse { + post, + response: response.clone(), + timeout_timestamp: timeout, + }))); + System::assert_has_event( + IsmpPostResponseReceived { dest: contract.address, id, commitment }.into(), + ); + + assert_eq!(contract.poll_status(id), MessageStatus::Complete); + assert_eq!(contract.get_response(id), SolBytes(response.encode())); + assert_ok!(contract.remove(id)); + }); + } + + #[test] + fn post_with_callback_works() { + let origin = ALICE; + let timeout = 100_000u64; + let request = + Post { destination: HYPERBRIDGE, timeout, data: b"some_data".to_vec().into() }; + let response = b"some_value".to_vec(); + + // Create a post request with callback. + let mut ext = ExtBuilder::new().build(); + let (contract, id, commitment) = ext.execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + let callback = Callback { + destination: contract.address.0.into(), + encoding: Encoding::SolidityAbi, + selector: 0x5f99cc34.into(), + weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + }; + let id = contract.post(request, U256::zero(), Some(callback.clone())).unwrap(); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let Some(Message::Ismp{ commitment, .. }) = Messaging::get(id) else { panic!() }; + let expected = PostDispatched_1 { origin: contract.address.0.into(), id, commitment: commitment.0.into(), callback }.encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + assert!(System::events().iter().any(|e| { + matches!(e.event, + RuntimeEvent::Ismp(pallet_ismp::Event::Request { dest_chain, source_chain , ..}) + if dest_chain == StateMachine::Polkadot(HYPERBRIDGE) && source_chain == StateMachine::Polkadot(100) + ) + })); + + (contract, id, commitment) + }); + + // Look up the request within offchain state in order to provide a response. + let Request::Post(post) = get_ismp_request(&mut ext) else { panic!() }; + + // Provide a response. + ext.execute_with(|| { + let module = Router::default().module_for_id(ISMP_MODULE_ID.to_vec()).unwrap(); + assert_ok!(module.on_response(Response::Post(PostResponse { + post, + response: response.clone(), + timeout_timestamp: timeout, + }))); + System::assert_has_event( + IsmpPostResponseReceived { dest: contract.address, id, commitment }.into(), + ); + assert_eq!( + contract.last_event(), + IsmpPostCompleted { id, response: SolBytes(response) }.encode() + ); + assert_eq!(contract.poll_status(id), MessageStatus::NotFound); + assert!(System::events().iter().any(|e| { + matches!(&e.event, + RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) + if origin == &contract.account_id() && *message_id == id + ) + })); + }); + } + impl Contract { fn get( &self, @@ -198,6 +311,25 @@ mod ismp { }, } } + + fn post( + &self, + request: Post, + fee: U256, + callback: Option, + ) -> Result { + let fee = alloy::U256::from_be_bytes(fee.to_big_endian()); + match callback { + None => { + let call = post_0Call { request, fee }; + self.call(&self.creator, call, 0) + }, + Some(callback) => { + let call = post_1Call { request, fee, callback }; + self.call(&self.creator, call, 0) + }, + } + } } // Get the last ismp request. diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index 11f13a153..d5935be72 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -209,7 +209,7 @@ pub fn remove_many(messages: Vec) -> Result<(), Error> { precompile.remove_many(messages) } -/// A GET request, intended to be used for sending outgoing requests +/// A GET request, intended to be used for sending outgoing requests. #[ink::scale_derive(Encode, Decode, TypeInfo)] #[derive(ink::SolDecode, ink::SolEncode)] pub struct Get { @@ -226,7 +226,14 @@ pub struct Get { } impl Get { - // TODO: docs + /// Creates a new GET request, intended to be used for sending outgoing requests. + /// + /// # Parameters + /// - `destination` - The destination state machine of this request. + /// - `height` - Height at which to read the state machine. + /// - `timeout` - Relative from the current timestamp at which this request expires in seconds. + /// - `context` - Some application-specific metadata relating to this request. + /// - `keys` - Raw Storage keys that would be used to fetch the values from the counterparty. pub fn new( destination: u32, height: u64, @@ -253,13 +260,18 @@ pub struct Post { /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Encoded request data. - pub data: Vec, + pub data: Bytes, } impl Post { - // TODO: docs + /// Creates a new POST request, intended to be used for sending outgoing requests. + /// + /// # Parameters + /// - `destination` - The destination state machine of this request. + /// - `timeout` - Relative from the current timestamp at which this request expires in seconds. + /// - `data` - Encoded request data. pub fn new(destination: u32, timeout: u64, data: Vec) -> Self { - Self { destination, timeout, data } + Self { destination, timeout, data: SolBytes(data) } } } From 9d410b63c2664b358b1ba0868c0fda3785fbb3d0 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 16:06:52 +0100 Subject: [PATCH 229/284] refactor(pallets/api): rename response handler functions due to selector clashes A workaround for ink which does not allow two traits to be implemented with a message with the same resulting selector. --- .../src/messaging/precompiles/interfaces/v0/IISMP.sol | 4 ++-- .../src/messaging/precompiles/interfaces/v0/IXCM.sol | 2 +- pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs | 4 ++-- pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index b6f86ba2b..398d693cd 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -178,7 +178,7 @@ interface IGetResponse { * @param id The identifier of the originating message. * @param response The values derived from the state proof. */ - function onResponse(uint64 id, IISMP.StorageValue[] memory response) external; + function onGetResponse(uint64 id, IISMP.StorageValue[] memory response) external; } /** @@ -190,7 +190,7 @@ interface IPostResponse { * @param id The identifier of the originating message. * @param response The response message. */ - function onResponse(uint64 id, bytes memory response) external; + function onPostResponse(uint64 id, bytes memory response) external; } /// @notice A message callback. diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index 9c516d637..498fb7e27 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -129,7 +129,7 @@ interface IQueryResponse { * @param id The identifier of the originating message. * @param response The response message. */ - function onResponse(uint64 id, bytes memory response) external; + function onQueryResponse(uint64 id, bytes memory response) external; } /// @notice A message callback. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 9bf7577f2..8c0bcc2fd 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -267,7 +267,7 @@ impl EncodeCallback for Vec<::ismp::router::StorageValue> { Scale => [selector.to_vec(), (id, self).encode()].concat(), SolidityAbi => { // Use interface to encode call data - let call = IGetResponse::onResponseCall { + let call = IGetResponse::onGetResponseCall { id, // TODO: address clones response: self @@ -299,7 +299,7 @@ impl EncodeCallback for Vec { SolidityAbi => { // Use interface to encode call data // TODO: address clone - let call = IPostResponse::onResponseCall { id, response: self.clone().into() }; + let call = IPostResponse::onPostResponseCall { id, response: self.clone().into() }; let mut data = call.abi_encode(); debug_assert_eq!(data[..4], selector); // Replace selector with that provided at request diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 388e8fe99..05434ffa0 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -236,7 +236,7 @@ impl EncodeCallback for Response { match encoding { Scale => [selector.to_vec(), (id, response).encode()].concat(), SolidityAbi => { - let call = IQueryResponse::onResponseCall { id, response: response.into() }; + let call = IQueryResponse::onQueryResponseCall { id, response: response.into() }; let mut data = call.abi_encode(); debug_assert_eq!(data[..4], selector); // Replace selector with that provided at request From bf2eca01e165733b0c45c56a79b633f903a88380 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 16:10:10 +0100 Subject: [PATCH 230/284] refactor(api): rename response handler functions due to selector clashes --- pop-api-vnext/src/messaging/ismp/v0.rs | 4 +- pop-api-vnext/src/messaging/xcm/v0.rs | 64 +++++++++++++++++--------- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index d5935be72..3a957916a 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -295,7 +295,7 @@ pub trait OnGetResponse { /// - `response` - The values derived from the state proof. #[ink(message)] #[allow(non_snake_case)] - fn onResponse(&mut self, id: MessageId, response: Vec); + fn onGetResponse(&mut self, id: MessageId, response: Vec); } /// A callback for handling responses to ISMP `Post` requests. @@ -308,7 +308,7 @@ pub trait OnPostResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onResponse(&mut self, id: MessageId, response: Bytes); + fn onPostResponse(&mut self, id: MessageId, response: Bytes); } /// Event emitted when a ISMP `Get` request is completed. diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index f52019721..326aed89d 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -1,5 +1,5 @@ pub use errors::{Error, Error::*}; -pub use ink::xcm::prelude::{VersionedLocation, VersionedResponse, VersionedXcm}; +pub use ink::xcm::prelude::{Location, VersionedLocation, VersionedResponse, VersionedXcm}; use ink::{Address, SolBytes}; use super::{super::v0::Callback, *}; @@ -38,9 +38,26 @@ pub trait Xcm { /// /// # Returns /// A unique query identifier. - #[ink(message, selector = 0x5a8db3bd)] - fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId); + #[ink(message)] + #[allow(non_snake_case)] + fn newQuery(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId); + /// Send an XCM from a given origin. + /// + /// # Parameters + /// - `destination` - The SCALE-encoded versioned location for the destination of the message. + /// - `message` - A SCALE-encoded versioned XCM message. + /// + /// # Returns + /// A SCALE-encoded dispatch result. + #[ink(message)] + fn send(&self, destination: Bytes, message: Bytes) -> Bytes; +} + +/// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus +/// Messaging (XCM). +#[ink::trait_definition] +pub trait XcmCallback { /// Initiate a new XCM query. /// /// Starts a query using the XCM interface, specifying a responder and timeout block. @@ -52,24 +69,14 @@ pub trait Xcm { /// /// # Returns /// A unique query identifier. - #[ink(message, selector = 0xc0ca060b)] - fn new_query_with_callback( + #[ink(message)] + #[allow(non_snake_case)] + fn newQuery( &self, responder: Bytes, timeout: BlockNumber, callback: Callback, ) -> (MessageId, QueryId); - - /// Send an XCM from a given origin. - /// - /// # Parameters - /// - `destination` - The SCALE-encoded versioned location for the destination of the message. - /// - `message` - A SCALE-encoded versioned XCM message. - /// - /// # Returns - /// A SCALE-encoded dispatch result. - #[ink(message)] - fn send(&self, destination: Bytes, message: Bytes) -> Bytes; } /// The messaging interface of the XCM precompile offers a general interface for cross-chain @@ -157,15 +164,20 @@ pub fn get_response(message: MessageId) -> Bytes { /// A unique query identifier. #[inline] pub fn new_query( - responder: VersionedLocation, + responder: Location, timeout: BlockNumber, callback: Option, ) -> (MessageId, QueryId) { - let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); let responder = SolBytes(responder.encode()); match callback { - None => precompile.new_query(responder, timeout), - Some(callback) => precompile.new_query_with_callback(responder, timeout, callback), + None => { + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.newQuery(responder, timeout) + }, + Some(callback) => { + let precompile: contract_ref!(XcmCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.newQuery(responder, timeout, callback) + }, } } @@ -227,5 +239,15 @@ pub trait OnQueryResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onResponse(&mut self, id: MessageId, response: Bytes); + fn onQueryResponse(&mut self, id: MessageId, response: Bytes); +} + +/// Event emitted when a XCM query is completed. +#[ink::event] +pub struct XcmCompleted { + /// The identifier of the originating message. + #[ink(topic)] + pub id: MessageId, + /// The response message. + pub result: Bytes, } From 35dd0e0807f9516a71f35123f30ac9c56a6e2651 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 24 Jul 2025 16:12:59 +0100 Subject: [PATCH 231/284] test(api): add xcm messaging integration tests --- pop-api-vnext/integration-tests/Cargo.toml | 6 + .../contracts/messaging/lib.rs | 47 +++--- pop-api-vnext/integration-tests/src/lib.rs | 4 +- .../integration-tests/src/messaging.rs | 135 +++++++++++++++++- 4 files changed, 160 insertions(+), 32 deletions(-) diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index 0b595865e..a05b7d5da 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -23,12 +23,15 @@ pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } pallet-ismp = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } +pallet-xcm = { workspace = true, default-features = false } pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles", "messaging" ] } pop-primitives = { workspace = true, default-features = false } pop-runtime-devnet.workspace = true pop-runtime-testnet.workspace = true sp-io = { workspace = true, default-features = false } sp-runtime = { workspace = true, default-features = false } +xcm.workspace = true +xcm-executor.workspace = true [features] default = [ "devnet", "std" ] @@ -43,11 +46,14 @@ std = [ "pallet-balances/std", "pallet-ismp/std", "pallet-revive/std", + "pallet-xcm/std", "pop-api/std", "pop-primitives/std", "pop-runtime-devnet/std", "pop-runtime-testnet/std", "sp-io/std", "sp-runtime/std", + "xcm-executor/std", + "xcm/std", ] testnet = [ "pop-runtime-testnet/default" ] diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index a2bbf9561..a57766c8a 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -81,14 +81,14 @@ pub mod messaging { impl api::ismp::OnGetResponse for Messaging { #[ink(message)] - fn onResponse(&mut self, id: MessageId, response: Vec) { + fn onGetResponse(&mut self, id: MessageId, response: Vec) { self.env().emit_event(IsmpGetCompleted { id, response }); } } impl api::ismp::OnPostResponse for Messaging { #[ink(message)] - fn onResponse(&mut self, id: MessageId, response: Bytes) { + fn onPostResponse(&mut self, id: MessageId, response: Bytes) { self.env().emit_event(IsmpPostCompleted { id, response }); } } @@ -100,41 +100,36 @@ pub mod messaging { precompile.execute(message, weight) } - #[ink(message, selector = 0x5a8db3bd)] - fn new_query(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId) { + #[ink(message)] + fn newQuery(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId) { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.newQuery(responder, timeout) + } + + #[ink(message)] + fn send(&self, destination: Bytes, message: Bytes) -> Bytes { let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); - precompile.new_query(responder, timeout) + precompile.send(destination, message) } + } - #[ink(message, selector = 0xc0ca060b)] - fn new_query_with_callback( + impl xcm::XcmCallback for Messaging { + #[ink(message)] + fn newQuery( &self, responder: Bytes, timeout: BlockNumber, callback: Callback, ) -> (MessageId, QueryId) { - let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); - precompile.new_query_with_callback(responder, timeout, callback) + let precompile: contract_ref!(XcmCallback, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + precompile.newQuery(responder, timeout, callback) } + } + impl api::xcm::OnQueryResponse for Messaging { #[ink(message)] - fn send(&self, destination: Bytes, message: Bytes) -> Bytes { - let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); - precompile.send(destination, message) + fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { + self.env().emit_event(XcmCompleted { id, result: response }); } } - - // impl api::xcm::OnQueryResponse for Messaging { - // #[ink(message)] - // fn onResponse(&mut self, id: MessageId, response: Bytes) { - // self.env().emit_event(XcmCompleted { id, result: response }); - // } - // } - - #[ink::event] - pub struct XcmCompleted { - #[ink(topic)] - pub id: MessageId, - pub result: Bytes, - } } diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index 1d56ea08d..b34f86a30 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -11,8 +11,8 @@ use pallet_revive::{ }; #[cfg(feature = "devnet")] use pop_runtime_devnet::{ - AccountId, Assets, Balance, Messaging, Revive, Runtime, RuntimeEvent, RuntimeOrigin, System, - UNIT, + AccountId, Assets, Balance, BlockNumber, Messaging, PolkadotXcm, Revive, Runtime, RuntimeEvent, + RuntimeOrigin, System, UNIT, }; use sp_runtime::{BuildStorage, DispatchError}; diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index ff5b684fe..d194b2e71 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -93,7 +93,7 @@ mod ismp { ); assert_eq!(contract.poll_status(id), MessageStatus::Complete); - assert_eq!(contract.get_response(id), SolBytes(response.encode())); + assert_eq!(contract.get_response(id).0, response.encode()); assert_ok!(contract.remove(id)); }); } @@ -121,7 +121,7 @@ mod ismp { let callback = Callback { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, - selector: 0x7c3a1c0c.into(), + selector: 0x9bf78ffbu32.into(), weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, }; let id = contract.get(request, U256::zero(), Some(callback.clone())).unwrap(); @@ -225,7 +225,7 @@ mod ismp { ); assert_eq!(contract.poll_status(id), MessageStatus::Complete); - assert_eq!(contract.get_response(id), SolBytes(response.encode())); + assert_eq!(contract.get_response(id).0, response.encode()); assert_ok!(contract.remove(id)); }); } @@ -246,7 +246,7 @@ mod ismp { let callback = Callback { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, - selector: 0x5f99cc34.into(), + selector: 0xbe910d67u32.into(), weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, }; let id = contract.post(request, U256::zero(), Some(callback.clone())).unwrap(); @@ -373,6 +373,133 @@ mod ismp { } } +mod xcm { + use ::xcm::prelude::{Junction, Location, MaybeErrorCode::Success, NetworkId, Response}; + use pallet_api_vnext::messaging::precompiles::xcm::v0::{ + Callback, Encoding, Weight, + IXCM::{newQuery_0Call, newQuery_1Call, QueryCreated_0, QueryCreated_1}, + }; + use pop_api::messaging::xcm::{QueryId, XcmCompleted, PRECOMPILE_ADDRESS}; + use xcm_executor::traits::OnResponse; + + use super::*; + + #[test] + fn query_works() { + let origin = ALICE; + let responder = Location::new(1, [Junction::Parachain(ASSET_HUB)]); + let timeout = 100; + let response = Response::DispatchResult(Success); + ExtBuilder::new().build().execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + // Create a new query and check its status + let (id, query_id) = contract.new_query(responder.encode(), timeout, None).unwrap(); + assert_eq!(query_id, 0); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let expected = + QueryCreated_0 { account: contract.address.0.into(), id, queryId: query_id } + .encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + + // Provide a response. + let querier: Location = Junction::AccountId32 { + network: Some(NetworkId::Polkadot), + id: contract.account_id().into(), + } + .into(); + assert!(PolkadotXcm::expecting_response(&responder, query_id, Some(&querier))); + assert_ok!(Messaging::xcm_response( + pallet_xcm::Origin::Response(responder).into(), + query_id, + response.clone() + )); + + assert_eq!(contract.poll_status(id), MessageStatus::Complete); + assert_eq!(contract.get_response(id).0, response.encode()); + assert_ok!(contract.remove(id)); + }); + } + + #[test] + fn query_with_callback_works() { + let origin = ALICE; + let responder = Location::new(1, [Junction::Parachain(ASSET_HUB)]); + let timeout = 100; + let response = Response::DispatchResult(Success); + ExtBuilder::new().build().execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + + // Create a new query and check its status + let callback = Callback { + destination: contract.address.0.into(), + encoding: Encoding::SolidityAbi, + selector: 0x97dbf9fbu32.into(), + weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + }; + let (id, query_id) = + contract.new_query(responder.encode(), timeout, Some(callback.clone())).unwrap(); + assert_eq!(query_id, 0); + assert_eq!(contract.poll_status(id), MessageStatus::Pending); + let expected = QueryCreated_1 { + account: contract.address.0.into(), + id, + queryId: query_id, + callback, + } + .encode_data(); + assert_eq!(last_contract_event(&PRECOMPILE_ADDRESS), expected); + + // Provide a response. + let querier: Location = Junction::AccountId32 { + network: Some(NetworkId::Polkadot), + id: contract.account_id().into(), + } + .into(); + assert!(PolkadotXcm::expecting_response(&responder, query_id, Some(&querier))); + assert_ok!(Messaging::xcm_response( + pallet_xcm::Origin::Response(responder).into(), + query_id, + response.clone() + )); + + assert_eq!( + contract.last_event(), + XcmCompleted { id, result: SolBytes(response.encode()) }.encode() + ); + assert_eq!(contract.poll_status(id), MessageStatus::NotFound); + assert!(System::events().iter().any(|e| { + matches!(&e.event, + RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) + if origin == &contract.account_id() && *message_id == id + ) + })); + }); + } + + impl Contract { + fn new_query( + &self, + responder: Vec, + timeout: BlockNumber, + callback: Option, + ) -> Result<(MessageId, QueryId), xcm::Error> { + match callback { + None => { + let call = newQuery_0Call { responder: responder.into(), timeout }; + let result = self.call(&self.creator, call, 0)?; + Ok((result.id, result.queryId)) + }, + Some(callback) => { + let call = newQuery_1Call { responder: responder.into(), timeout, callback }; + let result = self.call(&self.creator, call, 0)?; + Ok((result.id, result.queryId)) + }, + } + } + } +} + // A simple, strongly typed wrapper for the contract. struct Contract { address: H160, From ccfeeab64d6a9db04afd4e8ce8cf56c426f08ca9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Fri, 25 Jul 2025 14:55:45 +0100 Subject: [PATCH 232/284] build(api): updating ink to master --- pop-api-vnext/Cargo.toml | 2 +- pop-api-vnext/examples/fungibles/Cargo.toml | 2 +- pop-api-vnext/examples/messaging/Cargo.toml | 2 +- .../contracts/fungibles/Cargo.toml | 2 +- .../contracts/messaging/Cargo.lock | 33 ++++++++++--------- .../contracts/messaging/Cargo.toml | 2 +- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 0ef1e2b18..c09fdf8b1 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 23d66ee88..9f89d7e4e 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/examples/messaging/Cargo.toml b/pop-api-vnext/examples/messaging/Cargo.toml index a5da919e7..29455eed2 100644 --- a/pop-api-vnext/examples/messaging/Cargo.toml +++ b/pop-api-vnext/examples/messaging/Cargo.toml @@ -11,7 +11,7 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index 3a3493f63..ab09c3088 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -11,7 +11,7 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock index a26b241f5..7e6bdecfe 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock @@ -2189,9 +2189,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "bytes", "futures-core", @@ -2299,7 +2299,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "const_format", "deranged", @@ -2319,12 +2319,13 @@ dependencies = [ "sp-io", "sp-runtime-interface", "staging-xcm", + "tokio", ] [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "cfg-if", ] @@ -2332,7 +2333,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2354,7 +2355,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2371,7 +2372,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "cfg-if", @@ -2404,7 +2405,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "blake2", "either", @@ -2420,7 +2421,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "ink_codegen", "ink_ir", @@ -2435,7 +2436,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2450,7 +2451,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "cfg-if", ] @@ -2458,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2486,7 +2487,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "array-init", "cfg-if", @@ -2504,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=semakula%2Foption-sol#bc6f23ed6be69b07c938dd60aeb78a077149883a" +source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" dependencies = [ "ink_metadata", "ink_prelude", @@ -3439,9 +3440,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", "syn 2.0.104", diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml index 48d93f080..7e826b03a 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml @@ -10,7 +10,7 @@ abi = "sol" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", branch = "semakula/option-sol", default-features = false, features = [ "unstable-hostfn" ] } +ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } [dev-dependencies] From bb92631a88dc23dfd2c1553bea846581bbe1a494 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 09:23:19 +0100 Subject: [PATCH 233/284] docs(pallets/api): remove unnecessary todos --- pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs | 2 -- pallets/api-vnext/src/messaging/precompiles/v0.rs | 2 -- pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs | 2 -- 3 files changed, 6 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 8c0bcc2fd..c1c19f1e3 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -165,7 +165,6 @@ where remove::(origin, &[*message]).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) @@ -181,7 +180,6 @@ where remove::(origin, messages).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index bf3de94b5..00cc12167 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -53,7 +53,6 @@ impl remove::(origin, &[*message]).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) @@ -69,7 +68,6 @@ impl remove::(origin, messages).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 05434ffa0..e4fe1681a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -132,7 +132,6 @@ where remove::(origin, &[*message]).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) @@ -148,7 +147,6 @@ where remove::(origin, messages).map_err(Self::map_err)?; - // TODO: is the precompile emitting the event, or the pallet let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) From 13617a5b05682917674e77850dae57d8e786bdf7 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 09:23:40 +0100 Subject: [PATCH 234/284] docs(api): remove unnecessary todos --- pop-api-vnext/src/messaging/ismp/v0/errors.rs | 2 +- pop-api-vnext/src/messaging/v0/errors.rs | 2 +- pop-api-vnext/src/messaging/xcm/v0/errors.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0/errors.rs b/pop-api-vnext/src/messaging/ismp/v0/errors.rs index d35363fd5..6442f1979 100644 --- a/pop-api-vnext/src/messaging/ismp/v0/errors.rs +++ b/pop-api-vnext/src/messaging/ismp/v0/errors.rs @@ -5,7 +5,7 @@ use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// The context exceeds the maximum allowed size. MaxContextExceeded, diff --git a/pop-api-vnext/src/messaging/v0/errors.rs b/pop-api-vnext/src/messaging/v0/errors.rs index ceb8cc57f..295f37f77 100644 --- a/pop-api-vnext/src/messaging/v0/errors.rs +++ b/pop-api-vnext/src/messaging/v0/errors.rs @@ -5,7 +5,7 @@ use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// The message was not found. MessageNotFound, diff --git a/pop-api-vnext/src/messaging/xcm/v0/errors.rs b/pop-api-vnext/src/messaging/xcm/v0/errors.rs index 539f5886a..faa9c2ef5 100644 --- a/pop-api-vnext/src/messaging/xcm/v0/errors.rs +++ b/pop-api-vnext/src/messaging/xcm/v0/errors.rs @@ -5,7 +5,7 @@ use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] -#[ink::scale_derive(Decode, Encode, TypeInfo)] // TODO: check removal +#[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { /// The input failed to decode. DecodingFailed, From a4317d39cda77d7988a8803922cbdebd2f1d7c37 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 09:28:20 +0100 Subject: [PATCH 235/284] docs(api): add hashed_account function docs --- pop-api-vnext/src/messaging.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pop-api-vnext/src/messaging.rs b/pop-api-vnext/src/messaging.rs index 90444c6a9..f1e89be2a 100644 --- a/pop-api-vnext/src/messaging.rs +++ b/pop-api-vnext/src/messaging.rs @@ -24,7 +24,11 @@ pub type Bytes = SolBytes>; pub type FixedBytes = SolBytes<[u8; N]>; pub type MessageId = u64; -// todo: docs +/// Calculate the hashed account identifier for a given parachain and account. +/// +/// # Parameters +/// - `para_id`: The parachain identifier. +/// - `account_id`: The account identifier. pub fn hashed_account(para_id: u32, account_id: AccountId) -> AccountId { let location = ( b"SiblingChain", From 859bc7762e60dff1f14d9d25d403c2bbc694a4bc Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 13:36:26 +0100 Subject: [PATCH 236/284] feat(pallets/api): add (para) id getter to messaging precompiles --- pallets/api-vnext/Cargo.toml | 3 + pallets/api-vnext/src/messaging.rs | 4 + .../api-vnext/src/messaging/benchmarking.rs | 33 +++- .../precompiles/interfaces/v0/IISMP.sol | 6 + .../precompiles/interfaces/v0/IMessaging.sol | 6 + .../precompiles/interfaces/v0/IXCM.sol | 6 + .../src/messaging/precompiles/ismp/v0.rs | 8 + .../api-vnext/src/messaging/precompiles/v0.rs | 25 ++- .../src/messaging/precompiles/xcm/v0.rs | 33 +++- pallets/api-vnext/src/messaging/weights.rs | 147 ++++++++++-------- pallets/api-vnext/src/mock.rs | 8 +- 11 files changed, 201 insertions(+), 78 deletions(-) diff --git a/pallets/api-vnext/Cargo.toml b/pallets/api-vnext/Cargo.toml index 8b23b617e..65609a6ce 100644 --- a/pallets/api-vnext/Cargo.toml +++ b/pallets/api-vnext/Cargo.toml @@ -26,6 +26,7 @@ pallet-ismp = { workspace = true, optional = true } pallet-revive = { workspace = true, default-features = false } pallet-timestamp = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } +parachain-info = { workspace = true, optional = true } scale-info.workspace = true sp-io = { workspace = true, optional = true } sp-runtime = { workspace = true, optional = true } @@ -46,6 +47,7 @@ messaging = [ "dep:log", "dep:pallet-ismp", "dep:pallet-xcm", + "dep:parachain-info", "dep:sp-runtime", "dep:xcm", "dep:xcm-builder", @@ -72,6 +74,7 @@ std = [ "pallet-revive/std", "pallet-timestamp/std", "pallet-xcm?/std", + "parachain-info?/std", "scale-info/std", "sp-io/std", "sp-runtime?/std", diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 3f45e22f1..1b06d4d52 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -501,6 +501,10 @@ fn get(id: &MessageId) -> Vec { .unwrap_or_default() } +fn id() -> u32 { + parachain_info::Pallet::::parachain_id().into() +} + /// Handles fee management and refund logic for callback execution. /// /// This function is intended to balance the fees collected upfront for a callback diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index d3a9f083a..1aa2d4144 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -71,7 +71,7 @@ type Xcm = super::precompiles::xcm::v0::Xcm<5, T>; // Messaging T: Config>>, alloy::U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, - T: pallet_ismp::Config + pallet_xcm::Config, + T: pallet_ismp::Config + pallet_xcm::Config + parachain_info::Config, u32: From>, // Timestamp T: pallet_timestamp::Config @@ -121,6 +121,22 @@ mod benchmarks { } } + #[benchmark] + fn id() { + let mut call_setup = set_up_call(); + let mut ext = call_setup.ext().0; + let input = IMessagingCalls::id(IMessaging::idCall {}); + + #[block] + { + assert_ok!(call_precompile::, _, u32>( + &mut ext, + &Messaging::::address(), + &input + )); + } + } + /// Sends a `Get` request using ISMP with varying context and key sizes. /// /// # Parameters @@ -200,7 +216,8 @@ mod benchmarks { silence_timestamp_genesis_warnings::(); >::set_balance(&origin.account, u32::MAX.into()); - let (id, commitment, response) = ismp_request::(x, origin.clone(), fee, callback); + let (message_id, commitment, response) = + ismp_request::(x, origin.clone(), fee, callback); #[block] { @@ -208,8 +225,10 @@ mod benchmarks { } let event = match x { - 0 => Event::IsmpGetResponseReceived { dest: origin.address, id, commitment }, - _ => Event::IsmpPostResponseReceived { dest: origin.address, id, commitment }, + 0 => + Event::IsmpGetResponseReceived { dest: origin.address, id: message_id, commitment }, + _ => + Event::IsmpPostResponseReceived { dest: origin.address, id: message_id, commitment }, }; assert_has_event::(event.into()) } @@ -456,13 +475,15 @@ mod benchmarks { >::set_balance(&origin.account, u32::MAX.into()); - let (id, query_id) = new_query::(origin.clone(), responder, timeout, callback).unwrap(); + let (message_id, query_id) = + new_query::(origin.clone(), responder, timeout, callback).unwrap(); #[extrinsic_call] Pallet::::xcm_response(response_origin, query_id, response.clone()); assert_has_event::( - Event::XcmResponseReceived { dest: origin.address, id, query_id, response }.into(), + Event::XcmResponseReceived { dest: origin.address, id: message_id, query_id, response } + .into(), ); } diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index 398d693cd..a2ce6145d 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -38,6 +38,12 @@ interface IISMP { */ function getResponse(uint64 message) external returns (bytes memory response); + /** + * @notice The identifier of this chain. + * @return id The identifier of this chain. + */ + function id() external returns (uint32 id); + /** * @notice Polls the status of a message. * @param message The message identifier to poll. diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol index d5b509b20..36b905882 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol @@ -15,6 +15,12 @@ interface IMessaging { uint64 message ) external returns (bytes memory response); + /** + * @notice The identifier of this chain. + * @return id The identifier of this chain. + */ + function id() external returns (uint32 id); + /** * @notice Polls the status of a message. * @param message The message identifier to poll. diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index 498fb7e27..b0963a645 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -31,6 +31,12 @@ interface IXCM { */ function getResponse(uint64 message) external returns (bytes memory response); + /** + * @notice The identifier of this chain. + * @return id The identifier of this chain. + */ + function id() external returns (uint32 id); + /** * @notice Initiate a new XCM query. * @dev Starts a query using the XCM interface, specifying a responder and timeout block. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index c1c19f1e3..42933457e 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -26,6 +26,7 @@ impl< const FIXED: u16, T: frame_system::Config + pallet_revive::Config + + parachain_info::Config + Config>>, > Precompile for Ismp where @@ -106,6 +107,13 @@ where Ok(getResponseCall::abi_encode_returns(&response)) }, + IISMPCalls::id(idCall {}) => { + env.charge(::WeightInfo::id())?; + + let id = id::(); + + Ok(idCall::abi_encode_returns(&id)) + }, IISMPCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 00cc12167..938a86573 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -16,8 +16,10 @@ sol!( ); pub struct Messaging(PhantomData); -impl Precompile - for Messaging +impl< + const FIXED: u16, + T: frame_system::Config + pallet_revive::Config + parachain_info::Config + Config, + > Precompile for Messaging { type Interface = IMessagingCalls; type T = T; @@ -39,6 +41,13 @@ impl Ok(getResponseCall::abi_encode_returns(&response)) }, + IMessagingCalls::id(idCall {}) => { + env.charge(::WeightInfo::id())?; + + let id = id::(); + + Ok(idCall::abi_encode_returns(&id)) + }, IMessagingCalls::pollStatus(pollStatusCall { message }) => { env.charge(::WeightInfo::poll_status())?; @@ -179,6 +188,18 @@ mod tests { }); } + #[test] + fn id_works() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let para_id = u32::from(ParachainInfo::parachain_id()); + assert_eq!( + call_precompile::(&origin, &IMessagingCalls::id(idCall {})).unwrap(), + para_id + ); + }); + } + #[test] fn poll_status_works() { let origin = Origin::from((ALICE_ADDR, ALICE)); diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index e4fe1681a..c4d6721dc 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -23,7 +23,11 @@ pub(crate) type BlockNumberOf = pub struct Xcm(PhantomData); impl< const FIXED: u16, - T: frame_system::Config + pallet_revive::Config + pallet_xcm::Config + Config, + T: frame_system::Config + + pallet_revive::Config + + pallet_xcm::Config + + parachain_info::Config + + Config, > Precompile for Xcm where BlockNumberOf: From, @@ -87,6 +91,13 @@ where Ok(getResponseCall::abi_encode_returns(&response)) }, + IXCMCalls::id(idCall {}) => { + env.charge(::WeightInfo::id())?; + + let id = id::(); + + Ok(idCall::abi_encode_returns(&id)) + }, IXCMCalls::newQuery_0(newQuery_0Call { responder, timeout }) => { env.charge(::WeightInfo::xcm_new_query(0))?; let origin: Origin<_> = env.caller().try_into()?; @@ -403,6 +414,18 @@ mod tests { }); } + #[test] + fn id_works() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let para_id = u32::from(ParachainInfo::parachain_id()); + assert_eq!( + call_precompile::(&origin, &IXCMCalls::id(idCall {})).unwrap(), + para_id + ); + }); + } + #[test] fn new_query_reverts_when_decoding_failed() { let origin = ALICE; @@ -480,8 +503,8 @@ mod tests { assert_last_event(ADDRESS, event); assert!(matches!( Messages::get(message), - Some(Message::XcmQuery { origin: o, query_id: id, callback, message_deposit }) - if o == origin && id == query_id && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + Some(Message::XcmQuery { origin: o, query_id: qid, callback, message_deposit }) + if o == origin && qid == query_id && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) ); }); } @@ -593,8 +616,8 @@ mod tests { assert_last_event(ADDRESS, event); assert!(matches!( Messages::get(message), - Some(Message::XcmQuery { origin: o, query_id: id, callback: cb, message_deposit }) - if o == origin && id == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + Some(Message::XcmQuery { origin: o, query_id: qid, callback: cb, message_deposit }) + if o == origin && qid == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) ); }); } diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index 896898336..c0663bf09 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -1,8 +1,8 @@ -//! Autogenerated weights for `pallet_api_vnext::messaging` +//! Autogenerated weights for `pallet_api_vnext :: messaging` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-07-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.0.0 +//! DATE: 2025-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `R0GUE`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` @@ -13,13 +13,13 @@ // pallet // --chain=pop-devnet-dev // --wasm-execution=compiled -// --pallet=pallet-api-vnext::messaging +// --pallet=pallet_api_vnext :: messaging // --steps=50 // --repeat=20 // --json // --template=./scripts/templates/pallet-weight-template.hbs // --output=./pallets/api-vnext/src/messaging/weights.rs -// --extrinsic= +// --extrinsic=* #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -29,10 +29,11 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; -/// Weight functions needed for `pallet_api_vnext::messaging`. +/// Weight functions needed for `pallet_api_vnext :: messaging`. pub trait WeightInfo { fn block_number() -> Weight; fn get_response() -> Weight; + fn id() -> Weight; fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight; fn ismp_on_response(x: u32, ) -> Weight; fn ismp_on_timeout(x: u32, ) -> Weight; @@ -43,7 +44,7 @@ pub trait WeightInfo { fn xcm_response() -> Weight; } -/// Weights for `pallet_api_vnext::messaging` using the Substrate node and recommended hardware. +/// Weights for `pallet_api_vnext :: messaging` using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn block_number() -> Weight { @@ -63,6 +64,16 @@ impl WeightInfo for SubstrateWeight { Weight::from_parts(6_000_000, 16247) .saturating_add(T::DbWeight::get().reads(1_u64)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn id() -> Weight { + // Proof Size summary in bytes: + // Measured: `69` + // Estimated: `1489` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 1489) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 64]`. @@ -70,16 +81,16 @@ impl WeightInfo for SubstrateWeight { /// The range of component `a` is `[0, 1]`. fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `771` - // Minimum execution time: 107_000_000 picoseconds. - Weight::from_parts(133_792_052, 771) - // Standard Error: 4_653 - .saturating_add(Weight::from_parts(40_591, 0).saturating_mul(x.into())) - // Standard Error: 28_544 - .saturating_add(Weight::from_parts(191_420, 0).saturating_mul(y.into())) - // Standard Error: 192_383 - .saturating_add(Weight::from_parts(761_947, 0).saturating_mul(a.into())) + // Measured: `804` + // Estimated: `804` + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(134_854_162, 804) + // Standard Error: 5_027 + .saturating_add(Weight::from_parts(34_184, 0).saturating_mul(x.into())) + // Standard Error: 30_837 + .saturating_add(Weight::from_parts(252_129, 0).saturating_mul(y.into())) + // Standard Error: 207_842 + .saturating_add(Weight::from_parts(943_656, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -97,7 +108,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `563` // Estimated: `16247` // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(101_597_959, 16247) + Weight::from_parts(102_659_183, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -121,14 +132,14 @@ impl WeightInfo for SubstrateWeight { /// The range of component `y` is `[0, 1]`. fn ismp_post(x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `771` - // Minimum execution time: 106_000_000 picoseconds. - Weight::from_parts(105_509_867, 771) - // Standard Error: 248 - .saturating_add(Weight::from_parts(5_317, 0).saturating_mul(x.into())) - // Standard Error: 82_941 - .saturating_add(Weight::from_parts(31_155_528, 0).saturating_mul(y.into())) + // Measured: `804` + // Estimated: `804` + // Minimum execution time: 105_000_000 picoseconds. + Weight::from_parts(103_541_555, 804) + // Standard Error: 261 + .saturating_add(Weight::from_parts(7_149, 0).saturating_mul(x.into())) + // Standard Error: 87_369 + .saturating_add(Weight::from_parts(32_325_090, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -151,12 +162,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[1, 100]`. fn remove(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `388 + x * (109 ±0)` + // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(21_874_449, 3694) - // Standard Error: 68_112 - .saturating_add(Weight::from_parts(52_491_354, 0).saturating_mul(x.into())) + Weight::from_parts(65_000_000, 3694) + // Standard Error: 45_546 + .saturating_add(Weight::from_parts(53_133_747, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -180,12 +191,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[0, 1]`. fn xcm_new_query(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `309` + // Measured: `342` // Estimated: `4279` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_638_775, 4279) - // Standard Error: 152_811 - .saturating_add(Weight::from_parts(20_261_224, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(68_483_673, 4279) + // Standard Error: 231_861 + .saturating_add(Weight::from_parts(20_516_326, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -227,6 +238,16 @@ impl WeightInfo for () { Weight::from_parts(6_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(1_u64)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn id() -> Weight { + // Proof Size summary in bytes: + // Measured: `69` + // Estimated: `1489` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 1489) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 64]`. @@ -234,16 +255,16 @@ impl WeightInfo for () { /// The range of component `a` is `[0, 1]`. fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `771` - // Minimum execution time: 107_000_000 picoseconds. - Weight::from_parts(133_792_052, 771) - // Standard Error: 4_653 - .saturating_add(Weight::from_parts(40_591, 0).saturating_mul(x.into())) - // Standard Error: 28_544 - .saturating_add(Weight::from_parts(191_420, 0).saturating_mul(y.into())) - // Standard Error: 192_383 - .saturating_add(Weight::from_parts(761_947, 0).saturating_mul(a.into())) + // Measured: `804` + // Estimated: `804` + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(134_854_162, 804) + // Standard Error: 5_027 + .saturating_add(Weight::from_parts(34_184, 0).saturating_mul(x.into())) + // Standard Error: 30_837 + .saturating_add(Weight::from_parts(252_129, 0).saturating_mul(y.into())) + // Standard Error: 207_842 + .saturating_add(Weight::from_parts(943_656, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -261,7 +282,7 @@ impl WeightInfo for () { // Measured: `563` // Estimated: `16247` // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(101_597_959, 16247) + Weight::from_parts(102_659_183, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -285,14 +306,14 @@ impl WeightInfo for () { /// The range of component `y` is `[0, 1]`. fn ismp_post(x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `771` - // Estimated: `771` - // Minimum execution time: 106_000_000 picoseconds. - Weight::from_parts(105_509_867, 771) - // Standard Error: 248 - .saturating_add(Weight::from_parts(5_317, 0).saturating_mul(x.into())) - // Standard Error: 82_941 - .saturating_add(Weight::from_parts(31_155_528, 0).saturating_mul(y.into())) + // Measured: `804` + // Estimated: `804` + // Minimum execution time: 105_000_000 picoseconds. + Weight::from_parts(103_541_555, 804) + // Standard Error: 261 + .saturating_add(Weight::from_parts(7_149, 0).saturating_mul(x.into())) + // Standard Error: 87_369 + .saturating_add(Weight::from_parts(32_325_090, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -315,12 +336,12 @@ impl WeightInfo for () { /// The range of component `x` is `[1, 100]`. fn remove(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `388 + x * (109 ±0)` + // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(21_874_449, 3694) - // Standard Error: 68_112 - .saturating_add(Weight::from_parts(52_491_354, 0).saturating_mul(x.into())) + Weight::from_parts(65_000_000, 3694) + // Standard Error: 45_546 + .saturating_add(Weight::from_parts(53_133_747, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -344,12 +365,12 @@ impl WeightInfo for () { /// The range of component `x` is `[0, 1]`. fn xcm_new_query(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `309` + // Measured: `342` // Estimated: `4279` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_638_775, 4279) - // Standard Error: 152_811 - .saturating_add(Weight::from_parts(20_261_224, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(68_483_673, 4279) + // Standard Error: 231_861 + .saturating_add(Weight::from_parts(20_516_326, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index 023d42ba7..c4764193d 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -63,10 +63,12 @@ mod runtime { #[cfg(feature = "messaging")] pub type Messaging = crate::messaging::Pallet; #[runtime::pallet_index(6)] - pub type System = frame_system::Pallet; + pub type ParachainInfo = parachain_info::Pallet; #[runtime::pallet_index(7)] - pub type Timestamp = pallet_timestamp::Pallet; + pub type System = frame_system::Pallet; #[runtime::pallet_index(8)] + pub type Timestamp = pallet_timestamp::Pallet; + #[runtime::pallet_index(9)] #[cfg(feature = "messaging")] pub type Xcm = pallet_xcm::Pallet; } @@ -307,6 +309,8 @@ pub(super) mod messaging { } } +impl parachain_info::Config for Test {} + #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; From f647c61ab6d380b60f01898faf04dc500bc16f4b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 13:58:10 +0100 Subject: [PATCH 237/284] feat(api): add (para) id getter to apis --- pop-api-vnext/src/messaging/ismp/v0.rs | 42 +++++++++++++++++--------- pop-api-vnext/src/messaging/v0.rs | 23 ++++++++++++-- pop-api-vnext/src/messaging/xcm/v0.rs | 23 ++++++++++++-- 3 files changed, 67 insertions(+), 21 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index 3a957916a..af89fbb56 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -84,8 +84,16 @@ pub trait Messaging { /// /// # Parameters /// - `message` - The message identifier. - #[ink(message, selector = 0xada86798)] - fn get_response(&self, message: MessageId) -> Bytes; + #[ink(message)] + #[allow(non_snake_case)] + fn getResponse(&self, message: MessageId) -> Bytes; + + /// The identifier of this chain. + /// + /// # Returns + /// The identifier of this chain. + #[ink(message)] + fn id(&self) -> u32; /// Polls the status of a message. /// @@ -110,8 +118,9 @@ pub trait Messaging { /// /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). - #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec) -> Result<(), Error>; + #[ink(message)] + #[allow(non_snake_case)] + fn removeMany(&self, messages: Vec) -> Result<(), Error>; } /// Submit a new ISMP `Get` request. @@ -147,7 +156,16 @@ pub fn get(request: Get, fee: U256, callback: Option) -> Result Bytes { let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.get_response(message) + precompile.getResponse(message) +} + +/// The identifier of this chain. +/// +/// NOTE: this is a precompile call and therefore has associated costs. +#[inline] +pub fn id() -> u32 { + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.id() } /// Polls the status of a message. @@ -206,7 +224,7 @@ pub fn remove(message: MessageId) -> Result<(), Error> { #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.remove_many(messages) + precompile.removeMany(messages) } /// A GET request, intended to be used for sending outgoing requests. @@ -238,16 +256,10 @@ impl Get { destination: u32, height: u64, timeout: u64, - context: Vec, - keys: Vec>, + context: Bytes, + keys: Vec, ) -> Self { - Self { - destination, - height, - timeout, - context: SolBytes(context), - keys: keys.into_iter().map(SolBytes).collect(), - } + Self { destination, height, timeout, context, keys } } } diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index bb3fb57d6..794506bdb 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -23,6 +23,13 @@ pub trait Messaging { #[allow(non_snake_case)] fn getResponse(&self, message: MessageId) -> Bytes; + /// The identifier of this chain. + /// + /// # Returns + /// The identifier of this chain. + #[ink(message)] + fn id(&self) -> u32; + /// Polls the status of a message. /// /// # Parameters @@ -46,8 +53,9 @@ pub trait Messaging { /// /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). - #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec) -> Result<(), Error>; + #[ink(message)] + #[allow(non_snake_case)] + fn removeMany(&self, messages: Vec) -> Result<(), Error>; } /// A message callback. @@ -125,6 +133,15 @@ pub fn get_response(message: MessageId) -> Bytes { precompile.getResponse(message) } +/// The identifier of this chain. +/// +/// NOTE: this is a precompile call and therefore has associated costs. +#[inline] +pub fn id() -> u32 { + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.id() +} + /// Polls the status of a message. /// /// # Parameters @@ -156,5 +173,5 @@ pub fn remove(message: MessageId) -> Result<(), Error> { #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.remove_many(messages) + precompile.removeMany(messages) } diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index 326aed89d..423bf1d4b 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -97,6 +97,13 @@ pub trait Messaging { #[allow(non_snake_case)] fn getResponse(&self, message: MessageId) -> Bytes; + /// The identifier of this chain. + /// + /// # Returns + /// The identifier of this chain. + #[ink(message)] + fn id(&self) -> u32; + /// Polls the status of a message. /// /// # Parameters @@ -120,8 +127,9 @@ pub trait Messaging { /// /// # Parameters /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). - #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec); + #[ink(message)] + #[allow(non_snake_case)] + fn removeMany(&self, messages: Vec); } /// Execute an XCM message from a local, signed, origin. @@ -151,6 +159,15 @@ pub fn get_response(message: MessageId) -> Bytes { precompile.getResponse(message) } +/// The identifier of this chain. +/// +/// NOTE: this is a precompile call and therefore has associated costs. +#[inline] +pub fn id() -> u32 { + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + precompile.id() +} + /// Initiate a new XCM query. /// /// Starts a query using the XCM interface, specifying a responder and timeout block. @@ -212,7 +229,7 @@ pub fn remove(message: MessageId) { #[inline] pub fn remove_many(messages: Vec) { let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.remove_many(messages) + precompile.removeMany(messages) } /// Send an XCM from a given origin. From 8291b32db81500a97098b6c869725720284b5256 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 13:59:39 +0100 Subject: [PATCH 238/284] test(api): add (para) id getter integration test --- .../contracts/messaging/lib.rs | 31 +++++++++++++------ pop-api-vnext/integration-tests/src/lib.rs | 4 +-- .../integration-tests/src/messaging.rs | 17 +++++++++- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index a57766c8a..e3efff740 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -2,14 +2,20 @@ use ink::{abi::Sol, contract_ref, prelude::vec::Vec, U256}; use pop_api::{ - messaging::{self as api, ismp::*, xcm::*, Error, *}, + messaging::{ + self as api, + ismp::{ + self, Get, Ismp, IsmpCallback, IsmpGetCompleted, IsmpPostCompleted, OnGetResponse, + OnPostResponse, Post, StorageValue, + }, + xcm::{self, OnQueryResponse, QueryId, Xcm, XcmCallback, XcmCompleted}, + Bytes, Callback, Error, MessageId, MessageStatus, Weight, + }, Pop, }; #[ink::contract] pub mod messaging { - use pop_api::messaging::ismp::Ismp; - use super::*; #[ink(storage)] @@ -29,6 +35,11 @@ pub mod messaging { api::get_response(message) } + #[ink(message)] + fn id(&self) -> u32 { + api::id() + } + #[ink(message)] fn pollStatus(&self, message: MessageId) -> MessageStatus { api::poll_status(message) @@ -39,8 +50,8 @@ pub mod messaging { api::remove(message) } - #[ink(message, selector = 0xcdd80f3b)] - fn remove_many(&self, messages: Vec) -> Result<(), Error> { + #[ink(message)] + fn removeMany(&self, messages: Vec) -> Result<(), Error> { api::remove_many(messages) } } @@ -79,21 +90,21 @@ pub mod messaging { } } - impl api::ismp::OnGetResponse for Messaging { + impl OnGetResponse for Messaging { #[ink(message)] fn onGetResponse(&mut self, id: MessageId, response: Vec) { self.env().emit_event(IsmpGetCompleted { id, response }); } } - impl api::ismp::OnPostResponse for Messaging { + impl OnPostResponse for Messaging { #[ink(message)] fn onPostResponse(&mut self, id: MessageId, response: Bytes) { self.env().emit_event(IsmpPostCompleted { id, response }); } } - impl xcm::Xcm for Messaging { + impl Xcm for Messaging { #[ink(message)] fn execute(&self, message: Bytes, weight: Weight) -> Bytes { let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); @@ -113,7 +124,7 @@ pub mod messaging { } } - impl xcm::XcmCallback for Messaging { + impl XcmCallback for Messaging { #[ink(message)] fn newQuery( &self, @@ -126,7 +137,7 @@ pub mod messaging { } } - impl api::xcm::OnQueryResponse for Messaging { + impl OnQueryResponse for Messaging { #[ink(message)] fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { self.env().emit_event(XcmCompleted { id, result: response }); diff --git a/pop-api-vnext/integration-tests/src/lib.rs b/pop-api-vnext/integration-tests/src/lib.rs index b34f86a30..a48f0818d 100644 --- a/pop-api-vnext/integration-tests/src/lib.rs +++ b/pop-api-vnext/integration-tests/src/lib.rs @@ -11,8 +11,8 @@ use pallet_revive::{ }; #[cfg(feature = "devnet")] use pop_runtime_devnet::{ - AccountId, Assets, Balance, BlockNumber, Messaging, PolkadotXcm, Revive, Runtime, RuntimeEvent, - RuntimeOrigin, System, UNIT, + AccountId, Assets, Balance, BlockNumber, Messaging, ParachainInfo, PolkadotXcm, Revive, + Runtime, RuntimeEvent, RuntimeOrigin, System, UNIT, }; use sp_runtime::{BuildStorage, DispatchError}; diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index d194b2e71..aee6727e3 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -1,6 +1,8 @@ use codec::{Decode, Encode}; use pallet_api_vnext::messaging::{ - precompiles::v0::IMessaging::{getResponseCall, pollStatusCall, remove_0Call, MessageStatus}, + precompiles::v0::IMessaging::{ + getResponseCall, idCall, pollStatusCall, remove_0Call, MessageStatus, + }, Event::CallbackExecuted, Message, MessageId, }; @@ -384,6 +386,15 @@ mod xcm { use super::*; + #[test] + fn id_works() { + let origin = ALICE; + ExtBuilder::new().build().execute_with(|| { + let contract = Contract::new(&origin, INIT_VALUE); + assert_eq!(contract.id(), u32::from(ParachainInfo::parachain_id())); + }); + } + #[test] fn query_works() { let origin = ALICE; @@ -478,6 +489,10 @@ mod xcm { } impl Contract { + fn id(&self) -> u32 { + self.call::<_, Error>(&self.creator, idCall {}, 0).unwrap() + } + fn new_query( &self, responder: Vec, From 2b163f09198153f2d94ccce05e9fdb3a2c1a8ef6 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 14:06:40 +0100 Subject: [PATCH 239/284] refactor(api): update messaging example with improvements --- pop-api-vnext/examples/messaging/lib.rs | 151 ++++++++++++++++-------- 1 file changed, 99 insertions(+), 52 deletions(-) diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index e7fce4db0..c12259739 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -6,71 +6,84 @@ use ink::{ scale::{DecodeAll, Encode}, xcm::{ prelude::{ - AccountId32, All, Asset, Junction::Parachain, Location, OriginKind, QueryId, - QueryResponseInfo, WeightLimit, Xcm, XcmHash, + AccountId32, All, Asset, OriginKind, Parachain, QueryId, QueryResponseInfo, + WeightLimit, Xcm, XcmHash, }, DoubleEncoded, VersionedXcm, }, - U256, + SolBytes, U256, }; use pop_api::{ + ensure, messaging::{ - self as api, hashed_account, ismp, - ismp::{Get, StorageValue}, - xcm::VersionedLocation, - Bytes, Callback, Encoding, Error, MessageId, + self as api, hashed_account, + ismp::{self, Get, OnGetResponse, StorageValue}, + xcm::{self, Location, OnQueryResponse}, + Bytes, Callback, Encoding, MessageId, MessageStatus::Complete, Weight, }, revert, }; +// NOTE: requires `cargo-contract` built from `master` + #[ink::contract] mod messaging { + use self::Error::*; use super::*; // TODO: use manifest metadata to determine const ENCODING: Encoding = Encoding::SolidityAbi; const UNAUTHORIZED: u32 = u32::MAX; + /// A contract for interacting with chains. #[ink(storage)] - #[derive(Default)] pub struct Messaging { - para: u32, + /// The owner of the contract. + owner: Address, + /// The weight to be used for callback responses to this contract. + weight: Weight, } impl Messaging { + /// Instantiate the contract. #[ink(constructor, payable)] - pub fn new(para: u32) -> Self { - Self { para } + #[allow(clippy::new_without_default)] + pub fn new() -> Self { + Self { owner: Self::env().caller(), weight: Weight::from_parts(800_000_000, 500_000) } } + /// Request some state from a chain at the specified keys and block height. + /// + /// # Parameters + /// - `dest` - The identifier of the destination chain. + /// - `keys` - The storage key(s) used to query state from the remote parachain. + /// - `height` - The block height at which to read the state. #[ink(message)] - pub fn get(&mut self, key: Vec, height: u64) -> Result<(), ismp::Error> { + pub fn get(&mut self, dest: u32, keys: Vec, height: u64) -> Result<(), ismp::Error> { let id = ismp::get( - Get::new(self.para, height, 0, Vec::default(), Vec::from([key.clone()])), + Get::new(dest, height, 0, SolBytes(Vec::default()), keys.clone()), U256::zero(), - Some(Callback::new( - self.env().address(), - ENCODING, - 0x57ad942b, - Weight::from_parts(800_000_000, 500_000), - )), + Some(Callback::new(self.env().address(), ENCODING, 0x9bf78ffb, self.weight)), )?; - self.env().emit_event(IsmpRequested { id, key, height }); + self.env().emit_event(IsmpRequested { id, keys, height }); Ok(()) } + /// Funds the contract's account on the destination chain. + /// + /// # Parameters + /// - `dest` - The identifier of the destination chain. #[ink(message, payable)] - pub fn fund(&mut self) { - let dest = Location::new(1, Parachain(self.para)); + pub fn fund(&mut self, dest: u32) -> Result<(), Error> { + let dest = Location::new(1, Parachain(dest)); // Reserve transfer specified assets to contract account on destination. - let asset: Asset = - (Location::parent(), u128::try_from(self.env().transferred_value()).unwrap()) - .into(); - let beneficiary = hashed_account(4_001, self.env().account_id()); // todo: para id getter + let amount = u128::try_from(self.env().transferred_value()).map_err(|_| Overflow)?; + let asset: Asset = (Location::parent(), amount).into(); + let beneficiary = hashed_account(api::id(), self.env().account_id()); let message: Xcm<()> = Xcm::builder_unsafe() .withdraw_asset(asset.clone()) .initiate_reserve_withdraw( @@ -85,55 +98,52 @@ mod messaging { .build(), ) .build(); - let result = api::xcm::execute(VersionedXcm::V5(message), Weight::MAX); + let result = xcm::execute(VersionedXcm::V5(message), Weight::MAX); // TODO: check result self.env().emit_event(Funded { account_id: beneficiary, value: self.env().transferred_value(), }); + Ok(()) } #[ink(message, payable)] - pub fn transact(&mut self, call: Vec, weight: Weight) { - let dest = Location::new(1, Parachain(self.para)); - let call = DoubleEncoded::<()>::decode_all(&mut &call[..]).unwrap(); + pub fn transact(&mut self, dest: u32, call: Vec, weight: Weight) -> Result<(), Error> { + let dest = Location::new(1, Parachain(dest)); + let call = + DoubleEncoded::<()>::decode_all(&mut &call[..]).map_err(|_| DecodingFailed)?; // Register a new query for receiving a response, used to report transact status. - let (id, query_id) = api::xcm::new_query( - VersionedLocation::V5(dest.clone()), + let (id, query_id) = xcm::new_query( + dest.clone(), self.env().block_number().saturating_add(100), - Some(Callback::new( - self.env().address(), - ENCODING, - 0x641b0b03, - Weight::from_parts(800_000_000, 500_000), - )), + Some(Callback::new(self.env().address(), ENCODING, 0x97dbf9fb, self.weight)), ); - // TODO: provide an api function for determining the local para id and max weight value - // for processing the reported transact status on the local chain. + // TODO: provide an api function for determining the max weight value for processing the + // reported transact status on the local chain. let response = QueryResponseInfo { // Route back to this parachain. - destination: Location::new(1, Parachain(4_001)), + destination: Location::new(1, Parachain(api::id())), query_id, max_weight: Weight::from_parts(1_000_000, 5_000), }; // Send transact message. - let fees: Asset = - (Location::parent(), u128::try_from(self.env().transferred_value()).unwrap()) - .into(); + let amount = u128::try_from(self.env().transferred_value()).map_err(|_| Overflow)?; + let fees: Asset = (Location::parent(), amount).into(); let message: Xcm<()> = self._transact(call, weight, fees, response); let mut hash = [0u8; 32]; Blake2x256::hash(&message.encode(), &mut hash); let result = api::xcm::send(dest.into_versioned(), VersionedXcm::V5(message)); self.env().emit_event(XcmRequested { id, query_id, hash }); + Ok(()) } #[ink(message)] - pub fn complete(&mut self, id: MessageId) -> Result<(), Error> { + pub fn complete(&mut self, id: MessageId) -> Result<(), api::Error> { if api::poll_status(id) == Complete { let result = api::get_response(id); api::remove(id)?; @@ -149,7 +159,7 @@ mod messaging { fees: Asset, response: QueryResponseInfo, ) -> Xcm<()> { - let beneficiary = hashed_account(4_001, self.env().account_id()); // todo: para id getter + let beneficiary = hashed_account(api::id(), self.env().account_id()); Xcm::builder_unsafe() .withdraw_asset(fees.clone()) .buy_execution(fees, WeightLimit::Unlimited) @@ -167,11 +177,39 @@ mod messaging { .report_transact_status(response) .build() } + + /// Transfer the ownership of the contract to another account. + /// + /// # Parameters + /// - `owner` - New owner account. + /// + /// NOTE: the specified owner account is not checked, allowing the zero address to be + /// specified if desired.. + #[ink(message)] + pub fn transfer_ownership(&mut self, owner: Address) -> Result<(), Error> { + ensure!(self.env().caller() == self.owner, NoPermission); + self.owner = owner; + Ok(()) + } + + /// Sets the weight used for callback responses. + /// + /// # Parameters + /// - `owner` - New owner account. + /// + /// NOTE: the specified owner account is not checked, allowing the zero address to be + /// specified if desired.. + #[ink(message)] + pub fn set_weight(&mut self, weight: Weight) -> Result<(), Error> { + ensure!(self.env().caller() == self.owner, NoPermission); + self.weight = weight; + Ok(()) + } } - impl api::ismp::OnGetResponse for Messaging { + impl OnGetResponse for Messaging { #[ink(message)] - fn on_response(&mut self, id: MessageId, values: Vec) { + fn onGetResponse(&mut self, id: MessageId, values: Vec) { if self.env().caller() != self.env().address() { revert(&UNAUTHORIZED); } @@ -179,9 +217,9 @@ mod messaging { } } - impl api::xcm::OnResponse for Messaging { + impl OnQueryResponse for Messaging { #[ink(message)] - fn on_response(&mut self, id: MessageId, response: Vec) { + fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { if self.env().caller() != self.env().address() { revert(&UNAUTHORIZED); } @@ -189,11 +227,20 @@ mod messaging { } } + #[cfg_attr(feature = "std", derive(Debug, PartialEq))] + #[derive(ink::SolErrorDecode, ink::SolErrorEncode)] + #[ink::scale_derive(Decode, Encode, TypeInfo)] + pub enum Error { + DecodingFailed, + NoPermission, + Overflow, + } + #[ink::event] pub struct IsmpRequested { #[ink(topic)] pub id: MessageId, - pub key: Vec, + pub keys: Vec, pub height: u64, } @@ -218,7 +265,7 @@ mod messaging { pub struct Completed { #[ink(topic)] pub id: MessageId, - pub result: Vec, + pub result: Bytes, } #[ink::event] From ba904620a18487b5f7ab0bea184342d252a76b68 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 14:48:47 +0100 Subject: [PATCH 240/284] refactor(api): improve return types of xcm execute and send helpers --- pop-api-vnext/examples/messaging/lib.rs | 11 ++++++----- pop-api-vnext/src/messaging/xcm/v0.rs | 19 ++++++++++++++----- pop-api-vnext/src/messaging/xcm/v0/errors.rs | 4 ++++ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index c12259739..98fb0d799 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -98,9 +98,9 @@ mod messaging { .build(), ) .build(); - let result = xcm::execute(VersionedXcm::V5(message), Weight::MAX); - // TODO: check result - + if let Err(error) = xcm::execute(VersionedXcm::V5(message), Weight::MAX) { + revert(&error) + } self.env().emit_event(Funded { account_id: beneficiary, value: self.env().transferred_value(), @@ -136,8 +136,9 @@ mod messaging { let message: Xcm<()> = self._transact(call, weight, fees, response); let mut hash = [0u8; 32]; Blake2x256::hash(&message.encode(), &mut hash); - let result = api::xcm::send(dest.into_versioned(), VersionedXcm::V5(message)); - + if let Err(error) = xcm::send(dest.into_versioned(), VersionedXcm::V5(message)) { + revert(&error) + } self.env().emit_event(XcmRequested { id, query_id, hash }); Ok(()) } diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index 423bf1d4b..83d0c7027 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -1,6 +1,6 @@ pub use errors::{Error, Error::*}; pub use ink::xcm::prelude::{Location, VersionedLocation, VersionedResponse, VersionedXcm}; -use ink::{Address, SolBytes}; +use ink::{scale::Decode, Address, SolBytes}; use super::{super::v0::Callback, *}; @@ -141,9 +141,12 @@ pub trait Messaging { /// # Returns /// A SCALE-encoded dispatch result. #[inline] -pub fn execute(message: VersionedXcm, weight: Weight) -> Bytes { +pub fn execute(message: VersionedXcm, weight: Weight) -> Result<(), Error> { let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.execute(SolBytes(message.encode()), weight) + let result = precompile.execute(SolBytes(message.encode()), weight); + Result::<(), ()>::decode(&mut result.as_slice()) + .map_err(|_| Error::DecodingFailed)? + .map_err(|_| Error::ExecutionFailed(result)) } /// Returns the response to a message. @@ -241,9 +244,15 @@ pub fn remove_many(messages: Vec) { /// # Returns /// A SCALE-encoded dispatch result. #[inline] -pub fn send(destination: VersionedLocation, message: VersionedXcm) -> Bytes { +pub fn send( + destination: VersionedLocation, + message: VersionedXcm, +) -> Result<(), Error> { let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - precompile.send(SolBytes(destination.encode()), SolBytes(message.encode())) + let result = precompile.send(SolBytes(destination.encode()), SolBytes(message.encode())); + Result::<(), ()>::decode(&mut result.as_slice()) + .map_err(|_| Error::DecodingFailed)? + .map_err(|_| Error::SendingFailed(result)) } /// A callback for handling responses to XCM queries. diff --git a/pop-api-vnext/src/messaging/xcm/v0/errors.rs b/pop-api-vnext/src/messaging/xcm/v0/errors.rs index faa9c2ef5..06beba1e7 100644 --- a/pop-api-vnext/src/messaging/xcm/v0/errors.rs +++ b/pop-api-vnext/src/messaging/xcm/v0/errors.rs @@ -9,6 +9,8 @@ use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; pub enum Error { /// The input failed to decode. DecodingFailed, + /// The execution of a XCM message failed. + ExecutionFailed(Bytes), /// Timeouts must be in the future. FutureTimeoutMandatory, /// Message block limit has been reached for this expiry block. Try a different timeout. @@ -19,6 +21,8 @@ pub enum Error { OriginConversionFailed, /// The request is pending. RequestPending, + /// The sending of a XCM message failed. + SendingFailed(Bytes), /// The number of messages exceeds the limit. TooManyMessages, } From 70f9a088a6cc5afc7fbb503fd8feb740e2ec57d8 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 14:52:49 +0100 Subject: [PATCH 241/284] refactor(api): use ink_abi cfg for callback encoding --- pop-api-vnext/examples/messaging/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index 98fb0d799..8b14a6396 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -34,8 +34,10 @@ mod messaging { use self::Error::*; use super::*; - // TODO: use manifest metadata to determine + #[cfg(ink_abi = "sol")] const ENCODING: Encoding = Encoding::SolidityAbi; + #[cfg(any(ink_abi = "all", ink_abi = "ink"))] + const ENCODING: Encoding = Encoding::Scale; const UNAUTHORIZED: u32 = u32::MAX; /// A contract for interacting with chains. From 1a5c74c9b599c5ff09fcec844d06d662d3371b8b Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 15:46:09 +0100 Subject: [PATCH 242/284] refactor(pallets/api): restore ismp deposits --- .../src/messaging/transports/ismp.rs | 82 ++++++++++++++----- 1 file changed, 60 insertions(+), 22 deletions(-) diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 1c0ae6603..58d9bbfe0 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -21,6 +21,17 @@ use super::{ }; type DbWeightOf = ::DbWeight; +type GetState = ( + StateMachine, + [u8; 4], + BoundedVec::MaxKeyLen>, ::MaxKeys>, + u64, + BoundedVec::MaxContextLen>, + u64, +); +type PostState = + (StateMachine, [u8; 4], [u8; 4], u64, BoundedVec::MaxDataLen>); +type StateMachine = (u8, u32); pub const ID: [u8; 3] = *b"pop"; @@ -47,9 +58,7 @@ pub(crate) fn get( let message_deposit = calculate_protocol_deposit::(ProtocolStorageDeposit::IsmpRequests) .saturating_add(calculate_message_deposit::()) - // TODO: include length of `DispatchGet` as own `Get` no longer required - // .saturating_add(calculate_deposit_of::>()) - ; + .saturating_add(calculate_deposit_of::>()); T::Fungibles::hold(&HoldReason::Messaging.into(), &origin.account, message_deposit)?; @@ -104,9 +113,7 @@ pub(crate) fn post( let message_deposit = calculate_protocol_deposit::(ProtocolStorageDeposit::IsmpRequests) .saturating_add(calculate_message_deposit::()) - // TODO: include length of `DispatchGet` as own `Get` no longer required - // .saturating_add(calculate_deposit_of::>()) - ; + .saturating_add(calculate_deposit_of::>()); T::Fungibles::hold(&HoldReason::Messaging.into(), &origin.account, message_deposit)?; @@ -295,10 +302,17 @@ mod tests { use super::{super::tests::events, messaging::HoldReason::*, mock::*, *}; type Fungibles = ::Fungibles; + type GetState = super::GetState; type IsmpRequests = super::IsmpRequests; + type MaxContextLen = ::MaxContextLen; + type MaxDataLen = ::MaxDataLen; + type MaxKeyLen = ::MaxKeyLen; + type MaxKeys = ::MaxKeys; type MaxResponseLen = ::MaxResponseLen; type Messages = super::Messages; + type OffChainByteFee = ::OffChainByteFee; type OnChainByteFee = ::OnChainByteFee; + type PostState = super::PostState; type WeightToFee = ::WeightToFee; mod get { @@ -314,8 +328,7 @@ mod tests { let expected_deposit = calculate_protocol_deposit::( ProtocolStorageDeposit::IsmpRequests, ) + calculate_message_deposit::() + - // TODO - // calculate_deposit_of::>() + + calculate_deposit_of::() + callback_deposit; let endowment = existential_deposit() + expected_deposit + fee; ExtBuilder::new() @@ -341,7 +354,8 @@ mod tests { let callback = None; let deposit = calculate_protocol_deposit::( ProtocolStorageDeposit::IsmpRequests, - ) + calculate_message_deposit::(); + ) + calculate_message_deposit::() + + calculate_deposit_of::(); let endowment = existential_deposit() + deposit + fee; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), endowment)]) @@ -365,14 +379,28 @@ mod tests { }) } + #[test] + fn max_len_works() { + let get = message(); + assert_eq!( + GetState::max_encoded_len(), + (get.dest, get.from, get.keys, get.height, get.context, get.timeout) + .encode() + .len() + ) + } + fn message() -> DispatchGet { DispatchGet { - dest: StateMachine::Polkadot(2_000), - from: ID.to_vec(), - keys: Vec::default(), - height: 10, - context: Vec::default(), - timeout: 100, + dest: StateMachine::Polkadot(u32::MAX), + from: ID.into(), + keys: vec![ + vec![255; >::get() as usize]; + >::get() as usize + ], + height: u64::MAX, + context: vec![255; >::get() as usize], + timeout: u64::MAX, } } } @@ -387,11 +415,11 @@ mod tests { let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); let callback_deposit = ::WeightToFee::weight_to_fee(&weight); let fee: Balance = u32::MAX.into(); - let expected_deposit = calculate_protocol_deposit::::OnChainByteFee>( + let expected_deposit = + calculate_protocol_deposit::::OnChainByteFee>( ProtocolStorageDeposit::IsmpRequests, ) + calculate_message_deposit::::OnChainByteFee>() + - // TODO - //calculate_deposit_of::>() + + calculate_deposit_of::() + callback_deposit; let endowment = existential_deposit() + expected_deposit + fee; ExtBuilder::new() @@ -418,7 +446,8 @@ mod tests { let callback = None; let deposit = calculate_protocol_deposit::( ProtocolStorageDeposit::IsmpRequests, - ) + calculate_message_deposit::(); + ) + calculate_message_deposit::() + + calculate_deposit_of::(); let endowment = existential_deposit() + deposit + fee; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), endowment)]) @@ -442,13 +471,22 @@ mod tests { }) } + #[test] + fn max_len_works() { + let post = message(); + assert_eq!( + PostState::max_encoded_len(), + (post.dest, post.from, post.to, post.timeout, post.body).encode().len() + ) + } + fn message() -> DispatchPost { DispatchPost { - dest: StateMachine::Polkadot(2_000), + dest: StateMachine::Polkadot(u32::MAX), from: ID.to_vec(), to: ID.to_vec(), - timeout: 100, - body: Vec::default(), + timeout: u64::MAX, + body: vec![255; >::get() as usize], } } } From e07c1e0e7b58fe00932adc823943df28898f0ccb Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 17:17:39 +0100 Subject: [PATCH 243/284] test(pallets/api): increase message deposit --- .../api-vnext/src/messaging/precompiles/ismp/v0.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 42933457e..4eddd2ed8 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -384,7 +384,8 @@ mod tests { type Messages = crate::messaging::Messages; const ADDRESS: [u8; 20] = fixed_address(ISMP); - const MESSAGE_DEPOSIT: u128 = 129_180; + const GET_MESSAGE_DEPOSIT: u128 = 131_290; + const POST_MESSAGE_DEPOSIT: u128 = 134_415; #[test] fn get_reverts_when_max_context_exceeded() { @@ -463,7 +464,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::Ismp { origin: o, commitment: c, callback, message_deposit }) - if o == origin && c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + if o == origin && c == commitment && callback.is_none() && message_deposit == GET_MESSAGE_DEPOSIT) ); }); } @@ -503,7 +504,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) - if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == GET_MESSAGE_DEPOSIT) ); }); } @@ -603,7 +604,7 @@ mod tests { assert!(matches!( Messages::get( message), Some(Message::Ismp { origin: o, commitment: c, callback, message_deposit }) - if o == origin && c == commitment && callback.is_none() && message_deposit == MESSAGE_DEPOSIT) + if o == origin && c == commitment && callback.is_none() && message_deposit == POST_MESSAGE_DEPOSIT) ); }); } @@ -638,7 +639,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) - if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == POST_MESSAGE_DEPOSIT) ); }); } From b71c53e5db7fd49af6faaf8d98f3cbf40e0de639 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 20:59:21 +0100 Subject: [PATCH 244/284] docs(pallets/api): update comments on necessary clones of bytes type during abi encoding Data needs to be encoded for persistence if callback fails and therefore cannot be owned. --- pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 4eddd2ed8..a50f1da6a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -275,7 +275,7 @@ impl EncodeCallback for Vec<::ismp::router::StorageValue> { // Use interface to encode call data let call = IGetResponse::onGetResponseCall { id, - // TODO: address clones + // Clones required for ABI encoding of dynamic bytes type. response: self .into_iter() .map(|v| IISMP::StorageValue { @@ -303,8 +303,8 @@ impl EncodeCallback for Vec { match encoding { Scale => [selector.to_vec(), (id, self).encode()].concat(), SolidityAbi => { - // Use interface to encode call data - // TODO: address clone + // Use interface to encode call data. Clone required for ABI encoding of dynamic + // bytes type. let call = IPostResponse::onPostResponseCall { id, response: self.clone().into() }; let mut data = call.abi_encode(); debug_assert_eq!(data[..4], selector); From d0835952e087ca6de016b8870dab0b3bde09129e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 21:29:51 +0100 Subject: [PATCH 245/284] refactor(pallets/api): better handling of invalid callback encoding --- .../precompiles/interfaces/v0/IISMP.sol | 2 ++ .../precompiles/interfaces/v0/IXCM.sol | 2 ++ .../src/messaging/precompiles/ismp/v0.rs | 36 ++++++++++--------- .../src/messaging/precompiles/xcm/v0.rs | 30 +++++++++------- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index a2ce6145d..f38ba443a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -244,6 +244,8 @@ struct Weight { uint64 proofSize; } +/// @dev The specified encoding is invalid. +error InvalidEncoding(); /// @dev The message was not found. error MessageNotFound(); /// @dev The request is pending. diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index b0963a645..7370c54f1 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -183,6 +183,8 @@ struct Weight { uint64 proofSize; } +/// @dev The specified encoding is invalid. +error InvalidEncoding(); /// @dev The message was not found. error MessageNotFound(); /// @dev The request is pending. diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index a50f1da6a..64464d268 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -91,8 +91,8 @@ where let fee = (*fee).try_convert()?; let address = origin.address; - let (id, commitment) = - get::(origin, message, fee, Some(callback.into())).map_err(Self::map_err)?; + let (id, commitment) = get::(origin, message, fee, Some(callback.try_into()?)) + .map_err(Self::map_err)?; let origin = address.0.into(); let commitment = commitment.0.into(); @@ -157,7 +157,7 @@ where let fee = (*fee).try_convert()?; let address = origin.address; - let (id, commitment) = post::(origin, message, fee, Some(callback.into())) + let (id, commitment) = post::(origin, message, fee, Some(callback.try_into()?)) .map_err(Self::map_err)?; let origin = address.0.into(); @@ -233,6 +233,7 @@ impl_from_sol_error! { IISMP::MaxDataExceeded, IISMP::MaxKeyExceeded, IISMP::MaxKeysExceeded, + InvalidEncoding, MessageNotFound, RequestPending, TooManyMessages, @@ -316,24 +317,27 @@ impl EncodeCallback for Vec { } } -impl From<&Callback> for super::Callback { - fn from(callback: &Callback) -> Self { - Self::new( +impl TryFrom<&Callback> for super::Callback { + type Error = Error; + + fn try_from(callback: &Callback) -> Result { + Ok(Self::new( (*callback.destination.0).into(), - (&callback.encoding).into(), + (&callback.encoding).try_into()?, callback.selector.0, (&callback.weight).into(), - ) + )) } } -impl From<&Encoding> for super::Encoding { - fn from(encoding: &Encoding) -> Self { +impl TryFrom<&Encoding> for super::Encoding { + type Error = Error; + + fn try_from(encoding: &Encoding) -> Result { match encoding { - Encoding::Scale => Self::Scale, - Encoding::SolidityAbi => Self::SolidityAbi, - // TODO - Encoding::__Invalid => unimplemented!(), + Encoding::Scale => Ok(Self::Scale), + Encoding::SolidityAbi => Ok(Self::SolidityAbi), + Encoding::__Invalid => Err(InvalidEncoding.into()), } } } @@ -504,7 +508,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) - if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == GET_MESSAGE_DEPOSIT) + if o == origin && c == commitment && cb == Some((&callback).try_into().unwrap()) && message_deposit == GET_MESSAGE_DEPOSIT) ); }); } @@ -639,7 +643,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::Ismp { origin: o, commitment: c, callback: cb, message_deposit }) - if o == origin && c == commitment && cb == Some((&callback).into()) && message_deposit == POST_MESSAGE_DEPOSIT) + if o == origin && c == commitment && cb == Some((&callback).try_into().unwrap()) && message_deposit == POST_MESSAGE_DEPOSIT) ); }); } diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index c4d6721dc..770632329 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -120,7 +120,7 @@ where let address = origin.address; let (id, query_id) = - new_query::(origin, location, (*timeout).into(), Some(callback.into())) + new_query::(origin, location, (*timeout).into(), Some(callback.try_into()?)) .map_err(Self::map_err)?; let account = address.0.into(); @@ -232,6 +232,7 @@ impl_from_sol_error! { IXCM::FutureTimeoutMandatory, IXCM::MaxMessageTimeoutPerBlockReached, IXCM::OriginConversionFailed, + InvalidEncoding, MessageNotFound, RequestPending, TooManyMessages, @@ -256,24 +257,27 @@ impl EncodeCallback for Response { } } -impl From<&Callback> for super::Callback { - fn from(callback: &Callback) -> Self { - Self::new( +impl TryFrom<&Callback> for super::Callback { + type Error = Error; + + fn try_from(callback: &Callback) -> Result { + Ok(Self::new( (*callback.destination.0).into(), - (&callback.encoding).into(), + (&callback.encoding).try_into()?, callback.selector.0, (&callback.weight).into(), - ) + )) } } -impl From<&Encoding> for super::Encoding { - fn from(encoding: &Encoding) -> Self { +impl TryFrom<&Encoding> for super::Encoding { + type Error = Error; + + fn try_from(encoding: &Encoding) -> Result { match encoding { - Encoding::Scale => Self::Scale, - Encoding::SolidityAbi => Self::SolidityAbi, - // TODO - Encoding::__Invalid => unimplemented!(), + Encoding::Scale => Ok(Self::Scale), + Encoding::SolidityAbi => Ok(Self::SolidityAbi), + Encoding::__Invalid => Err(InvalidEncoding.into()), } } } @@ -617,7 +621,7 @@ mod tests { assert!(matches!( Messages::get(message), Some(Message::XcmQuery { origin: o, query_id: qid, callback: cb, message_deposit }) - if o == origin && qid == query_id && cb == Some((&callback).into()) && message_deposit == MESSAGE_DEPOSIT) + if o == origin && qid == query_id && cb == Some((&callback).try_into().unwrap()) && message_deposit == MESSAGE_DEPOSIT) ); }); } From 6b2e13cfab75e7a977f08e59a57f6d55009af4db Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Mon, 28 Jul 2025 22:46:19 +0100 Subject: [PATCH 246/284] test(api): apply reduced initial value, gas, storage limits --- pop-api-vnext/integration-tests/src/messaging.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index aee6727e3..b3c9affa1 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -21,7 +21,10 @@ use super::*; const ASSET_HUB: u32 = 1_000; const CONTRACT: &str = "contracts/messaging/target/ink/messaging.polkavm"; +const GAS_LIMIT: Weight = Weight::from_parts(7_500_000_000, 200_000); const HYPERBRIDGE: u32 = 4_009; +const INIT_VALUE: Balance = 1 * UNIT / 2; +const STORAGE_DEPOSIT_LIMIT: DepositLimit = DepositLimit::Balance(1 * UNIT); mod ismp { use ::ismp::{ @@ -525,8 +528,15 @@ impl Contract { fn new(origin: &AccountId, value: Balance) -> Self { let data = vec![]; // Default solidity constructor let salt = twox_256(&value.to_le_bytes()); - let address = - instantiate(RuntimeOrigin::signed(origin.clone()), CONTRACT, value, data, Some(salt)); + let address = instantiate( + RuntimeOrigin::signed(origin.clone()), + CONTRACT, + value, + GAS_LIMIT, + STORAGE_DEPOSIT_LIMIT, + data, + Some(salt), + ); Self { address, creator: origin.clone() } } From dd70b84342118301ff59286251c2aabd1a597f50 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 14:30:34 +0100 Subject: [PATCH 247/284] fix(pallets/api): surface storage deposit limit into callback specification --- pallets/api-vnext/src/messaging.rs | 56 +++++---- .../api-vnext/src/messaging/benchmarking.rs | 16 ++- pallets/api-vnext/src/messaging/deposits.rs | 2 +- .../precompiles/interfaces/v0/IISMP.sol | 4 +- .../precompiles/interfaces/v0/IXCM.sol | 4 +- .../src/messaging/precompiles/ismp/v0.rs | 14 ++- .../src/messaging/precompiles/xcm/v0.rs | 31 +++-- pallets/api-vnext/src/messaging/tests.rs | 15 +-- .../src/messaging/transports/ismp.rs | 19 ++-- .../api-vnext/src/messaging/transports/xcm.rs | 12 +- pallets/api-vnext/src/messaging/weights.rs | 106 +++++++++--------- pallets/api-vnext/src/mock.rs | 5 +- 12 files changed, 163 insertions(+), 121 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 1b06d4d52..f9448b4e9 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -39,7 +39,7 @@ mod tests; pub mod transports; mod weights; -type BalanceOf = <::Fungibles as Inspect>>::Balance; +pub(crate) type BalanceOf = <::Fungibles as Inspect>>::Balance; type BlockNumberOf = BlockNumberFor; type DbWeightOf = ::DbWeight; pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - U256?; @@ -170,7 +170,7 @@ pub mod pallet { maybe_message.as_mut() { let callback_deposit = - callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); + callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.gas_limit)); query_ids.push(*query_id); *maybe_message = Some(Message::XcmTimeout { origin: origin.address, @@ -228,7 +228,7 @@ pub mod pallet { /// The identifier specified for the request. id: MessageId, /// The successful callback. - callback: Callback, + callback: Callback>, }, /// A callback has failed. CallbackFailed { @@ -237,7 +237,7 @@ pub mod pallet { /// The identifier specified for the request. id: MessageId, /// The callback which failed. - callback: Callback, + callback: Callback>, /// The error which occurred. error: DispatchErrorWithPostInfo, }, @@ -407,13 +407,13 @@ impl Pallet { /// [`frame_system::Pallet::::register_extra_weight_unchecked`]. pub(crate) fn call( initiating_origin: &AccountIdOf, - callback: Callback, + callback: Callback>, id: &MessageId, data: &impl EncodeCallback, ) -> DispatchResult { // This is the total weight that should be deducted from the blockspace for callback // execution. - let max_weight = callback.weight; + let max_weight = callback.gas_limit; // Dont mutate state if blockspace will be saturated. frame_support::ensure!( @@ -432,12 +432,13 @@ pub(crate) fn call( &initiating_origin, callback.destination, data, - callback.weight, + callback.gas_limit, + callback.storage_deposit_limit, ); - log::debug!(target: "pop-api::extension", "callback weight={:?}, result={result:?}", callback.weight); + log::debug!(target: "pop-api::extension", "callback gas_limit={:?}, storage_deposit_limit={:?}, result={result:?}", callback.gas_limit, callback.storage_deposit_limit); deposit_callback_event::(initiating_origin.clone(), *id, &callback, &result); - let callback_weight_used = process_callback_weight(&result, callback.weight); + let callback_weight_used = process_callback_weight(&result, callback.gas_limit); // Manually adjust callback weight. frame_system::Pallet::::register_extra_weight_unchecked( @@ -445,7 +446,7 @@ pub(crate) fn call( DispatchClass::Normal, ); - match manage_fees::(&initiating_origin, callback_weight_used, callback.weight) { + match manage_fees::(&initiating_origin, callback_weight_used, callback.gas_limit) { Ok(_) => (), // Dont return early, we must register the weight used by the callback. Err(error) => @@ -468,7 +469,7 @@ pub(crate) fn call( pub(crate) fn deposit_callback_event( initiating_origin: T::AccountId, message_id: MessageId, - callback: &Callback, + callback: &Callback>, result: &DispatchResultWithPostInfo, ) { match result { @@ -689,8 +690,8 @@ fn remove(origin: Origin, messages: &[MessageId]) -> Di PartialEq, TypeInfo, )] -#[scale_info(skip_type_params(T))] -pub struct Callback { +#[scale_info(skip_type_params(Balance))] +pub struct Callback { /// The contract address to which the callback should be sent. pub destination: H160, /// The encoding used for the data going to the contract. @@ -698,24 +699,28 @@ pub struct Callback { /// The message selector to be used for the callback. pub selector: [u8; 4], /// The pre-paid weight used as a gas limit for the callback. - pub weight: Weight, + pub gas_limit: Weight, + /// The storage deposit limit for the callback. + pub storage_deposit_limit: Balance, } -impl Callback { +impl Callback { /// A new message callback. /// /// # Parameters /// - `destination`: The contract address to which the callback should be sent. /// - `encoding`: The encoding used for the data going to the contract. /// - `selector`: The message selector to be used for the callback. - /// - `weight`: The pre-paid weight used as a gas limit for the callback. + /// - `gas_limit`: The pre-paid weight used as a gas limit for the callback. + /// - `storage_deposit_limit`: The storage deposit limit for the callback. pub(crate) fn new( destination: H160, encoding: Encoding, selector: [u8; 4], - weight: Weight, + gas_limit: Weight, + storage_deposit_limit: Balance, ) -> Self { - Self { destination, encoding, selector, weight } + Self { destination, encoding, selector, gas_limit, storage_deposit_limit } } } @@ -734,12 +739,15 @@ pub trait CallbackExecutor { /// - `destination`: The contract address to which the callback should be sent. /// - `data`: Encoded callback data, typically ABI-encoded input including selector and /// parameters. - /// - `weight`: The maximum weight allowed for executing this callback. + /// - `gas_limit`: The gas limit allowed for executing this callback. + /// - `storage_deposit_limit`: The maximum amount of balance that can be charged from the caller + /// to pay for the storage consumed for this callback. fn execute( account: &T::AccountId, destination: H160, data: Vec, - weight: Weight, + gas_limit: Weight, + storage_deposit_limit: BalanceOf, ) -> DispatchResultWithPostInfo; /// Returns the baseline weight required for a single callback execution. @@ -801,7 +809,7 @@ pub enum Message { Ismp { origin: Origin, commitment: H256, - callback: Option, + callback: Option>>, message_deposit: BalanceOf, }, @@ -815,7 +823,7 @@ pub enum Message { XcmQuery { origin: Origin, query_id: QueryId, - callback: Option, + callback: Option>>, message_deposit: BalanceOf, }, @@ -879,7 +887,7 @@ impl Message { fn ismp( origin: Origin, commitment: H256, - callback: Option, + callback: Option>>, message_deposit: BalanceOf, ) -> Self { Self::Ismp { origin, commitment, callback, message_deposit } @@ -909,7 +917,7 @@ impl Message { fn xcm_query( origin: Origin, query_id: QueryId, - callback: Option, + callback: Option>>, message_deposit: BalanceOf, ) -> Self { Self::XcmQuery { origin, query_id, callback, message_deposit } diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 1aa2d4144..d7b91429f 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -182,7 +182,8 @@ mod benchmarks { destination: [255; 20].into(), encoding: ismp::Encoding::SolidityAbi, selector: [255; 4].into(), - weight: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + gasLimit: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + storageDepositLimit: alloy::U256::from(100_000), }; IISMPCalls::get_1(IISMP::get_1Call { request, fee, callback }) }; @@ -210,6 +211,7 @@ mod benchmarks { Encoding::Scale, [255; 4], Weight::from_parts(100_000, 100_000), + 100_000u32.into(), ); let handler = Handler::::new(); @@ -249,6 +251,7 @@ mod benchmarks { Encoding::Scale, [255; 4], Weight::from_parts(100_000, 100_000), + 100_000u32.into(), ); let handler = Handler::::new(); @@ -324,7 +327,8 @@ mod benchmarks { destination: [255; 20].into(), encoding: ismp::Encoding::SolidityAbi, selector: [255; 4].into(), - weight: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + gasLimit: ismp::Weight { refTime: 100_000, proofSize: 100_000 }, + storageDepositLimit: alloy::U256::from(100_000), }; IISMPCalls::post_1(IISMP::post_1Call { request, fee, callback }) }; @@ -445,7 +449,8 @@ mod benchmarks { destination: [255; 20].into(), encoding: xcm::Encoding::SolidityAbi, selector: [0; 4].into(), - weight: xcm::Weight { refTime: 100, proofSize: 100 }, + gasLimit: xcm::Weight { refTime: 100, proofSize: 100 }, + storageDepositLimit: alloy::U256::from(100), }; IXCMCalls::newQuery_1(IXCM::newQuery_1Call { responder, timeout, callback }) }; @@ -468,7 +473,8 @@ mod benchmarks { destination: [255; 20].into(), encoding: Encoding::Scale, selector: [0; 4], - weight: Weight::from_parts(100, 100), + gas_limit: Weight::from_parts(100, 100), + storage_deposit_limit: 100u8.into(), }); let response_origin = T::XcmResponseOrigin::try_successful_origin().unwrap(); let response = ExecutionResult(None); @@ -499,7 +505,7 @@ fn ismp_request( x: u32, origin: Origin, fee: BalanceOf, - callback: Callback, + callback: Callback>, ) -> (MessageId, H256, Response) { if x == 0 { // get response diff --git a/pallets/api-vnext/src/messaging/deposits.rs b/pallets/api-vnext/src/messaging/deposits.rs index 8c677ba9b..cb905e043 100644 --- a/pallets/api-vnext/src/messaging/deposits.rs +++ b/pallets/api-vnext/src/messaging/deposits.rs @@ -14,7 +14,7 @@ pub fn calculate_protocol_deposit>>( ProtocolStorageDeposit::XcmQueries => (KeyLenOf::>::get() as usize) .saturating_add(AccountIdOf::::max_encoded_len()) .saturating_add(MessageId::max_encoded_len()) - .saturating_add(Option::::max_encoded_len()), + .saturating_add(Option::>>::max_encoded_len()), ProtocolStorageDeposit::IsmpRequests => (KeyLenOf::>::get() as usize) .saturating_add(AccountIdOf::::max_encoded_len()) diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index f38ba443a..9f250821e 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -208,7 +208,9 @@ struct Callback { /// @custom:property The message selector to be used for the callback. bytes4 selector; /// @custom:property The pre-paid weight used as a gas limit for the callback. - Weight weight; + Weight gasLimit; + /// @custom:property The storage deposit limit for the callback. + uint256 storageDepositLimit; } /** diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index 7370c54f1..625a1b1a0 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -147,7 +147,9 @@ struct Callback { /// @custom:property The message selector to be used for the callback. bytes4 selector; /// @custom:property The pre-paid weight used as a gas limit for the callback. - Weight weight; + Weight gasLimit; + /// @custom:property The storage deposit limit for the callback. + uint256 storageDepositLimit; } /** diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 64464d268..7ef99fa41 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -317,7 +317,10 @@ impl EncodeCallback for Vec { } } -impl TryFrom<&Callback> for super::Callback { +impl TryFrom<&Callback> for super::Callback +where + U256: TryConvert, +{ type Error = Error; fn try_from(callback: &Callback) -> Result { @@ -325,7 +328,8 @@ impl TryFrom<&Callback> for super::Callback { (*callback.destination.0).into(), (&callback.encoding).try_into()?, callback.selector.0, - (&callback.weight).into(), + (&callback.gasLimit).into(), + callback.storageDepositLimit.try_convert()?, )) } } @@ -489,7 +493,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit @@ -624,7 +629,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 770632329..b22bfc538 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -8,7 +8,10 @@ use sp_runtime::{ pub(crate) use IXCM::*; use super::*; -use crate::messaging::{transports::xcm::new_query, Config}; +use crate::{ + messaging::{transports::xcm::new_query, Config}, + TryConvert, +}; sol!( #![sol(extra_derives(Debug, PartialEq))] @@ -32,6 +35,7 @@ impl< where BlockNumberOf: From, u32: From>, + U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, { type Interface = IXCMCalls; type T = T; @@ -257,7 +261,10 @@ impl EncodeCallback for Response { } } -impl TryFrom<&Callback> for super::Callback { +impl TryFrom<&Callback> for super::Callback +where + U256: TryConvert, +{ type Error = Error; fn try_from(callback: &Callback) -> Result { @@ -265,7 +272,8 @@ impl TryFrom<&Callback> for super::Callback { (*callback.destination.0).into(), (&callback.encoding).try_into()?, callback.selector.0, - (&callback.weight).into(), + (&callback.gasLimit).into(), + callback.storageDepositLimit.try_convert()?, )) } } @@ -331,7 +339,7 @@ mod tests { type XcmQueryTimeouts = crate::messaging::XcmQueryTimeouts; const ADDRESS: [u8; 20] = fixed_address(XCM); - const MESSAGE_DEPOSIT: u128 = 129_440; + const MESSAGE_DEPOSIT: u128 = 129_600; #[test] fn block_number_works() { @@ -522,7 +530,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new().build().execute_with(|| { let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); @@ -539,7 +548,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new().build().execute_with(|| { let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); @@ -556,7 +566,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new().build().execute_with(|| { let current_block = frame_system::Pallet::::block_number(); @@ -582,7 +593,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; ExtBuilder::new().build().execute_with(|| { let input = newQuery_1(newQuery_1Call { responder, timeout, callback }); @@ -599,7 +611,8 @@ mod tests { destination: [255u8; 20].into(), encoding: super::Encoding::Scale, selector: [255u8; 4].into(), - weight: super::Weight { refTime: 100, proofSize: 10 }, + gasLimit: super::Weight { refTime: 100, proofSize: 10 }, + storageDepositLimit: U256::from(100), }; let message = 1; let query_id = 2; diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index f498b4f04..9b9e40b81 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -469,8 +469,9 @@ mod xcm_response { let id = 1; let query_id = 42; let response = Response::ExecutionResult(None); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into()); - let callback_fee = WeightToFee::weight_to_fee(&callback.weight); + let callback = + Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into(), 100u8.into()); + let callback_fee = WeightToFee::weight_to_fee(&callback.gas_limit); let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_fee; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), endowment)]) @@ -495,7 +496,7 @@ mod xcm_response { let id = 1; let query_id = 42; let response = Response::ExecutionResult(None); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Zero::zero()); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Zero::zero(), 0); let endowment = existential_deposit() + deposit() + xcm_response_fee(); ExtBuilder::new() .with_balances(vec![(origin.account.clone(), endowment)]) @@ -570,7 +571,7 @@ mod call { fn assert_error_event() { let origin = ALICE; let weight = Weight::from_parts(100_000, 100_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight, 100_000); let message_id = 1; let data = vec![100u8; 5]; ExtBuilder::new().build().execute_with(|| { @@ -592,7 +593,7 @@ mod call { fn block_weight_mutation_happens() { let origin = ALICE; let weight = Weight::from_parts(10_000_000, 10_000_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0u8; 4], weight, 10_000_000); let id = 1; let data = vec![100u8; 5]; let callback_fee = ::WeightToFee::weight_to_fee(&weight); @@ -659,7 +660,7 @@ mod deposit_callback_event { let origin = ALICE; let message_id = 1; let weight = Weight::from_parts(100_000, 100_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight, 100_000); let result: DispatchResultWithPostInfo = Ok(PostDispatchInfo { actual_weight: Some(Weight::from_parts(1_000, 0)), pays_fee: Default::default(), @@ -677,7 +678,7 @@ mod deposit_callback_event { let origin = BOB; let message_id = 2; let weight = Weight::from_parts(100_000, 100_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [0; 4], weight, 100_000); let result = DispatchResultWithPostInfo::Err(DispatchErrorWithPostInfo { post_info: Default::default(), error: Error::InvalidMessage.into(), diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index 58d9bbfe0..abc7fb812 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -52,7 +52,7 @@ pub(crate) fn get( origin: Origin, message: DispatchGet, fee: BalanceOf, - callback: Option, + callback: Option>>, ) -> Result<(MessageId, H256), DispatchError> { // Take deposits and fees. let message_deposit = @@ -66,7 +66,7 @@ pub(crate) fn get( T::Fungibles::hold( &HoldReason::CallbackGas.into(), &origin.account, - T::WeightToFee::weight_to_fee(&cb.weight), + T::WeightToFee::weight_to_fee(&cb.gas_limit), )?; } @@ -107,7 +107,7 @@ pub(crate) fn post( origin: Origin, message: DispatchPost, fee: BalanceOf, - callback: Option, + callback: Option>>, ) -> Result<(MessageId, H256), DispatchError> { // Take deposits and fees. let message_deposit = @@ -121,7 +121,7 @@ pub(crate) fn post( T::Fungibles::hold( &HoldReason::CallbackGas.into(), &origin.account, - T::WeightToFee::weight_to_fee(&cb.weight), + T::WeightToFee::weight_to_fee(&cb.gas_limit), )?; } @@ -201,7 +201,7 @@ pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), any let Some(Message::Ismp { origin, commitment, message_deposit, callback }) = message else { return Err(::ismp::Error::Custom("Invalid message".into())); }; - let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.weight)); + let callback_deposit = callback.map(|cb| T::WeightToFee::weight_to_fee(&cb.gas_limit)); *message = Some(Message::IsmpTimeout { origin: origin.address, message_deposit: *message_deposit, @@ -322,7 +322,8 @@ mod tests { fn takes_deposit() { let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback = + Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight, 100_000_000); let callback_deposit = WeightToFee::weight_to_fee(&weight); let fee: Balance = u32::MAX.into(); let expected_deposit = calculate_protocol_deposit::( @@ -412,7 +413,8 @@ mod tests { fn takes_deposit() { let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback = + Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight, 100_000_000); let callback_deposit = ::WeightToFee::weight_to_fee(&weight); let fee: Balance = u32::MAX.into(); let expected_deposit = @@ -571,7 +573,8 @@ mod tests { let response = vec![1u8]; let commitment = H256::default(); let id = 1; - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into()); + let callback = + Callback::new(H160::zero(), Encoding::Scale, [1; 4], 100.into(), 100); let message_deposit = 100; let message = Message::ismp(origin.clone(), commitment, Some(callback), message_deposit); diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs index f64699b3c..7fabe3fdc 100644 --- a/pallets/api-vnext/src/messaging/transports/xcm.rs +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -21,7 +21,7 @@ pub(crate) fn new_query( origin: Origin, responder: Location, timeout: BlockNumberOf, - callback: Option, + callback: Option>>, ) -> Result<(MessageId, QueryId), DispatchError> { let querier_location = T::OriginConverter::try_convert(T::RuntimeOrigin::signed(origin.account.clone())) @@ -49,7 +49,7 @@ pub(crate) fn new_query( T::Fungibles::hold( &HoldReason::CallbackGas.into(), &origin.account, - T::WeightToFee::weight_to_fee(&cb.weight), + T::WeightToFee::weight_to_fee(&cb.gas_limit), )?; callback_execution_weight = T::CallbackExecutor::execution_weight(); @@ -172,7 +172,7 @@ pub(crate) mod tests { fn takes_response_fee_with_callback() { let origin = Origin::from((ALICE_ADDR, ALICE)); let response_fee = xcm_response_fee(); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Weight::zero()); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], Weight::zero(), 0); let endowment = existential_deposit() + deposit() + response_fee; ExtBuilder::new() .with_balances(vec![(origin.account.clone(), endowment)]) @@ -198,7 +198,7 @@ pub(crate) mod tests { fn takes_callback_hold() { let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight, 100_000_000); let callback_deposit = WeightToFee::weight_to_fee(&weight); let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_deposit; ExtBuilder::new() @@ -249,7 +249,7 @@ pub(crate) mod tests { fn assert_state() { let origin = Origin::from((ALICE_ADDR, ALICE)); let weight = Weight::from_parts(100_000_000, 100_000_000); - let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight); + let callback = Callback::new(H160::zero(), Encoding::Scale, [1; 4], weight, 100_000_000); let callback_deposit = WeightToFee::weight_to_fee(&weight); let endowment = existential_deposit() + deposit() + xcm_response_fee() + callback_deposit; let id = 1; @@ -336,7 +336,7 @@ pub(crate) mod tests { origin: Origin, responder: Location, timeout: u32, - callback: Option, + callback: Option>, ) -> Result<(MessageId, QueryId), DispatchError> { with_transaction(|| { let result = super::new_query::(origin, responder, timeout, callback); diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index c0663bf09..0fab33b1c 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_api_vnext :: messaging` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.0.0 -//! DATE: 2025-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-07-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `R0GUE`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("pop-devnet-dev")`, DB CACHE: `1024` @@ -84,13 +84,13 @@ impl WeightInfo for SubstrateWeight { // Measured: `804` // Estimated: `804` // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(134_854_162, 804) - // Standard Error: 5_027 - .saturating_add(Weight::from_parts(34_184, 0).saturating_mul(x.into())) - // Standard Error: 30_837 - .saturating_add(Weight::from_parts(252_129, 0).saturating_mul(y.into())) - // Standard Error: 207_842 - .saturating_add(Weight::from_parts(943_656, 0).saturating_mul(a.into())) + Weight::from_parts(131_889_747, 804) + // Standard Error: 5_180 + .saturating_add(Weight::from_parts(62_262, 0).saturating_mul(x.into())) + // Standard Error: 31_775 + .saturating_add(Weight::from_parts(439_891, 0).saturating_mul(y.into())) + // Standard Error: 214_160 + .saturating_add(Weight::from_parts(2_319_052, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -105,10 +105,10 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[0, 1]`. fn ismp_on_response(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `563` + // Measured: `579` // Estimated: `16247` - // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(102_659_183, 16247) + // Minimum execution time: 92_000_000 picoseconds. + Weight::from_parts(104_006_122, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -119,7 +119,7 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[0, 2]`. fn ismp_on_timeout(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `348` + // Measured: `364` // Estimated: `16247` // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(16_000_000, 16247) @@ -134,12 +134,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 105_000_000 picoseconds. - Weight::from_parts(103_541_555, 804) - // Standard Error: 261 - .saturating_add(Weight::from_parts(7_149, 0).saturating_mul(x.into())) - // Standard Error: 87_369 - .saturating_add(Weight::from_parts(32_325_090, 0).saturating_mul(y.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(107_194_583, 804) + // Standard Error: 155 + .saturating_add(Weight::from_parts(3_884, 0).saturating_mul(x.into())) + // Standard Error: 51_969 + .saturating_add(Weight::from_parts(31_110_845, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -164,10 +164,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(65_000_000, 3694) - // Standard Error: 45_546 - .saturating_add(Weight::from_parts(53_133_747, 0).saturating_mul(x.into())) + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_000_000, 3694) + // Standard Error: 56_164 + .saturating_add(Weight::from_parts(53_183_887, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -194,9 +194,9 @@ impl WeightInfo for SubstrateWeight { // Measured: `342` // Estimated: `4279` // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(68_483_673, 4279) - // Standard Error: 231_861 - .saturating_add(Weight::from_parts(20_516_326, 0).saturating_mul(x.into())) + Weight::from_parts(69_644_897, 4279) + // Standard Error: 171_660 + .saturating_add(Weight::from_parts(20_555_102, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -210,9 +210,9 @@ impl WeightInfo for SubstrateWeight { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn xcm_response() -> Weight { // Proof Size summary in bytes: - // Measured: `531` + // Measured: `547` // Estimated: `16247` - // Minimum execution time: 79_000_000 picoseconds. + // Minimum execution time: 80_000_000 picoseconds. Weight::from_parts(81_000_000, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -258,13 +258,13 @@ impl WeightInfo for () { // Measured: `804` // Estimated: `804` // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(134_854_162, 804) - // Standard Error: 5_027 - .saturating_add(Weight::from_parts(34_184, 0).saturating_mul(x.into())) - // Standard Error: 30_837 - .saturating_add(Weight::from_parts(252_129, 0).saturating_mul(y.into())) - // Standard Error: 207_842 - .saturating_add(Weight::from_parts(943_656, 0).saturating_mul(a.into())) + Weight::from_parts(131_889_747, 804) + // Standard Error: 5_180 + .saturating_add(Weight::from_parts(62_262, 0).saturating_mul(x.into())) + // Standard Error: 31_775 + .saturating_add(Weight::from_parts(439_891, 0).saturating_mul(y.into())) + // Standard Error: 214_160 + .saturating_add(Weight::from_parts(2_319_052, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -279,10 +279,10 @@ impl WeightInfo for () { /// The range of component `x` is `[0, 1]`. fn ismp_on_response(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `563` + // Measured: `579` // Estimated: `16247` - // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(102_659_183, 16247) + // Minimum execution time: 92_000_000 picoseconds. + Weight::from_parts(104_006_122, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -293,7 +293,7 @@ impl WeightInfo for () { /// The range of component `x` is `[0, 2]`. fn ismp_on_timeout(_x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `348` + // Measured: `364` // Estimated: `16247` // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(16_000_000, 16247) @@ -308,12 +308,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 105_000_000 picoseconds. - Weight::from_parts(103_541_555, 804) - // Standard Error: 261 - .saturating_add(Weight::from_parts(7_149, 0).saturating_mul(x.into())) - // Standard Error: 87_369 - .saturating_add(Weight::from_parts(32_325_090, 0).saturating_mul(y.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(107_194_583, 804) + // Standard Error: 155 + .saturating_add(Weight::from_parts(3_884, 0).saturating_mul(x.into())) + // Standard Error: 51_969 + .saturating_add(Weight::from_parts(31_110_845, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -338,10 +338,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(65_000_000, 3694) - // Standard Error: 45_546 - .saturating_add(Weight::from_parts(53_133_747, 0).saturating_mul(x.into())) + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_000_000, 3694) + // Standard Error: 56_164 + .saturating_add(Weight::from_parts(53_183_887, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -368,9 +368,9 @@ impl WeightInfo for () { // Measured: `342` // Estimated: `4279` // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(68_483_673, 4279) - // Standard Error: 231_861 - .saturating_add(Weight::from_parts(20_516_326, 0).saturating_mul(x.into())) + Weight::from_parts(69_644_897, 4279) + // Standard Error: 171_660 + .saturating_add(Weight::from_parts(20_555_102, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -384,9 +384,9 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn xcm_response() -> Weight { // Proof Size summary in bytes: - // Measured: `531` + // Measured: `547` // Estimated: `16247` - // Minimum execution time: 79_000_000 picoseconds. + // Minimum execution time: 80_000_000 picoseconds. Weight::from_parts(81_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index c4764193d..fc82dd2bd 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -223,10 +223,11 @@ pub(super) mod messaging { _account: &::AccountId, _contract: H160, _data: Vec, - weight: sp_runtime::Weight, + gas_limit: sp_runtime::Weight, + _storage_deposit_limit: BalanceOf, ) -> frame_support::dispatch::DispatchResultWithPostInfo { DispatchResultWithPostInfo::Ok(PostDispatchInfo { - actual_weight: Some(weight / 2), + actual_weight: Some(gas_limit / 2), pays_fee: Pays::Yes, }) } From f76ace4253fd6c2ab45efba3a11cf77413e083ec Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 14:32:13 +0100 Subject: [PATCH 248/284] fix(api): allow specification of storage deposit limit for callback --- pop-api-vnext/src/messaging/ismp/v0.rs | 2 +- pop-api-vnext/src/messaging/v0.rs | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index af89fbb56..be64c0c94 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -289,7 +289,7 @@ impl Post { /// A verified storage value. #[ink::scale_derive(Encode, Decode, TypeInfo)] -#[derive(Debug, ink::SolDecode, ink::SolEncode)] +#[derive(Clone, Debug, ink::SolDecode, ink::SolEncode)] pub struct StorageValue { /// The request storage key. pub key: Bytes, diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index 794506bdb..c046f170f 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -69,7 +69,9 @@ pub struct Callback { /// The message selector to be used for the callback. selector: FixedBytes<4>, /// The pre-paid weight used as a gas limit for the callback. - weight: Weight, + gas_limit: Weight, + /// The storage deposit limit for the callback. + storage_deposit_limit: U256, } impl Callback { @@ -79,9 +81,22 @@ impl Callback { /// - `destination` - The contract address to which the callback should be sent. /// - `encoding` - The encoding used for the data going to the contract. /// - `selector` - The message selector to be used for the callback. - /// - `weight` - The pre-paid weight used as a gas limit for the callback. - pub fn new(destination: Address, encoding: Encoding, selector: u32, weight: Weight) -> Self { - Self { destination, encoding, selector: SolBytes(selector.to_be_bytes()), weight } + /// - `gas_limit` - The pre-paid weight used as a gas limit for the callback. + /// - `storage_deposit_limit` - The storage deposit limit for the callback. + pub fn new( + destination: Address, + encoding: Encoding, + selector: u32, + gas_limit: Weight, + storage_deposit_limit: U256, + ) -> Self { + Self { + destination, + encoding, + selector: SolBytes(selector.to_be_bytes()), + gas_limit, + storage_deposit_limit, + } } } From e4634bcb46212aa86157ec1dd50e532fb015eb9d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 14:34:25 +0100 Subject: [PATCH 249/284] test(api): ensure storage deposit limit works Also adjusts gas limits based on contract changes. --- .../contracts/messaging/lib.rs | 38 +++++++++++++--- .../integration-tests/src/messaging.rs | 44 ++++++++++--------- 2 files changed, 57 insertions(+), 25 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index e3efff740..72f461eae 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] -use ink::{abi::Sol, contract_ref, prelude::vec::Vec, U256}; +use ink::{abi::Sol, contract_ref, prelude::vec::Vec, storage::Mapping, U256}; use pop_api::{ messaging::{ self as api, @@ -19,13 +19,16 @@ pub mod messaging { use super::*; #[ink(storage)] - pub struct Messaging; + pub struct Messaging { + /// Successful responses. + responses: Mapping, + } impl Messaging { #[ink(constructor, default, payable)] #[allow(clippy::new_without_default)] pub fn new() -> Self { - Self {} + Self { responses: Mapping::new() } } } @@ -47,12 +50,18 @@ pub mod messaging { #[ink(message)] fn remove(&self, message: MessageId) -> Result<(), Error> { - api::remove(message) + api::remove(message)?; + self.responses.remove(&message); + Ok(()) } #[ink(message)] fn removeMany(&self, messages: Vec) -> Result<(), Error> { - api::remove_many(messages) + for message in &messages { + self.responses.remove(message); + } + api::remove_many(messages)?; + Ok(()) } } @@ -93,6 +102,10 @@ pub mod messaging { impl OnGetResponse for Messaging { #[ink(message)] fn onGetResponse(&mut self, id: MessageId, response: Vec) { + // Adding state requires storage deposit limit to be defined on callback. Deposit is + // moved from caller to contract and placed on hold. Deposit is claimed by anyone that + // removes state, so adequate controls should be implemented by contract as desired. + self.responses.insert(id, &Response::IsmpGet(response.clone())); self.env().emit_event(IsmpGetCompleted { id, response }); } } @@ -100,6 +113,10 @@ pub mod messaging { impl OnPostResponse for Messaging { #[ink(message)] fn onPostResponse(&mut self, id: MessageId, response: Bytes) { + // Adding state requires storage deposit limit to be defined on callback. Deposit is + // moved from caller to contract and placed on hold. Deposit is claimed by anyone that + // removes state, so adequate controls should be implemented by contract as desired. + self.responses.insert(id, &Response::IsmpPost(response.0.clone())); self.env().emit_event(IsmpPostCompleted { id, response }); } } @@ -140,7 +157,18 @@ pub mod messaging { impl OnQueryResponse for Messaging { #[ink(message)] fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { + // Adding state requires storage deposit limit to be defined on callback. Deposit is + // moved from caller to contract and placed on hold. Deposit is claimed by anyone that + // removes state, so adequate controls should be implemented by contract as desired. + self.responses.insert(id, &Response::XcmQuery(response.0.clone())); self.env().emit_event(XcmCompleted { id, result: response }); } } + + #[ink::scale_derive(Encode, Decode, TypeInfo)] + enum Response { + IsmpGet(Vec), + IsmpPost(Vec), + XcmQuery(Vec), + } } diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index b3c9affa1..4944609c4 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -127,7 +127,8 @@ mod ismp { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0x9bf78ffbu32.into(), - weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + gasLimit: Weight { refTime: 1_100_000_000, proofSize: 110_000 }, + storageDepositLimit: alloy::U256::from(1 * UNIT / 5) }; let id = contract.get(request, U256::zero(), Some(callback.clone())).unwrap(); assert_eq!(contract.poll_status(id), MessageStatus::Pending); @@ -161,6 +162,12 @@ mod ismp { System::assert_has_event( IsmpGetResponseReceived { dest: contract.address, id, commitment }.into(), ); + assert!(System::events().iter().any(|e| { + matches!(&e.event, + RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) + if origin == &contract.account_id() && *message_id == id + ) + })); assert_eq!( contract.last_event(), @@ -177,12 +184,6 @@ mod ismp { .encode() ); assert_eq!(contract.poll_status(id), MessageStatus::NotFound); - assert!(System::events().iter().any(|e| { - matches!(&e.event, - RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) - if origin == &contract.account_id() && *message_id == id - ) - })); }); } @@ -252,7 +253,8 @@ mod ismp { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0xbe910d67u32.into(), - weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + gasLimit: Weight { refTime: 850_000_000, proofSize: 110_000 }, + storageDepositLimit: alloy::U256::from(1 * UNIT / 5) }; let id = contract.post(request, U256::zero(), Some(callback.clone())).unwrap(); assert_eq!(contract.poll_status(id), MessageStatus::Pending); @@ -283,17 +285,18 @@ mod ismp { System::assert_has_event( IsmpPostResponseReceived { dest: contract.address, id, commitment }.into(), ); - assert_eq!( - contract.last_event(), - IsmpPostCompleted { id, response: SolBytes(response) }.encode() - ); - assert_eq!(contract.poll_status(id), MessageStatus::NotFound); assert!(System::events().iter().any(|e| { matches!(&e.event, RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) if origin == &contract.account_id() && *message_id == id ) })); + + assert_eq!( + contract.last_event(), + IsmpPostCompleted { id, response: SolBytes(response) }.encode() + ); + assert_eq!(contract.poll_status(id), MessageStatus::NotFound); }); } @@ -449,7 +452,8 @@ mod xcm { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0x97dbf9fbu32.into(), - weight: Weight { refTime: 900_000_000, proofSize: 150_000 }, + gasLimit: Weight { refTime: 850_000_000, proofSize: 110_000 }, + storageDepositLimit: alloy::U256::from(1 * UNIT / 5), }; let (id, query_id) = contract.new_query(responder.encode(), timeout, Some(callback.clone())).unwrap(); @@ -476,18 +480,18 @@ mod xcm { query_id, response.clone() )); - - assert_eq!( - contract.last_event(), - XcmCompleted { id, result: SolBytes(response.encode()) }.encode() - ); - assert_eq!(contract.poll_status(id), MessageStatus::NotFound); assert!(System::events().iter().any(|e| { matches!(&e.event, RuntimeEvent::Messaging(CallbackExecuted { origin, id: message_id, ..}) if origin == &contract.account_id() && *message_id == id ) })); + + assert_eq!( + contract.last_event(), + XcmCompleted { id, result: SolBytes(response.encode()) }.encode() + ); + assert_eq!(contract.poll_status(id), MessageStatus::NotFound); }); } From 24e87f8b64b638f8d4b4bfcb20b5d4a49eaebc4a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 14:35:40 +0100 Subject: [PATCH 250/284] refactor(devnet): update callbackexecutor.execute implementation to use storage deposit limit --- runtime/devnet/src/config/api/mod.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/runtime/devnet/src/config/api/mod.rs b/runtime/devnet/src/config/api/mod.rs index 7d48b8ce6..27a6e1015 100644 --- a/runtime/devnet/src/config/api/mod.rs +++ b/runtime/devnet/src/config/api/mod.rs @@ -17,8 +17,8 @@ use versioning::*; use crate::{ config::assets::{TrustBackedAssetsInstance, TrustBackedNftsInstance}, - fungibles, nonfungibles, AccountId, Balances, BlockNumber, DealWithFees, Ismp, Runtime, - RuntimeCall, RuntimeHoldReason, TransactionByteFee, H160, + fungibles, nonfungibles, AccountId, Balance, Balances, BlockNumber, DealWithFees, Ismp, + Runtime, RuntimeCall, RuntimeHoldReason, TransactionByteFee, H160, }; mod versioning; @@ -272,7 +272,8 @@ mod messaging { account: &AccountId, contract: H160, data: Vec, - weight: Weight, + gas_limit: Weight, + storage_deposit_limit: Balance, ) -> DispatchResultWithPostInfo { use frame_support::dispatch::DispatchErrorWithPostInfo; use pallet_revive::DepositLimit; @@ -283,9 +284,8 @@ mod messaging { RuntimeOrigin::signed(account.clone()), contract, Default::default(), - weight, - // TODO: expose? - DepositLimit::Balance(Default::default()), + gas_limit, + DepositLimit::Balance(storage_deposit_limit), data, ); @@ -319,10 +319,11 @@ mod messaging { _account: &AccountId, _contract: H160, _data: Vec, - weight: sp_runtime::Weight, + gas_limit: Weight, + _storage_deposit_limit: Balance, ) -> frame_support::dispatch::DispatchResultWithPostInfo { DispatchResultWithPostInfo::Ok(PostDispatchInfo { - actual_weight: Some(weight / 2), + actual_weight: Some(gas_limit / 2), pays_fee: Pays::Yes, }) } From bc66a6712fdf0b113bc4f10b9e5c1a696a38f514 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 15:50:17 +0100 Subject: [PATCH 251/284] refactor(api): update messaging example contract with storage deposit limit --- pop-api-vnext/examples/messaging/lib.rs | 192 ++++++++++++++++++------ 1 file changed, 143 insertions(+), 49 deletions(-) diff --git a/pop-api-vnext/examples/messaging/lib.rs b/pop-api-vnext/examples/messaging/lib.rs index 8b14a6396..86a68af69 100644 --- a/pop-api-vnext/examples/messaging/lib.rs +++ b/pop-api-vnext/examples/messaging/lib.rs @@ -4,6 +4,7 @@ use ink::{ env::hash::{Blake2x256, CryptoHash}, prelude::vec::Vec, scale::{DecodeAll, Encode}, + storage::Mapping, xcm::{ prelude::{ AccountId32, All, Asset, OriginKind, Parachain, QueryId, QueryResponseInfo, @@ -20,7 +21,7 @@ use pop_api::{ ismp::{self, Get, OnGetResponse, StorageValue}, xcm::{self, Location, OnQueryResponse}, Bytes, Callback, Encoding, MessageId, - MessageStatus::Complete, + MessageStatus::*, Weight, }, revert, @@ -31,14 +32,13 @@ use pop_api::{ #[ink::contract] mod messaging { - use self::Error::*; use super::*; + use Error::{DecodingFailed, NoPermission, Overflow}; #[cfg(ink_abi = "sol")] const ENCODING: Encoding = Encoding::SolidityAbi; #[cfg(any(ink_abi = "all", ink_abi = "ink"))] const ENCODING: Encoding = Encoding::Scale; - const UNAUTHORIZED: u32 = u32::MAX; /// A contract for interacting with chains. #[ink(storage)] @@ -46,7 +46,11 @@ mod messaging { /// The owner of the contract. owner: Address, /// The weight to be used for callback responses to this contract. - weight: Weight, + gas_limit: Weight, + /// The storage deposit limit for callback responses to this contract. + storage_deposit_limit: U256, + /// The local message queue. + messages: Mapping, } impl Messaging { @@ -54,7 +58,53 @@ mod messaging { #[ink(constructor, payable)] #[allow(clippy::new_without_default)] pub fn new() -> Self { - Self { owner: Self::env().caller(), weight: Weight::from_parts(800_000_000, 500_000) } + Self { + owner: Self::env().caller(), + gas_limit: Weight::from_parts(800_000_000, 500_000), + storage_deposit_limit: U256::zero(), // Currently no storage changes on callback. + messages: Mapping::new(), + } + } + + /// Complete a message. + /// + /// # Parameters + /// - `id` - The identifier of the message. + /// + /// NOTE: Only callable by the requestor of the message. + #[ink(message)] + pub fn complete(&mut self, id: MessageId) -> Result, Error> { + match api::poll_status(id) { + NotFound => Err(Error::NotFound), + Pending => Err(Error::Pending), + Complete => { + // Only requestor can remove messages. + ensure!( + self.messages.get(&id).as_ref() == Some(&self.env().caller()), + NoPermission + ); + let result = api::get_response(id); + if let Err(error) = api::remove(id) { + revert(&error) + } + self.messages.remove(&id); + self.env().emit_event(Completed { id, result: result.clone() }); + Ok(Some(result)) + }, + Timeout => { + // Only requestor can remove messages. + ensure!( + self.messages.get(&id).as_ref() == Some(&self.env().caller()), + NoPermission + ); + if let Err(error) = api::remove(id) { + revert(&error) + } + self.messages.remove(&id); + self.env().emit_event(TimedOut { id }); + Ok(None) + }, + } } /// Request some state from a chain at the specified keys and block height. @@ -64,17 +114,29 @@ mod messaging { /// - `keys` - The storage key(s) used to query state from the remote parachain. /// - `height` - The block height at which to read the state. #[ink(message)] - pub fn get(&mut self, dest: u32, keys: Vec, height: u64) -> Result<(), ismp::Error> { + pub fn get( + &mut self, + dest: u32, + keys: Vec, + height: u64, + ) -> Result { let id = ismp::get( Get::new(dest, height, 0, SolBytes(Vec::default()), keys.clone()), U256::zero(), - Some(Callback::new(self.env().address(), ENCODING, 0x9bf78ffb, self.weight)), + Some(Callback::new( + self.env().address(), + ENCODING, + 0x9bf78ffb, + self.gas_limit, + self.storage_deposit_limit, + )), )?; + self.messages.insert(id, &self.env().caller()); self.env().emit_event(IsmpRequested { id, keys, height }); - Ok(()) + Ok(id) } - /// Funds the contract's account on the destination chain. + /// Funds the contract's associated account on the destination chain. /// /// # Parameters /// - `dest` - The identifier of the destination chain. @@ -110,8 +172,36 @@ mod messaging { Ok(()) } + /// Sets the limits used for callback responses. + /// + /// # Parameters + /// - `gas_limit` - The new gas limit. + /// - `storage_deposit_limit` - The new storage deposit limit. + #[ink(message)] + pub fn set_limits( + &mut self, + gas_limit: Weight, + storage_deposit_limit: U256, + ) -> Result<(), Error> { + ensure!(self.env().caller() == self.owner, NoPermission); + self.gas_limit = gas_limit; + self.storage_deposit_limit = storage_deposit_limit; + Ok(()) + } + + /// Sends the provided encoded `call` to a destination chain for execution. + /// + /// # Parameters + /// - `dest` - The identifier of the destination chain. + /// - `call` - The encoded call to be dispatched on the destination chain. + /// - `weight` - The weight limit for dispatching the call on the destination chain. #[ink(message, payable)] - pub fn transact(&mut self, dest: u32, call: Vec, weight: Weight) -> Result<(), Error> { + pub fn transact( + &mut self, + dest: u32, + call: Vec, + weight: Weight, + ) -> Result { let dest = Location::new(1, Parachain(dest)); let call = DoubleEncoded::<()>::decode_all(&mut &call[..]).map_err(|_| DecodingFailed)?; @@ -120,7 +210,13 @@ mod messaging { let (id, query_id) = xcm::new_query( dest.clone(), self.env().block_number().saturating_add(100), - Some(Callback::new(self.env().address(), ENCODING, 0x97dbf9fb, self.weight)), + Some(Callback::new( + self.env().address(), + ENCODING, + 0x97dbf9fb, + self.gas_limit, + self.storage_deposit_limit, + )), ); // TODO: provide an api function for determining the max weight value for processing the @@ -141,17 +237,23 @@ mod messaging { if let Err(error) = xcm::send(dest.into_versioned(), VersionedXcm::V5(message)) { revert(&error) } + self.messages.insert(id, &self.env().caller()); self.env().emit_event(XcmRequested { id, query_id, hash }); - Ok(()) + + Ok(id) } + /// Transfer the ownership of the contract to another account. + /// + /// # Parameters + /// - `owner` - New owner account. + /// + /// NOTE: the specified owner account is not checked, allowing the zero address to be + /// specified if desired.. #[ink(message)] - pub fn complete(&mut self, id: MessageId) -> Result<(), api::Error> { - if api::poll_status(id) == Complete { - let result = api::get_response(id); - api::remove(id)?; - self.env().emit_event(Completed { id, result }); - } + pub fn transfer_ownership(&mut self, owner: Address) -> Result<(), Error> { + ensure!(self.env().caller() == self.owner, NoPermission); + self.owner = owner; Ok(()) } @@ -180,41 +282,13 @@ mod messaging { .report_transact_status(response) .build() } - - /// Transfer the ownership of the contract to another account. - /// - /// # Parameters - /// - `owner` - New owner account. - /// - /// NOTE: the specified owner account is not checked, allowing the zero address to be - /// specified if desired.. - #[ink(message)] - pub fn transfer_ownership(&mut self, owner: Address) -> Result<(), Error> { - ensure!(self.env().caller() == self.owner, NoPermission); - self.owner = owner; - Ok(()) - } - - /// Sets the weight used for callback responses. - /// - /// # Parameters - /// - `owner` - New owner account. - /// - /// NOTE: the specified owner account is not checked, allowing the zero address to be - /// specified if desired.. - #[ink(message)] - pub fn set_weight(&mut self, weight: Weight) -> Result<(), Error> { - ensure!(self.env().caller() == self.owner, NoPermission); - self.weight = weight; - Ok(()) - } } impl OnGetResponse for Messaging { #[ink(message)] fn onGetResponse(&mut self, id: MessageId, values: Vec) { if self.env().caller() != self.env().address() { - revert(&UNAUTHORIZED); + revert(&NoPermission); } self.env().emit_event(GetCompleted { id, values }); } @@ -224,21 +298,35 @@ mod messaging { #[ink(message)] fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { if self.env().caller() != self.env().address() { - revert(&UNAUTHORIZED); + revert(&NoPermission); } self.env().emit_event(XcmCompleted { id, result: response }); } } - #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorDecode, ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { DecodingFailed, NoPermission, + NotFound, + Pending, Overflow, } + // Implementing `SolEncode` for `Error` to use variants directly with `revert`. + impl<'a> ink::SolEncode<'a> for Error { + type SolType = (); + + fn encode(&'a self) -> Vec { + ink::primitives::sol::SolErrorEncode::encode(self) + } + + fn to_sol_type(&'a self) -> Self::SolType { + () + } + } + #[ink::event] pub struct IsmpRequested { #[ink(topic)] @@ -284,4 +372,10 @@ mod messaging { pub id: MessageId, pub values: Vec, } + + #[ink::event] + pub struct TimedOut { + #[ink(topic)] + pub id: MessageId, + } } From 3cd2f5a24fb1d17384b494bd865c2dbf9bdb7ddf Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 16:54:09 +0100 Subject: [PATCH 252/284] fix(pallets/api): allow caller to specify ismp post recipient module/address --- pallets/api-vnext/src/messaging.rs | 3 + .../api-vnext/src/messaging/benchmarking.rs | 3 + .../precompiles/interfaces/v0/IISMP.sol | 4 + .../src/messaging/precompiles/ismp/v0.rs | 51 +++++++-- pallets/api-vnext/src/messaging/weights.rs | 108 +++++++++--------- pallets/api-vnext/src/mock.rs | 1 + 6 files changed, 110 insertions(+), 60 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index f9448b4e9..d96831d50 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -80,6 +80,9 @@ pub mod pallet { /// The maximum number of keys for an outbound request. #[pallet::constant] type MaxKeys: Get; + /// The maximum length of the receiving module identifier/address on a destination chain. + #[pallet::constant] + type MaxRecipientLen: Get; /// The maximum number of messages which can be removed at a time. #[pallet::constant] type MaxRemovals: Get; diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index d7b91429f..7082d3799 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -289,6 +289,7 @@ mod benchmarks { /// Sends a `Post` request using ISMP with a variable-sized data payload. /// /// # Parameters + /// - `t`: `Linear<0, { T::MaxRecipientLen::get() }>` Length of the `to` field (in bytes). /// - `x`: `Linear<0, { T::MaxDataLen::get() }>` Length of the `data` field (in bytes). /// - `y`: `Linear<0, 1>` Whether a callback is attached: /// - `0`: No callback @@ -301,12 +302,14 @@ mod benchmarks { // `pallet-revive` benchmarks for similar usage with contract child tries. #[benchmark(skip_meta, pov_mode = Measured)] fn ismp_post( + t: Linear<0, { T::MaxRecipientLen::get() }>, x: Linear<0, { T::MaxDataLen::get() }>, y: Linear<0, 1>, ) -> Result<(), BenchmarkError> { let origin = Origin::from_address::(ALICE_ADDR); let request = ismp::Post { destination: u32::MAX, + to: vec![255; t as usize].into(), timeout: u64::MAX, data: vec![255; x as usize].into(), }; diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index 9f250821e..3960eaa9c 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -109,6 +109,8 @@ interface IISMP { struct Post { /// @custom:property The destination state machine of this request. uint32 destination; + /// @custom:property The receiving module identifier/contract address on the destination chain. + bytes to; /// @custom:property Relative from the current timestamp at which this request expires in seconds. uint64 timeout; /// @custom:property Encoded request data. @@ -173,6 +175,8 @@ interface IISMP { error MaxKeyExceeded(); /// @dev The number of keys exceeds the maximum allowed size. error MaxKeysExceeded(); + /// @dev The length of the receiving module identifier/address exceeds the maximum allowed size. + error MaxRecipientExceeded(); } /** diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 7ef99fa41..3a3ea485a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -123,6 +123,11 @@ where }, IISMPCalls::post_0(post_0Call { request, fee }) => { env.charge(::WeightInfo::ismp_post( + request + .to + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, request .data .len() @@ -145,6 +150,11 @@ where }, IISMPCalls::post_1(post_1Call { request, fee, callback }) => { env.charge(::WeightInfo::ismp_post( + request + .to + .len() + .try_into() + .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, request .data .len() @@ -233,6 +243,7 @@ impl_from_sol_error! { IISMP::MaxDataExceeded, IISMP::MaxKeyExceeded, IISMP::MaxKeysExceeded, + IISMP::MaxRecipientExceeded, InvalidEncoding, MessageNotFound, RequestPending, @@ -257,11 +268,12 @@ fn try_get(value: &Get) -> Result { } fn try_post(value: &Post) -> Result { + ensure!(value.to.len() as u32 <= T::MaxRecipientLen::get(), IISMP::MaxRecipientExceeded); ensure!(value.data.len() as u32 <= T::MaxDataLen::get(), IISMP::MaxDataExceeded); Ok(DispatchPost { dest: StateMachine::Polkadot(value.destination), from: ID.into(), - to: ID.into(), + to: value.to.to_vec(), timeout: value.timeout, body: value.data.to_vec(), }) @@ -388,6 +400,7 @@ mod tests { type MaxDataLen = ::MaxDataLen; type MaxKeyLen = ::MaxKeyLen; type MaxKeys = ::MaxKeys; + type MaxRecipientLen = ::MaxRecipientLen; type MaxRemovals = ::MaxRemovals; type Messages = crate::messaging::Messages; @@ -574,11 +587,28 @@ mod tests { }); } + #[test] + fn post_reverts_when_max_recipient_exceeded() { + let origin = ALICE; + let request = IISMP::Post { + destination: 0, + to: vec![255u8; >::get() as usize + 1].into(), + timeout: u64::default(), + data: vec![255u8; >::get() as usize].into(), + }; + let fee = U256::from(100); + ExtBuilder::new().build().execute_with(|| { + let input = post_0(post_0Call { request, fee }); + assert_revert!(call_precompile::(&origin, &input), MaxRecipientExceeded); + }); + } + #[test] fn post_reverts_when_max_data_exceeded() { let origin = ALICE; let request = IISMP::Post { destination: 0, + to: vec![255u8; >::get() as usize].into(), timeout: u64::default(), data: vec![255u8; >::get() as usize + 1].into(), }; @@ -593,8 +623,12 @@ mod tests { fn post_works() { let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; - let request = - IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; + let request = IISMP::Post { + destination: 1_000, + to: vec![255u8; 20].into(), + timeout: u64::MAX, + data: vec![255u8; 1024].into(), + }; let fee = U256::from(100); ExtBuilder::new() .with_balances(vec![(origin.account.clone(), 1 * UNIT)]) // message deposit @@ -622,8 +656,12 @@ mod tests { fn post_with_callback_works() { let origin = Origin::from((ALICE_ADDR, ALICE)); let message = 1; - let request = - IISMP::Post { destination: 1_000, timeout: u64::MAX, data: vec![255u8; 1024].into() }; + let request = IISMP::Post { + destination: 1_000, + to: vec![255u8; 20].into(), + timeout: u64::MAX, + data: vec![255u8; 1024].into(), + }; let fee = U256::from(100); let callback = Callback { destination: [255u8; 20].into(), @@ -838,8 +876,7 @@ mod tests { dest: StateMachine::Polkadot(request.destination), nonce: pallet_ismp::Nonce::::get(), from: ID.to_vec(), - // TODO: check this is correct: https://github.com/r0gue-io/pop-node/blob/messaging-base/pallets/api/src/messaging/transports/ismp.rs#L105 - to: ID.to_vec(), + to: request.to.to_vec(), timeout_timestamp: Timestamp::now().as_secs() + request.timeout, body: request.data.to_vec(), }) diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index 0fab33b1c..394a6ce87 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -37,7 +37,7 @@ pub trait WeightInfo { fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight; fn ismp_on_response(x: u32, ) -> Weight; fn ismp_on_timeout(x: u32, ) -> Weight; - fn ismp_post(x: u32, y: u32, ) -> Weight; + fn ismp_post(t: u32, x: u32, y: u32, ) -> Weight; fn poll_status() -> Weight; fn remove(x: u32, ) -> Weight; fn xcm_new_query(x: u32, ) -> Weight; @@ -71,7 +71,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `69` // Estimated: `1489` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 1489) + Weight::from_parts(4_000_000, 1489) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -83,14 +83,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(131_889_747, 804) - // Standard Error: 5_180 - .saturating_add(Weight::from_parts(62_262, 0).saturating_mul(x.into())) - // Standard Error: 31_775 - .saturating_add(Weight::from_parts(439_891, 0).saturating_mul(y.into())) - // Standard Error: 214_160 - .saturating_add(Weight::from_parts(2_319_052, 0).saturating_mul(a.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(132_978_245, 804) + // Standard Error: 5_114 + .saturating_add(Weight::from_parts(28_532, 0).saturating_mul(x.into())) + // Standard Error: 31_371 + .saturating_add(Weight::from_parts(322_835, 0).saturating_mul(y.into())) + // Standard Error: 211_440 + .saturating_add(Weight::from_parts(1_186_089, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -108,7 +108,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `579` // Estimated: `16247` // Minimum execution time: 92_000_000 picoseconds. - Weight::from_parts(104_006_122, 16247) + Weight::from_parts(102_528_571, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -128,18 +128,19 @@ impl WeightInfo for SubstrateWeight { } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `t` is `[0, 32]`. /// The range of component `x` is `[0, 512]`. /// The range of component `y` is `[0, 1]`. - fn ismp_post(x: u32, y: u32, ) -> Weight { + fn ismp_post(_t: u32, x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(107_194_583, 804) - // Standard Error: 155 - .saturating_add(Weight::from_parts(3_884, 0).saturating_mul(x.into())) - // Standard Error: 51_969 - .saturating_add(Weight::from_parts(31_110_845, 0).saturating_mul(y.into())) + // Minimum execution time: 106_000_000 picoseconds. + Weight::from_parts(105_574_719, 804) + // Standard Error: 496 + .saturating_add(Weight::from_parts(8_255, 0).saturating_mul(x.into())) + // Standard Error: 162_629 + .saturating_add(Weight::from_parts(32_041_162, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -165,9 +166,9 @@ impl WeightInfo for SubstrateWeight { // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_000_000, 3694) - // Standard Error: 56_164 - .saturating_add(Weight::from_parts(53_183_887, 0).saturating_mul(x.into())) + Weight::from_parts(18_768_116, 3694) + // Standard Error: 27_866 + .saturating_add(Weight::from_parts(52_133_104, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -193,10 +194,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `342` // Estimated: `4279` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(69_644_897, 4279) - // Standard Error: 171_660 - .saturating_add(Weight::from_parts(20_555_102, 0).saturating_mul(x.into())) + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_587_755, 4279) + // Standard Error: 155_971 + .saturating_add(Weight::from_parts(20_412_244, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -212,8 +213,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `547` // Estimated: `16247` - // Minimum execution time: 80_000_000 picoseconds. - Weight::from_parts(81_000_000, 16247) + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(79_000_000, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -245,7 +246,7 @@ impl WeightInfo for () { // Measured: `69` // Estimated: `1489` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 1489) + Weight::from_parts(4_000_000, 1489) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -257,14 +258,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 109_000_000 picoseconds. - Weight::from_parts(131_889_747, 804) - // Standard Error: 5_180 - .saturating_add(Weight::from_parts(62_262, 0).saturating_mul(x.into())) - // Standard Error: 31_775 - .saturating_add(Weight::from_parts(439_891, 0).saturating_mul(y.into())) - // Standard Error: 214_160 - .saturating_add(Weight::from_parts(2_319_052, 0).saturating_mul(a.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(132_978_245, 804) + // Standard Error: 5_114 + .saturating_add(Weight::from_parts(28_532, 0).saturating_mul(x.into())) + // Standard Error: 31_371 + .saturating_add(Weight::from_parts(322_835, 0).saturating_mul(y.into())) + // Standard Error: 211_440 + .saturating_add(Weight::from_parts(1_186_089, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -282,7 +283,7 @@ impl WeightInfo for () { // Measured: `579` // Estimated: `16247` // Minimum execution time: 92_000_000 picoseconds. - Weight::from_parts(104_006_122, 16247) + Weight::from_parts(102_528_571, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -302,18 +303,19 @@ impl WeightInfo for () { } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `t` is `[0, 32]`. /// The range of component `x` is `[0, 512]`. /// The range of component `y` is `[0, 1]`. - fn ismp_post(x: u32, y: u32, ) -> Weight { + fn ismp_post(_t: u32, x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(107_194_583, 804) - // Standard Error: 155 - .saturating_add(Weight::from_parts(3_884, 0).saturating_mul(x.into())) - // Standard Error: 51_969 - .saturating_add(Weight::from_parts(31_110_845, 0).saturating_mul(y.into())) + // Minimum execution time: 106_000_000 picoseconds. + Weight::from_parts(105_574_719, 804) + // Standard Error: 496 + .saturating_add(Weight::from_parts(8_255, 0).saturating_mul(x.into())) + // Standard Error: 162_629 + .saturating_add(Weight::from_parts(32_041_162, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -339,9 +341,9 @@ impl WeightInfo for () { // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_000_000, 3694) - // Standard Error: 56_164 - .saturating_add(Weight::from_parts(53_183_887, 0).saturating_mul(x.into())) + Weight::from_parts(18_768_116, 3694) + // Standard Error: 27_866 + .saturating_add(Weight::from_parts(52_133_104, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -367,10 +369,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `342` // Estimated: `4279` - // Minimum execution time: 67_000_000 picoseconds. - Weight::from_parts(69_644_897, 4279) - // Standard Error: 171_660 - .saturating_add(Weight::from_parts(20_555_102, 0).saturating_mul(x.into())) + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(67_587_755, 4279) + // Standard Error: 155_971 + .saturating_add(Weight::from_parts(20_412_244, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -386,8 +388,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `547` // Estimated: `16247` - // Minimum execution time: 80_000_000 picoseconds. - Weight::from_parts(81_000_000, 16247) + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(79_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/pallets/api-vnext/src/mock.rs b/pallets/api-vnext/src/mock.rs index fc82dd2bd..af6f5124c 100644 --- a/pallets/api-vnext/src/mock.rs +++ b/pallets/api-vnext/src/mock.rs @@ -189,6 +189,7 @@ pub(super) mod messaging { type MaxDataLen = ConstU32<1024>; type MaxKeyLen = ConstU32<32>; type MaxKeys = ConstU32<10>; + type MaxRecipientLen = ConstU32<32>; type MaxRemovals = ConstU32<1024>; type MaxResponseLen = ConstU32<1024>; type MaxXcmQueryTimeoutsPerBlock = MaxXcmQueryTimeoutsPerBlock; From a9bfc9372354d9dd33889c338963a43aaefc2a20 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 16:54:42 +0100 Subject: [PATCH 253/284] fix(api): allow caller to specify ismp post recipient module/address --- pop-api-vnext/src/messaging/ismp/v0.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index be64c0c94..b2dce7e19 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -269,6 +269,8 @@ impl Get { pub struct Post { /// The destination state machine of this request. pub destination: u32, + /// The receiving module identifier/contract address on the destination chain. + pub to: Bytes, /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Encoded request data. @@ -280,10 +282,11 @@ impl Post { /// /// # Parameters /// - `destination` - The destination state machine of this request. + /// - `to` - The receiving module identifier/contract address on the destination chain. /// - `timeout` - Relative from the current timestamp at which this request expires in seconds. /// - `data` - Encoded request data. - pub fn new(destination: u32, timeout: u64, data: Vec) -> Self { - Self { destination, timeout, data: SolBytes(data) } + pub fn new(destination: u32, to: Bytes, timeout: u64, data: Vec) -> Self { + Self { destination, to, timeout, data: SolBytes(data) } } } From 49caa0c51298e3e2fe179f187b6d70b5d959cd17 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 16:55:23 +0100 Subject: [PATCH 254/284] test(api): specify ismp post recipient mpdule/address --- pop-api-vnext/integration-tests/src/messaging.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index 4944609c4..1dca73297 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -191,8 +191,12 @@ mod ismp { fn post_works() { let origin = ALICE; let timeout = 100_000u64; - let request = - Post { destination: HYPERBRIDGE, timeout, data: b"some_data".to_vec().into() }; + let request = Post { + destination: HYPERBRIDGE, + to: vec![255u8; 20].into(), + timeout, + data: b"some_data".to_vec().into(), + }; let response = b"some_value".to_vec(); // Create a post request. @@ -240,8 +244,12 @@ mod ismp { fn post_with_callback_works() { let origin = ALICE; let timeout = 100_000u64; - let request = - Post { destination: HYPERBRIDGE, timeout, data: b"some_data".to_vec().into() }; + let request = Post { + destination: HYPERBRIDGE, + to: vec![255u8; 20].into(), + timeout, + data: b"some_data".to_vec().into(), + }; let response = b"some_value".to_vec(); // Create a post request with callback. From 1f5b54017b1d5034665639ce86708105acf72300 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 16:56:21 +0100 Subject: [PATCH 255/284] refactor(devnet): configure max ismp post module/address length as 32 bytes --- runtime/devnet/src/config/api/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/devnet/src/config/api/mod.rs b/runtime/devnet/src/config/api/mod.rs index 27a6e1015..fc45577ac 100644 --- a/runtime/devnet/src/config/api/mod.rs +++ b/runtime/devnet/src/config/api/mod.rs @@ -250,6 +250,7 @@ mod messaging { type MaxDataLen = ConstU32<512>; type MaxKeyLen = ConstU32<8>; type MaxKeys = ConstU32<10>; + type MaxRecipientLen = ConstU32<32>; // TODO: size appropriately type MaxRemovals = ConstU32<100>; // TODO: ensure within the contract buffer bounds From c46539a80da7c4e0aa1962cc12b63877b6273f5d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 17:00:36 +0100 Subject: [PATCH 256/284] docs(pallets/api): remove messageid size todo u64::MAX provides a sufficiently large number for message identifier and aligns with the same type used by XCM for query identifiers. --- pallets/api-vnext/src/messaging.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index d96831d50..4a2c0b05a 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -42,7 +42,7 @@ mod weights; pub(crate) type BalanceOf = <::Fungibles as Inspect>>::Balance; type BlockNumberOf = BlockNumberFor; type DbWeightOf = ::DbWeight; -pub type MessageId = u64; // TODO: determine why this was changed to [u8; 32] - U256?; +pub type MessageId = u64; #[frame_support::pallet] pub mod pallet { From 373e721e50de5d015fcadb7a96c39eaaa73c138e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 20:48:36 +0100 Subject: [PATCH 257/284] refactor(pallets/api): add simple on_accept benchmark for consistency, along with supporting module weight tests --- .../api-vnext/src/messaging/benchmarking.rs | 32 ++++- .../src/messaging/transports/ismp.rs | 109 +++++++++++--- pallets/api-vnext/src/messaging/weights.rs | 135 ++++++++++-------- 3 files changed, 196 insertions(+), 80 deletions(-) diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 7082d3799..511184025 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -44,7 +44,7 @@ use super::{ }, set_up_call, transports::{ - ismp::{get, post, Handler, ID}, + ismp::{get, post, Module, ID}, xcm::new_query, }, Call, Callback, Config, Encoding, Event, HoldReason, IsmpRequests, Message, MessageId, @@ -196,6 +196,28 @@ mod benchmarks { Ok(()) } + /// Handles acceptance of an ISMP POST. + #[benchmark] + fn ismp_on_accept() { + let module = Module::::new(); + let request = PostRequest { + source: StateMachine::Polkadot(u32::MAX), + dest: StateMachine::Polkadot(u32::MAX), + nonce: u64::MAX, + from: [255u8; 32].to_vec(), + to: [255u8; 32].to_vec(), + timeout_timestamp: u64::MAX, + body: vec![255u8; T::MaxDataLen::get() as usize], + }; + + silence_timestamp_genesis_warnings::(); + + #[block] + { + module.on_accept(request).unwrap() + } + } + /// Handles a response to a previously submitted ISMP request. /// /// # Parameters @@ -213,7 +235,7 @@ mod benchmarks { Weight::from_parts(100_000, 100_000), 100_000u32.into(), ); - let handler = Handler::::new(); + let module = Module::::new(); silence_timestamp_genesis_warnings::(); >::set_balance(&origin.account, u32::MAX.into()); @@ -223,7 +245,7 @@ mod benchmarks { #[block] { - handler.on_response(response).unwrap() + module.on_response(response).unwrap() } let event = match x { @@ -253,7 +275,7 @@ mod benchmarks { Weight::from_parts(100_000, 100_000), 100_000u32.into(), ); - let handler = Handler::::new(); + let module = Module::::new(); silence_timestamp_genesis_warnings::(); >::set_balance(&origin.account, u32::MAX.into()); @@ -279,7 +301,7 @@ mod benchmarks { #[block] { - handler.on_timeout(timeout).unwrap() + module.on_timeout(timeout).unwrap() } assert_has_event::(Event::::IsmpTimedOut { commitment }.into()); diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index abc7fb812..dcbecac62 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -20,7 +20,6 @@ use super::{ *, }; -type DbWeightOf = ::DbWeight; type GetState = ( StateMachine, [u8; 4], @@ -215,21 +214,22 @@ pub(crate) fn timeout_commitment(commitment: &H256) -> Result<(), any Ok(()) } -pub struct Handler(PhantomData); -impl Default for Handler { +pub struct Module(PhantomData); +impl Default for Module { fn default() -> Self { Self::new() } } -impl Handler { +impl Module { pub fn new() -> Self { Self(PhantomData) } } -impl IsmpModule for Handler { +impl IsmpModule for Module { fn on_accept(&self, _request: PostRequest) -> Result<(), anyhow::Error> { + // ISMP POSTs are currently not supported. Ok(()) } @@ -267,10 +267,9 @@ impl IsmpModule for Handler { } } -impl IsmpModuleWeight for Pallet { - // Static as not in use. +impl IsmpModuleWeight for Module { fn on_accept(&self, _request: &PostRequest) -> Weight { - DbWeightOf::::get().reads_writes(1, 1) + T::WeightInfo::ismp_on_accept() } fn on_timeout(&self, timeout: &Timeout) -> Weight { @@ -288,9 +287,9 @@ impl IsmpModuleWeight for Pallet { Response::Get(_) => 0, Response::Post(_) => 1, }; - + T::WeightInfo::ismp_on_response(x) // Also add actual weight consumed by contract env. - T::WeightInfo::ismp_on_response(x).saturating_add(T::CallbackExecutor::execution_weight()) + .saturating_add(T::CallbackExecutor::execution_weight()) } } @@ -391,7 +390,7 @@ mod tests { ) } - fn message() -> DispatchGet { + pub(super) fn message() -> DispatchGet { DispatchGet { dest: StateMachine::Polkadot(u32::MAX), from: ID.into(), @@ -482,7 +481,7 @@ mod tests { ) } - fn message() -> DispatchPost { + pub(super) fn message() -> DispatchPost { DispatchPost { dest: StateMachine::Polkadot(u32::MAX), from: ID.to_vec(), @@ -503,10 +502,10 @@ mod tests { /// If an error is returned the receipt is not removed and a replay attack is possible. #[test] fn is_ok() { - let handler = handler(); - ExtBuilder::new() - .build() - .execute_with(|| assert!(handler.on_accept(post_request(100usize)).is_ok())) + let module = module(); + ExtBuilder::new().build().execute_with(|| { + assert!(IsmpModule::on_accept(&module, post_request(100usize)).is_ok()) + }) } } @@ -694,11 +693,11 @@ mod tests { } } - fn handler() -> ismp::Handler { - ismp::Handler::::new() + fn module() -> ismp::Module { + ismp::Module::::new() } - fn post_request(body_len: usize) -> PostRequest { + pub(super) fn post_request(body_len: usize) -> PostRequest { PostRequest { source: StateMachine::Polkadot(2000), dest: StateMachine::Polkadot(2001), @@ -711,6 +710,78 @@ mod tests { } } + mod weight { + use ::ismp::router::GetRequest; + + use super::{CallbackExecutor as _, WeightInfo as _, *}; + + type CallbackExecutor = ::CallbackExecutor; + type Module = super::Module; + type WeightInfo = ::WeightInfo; + + #[test] + fn on_accept() { + assert_eq!( + IsmpModuleWeight::on_accept(&Module::new(), &ismp_hooks::post_request(100)), + WeightInfo::ismp_on_accept() + ) + } + + #[test] + fn on_response() { + let module = Module::new(); + for (response, x) in + [(Response::Get(get_response()), 0), (Response::Post(post_response()), 1)] + { + assert_eq!( + IsmpModuleWeight::on_response(&module, &response), + WeightInfo::ismp_on_response(x) + .saturating_add(CallbackExecutor::execution_weight()) + ); + } + } + + #[test] + fn on_timeout() { + let module = Module::new(); + for (response, x) in [ + (Timeout::Request(Request::Get(get_request())), 0), + (Timeout::Request(Request::Post(ismp_hooks::post_request(100))), 1), + (Timeout::Response(post_response()), 2), + ] { + assert_eq!( + IsmpModuleWeight::on_timeout(&module, &response), + WeightInfo::ismp_on_timeout(x) + ); + } + } + + fn get_request() -> GetRequest { + GetRequest { + source: StateMachine::Polkadot(0), + dest: StateMachine::Polkadot(0), + nonce: 0, + from: Vec::default(), + keys: Vec::default(), + height: 0, + context: Vec::default(), + timeout_timestamp: 0, + } + } + + fn get_response() -> GetResponse { + GetResponse { get: get_request(), values: Vec::default() } + } + + fn post_response() -> PostResponse { + PostResponse { + post: ismp_hooks::post_request(100), + response: Vec::default(), + timeout_timestamp: 0, + } + } + } + fn existential_deposit() -> Balance { >::get() } diff --git a/pallets/api-vnext/src/messaging/weights.rs b/pallets/api-vnext/src/messaging/weights.rs index 394a6ce87..c8c174e8b 100644 --- a/pallets/api-vnext/src/messaging/weights.rs +++ b/pallets/api-vnext/src/messaging/weights.rs @@ -35,6 +35,7 @@ pub trait WeightInfo { fn get_response() -> Weight; fn id() -> Weight; fn ismp_get(x: u32, y: u32, a: u32, ) -> Weight; + fn ismp_on_accept() -> Weight; fn ismp_on_response(x: u32, ) -> Weight; fn ismp_on_timeout(x: u32, ) -> Weight; fn ismp_post(t: u32, x: u32, y: u32, ) -> Weight; @@ -83,17 +84,24 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(132_978_245, 804) - // Standard Error: 5_114 - .saturating_add(Weight::from_parts(28_532, 0).saturating_mul(x.into())) - // Standard Error: 31_371 - .saturating_add(Weight::from_parts(322_835, 0).saturating_mul(y.into())) - // Standard Error: 211_440 - .saturating_add(Weight::from_parts(1_186_089, 0).saturating_mul(a.into())) + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(136_900_792, 804) + // Standard Error: 5_248 + .saturating_add(Weight::from_parts(30_612, 0).saturating_mul(x.into())) + // Standard Error: 32_193 + .saturating_add(Weight::from_parts(234_612, 0).saturating_mul(y.into())) + // Standard Error: 216_975 + .saturating_add(Weight::from_parts(707_725, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } + fn ismp_on_accept() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + } /// Storage: `Messaging::IsmpRequests` (r:1 w:1) /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) @@ -108,7 +116,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `579` // Estimated: `16247` // Minimum execution time: 92_000_000 picoseconds. - Weight::from_parts(102_528_571, 16247) + Weight::from_parts(104_000_000, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -117,12 +125,14 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Messaging::Messages` (r:1 w:1) /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 2]`. - fn ismp_on_timeout(_x: u32, ) -> Weight { + fn ismp_on_timeout(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `364` // Estimated: `16247` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 16247) + Weight::from_parts(15_990_331, 16247) + // Standard Error: 18_842 + .saturating_add(Weight::from_parts(133_977, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -131,16 +141,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `t` is `[0, 32]`. /// The range of component `x` is `[0, 512]`. /// The range of component `y` is `[0, 1]`. - fn ismp_post(_t: u32, x: u32, y: u32, ) -> Weight { + fn ismp_post(t: u32, x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 106_000_000 picoseconds. - Weight::from_parts(105_574_719, 804) - // Standard Error: 496 - .saturating_add(Weight::from_parts(8_255, 0).saturating_mul(x.into())) - // Standard Error: 162_629 - .saturating_add(Weight::from_parts(32_041_162, 0).saturating_mul(y.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(107_002_678, 804) + // Standard Error: 2_159 + .saturating_add(Weight::from_parts(23_191, 0).saturating_mul(t.into())) + // Standard Error: 137 + .saturating_add(Weight::from_parts(4_775, 0).saturating_mul(x.into())) + // Standard Error: 44_992 + .saturating_add(Weight::from_parts(31_581_977, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -165,10 +177,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(18_768_116, 3694) - // Standard Error: 27_866 - .saturating_add(Weight::from_parts(52_133_104, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(13_124_518, 3694) + // Standard Error: 13_474 + .saturating_add(Weight::from_parts(53_672_400, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -194,10 +206,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `342` // Estimated: `4279` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_587_755, 4279) - // Standard Error: 155_971 - .saturating_add(Weight::from_parts(20_412_244, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(69_351_020, 4279) + // Standard Error: 152_852 + .saturating_add(Weight::from_parts(21_048_979, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -213,8 +225,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `547` // Estimated: `16247` - // Minimum execution time: 78_000_000 picoseconds. - Weight::from_parts(79_000_000, 16247) + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(81_000_000, 16247) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -258,17 +270,24 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 108_000_000 picoseconds. - Weight::from_parts(132_978_245, 804) - // Standard Error: 5_114 - .saturating_add(Weight::from_parts(28_532, 0).saturating_mul(x.into())) - // Standard Error: 31_371 - .saturating_add(Weight::from_parts(322_835, 0).saturating_mul(y.into())) - // Standard Error: 211_440 - .saturating_add(Weight::from_parts(1_186_089, 0).saturating_mul(a.into())) + // Minimum execution time: 109_000_000 picoseconds. + Weight::from_parts(136_900_792, 804) + // Standard Error: 5_248 + .saturating_add(Weight::from_parts(30_612, 0).saturating_mul(x.into())) + // Standard Error: 32_193 + .saturating_add(Weight::from_parts(234_612, 0).saturating_mul(y.into())) + // Standard Error: 216_975 + .saturating_add(Weight::from_parts(707_725, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } + fn ismp_on_accept() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + } /// Storage: `Messaging::IsmpRequests` (r:1 w:1) /// Proof: `Messaging::IsmpRequests` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) /// Storage: `Messaging::Messages` (r:1 w:1) @@ -283,7 +302,7 @@ impl WeightInfo for () { // Measured: `579` // Estimated: `16247` // Minimum execution time: 92_000_000 picoseconds. - Weight::from_parts(102_528_571, 16247) + Weight::from_parts(104_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -292,12 +311,14 @@ impl WeightInfo for () { /// Storage: `Messaging::Messages` (r:1 w:1) /// Proof: `Messaging::Messages` (`max_values`: None, `max_size`: Some(12782), added: 15257, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 2]`. - fn ismp_on_timeout(_x: u32, ) -> Weight { + fn ismp_on_timeout(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `364` // Estimated: `16247` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 16247) + Weight::from_parts(15_990_331, 16247) + // Standard Error: 18_842 + .saturating_add(Weight::from_parts(133_977, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -306,16 +327,18 @@ impl WeightInfo for () { /// The range of component `t` is `[0, 32]`. /// The range of component `x` is `[0, 512]`. /// The range of component `y` is `[0, 1]`. - fn ismp_post(_t: u32, x: u32, y: u32, ) -> Weight { + fn ismp_post(t: u32, x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `804` // Estimated: `804` - // Minimum execution time: 106_000_000 picoseconds. - Weight::from_parts(105_574_719, 804) - // Standard Error: 496 - .saturating_add(Weight::from_parts(8_255, 0).saturating_mul(x.into())) - // Standard Error: 162_629 - .saturating_add(Weight::from_parts(32_041_162, 0).saturating_mul(y.into())) + // Minimum execution time: 108_000_000 picoseconds. + Weight::from_parts(107_002_678, 804) + // Standard Error: 2_159 + .saturating_add(Weight::from_parts(23_191, 0).saturating_mul(t.into())) + // Standard Error: 137 + .saturating_add(Weight::from_parts(4_775, 0).saturating_mul(x.into())) + // Standard Error: 44_992 + .saturating_add(Weight::from_parts(31_581_977, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -340,10 +363,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `421 + x * (109 ±0)` // Estimated: `3694 + x * (15257 ±0)` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(18_768_116, 3694) - // Standard Error: 27_866 - .saturating_add(Weight::from_parts(52_133_104, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(13_124_518, 3694) + // Standard Error: 13_474 + .saturating_add(Weight::from_parts(53_672_400, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -369,10 +392,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `342` // Estimated: `4279` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(67_587_755, 4279) - // Standard Error: 155_971 - .saturating_add(Weight::from_parts(20_412_244, 0).saturating_mul(x.into())) + // Minimum execution time: 67_000_000 picoseconds. + Weight::from_parts(69_351_020, 4279) + // Standard Error: 152_852 + .saturating_add(Weight::from_parts(21_048_979, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -388,8 +411,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `547` // Estimated: `16247` - // Minimum execution time: 78_000_000 picoseconds. - Weight::from_parts(79_000_000, 16247) + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(81_000_000, 16247) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } From b15db2f7dc6a77d1b1348703337faabfc5bd36ae Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 20:49:14 +0100 Subject: [PATCH 258/284] refactor(devnet): name ismp module via import alias --- runtime/devnet/src/config/ismp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/devnet/src/config/ismp.rs b/runtime/devnet/src/config/ismp.rs index 3ee7b815d..30b689205 100644 --- a/runtime/devnet/src/config/ismp.rs +++ b/runtime/devnet/src/config/ismp.rs @@ -47,9 +47,9 @@ impl Get for HostStateMachine { pub struct Router; impl IsmpRouter for Router { fn module_for_id(&self, id: Vec) -> Result, anyhow::Error> { - use pallet_api_vnext::messaging::transports::ismp::*; + use pallet_api_vnext::messaging::transports::ismp::{Module as Messaging, *}; if id == ID { - return Ok(Box::new(Handler::::new())); + return Ok(Box::new(Messaging::::new())); } Err(Error::ModuleNotFound(id).into()) } From 9ed2280fb051da05a40d0e8bbc5e31a1d8c77b02 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 21:04:33 +0100 Subject: [PATCH 259/284] refactor(devnet): add ismp weight provider --- runtime/devnet/src/config/ismp.rs | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/runtime/devnet/src/config/ismp.rs b/runtime/devnet/src/config/ismp.rs index 30b689205..793f91381 100644 --- a/runtime/devnet/src/config/ismp.rs +++ b/runtime/devnet/src/config/ismp.rs @@ -21,7 +21,7 @@ impl pallet_ismp::Config for Runtime { type Router = Router; type RuntimeEvent = RuntimeEvent; type TimestampProvider = Timestamp; - type WeightProvider = (); + type WeightProvider = WeightProvider; } impl ismp_parachain::Config for Runtime { @@ -47,10 +47,24 @@ impl Get for HostStateMachine { pub struct Router; impl IsmpRouter for Router { fn module_for_id(&self, id: Vec) -> Result, anyhow::Error> { - use pallet_api_vnext::messaging::transports::ismp::{Module as Messaging, *}; - if id == ID { - return Ok(Box::new(Messaging::::new())); + use pallet_api_vnext::messaging::transports::ismp as messaging; + match id { + id if id == messaging::ID => Ok(Box::new(messaging::Module::::new())), + _ => Err(Error::ModuleNotFound(id).into()), + } + } +} + +pub struct WeightProvider; +impl pallet_ismp::weights::WeightProvider for WeightProvider { + fn module_callback( + dest_module: pallet_ismp::ModuleId, + ) -> Option> { + use pallet_api_vnext::messaging::transports::ismp as messaging; + match dest_module.to_bytes() { + dest_module if dest_module == messaging::ID => + Some(Box::new(messaging::Module::::new())), + _ => None, } - Err(Error::ModuleNotFound(id).into()) } } From 15a86fc05e78b1873a667e9fbfbd48f4e498d380 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 21:09:57 +0100 Subject: [PATCH 260/284] docs(pallets/api): remove todo after tests added --- pallets/api-vnext/src/messaging/transports/ismp.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index dcbecac62..a5ea7393f 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -281,7 +281,6 @@ impl IsmpModuleWeight for Module { T::WeightInfo::ismp_on_timeout(x) } - // todo: test fn on_response(&self, response: &Response) -> Weight { let x = match response { Response::Get(_) => 0, From 032ba824d73ebd5584604a0fb613061d1024a4cc Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 29 Jul 2025 21:35:27 +0100 Subject: [PATCH 261/284] test(pallets/api): add integrity test to ensure maxresponselen --- pallets/api-vnext/src/messaging.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 4a2c0b05a..de712d601 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -160,6 +160,14 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { + fn integrity_test() { + assert!( + T::MaxResponseLen::get() as usize > Response::max_encoded_len(), + "MaxResponseLen should be greater than the maximum encoded length of a XCM \ + Response" + ); + } + fn on_initialize(n: BlockNumberOf) -> Weight { // As of polkadot-2412 XCM timeouts are not handled by the implementation of OnResponse // in pallet-xcm. As a result, we must handle timeouts in the pallet. From 719caa1317d0418514e8fd24c9ec224ca6857486 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 30 Jul 2025 10:09:27 +0100 Subject: [PATCH 262/284] refactor(pallets/api): update integrity test to include values --- pallets/api-vnext/src/messaging.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index de712d601..fdeb5ad60 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -161,10 +161,12 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn integrity_test() { + let max_response_len = T::MaxResponseLen::get() as usize; + let response_max_encoded_len = Response::max_encoded_len(); assert!( - T::MaxResponseLen::get() as usize > Response::max_encoded_len(), - "MaxResponseLen should be greater than the maximum encoded length of a XCM \ - Response" + max_response_len > response_max_encoded_len, + "MaxResponseLen ({max_response_len}) should be greater than the maximum encoded \ + length of an XCM Response ({response_max_encoded_len})" ); } From 435784eda029fd2059fe94111a35ad50ed406132 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 07:22:33 +0100 Subject: [PATCH 263/284] refactor(pallets/api): update tryconvert usages to dispatcherror after rebase --- pallets/api-vnext/src/lib.rs | 1 - pallets/api-vnext/src/messaging/benchmarking.rs | 7 +++---- .../api-vnext/src/messaging/precompiles/ismp/v0.rs | 11 ++++++++--- pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs | 7 +++++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index beb9ea254..7bee2a72d 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -50,7 +50,6 @@ pub mod messaging; mod mock; type AccountIdOf = ::AccountId; -type AddressMapper = ::AddressMapper; type Assets = pallet_assets::Pallet; // A bare call to a contract. diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 511184025..3eddca537 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -17,7 +17,7 @@ use codec::Encode; use frame_benchmarking::v2::*; use frame_support::{ assert_ok, - pallet_prelude::{IsType, Weight}, + pallet_prelude::{DispatchError, IsType, Weight}, traits::{ fungible::{Inspect, Mutate, MutateHold}, EnsureOrigin, Get, Time, @@ -27,7 +27,6 @@ use pallet_revive::{ precompiles::{ alloy::primitives as alloy, run::{H256, U256}, - Error, }, test_utils::ALICE_ADDR, Origin::Signed, @@ -69,8 +68,8 @@ type Xcm = super::precompiles::xcm::v0::Xcm<5, T>; Time: Time> >, // Messaging - T: Config>>, - alloy::U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, + T: Config>>, + alloy::U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = DispatchError>, T: pallet_ismp::Config + pallet_xcm::Config + parachain_info::Config, u32: From>, // Timestamp diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 3a3ea485a..02fb4a924 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -27,10 +27,15 @@ impl< T: frame_system::Config + pallet_revive::Config + parachain_info::Config - + Config>>, + + Config< + Fungibles: Inspect>, + >, > Precompile for Ismp where - U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, + U256: TryConvert< + <::Fungibles as Inspect>::Balance, + Error = DispatchError, + >, { type Interface = IISMPCalls; type T = T; @@ -331,7 +336,7 @@ impl EncodeCallback for Vec { impl TryFrom<&Callback> for super::Callback where - U256: TryConvert, + U256: TryConvert, { type Error = Error; diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index b22bfc538..01167555f 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -35,7 +35,10 @@ impl< where BlockNumberOf: From, u32: From>, - U256: TryConvert<<::Fungibles as Inspect>::Balance, Error = Error>, + U256: TryConvert< + <::Fungibles as Inspect>::Balance, + Error = DispatchError, + >, { type Interface = IXCMCalls; type T = T; @@ -263,7 +266,7 @@ impl EncodeCallback for Response { impl TryFrom<&Callback> for super::Callback where - U256: TryConvert, + U256: TryConvert, { type Error = Error; From 30e8cb00f76399a90edea7b2556a70d44cd4b62e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 07:23:47 +0100 Subject: [PATCH 264/284] chore: update cargo.lock --- Cargo.lock | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 8c9fd5433..18d1a2df9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9951,17 +9951,26 @@ dependencies = [ name = "pallet-api-vnext" version = "0.1.0" dependencies = [ + "anyhow", "base64 0.22.1", "frame-benchmarking 41.0.0", "frame-support 41.0.0", "frame-system 41.0.0", + "ismp", + "log", "pallet-assets 43.0.0", "pallet-balances 42.0.0", + "pallet-ismp", "pallet-revive 0.7.0", "pallet-timestamp 40.0.0", + "pallet-xcm 20.1.0", "parity-scale-codec", "scale-info", "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-parachain-info 0.21.0", + "staging-xcm 17.0.0", + "staging-xcm-builder 21.0.0", ] [[package]] @@ -15033,11 +15042,14 @@ dependencies = [ "frame-support 41.0.0", "frame-system 41.0.0", "hex", + "ismp", "log", "pallet-api-vnext", "pallet-assets 43.0.0", "pallet-balances 42.0.0", + "pallet-ismp", "pallet-revive 0.7.0", + "pallet-xcm 20.1.0", "parity-scale-codec", "pop-api 0.1.0", "pop-primitives", @@ -15045,6 +15057,8 @@ dependencies = [ "pop-runtime-testnet", "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "staging-xcm 17.0.0", + "staging-xcm-executor 20.0.0", ] [[package]] From 7abda7be3653560b562672ba203b8c0aa82426c9 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 07:24:16 +0100 Subject: [PATCH 265/284] chore(api): update cargo.lock for messaging contract --- .../contracts/messaging/Cargo.lock | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock index 7e6bdecfe..a5a4faddf 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock @@ -2299,7 +2299,7 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "const_format", "deranged", @@ -2325,7 +2325,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "cfg-if", ] @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2372,7 +2372,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "blake2", "cfg-if", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "blake2", "either", @@ -2421,7 +2421,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "ink_codegen", "ink_ir", @@ -2436,7 +2436,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "cfg-if", ] @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2487,7 +2487,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "array-init", "cfg-if", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" dependencies = [ "ink_metadata", "ink_prelude", From 28ab13e3ec4154264a7034d0f20252b49468d77c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 07:47:06 +0100 Subject: [PATCH 266/284] refactor(pallets/api): use improved origin --- pallets/api-vnext/src/lib.rs | 15 ++++++ pallets/api-vnext/src/messaging.rs | 47 ++----------------- .../api-vnext/src/messaging/benchmarking.rs | 20 ++++---- .../src/messaging/precompiles/ismp/v0.rs | 15 +++--- .../api-vnext/src/messaging/precompiles/v0.rs | 5 +- .../src/messaging/precompiles/xcm/v0.rs | 9 ++-- pallets/api-vnext/src/messaging/tests.rs | 3 +- .../src/messaging/transports/ismp.rs | 5 +- .../api-vnext/src/messaging/transports/xcm.rs | 5 +- 9 files changed, 54 insertions(+), 70 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 7bee2a72d..32454668c 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -215,6 +215,21 @@ impl TryFrom> for Origin { } } +#[cfg(test)] +impl From<(H160, T::AccountId)> for Origin { + fn from((address, account): (H160, T::AccountId)) -> Self { + Self { address, account } + } +} + +#[cfg(feature = "runtime-benchmarks")] +impl Origin { + pub fn from_address(address: H160) -> Self { + let account = ::AddressMapper::to_account_id(&address); + Self { address, account } + } +} + /// Creates a new `RuntimeOrigin` from an ['Origin']. pub fn to_runtime_origin( o: pallet_revive::Origin, diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index fdeb5ad60..851c6a4c7 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -624,7 +624,7 @@ pub(crate) fn process_callback_weight( /// # Parameters /// - `origin`: The account removing its messages. /// - `messages`: List of message IDs to remove (bounded by `MaxRemovals`). -fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { +fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { for id in >::try_from(messages) .map_err(|_| >::TooManyMessages)? { @@ -820,7 +820,7 @@ pub enum Message { /// - `callback`: An optional callback to invoke upon receiving a response. /// - `deposit`: The total deposit held to cover message and callback fees. Ismp { - origin: Origin, + origin: Origin, commitment: H256, callback: Option>>, message_deposit: BalanceOf, @@ -834,7 +834,7 @@ pub enum Message { /// - `callback`: An optional callback for handling the response. /// - `deposit`: The deposit held to cover fees for query execution and callback. XcmQuery { - origin: Origin, + origin: Origin, query_id: QueryId, callback: Option>>, message_deposit: BalanceOf, @@ -898,7 +898,7 @@ pub enum Message { impl Message { #[cfg(test)] fn ismp( - origin: Origin, + origin: Origin, commitment: H256, callback: Option>>, message_deposit: BalanceOf, @@ -928,7 +928,7 @@ impl Message { #[cfg(test)] fn xcm_query( - origin: Origin, + origin: Origin, query_id: QueryId, callback: Option>>, message_deposit: BalanceOf, @@ -978,40 +978,3 @@ impl From<&Message> for MessageStatus { } } } - -/// The origin of a request. -#[derive(Clone, Debug, Encode, Eq, Decode, MaxEncodedLen, PartialEq, TypeInfo)] -#[scale_info(skip_type_params(Account))] -pub struct Origin { - address: H160, - account: Account, -} - -#[cfg(test)] -impl From<(H160, Account)> for Origin { - fn from((address, account): (H160, Account)) -> Self { - Self { address, account } - } -} - -#[cfg(feature = "runtime-benchmarks")] -impl Origin { - pub fn from_address>(address: H160) -> Self { - let account = ::AddressMapper::to_account_id(&address); - Self { address, account } - } -} - -impl TryFrom> for Origin { - type Error = pallet_revive::precompiles::Error; - - fn try_from(origin: pallet_revive::Origin) -> Result { - use pallet_revive::Origin::*; - let account = match origin { - Signed(id) => Ok(id), - Root => Err(DispatchError::RootNotAllowed), - }?; - let address = ::AddressMapper::to_address(&account); - Ok(Self { address, account }) - } -} diff --git a/pallets/api-vnext/src/messaging/benchmarking.rs b/pallets/api-vnext/src/messaging/benchmarking.rs index 3eddca537..225509207 100644 --- a/pallets/api-vnext/src/messaging/benchmarking.rs +++ b/pallets/api-vnext/src/messaging/benchmarking.rs @@ -92,7 +92,7 @@ mod benchmarks { #[benchmark] fn get_response() { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let message = 1; Messages::::insert( @@ -156,7 +156,7 @@ mod benchmarks { y: Linear<0, { T::MaxKeys::get() }>, a: Linear<0, 1>, ) -> Result<(), BenchmarkError> { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let request = ismp::Get { destination: u32::MAX, height: u64::MAX, @@ -225,7 +225,7 @@ mod benchmarks { /// - `1`: `PostResponse` #[benchmark] fn ismp_on_response(x: Linear<0, 1>) { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let fee = >::minimum_balance(); let callback = Callback::new( [255; 20].into(), @@ -265,7 +265,7 @@ mod benchmarks { /// - `2`: `PostResponse` #[benchmark] fn ismp_on_timeout(x: Linear<0, 2>) -> Result<(), BenchmarkError> { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let fee = >::minimum_balance(); let callback = Callback::new( [255; 20].into(), @@ -327,7 +327,7 @@ mod benchmarks { x: Linear<0, { T::MaxDataLen::get() }>, y: Linear<0, 1>, ) -> Result<(), BenchmarkError> { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let request = ismp::Post { destination: u32::MAX, to: vec![255; t as usize].into(), @@ -367,7 +367,7 @@ mod benchmarks { #[benchmark] fn poll_status() { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let message = 1; Messages::::insert( @@ -402,7 +402,7 @@ mod benchmarks { fn remove(x: Linear<1, { T::MaxRemovals::get() }>) { let message_deposit = 50_000u32.into(); let callback_deposit = 100_000u32.into(); - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let messages: Vec = (0..x as MessageId).collect(); let mut call_setup = set_up_call(); @@ -457,7 +457,7 @@ mod benchmarks { /// - `1`: Callback attached #[benchmark] fn xcm_new_query(x: Linear<0, 1>) { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let responder = Location { parents: 1, interior: Junctions::Here }.encode().into(); let timeout = u32::from(frame_system::Pallet::::block_number()) + 1_000; @@ -490,7 +490,7 @@ mod benchmarks { /// No benchmark input parameters. A mock response is created and processed. #[benchmark] fn xcm_response() { - let origin = Origin::from_address::(ALICE_ADDR); + let origin = Origin::::from_address(ALICE_ADDR); let responder = Location { parents: 1, interior: Junctions::Here }; let timeout = frame_system::Pallet::::block_number() + 1u8.into(); let callback = Some(Callback { @@ -527,7 +527,7 @@ fn assert_has_event(generic_event: ::Runti fn ismp_request( x: u32, - origin: Origin, + origin: Origin, fee: BalanceOf, callback: Callback>, ) -> (MessageId, H256, Response) { diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 02fb4a924..5525624e5 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -399,7 +399,7 @@ mod tests { }; use sp_io::hashing::keccak_256; - use super::{super::messaging::Origin, IISMPCalls::*, MessageStatus::*, *}; + use super::{IISMPCalls::*, MessageStatus::*, *}; type MaxContextLen = ::MaxContextLen; type MaxDataLen = ::MaxDataLen; @@ -408,6 +408,7 @@ mod tests { type MaxRecipientLen = ::MaxRecipientLen; type MaxRemovals = ::MaxRemovals; type Messages = crate::messaging::Messages; + type Origin = super::Origin; const ADDRESS: [u8; 20] = fixed_address(ISMP); const GET_MESSAGE_DEPOSIT: u128 = 131_290; @@ -485,7 +486,7 @@ mod tests { message ); - let event = GetDispatched_0 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into() }; + let event = GetDispatched_0 { origin: origin.address(), id: message, commitment: commitment.0.into() }; assert_last_event(ADDRESS, event); assert!(matches!( Messages::get(message), @@ -526,7 +527,7 @@ mod tests { message ); - let event = GetDispatched_1 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + let event = GetDispatched_1 { origin: origin.address(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( Messages::get(message), @@ -647,7 +648,7 @@ mod tests { message ); - let event = PostDispatched_0 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into() }; + let event = PostDispatched_0 { origin: origin.address(), id: message, commitment: commitment.0.into() }; assert_last_event(ADDRESS, event); assert!(matches!( Messages::get( message), @@ -687,7 +688,7 @@ mod tests { message ); - let event = PostDispatched_1 { origin: origin.address.0.into(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; + let event = PostDispatched_1 { origin: origin.address(), id: message, commitment: commitment.0.into(), callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( Messages::get(message), @@ -747,7 +748,7 @@ mod tests { &remove_0(remove_0Call { message }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } @@ -837,7 +838,7 @@ mod tests { &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 938a86573..93d8d1efa 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -153,6 +153,7 @@ mod tests { const ADDRESS: [u8; 20] = fixed_address(MESSAGING); type MaxRemovals = ::MaxRemovals; + type Origin = super::Origin; #[test] fn get_response_works() { @@ -276,7 +277,7 @@ mod tests { &remove_0(remove_0Call { message }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } @@ -365,7 +366,7 @@ mod tests { &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 01167555f..bbd409d75 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -339,6 +339,7 @@ mod tests { type MaxXcmQueryTimeoutsPerBlock = ::MaxXcmQueryTimeoutsPerBlock; type MaxRemovals = ::MaxRemovals; type Messages = crate::messaging::Messages; + type Origin = super::Origin; type XcmQueryTimeouts = crate::messaging::XcmQueryTimeouts; const ADDRESS: [u8; 20] = fixed_address(XCM); @@ -513,7 +514,7 @@ mod tests { message ); - let account = origin.address.0.into(); + let account = origin.address(); let event = QueryCreated_0 { account, id: message, queryId: query_id }; assert_last_event(ADDRESS, event); assert!(matches!( @@ -631,7 +632,7 @@ mod tests { message ); - let account = origin.address.0.into(); + let account = origin.address(); let event = QueryCreated_1 { account, id: message, queryId: query_id, callback: callback.clone() }; assert_last_event(ADDRESS, event); assert!(matches!( @@ -718,7 +719,7 @@ mod tests { &remove_0(remove_0Call { message }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages: vec![message] }); }); } @@ -807,7 +808,7 @@ mod tests { &remove_1(remove_1Call { messages: messages.clone() }) )); - let account = origin.address.0.into(); + let account = origin.address(); assert_last_event(ADDRESS, Removed { account, messages }); }); } diff --git a/pallets/api-vnext/src/messaging/tests.rs b/pallets/api-vnext/src/messaging/tests.rs index 9b9e40b81..1201f668a 100644 --- a/pallets/api-vnext/src/messaging/tests.rs +++ b/pallets/api-vnext/src/messaging/tests.rs @@ -17,6 +17,7 @@ type Fungibles = ::Fungibles; type IsmpRequests = super::IsmpRequests; type Message = super::Message; type Messages = super::Messages; +type Origin = super::Origin; type WeightInfo = ::WeightInfo; type WeightToFee = ::WeightToFee; type XcmQueries = super::XcmQueries; @@ -336,7 +337,7 @@ mod remove { // `remove` is no longer a dispatchable and only callable via a precompile, hence we simply // wrap calls to it in a transaction to simulate. See additional precompiles tests for // further assurances. - fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { + fn remove(origin: Origin, messages: &[MessageId]) -> DispatchResult { with_transaction(|| -> TransactionOutcome { let result = super::remove::(origin, messages); match &result { diff --git a/pallets/api-vnext/src/messaging/transports/ismp.rs b/pallets/api-vnext/src/messaging/transports/ismp.rs index a5ea7393f..5a013b8dc 100644 --- a/pallets/api-vnext/src/messaging/transports/ismp.rs +++ b/pallets/api-vnext/src/messaging/transports/ismp.rs @@ -48,7 +48,7 @@ pub const ID: [u8; 3] = *b"pop"; /// # Returns /// A unique identifier for the message. pub(crate) fn get( - origin: Origin, + origin: Origin, message: DispatchGet, fee: BalanceOf, callback: Option>>, @@ -103,7 +103,7 @@ pub(crate) fn get( /// # Returns /// A unique identifier for the message. pub(crate) fn post( - origin: Origin, + origin: Origin, message: DispatchPost, fee: BalanceOf, callback: Option>>, @@ -310,6 +310,7 @@ mod tests { type Messages = super::Messages; type OffChainByteFee = ::OffChainByteFee; type OnChainByteFee = ::OnChainByteFee; + type Origin = super::Origin; type PostState = super::PostState; type WeightToFee = ::WeightToFee; diff --git a/pallets/api-vnext/src/messaging/transports/xcm.rs b/pallets/api-vnext/src/messaging/transports/xcm.rs index 7fabe3fdc..628639749 100644 --- a/pallets/api-vnext/src/messaging/transports/xcm.rs +++ b/pallets/api-vnext/src/messaging/transports/xcm.rs @@ -18,7 +18,7 @@ use crate::messaging::{pallet::Call, BlockNumberOf, Config}; /// # Returns /// A unique identifier for the message. pub(crate) fn new_query( - origin: Origin, + origin: Origin, responder: Location, timeout: BlockNumberOf, callback: Option>>, @@ -116,6 +116,7 @@ pub(crate) mod tests { type Fungibles = ::Fungibles; type Messages = super::Messages; type OnChainByteFee = ::OnChainByteFee; + type Origin = super::Origin; type WeightInfo = ::WeightInfo; type WeightToFee = ::WeightToFee; type XcmQueries = super::XcmQueries; @@ -333,7 +334,7 @@ pub(crate) mod tests { // wrap calls to it in a transaction to simulate. See additional precompiles tests for // further assurances. pub(crate) fn new_query( - origin: Origin, + origin: Origin, responder: Location, timeout: u32, callback: Option>, From 39a6768b2deee16549bf2310c6955f1bc88b2939 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 08:28:56 +0100 Subject: [PATCH 267/284] refactor(pallets/api): wrap fallible calls in closure to map errors --- .../src/messaging/precompiles/ismp/v0.rs | 92 ++++++++++++------- .../api-vnext/src/messaging/precompiles/v0.rs | 26 ++++-- .../src/messaging/precompiles/xcm/v0.rs | 65 ++++++++----- 3 files changed, 118 insertions(+), 65 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 5525624e5..325a49930 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -64,15 +64,19 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 0, ))?; - let origin = Origin::try_from(env.caller())?; let message = try_get::(request)?; - let fee = (*fee).try_convert()?; - let address = origin.address; - let (id, commitment) = - get::(origin, message, fee, None).map_err(Self::map_err)?; + let (origin, id, commitment) = (|| { + let origin = Origin::try_from(env.caller())?; + let fee = (*fee).try_convert()?; + let address = origin.address(); + + let (id, commitment) = get::(origin, message, fee, None)?; + + Ok((address, id, commitment)) + })() + .map_err(Self::map_err)?; - let origin = address.0.into(); let event = GetDispatched_0 { origin, id, commitment: commitment.0.into() }; deposit_event(env, event)?; Ok(get_0Call::abi_encode_returns(&id)) @@ -91,15 +95,20 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 1, ))?; - let origin = Origin::try_from(env.caller())?; let message = try_get::(request)?; - let fee = (*fee).try_convert()?; - let address = origin.address; + let cb = callback.try_into()?; + + let (origin, id, commitment) = (|| { + let origin = Origin::try_from(env.caller())?; + let fee = (*fee).try_convert()?; + let address = origin.address(); - let (id, commitment) = get::(origin, message, fee, Some(callback.try_into()?)) - .map_err(Self::map_err)?; + let (id, commitment) = get::(origin, message, fee, Some(cb))?; + + Ok((address, id, commitment)) + })() + .map_err(Self::map_err)?; - let origin = address.0.into(); let commitment = commitment.0.into(); let event = GetDispatched_1 { origin, id, commitment, callback: callback.clone() }; deposit_event(env, event)?; @@ -140,15 +149,19 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 0, ))?; - let origin: Origin<_> = env.caller().try_into()?; let message = try_post::(request)?; - let fee = (*fee).try_convert()?; - let address = origin.address; - let (id, commitment) = - post::(origin, message, fee, None).map_err(Self::map_err)?; + let (origin, id, commitment) = (|| { + let origin: Origin<_> = env.caller().try_into()?; + let fee = (*fee).try_convert()?; + let address = origin.address(); + + let (id, commitment) = post::(origin, message, fee, None)?; + + Ok((address, id, commitment)) + })() + .map_err(Self::map_err)?; - let origin = address.0.into(); let event = PostDispatched_0 { origin, id, commitment: commitment.0.into() }; deposit_event(env, event)?; Ok(post_0Call::abi_encode_returns(&id)) @@ -167,15 +180,20 @@ where .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, 1, ))?; - let origin: Origin<_> = env.caller().try_into()?; let message = try_post::(request)?; - let fee = (*fee).try_convert()?; - let address = origin.address; + let cb = callback.try_into()?; - let (id, commitment) = post::(origin, message, fee, Some(callback.try_into()?)) - .map_err(Self::map_err)?; + let (origin, id, commitment) = (|| { + let origin: Origin<_> = env.caller().try_into()?; + let fee = (*fee).try_convert()?; + let address = origin.address(); + + let (id, commitment) = post::(origin, message, fee, Some(cb))?; + + Ok((address, id, commitment)) + })() + .map_err(Self::map_err)?; - let origin = address.0.into(); let commitment = commitment.0.into(); let event = PostDispatched_1 { origin, id, commitment, callback: callback.clone() }; deposit_event(env, event)?; @@ -183,12 +201,17 @@ where }, IISMPCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, &[*message]).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, &[*message])?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -198,12 +221,17 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, messages).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, messages)?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 93d8d1efa..a4cccf728 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -57,12 +57,17 @@ impl< }, IMessagingCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, &[*message]).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, &[*message])?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -72,12 +77,17 @@ impl< .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, messages).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, messages)?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index bbd409d75..1c1ba7445 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -72,9 +72,7 @@ where .into(); let result = >::execute( - ::RuntimeOrigin::signed( - env.caller().account_id()?.clone(), - ), + to_runtime_origin(env.caller()), message, weight, ); @@ -107,30 +105,39 @@ where }, IXCMCalls::newQuery_0(newQuery_0Call { responder, timeout }) => { env.charge(::WeightInfo::xcm_new_query(0))?; - let origin: Origin<_> = env.caller().try_into()?; let location = Location::decode(&mut &responder[..]) .map_err(|_| Error::from(IXCM::DecodingFailed))?; - let address = origin.address; - let (id, query_id) = new_query::(origin, location, (*timeout).into(), None) - .map_err(Self::map_err)?; + let (account, id, query_id) = (|| { + let origin: Origin<_> = env.caller().try_into()?; + let address = origin.address(); + + let (id, query_id) = new_query::(origin, location, (*timeout).into(), None)?; + + Ok((address, id, query_id)) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, QueryCreated_0 { account, id, queryId: query_id })?; Ok(newQuery_0Call::abi_encode_returns(&newQuery_0Return { id, queryId: query_id })) }, IXCMCalls::newQuery_1(newQuery_1Call { responder, timeout, callback }) => { env.charge(::WeightInfo::xcm_new_query(1))?; - let origin: Origin<_> = env.caller().try_into()?; let location = Location::decode(&mut &responder[..]) .map_err(|_| Error::from(IXCM::DecodingFailed))?; - let address = origin.address; + let cb = callback.try_into()?; + + let (account, id, query_id) = (|| { + let origin: Origin<_> = env.caller().try_into()?; + let address = origin.address(); + + let (id, query_id) = + new_query::(origin, location, (*timeout).into(), Some(cb))?; - let (id, query_id) = - new_query::(origin, location, (*timeout).into(), Some(callback.try_into()?)) - .map_err(Self::map_err)?; + Ok((address, id, query_id)) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); let event = QueryCreated_1 { account, id, callback: callback.clone(), queryId: query_id }; deposit_event(env, event)?; @@ -145,12 +152,17 @@ where }, IXCMCalls::remove_0(remove_0Call { message }) => { env.charge(::WeightInfo::remove(1))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, &[*message]).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, &[*message])?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: vec![*message] })?; Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, @@ -160,12 +172,17 @@ where .try_into() .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; env.charge(::WeightInfo::remove(messages_len))?; - let origin = Origin::try_from(env.caller())?; - let address = origin.address; - remove::(origin, messages).map_err(Self::map_err)?; + let account = (|| { + let origin = Origin::try_from(env.caller())?; + let address = origin.address(); + + remove::(origin, messages)?; + + Ok(address) + })() + .map_err(Self::map_err)?; - let account = address.0.into(); deposit_event(env, Removed { account, messages: messages.clone() })?; Ok(remove_1Call::abi_encode_returns(&remove_1Return {})) }, @@ -183,9 +200,7 @@ where .into(); let result = >::send( - ::RuntimeOrigin::signed( - env.caller().account_id()?.clone(), - ), + to_runtime_origin(env.caller()), destination, message, ); From 34b5ae37409fec2d125a98c8cc572542e59c2195 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 08:38:24 +0100 Subject: [PATCH 268/284] refactor(pallets/api): use try_convert to simplify safe conversion --- pallets/api-vnext/src/lib.rs | 8 +++ .../api-vnext/src/messaging/precompiles.rs | 2 +- .../src/messaging/precompiles/ismp/v0.rs | 53 ++++--------------- .../api-vnext/src/messaging/precompiles/v0.rs | 18 +++---- .../src/messaging/precompiles/xcm/v0.rs | 5 +- 5 files changed, 28 insertions(+), 58 deletions(-) diff --git a/pallets/api-vnext/src/lib.rs b/pallets/api-vnext/src/lib.rs index 32454668c..1055bbcd6 100644 --- a/pallets/api-vnext/src/lib.rs +++ b/pallets/api-vnext/src/lib.rs @@ -265,3 +265,11 @@ impl> TryConvert for alloy::U256 { self.try_into().map_err(|_| DispatchError::from(ArithmeticError::Overflow)) } } + +impl TryConvert for usize { + type Error = DispatchError; + + fn try_convert(self) -> Result { + self.try_into().map_err(|_| DispatchError::from(ArithmeticError::Overflow)) + } +} diff --git a/pallets/api-vnext/src/messaging/precompiles.rs b/pallets/api-vnext/src/messaging/precompiles.rs index 073595198..2068e4877 100644 --- a/pallets/api-vnext/src/messaging/precompiles.rs +++ b/pallets/api-vnext/src/messaging/precompiles.rs @@ -1,7 +1,7 @@ use alloc::vec; use frame_support::{ - sp_runtime::{ArithmeticError, DispatchError, ModuleError}, + sp_runtime::{DispatchError, ModuleError}, traits::PalletInfo, }; pub(super) use pallet_revive::precompiles::{ diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 325a49930..5f62d45f0 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -52,16 +52,8 @@ where match input { IISMPCalls::get_0(get_0Call { request, fee }) => { env.charge(::WeightInfo::ismp_get( - request - .context - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, - request - .keys - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request.context.len().try_convert()?, + request.keys.len().try_convert()?, 0, ))?; let message = try_get::(request)?; @@ -83,16 +75,8 @@ where }, IISMPCalls::get_1(get_1Call { request, fee, callback }) => { env.charge(::WeightInfo::ismp_get( - request - .context - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, - request - .keys - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request.context.len().try_convert()?, + request.keys.len().try_convert()?, 1, ))?; let message = try_get::(request)?; @@ -137,16 +121,8 @@ where }, IISMPCalls::post_0(post_0Call { request, fee }) => { env.charge(::WeightInfo::ismp_post( - request - .to - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, - request - .data - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request.to.len().try_convert()?, + request.data.len().try_convert()?, 0, ))?; let message = try_post::(request)?; @@ -168,16 +144,8 @@ where }, IISMPCalls::post_1(post_1Call { request, fee, callback }) => { env.charge(::WeightInfo::ismp_post( - request - .to - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, - request - .data - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?, + request.to.len().try_convert()?, + request.data.len().try_convert()?, 1, ))?; let message = try_post::(request)?; @@ -216,10 +184,7 @@ where Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, IISMPCalls::remove_1(remove_1Call { messages }) => { - let messages_len = messages - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let messages_len = messages.len().try_convert()?; env.charge(::WeightInfo::remove(messages_len))?; let account = (|| { diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index a4cccf728..8a6790b82 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -2,12 +2,15 @@ pub(crate) use IMessaging::*; pub(crate) use IMessagingCalls; use super::*; -use crate::messaging::{ - self, - precompiles::v0::IMessaging::{ - getResponseCall, pollStatusCall, remove_0Call, remove_0Return, remove_1Call, +use crate::{ + messaging::{ + self, + precompiles::v0::IMessaging::{ + getResponseCall, pollStatusCall, remove_0Call, remove_0Return, remove_1Call, + }, + Config, }, - Config, + TryConvert, }; sol!( @@ -72,10 +75,7 @@ impl< Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, IMessagingCalls::remove_1(remove_1Call { messages }) => { - let messages_len = messages - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let messages_len = messages.len().try_convert()?; env.charge(::WeightInfo::remove(messages_len))?; let account = (|| { diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index 1c1ba7445..ac88d1add 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -167,10 +167,7 @@ where Ok(remove_0Call::abi_encode_returns(&remove_0Return {})) }, IXCMCalls::remove_1(remove_1Call { messages }) => { - let messages_len = messages - .len() - .try_into() - .map_err(|_| DispatchError::from(ArithmeticError::Overflow))?; + let messages_len = messages.len().try_convert()?; env.charge(::WeightInfo::remove(messages_len))?; let account = (|| { From b5bc7ec0deeed4e1ab5ca952a6682537ff971b8d Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 11:52:12 +0100 Subject: [PATCH 269/284] refactor(pallets/api): ensure all errors apart from insufficient gas result in revert --- .../api-vnext/src/messaging/precompiles.rs | 6 +- .../precompiles/interfaces/v0/IISMP.sol | 127 +++++++++++++++ .../precompiles/interfaces/v0/IMessaging.sol | 127 +++++++++++++++ .../precompiles/interfaces/v0/IXCM.sol | 127 +++++++++++++++ .../src/messaging/precompiles/ismp.rs | 1 + .../src/messaging/precompiles/ismp/v0.rs | 138 ++++++++++++++-- .../api-vnext/src/messaging/precompiles/v0.rs | 128 +++++++++++++-- .../src/messaging/precompiles/xcm.rs | 1 + .../src/messaging/precompiles/xcm/v0.rs | 147 +++++++++++++++--- 9 files changed, 743 insertions(+), 59 deletions(-) diff --git a/pallets/api-vnext/src/messaging/precompiles.rs b/pallets/api-vnext/src/messaging/precompiles.rs index 2068e4877..b6f2bbd4a 100644 --- a/pallets/api-vnext/src/messaging/precompiles.rs +++ b/pallets/api-vnext/src/messaging/precompiles.rs @@ -1,9 +1,6 @@ use alloc::vec; -use frame_support::{ - sp_runtime::{DispatchError, ModuleError}, - traits::PalletInfo, -}; +use frame_support::{pallet_prelude as frame, sp_runtime::ModuleError, traits::PalletInfo}; pub(super) use pallet_revive::precompiles::{ alloy::{primitives::U256, sol_types::SolCall}, AddressMatcher::Fixed, @@ -18,4 +15,5 @@ pub mod ismp; pub mod xcm; /// The first version of the Messaging API. +#[allow(ambiguous_associated_items)] pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol index 3960eaa9c..f629e74bd 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IISMP.sol @@ -258,3 +258,130 @@ error MessageNotFound(); error RequestPending(); /// @dev The number of messages exceeds the limit. error TooManyMessages(); + +/// @notice An arithmetic error. +error Arithmetic(ArithmeticError); +/// @title Arithmetic errors. +enum ArithmeticError { + /// @notice Underflow. + Underflow, + /// @notice Overflow. + Overflow, + /// @notice Division by zero. + DivisionByZero +} + +/// @notice Reason why a dispatch call failed. +error Dispatch(DispatchError); +/// @title Reason why a dispatch call failed. +enum DispatchError { + /// @notice Some error occurred. + Other, + /// @notice Failed to lookup some data. + CannotLookup, + /// @notice A bad origin. + BadOrigin, + /// @notice A custom error in a module. + Module, + /// @notice At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// @notice There are no providers so the account cannot be created. + NoProviders, + /// @notice There are too many consumers so the account cannot be created. + TooManyConsumers, + /// @notice An error to do with tokens. + Token, + /// @notice An arithmetic error. + Arithmetic, + /// @notice The number of transactional layers has been reached, or we are not in a + /// transactional layer. + Transactional, + /// @notice Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// @notice The state is corrupt; this is generally not going to fix itself. + Corruption, + /// @notice Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// @notice Root origin is not allowed. + RootNotAllowed, + /// @notice An error with tries. + Trie +} + +/** + * @notice Reason why a pallet call failed. + * @param index Module index, matching the metadata module index. + * @param error Module specific error value. + */ +error Module(uint8 index, bytes4 error); + +/// @notice An error to do with tokens. +error Token(TokenError); +/// @title Description of what went wrong when trying to complete an operation on a token. +enum TokenError { + /// @notice Funds are unavailable. + FundsUnavailable, + /// @notice Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved. + OnlyProvider, + /// @notice Account cannot exist with the funds that would be given. + BelowMinimum, + /// @notice Account cannot be created. + CannotCreate, + /// @notice The token in question is unknown. + Unknown, + /// @notice Funds exist but are frozen. + Frozen, + /// @notice Operation is not supported by the token. + Unsupported, + /// @notice Account cannot be created for a held balance. + CannotCreateHold, + /// @notice Withdrawal would cause unwanted loss of account. + NotExpendable, + /// @notice Account cannot receive the tokens. + Blocked +} + +/// @notice The number of transactional layers has been reached, or we are not in a transactional layer. +error Transactional(TransactionalError); +/// @title Errors related to transactional storage layers. +enum TransactionalError { + /// @notice Too many transactional layers have been spawned. + LimitReached, + /// @notice A transactional layer was expected, but does not exist. + NoLayer +} + +/// @notice An error with tries. +error Trie(TrieError); +/// @title A runtime friendly error type for tries. +enum TrieError { + /// @notice Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// @notice Trie item not found in the database, + IncompleteDatabase, + /// @notice A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// @notice Corrupt Trie item. + DecoderError, + /// @notice Hash is not value. + InvalidHash, + /// @notice The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// @notice The proof contains at least one extraneous node. + ExtraneousNode, + /// @notice The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// @notice The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// @notice The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// @notice The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// @notice The proof is missing trie nodes required to verify. + IncompleteProof, + /// @notice The root hash computed from the proof is incorrect. + RootMismatch, + /// @notice One of the proof nodes could not be decoded. + DecodeError +} diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol index 36b905882..bc1d0beca 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IMessaging.sol @@ -66,3 +66,130 @@ interface IMessaging { /// @dev The number of messages exceeds the limit. error TooManyMessages(); } + +/// @notice An arithmetic error. +error Arithmetic(ArithmeticError); +/// @title Arithmetic errors. +enum ArithmeticError { + /// @notice Underflow. + Underflow, + /// @notice Overflow. + Overflow, + /// @notice Division by zero. + DivisionByZero +} + +/// @notice Reason why a dispatch call failed. +error Dispatch(DispatchError); +/// @title Reason why a dispatch call failed. +enum DispatchError { + /// @notice Some error occurred. + Other, + /// @notice Failed to lookup some data. + CannotLookup, + /// @notice A bad origin. + BadOrigin, + /// @notice A custom error in a module. + Module, + /// @notice At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// @notice There are no providers so the account cannot be created. + NoProviders, + /// @notice There are too many consumers so the account cannot be created. + TooManyConsumers, + /// @notice An error to do with tokens. + Token, + /// @notice An arithmetic error. + Arithmetic, + /// @notice The number of transactional layers has been reached, or we are not in a + /// transactional layer. + Transactional, + /// @notice Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// @notice The state is corrupt; this is generally not going to fix itself. + Corruption, + /// @notice Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// @notice Root origin is not allowed. + RootNotAllowed, + /// @notice An error with tries. + Trie +} + +/** + * @notice Reason why a pallet call failed. + * @param index Module index, matching the metadata module index. + * @param error Module specific error value. + */ +error Module(uint8 index, bytes4 error); + +/// @notice An error to do with tokens. +error Token(TokenError); +/// @title Description of what went wrong when trying to complete an operation on a token. +enum TokenError { + /// @notice Funds are unavailable. + FundsUnavailable, + /// @notice Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved. + OnlyProvider, + /// @notice Account cannot exist with the funds that would be given. + BelowMinimum, + /// @notice Account cannot be created. + CannotCreate, + /// @notice The token in question is unknown. + Unknown, + /// @notice Funds exist but are frozen. + Frozen, + /// @notice Operation is not supported by the token. + Unsupported, + /// @notice Account cannot be created for a held balance. + CannotCreateHold, + /// @notice Withdrawal would cause unwanted loss of account. + NotExpendable, + /// @notice Account cannot receive the tokens. + Blocked +} + +/// @notice The number of transactional layers has been reached, or we are not in a transactional layer. +error Transactional(TransactionalError); +/// @title Errors related to transactional storage layers. +enum TransactionalError { + /// @notice Too many transactional layers have been spawned. + LimitReached, + /// @notice A transactional layer was expected, but does not exist. + NoLayer +} + +/// @notice An error with tries. +error Trie(TrieError); +/// @title A runtime friendly error type for tries. +enum TrieError { + /// @notice Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// @notice Trie item not found in the database, + IncompleteDatabase, + /// @notice A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// @notice Corrupt Trie item. + DecoderError, + /// @notice Hash is not value. + InvalidHash, + /// @notice The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// @notice The proof contains at least one extraneous node. + ExtraneousNode, + /// @notice The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// @notice The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// @notice The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// @notice The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// @notice The proof is missing trie nodes required to verify. + IncompleteProof, + /// @notice The root hash computed from the proof is incorrect. + RootMismatch, + /// @notice One of the proof nodes could not be decoded. + DecodeError +} diff --git a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol index 625a1b1a0..5d5bb672b 100644 --- a/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol +++ b/pallets/api-vnext/src/messaging/precompiles/interfaces/v0/IXCM.sol @@ -193,3 +193,130 @@ error MessageNotFound(); error RequestPending(); /// @dev The number of messages exceeds the limit. error TooManyMessages(); + +/// @notice An arithmetic error. +error Arithmetic(ArithmeticError); +/// @title Arithmetic errors. +enum ArithmeticError { + /// @notice Underflow. + Underflow, + /// @notice Overflow. + Overflow, + /// @notice Division by zero. + DivisionByZero +} + +/// @notice Reason why a dispatch call failed. +error Dispatch(DispatchError); +/// @title Reason why a dispatch call failed. +enum DispatchError { + /// @notice Some error occurred. + Other, + /// @notice Failed to lookup some data. + CannotLookup, + /// @notice A bad origin. + BadOrigin, + /// @notice A custom error in a module. + Module, + /// @notice At least one consumer is remaining so the account cannot be destroyed. + ConsumerRemaining, + /// @notice There are no providers so the account cannot be created. + NoProviders, + /// @notice There are too many consumers so the account cannot be created. + TooManyConsumers, + /// @notice An error to do with tokens. + Token, + /// @notice An arithmetic error. + Arithmetic, + /// @notice The number of transactional layers has been reached, or we are not in a + /// transactional layer. + Transactional, + /// @notice Resources exhausted, e.g. attempt to read/write data which is too large to manipulate. + Exhausted, + /// @notice The state is corrupt; this is generally not going to fix itself. + Corruption, + /// @notice Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. + Unavailable, + /// @notice Root origin is not allowed. + RootNotAllowed, + /// @notice An error with tries. + Trie +} + +/** + * @notice Reason why a pallet call failed. + * @param index Module index, matching the metadata module index. + * @param error Module specific error value. + */ +error Module(uint8 index, bytes4 error); + +/// @notice An error to do with tokens. +error Token(TokenError); +/// @title Description of what went wrong when trying to complete an operation on a token. +enum TokenError { + /// @notice Funds are unavailable. + FundsUnavailable, + /// @notice Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved. + OnlyProvider, + /// @notice Account cannot exist with the funds that would be given. + BelowMinimum, + /// @notice Account cannot be created. + CannotCreate, + /// @notice The token in question is unknown. + Unknown, + /// @notice Funds exist but are frozen. + Frozen, + /// @notice Operation is not supported by the token. + Unsupported, + /// @notice Account cannot be created for a held balance. + CannotCreateHold, + /// @notice Withdrawal would cause unwanted loss of account. + NotExpendable, + /// @notice Account cannot receive the tokens. + Blocked +} + +/// @notice The number of transactional layers has been reached, or we are not in a transactional layer. +error Transactional(TransactionalError); +/// @title Errors related to transactional storage layers. +enum TransactionalError { + /// @notice Too many transactional layers have been spawned. + LimitReached, + /// @notice A transactional layer was expected, but does not exist. + NoLayer +} + +/// @notice An error with tries. +error Trie(TrieError); +/// @title A runtime friendly error type for tries. +enum TrieError { + /// @notice Attempted to create a trie with a state root not in the DB. + InvalidStateRoot, + /// @notice Trie item not found in the database, + IncompleteDatabase, + /// @notice A value was found in the trie with a nibble key that was not byte-aligned. + ValueAtIncompleteKey, + /// @notice Corrupt Trie item. + DecoderError, + /// @notice Hash is not value. + InvalidHash, + /// @notice The statement being verified contains multiple key-value pairs with the same key. + DuplicateKey, + /// @notice The proof contains at least one extraneous node. + ExtraneousNode, + /// @notice The proof contains at least one extraneous value which should have been omitted from the + /// proof. + ExtraneousValue, + /// @notice The proof contains at least one extraneous hash reference the should have been omitted. + ExtraneousHashReference, + /// @notice The proof contains an invalid child reference that exceeds the hash length. + InvalidChildReference, + /// @notice The proof indicates that an expected value was not found in the trie. + ValueMismatch, + /// @notice The proof is missing trie nodes required to verify. + IncompleteProof, + /// @notice The root hash computed from the proof is incorrect. + RootMismatch, + /// @notice One of the proof nodes could not be decoded. + DecodeError +} diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp.rs b/pallets/api-vnext/src/messaging/precompiles/ismp.rs index 56efdbd99..550379ddf 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp.rs @@ -1,4 +1,5 @@ use super::*; /// The first version of the ISMP messaging API. +#[allow(ambiguous_associated_items)] pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs index 5f62d45f0..759d27661 100644 --- a/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/ismp/v0.rs @@ -28,13 +28,16 @@ impl< + pallet_revive::Config + parachain_info::Config + Config< - Fungibles: Inspect>, + Fungibles: Inspect< + T::AccountId, + Balance: TryConvert, + >, >, > Precompile for Ismp where U256: TryConvert< <::Fungibles as Inspect>::Balance, - Error = DispatchError, + Error = frame::DispatchError, >, { type Interface = IISMPCalls; @@ -210,42 +213,53 @@ impl Ismp { fixed_address(FIXED) } - // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results - // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. - fn map_err(e: DispatchError) -> Error { - use DispatchError::*; + // Maps select, domain-specific dispatch errors to messaging errors. All others are mapped to + // more generic runtime errors. + fn map_err(e: frame::DispatchError) -> Error { + use frame::DispatchError::*; match e { + Arithmetic(error) => self::Arithmetic::from(error).into(), Module(ModuleError { index, error, .. }) => { - let index = Some(index as usize); - if index == T::PalletInfo::index::>() { + if Some(index as usize) == T::PalletInfo::index::>() { use messaging::Error::{self, *}; - match Error::::decode(&mut error.as_slice()) { - Ok(MessageNotFound) => self::MessageNotFound.into(), - Ok(RequestPending) => self::RequestPending.into(), - Ok(TooManyMessages) => self::TooManyMessages.into(), - _ => e.into(), + Ok(MessageNotFound) => return self::MessageNotFound.into(), + Ok(RequestPending) => return self::RequestPending.into(), + Ok(TooManyMessages) => return self::TooManyMessages.into(), + _ => {}, } - } else { - e.into() } + + self::Module { index, error: error.into() }.into() }, - _ => e.into(), + Token(error) => self::Token::from(error).into(), + Transactional(error) => self::Transactional::from(error).into(), + Trie(error) => self::Trie::from(error).into(), + other => self::Dispatch::from(other).into(), } } } // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { + // ISMP IISMP::MaxContextExceeded, IISMP::MaxDataExceeded, IISMP::MaxKeyExceeded, IISMP::MaxKeysExceeded, IISMP::MaxRecipientExceeded, + // Messaging InvalidEncoding, MessageNotFound, RequestPending, TooManyMessages, + // Generic + Arithmetic, + Dispatch, + Module, + Token, + Transactional, + Trie } fn try_get(value: &Get) -> Result { @@ -329,7 +343,7 @@ impl EncodeCallback for Vec { impl TryFrom<&Callback> for super::Callback where - U256: TryConvert, + U256: TryConvert, { type Error = Error; @@ -356,6 +370,96 @@ impl TryFrom<&Encoding> for super::Encoding { } } +impl From for Arithmetic { + fn from(error: frame_support::sp_runtime::ArithmeticError) -> Self { + use frame_support::sp_runtime::ArithmeticError::*; + Self(match error { + Underflow => ArithmeticError::Underflow, + Overflow => ArithmeticError::Overflow, + DivisionByZero => ArithmeticError::DivisionByZero, + }) + } +} + +impl From for Dispatch { + fn from(error: frame::DispatchError) -> Self { + use frame::DispatchError::*; + Self(match error { + Other(_) => DispatchError::Other, + CannotLookup => DispatchError::CannotLookup, + BadOrigin => DispatchError::BadOrigin, + Module(_) => DispatchError::Module, + ConsumerRemaining => DispatchError::ConsumerRemaining, + NoProviders => DispatchError::NoProviders, + TooManyConsumers => DispatchError::TooManyConsumers, + Token(_) => DispatchError::Token, + Arithmetic(_) => DispatchError::Arithmetic, + Transactional(_) => DispatchError::Transactional, + Exhausted => DispatchError::Exhausted, + Corruption => DispatchError::Corruption, + Unavailable => DispatchError::Unavailable, + RootNotAllowed => DispatchError::RootNotAllowed, + Trie(_) => DispatchError::Trie, + }) + } +} + +impl From for Module { + fn from(error: frame_support::sp_runtime::ModuleError) -> Self { + Self { index: error.index, error: error.error.into() } + } +} + +impl From for Token { + fn from(error: frame_support::sp_runtime::TokenError) -> Self { + use frame_support::sp_runtime::TokenError::*; + Self(match error { + FundsUnavailable => TokenError::FundsUnavailable, + OnlyProvider => TokenError::OnlyProvider, + BelowMinimum => TokenError::BelowMinimum, + CannotCreate => TokenError::CannotCreate, + UnknownAsset => TokenError::Unknown, + Frozen => TokenError::Frozen, + Unsupported => TokenError::Unsupported, + CannotCreateHold => TokenError::CannotCreateHold, + NotExpendable => TokenError::NotExpendable, + Blocked => TokenError::Blocked, + }) + } +} + +impl From for Transactional { + fn from(error: frame_support::sp_runtime::TransactionalError) -> Self { + use frame_support::sp_runtime::TransactionalError::*; + Self(match error { + LimitReached => TransactionalError::LimitReached, + NoLayer => TransactionalError::NoLayer, + }) + } +} + +impl From for Trie { + fn from(error: frame_support::traits::TrieError) -> Self { + use frame_support::traits::TrieError::*; + Self(match error { + InvalidStateRoot => TrieError::InvalidStateRoot, + IncompleteDatabase => TrieError::IncompleteDatabase, + ValueAtIncompleteKey => TrieError::ValueAtIncompleteKey, + DecoderError => TrieError::DecoderError, + InvalidHash => TrieError::InvalidHash, + DuplicateKey => TrieError::DuplicateKey, + ExtraneousNode => TrieError::ExtraneousNode, + ExtraneousValue => TrieError::ExtraneousValue, + ExtraneousHashReference => TrieError::ExtraneousHashReference, + InvalidChildReference => TrieError::InvalidChildReference, + ValueMismatch => TrieError::ValueMismatch, + IncompleteProof => TrieError::IncompleteProof, + RootMismatch => TrieError::RootMismatch, + DecodeError => TrieError::DecodeError, + }) + } +} + impl From for self::MessageStatus { fn from(value: messaging::MessageStatus) -> Self { use messaging::MessageStatus::*; diff --git a/pallets/api-vnext/src/messaging/precompiles/v0.rs b/pallets/api-vnext/src/messaging/precompiles/v0.rs index 8a6790b82..e18cc7d3a 100644 --- a/pallets/api-vnext/src/messaging/precompiles/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/v0.rs @@ -101,36 +101,136 @@ impl Messaging { fixed_address(FIXED) } - // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results - // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. - fn map_err(e: DispatchError) -> Error { - use DispatchError::*; + // Maps select, domain-specific dispatch errors to messaging errors. All others are mapped to + // more generic runtime errors. + fn map_err(e: frame::DispatchError) -> Error { + use frame::DispatchError::*; match e { + Arithmetic(error) => self::Arithmetic::from(error).into(), Module(ModuleError { index, error, .. }) => { - let index = Some(index as usize); - if index == T::PalletInfo::index::>() { + if Some(index as usize) == T::PalletInfo::index::>() { use messaging::Error::{self, *}; - match Error::::decode(&mut error.as_slice()) { - Ok(MessageNotFound) => IMessaging::MessageNotFound.into(), - Ok(RequestPending) => IMessaging::RequestPending.into(), - Ok(TooManyMessages) => IMessaging::TooManyMessages.into(), - _ => e.into(), + Ok(MessageNotFound) => return IMessaging::MessageNotFound.into(), + Ok(RequestPending) => return IMessaging::RequestPending.into(), + Ok(TooManyMessages) => return IMessaging::TooManyMessages.into(), + _ => {}, } - } else { - e.into() } + + self::Module { index, error: error.into() }.into() }, - _ => e.into(), + Token(error) => self::Token::from(error).into(), + Transactional(error) => self::Transactional::from(error).into(), + Trie(error) => self::Trie::from(error).into(), + other => self::Dispatch::from(other).into(), } } } // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { + // Messaging IMessaging::MessageNotFound, IMessaging::RequestPending, IMessaging::TooManyMessages, + // Generic + Arithmetic, + Dispatch, + Module, + Token, + Transactional, + Trie +} + +impl From for Arithmetic { + fn from(error: frame_support::sp_runtime::ArithmeticError) -> Self { + use frame_support::sp_runtime::ArithmeticError::*; + Self(match error { + Underflow => ArithmeticError::Underflow, + Overflow => ArithmeticError::Overflow, + DivisionByZero => ArithmeticError::DivisionByZero, + }) + } +} + +impl From for Dispatch { + fn from(error: frame::DispatchError) -> Self { + use frame::DispatchError::*; + Self(match error { + Other(_) => DispatchError::Other, + CannotLookup => DispatchError::CannotLookup, + BadOrigin => DispatchError::BadOrigin, + Module(_) => DispatchError::Module, + ConsumerRemaining => DispatchError::ConsumerRemaining, + NoProviders => DispatchError::NoProviders, + TooManyConsumers => DispatchError::TooManyConsumers, + Token(_) => DispatchError::Token, + Arithmetic(_) => DispatchError::Arithmetic, + Transactional(_) => DispatchError::Transactional, + Exhausted => DispatchError::Exhausted, + Corruption => DispatchError::Corruption, + Unavailable => DispatchError::Unavailable, + RootNotAllowed => DispatchError::RootNotAllowed, + Trie(_) => DispatchError::Trie, + }) + } +} + +impl From for Module { + fn from(error: frame_support::sp_runtime::ModuleError) -> Self { + Self { index: error.index, error: error.error.into() } + } +} + +impl From for Token { + fn from(error: frame_support::sp_runtime::TokenError) -> Self { + use frame_support::sp_runtime::TokenError::*; + Self(match error { + FundsUnavailable => TokenError::FundsUnavailable, + OnlyProvider => TokenError::OnlyProvider, + BelowMinimum => TokenError::BelowMinimum, + CannotCreate => TokenError::CannotCreate, + UnknownAsset => TokenError::Unknown, + Frozen => TokenError::Frozen, + Unsupported => TokenError::Unsupported, + CannotCreateHold => TokenError::CannotCreateHold, + NotExpendable => TokenError::NotExpendable, + Blocked => TokenError::Blocked, + }) + } +} + +impl From for Transactional { + fn from(error: frame_support::sp_runtime::TransactionalError) -> Self { + use frame_support::sp_runtime::TransactionalError::*; + Self(match error { + LimitReached => TransactionalError::LimitReached, + NoLayer => TransactionalError::NoLayer, + }) + } +} + +impl From for Trie { + fn from(error: frame_support::traits::TrieError) -> Self { + use frame_support::traits::TrieError::*; + Self(match error { + InvalidStateRoot => TrieError::InvalidStateRoot, + IncompleteDatabase => TrieError::IncompleteDatabase, + ValueAtIncompleteKey => TrieError::ValueAtIncompleteKey, + DecoderError => TrieError::DecoderError, + InvalidHash => TrieError::InvalidHash, + DuplicateKey => TrieError::DuplicateKey, + ExtraneousNode => TrieError::ExtraneousNode, + ExtraneousValue => TrieError::ExtraneousValue, + ExtraneousHashReference => TrieError::ExtraneousHashReference, + InvalidChildReference => TrieError::InvalidChildReference, + ValueMismatch => TrieError::ValueMismatch, + IncompleteProof => TrieError::IncompleteProof, + RootMismatch => TrieError::RootMismatch, + DecodeError => TrieError::DecodeError, + }) + } } impl From for IMessaging::MessageStatus { diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm.rs b/pallets/api-vnext/src/messaging/precompiles/xcm.rs index 6a16df035..66e5f8a58 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm.rs @@ -1,4 +1,5 @@ use super::*; /// The first version of the XCM messaging API. +#[allow(ambiguous_associated_items)] pub mod v0; diff --git a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs index ac88d1add..ef6a09af4 100644 --- a/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs +++ b/pallets/api-vnext/src/messaging/precompiles/xcm/v0.rs @@ -1,10 +1,7 @@ use ::xcm::{VersionedLocation, VersionedXcm, MAX_XCM_DECODE_DEPTH}; use codec::{DecodeAll, DecodeLimit}; use pallet_xcm::WeightInfo as _; -use sp_runtime::{ - traits::{Block, Header}, - TokenError, -}; +use sp_runtime::traits::{Block, Header}; pub(crate) use IXCM::*; use super::*; @@ -37,7 +34,7 @@ where u32: From>, U256: TryConvert< <::Fungibles as Inspect>::Balance, - Error = DispatchError, + Error = frame::DispatchError, >, { type Interface = IXCMCalls; @@ -214,47 +211,58 @@ impl Xcm { fixed_address(FIXED) } - // Maps select, domain-specific dispatch errors to messaging errors. Anything not mapped results - // in a `Error::Error(ExecError::DispatchError)` which results in trap rather than a revert. - fn map_err(e: DispatchError) -> Error { - use DispatchError::*; + // Maps select, domain-specific dispatch errors to messaging errors. All others are mapped to + // more generic runtime errors. + fn map_err(e: frame::DispatchError) -> Error { + use frame::DispatchError::*; match e { + Arithmetic(error) => self::Arithmetic::from(error).into(), Module(ModuleError { index, error, .. }) => { - let index = Some(index as usize); - if index == T::PalletInfo::index::>() { + if Some(index as usize) == T::PalletInfo::index::>() { use messaging::Error::{self, *}; - match Error::::decode(&mut error.as_slice()) { - Ok(FutureTimeoutMandatory) => IXCM::FutureTimeoutMandatory.into(), + Ok(FutureTimeoutMandatory) => return IXCM::FutureTimeoutMandatory.into(), Ok(MaxMessageTimeoutPerBlockReached) => - IXCM::MaxMessageTimeoutPerBlockReached.into(), - Ok(MessageNotFound) => self::MessageNotFound.into(), + return IXCM::MaxMessageTimeoutPerBlockReached.into(), + Ok(MessageNotFound) => return self::MessageNotFound.into(), Ok(OriginConversionFailed) => IXCM::OriginConversionFailed.into(), - Ok(RequestPending) => self::RequestPending.into(), - Ok(TooManyMessages) => self::TooManyMessages.into(), - _ => e.into(), + Ok(RequestPending) => return self::RequestPending.into(), + Ok(TooManyMessages) => return self::TooManyMessages.into(), + _ => {}, } - } else { - e.into() } + + self::Module { index, error: error.into() }.into() }, - Token(TokenError::FundsUnavailable) => IXCM::FundsUnavailable.into(), - _ => e.into(), + Token(sp_runtime::TokenError::FundsUnavailable) => IXCM::FundsUnavailable.into(), + Token(error) => self::Token::from(error).into(), + Transactional(error) => self::Transactional::from(error).into(), + Trie(error) => self::Trie::from(error).into(), + other => self::Dispatch::from(other).into(), } } } // Encoding of custom errors via `Error(String)`. impl_from_sol_error! { + // XCM IXCM::DecodingFailed, IXCM::FundsUnavailable, IXCM::FutureTimeoutMandatory, IXCM::MaxMessageTimeoutPerBlockReached, IXCM::OriginConversionFailed, + // Messaging InvalidEncoding, MessageNotFound, RequestPending, TooManyMessages, + // Generic + Arithmetic, + Dispatch, + Module, + Token, + Transactional, + Trie } impl EncodeCallback for Response { @@ -278,7 +286,7 @@ impl EncodeCallback for Response { impl TryFrom<&Callback> for super::Callback where - U256: TryConvert, + U256: TryConvert, { type Error = Error; @@ -305,6 +313,96 @@ impl TryFrom<&Encoding> for super::Encoding { } } +impl From for Arithmetic { + fn from(error: frame_support::sp_runtime::ArithmeticError) -> Self { + use frame_support::sp_runtime::ArithmeticError::*; + Self(match error { + Underflow => ArithmeticError::Underflow, + Overflow => ArithmeticError::Overflow, + DivisionByZero => ArithmeticError::DivisionByZero, + }) + } +} + +impl From for Dispatch { + fn from(error: frame::DispatchError) -> Self { + use frame::DispatchError::*; + Self(match error { + Other(_) => DispatchError::Other, + CannotLookup => DispatchError::CannotLookup, + BadOrigin => DispatchError::BadOrigin, + Module(_) => DispatchError::Module, + ConsumerRemaining => DispatchError::ConsumerRemaining, + NoProviders => DispatchError::NoProviders, + TooManyConsumers => DispatchError::TooManyConsumers, + Token(_) => DispatchError::Token, + Arithmetic(_) => DispatchError::Arithmetic, + Transactional(_) => DispatchError::Transactional, + Exhausted => DispatchError::Exhausted, + Corruption => DispatchError::Corruption, + Unavailable => DispatchError::Unavailable, + RootNotAllowed => DispatchError::RootNotAllowed, + Trie(_) => DispatchError::Trie, + }) + } +} + +impl From for Module { + fn from(error: frame_support::sp_runtime::ModuleError) -> Self { + Self { index: error.index, error: error.error.into() } + } +} + +impl From for Token { + fn from(error: frame_support::sp_runtime::TokenError) -> Self { + use frame_support::sp_runtime::TokenError::*; + Self(match error { + FundsUnavailable => TokenError::FundsUnavailable, + OnlyProvider => TokenError::OnlyProvider, + BelowMinimum => TokenError::BelowMinimum, + CannotCreate => TokenError::CannotCreate, + UnknownAsset => TokenError::Unknown, + Frozen => TokenError::Frozen, + Unsupported => TokenError::Unsupported, + CannotCreateHold => TokenError::CannotCreateHold, + NotExpendable => TokenError::NotExpendable, + Blocked => TokenError::Blocked, + }) + } +} + +impl From for Transactional { + fn from(error: frame_support::sp_runtime::TransactionalError) -> Self { + use frame_support::sp_runtime::TransactionalError::*; + Self(match error { + LimitReached => TransactionalError::LimitReached, + NoLayer => TransactionalError::NoLayer, + }) + } +} + +impl From for Trie { + fn from(error: frame_support::traits::TrieError) -> Self { + use frame_support::traits::TrieError::*; + Self(match error { + InvalidStateRoot => TrieError::InvalidStateRoot, + IncompleteDatabase => TrieError::IncompleteDatabase, + ValueAtIncompleteKey => TrieError::ValueAtIncompleteKey, + DecoderError => TrieError::DecoderError, + InvalidHash => TrieError::InvalidHash, + DuplicateKey => TrieError::DuplicateKey, + ExtraneousNode => TrieError::ExtraneousNode, + ExtraneousValue => TrieError::ExtraneousValue, + ExtraneousHashReference => TrieError::ExtraneousHashReference, + InvalidChildReference => TrieError::InvalidChildReference, + ValueMismatch => TrieError::ValueMismatch, + IncompleteProof => TrieError::IncompleteProof, + RootMismatch => TrieError::RootMismatch, + DecodeError => TrieError::DecodeError, + }) + } +} + impl From for self::MessageStatus { fn from(value: messaging::MessageStatus) -> Self { use messaging::MessageStatus::*; @@ -859,7 +957,8 @@ mod tests { ExtBuilder::new().build().execute_with(|| { let call = send(sendCall { destination, message }); let response = call_precompile::>(&origin, &call).unwrap(); - let result = Result::<(), DispatchError>::decode(&mut response.as_slice()).unwrap(); + let result = + Result::<(), frame::DispatchError>::decode(&mut response.as_slice()).unwrap(); // No xcm router currently configured in mock runtime assert_eq!(result, Err(pallet_xcm::Error::::Unreachable.into())); }); From f4ef8edc50bc46334cff8f81400cc990edb1e5cf Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 11:53:26 +0100 Subject: [PATCH 270/284] refactor(api): ensure full error coverage --- pop-api-vnext/src/messaging/ismp/v0/errors.rs | 88 ++++++++++++++- pop-api-vnext/src/messaging/v0.rs | 2 +- pop-api-vnext/src/messaging/v0/errors.rs | 88 ++++++++++++++- pop-api-vnext/src/messaging/xcm/v0/errors.rs | 102 +++++++++++++++++- 4 files changed, 264 insertions(+), 16 deletions(-) diff --git a/pop-api-vnext/src/messaging/ismp/v0/errors.rs b/pop-api-vnext/src/messaging/ismp/v0/errors.rs index 6442f1979..5afe61a86 100644 --- a/pop-api-vnext/src/messaging/ismp/v0/errors.rs +++ b/pop-api-vnext/src/messaging/ismp/v0/errors.rs @@ -1,12 +1,27 @@ -use ink::sol_error_selector; +use ink::{sol::SolDecode, sol_error_selector}; use super::*; -use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; +use crate::{ + errors::{ + ArithmeticError, DispatchError, FixedBytes, ModuleError, TokenError, TransactionalError, + TrieError, + }, + impl_sol_encoding_for_precompile, + messaging::v0::errors::{ + ARITHMETIC, DISPATCH, MESSAGE_NOT_FOUND, MODULE, REQUEST_PENDING, TOKEN, TOO_MANY_MESSAGES, + TRANSACTIONAL, TRIE, + }, + sol::PrecompileError, +}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { + /// An arithmetic error occurred. + Arithmetic(ArithmeticError), + /// Reason why a dispatch call failed. + Dispatch(DispatchError), /// The context exceeds the maximum allowed size. MaxContextExceeded, /// The data exceeds the maximum allowed size. @@ -17,10 +32,24 @@ pub enum Error { MaxKeysExceeded, /// The message was not found. MessageNotFound, + /// Reason why a pallet call failed. + Module { + /// Module index, matching the metadata module index. + index: u8, + /// Module specific error value. + error: FixedBytes<4>, + }, /// The request is pending. RequestPending, + /// An error to do with tokens. + Token(TokenError), /// The number of messages exceeds the limit. TooManyMessages, + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional(TransactionalError), + /// An error with tries. + Trie(TrieError), } impl_sol_encoding_for_precompile!(Error); @@ -32,13 +61,22 @@ impl PrecompileError for Error { } match data[..4].try_into().expect("length checked above") { + ARITHMETIC => Ok(Self::Arithmetic(ArithmeticError::decode(&data[4..])?)), + DISPATCH => Ok(Self::Dispatch(DispatchError::decode(&data[4..])?)), MAX_CONTEXT_EXCEEDED => Ok(Self::MaxContextExceeded), MAX_DATA_EXCEEDED => Ok(Self::MaxDataExceeded), MAX_KEY_EXCEEDED => Ok(Self::MaxKeyExceeded), MAX_KEYS_EXCEEDED => Ok(Self::MaxKeysExceeded), MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + MODULE => { + let ModuleError { index, error } = ModuleError::decode(&data[4..])?; + Ok(Self::Module { index, error }) + }, REQUEST_PENDING => Ok(Self::RequestPending), + TOKEN => Ok(Self::Token(TokenError::decode(&data[4..])?)), TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + TRANSACTIONAL => Ok(Self::Transactional(TransactionalError::decode(&data[4..])?)), + TRIE => Ok(Self::Trie(TrieError::decode(&data[4..])?)), _ => Err(ink::sol::Error), } } @@ -48,6 +86,46 @@ const MAX_CONTEXT_EXCEEDED: [u8; 4] = sol_error_selector!("MaxContextExceeded", const MAX_DATA_EXCEEDED: [u8; 4] = sol_error_selector!("MaxDataExceeded", ()); const MAX_KEY_EXCEEDED: [u8; 4] = sol_error_selector!("MaxKeyExceeded", ()); const MAX_KEYS_EXCEEDED: [u8; 4] = sol_error_selector!("MaxKeysExceeded", ()); -const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); -const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); -const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); + +#[test] +fn error_decoding_works() { + use ink::{sol::SolErrorDecode, SolBytes}; + + for (encoded, expected) in [ + ( + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + Arithmetic(ArithmeticError::Overflow), + ), + ( + "20c5a2a9000000000000000000000000000000000000000000000000000000000000000d", + Dispatch(DispatchError::RootNotAllowed), + ), + ("8ad49075", MaxContextExceeded), + ("deadaa39", MaxDataExceeded), + ("3d903c2e", MaxKeyExceeded), + ("81463867", MaxKeysExceeded), + ("28915ac7", MessageNotFound), + ( + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + Module { index: 255, error: SolBytes([255; 4]) }, + ), + ("806d0f74", RequestPending), + ( + "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", + Token(TokenError::Blocked), + ), + ("1ec0b2f7", TooManyMessages), + ( + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + Transactional(TransactionalError::NoLayer), + ), + ( + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + Trie(TrieError::DecodeError), + ), + ] { + let data = hex::decode(encoded).unwrap(); + let decoded = ::decode(data.as_slice()).expect(&format!("unable to decode {encoded}")); + assert_eq!(decoded, expected) + } +} diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index c046f170f..dff67da8f 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -2,7 +2,7 @@ pub use errors::{Error, Error::*}; use super::*; -mod errors; +pub(crate) mod errors; // Precompile index within the runtime const PRECOMPILE: u16 = 3; diff --git a/pop-api-vnext/src/messaging/v0/errors.rs b/pop-api-vnext/src/messaging/v0/errors.rs index 295f37f77..a15a7f869 100644 --- a/pop-api-vnext/src/messaging/v0/errors.rs +++ b/pop-api-vnext/src/messaging/v0/errors.rs @@ -1,18 +1,42 @@ -use ink::sol_error_selector; +use ink::{sol::SolDecode, sol_error_selector}; use super::*; -use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; +use crate::{ + errors::{ + ArithmeticError, DispatchError, ModuleError, TokenError, TransactionalError, TrieError, + }, + impl_sol_encoding_for_precompile, + sol::PrecompileError, +}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { + /// An arithmetic error occurred. + Arithmetic(ArithmeticError), + /// Reason why a dispatch call failed. + Dispatch(DispatchError), /// The message was not found. MessageNotFound, + /// Reason why a pallet call failed. + Module { + /// Module index, matching the metadata module index. + index: u8, + /// Module specific error value. + error: FixedBytes<4>, + }, /// The request is pending. RequestPending, + /// An error to do with tokens. + Token(TokenError), /// The number of messages exceeds the limit. TooManyMessages, + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional(TransactionalError), + /// An error with tries. + Trie(TrieError), } impl_sol_encoding_for_precompile!(Error); @@ -24,14 +48,68 @@ impl PrecompileError for Error { } match data[..4].try_into().expect("length checked above") { + ARITHMETIC => Ok(Self::Arithmetic(ArithmeticError::decode(&data[4..])?)), + DISPATCH => Ok(Self::Dispatch(DispatchError::decode(&data[4..])?)), MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + MODULE => { + let ModuleError { index, error } = ModuleError::decode(&data[4..])?; + Ok(Self::Module { index, error }) + }, REQUEST_PENDING => Ok(Self::RequestPending), + TOKEN => Ok(Self::Token(TokenError::decode(&data[4..])?)), TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + TRANSACTIONAL => Ok(Self::Transactional(TransactionalError::decode(&data[4..])?)), + TRIE => Ok(Self::Trie(TrieError::decode(&data[4..])?)), _ => Err(ink::sol::Error), } } } -const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); -const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); -const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); +pub(crate) const ARITHMETIC: [u8; 4] = sol_error_selector!("Arithmetic", (u8,)); +pub(crate) const DISPATCH: [u8; 4] = sol_error_selector!("Dispatch", (u8,)); +pub(crate) const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); +pub(crate) const MODULE: [u8; 4] = sol_error_selector!("Module", (u8, FixedBytes<4>)); +pub(crate) const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); +pub(crate) const TOKEN: [u8; 4] = sol_error_selector!("Token", (u8,)); +pub(crate) const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); +pub(crate) const TRANSACTIONAL: [u8; 4] = sol_error_selector!("Transactional", (u8,)); +pub(crate) const TRIE: [u8; 4] = sol_error_selector!("Trie", (u8,)); + +#[test] +fn error_decoding_works() { + use ink::SolBytes; + + for (encoded, expected) in [ + ( + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + Arithmetic(ArithmeticError::Overflow), + ), + ( + "20c5a2a9000000000000000000000000000000000000000000000000000000000000000d", + Dispatch(DispatchError::RootNotAllowed), + ), + ("28915ac7", MessageNotFound), + ( + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + Module { index: 255, error: SolBytes([255; 4]) }, + ), + ("806d0f74", RequestPending), + ( + "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", + Token(TokenError::Blocked), + ), + ("1ec0b2f7", TooManyMessages), + ( + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + Transactional(TransactionalError::NoLayer), + ), + ( + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + Trie(TrieError::DecodeError), + ), + ] { + let data = hex::decode(encoded).unwrap(); + let decoded = ::decode(data.as_slice()).expect(&format!("unable to decode {encoded}")); + assert_eq!(decoded, expected) + } +} diff --git a/pop-api-vnext/src/messaging/xcm/v0/errors.rs b/pop-api-vnext/src/messaging/xcm/v0/errors.rs index 06beba1e7..ecb97548e 100644 --- a/pop-api-vnext/src/messaging/xcm/v0/errors.rs +++ b/pop-api-vnext/src/messaging/xcm/v0/errors.rs @@ -1,14 +1,29 @@ -use ink::sol_error_selector; +use ink::{sol::SolDecode, sol_error_selector}; use super::*; -use crate::{impl_sol_encoding_for_precompile, sol::PrecompileError}; +use crate::{ + errors::{ + ArithmeticError, DispatchError, FixedBytes, ModuleError, TokenError, TransactionalError, + TrieError, + }, + impl_sol_encoding_for_precompile, + messaging::v0::errors::{ + ARITHMETIC, DISPATCH, MESSAGE_NOT_FOUND, MODULE, REQUEST_PENDING, TOKEN, TOO_MANY_MESSAGES, + TRANSACTIONAL, TRIE, + }, + sol::PrecompileError, +}; #[cfg_attr(feature = "std", derive(Debug, PartialEq))] #[derive(ink::SolErrorEncode)] #[ink::scale_derive(Decode, Encode, TypeInfo)] pub enum Error { + /// An arithmetic error occurred. + Arithmetic(ArithmeticError), /// The input failed to decode. DecodingFailed, + /// Reason why a dispatch call failed. + Dispatch(DispatchError), /// The execution of a XCM message failed. ExecutionFailed(Bytes), /// Timeouts must be in the future. @@ -17,14 +32,28 @@ pub enum Error { MaxMessageTimeoutPerBlockReached, /// The message was not found. MessageNotFound, + /// Reason why a pallet call failed. + Module { + /// Module index, matching the metadata module index. + index: u8, + /// Module specific error value. + error: FixedBytes<4>, + }, /// Failed to convert origin. OriginConversionFailed, /// The request is pending. RequestPending, /// The sending of a XCM message failed. SendingFailed(Bytes), + /// An error to do with tokens. + Token(TokenError), /// The number of messages exceeds the limit. TooManyMessages, + /// The number of transactional layers has been reached, or we are not in a transactional + /// layer. + Transactional(TransactionalError), + /// An error with tries. + Trie(TrieError), } impl_sol_encoding_for_precompile!(Error); @@ -36,23 +65,86 @@ impl PrecompileError for Error { } match data[..4].try_into().expect("length checked above") { + ARITHMETIC => Ok(Self::Arithmetic(::decode(&data[4..])?)), DECODING_FAILED => Ok(Self::DecodingFailed), + DISPATCH => Ok(Self::Dispatch(::decode(&data[4..])?)), + EXECUTION_FAILED => + Ok(Self::ExecutionFailed(::decode(&data[4..])?)), FUTURE_TIMEOUT_MANDATORY => Ok(Self::FutureTimeoutMandatory), MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED => Ok(Self::MaxMessageTimeoutPerBlockReached), MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), + MODULE => { + let ModuleError { index, error } = ::decode(&data[4..])?; + Ok(Self::Module { index, error }) + }, ORIGIN_CONVERSION_FAILED => Ok(Self::OriginConversionFailed), REQUEST_PENDING => Ok(Self::RequestPending), + SENDING_FAILED => Ok(Self::SendingFailed(::decode(&data[4..])?)), + TOKEN => Ok(Self::Token(::decode(&data[4..])?)), TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), + TRANSACTIONAL => + Ok(Self::Transactional(::decode(&data[4..])?)), + TRIE => Ok(Self::Trie(::decode(&data[4..])?)), _ => Err(ink::sol::Error), } } } const DECODING_FAILED: [u8; 4] = sol_error_selector!("DecodingFailed", ()); +const EXECUTION_FAILED: [u8; 4] = sol_error_selector!("ExecutionFailed", (SolBytes>,)); const FUTURE_TIMEOUT_MANDATORY: [u8; 4] = sol_error_selector!("FutureTimeoutMandatory", ()); const MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED: [u8; 4] = sol_error_selector!("MaxMessageTimeoutPerBlockReached", ()); -const MESSAGE_NOT_FOUND: [u8; 4] = sol_error_selector!("MessageNotFound", ()); const ORIGIN_CONVERSION_FAILED: [u8; 4] = sol_error_selector!("OriginConversionFailed", ()); -const REQUEST_PENDING: [u8; 4] = sol_error_selector!("RequestPending", ()); -const TOO_MANY_MESSAGES: [u8; 4] = sol_error_selector!("TooManyMessages", ()); +const SENDING_FAILED: [u8; 4] = sol_error_selector!("SendingFailed", (SolBytes>,)); + +#[test] +fn error_decoding_works() { + use ink::{sol::SolErrorDecode, SolBytes}; + + for (encoded, expected) in [ + ( + "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", + Arithmetic(ArithmeticError::Overflow), + ), + ("72065cff", DecodingFailed), + ( + "20c5a2a9000000000000000000000000000000000000000000000000000000000000000d", + Dispatch(DispatchError::RootNotAllowed), + ), + ( + "15fcd67500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", + ExecutionFailed(SolBytes(Vec::default())) + ), + ("885a28b2", FutureTimeoutMandatory), + ("fc952e0b", MaxMessageTimeoutPerBlockReached), + ("28915ac7", MessageNotFound), + ( + "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", + Module { index: 255, error: SolBytes([255; 4]) }, + ), + ("8926fba8", OriginConversionFailed), + ("806d0f74", RequestPending), + ( + "0ff105a200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", + SendingFailed(SolBytes(Vec::default())) + ), + ( + "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", + Token(TokenError::Blocked), + ), + ("1ec0b2f7", TooManyMessages), + ( + "3008a37e0000000000000000000000000000000000000000000000000000000000000001", + Transactional(TransactionalError::NoLayer), + ), + ( + "3ea87b59000000000000000000000000000000000000000000000000000000000000000d", + Trie(TrieError::DecodeError), + ), + ] { + let data = hex::decode(encoded).unwrap(); + let decoded = ::decode(data.as_slice()).expect(&format!("unable to decode {encoded}")); + assert_eq!(decoded, expected) + } +} From c08c5b99125e2539fb79b2f46ddf34e15eb75456 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 11:53:54 +0100 Subject: [PATCH 271/284] test(api): update callback gas limits --- pop-api-vnext/integration-tests/src/messaging.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index 1dca73297..bb23e2b7c 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -127,7 +127,7 @@ mod ismp { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0x9bf78ffbu32.into(), - gasLimit: Weight { refTime: 1_100_000_000, proofSize: 110_000 }, + gasLimit: Weight { refTime: 1_100_000_000, proofSize: 120_000 }, storageDepositLimit: alloy::U256::from(1 * UNIT / 5) }; let id = contract.get(request, U256::zero(), Some(callback.clone())).unwrap(); @@ -261,7 +261,7 @@ mod ismp { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0xbe910d67u32.into(), - gasLimit: Weight { refTime: 850_000_000, proofSize: 110_000 }, + gasLimit: Weight { refTime: 850_000_000, proofSize: 120_000 }, storageDepositLimit: alloy::U256::from(1 * UNIT / 5) }; let id = contract.post(request, U256::zero(), Some(callback.clone())).unwrap(); @@ -460,7 +460,7 @@ mod xcm { destination: contract.address.0.into(), encoding: Encoding::SolidityAbi, selector: 0x97dbf9fbu32.into(), - gasLimit: Weight { refTime: 850_000_000, proofSize: 110_000 }, + gasLimit: Weight { refTime: 850_000_000, proofSize: 120_000 }, storageDepositLimit: alloy::U256::from(1 * UNIT / 5), }; let (id, query_id) = From 0e2c0af6c2b313b25262dea183504d497d833433 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 13:43:19 +0100 Subject: [PATCH 272/284] docs(api): add readmes --- pop-api-vnext/examples/messaging/README.md | 28 ++++++++++++++++++++++ pop-api-vnext/src/messaging/README.md | 20 ++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pop-api-vnext/examples/messaging/README.md create mode 100644 pop-api-vnext/src/messaging/README.md diff --git a/pop-api-vnext/examples/messaging/README.md b/pop-api-vnext/examples/messaging/README.md new file mode 100644 index 000000000..450755cfe --- /dev/null +++ b/pop-api-vnext/examples/messaging/README.md @@ -0,0 +1,28 @@ +# Cross-Chain Messaging with Pop API + +This [ink!][ink] contract leverages the [Messaging API][pop-api-messaging] for integration and interoperability with the Polkadot ecosystem and its applications. + +It demonstrates how a contract can: +- request state from other chains using Polytope's Interoperable State Machine Protocol (ISMP) +- transact using Polkadot's Cross-Consensus Messaging (XCM). + +## Key benefits of using the Pop API + +- Simplify cross-chain interactions with powerful high-level interfaces which minimize complexity. +- Usage of ISMP or XCM messaging to satisfy cross-chain use cases. +- Optional callbacks for asynchronous response notifications. + +[Learn more how Pop API works.](pop-api) + +## Support + +Be part of our passionate community of Web3 builders. [Join our Telegram](https://t.me/onpopio)! + +Feel free to raise issues if anything is unclear, you have ideas or want to contribute to Pop! Examples using the messaging API are always welcome! + +For any questions related to ink! you can also go to [Polkadot Stack Exchange](https://polkadot.stackexchange.com/) or +ask the [ink! community](https://t.me/inkathon/1). + +[ink]: https://use.ink +[pop-api]: https://github.com/r0gue-io/pop-node/tree/main/pop-api/ +[pop-api-messaging]: https://github.com/r0gue-io/pop-node/tree/main/pop-api-vnext/src/messaging diff --git a/pop-api-vnext/src/messaging/README.md b/pop-api-vnext/src/messaging/README.md new file mode 100644 index 000000000..527e768eb --- /dev/null +++ b/pop-api-vnext/src/messaging/README.md @@ -0,0 +1,20 @@ +## Messaging API + +The `messaging` module provides an api for cross-chain interactions. + +It includes the following interfaces: + +1. `Messaging`: a general interface for cross-chain messaging operations. +2. `Ismp`: a streamlined interface for messaging using the Interoperable State Machine Protocol. +3. `IsmpCallback`: as above, but with additional callback functionality. +4. `Xcm`: a streamlined interface for messaging using Polkadot's Cross-Consensus Messaging (XCM). +5. `XcmCallback`: as above, but with additional callback functionality. + +To use it in your contract add the `messaging` feature to the `pop-api` dependency. + +```toml +# Cargo.toml +pop-api = { git = "https://github.com/r0gue-io/pop-node", default-features = false, features = [ "messaging" ] } +``` + +Check out the [examples](../../examples/messaging/) to learn how you can use the messaging api. From 73a696d7eda51519effd9f3f8d93621a04a130e5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 13:47:30 +0100 Subject: [PATCH 273/284] docs(api): relocate messaging within readme --- pop-api-vnext/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop-api-vnext/README.md b/pop-api-vnext/README.md index 28b25fabe..e23059a10 100644 --- a/pop-api-vnext/README.md +++ b/pop-api-vnext/README.md @@ -21,9 +21,9 @@ applications rather than managing intricate blockchain details. error, making troubleshooting and development easier. - **Use Cases**: - [Fungibles](./src/fungibles/README.md): Interacting and managing fungible tokens. + - [Messaging](./src/messaging/README.md): Cross chain rails for interaction with other chains using ISMP & XCM. - In development: - Non-Fungibles: Interacting and managing non fungible tokens. - - Messaging: Cross chain rails for interaction with other chains using ISMP & XCM. - Sponsorship: Allowing smart contracts to sponsor transactions. - Incentives: Incentivise smart contracts by sharing chain revenue. From 5c0bbfbb589f685fdb8839a727d866d76fdd611c Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 13:59:17 +0100 Subject: [PATCH 274/284] docs(pallet-api): add weights overview from original pr --- pallets/api-vnext/weights.md | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 pallets/api-vnext/weights.md diff --git a/pallets/api-vnext/weights.md b/pallets/api-vnext/weights.md new file mode 100644 index 000000000..188f9144d --- /dev/null +++ b/pallets/api-vnext/weights.md @@ -0,0 +1,81 @@ +# Weights, fees and blockspace + +## Context +In messaging, ISMP messages and XCM response are handled very differently hence, some background is required to appreciate why fees, blockspace and weights are handled as they are. +Generally it comes down to **how the response is initiated** and from this we can deduce how pallet-api must react. +In these cases it is either directly via `call.dispatch(origin)` where call is a type that implements `Dispatchable` or via a transaction, the normal route to dispatch a call. + +Furthermore, on the subject of calling into a contract environment, we have a similar case to using `call.dispatch`, using a method like `bare_call` does not increase block weight or handle fees. We are outside the normal flow of dispatching. + +### XCM +In the case of XCM we are heavily dependant on the __slightly unfinished__ version of pallet-xcm's OnResponse implementation. In the current version (2412) the `RuntimeCall` is decoded and dispatched directly, the function `on_response` returns a weight, which is ignored by the `xcm-executor`. +This means fees are not charged, weight is not tracked and we must handle these ourselves on a pallet level. + +It is important to note that we **must** follow any changes to the `xcm-executor` and `pallet-xcm` regarding `QueryResponse`s closely to avoid any potentially critical issues. Especially around the `max_weight` field in the `QueryResponseInfo` which is **contract defined** and hence a place of vulnerability. + +In our case this `max_weight` will be ignored and setting to `Weight::Unlimited` is the best option from a contract developers perspective. + +The process is then as follows: + +1. Query: + - Charge the caller for the weight of the messaging request only. + - Take a deposit for the (optional) callback execution. + - Take a fee for the response and the cost for submitting the response back to the contract via the `CallbackExecutor`. + +This ensures that fees are paid for the request, the response and we are holding fees for the callback. +The weight used is equal to the request only. + +2. Response: + - Aggregate the response weight and the callback weight and ensure we have enough blockspace for the worst case. + - Execute the callback and return the actual weight used. + - Increase `BlockWeight` by the weight of the response and the callback and callback execution. + - Return any left over weight to the origin. + +The fees have been paid in the `Query` except for the callback gas (which is a deposit). We only need to manage response weight alongside the callback weight and fees. + +### ISMP +For ISMP we are in normal substrate territory, calls are handled via the ismp-pallet's `handle` extrinsic. This greatly simplifies the flow. +ISMP responses are handled by the IsmpModule trait and its weight via IsmpModuleWeights. +The `IsmpModuleWeight` is aggregated into the `pallet-ismp`'s `handle` dispatchable, handling our fees and weights normally for the response weight and the `CallbackExecutor`'s `execution_weight()`. +We still have to manage the callbacks weight. + +The process therefore is much simpler: + +1. Request: + - Charge the caller the weight of the request extrinsic only. + - Take a deposit for the callback execution. + +2. Response: + - Using only the callback weight ensure we have enough blockspace. + - Execute the callback and return weight used. + - Increase blockspace by only weight used. + - Return any left over weight. + +```mermaid +flowchart TD + %% XCM New Query + A(["xcm_new_query"]) --> B{"Callback included?
"} + B -- yes --> C["Take deposit for callback weight"] + B -- no --> D["Take XCM response fee"] + C --> D + + %% XCM Response + E(["xcm_response"]) --> F["xcm-executor"] + F --> G["pallet-xcm::OnResponse"] + G --> H["call.dispatch xcm_response"] + H --> I{"Callback included?"} + I -- yes --> J["Execute callback"] + J --> M{"Success?"} + M -- yes --> K["Refund unused weight"] + K --> N["Increase block weight used"] + I -- no --> L["Save response"] + L --> N + M -- no --> L + + %% ISMP Request and Response + O(["ismp_request"]) --> P{"Callback included?"} + P -- yes --> Q["Take deposit for callback weight"] + + R(["ismp_response"]) --> S["on_response"] + S --> I +``` From db7c4d1744bce051d16425e5c39970e317dc757a Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 14:05:35 +0100 Subject: [PATCH 275/284] docs(pallets-api): relocate weights.md --- pallets/api-vnext/{ => src/messaging}/weights.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pallets/api-vnext/{ => src/messaging}/weights.md (100%) diff --git a/pallets/api-vnext/weights.md b/pallets/api-vnext/src/messaging/weights.md similarity index 100% rename from pallets/api-vnext/weights.md rename to pallets/api-vnext/src/messaging/weights.md From 3e0e67b74bcf253b533e1f2dfc0940741a433531 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 14:06:09 +0100 Subject: [PATCH 276/284] docs(pallet-api): add description to messaging module --- pallets/api-vnext/src/messaging.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pallets/api-vnext/src/messaging.rs b/pallets/api-vnext/src/messaging.rs index 851c6a4c7..2ad7696e8 100644 --- a/pallets/api-vnext/src/messaging.rs +++ b/pallets/api-vnext/src/messaging.rs @@ -1,3 +1,6 @@ +//! The messaging API offers a streamlined interface for cross-chain interactions. The +//! goal is to provide a simplified API that unlocks the power of Polkadot for contracts. + use deposits::*; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo}, From c12f33a15d174ecf4cf7cc6ddc36a30184c9af5e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 14:06:43 +0100 Subject: [PATCH 277/284] docs(pallet-api): add readme --- pallets/api-vnext/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pallets/api-vnext/README.md diff --git a/pallets/api-vnext/README.md b/pallets/api-vnext/README.md new file mode 100644 index 000000000..9407b5f8f --- /dev/null +++ b/pallets/api-vnext/README.md @@ -0,0 +1,9 @@ +# Pop API vNext + +A reimplementation of the Pop API as precompiles for `pallet-revive`. + +## Fungibles API +The fungibles API offers a streamlined interface for interacting with fungible tokens. The goal is to provide a simplified, consistent API that adheres to standards in the smart contract space. + +## Messaging API +The messaging API offers a streamlined interface for cross-chain interactions. The goal is to provide a simplified API that unlocks the power of Polkadot for contracts. From 205b2b9e55484c312304a1680ae1c94bb3037594 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 14:09:13 +0100 Subject: [PATCH 278/284] docs(pallet-api): add initial messaging readme --- pallets/api-vnext/src/messaging/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pallets/api-vnext/src/messaging/README.md diff --git a/pallets/api-vnext/src/messaging/README.md b/pallets/api-vnext/src/messaging/README.md new file mode 100644 index 000000000..939c742e3 --- /dev/null +++ b/pallets/api-vnext/src/messaging/README.md @@ -0,0 +1,7 @@ +# Messaging API + +The messaging API offers a streamlined interface for cross-chain interactions. The goal is to provide a simplified API that unlocks the power of Polkadot for contracts. + +## Weights + +A description on how fees, blockspace and weights are handled can be found [here](weights.md). From 9af7734bf4454612da8465f9a19847f610af2604 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Thu, 31 Jul 2025 14:59:39 +0100 Subject: [PATCH 279/284] docs(pallets/api): add diagrams to messaging readme --- pallets/api-vnext/src/messaging/README.md | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/pallets/api-vnext/src/messaging/README.md b/pallets/api-vnext/src/messaging/README.md index 939c742e3..1040989f1 100644 --- a/pallets/api-vnext/src/messaging/README.md +++ b/pallets/api-vnext/src/messaging/README.md @@ -2,6 +2,54 @@ The messaging API offers a streamlined interface for cross-chain interactions. The goal is to provide a simplified API that unlocks the power of Polkadot for contracts. +## ISMP +The following diagram illustrates the flow of the ISMP implementation: + +```mermaid +flowchart TB + A["Contract"] -- Ismp::get/post --> B["messaging::ISMP Precompile"] + B -- transports::ismp::get/post --> n4["Take Deposit"] + n1["runtime::Router"] -- ISMPModule::on_response --> n2["messaging::ISMP Module"] + n2 --> n3["Callback?"] + D["Relayer"] -- "pallet-ismp::handle(messages)" --> n1 + n3 -- "onGetResponse/onPostReponse" --> A + C["pallet-ismp::ISMP Dispatcher"] -.- D + n4 -- IsmpDispatcher::dispatch_request --> C + C --> n5["Persist Request/Message"] + + n4@{ shape: rounded} + n1@{ shape: rect} + n2@{ shape: rect} + n3@{ shape: diam} + D@{ shape: hex} + n5@{ shape: rounded} +``` + +## XCM +The following diagram illustrates the flow of the XCM implementation: + +```mermaid +flowchart TB + A["Contract"] -- Xcm::newQuery --> B["messaging::XCM Precompile"] + B -- transports::xcm::new_query --> n4["Take Deposit"] + n1["xcm_executor"] -- Pallet::xcm_response --> n2["messaging::Pallet"] + n2 --> n3["Callback?"] + D["XCM"] --
--> n1 + n3 -- onQueryResponse --> A + C["pallet-xcm"] -.- D + n4 -- Xcm::new_notify_query --> C + C --> n5["Persist Request/Message"] + A -- Xcm::send --> B + B -- Pallet::send --> C + + n4@{ shape: rounded} + n1@{ shape: rect} + n2@{ shape: rect} + n3@{ shape: diam} + D@{ shape: hex} + n5@{ shape: rounded} +``` + ## Weights A description on how fees, blockspace and weights are handled can be found [here](weights.md). From fc3418f1e595d5f9574c5147703bfc444feaaa6a Mon Sep 17 00:00:00 2001 From: Daanvdplas Date: Thu, 21 Aug 2025 13:32:09 +0200 Subject: [PATCH 280/284] messaging --- Cargo.lock | 2002 ++++++++--------- Cargo.toml | 42 +- pop-api-vnext/Cargo.lock | 242 +- pop-api-vnext/Cargo.toml | 23 +- pop-api-vnext/examples/fungibles/Cargo.toml | 16 +- pop-api-vnext/examples/messaging/Cargo.toml | 14 +- pop-api-vnext/integration-tests/Cargo.toml | 48 +- .../contracts/fungibles/Cargo.lock | 147 +- .../contracts/fungibles/Cargo.toml | 14 +- .../contracts/fungibles/lib.rs | 22 +- .../contracts/messaging/Cargo.lock | 164 +- .../contracts/messaging/Cargo.toml | 16 +- .../contracts/messaging/lib.rs | 43 +- .../integration-tests/src/messaging.rs | 15 +- pop-api-vnext/src/errors.rs | 2 +- .../src/fungibles/erc20/v0/errors.rs | 12 +- pop-api-vnext/src/fungibles/v0.rs | 44 +- pop-api-vnext/src/fungibles/v0/errors.rs | 12 +- pop-api-vnext/src/messaging.rs | 7 +- pop-api-vnext/src/messaging/ismp.rs | 2 +- pop-api-vnext/src/messaging/ismp/v0.rs | 60 +- pop-api-vnext/src/messaging/ismp/v0/errors.rs | 4 +- pop-api-vnext/src/messaging/v0.rs | 20 +- pop-api-vnext/src/messaging/v0/errors.rs | 4 +- pop-api-vnext/src/messaging/xcm.rs | 2 +- pop-api-vnext/src/messaging/xcm/v0.rs | 52 +- pop-api-vnext/src/messaging/xcm/v0/errors.rs | 20 +- pop-api-vnext/src/sol.rs | 2 +- 28 files changed, 1493 insertions(+), 1558 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18d1a2df9..159280fa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,9 +32,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -163,14 +163,14 @@ dependencies = [ "const-hex", "derive_more 2.0.1", "foldhash", - "hashbrown 0.15.3", - "indexmap 2.9.0", + "hashbrown 0.15.5", + "indexmap 2.10.0", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand 0.9.1", + "rand 0.9.2", "ruint", "rustc-hash 2.1.1", "serde", @@ -199,7 +199,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -211,11 +211,11 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.9.0", + "indexmap 2.10.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "syn-solidity", "tiny-keccak", ] @@ -232,7 +232,7 @@ dependencies = [ "macro-string", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "syn-solidity", ] @@ -281,9 +281,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -296,44 +296,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", - "once_cell", - "windows-sys 0.59.0", + "once_cell_polyfill", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "approx" @@ -355,7 +355,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -432,7 +432,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -537,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -575,7 +575,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -603,7 +603,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -660,7 +660,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -739,7 +739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d55334c98d756b32dcceb60248647ab34f027690f87f9a362fd292676ee927" dependencies = [ "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -797,7 +797,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", ] @@ -809,7 +809,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] @@ -821,7 +821,7 @@ checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] @@ -833,7 +833,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -861,8 +861,8 @@ dependencies = [ "cumulus-primitives-aura 0.15.0", "cumulus-primitives-core 0.16.0", "cumulus-primitives-utility 0.17.1", - "frame-benchmarking 38.0.0", - "frame-executive 38.0.0", + "frame-benchmarking 38.1.1", + "frame-executive 38.0.1", "frame-metadata-hash-extension 0.6.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -892,7 +892,7 @@ dependencies = [ "pallet-uniques 38.0.0", "pallet-utility 38.0.0", "pallet-vesting 38.0.0", - "pallet-xcm 17.0.2", + "pallet-xcm 17.0.4", "pallet-xcm-benchmarks 17.0.1", "pallet-xcm-bridge-hub-router 0.15.3", "parachains-common 18.0.0", @@ -924,7 +924,7 @@ dependencies = [ "staging-parachain-info 0.17.0", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "substrate-wasm-builder 24.0.2", "system-parachains-constants 1.0.0 (git+https://github.com/paseo-network/runtimes?tag=v1.4.3)", "xcm-runtime-apis 0.4.3", @@ -1064,7 +1064,7 @@ dependencies = [ "log", "pallet-asset-conversion 20.0.0", "pallet-assets 40.0.0", - "pallet-xcm 17.0.2", + "pallet-xcm 17.0.4", "parachains-common 18.0.0", "parity-scale-codec", "scale-info", @@ -1072,7 +1072,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "substrate-wasm-builder 24.0.2", ] @@ -1116,9 +1116,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" dependencies = [ "concurrent-queue", "event-listener-strategy", @@ -1135,7 +1135,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.3.0", - "futures-lite 2.6.0", + "futures-lite 2.6.1", "pin-project-lite", "slab", ] @@ -1154,13 +1154,13 @@ dependencies = [ [[package]] name = "async-fs" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" dependencies = [ - "async-lock 3.4.0", + "async-lock 3.4.1", "blocking", - "futures-lite 2.6.0", + "futures-lite 2.6.1", ] [[package]] @@ -1185,21 +1185,20 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" dependencies = [ - "async-lock 3.4.0", + "async-lock 3.4.1", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.6.0", + "futures-lite 2.6.1", "parking", - "polling 3.7.4", - "rustix 0.38.44", + "polling 3.10.0", + "rustix 1.0.8", "slab", - "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1213,11 +1212,11 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ - "event-listener 5.4.0", + "event-listener 5.4.1", "event-listener-strategy", "pin-project-lite", ] @@ -1239,9 +1238,9 @@ 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.5.0", "blocking", - "futures-lite 2.6.0", + "futures-lite 2.6.1", ] [[package]] @@ -1263,39 +1262,38 @@ dependencies = [ [[package]] name = "async-process" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" +checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" dependencies = [ - "async-channel 2.3.1", - "async-io 2.4.0", - "async-lock 3.4.0", + "async-channel 2.5.0", + "async-io 2.5.0", + "async-lock 3.4.1", "async-signal", "async-task", "blocking", "cfg-if", - "event-listener 5.4.0", - "futures-lite 2.6.0", - "rustix 0.38.44", - "tracing", + "event-listener 5.4.1", + "futures-lite 2.6.1", + "rustix 1.0.8", ] [[package]] name = "async-signal" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" dependencies = [ - "async-io 2.4.0", - "async-lock 3.4.0", + "async-io 2.5.0", + "async-lock 3.4.1", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.44", + "rustix 1.0.8", "signal-hook-registry", "slab", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1312,7 +1310,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1372,14 +1370,14 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -1434,9 +1432,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "binary-merkle-tree" @@ -1506,7 +1504,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1528,9 +1526,9 @@ dependencies = [ [[package]] name = "bip39" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" +checksum = "43d193de1f7487df1914d3a568b772458861d33f9c54249612cc2893d6915054" dependencies = [ "bitcoin_hashes 0.13.0", "serde", @@ -1695,14 +1693,14 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ - "async-channel 2.3.1", + "async-channel 2.5.0", "async-task", "futures-io", - "futures-lite 2.6.0", + "futures-lite 2.6.1", "piper", ] @@ -1731,7 +1729,7 @@ dependencies = [ "serde_json", "serde_repr", "serde_urlencoded", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-util", "tower-service", @@ -2208,9 +2206,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byte-slice-cast" @@ -2226,9 +2224,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -2267,9 +2265,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0" dependencies = [ "serde", ] @@ -2302,8 +2300,8 @@ dependencies = [ "serde", "serde-untagged", "serde-value", - "thiserror 2.0.12", - "toml 0.8.22", + "thiserror 2.0.14", + "toml 0.8.23", "unicode-xid", "url", ] @@ -2322,20 +2320,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "cargo_metadata" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" -dependencies = [ - "camino", - "cargo-platform 0.1.9", - "semver 1.0.26", - "serde", - "serde_json", - "thiserror 2.0.12", -] - [[package]] name = "cargo_metadata" version = "0.21.0" @@ -2348,14 +2332,14 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] name = "cc" -version = "1.2.23" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4ac86a9e5bc1e2b3449ab9d7d3a6a405e3d1bb28d7b9be8614f55846ae3766" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "jobserver", "libc", @@ -2388,9 +2372,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -2511,9 +2495,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.38" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" +checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" dependencies = [ "clap_builder", "clap_derive", @@ -2521,9 +2505,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.38" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" +checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" dependencies = [ "anstream", "anstyle", @@ -2534,21 +2518,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "coarsetime" @@ -2595,24 +2579,14 @@ dependencies = [ "nom", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "colored" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" -dependencies = [ - "lazy_static", - "windows-sys 0.59.0", -] +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" @@ -2763,50 +2737,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "contract-build" -version = "5.0.3" -source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" -dependencies = [ - "anyhow", - "blake2 0.10.6", - "bollard", - "cargo_metadata 0.19.2", - "clap", - "colored 2.2.0", - "contract-metadata 5.0.3", - "crossterm 0.28.1", - "duct 0.13.7", - "heck 0.5.0", - "hex", - "impl-serde 0.5.0", - "parity-scale-codec", - "regex", - "rustc_version 0.4.1", - "semver 1.0.26", - "serde", - "serde_json", - "strum 0.26.3", - "tempfile", - "term_size", - "tokio", - "tokio-stream", - "toml 0.8.22", - "tracing", - "url", - "uzers", - "walkdir", - "wasm-encoder", - "wasm-opt", - "wasmparser 0.220.1", - "which 7.0.3", - "zip 2.4.2", -] - [[package]] name = "contract-build" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/cargo-contract#785ff495a0ed3040eea93edd1ac5771468edda2c" +source = "git+https://github.com/use-ink/cargo-contract?tag=v6.0.0-alpha.1#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" dependencies = [ "alloy-json-abi", "anyhow", @@ -2814,17 +2748,17 @@ dependencies = [ "bollard", "cargo_metadata 0.21.0", "clap", - "colored 3.0.0", - "contract-metadata 6.0.0-alpha.1", - "crossterm 0.29.0", - "duct 1.0.0", + "colored", + "contract-metadata", + "crossterm", + "duct", "heck 0.5.0", "hex", "impl-serde 0.5.0", "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", "itertools 0.14.0", "parity-scale-codec", - "polkavm-linker 0.26.0 (git+https://github.com/paritytech/polkavm.git)", + "polkavm-linker 0.27.0", "regex", "rustc_version 0.4.1", "semver 1.0.26", @@ -2835,33 +2769,20 @@ dependencies = [ "term_size", "tokio", "tokio-stream", - "toml 0.8.22", + "toml 0.8.23", "tracing", "url", "uzers", "walkdir", - "which 8.0.0", + "which", "zip 3.0.0", "zip 4.3.0", ] -[[package]] -name = "contract-metadata" -version = "5.0.3" -source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" -dependencies = [ - "anyhow", - "impl-serde 0.5.0", - "semver 1.0.26", - "serde", - "serde_json", - "url", -] - [[package]] name = "contract-metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/cargo-contract#785ff495a0ed3040eea93edd1ac5771468edda2c" +source = "git+https://github.com/use-ink/cargo-contract?tag=v6.0.0-alpha.1#6a5a37a8ff51e380a184a2ebc1993d9b437b6812" dependencies = [ "anyhow", "impl-serde 0.5.0", @@ -2898,9 +2819,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", @@ -3043,15 +2964,15 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-types", ] [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -3105,22 +3026,6 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crossterm" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" -dependencies = [ - "bitflags 2.9.1", - "crossterm_winapi", - "mio", - "parking_lot 0.12.3", - "rustix 0.38.44", - "signal-hook", - "signal-hook-mio", - "winapi", -] - [[package]] name = "crossterm" version = "0.29.0" @@ -3132,8 +3037,8 @@ dependencies = [ "derive_more 2.0.1", "document-features", "mio", - "parking_lot 0.12.3", - "rustix 1.0.7", + "parking_lot 0.12.4", + "rustix 1.0.8", "signal-hook", "signal-hook-mio", "winapi", @@ -3150,9 +3055,9 @@ dependencies = [ [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" @@ -3274,7 +3179,7 @@ dependencies = [ "cumulus-primitives-core 0.19.0", "futures", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -3302,7 +3207,7 @@ dependencies = [ "cumulus-relay-chain-interface", "futures", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -3329,7 +3234,7 @@ dependencies = [ "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-timestamp 37.0.0", "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tokio", "tracing", ] @@ -3362,7 +3267,7 @@ dependencies = [ "sp-timestamp 37.0.0", "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tracing", ] @@ -3391,7 +3296,7 @@ dependencies = [ "futures", "futures-timer", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-parachain-primitives 17.0.0", @@ -3544,7 +3449,7 @@ dependencies = [ "cumulus-primitives-parachain-inherent 0.16.0", "cumulus-primitives-proof-size-hostfunction 0.10.0", "environmental", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "impl-trait-for-tuples", @@ -3583,7 +3488,7 @@ dependencies = [ "frame-benchmarking 41.0.0", "frame-support 41.0.0", "frame-system 41.0.0", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "impl-trait-for-tuples", "log", "pallet-message-queue 44.0.0", @@ -3615,7 +3520,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3626,7 +3531,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3635,7 +3540,7 @@ version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18168570689417abfb514ac8812fca7e6429764d01942750e395d7d8ce0716ef" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "pallet-session 38.0.0", @@ -3715,7 +3620,7 @@ dependencies = [ "bounded-collections 0.2.4", "bp-xcm-bridge-hub-router 0.14.1", "cumulus-primitives-core 0.16.0", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -3729,7 +3634,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -3897,7 +3802,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -3997,7 +3902,7 @@ dependencies = [ "sp-consensus", "sp-consensus-babe 0.43.0", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tracing", ] @@ -4034,7 +3939,7 @@ dependencies = [ "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "tokio-util", @@ -4093,7 +3998,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4111,9 +4016,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.158" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a71ea7f29c73f7ffa64c50b83c9fe4d3a6d4be89a86b009eb80d5a6d3429d741" +checksum = "7aa144b12f11741f0dab5b4182896afad46faa0598b6a061f7b9d17a21837ba7" dependencies = [ "cc", "cxxbridge-cmd", @@ -4125,47 +4030,50 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.158" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a8232661d66dcf713394726157d3cfe0a89bfc85f52d6e9f9bbc2306797fe7" +checksum = "12d3cbb84fb003242941c231b45ca9417e786e66e94baa39584bd99df3a270b6" dependencies = [ "cc", "codespan-reporting", + "indexmap 2.10.0", "proc-macro2", "quote", "scratch", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "cxxbridge-cmd" -version = "1.0.158" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f44296c8693e9ea226a48f6a122727f77aa9e9e338380cb021accaeeb7ee279" +checksum = "3fa36b7b249d43f67a3f54bd65788e35e7afe64bbc671396387a48b3e8aaea94" dependencies = [ "clap", "codespan-reporting", + "indexmap 2.10.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "cxxbridge-flags" -version = "1.0.158" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f69c181c176981ae44ba9876e2ea41ce8e574c296b38d06925ce9214fb8e4" +checksum = "77707c70f6563edc5429618ca34a07241b75ebab35bd01d46697c75d58f8ddfe" [[package]] name = "cxxbridge-macro" -version = "1.0.158" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8faff5d4467e0709448187df29ccbf3b0982cc426ee444a193f87b11afb565a8" +checksum = "ede6c0fb7e318f0a11799b86ee29dcf17b9be2960bd379a6c38e1a96a6010fff" dependencies = [ + "indexmap 2.10.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4213,7 +4121,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4235,7 +4143,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4248,7 +4156,7 @@ dependencies = [ "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.11", ] [[package]] @@ -4274,7 +4182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4344,18 +4252,18 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "derive-where" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73f2692d4bd3cac41dca28934a39894200c9fabf49586d77d0e5954af1d7902" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4366,7 +4274,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4379,7 +4287,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4408,7 +4316,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "unicode-xid", ] @@ -4421,7 +4329,7 @@ dependencies = [ "convert_case 0.7.1", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "unicode-xid", ] @@ -4514,7 +4422,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4538,9 +4446,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.101", + "syn 2.0.104", "termcolor", - "toml 0.8.22", + "toml 0.8.23", "walkdir", ] @@ -4573,21 +4481,9 @@ checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" [[package]] name = "duct" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c" -dependencies = [ - "libc", - "once_cell", - "os_pipe", - "shared_child", -] - -[[package]] -name = "duct" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6ce170a0e8454fa0f9b0e5ca38a6ba17ed76a50916839d217eb5357e05cdfde" +checksum = "d7478638a31d1f1f3d6c9f5e57c76b906a04ac4879d6fd0fb6245bc88f73fd0b" dependencies = [ "libc", "os_pipe", @@ -4619,14 +4515,14 @@ checksum = "7e8671d54058979a37a26f3511fbf8d198ba1aa35ffb202c42587d918d77213a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -4655,9 +4551,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -4692,7 +4588,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4778,7 +4674,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4798,7 +4694,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4818,27 +4714,27 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "enumflags2" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2f4b465f5318854c6f8dd686ede6c0a9dc67d4b1ac241cf0eb51521a309147" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4849,7 +4745,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4918,12 +4814,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -5043,9 +4939,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -5058,7 +4954,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.0", + "event-listener 5.4.1", "pin-project-lite", ] @@ -5083,7 +4979,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5152,11 +5048,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb42427514b063d97ce21d5199f36c0c307d981434a6be32582bc79fe5bd2303" dependencies = [ "expander", - "indexmap 2.9.0", + "indexmap 2.10.0", "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5229,7 +5125,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "scale-info", ] @@ -5339,9 +5235,9 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "38.0.0" +version = "38.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01bdd47c2d541b38bd892da647d1e972c9d85b4ecd7094ad64f7600175da54d" +checksum = "3a0f983d69640f90a0ce87f107cff07f6f8f7f5ef9334ffb6f37a9c6e224ca1d" dependencies = [ "frame-support 38.2.0", "frame-support-procedural 30.0.6", @@ -5455,7 +5351,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" dependencies = [ - "frame-metadata 20.0.0", + "frame-metadata 21.0.0", "parity-scale-codec", "scale-decode 0.16.0", "scale-info", @@ -5465,14 +5361,14 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "14.0.1" +version = "14.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" +checksum = "bc435a406e04540f00979782c45db0534440873ae526e07a290c286cfcb99b09" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5483,7 +5379,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5492,7 +5388,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c36f5116192c63d39f1b4556fa30ac7db5a6a52575fa241b045f7dfa82ecc2be" dependencies = [ - "frame-election-provider-solution-type 14.0.1", + "frame-election-provider-solution-type 14.0.2", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -5522,9 +5418,9 @@ dependencies = [ [[package]] name = "frame-executive" -version = "38.0.0" +version = "38.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c365bf3879de25bbee28e9584096955a02fbe8d7e7624e10675800317f1cee5b" +checksum = "e305d8c5cf9f884795d3c57c899be86e3a476e5b5f914fa0ffefb5afd9cba5c5" dependencies = [ "aquamarine", "frame-support 38.2.0", @@ -5581,6 +5477,17 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-metadata" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dfd1d7eae1d94e32e869e2fb272d81f52dd8db57820a373adb83ea24d7d862" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "frame-metadata" version = "23.0.0" @@ -5780,7 +5687,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5801,7 +5708,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5821,7 +5728,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5833,7 +5740,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5846,7 +5753,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5858,7 +5765,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5868,7 +5775,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5879,7 +5786,7 @@ checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5889,7 +5796,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5957,7 +5864,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9693b2a736beb076e673520e1e8dee4fc128b8d35b020ef3e8a4b1b5ad63d9f2" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -6135,9 +6042,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ "fastrand 2.3.0", "futures-core", @@ -6154,7 +6061,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -6224,7 +6131,7 @@ dependencies = [ "libc", "log", "rustversion", - "windows 0.61.1", + "windows 0.61.3", ] [[package]] @@ -6266,7 +6173,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -6337,9 +6244,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "governor" @@ -6353,7 +6260,7 @@ dependencies = [ "futures-timer", "no-std-compat", "nonzero_ext", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "portable-atomic", "quanta", "rand 0.8.5", @@ -6374,9 +6281,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", @@ -6384,7 +6291,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -6393,9 +6300,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -6403,7 +6310,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -6470,9 +6377,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -6509,15 +6416,9 @@ 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" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -6572,7 +6473,7 @@ dependencies = [ "ipnet", "once_cell", "rand 0.8.5", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 1.0.69", "tinyvec", "tokio", @@ -6596,9 +6497,9 @@ dependencies = [ "idna", "ipnet", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "ring 0.17.14", - "thiserror 2.0.12", + "thiserror 2.0.14", "tinyvec", "tokio", "tracing", @@ -6617,7 +6518,7 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "resolv-conf", "smallvec", @@ -6638,11 +6539,11 @@ dependencies = [ "ipconfig", "moka", "once_cell", - "parking_lot 0.12.3", - "rand 0.9.1", + "parking_lot 0.12.4", + "rand 0.9.2", "resolv-conf", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tracing", ] @@ -6780,14 +6681,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -6803,7 +6704,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.10", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "httparse", @@ -6832,11 +6733,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "futures-util", "http 1.3.1", "hyper 1.6.0", "hyper-util", @@ -6851,19 +6751,20 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" 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.6.0", "tokio", "tower-service", "tracing", @@ -7037,7 +6938,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.5.0", "core-foundation 0.9.4", "fnv", "futures", @@ -7157,7 +7058,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -7192,12 +7093,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "serde", ] @@ -7229,16 +7130,16 @@ dependencies = [ [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "const_format", "deranged", "derive_more 2.0.1", "ink_env 6.0.0-alpha.1", "ink_macro 6.0.0-alpha.1", - "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "ink_storage 6.0.0-alpha.1", "keccak-const", "linkme", @@ -7264,7 +7165,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -7288,13 +7189,13 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2 0.10.6", "derive_more 2.0.1", @@ -7302,7 +7203,7 @@ dependencies = [ "heck 0.5.0", "impl-serde 0.5.0", "ink_ir 6.0.0-alpha.1", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "itertools 0.14.0", "parity-scale-codec", "polkavm-derive 0.26.0", @@ -7310,7 +7211,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -7332,12 +7233,12 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2 0.10.6", "derive_more 2.0.1", "hex-literal 1.0.0", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "pallet-revive 0.1.0", "pallet-revive-uapi 0.1.0", "parity-scale-codec", @@ -7369,7 +7270,7 @@ dependencies = [ "scale-decode 0.11.1", "scale-encode 0.6.0", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "sha2 0.10.9", "sha3", @@ -7380,7 +7281,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2 0.10.6", "cfg-if", @@ -7389,8 +7290,8 @@ dependencies = [ "hex-literal 1.0.0", "ink_allocator 6.0.0-alpha.1", "ink_engine 6.0.0-alpha.1", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "ink_storage_traits 6.0.0-alpha.1", "num-traits", "pallet-revive 0.1.0", @@ -7400,7 +7301,7 @@ dependencies = [ "scale-decode 0.16.0", "scale-encode 0.10.0", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.30.0", "sha2 0.10.9", "sha3", @@ -7423,23 +7324,23 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2 0.10.6", "either", "impl-serde 0.5.0", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "itertools 0.14.0", "proc-macro2", "quote", "sha3", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -7454,22 +7355,22 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_codegen 6.0.0-alpha.1", "ink_ir 6.0.0-alpha.1", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] @@ -7486,37 +7387,37 @@ dependencies = [ "linkme", "parity-scale-codec", "scale-info", - "schemars", + "schemars 0.8.22", "serde", ] [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "derive_more 2.0.1", "impl-serde 0.5.0", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "parity-scale-codec", "scale-info", - "schemars", + "schemars 0.8.22", "serde", ] [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2182b3b6e9336c5195c2d234f710cec230b0eabc" dependencies = [ "derive_more 2.0.1", "impl-serde 0.5.0", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", "parity-scale-codec", "scale-info", - "schemars", + "schemars 0.8.22", "serde", ] @@ -7532,7 +7433,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -7540,7 +7441,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2182b3b6e9336c5195c2d234f710cec230b0eabc" dependencies = [ "cfg-if", ] @@ -7563,13 +7464,13 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink?branch=master#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "itertools 0.14.0", "num-traits", "pallet-revive 0.1.0", @@ -7591,13 +7492,13 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?branch=master#2182b3b6e9336c5195c2d234f710cec230b0eabc" dependencies = [ "alloy-sol-types", "cfg-if", "derive_more 2.0.1", "impl-trait-for-tuples", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?branch=master)", "itertools 0.14.0", "num-traits", "pallet-revive 0.1.0", @@ -7638,15 +7539,15 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "array-init", "cfg-if", "derive_more 2.0.1", "ink_env 6.0.0-alpha.1", - "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "ink_storage_traits 6.0.0-alpha.1", "pallet-revive-uapi 0.1.0", "parity-scale-codec", @@ -7669,11 +7570,11 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#81de7d2d6b92e61788b0e5a75397f0e591a19c55" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ - "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", - "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink)", + "ink_metadata 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_prelude 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", + "ink_primitives 6.0.0-alpha.1 (git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1)", "parity-scale-codec", "scale-info", "sp-io 30.0.0", @@ -7755,6 +7656,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + [[package]] name = "ip_network" version = "0.4.1" @@ -7767,7 +7679,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", @@ -7785,7 +7697,7 @@ version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.1", + "hermit-abi 0.5.2", "libc", "windows-sys 0.59.0", ] @@ -7819,7 +7731,7 @@ dependencies = [ "scale-info", "serde", "serde-hex-utils", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -7953,14 +7865,14 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "jiff" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02000660d30638906021176af16b17498bd0d12813dbfe7b276d8bc7f3c0806" +checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" dependencies = [ "jiff-static", "log", @@ -7971,13 +7883,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c30758ddd7188629c6713fc45d1188af4f44c90582311d0c8d8c9907f60c48" +checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -8075,7 +7987,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "jsonrpsee-types", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "rustc-hash 2.1.1", @@ -8097,7 +8009,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -8257,7 +8169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.3", + "parking_lot 0.12.4", ] [[package]] @@ -8268,7 +8180,7 @@ checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "regex", "rocksdb", "smallvec", @@ -8300,26 +8212,20 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - [[package]] name = "libc" -version = "0.2.172" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[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", + "windows-targets 0.53.3", ] [[package]] @@ -8402,7 +8308,7 @@ dependencies = [ "multihash 0.19.3", "multistream-select", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -8426,7 +8332,7 @@ dependencies = [ "hickory-resolver 0.24.4", "libp2p-core", "libp2p-identity", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "smallvec", "tracing", ] @@ -8456,9 +8362,9 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb68ea10844211a59ce46230909fd0ea040e8a192454d4cc2ee0d53e12280eb" +checksum = "3104e13b51e4711ff5738caa1fb54467c8604c2e94d607e27745bcf709068774" dependencies = [ "bs58", "ed25519-dalek", @@ -8467,7 +8373,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "sha2 0.10.9", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", "zeroize", ] @@ -8516,7 +8422,7 @@ dependencies = [ "libp2p-swarm", "rand 0.8.5", "smallvec", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tracing", "void", @@ -8597,12 +8503,12 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-tls", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "quinn", "rand 0.8.5", "ring 0.17.14", "rustls", - "socket2 0.5.9", + "socket2 0.5.10", "thiserror 1.0.69", "tokio", "tracing", @@ -8661,7 +8567,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -8676,7 +8582,7 @@ dependencies = [ "libc", "libp2p-core", "libp2p-identity", - "socket2 0.5.9", + "socket2 0.5.10", "tokio", "tracing", ] @@ -8727,7 +8633,7 @@ dependencies = [ "futures-rustls", "libp2p-core", "libp2p-identity", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project-lite", "rw-stream-sink", "soketto 0.8.1", @@ -8749,18 +8655,18 @@ dependencies = [ "thiserror 1.0.69", "tracing", "yamux 0.12.1", - "yamux 0.13.5", + "yamux 0.13.6", ] [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.12", + "redox_syscall 0.5.17", ] [[package]] @@ -8878,7 +8784,7 @@ checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -8946,13 +8852,13 @@ dependencies = [ "futures", "futures-timer", "hickory-resolver 0.25.2", - "indexmap 2.9.0", + "indexmap 2.10.0", "libc", "mockall", "multiaddr 0.17.1", "multihash 0.17.0", "network-interface", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "prost 0.13.5", "prost-build", @@ -8962,8 +8868,8 @@ dependencies = [ "simple-dns", "smallvec", "snow", - "socket2 0.5.9", - "thiserror 2.0.12", + "socket2 0.5.10", + "thiserror 2.0.14", "tokio", "tokio-stream", "tokio-tungstenite", @@ -8974,7 +8880,7 @@ dependencies = [ "url", "x25519-dalek", "x509-parser 0.17.0", - "yamux 0.13.5", + "yamux 0.13.6", "yasna", "zeroize", ] @@ -8987,9 +8893,9 @@ checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -9035,7 +8941,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -9089,7 +8995,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9101,7 +9007,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9115,7 +9021,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9126,7 +9032,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9137,7 +9043,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9161,9 +9067,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memfd" @@ -9185,9 +9091,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" dependencies = [ "libc", ] @@ -9217,7 +9123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -9228,7 +9134,7 @@ checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" dependencies = [ "foldhash", "hash-db", - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -9265,23 +9171,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[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", "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] @@ -9300,7 +9206,7 @@ dependencies = [ "hashlink", "lioness", "log", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", @@ -9366,7 +9272,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9379,7 +9285,7 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "loom", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "portable-atomic", "rustc_version 0.4.1", "smallvec", @@ -9582,7 +9488,7 @@ dependencies = [ "log", "netlink-packet-core", "netlink-sys", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -9600,13 +9506,13 @@ dependencies = [ [[package]] name = "network-interface" -version = "2.0.1" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3329f515506e4a2de3aa6e07027a6758e22e0f0e8eaf64fa47261cec2282602" +checksum = "07709a6d4eba90ab10ec170a0530b3aafc81cb8a2d380e4423ae41fc55fe5745" dependencies = [ "cc", "libc", - "thiserror 1.0.69", + "thiserror 2.0.14", "winapi", ] @@ -9731,7 +9637,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -9776,11 +9682,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.5.2", "libc", ] @@ -9842,6 +9748,12 @@ dependencies = [ "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 = "opaque-debug" version = "0.2.3" @@ -9890,7 +9802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43dfaf083aef571385fccfdc3a2f8ede8d0a1863160455d4f2b014d8f7d04a3f" dependencies = [ "expander", - "indexmap 2.9.0", + "indexmap 2.10.0", "itertools 0.11.0", "petgraph 0.6.5", "proc-macro-crate 3.3.0", @@ -9910,9 +9822,9 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" +checksum = "db335f4760b14ead6290116f2427bf33a14d4f0617d49f78a246de10c1831224" dependencies = [ "libc", "windows-sys 0.59.0", @@ -9979,7 +9891,7 @@ version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33f0078659ae95efe6a1bf138ab5250bc41ab98f22ff3651d0208684f08ae797" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10064,7 +9976,7 @@ version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71b2149aa741bc39466bbcc92d9d0ab6e9adcf39d2790443a735ad573b3191e7" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -10111,7 +10023,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "406a486466d15acc48c99420191f96f1af018f3381fde829c467aba489030f18" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "pallet-transaction-payment 38.0.2", @@ -10145,7 +10057,7 @@ version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f45f4eb6027fc34c4650e0ed6a7e57ed3335cc364be74b4531f714237676bcee" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "impl-trait-for-tuples", @@ -10283,7 +10195,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee096c0def13832475b340d00121025e0225de29604d44bc6dfcaa294c995b4" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10332,7 +10244,7 @@ checksum = "0fd23a6f94ba9c1e57c8a7f8a41327d132903a79c55c0c83f36cbae19946cf10" dependencies = [ "aquamarine", "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -10374,7 +10286,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcb1f72d7048fbd11e884b4693f7d438b8202340ff252e2a402e04c638fe2d02" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10446,7 +10358,7 @@ checksum = "9c64f536e7f04cf3a0a17fdf20870ddb3d63a7690419c40f75cfd2f72b6e6d22" dependencies = [ "array-bytes 6.2.3", "binary-merkle-tree 15.0.1", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10495,7 +10407,7 @@ version = "37.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59f3d032f78624b12238a31b6e80ab3e112381a7bc222df152650e33bb2ce190" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10550,7 +10462,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "018b477d7d464c451b1d09a4ce9e792c3c65b15fd764b23da38ff9980e786065" dependencies = [ "bitvec", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10586,7 +10498,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7f3bc38ae6584b5f57e4de3e49e5184bfc0f20692829530ae1465ffe04e09e7" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10623,7 +10535,7 @@ version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658798d70c9054165169f6a6a96cfa9d6a5e7d24a524bc19825bf17fcbc5cc5a" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10711,7 +10623,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -10743,7 +10655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999c242491b74395b8c5409ef644e782fe426d87ae36ad92240ffbf21ff0a76e" dependencies = [ "assert_matches", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -10823,7 +10735,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f9ad5ae0c13ba3727183dadf1825b6b7b0b0598ed5c366f8697e13fd540f7d" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -10867,7 +10779,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4111d0d27545c260c9dd0d6fc504961db59c1ec4b42e1bcdc28ebd478895c22" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-system 38.0.0", "parity-scale-codec", @@ -10913,7 +10825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ee60e8ef10b3936f2700bd61fa45dcc190c61124becc63bed787addcfa0d20" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -10949,7 +10861,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d3a570a4aac3173ea46b600408183ca2bcfdaadc077f802f11e6055963e2449" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -10995,7 +10907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a4288548de9a755e39fcb82ffb9024b6bb1ba0f582464a44423038dd7a892e" dependencies = [ "enumflags2", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11027,7 +10939,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fd95270cf029d16cb40fe6bd9f8ab9c78cd966666dccbca4d8bfec35c5bba5" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11066,7 +10978,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5e4b97de630427a39d50c01c9e81ab8f029a00e56321823958b39b438f7b940" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -11166,7 +11078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "983f7d1be18e9a089a3e23670918f5085705b4403acd3fdde31878d57b76a1a8" dependencies = [ "environmental", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11241,7 +11153,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6932dfb85f77a57c2d1fdc28a7b3a59ffe23efd8d5bb02dc3039d91347e4a3b" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11288,7 +11200,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e5099c9a4442efcc1568d88ca1d22d624e81ab96358f99f616c67fbd82532d2" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11329,7 +11241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59e2aad461a0849d7f0471576eeb1fe3151795bcf2ec9e15eca5cca5b9d743b2" dependencies = [ "enumflags2", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11448,7 +11360,7 @@ version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d2eaca0349bcda923343226b8b64d25a80b67e0a1ebaaa5b0ab1e1b3b225bc" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -11542,7 +11454,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69aa1b24cdffc3fa8c89cdea32c83f1bf9c1c82a87fa00e57ae4be8e85f5e24f" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -11590,7 +11502,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9aba424d55e17b2a2bec766a41586eab878137704d4803c04bebd6a4743db7b" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -11624,7 +11536,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "407828bc48c6193ac076fdf909b2fadcaaecd65f42b0b0a04afe22fe8e563834" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11657,7 +11569,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d39df395f0dbcf07dafe842916adea3266a87ce36ed87b5132184b6bcd746393" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -11711,7 +11623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3008c20531d1730c9b457ae77ecf0e3c9b07aaf8c4f5d798d61ef6f0b9e2d4b" dependencies = [ "assert_matches", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -11748,7 +11660,7 @@ source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.4.3#f6cd32d205 dependencies = [ "cumulus-pallet-parachain-system 0.17.2", "cumulus-primitives-core 0.16.0", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "pallet-proxy 38.0.0", @@ -11786,7 +11698,7 @@ dependencies = [ "parity-scale-codec", "paste", "polkavm 0.26.0", - "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-common 0.26.0", "rand 0.8.5", "ripemd", "rlp 0.6.1", @@ -11858,10 +11770,10 @@ dependencies = [ "anyhow", "cargo_metadata 0.15.4", "pallet-revive-uapi 0.1.0", - "polkavm-linker 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-linker 0.26.0", "sp-core 28.0.0", "sp-io 30.0.0", - "toml 0.8.22", + "toml 0.8.23", ] [[package]] @@ -11875,7 +11787,7 @@ dependencies = [ "polkavm-linker 0.21.0", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-io 41.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "toml 0.8.22", + "toml 0.8.23", ] [[package]] @@ -11885,7 +11797,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -11895,7 +11807,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -11937,12 +11849,12 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "39.0.0" +version = "39.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26899a331e7ab5f7d5966cbf203e1cf5bd99cd110356d7ddcaa7597087cdc0b5" +checksum = "8ae668abe6b400280a7f6f3e5ad89a84be7e82f963a7456de80589467693d3f2" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12019,7 +11931,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aadce7df0fee981721983795919642648b846dab5ab9096f82c2cea781007d0" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "pallet-session 38.0.0", @@ -12069,7 +11981,7 @@ version = "38.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8efdbfe23385add01c734e6ddd7967e11a04fad0da7e4e42e6ae2501d1e12016" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -12153,7 +12065,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -12202,7 +12114,7 @@ version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138c15b4200b9dc4c3e031def6a865a235cdc76ff91ee96fba19ca1787c9dda6" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12236,7 +12148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1574fe2aed3d52db4a389b77b53d8c9758257b121e3e7bbe24c4904e11681e0e" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -12267,7 +12179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9ba9b71bbfd33ae672f23ba7efaeed2755fdac37b8f946cb7474fc37841b7e1" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12410,7 +12322,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98bfdd3bb9b58fb010bcd419ff5bf940817a8e404cdbf7886a53ac730f5dda2b" dependencies = [ "docify", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "impl-trait-for-tuples", @@ -12447,7 +12359,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2b13cdaedf2d5bd913a5f6e637cb52b5973d8ed4b8d45e56d921bc4d627006f" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12476,7 +12388,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fdcade6efc0b66fc7fc4138964802c02d0ffb7380d894e26b9dd5073727d2b3" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -12522,7 +12434,7 @@ version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "807df2ef13ab6bf940879352c3013bfa00b670458b4c125c2f60e5753f68e3d5" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12551,7 +12463,7 @@ version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ef17df925290865cf37096dd0cb76f787df11805bba01b1d0ca3e106d06280b" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -12572,14 +12484,15 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "17.0.2" +version = "17.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8893d5736d085729ed6d698a727a1511dd2b787b48ad0dc2d86136f142cc3e" +checksum = "61524963a57ecc77adcdd6d4c56a962ffa4aed745d05d51d1110651589b2306e" dependencies = [ "bounded-collections 0.2.4", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", + "hex-literal 0.4.1", "log", "pallet-balances 39.0.1", "parity-scale-codec", @@ -12590,7 +12503,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "tracing", "xcm-runtime-apis 0.4.3", ] @@ -12627,7 +12540,7 @@ version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05bfc67610a37d0bd98487b82edfbf9629d3a9699b52d5758e9d64cf78b3b7ae" dependencies = [ - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "parity-scale-codec", @@ -12636,7 +12549,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -12685,7 +12598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabf1fdcf451ac79995f11cb9b6a0761924c57bb79442c2d91b3bbefe4dfa081" dependencies = [ "bp-xcm-bridge-hub-router 0.14.1", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "log", @@ -12735,7 +12648,7 @@ dependencies = [ "pallet-balances 39.0.1", "pallet-collator-selection 19.0.0", "pallet-message-queue 41.0.2", - "pallet-xcm 17.0.2", + "pallet-xcm 17.0.4", "parity-scale-codec", "polkadot-primitives 16.0.0", "scale-info", @@ -12745,7 +12658,7 @@ dependencies = [ "sp-runtime 39.0.5", "staging-parachain-info 0.17.0", "staging-xcm 14.2.2", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "substrate-wasm-builder 24.0.2", ] @@ -12842,7 +12755,7 @@ dependencies = [ "log", "lz4", "memmap2 0.5.10", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "siphasher 0.3.11", "snap", @@ -12875,7 +12788,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -12890,7 +12803,7 @@ dependencies = [ "impl-trait-for-tuples", "lru 0.8.1", "parity-util-mem-derive", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "primitive-types 0.12.2", "smallvec", "winapi", @@ -12932,12 +12845,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.11", ] [[package]] @@ -12956,13 +12869,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.12", + "redox_syscall 0.5.17", "smallvec", "windows-targets 0.52.6", ] @@ -12979,9 +12892,9 @@ version = "1.4.3" source = "git+https://github.com/paseo-network/runtimes?tag=v1.4.3#3de47024fc96ff77392684761f21245db80680c0" dependencies = [ "binary-merkle-tree 15.0.1", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", - "frame-executive 38.0.0", + "frame-executive 38.0.1", "frame-metadata-hash-extension 0.6.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -13020,7 +12933,7 @@ dependencies = [ "pallet-preimage 38.0.0", "pallet-proxy 38.0.0", "pallet-referenda 38.0.0", - "pallet-scheduler 39.0.0", + "pallet-scheduler 39.1.0", "pallet-session 38.0.0", "pallet-session-benchmarking 38.0.0", "pallet-staking 38.0.1", @@ -13036,7 +12949,7 @@ dependencies = [ "pallet-utility 38.0.0", "pallet-vesting 38.0.0", "pallet-whitelist 37.0.0", - "pallet-xcm 17.0.2", + "pallet-xcm 17.0.4", "pallet-xcm-benchmarks 17.0.1", "parity-scale-codec", "paseo-runtime-constants", @@ -13070,7 +12983,7 @@ dependencies = [ "sp-version 37.0.0", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "substrate-wasm-builder 24.0.2", "xcm-runtime-apis 0.4.3", ] @@ -13146,20 +13059,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.14", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" +checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" dependencies = [ "pest", "pest_generator", @@ -13167,24 +13080,23 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" +checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "pest_meta" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" +checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" dependencies = [ - "once_cell", "pest", "sha2 0.10.9", ] @@ -13196,7 +13108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.9.0", + "indexmap 2.10.0", ] [[package]] @@ -13206,7 +13118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.9.0", + "indexmap 2.10.0", ] [[package]] @@ -13226,7 +13138,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -13445,7 +13357,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.9.0", + "indexmap 2.10.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -13505,7 +13417,7 @@ dependencies = [ "fatality", "futures", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -13558,7 +13470,7 @@ dependencies = [ "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", "sp-consensus-slots 0.43.0", @@ -13860,7 +13772,7 @@ dependencies = [ "sc-cli", "sc-service", "sc-tracing", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -13901,7 +13813,7 @@ dependencies = [ "polkadot-parachain-primitives 17.0.0", "polkadot-primitives 19.0.0", "sc-keystore", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "serde", "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus-babe 0.43.0", @@ -13945,7 +13857,7 @@ dependencies = [ "sp-blockchain", "sp-consensus-babe 0.43.0", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", ] @@ -13960,7 +13872,7 @@ dependencies = [ "kvdb", "parity-db", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-erasure-coding", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -14156,7 +14068,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaafdb12ef0cc23912bd71cdd636f62831be0c359d55d310bb30b72e72ac7ee" dependencies = [ "bitvec", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-election-provider-support 38.0.0", "frame-support 38.2.0", "frame-system 38.0.0", @@ -14196,7 +14108,7 @@ dependencies = [ "sp-staking 36.0.0", "staging-xcm 14.2.2", "staging-xcm-builder 17.0.5", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "static_assertions", ] @@ -14276,7 +14188,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c306f1ace7644a24de860479f92cf8d6467393bb0c9b0777c57e2d42c9d452a" dependencies = [ "bs58", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "parity-scale-codec", "polkadot-primitives 16.0.0", "sp-tracing 17.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -14303,7 +14215,7 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more 0.99.20", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "frame-system 38.0.0", "impl-trait-for-tuples", @@ -14340,7 +14252,7 @@ dependencies = [ "sp-staking 36.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "staging-xcm 14.2.2", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", "static_assertions", ] @@ -14447,7 +14359,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 41.0.0", "parity-db", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -14528,7 +14440,7 @@ dependencies = [ "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-weights 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "staging-xcm 17.0.0", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tracing-gum", "westend-runtime", @@ -14600,7 +14512,7 @@ dependencies = [ "libc", "log", "polkavm-assembler 0.26.0", - "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-common 0.26.0", "polkavm-linux-raw 0.26.0", ] @@ -14677,8 +14589,8 @@ dependencies = [ [[package]] name = "polkavm-common" -version = "0.26.0" -source = "git+https://github.com/paritytech/polkavm.git#da9a904909d7770477637783c70c30b3fc6df2ac" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkavm.git#9d1f9bc3e9e332252f01ae87d2e1c34cf5c05556" [[package]] name = "polkavm-derive" @@ -14734,7 +14646,7 @@ dependencies = [ "polkavm-common 0.9.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14746,7 +14658,7 @@ dependencies = [ "polkavm-common 0.18.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14758,7 +14670,7 @@ dependencies = [ "polkavm-common 0.21.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14770,7 +14682,7 @@ dependencies = [ "polkavm-common 0.24.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14779,10 +14691,10 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6069dc7995cde6e612b868a02ce48b54397c6d2582bd1b97b63aabbe962cd779" dependencies = [ - "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-common 0.26.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14792,7 +14704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl 0.9.0", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14802,7 +14714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c16669ddc7433e34c1007d31080b80901e3e8e523cb9d4b441c3910cf9294b" dependencies = [ "polkavm-derive-impl 0.18.1", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14812,7 +14724,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36837f6b7edfd6f4498f8d25d81da16cf03bd6992c3e56f3d477dfc90f4fefca" dependencies = [ "polkavm-derive-impl 0.21.0", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14822,7 +14734,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba0ef0f17ad81413ea1ca5b1b67553aedf5650c88269b673d3ba015c83bc2651" dependencies = [ "polkavm-derive-impl 0.24.0", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14832,7 +14744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581d34cafec741dc5ffafbb341933c205b6457f3d76257a9d99fb56687219c91" dependencies = [ "polkavm-derive-impl 0.26.0", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -14893,22 +14805,22 @@ dependencies = [ "hashbrown 0.14.5", "log", "object 0.36.7", - "polkavm-common 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkavm-common 0.26.0", "regalloc2 0.9.3", "rustc-demangle", ] [[package]] name = "polkavm-linker" -version = "0.26.0" -source = "git+https://github.com/paritytech/polkavm.git#da9a904909d7770477637783c70c30b3fc6df2ac" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkavm.git#9d1f9bc3e9e332252f01ae87d2e1c34cf5c05556" dependencies = [ "dirs", "gimli 0.31.1", "hashbrown 0.14.5", "log", "object 0.36.7", - "polkavm-common 0.26.0 (git+https://github.com/paritytech/polkavm.git)", + "polkavm-common 0.27.0", "regalloc2 0.9.3", "rustc-demangle", ] @@ -14949,17 +14861,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.4" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi 0.5.2", "pin-project-lite", - "rustix 0.38.44", - "tracing", - "windows-sys 0.59.0", + "rustix 1.0.8", + "windows-sys 0.60.2", ] [[package]] @@ -15009,7 +14920,7 @@ dependencies = [ name = "pop-api-integration-tests" version = "0.1.0" dependencies = [ - "contract-build 5.0.3", + "contract-build", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -15037,7 +14948,7 @@ dependencies = [ name = "pop-api-vnext-integration-tests" version = "0.1.0" dependencies = [ - "contract-build 6.0.0-alpha.1", + "contract-build", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -15065,7 +14976,7 @@ dependencies = [ name = "pop-chain-extension" version = "0.1.0" dependencies = [ - "contract-build 5.0.3", + "contract-build", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -15153,7 +15064,7 @@ dependencies = [ "staging-xcm 17.0.0", "substrate-build-script-utils 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-frame-rpc-system", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -15472,9 +15383,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "portable-atomic-util" @@ -15537,12 +15448,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -15653,7 +15564,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -15664,14 +15575,14 @@ checksum = "75eea531cfcd120e0851a3f8aed42c4841f78c889eefafd96339c72677ae42c3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] @@ -15686,7 +15597,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "thiserror 1.0.69", ] @@ -15698,7 +15609,7 @@ checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "prometheus-client-derive-encode", ] @@ -15710,22 +15621,22 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "proptest" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" dependencies = [ "bit-set", "bit-vec", "bitflags 2.9.1", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand 0.9.2", + "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax 0.8.5", "rusty-fork", @@ -15759,8 +15670,8 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.4.1", - "itertools 0.12.1", + "heck 0.5.0", + "itertools 0.14.0", "log", "multimap", "once_cell", @@ -15769,7 +15680,7 @@ dependencies = [ "prost 0.13.5", "prost-types", "regex", - "syn 2.0.101", + "syn 2.0.104", "tempfile", ] @@ -15783,7 +15694,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -15793,10 +15704,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -15819,15 +15730,15 @@ dependencies = [ [[package]] name = "quanta" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -15874,8 +15785,8 @@ dependencies = [ "quinn-udp", "rustc-hash 2.1.1", "rustls", - "socket2 0.5.9", - "thiserror 2.0.12", + "socket2 0.5.10", + "thiserror 2.0.14", "tokio", "tracing", "web-time", @@ -15890,13 +15801,13 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring 0.17.14", "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.12", + "thiserror 2.0.14", "tinyvec", "tracing", "web-time", @@ -15904,14 +15815,14 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" dependencies = [ "cfg_aliases 0.2.1", "libc", "once_cell", - "socket2 0.5.9", + "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] @@ -15927,9 +15838,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radium" @@ -15950,9 +15861,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -16019,11 +15930,11 @@ dependencies = [ [[package]] name = "rand_xorshift" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core 0.6.4", + "rand_core 0.9.3", ] [[package]] @@ -16043,9 +15954,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -16053,9 +15964,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -16084,9 +15995,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -16131,7 +16042,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -16467,9 +16378,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a46eb779843b2c4f21fac5773e25d6d5b7c8f0922876c91541790d2ca27eef" +checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -16484,7 +16395,7 @@ dependencies = [ "primitive-types 0.12.2", "proptest", "rand 0.8.5", - "rand 0.9.1", + "rand 0.9.2", "rlp 0.5.2", "ruint-macro", "serde", @@ -16500,9 +16411,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -16592,28 +16503,28 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "log", "once_cell", "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.103.3", + "rustls-webpki 0.103.4", "subtle 2.6.1", "zeroize", ] @@ -16646,7 +16557,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", @@ -16654,7 +16565,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.103.3", + "rustls-webpki 0.103.4", "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", @@ -16679,9 +16590,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring 0.17.14", "rustls-pki-types", @@ -16690,9 +16601,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -16820,7 +16731,7 @@ dependencies = [ "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", ] @@ -16843,7 +16754,7 @@ dependencies = [ "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-inherents 37.0.0", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -16868,7 +16779,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "array-bytes 6.2.3", "docify", - "memmap2 0.9.5", + "memmap2 0.9.7", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -16895,7 +16806,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -16949,7 +16860,7 @@ dependencies = [ "futures", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-executor 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-transaction-pool-api", "sc-utils", @@ -16963,7 +16874,7 @@ dependencies = [ "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -16979,7 +16890,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-state-db", "schnellru", @@ -16990,7 +16901,7 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "sysinfo", ] @@ -17003,7 +16914,7 @@ dependencies = [ "futures", "log", "mockall", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-network-types", "sc-utils", @@ -17013,7 +16924,7 @@ dependencies = [ "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-state-machine 0.46.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", ] @@ -17042,7 +16953,7 @@ dependencies = [ "sp-inherents 37.0.0", "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", ] @@ -17059,7 +16970,7 @@ dependencies = [ "num-rational", "num-traits", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -17078,7 +16989,7 @@ dependencies = [ "sp-inherents 37.0.0", "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", ] @@ -17115,7 +17026,7 @@ dependencies = [ "futures", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-consensus", "sc-network", @@ -17132,7 +17043,7 @@ dependencies = [ "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "wasm-timer", @@ -17147,7 +17058,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-consensus-beefy", "sc-rpc", "serde", @@ -17186,7 +17097,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -17211,7 +17122,7 @@ dependencies = [ "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-keystore 0.43.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", ] @@ -17265,7 +17176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfd7a23eebd1fea90534994440f0ef516cbd8c0ef749e272c6c77fd729bbca71" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-executor-common 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-executor-polkavm 0.36.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-executor-wasmtime 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -17288,7 +17199,7 @@ version = "0.43.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-executor-polkavm 0.36.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-executor-wasmtime 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -17363,7 +17274,7 @@ checksum = "a5980897e2915ef027560886a2bb52f49a2cea4a9b9f5c75fead841201d03705" dependencies = [ "anyhow", "log", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rustix 0.36.17", "sc-allocator 32.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-executor-common 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -17379,7 +17290,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "anyhow", "log", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rustix 0.36.17", "sc-allocator 32.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sc-executor-common 0.39.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -17410,7 +17321,7 @@ version = "36.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "array-bytes 6.2.3", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "serde_json", "sp-application-crypto 41.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -17432,7 +17343,7 @@ dependencies = [ "log", "mixnet", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-network", "sc-network-types", @@ -17468,7 +17379,7 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "partial_sort", "pin-project", "prost 0.12.6", @@ -17486,7 +17397,7 @@ dependencies = [ "sp-blockchain", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -17521,7 +17432,7 @@ dependencies = [ "sc-network-types", "schnellru", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tracing", ] @@ -17575,7 +17486,7 @@ dependencies = [ "sp-consensus-grandpa 24.0.0", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -17597,7 +17508,7 @@ dependencies = [ "sc-utils", "sp-consensus", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -17637,7 +17548,7 @@ dependencies = [ "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "rustls", "sc-client-api", @@ -17661,7 +17572,7 @@ version = "0.20.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "log", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", ] [[package]] @@ -17673,7 +17584,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -17734,7 +17645,7 @@ dependencies = [ "sc-rpc-api", "serde", "serde_json", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tokio", "tower", "tower-http", @@ -17753,7 +17664,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "sc-chain-spec", "sc-client-api", @@ -17767,7 +17678,7 @@ dependencies = [ "sp-rpc", "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -17801,7 +17712,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "sc-chain-spec", @@ -17844,7 +17755,7 @@ dependencies = [ "sp-trie 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-version 40.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "static_init", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "tempfile", "thiserror 1.0.69", "tokio", @@ -17859,7 +17770,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] @@ -17924,7 +17835,7 @@ dependencies = [ "futures", "libp2p", "log", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "sc-utils", @@ -17945,7 +17856,7 @@ dependencies = [ "libc", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rustc-hash 1.1.0", "sc-client-api", "sc-tracing-proc-macro", @@ -17970,7 +17881,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -17981,11 +17892,11 @@ dependencies = [ "async-trait", "futures", "futures-timer", - "indexmap 2.9.0", + "indexmap 2.10.0", "itertools 0.11.0", "linked-hash-map", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -17997,7 +17908,7 @@ dependencies = [ "sp-runtime 42.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-tracing 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-transaction-pool 37.0.0", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -18011,7 +17922,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "async-trait", "futures", - "indexmap 2.9.0", + "indexmap 2.10.0", "log", "parity-scale-codec", "serde", @@ -18030,7 +17941,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "prometheus", "sp-arithmetic 27.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] @@ -18083,7 +17994,7 @@ dependencies = [ "scale-decode-derive 0.16.0", "scale-type-resolver 0.2.0", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -18107,7 +18018,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18135,7 +18046,7 @@ dependencies = [ "scale-encode-derive 0.10.0", "scale-type-resolver 0.2.0", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -18161,7 +18072,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18175,7 +18086,7 @@ dependencies = [ "derive_more 1.0.0", "parity-scale-codec", "scale-info-derive", - "schemars", + "schemars 0.8.22", "serde", ] @@ -18188,7 +18099,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18219,8 +18130,8 @@ dependencies = [ "proc-macro2", "quote", "scale-info", - "syn 2.0.101", - "thiserror 2.0.12", + "syn 2.0.104", + "thiserror 2.0.14", ] [[package]] @@ -18238,7 +18149,7 @@ dependencies = [ "scale-encode 0.10.0", "scale-type-resolver 0.2.0", "serde", - "thiserror 2.0.12", + "thiserror 2.0.14", "yap", ] @@ -18263,6 +18174,30 @@ dependencies = [ "serde_json", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "schemars_derive" version = "0.8.22" @@ -18272,7 +18207,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18304,9 +18239,9 @@ dependencies = [ [[package]] name = "schnorrkel" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +checksum = "6e9fcb6c2e176e86ec703e22560d99d65a5ee9056ae45a08e13e84ebf796296f" dependencies = [ "aead", "arrayref", @@ -18335,9 +18270,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f6280af86e5f559536da57a45ebc84948833b3bee313a7dd25232e09c878a52" +checksum = "d68f2ec51b097e4c1a75b681a8bec621909b5e91f15bb7b840c4f2f7b01148b2" [[package]] name = "scrypt" @@ -18381,7 +18316,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "secp256k1-sys 0.8.1", + "secp256k1-sys 0.8.2", ] [[package]] @@ -18406,9 +18341,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" dependencies = [ "cc", ] @@ -18451,12 +18386,12 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" dependencies = [ "bitflags 2.9.1", - "core-foundation 0.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -18544,9 +18479,9 @@ dependencies = [ [[package]] name = "serde-untagged" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" +checksum = "34836a629bcbc6f1afdf0907a744870039b1e14c0561cb26094fa683b158eff3" dependencies = [ "erased-serde", "serde", @@ -18580,7 +18515,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18591,14 +18526,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -18614,14 +18549,14 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -18640,15 +18575,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.9.0", + "indexmap 2.10.0", + "schemars 0.9.0", + "schemars 1.0.4", "serde", "serde_derive", "serde_json", @@ -18658,14 +18595,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -18757,19 +18694,20 @@ dependencies = [ [[package]] name = "shared_child" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e297bd52991bbe0686c086957bee142f13df85d1e79b0b21630a99d374ae9dc" +checksum = "1e362d9935bc50f019969e2f9ecd66786612daae13e8f277be7bfb66e8bed3f7" dependencies = [ "libc", - "windows-sys 0.59.0", + "sigchld", + "windows-sys 0.60.2", ] [[package]] name = "shared_thread" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7a6f98357c6bb0ebace19b22220e5543801d9de90ffe77f8abb27c056bac064" +checksum = "52b86057fcb5423f5018e331ac04623e32d6b5ce85e33300f92c79a1973928b0" [[package]] name = "shlex" @@ -18777,6 +18715,17 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "sigchld" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47106eded3c154e70176fc83df9737335c94ce22f821c32d17ed1db1f83badb1" +dependencies = [ + "libc", + "os_pipe", + "signal-hook", +] + [[package]] name = "signal-hook" version = "0.3.18" @@ -18800,9 +18749,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -18859,12 +18808,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slice-group-by" @@ -18906,9 +18852,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smol" @@ -18933,15 +18879,15 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f" dependencies = [ - "async-channel 2.3.1", + "async-channel 2.5.0", "async-executor", - "async-fs 2.1.2", - "async-io 2.4.0", - "async-lock 3.4.0", + "async-fs 2.1.3", + "async-io 2.5.0", + "async-lock 3.4.1", "async-net 2.0.0", - "async-process 2.3.0", + "async-process 2.4.0", "blocking", - "futures-lite 2.6.0", + "futures-lite 2.6.1", ] [[package]] @@ -19005,7 +18951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "966e72d77a3b2171bb7461d0cb91f43670c63558c62d7cf42809cae6c8b6b818" dependencies = [ "arrayvec 0.7.6", - "async-lock 3.4.0", + "async-lock 3.4.1", "atomic-take", "base64 0.22.1", "bip39", @@ -19016,9 +18962,9 @@ dependencies = [ "derive_more 0.99.20", "ed25519-zebra", "either", - "event-listener 5.4.0", + "event-listener 5.4.1", "fnv", - "futures-lite 2.6.0", + "futures-lite 2.6.1", "futures-util", "hashbrown 0.14.5", "hex", @@ -19037,7 +18983,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "ruzstd 0.6.0", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "serde", "serde_json", "sha2 0.10.9", @@ -19075,7 +19021,7 @@ dependencies = [ "log", "lru 0.11.1", "no-std-net", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "rand_chacha 0.3.1", @@ -19094,24 +19040,24 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a33b06891f687909632ce6a4e3fd7677b24df930365af3d0bcb078310129f3f" dependencies = [ - "async-channel 2.3.1", - "async-lock 3.4.0", + "async-channel 2.5.0", + "async-lock 3.4.1", "base64 0.22.1", "blake2-rfc", "bs58", "derive_more 0.99.20", "either", - "event-listener 5.4.0", + "event-listener 5.4.1", "fnv", "futures-channel", - "futures-lite 2.6.0", + "futures-lite 2.6.1", "futures-util", "hashbrown 0.14.5", "hex", "itertools 0.13.0", "log", "lru 0.12.5", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "rand_chacha 0.3.1", @@ -19371,7 +19317,7 @@ dependencies = [ "sp-runtime 39.0.5", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "staging-xcm 14.2.2", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -19418,14 +19364,24 @@ 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", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -19490,7 +19446,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 20.0.0", + "sp-api-proc-macro 20.0.3", "sp-core 34.0.0", "sp-externalities 0.29.0", "sp-metadata-ir 0.7.0", @@ -19558,14 +19514,14 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "sp-api-proc-macro" -version = "20.0.0" +version = "20.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" +checksum = "5e3ec5a1a14307e21d2356e73e01573b6c82330a7e30eaceed59a90161b0c2d2" dependencies = [ "Inflector", "blake2 0.10.6", @@ -19573,7 +19529,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -19588,7 +19544,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -19602,7 +19558,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -19766,7 +19722,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "futures", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "schnellru", "sp-api 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-consensus", @@ -20031,12 +19987,12 @@ dependencies = [ "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "paste", "primitive-types 0.13.1", "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", @@ -20079,12 +20035,12 @@ dependencies = [ "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "paste", "primitive-types 0.12.2", "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", @@ -20127,12 +20083,12 @@ dependencies = [ "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "paste", "primitive-types 0.13.1", "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", @@ -20175,12 +20131,12 @@ dependencies = [ "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "paste", "primitive-types 0.13.1", "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", @@ -20223,12 +20179,12 @@ dependencies = [ "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "paste", "primitive-types 0.13.1", "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", @@ -20295,7 +20251,7 @@ checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20305,7 +20261,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20315,7 +20271,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4)", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20324,7 +20280,7 @@ version = "10.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "kvdb", - "parking_lot 0.12.3", + "parking_lot 0.12.4", ] [[package]] @@ -20335,7 +20291,7 @@ checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20345,7 +20301,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20355,7 +20311,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -20637,7 +20593,7 @@ version = "0.34.0" source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa65624013a61f9c69ebf02b0b4#cb629d46ebf00aa65624013a61f9c69ebf02b0b4" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 28.0.0", "sp-externalities 0.25.0", ] @@ -20649,7 +20605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0248b4d784cb4a01472276928977121fa39d977a5bb24793b6b15e64b046df42" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 34.0.0", "sp-externalities 0.29.0", ] @@ -20661,7 +20617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45f893398a5330e28f219662c7a0afa174fb068d8f82d2a9990016c4b0bc4369" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 36.1.0", "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -20673,7 +20629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "269d0ee360f6d072f9203485afea35583ac151521a525cc48b2a107fc576c2d9" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -20684,7 +20640,7 @@ version = "0.43.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", ] @@ -21105,7 +21061,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21119,7 +21075,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21133,7 +21089,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21146,7 +21102,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21240,7 +21196,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", "sp-core 28.0.0", @@ -21261,7 +21217,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", "sp-core 34.0.0", @@ -21282,7 +21238,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", "sp-core 36.1.0", @@ -21303,7 +21259,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -21323,7 +21279,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", @@ -21540,7 +21496,7 @@ dependencies = [ "memory-db 0.33.0", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "scale-info", "schnellru", @@ -21565,7 +21521,7 @@ dependencies = [ "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "scale-info", "schnellru", @@ -21588,7 +21544,7 @@ dependencies = [ "memory-db 0.32.0", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "scale-info", "schnellru", @@ -21609,17 +21565,17 @@ dependencies = [ "ahash 0.8.12", "foldhash", "hash-db", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "scale-info", "schnellru", "sp-core 37.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-prometheus-endpoint 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-prometheus-endpoint 0.17.4", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -21634,17 +21590,17 @@ dependencies = [ "ahash 0.8.12", "foldhash", "hash-db", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "rand 0.8.5", "scale-info", "schnellru", "sp-core 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", - "substrate-prometheus-endpoint 0.17.2 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", + "substrate-prometheus-endpoint 0.17.2", "thiserror 1.0.69", "tracing", "trie-db 0.30.0", @@ -21730,7 +21686,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21742,7 +21698,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21755,7 +21711,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -21767,7 +21723,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22079,7 +22035,7 @@ dependencies = [ "sp-runtime 39.0.5", "sp-weights 31.1.0", "staging-xcm 14.2.2", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -22108,12 +22064,12 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "17.0.2" +version = "17.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7564cee33c808c1b543ac915fcd47ff5a77bcff6303bf56d59ffdbed2dd5ce1c" +checksum = "11c8c6a857591de393d29f74403ac956a6fec5e9acc6af0c13e9d3476a8ddebd" dependencies = [ "environmental", - "frame-benchmarking 38.0.0", + "frame-benchmarking 38.1.1", "frame-support 38.2.0", "impl-trait-for-tuples", "parity-scale-codec", @@ -22155,15 +22111,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.4", + "parking_lot_core 0.9.11", "static_init_macro", "winapi", ] @@ -22242,7 +22198,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22252,7 +22208,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?rev=cb629d46ebf00aa dependencies = [ "hmac 0.12.1", "pbkdf2", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "sha2 0.10.9", "zeroize", ] @@ -22265,7 +22221,7 @@ checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", "pbkdf2", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "sha2 0.10.9", "zeroize", ] @@ -22277,7 +22233,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506 dependencies = [ "hmac 0.12.1", "pbkdf2", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "sha2 0.10.9", "zeroize", ] @@ -22343,8 +22299,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1fee79cb0bf260bb84b4fa885fae887646894a971abddae3d9ac4921531540" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -22357,8 +22312,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506#6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a20e2daeebc8c3c6f646d9a867df9fc2f879c6955c4a61860873a041c88ea4" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -22421,7 +22377,7 @@ dependencies = [ "sp-maybe-compressed-blob 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.26.3", "tempfile", - "toml 0.8.22", + "toml 0.8.23", "walkdir", "wasm-opt", ] @@ -22452,7 +22408,7 @@ dependencies = [ "sp-version 40.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.26.3", "tempfile", - "toml 0.8.22", + "toml 0.8.23", "walkdir", "wasm-opt", ] @@ -22473,7 +22429,7 @@ dependencies = [ "sp-maybe-compressed-blob 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2506)", "strum 0.26.3", "tempfile", - "toml 0.8.22", + "toml 0.8.23", "walkdir", "wasm-opt", ] @@ -22523,7 +22479,7 @@ dependencies = [ "subxt-macro", "subxt-metadata", "subxt-rpcs", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-util", "tracing", @@ -22544,8 +22500,8 @@ dependencies = [ "scale-info", "scale-typegen", "subxt-metadata", - "syn 2.0.101", - "thiserror 2.0.12", + "syn 2.0.104", + "thiserror 2.0.14", ] [[package]] @@ -22574,7 +22530,7 @@ dependencies = [ "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", ] @@ -22589,7 +22545,7 @@ dependencies = [ "serde", "serde_json", "smoldot-light 0.16.2", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-stream", "tracing", @@ -22608,7 +22564,7 @@ dependencies = [ "scale-typegen", "subxt-codegen", "subxt-utils-fetchmetadata", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22623,7 +22579,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -22644,7 +22600,7 @@ dependencies = [ "serde_json", "subxt-core", "subxt-lightclient", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", "url", ] @@ -22666,7 +22622,7 @@ dependencies = [ "parity-scale-codec", "pbkdf2", "regex", - "schnorrkel 0.11.4", + "schnorrkel 0.11.5", "scrypt", "secp256k1 0.30.0", "secrecy 0.10.3", @@ -22675,7 +22631,7 @@ dependencies = [ "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", - "thiserror 2.0.12", + "thiserror 2.0.14", "zeroize", ] @@ -22687,7 +22643,7 @@ checksum = "fc868b55fe2303788dc7703457af390111940c3da4714b510983284501780ed5" dependencies = [ "hex", "parity-scale-codec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -22703,9 +22659,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -22721,7 +22677,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22744,7 +22700,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22845,7 +22801,7 @@ dependencies = [ "fastrand 2.3.0", "getrandom 0.3.3", "once_cell", - "rustix 1.0.7", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -22870,12 +22826,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix 1.0.7", - "windows-sys 0.59.0", + "rustix 1.0.8", + "windows-sys 0.60.2", ] [[package]] @@ -22910,11 +22866,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] @@ -22934,7 +22890,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22945,18 +22901,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -22967,12 +22923,11 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -23072,20 +23027,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.9", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -23096,7 +23053,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -23139,9 +23096,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -23162,9 +23119,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", @@ -23174,20 +23131,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", "serde_spanned", "toml_datetime", @@ -23197,9 +23154,9 @@ dependencies = [ [[package]] name = "toml_write" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tower" @@ -23258,20 +23215,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -23307,7 +23264,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -23330,7 +23287,7 @@ dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "regex", "sharded-slab", "smallvec", @@ -23397,11 +23354,11 @@ dependencies = [ "http 1.3.1", "httparse", "log", - "rand 0.9.1", + "rand 0.9.2", "rustls", "rustls-pki-types", "sha1", - "thiserror 2.0.12", + "thiserror 2.0.14", "url", "utf-8", ] @@ -23495,9 +23452,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "unicode-xid" @@ -23581,9 +23538,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" dependencies = [ "getrandom 0.3.3", "js-sys", @@ -23728,9 +23685,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -23747,7 +23704,7 @@ version = "0.12.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" dependencies = [ - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] @@ -23772,7 +23729,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -23807,7 +23764,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -23821,16 +23778,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.220.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e913f9242315ca39eff82aee0e19ee7a372155717ff0eb082c741e435ce25ed1" -dependencies = [ - "leb128", - "wasmparser 0.220.1", -] - [[package]] name = "wasm-instrument" version = "0.4.0" @@ -23976,20 +23923,6 @@ dependencies = [ "url", ] -[[package]] -name = "wasmparser" -version = "0.220.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d07b6a3b550fefa1a914b6d54fc175dd11c3392da11eee604e6ffc759805d25" -dependencies = [ - "ahash 0.8.12", - "bitflags 2.9.1", - "hashbrown 0.14.5", - "indexmap 2.9.0", - "semver 1.0.26", - "serde", -] - [[package]] name = "wasmparser-nostd" version = "0.100.2" @@ -24018,7 +23951,7 @@ dependencies = [ "rayon", "serde", "target-lexicon", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cache", "wasmtime-cranelift", "wasmtime-environ", @@ -24073,7 +24006,7 @@ dependencies = [ "object 0.30.4", "target-lexicon", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cranelift-shared", "wasmtime-environ", ] @@ -24108,7 +24041,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-types", ] @@ -24191,7 +24124,7 @@ dependencies = [ "cranelift-entity", "serde", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", ] [[package]] @@ -24220,14 +24153,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" dependencies = [ - "webpki-root-certs 1.0.0", + "webpki-root-certs 1.0.2", ] [[package]] name = "webpki-root-certs" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a83f7e1a9f8712695c03eabe9ed3fbca0feff0152f33f12593e5a6303cb1a4" +checksum = "4e4ffd8df1c57e87c325000a3d6ef93db75279dc3a231125aac571650f22b12a" dependencies = [ "rustls-pki-types", ] @@ -24361,18 +24294,6 @@ dependencies = [ "staging-xcm-builder 21.0.0", ] -[[package]] -name = "which" -version = "7.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" -dependencies = [ - "either", - "env_home", - "rustix 1.0.7", - "winsafe", -] - [[package]] name = "which" version = "8.0.0" @@ -24380,15 +24301,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ "env_home", - "rustix 1.0.7", + "rustix 1.0.8", "winsafe", ] [[package]] name = "wide" -version = "0.7.32" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b5576b9a81633f3e8df296ce0063042a73507636cbe956c61133dd7034ab22" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" dependencies = [ "bytemuck", "safe_arch", @@ -24453,9 +24374,9 @@ dependencies = [ [[package]] name = "windows" -version = "0.61.1" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ "windows-collections", "windows-core 0.61.2", @@ -24524,7 +24445,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -24535,14 +24456,14 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-numerics" @@ -24617,6 +24538,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -24665,10 +24595,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.0" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -24870,9 +24801,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -24959,7 +24890,7 @@ dependencies = [ "nom", "oid-registry 0.8.1", "rusticata-macros", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", ] @@ -25005,7 +24936,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25017,7 +24948,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25029,7 +24960,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25040,7 +24971,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25055,7 +24986,7 @@ dependencies = [ "sp-api 34.0.0", "sp-weights 31.1.0", "staging-xcm 14.2.2", - "staging-xcm-executor 17.0.2", + "staging-xcm-executor 17.0.3", ] [[package]] @@ -25095,9 +25026,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" +checksum = "6fd8403733700263c6eb89f192880191f1b83e332f7a20371ddcf421c4a337c7" [[package]] name = "xmltree" @@ -25123,7 +25054,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", "rand 0.8.5", "static_assertions", @@ -25131,16 +25062,16 @@ dependencies = [ [[package]] name = "yamux" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da1acad1c2dc53f0dde419115a38bd8221d8c3e47ae9aeceaf453266d29307e" +checksum = "2b2dd50a6d6115feb3e5d7d0efd45e8ca364b6c83722c1e9c602f5764e0e9597" dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.3", + "parking_lot 0.12.4", "pin-project", - "rand 0.9.1", + "rand 0.9.2", "static_assertions", "web-time", ] @@ -25180,28 +25111,28 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25221,7 +25152,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure 0.13.2", ] @@ -25242,7 +25173,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -25258,9 +25189,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -25275,22 +25206,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", -] - -[[package]] -name = "zip" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" -dependencies = [ - "arbitrary", - "crc32fast", - "crossbeam-utils", - "displaydoc", - "indexmap 2.9.0", - "memchr", - "thiserror 2.0.12", + "syn 2.0.104", ] [[package]] @@ -25301,7 +25217,7 @@ checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" dependencies = [ "arbitrary", "crc32fast", - "indexmap 2.9.0", + "indexmap 2.10.0", "memchr", ] @@ -25313,7 +25229,7 @@ checksum = "9aed4ac33e8eb078c89e6cbb1d5c4c7703ec6d299fc3e7c3695af8f8b423468b" dependencies = [ "arbitrary", "crc32fast", - "indexmap 2.9.0", + "indexmap 2.10.0", "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c5db88d2e..c3851cda5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ inherits = "release" lto = true [workspace.package] -authors = [ "R0GUE " ] +authors = ["R0GUE "] description = "Pop Network makes it easy for smart contract developers to use the Power of Polkadot." edition = "2021" homepage = "https://r0gue.io" @@ -16,34 +16,34 @@ repository = "https://github.com/r0gue-io/pop-node/" [workspace] exclude = [ - "extension/contract", - "pop-api", - "pop-api-vnext", - "tests/contracts", + "extension/contract", + "pop-api", + "pop-api-vnext", + "tests/contracts", ] members = [ - "integration-tests", - "node", - "pallets/*", - "pop-api-vnext/integration-tests", - "pop-api/integration-tests", - "primitives", - "runtime/devnet", - "runtime/mainnet", - "runtime/testnet", + "integration-tests", + "node", + "pallets/*", + "pop-api-vnext/integration-tests", + "pop-api/integration-tests", + "primitives", + "runtime/devnet", + "runtime/mainnet", + "runtime/testnet", ] resolver = "2" [workspace.dependencies] anyhow = { version = "1.0.81", default-features = false } -base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } -clap = { version = "4.5.13", features = [ "derive" ] } +base64 = { version = "0.22.1", default-features = false, features = ["alloc"] } +clap = { version = "4.5.13", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [ - "derive", + "derive", ] } color-print = "0.3.4" -contract-build = { git = "https://github.com/use-ink/cargo-contract", branch = "v5-rust-stable" } +contract-build = { git = "https://github.com/use-ink/cargo-contract", tag = "v6.0.0-alpha.1" } docify = "0.2.9" enumflags2 = "0.7.11" env_logger = "0.11.5" @@ -51,18 +51,18 @@ futures = "0.3.31" hex = "0.4.3" hex-literal = "0.4.1" impl-trait-for-tuples = "0.2.2" -jsonrpsee = { version = "0.24.3", features = [ "server" ] } +jsonrpsee = { version = "0.24.3", features = ["server"] } log = { version = "0.4.22", default-features = false } rand = "0.8.5" scale-info = { version = "2.11.6", default-features = false, features = [ - "derive", + "derive", ] } serde = { version = "1.0.214", default-features = false } serde_json = { version = "1.0.132", default-features = false } smallvec = "1.11.2" subxt = "0.41.0" subxt-signer = "0.41.0" -tokio = { version = "1.45.0", features = [ "macros", "rt-multi-thread", "time" ] } +tokio = { version = "1.45.0", features = ["macros", "rt-multi-thread", "time"] } tracing-subscriber = { version = "0.3.18", default-features = false } # Build diff --git a/pop-api-vnext/Cargo.lock b/pop-api-vnext/Cargo.lock index c25783bfc..3df846c93 100644 --- a/pop-api-vnext/Cargo.lock +++ b/pop-api-vnext/Cargo.lock @@ -67,9 +67,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-core" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad31216895d27d307369daa1393f5850b50bbbd372478a9fa951c095c210627e" +checksum = "d47400608fc869727ad81dba058d55f97b29ad8b5c5256d9598523df8f356ab6" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -80,9 +80,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b95b3deca680efc7e9cba781f1a1db352fa1ea50e6384a514944dcf4419e652" +checksum = "d9e8a436f0aad7df8bb47f144095fba61202265d9f5f09a70b0e3227881a668e" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15516116086325c157c18261d768a20677f0f699348000ed391d4ad0dcb82530" +checksum = "459f98c6843f208856f338bfb25e65325467f7aff35dfeb0484d0a76e059134b" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6177ed26655d4e84e00b65cb494d4e0b8830e7cae7ef5d63087d445a2600fb55" +checksum = "3cfebde8c581a5d37b678d0a48a32decb51efd7a63a08ce2517ddec26db705c8" dependencies = [ "alloy-rlp", "bytes", @@ -118,14 +118,14 @@ dependencies = [ "const-hex", "derive_more 2.0.1", "foldhash", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "indexmap", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand 0.9.1", + "rand 0.9.2", "ruint", "rustc-hash 2.1.1", "serde", @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a14f21d053aea4c6630687c2f4ad614bed4c81e14737a9b904798b24f30ea849" +checksum = "aedac07a10d4c2027817a43cc1f038313fc53c7ac866f7363239971fd01f9f18" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -159,9 +159,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d99282e7c9ef14eb62727981a985a01869e586d1dec729d3bb33679094c100" +checksum = "24f9a598f010f048d8b8226492b6401104f5a5c1273c2869b72af29b48bb4ba9" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda029f955b78e493360ee1d7bd11e1ab9f2a220a5715449babc79d6d0a01105" +checksum = "f494adf9d60e49aa6ce26dfd42c7417aa6d4343cf2ae621f20e4d92a5ad07d85" dependencies = [ "const-hex", "dunce", @@ -193,9 +193,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10db1bd7baa35bc8d4a1b07efbf734e73e5ba09f2580fb8cee3483a36087ceb2" +checksum = "52db32fbd35a9c0c0e538b58b81ebbae08a51be029e7ad60e08b60481c2ec6c3" dependencies = [ "serde", "winnow", @@ -203,9 +203,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58377025a47d8b8426b3e4846a251f2c1991033b27f517aade368146f6ab1dfe" +checksum = "a285b46e3e0c177887028278f04cc8262b76fd3b8e0e20e93cea0a58c35f5ac5" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -215,9 +215,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "approx" @@ -307,7 +307,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -478,7 +478,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -889,9 +889,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0" dependencies = [ "serde", ] @@ -942,9 +942,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.27" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "shlex", ] @@ -1225,9 +1225,9 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", @@ -1363,9 +1363,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -1394,9 +1394,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -1669,7 +1669,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7cb8796f93fa038f979a014234d632e9688a120e745f936e2635123c77537f7" dependencies = [ - "frame-metadata 20.0.0", + "frame-metadata 21.0.0", "parity-scale-codec", "scale-decode", "scale-info", @@ -1688,6 +1688,17 @@ dependencies = [ "scale-info", ] +[[package]] +name = "frame-metadata" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dfd1d7eae1d94e32e869e2fb272d81f52dd8db57820a373adb83ea24d7d862" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "frame-metadata" version = "23.0.0" @@ -1974,9 +1985,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2027,9 +2038,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2276,19 +2287,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "serde", ] [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "const_format", "deranged", @@ -2314,7 +2325,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2322,7 +2333,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2344,7 +2355,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2361,7 +2372,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "cfg-if", @@ -2394,7 +2405,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "either", @@ -2410,7 +2421,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_codegen", "ink_ir", @@ -2425,7 +2436,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2440,7 +2451,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2448,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2476,7 +2487,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "array-init", "cfg-if", @@ -2494,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_metadata", "ink_prelude", @@ -2679,9 +2690,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libm" @@ -2691,9 +2702,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", @@ -2887,7 +2898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -3263,7 +3274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.14", "ucd-trie", ] @@ -3422,9 +3433,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", "syn 2.0.104", @@ -3524,9 +3535,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] @@ -3556,7 +3567,7 @@ dependencies = [ "bitflags 2.9.1", "lazy_static", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax 0.8.5", @@ -3605,9 +3616,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -3670,9 +3681,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -3806,9 +3817,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -3823,7 +3834,7 @@ dependencies = [ "primitive-types 0.12.2", "proptest", "rand 0.8.5", - "rand 0.9.1", + "rand 0.9.2", "rlp 0.5.2", "ruint-macro", "serde", @@ -3839,9 +3850,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -3881,22 +3892,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -3967,7 +3978,7 @@ dependencies = [ "scale-decode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -3994,7 +4005,7 @@ dependencies = [ "scale-encode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4059,7 +4070,7 @@ dependencies = [ "scale-decode", "scale-encode", "scale-type-resolver", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4099,9 +4110,9 @@ dependencies = [ [[package]] name = "schnorrkel" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +checksum = "6e9fcb6c2e176e86ec703e22560d99d65a5ee9056ae45a08e13e84ebf796296f" dependencies = [ "aead", "arrayref", @@ -4155,7 +4166,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "secp256k1-sys 0.8.1", + "secp256k1-sys 0.8.2", ] [[package]] @@ -4180,9 +4191,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" dependencies = [ "cc", ] @@ -4292,9 +4303,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -4411,9 +4422,9 @@ checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slice-group-by" @@ -5083,7 +5094,7 @@ dependencies = [ "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", ] @@ -5099,7 +5110,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -5128,7 +5139,7 @@ dependencies = [ "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", - "thiserror 2.0.12", + "thiserror 2.0.14", "zeroize", ] @@ -5156,9 +5167,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ac494e7266fcdd2ad80bf4375d55d27a117ea5c866c26d0e97fe5b3caeeb75" +checksum = "a7a985ff4ffd7373e10e0fb048110fb11a162e5a4c47f92ddb8787a6f766b769" dependencies = [ "paste", "proc-macro2", @@ -5216,11 +5227,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] @@ -5236,9 +5247,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", @@ -5311,9 +5322,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -5329,9 +5340,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5717,6 +5728,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-sys" version = "0.48.0" @@ -5741,7 +5758,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -5777,10 +5794,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -5931,9 +5949,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index c09fdf8b1..32b7dda56 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -5,9 +5,12 @@ license = "GPL-3.0-only" name = "pop-api" version = "0.1.0" +[package.metadata.ink-lang] +abi = "sol" + [dependencies] -base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } +base64 = { version = "0.22.1", default-features = false, features = ["alloc"] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] @@ -15,20 +18,20 @@ hex = { version = "0.4.3" } scale-info = { version = "2" } [lib] -crate-type = [ "rlib" ] +crate-type = ["rlib"] name = "pop_api" path = "src/lib.rs" [features] -default = [ "std" ] -fungibles = [ ] -messaging = [ ] -nonfungibles = [ ] +default = ["std"] +fungibles = [] +messaging = [] +nonfungibles = [] std = [ - "ink/std", - "pop-primitives/std", + "ink/std", + "pop-primitives/std", ] [lints.rust.unexpected_cfgs] -check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] level = "warn" diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 9f89d7e4e..1ea48faf5 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -1,28 +1,28 @@ [package] -authors = [ "R0GUE " ] +authors = ["R0GUE "] edition = "2021" name = "fungibles" version = "0.1.0" [package.metadata.ink-lang] -abi = "sol" +abi = "all" [lib] path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } -pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = ["fungibles"] } [dev-dependencies] hex = { version = "0.4.3" } scale-info = { version = "2" } [features] -default = [ "std" ] -ink-as-dependency = [ ] -std = [ "ink/std", "pop-api/std" ] +default = ["std"] +ink-as-dependency = [] +std = ["ink/std", "pop-api/std"] [lints.rust.unexpected_cfgs] -check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] level = "warn" diff --git a/pop-api-vnext/examples/messaging/Cargo.toml b/pop-api-vnext/examples/messaging/Cargo.toml index 29455eed2..fea273a9b 100644 --- a/pop-api-vnext/examples/messaging/Cargo.toml +++ b/pop-api-vnext/examples/messaging/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = [ "R0GUE " ] +authors = ["R0GUE "] edition = "2021" name = "messaging" version = "0.1.0" @@ -11,17 +11,17 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } -pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = ["messaging"] } [dev-dependencies] scale-info = { version = "2" } [features] -default = [ "std" ] -ink-as-dependency = [ ] -std = [ "ink/std", "pop-api/std" ] +default = ["std"] +ink-as-dependency = [] +std = ["ink/std", "pop-api/std"] [lints.rust.unexpected_cfgs] -check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] level = "warn" diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index a05b7d5da..b98ac5e48 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -8,7 +8,7 @@ version = "0.1.0" abi = "all" [build-dependencies] -contract-build = { git = "https://github.com/use-ink/cargo-contract" } +contract-build = { git = "https://github.com/use-ink/cargo-contract", tag = "v6.0.0-alpha.1" } [dev-dependencies] codec.workspace = true @@ -18,13 +18,13 @@ frame-system = { workspace = true, default-features = false } hex.workspace = true ismp.workspace = true log.workspace = true -pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles", "messaging" ] } +pallet-api-vnext = { workspace = true, default-features = false, features = ["fungibles", "messaging"] } pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } pallet-ismp = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } pallet-xcm = { workspace = true, default-features = false } -pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles", "messaging" ] } +pop-api = { path = "../../pop-api-vnext", default-features = false, features = ["fungibles", "messaging"] } pop-primitives = { workspace = true, default-features = false } pop-runtime-devnet.workspace = true pop-runtime-testnet.workspace = true @@ -34,26 +34,26 @@ xcm.workspace = true xcm-executor.workspace = true [features] -default = [ "devnet", "std" ] -devnet = [ "pop-runtime-devnet/default" ] +default = ["devnet", "std"] +devnet = ["pop-runtime-devnet/default"] std = [ - "codec/std", - "frame-support/std", - "frame-system/std", - "ismp/std", - "pallet-api-vnext/std", - "pallet-assets/std", - "pallet-balances/std", - "pallet-ismp/std", - "pallet-revive/std", - "pallet-xcm/std", - "pop-api/std", - "pop-primitives/std", - "pop-runtime-devnet/std", - "pop-runtime-testnet/std", - "sp-io/std", - "sp-runtime/std", - "xcm-executor/std", - "xcm/std", + "codec/std", + "frame-support/std", + "frame-system/std", + "ismp/std", + "pallet-api-vnext/std", + "pallet-assets/std", + "pallet-balances/std", + "pallet-ismp/std", + "pallet-revive/std", + "pallet-xcm/std", + "pop-api/std", + "pop-primitives/std", + "pop-runtime-devnet/std", + "pop-runtime-testnet/std", + "sp-io/std", + "sp-runtime/std", + "xcm-executor/std", + "xcm/std", ] -testnet = [ "pop-runtime-testnet/default" ] +testnet = ["pop-runtime-testnet/default"] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock index a27272318..164176ba2 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.lock @@ -118,7 +118,7 @@ dependencies = [ "const-hex", "derive_more 2.0.1", "foldhash", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "indexmap", "itoa", "k256", @@ -215,9 +215,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "approx" @@ -307,7 +307,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -478,7 +478,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -889,9 +889,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0" dependencies = [ "serde", ] @@ -942,9 +942,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.30" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "shlex", ] @@ -1225,9 +1225,9 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", @@ -1363,9 +1363,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -1994,9 +1994,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2047,9 +2047,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2301,14 +2301,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "serde", ] [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "const_format", "deranged", @@ -2334,7 +2334,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2364,7 +2364,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2381,7 +2381,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "cfg-if", @@ -2414,7 +2414,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "either", @@ -2430,7 +2430,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_codegen", "ink_ir", @@ -2445,7 +2445,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2460,7 +2460,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2468,7 +2468,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2496,7 +2496,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "array-init", "cfg-if", @@ -2514,7 +2514,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#2288bfd0b65c52ab7069da3091073d77f601ace8" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_metadata", "ink_prelude", @@ -2699,9 +2699,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libm" @@ -2711,9 +2711,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", @@ -2907,7 +2907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -3283,7 +3283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.14", "ucd-trie", ] @@ -3542,9 +3542,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] @@ -3688,9 +3688,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "redox_syscall" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -3824,9 +3824,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -3857,9 +3857,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -3912,9 +3912,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -3985,7 +3985,7 @@ dependencies = [ "scale-decode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4012,7 +4012,7 @@ dependencies = [ "scale-encode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4077,7 +4077,7 @@ dependencies = [ "scale-decode", "scale-encode", "scale-type-resolver", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4310,9 +4310,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.141" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -4429,9 +4429,9 @@ checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slice-group-by" @@ -5101,7 +5101,7 @@ dependencies = [ "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", ] @@ -5117,7 +5117,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -5146,7 +5146,7 @@ dependencies = [ "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", - "thiserror 2.0.12", + "thiserror 2.0.14", "zeroize", ] @@ -5234,11 +5234,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] @@ -5254,9 +5254,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", @@ -5329,9 +5329,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -5347,9 +5347,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5735,6 +5735,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-sys" version = "0.48.0" @@ -5759,7 +5765,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -5795,10 +5801,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index ab09c3088..97e251dd2 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = [ "R0GUE " ] +authors = ["R0GUE "] edition = "2021" name = "fungibles" version = "0.1.0" @@ -11,8 +11,8 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } -pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = ["fungibles"] } [dev-dependencies] scale-info = { version = "2" } @@ -21,10 +21,10 @@ scale-info = { version = "2" } path = "lib.rs" [features] -default = [ "std" ] -ink-as-dependency = [ ] -std = [ "ink/std", "pop-api/std" ] +default = ["std"] +ink-as-dependency = [] +std = ["ink/std", "pop-api/std"] [lints.rust.unexpected_cfgs] -check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] level = "warn" diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index f690162f5..0b9b22a3a 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -35,7 +35,7 @@ pub mod fungibles { impl Fungibles for Fungible { #[ink(message)] - fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error> { + fn transfer(&mut self, token: TokenId, to: Address, value: U256) -> Result<(), Error> { api::transfer(token, to, value)?; self.env().emit_event(Transfer { from: self.env().address(), to, value }); Ok(()) @@ -43,7 +43,7 @@ pub mod fungibles { #[ink(message)] fn transferFrom( - &self, + &mut self, token: TokenId, from: Address, to: Address, @@ -55,7 +55,7 @@ pub mod fungibles { } #[ink(message)] - fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error> { + fn approve(&mut self, token: TokenId, spender: Address, value: U256) -> Result<(), Error> { api::approve(token, spender, value)?; self.env().emit_event(Approval { owner: self.env().address(), spender, value }); Ok(()) @@ -63,7 +63,7 @@ pub mod fungibles { #[ink(message)] fn increaseAllowance( - &self, + &mut self, token: TokenId, spender: Address, value: U256, @@ -73,7 +73,7 @@ pub mod fungibles { #[ink(message)] fn decreaseAllowance( - &self, + &mut self, token: TokenId, spender: Address, value: U256, @@ -82,7 +82,7 @@ pub mod fungibles { } #[ink(message)] - fn create(&self, admin: Address, min_balance: U256) -> Result { + fn create(&mut self, admin: Address, min_balance: U256) -> Result { let token = api::create(admin, min_balance)?; self.env() .emit_event(Created { id: token, creator: self.env().address(), admin }); @@ -90,7 +90,7 @@ pub mod fungibles { } #[ink(message)] - fn startDestroy(&self, token: TokenId) -> Result<(), Error> { + fn startDestroy(&mut self, token: TokenId) -> Result<(), Error> { api::start_destroy(token)?; self.env().emit_event(DestroyStarted { token }); Ok(()) @@ -98,7 +98,7 @@ pub mod fungibles { #[ink(message)] fn setMetadata( - &self, + &mut self, token: TokenId, name: String, symbol: String, @@ -110,19 +110,19 @@ pub mod fungibles { } #[ink(message)] - fn clearMetadata(&self, token: TokenId) -> Result<(), Error> { + fn clearMetadata(&mut self, token: TokenId) -> Result<(), Error> { api::clear_metadata(token)?; self.env().emit_event(MetadataCleared { token }); Ok(()) } #[ink(message)] - fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + fn mint(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { api::mint(token, account, value) } #[ink(message)] - fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + fn burn(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { api::burn(token, account, value) } diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock index a5a4faddf..35e839124 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.lock @@ -118,7 +118,7 @@ dependencies = [ "const-hex", "derive_more 2.0.1", "foldhash", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "indexmap", "itoa", "k256", @@ -215,9 +215,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "approx" @@ -307,7 +307,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint", "num-integer", @@ -478,7 +478,7 @@ dependencies = [ "ark-std 0.5.0", "educe", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -889,9 +889,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0" dependencies = [ "serde", ] @@ -942,9 +942,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.30" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "shlex", ] @@ -1225,9 +1225,9 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", @@ -1363,9 +1363,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -1985,9 +1985,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2038,9 +2038,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2292,14 +2292,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "serde", ] [[package]] name = "ink" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "const_format", "deranged", @@ -2325,7 +2325,7 @@ dependencies = [ [[package]] name = "ink_allocator" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "ink_codegen" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "ink_engine" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "derive_more 2.0.1", @@ -2372,7 +2372,7 @@ dependencies = [ [[package]] name = "ink_env" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "cfg-if", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "ink_ir" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "blake2", "either", @@ -2421,7 +2421,7 @@ dependencies = [ [[package]] name = "ink_macro" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_codegen", "ink_ir", @@ -2436,7 +2436,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "derive_more 2.0.1", "impl-serde", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "cfg-if", ] @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "alloy-sol-types", "cfg-if", @@ -2487,7 +2487,7 @@ dependencies = [ [[package]] name = "ink_storage" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "array-init", "cfg-if", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" version = "6.0.0-alpha.1" -source = "git+https://github.com/use-ink/ink#6549f80d746ee4a74a2c885a63686d9361771d5f" +source = "git+https://github.com/use-ink/ink?tag=v6.0.0-alpha.1#2c228d492543b6f0abef4f942b1826cc253c6fe3" dependencies = [ "ink_metadata", "ink_prelude", @@ -2690,9 +2690,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libm" @@ -2702,9 +2702,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", @@ -2898,7 +2898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" dependencies = [ "hash-db", - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -3283,7 +3283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.14", "ucd-trie", ] @@ -3542,9 +3542,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] @@ -3688,9 +3688,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "redox_syscall" -version = "0.5.15" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -3824,9 +3824,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -3857,9 +3857,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -3912,9 +3912,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -3985,7 +3985,7 @@ dependencies = [ "scale-decode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4012,7 +4012,7 @@ dependencies = [ "scale-encode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4077,7 +4077,7 @@ dependencies = [ "scale-decode", "scale-encode", "scale-type-resolver", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -4310,9 +4310,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.141" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -4429,9 +4429,9 @@ checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slice-group-by" @@ -4447,12 +4447,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.10" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5101,7 +5101,7 @@ dependencies = [ "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-metadata", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", ] @@ -5117,7 +5117,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -5146,7 +5146,7 @@ dependencies = [ "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "subxt-core", - "thiserror 2.0.12", + "thiserror 2.0.14", "zeroize", ] @@ -5234,11 +5234,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] @@ -5254,9 +5254,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", @@ -5329,9 +5329,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -5342,14 +5342,14 @@ dependencies = [ "pin-project-lite", "slab", "socket2", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5736,21 +5736,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-link" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -5768,7 +5765,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -5804,10 +5801,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml index 7e826b03a..a364fb11f 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml @@ -1,17 +1,17 @@ [package] -authors = [ "R0GUE " ] +authors = ["R0GUE "] edition = "2021" name = "messaging" version = "0.1.0" [package.metadata.ink-lang] -abi = "sol" +abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", default-features = false, features = [ "unstable-hostfn" ] } -pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = ["messaging"] } [dev-dependencies] scale-info = { version = "2" } @@ -20,10 +20,10 @@ scale-info = { version = "2" } path = "lib.rs" [features] -default = [ "std" ] -ink-as-dependency = [ ] -std = [ "ink/std", "pop-api/std" ] +default = ["std"] +ink-as-dependency = [] +std = ["ink/std", "pop-api/std"] [lints.rust.unexpected_cfgs] -check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] +check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] level = "warn" diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index 72f461eae..f21605bf6 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] -use ink::{abi::Sol, contract_ref, prelude::vec::Vec, storage::Mapping, U256}; +use ink::{abi::Sol, contract_ref, prelude::vec::Vec, sol::DynBytes, storage::Mapping, U256}; use pop_api::{ messaging::{ self as api, @@ -9,7 +9,7 @@ use pop_api::{ OnPostResponse, Post, StorageValue, }, xcm::{self, OnQueryResponse, QueryId, Xcm, XcmCallback, XcmCompleted}, - Bytes, Callback, Error, MessageId, MessageStatus, Weight, + Callback, Error, MessageId, MessageStatus, Weight, }, Pop, }; @@ -34,7 +34,7 @@ pub mod messaging { impl api::Messaging for Messaging { #[ink(message)] - fn getResponse(&self, message: MessageId) -> Bytes { + fn getResponse(&mut self, message: MessageId) -> DynBytes { api::get_response(message) } @@ -44,19 +44,19 @@ pub mod messaging { } #[ink(message)] - fn pollStatus(&self, message: MessageId) -> MessageStatus { + fn pollStatus(&mut self, message: MessageId) -> MessageStatus { api::poll_status(message) } #[ink(message)] - fn remove(&self, message: MessageId) -> Result<(), Error> { + fn remove(&mut self, message: MessageId) -> Result<(), Error> { api::remove(message)?; self.responses.remove(&message); Ok(()) } #[ink(message)] - fn removeMany(&self, messages: Vec) -> Result<(), Error> { + fn removeMany(&mut self, messages: Vec) -> Result<(), Error> { for message in &messages { self.responses.remove(message); } @@ -67,12 +67,12 @@ pub mod messaging { impl Ismp for Messaging { #[ink(message)] - fn get(&self, request: Get, fee: U256) -> Result { + fn get(&mut self, request: Get, fee: U256) -> Result { ismp::get(request, fee, None) } #[ink(message)] - fn post(&self, request: Post, fee: U256) -> Result { + fn post(&mut self, request: Post, fee: U256) -> Result { ismp::post(request, fee, None) } } @@ -80,7 +80,7 @@ pub mod messaging { impl IsmpCallback for Messaging { #[ink(message)] fn get( - &self, + &mut self, request: Get, fee: U256, callback: Callback, @@ -90,7 +90,7 @@ pub mod messaging { #[ink(message)] fn post( - &self, + &mut self, request: Post, fee: U256, callback: Callback, @@ -112,7 +112,7 @@ pub mod messaging { impl OnPostResponse for Messaging { #[ink(message)] - fn onPostResponse(&mut self, id: MessageId, response: Bytes) { + fn onPostResponse(&mut self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -123,20 +123,20 @@ pub mod messaging { impl Xcm for Messaging { #[ink(message)] - fn execute(&self, message: Bytes, weight: Weight) -> Bytes { - let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn execute(&mut self, message: DynBytes, weight: Weight) -> DynBytes { + let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.execute(message, weight) } #[ink(message)] - fn newQuery(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId) { - let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn newQuery(&mut self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId) { + let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout) } #[ink(message)] - fn send(&self, destination: Bytes, message: Bytes) -> Bytes { - let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn send(&mut self, destination: DynBytes, message: DynBytes) -> DynBytes { + let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.send(destination, message) } } @@ -144,19 +144,19 @@ pub mod messaging { impl XcmCallback for Messaging { #[ink(message)] fn newQuery( - &self, - responder: Bytes, + &mut self, + responder: DynBytes, timeout: BlockNumber, callback: Callback, ) -> (MessageId, QueryId) { - let precompile: contract_ref!(XcmCallback, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(XcmCallback, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout, callback) } } impl OnQueryResponse for Messaging { #[ink(message)] - fn onQueryResponse(&mut self, id: MessageId, response: Bytes) { + fn onQueryResponse(&mut self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -166,6 +166,7 @@ pub mod messaging { } #[ink::scale_derive(Encode, Decode, TypeInfo)] + #[cfg_attr(feature = "std", derive(ink::storage::traits::StorageLayout))] enum Response { IsmpGet(Vec), IsmpPost(Vec), diff --git a/pop-api-vnext/integration-tests/src/messaging.rs b/pop-api-vnext/integration-tests/src/messaging.rs index bb23e2b7c..0f9849be5 100644 --- a/pop-api-vnext/integration-tests/src/messaging.rs +++ b/pop-api-vnext/integration-tests/src/messaging.rs @@ -8,8 +8,7 @@ use pallet_api_vnext::messaging::{ }; use pallet_revive::precompiles::alloy::sol_types::SolEvent; use pop_api::{ - messaging::{Bytes, Error}, - sol::SolBytes, + messaging::{DynBytes, Error}, SolErrorDecode, }; use sp_io::{ @@ -176,8 +175,8 @@ mod ismp { response: response .into_iter() .map(|v| pop_api::messaging::ismp::StorageValue { - key: SolBytes(v.key), - value: v.value.map(|v| SolBytes(v)) + key: DynBytes(v.key), + value: v.value.map(|v| DynBytes(v)) }) .collect() } @@ -302,7 +301,7 @@ mod ismp { assert_eq!( contract.last_event(), - IsmpPostCompleted { id, response: SolBytes(response) }.encode() + IsmpPostCompleted { id, response: DynBytes(response) }.encode() ); assert_eq!(contract.poll_status(id), MessageStatus::NotFound); }); @@ -497,7 +496,7 @@ mod xcm { assert_eq!( contract.last_event(), - XcmCompleted { id, result: SolBytes(response.encode()) }.encode() + XcmCompleted { id, result: DynBytes(response.encode()) }.encode() ); assert_eq!(contract.poll_status(id), MessageStatus::NotFound); }); @@ -552,9 +551,9 @@ impl Contract { Self { address, creator: origin.clone() } } - fn get_response(&self, message: MessageId) -> Bytes { + fn get_response(&self, message: MessageId) -> DynBytes { let call = getResponseCall { message }; - SolBytes(self.call::<_, Error>(&self.creator, call, 0).unwrap().0.into()) + DynBytes(self.call::<_, Error>(&self.creator, call, 0).unwrap().0.into()) } fn poll_status(&self, message: MessageId) -> MessageStatus { diff --git a/pop-api-vnext/src/errors.rs b/pop-api-vnext/src/errors.rs index 93f26a4f2..ff449daa5 100644 --- a/pop-api-vnext/src/errors.rs +++ b/pop-api-vnext/src/errors.rs @@ -1,4 +1,4 @@ -pub type FixedBytes = ink::SolBytes<[u8; N]>; +pub use ink::sol::FixedBytes; /// Arithmetic errors. #[cfg_attr(feature = "std", derive(Debug, PartialEq))] diff --git a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs index 73ae6e127..c430e435b 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0/errors.rs @@ -125,8 +125,6 @@ const TRIE: [u8; 4] = sol_error_selector!("Trie", (u8,)); #[test] fn error_decoding_works() { - use ink::SolBytes; - for (encoded, expected) in [ ( "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", @@ -170,7 +168,7 @@ fn error_decoding_works() { ), ( "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", - Module { index: 255, error: SolBytes([255; 4]) }, + Module { index: 255, error: FixedBytes([255; 4]) }, ), ( "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", @@ -193,7 +191,7 @@ fn error_decoding_works() { #[test] fn error_encoding_works() { - use ink::{SolBytes, SolEncode}; + use ink::SolEncode; for (result, expected) in [ ( @@ -226,7 +224,7 @@ fn error_encoding_works() { "94280d62000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" ), ( - Module{ index: 255, error: SolBytes([255; 4]) }.encode(), + Module{ index: 255, error: FixedBytes([255; 4]) }.encode(), "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", ), ( @@ -252,7 +250,7 @@ fn error_encoding_works() { #[test] fn selectors_work() { - use ink::{SolBytes, SolEncode}; + use ink::SolEncode; for (encoded, expected) in [ (Error::Arithmetic(ArithmeticError::Overflow).encode()[..4].to_vec(), ARITHMETIC), @@ -271,7 +269,7 @@ fn selectors_work() { (Error::ERC20InvalidReceiver(Address::default()).encode(), INVALID_RECEIVER), (Error::ERC20InvalidSender(Address::default()).encode(), INVALID_SENDER), (Error::ERC20InvalidSpender(Address::default()).encode(), INVALID_SPENDER), - (Error::Module { index: 255, error: SolBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), + (Error::Module { index: 255, error: FixedBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), (Error::Token(TokenError::Unknown).encode()[..4].to_vec(), TOKEN), ( Error::Transactional(TransactionalError::LimitReached).encode()[..4].to_vec(), diff --git a/pop-api-vnext/src/fungibles/v0.rs b/pop-api-vnext/src/fungibles/v0.rs index 0e32a2f9d..212827e1f 100644 --- a/pop-api-vnext/src/fungibles/v0.rs +++ b/pop-api-vnext/src/fungibles/v0.rs @@ -24,7 +24,7 @@ pub trait Fungibles { /// - `to` - The recipient account. /// - `value` - The number of tokens to transfer. #[ink(message)] - fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error>; + fn transfer(&mut self, token: TokenId, to: Address, value: U256) -> Result<(), Error>; /// Transfers `value` amount tokens on behalf of `from` to account `to`. /// @@ -36,7 +36,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn transferFrom( - &self, + &mut self, token: TokenId, from: Address, to: Address, @@ -50,7 +50,7 @@ pub trait Fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to approve. #[ink(message)] - fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error>; + fn approve(&mut self, token: TokenId, spender: Address, value: U256) -> Result<(), Error>; /// Increases the allowance of `spender` by `value` amount of tokens. /// @@ -61,7 +61,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn increaseAllowance( - &self, + &mut self, token: TokenId, spender: Address, value: U256, @@ -76,7 +76,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn decreaseAllowance( - &self, + &mut self, token: TokenId, spender: Address, value: U256, @@ -90,7 +90,7 @@ pub trait Fungibles { /// /// NOTE: The minimum balance must be non-zero. #[ink(message)] - fn create(&self, admin: Address, min_balance: U256) -> Result; + fn create(&mut self, admin: Address, min_balance: U256) -> Result; /// Start the process of destroying a token. /// @@ -98,7 +98,7 @@ pub trait Fungibles { /// - `token` - The token to be destroyed. #[ink(message)] #[allow(non_snake_case)] - fn startDestroy(&self, token: TokenId) -> Result<(), Error>; + fn startDestroy(&mut self, token: TokenId) -> Result<(), Error>; /// Set the metadata for a token. /// @@ -110,7 +110,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn setMetadata( - &self, + &mut self, token: TokenId, name: String, symbol: String, @@ -123,7 +123,7 @@ pub trait Fungibles { /// - `token` - The token to update. #[ink(message)] #[allow(non_snake_case)] - fn clearMetadata(&self, token: TokenId) -> Result<(), Error>; + fn clearMetadata(&mut self, token: TokenId) -> Result<(), Error>; /// Creates `value` amount of tokens and assigns them to `account`, increasing the total /// supply. @@ -133,7 +133,7 @@ pub trait Fungibles { /// - `account` - The account to be credited with the created tokens. /// - `value` - The number of tokens to mint. #[ink(message)] - fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; + fn mint(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Destroys `value` amount of tokens from `account`, reducing the total supply. /// @@ -142,7 +142,7 @@ pub trait Fungibles { /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] - fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; + fn burn(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Total token supply for a specified token. /// @@ -223,7 +223,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro ensure!(spender != Address::zero(), ZeroRecipientAddress); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.approve(token, spender, value) } @@ -251,7 +251,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.burn(token, account, value) } @@ -262,7 +262,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> #[inline] pub fn clear_metadata(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.clearMetadata(token) } @@ -279,7 +279,7 @@ pub fn create(admin: Address, min_balance: U256) -> Result { ensure!(min_balance != U256::zero(), MinBalanceZero); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.create(admin, min_balance) } @@ -305,7 +305,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.decreaseAllowance(token, spender, value) } @@ -331,7 +331,7 @@ pub fn increase_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.increaseAllowance(token, spender, value) } @@ -348,7 +348,7 @@ pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.mint(token, account, value) } @@ -378,7 +378,7 @@ pub fn set_metadata( decimals: u8, ) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.setMetadata(token, name, symbol, decimals) } @@ -389,7 +389,7 @@ pub fn set_metadata( #[inline] pub fn start_destroy(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.startDestroy(token) } @@ -427,7 +427,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result<(), Error> { ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.transfer(token, to, value) } @@ -446,6 +446,6 @@ pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.transferFrom(token, from, to, value) } diff --git a/pop-api-vnext/src/fungibles/v0/errors.rs b/pop-api-vnext/src/fungibles/v0/errors.rs index a32b76257..fe9d522b6 100644 --- a/pop-api-vnext/src/fungibles/v0/errors.rs +++ b/pop-api-vnext/src/fungibles/v0/errors.rs @@ -123,8 +123,6 @@ const ZERO_VALUE: [u8; 4] = sol_error_selector!("ZeroValue", ()); #[test] fn error_decoding_works() { - use ink::SolBytes; - for (encoded, expected) in [ ( "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", @@ -143,7 +141,7 @@ fn error_decoding_works() { ("5f15618b", MinBalanceZero), ( "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", - Module { index: 255, error: SolBytes([255; 4]) }, + Module { index: 255, error: FixedBytes([255; 4]) }, ), ("9d7b369d", NoPermission), ("baf13b3f", NotLive), @@ -174,7 +172,7 @@ fn error_decoding_works() { #[test] fn error_encoding_works() { - use ink::{SolBytes, SolEncode}; + use ink::SolEncode; for (result, expected) in [ ( @@ -191,7 +189,7 @@ fn error_encoding_works() { ), (MinBalanceZero.encode(), "5f15618b"), ( - Module{ index: 255, error: SolBytes([255; 4]) }.encode(), + Module{ index: 255, error: FixedBytes([255; 4]) }.encode(), "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", ), (NoPermission.encode(), "9d7b369d"), @@ -222,7 +220,7 @@ fn error_encoding_works() { #[test] fn selectors_work() { - use ink::{SolBytes, SolEncode}; + use ink::SolEncode; for (encoded, expected) in [ (Error::Arithmetic(ArithmeticError::Overflow).encode()[..4].to_vec(), ARITHMETIC), @@ -231,7 +229,7 @@ fn selectors_work() { (Error::InsufficientBalance.encode(), INSUFFICIENT_BALANCE), (Error::InvalidRecipient(Address::default()).encode()[..4].to_vec(), INVALID_RECIPIENT), (Error::MinBalanceZero.encode(), MIN_BALANCE_ZERO), - (Error::Module { index: 255, error: SolBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), + (Error::Module { index: 255, error: FixedBytes([255; 4]) }.encode()[..4].to_vec(), MODULE), (Error::NoPermission.encode(), NO_PERMISSION), (Error::NotLive.encode(), NOT_LIVE), (Error::Token(TokenError::Unknown).encode()[..4].to_vec(), TOKEN), diff --git a/pop-api-vnext/src/messaging.rs b/pop-api-vnext/src/messaging.rs index f1e89be2a..b7eefa658 100644 --- a/pop-api-vnext/src/messaging.rs +++ b/pop-api-vnext/src/messaging.rs @@ -1,12 +1,13 @@ -pub use ink::primitives::Weight; use ink::{ contract_ref, env::hash::{Blake2x256, CryptoHash}, prelude::vec::Vec, primitives::AccountId, scale::{Compact, Encode}, - SolBytes, U256, + sol::FixedBytes, + U256, }; +pub use ink::{primitives::Weight, sol::DynBytes}; use sol::Sol; pub use v0::*; @@ -20,8 +21,6 @@ pub mod xcm; /// The first version of the Messaging API. pub mod v0; -pub type Bytes = SolBytes>; -pub type FixedBytes = SolBytes<[u8; N]>; pub type MessageId = u64; /// Calculate the hashed account identifier for a given parachain and account. diff --git a/pop-api-vnext/src/messaging/ismp.rs b/pop-api-vnext/src/messaging/ismp.rs index bcd481020..bf14130b7 100644 --- a/pop-api-vnext/src/messaging/ismp.rs +++ b/pop-api-vnext/src/messaging/ismp.rs @@ -1,6 +1,6 @@ pub use v0::*; -use super::{contract_ref, fixed_address, Bytes, MessageId, MessageStatus, Pop, Sol, Vec, U256}; +use super::{contract_ref, fixed_address, MessageId, MessageStatus, Pop, Sol, Vec, U256}; /// The first version of the ISMP API. pub mod v0; diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index b2dce7e19..845e01562 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -1,5 +1,5 @@ pub use errors::{Error, Error::*}; -use ink::{Address, SolBytes}; +use ink::{sol::DynBytes, Address}; use super::{super::v0::Callback, *}; @@ -23,7 +23,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn get(&self, request: Get, fee: U256) -> Result; + fn get(&mut self, request: Get, fee: U256) -> Result; /// Submit a new ISMP `Post` request. /// @@ -36,7 +36,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&self, request: Post, fee: U256) -> Result; + fn post(&mut self, request: Post, fee: U256) -> Result; } /// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State @@ -53,7 +53,7 @@ pub trait IsmpCallback { /// # Returns /// A unique message identifier. #[ink(message)] - fn get(&self, request: Get, fee: U256, callback: Callback) -> Result; + fn get(&mut self, request: Get, fee: U256, callback: Callback) -> Result; /// Submit a new ISMP `Post` request. /// @@ -67,7 +67,7 @@ pub trait IsmpCallback { /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&self, request: Post, fee: U256, callback: Callback) -> Result; + fn post(&mut self, request: Post, fee: U256, callback: Callback) -> Result; } /// The messaging interface of the ISMP precompile offers a general interface for cross-chain @@ -86,7 +86,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&self, message: MessageId) -> Bytes; + fn getResponse(&mut self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -101,7 +101,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&self, message: MessageId) -> MessageStatus; + fn pollStatus(&mut self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -110,7 +110,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&self, message: MessageId) -> Result<(), Error>; + fn remove(&mut self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -120,7 +120,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&self, messages: Vec) -> Result<(), Error>; + fn removeMany(&mut self, messages: Vec) -> Result<(), Error>; } /// Submit a new ISMP `Get` request. @@ -136,11 +136,11 @@ pub trait Messaging { pub fn get(request: Get, fee: U256, callback: Option) -> Result { match callback { None => { - let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.get(request, fee) }, Some(callback) => { - let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.get(request, fee, callback) }, } @@ -154,8 +154,8 @@ pub fn get(request: Get, fee: U256, callback: Option) -> Result Bytes { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); +pub fn get_response(message: MessageId) -> DynBytes { + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -174,7 +174,7 @@ pub fn id() -> u32 { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -193,11 +193,11 @@ pub fn poll_status(message: MessageId) -> MessageStatus { pub fn post(request: Post, fee: U256, callback: Option) -> Result { match callback { None => { - let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.post(request, fee) }, Some(callback) => { - let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.post(request, fee, callback) }, } @@ -211,7 +211,7 @@ pub fn post(request: Post, fee: U256, callback: Option) -> Result Result<(), Error> { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -223,7 +223,7 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } @@ -238,9 +238,9 @@ pub struct Get { /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Some application-specific metadata relating to this request. - pub context: Bytes, + pub context: DynBytes, /// Raw Storage keys that would be used to fetch the values from the counterparty. - pub keys: Vec, + pub keys: Vec, } impl Get { @@ -256,8 +256,8 @@ impl Get { destination: u32, height: u64, timeout: u64, - context: Bytes, - keys: Vec, + context: DynBytes, + keys: Vec, ) -> Self { Self { destination, height, timeout, context, keys } } @@ -270,11 +270,11 @@ pub struct Post { /// The destination state machine of this request. pub destination: u32, /// The receiving module identifier/contract address on the destination chain. - pub to: Bytes, + pub to: DynBytes, /// Relative from the current timestamp at which this request expires in seconds. pub timeout: u64, /// Encoded request data. - pub data: Bytes, + pub data: DynBytes, } impl Post { @@ -285,8 +285,8 @@ impl Post { /// - `to` - The receiving module identifier/contract address on the destination chain. /// - `timeout` - Relative from the current timestamp at which this request expires in seconds. /// - `data` - Encoded request data. - pub fn new(destination: u32, to: Bytes, timeout: u64, data: Vec) -> Self { - Self { destination, to, timeout, data: SolBytes(data) } + pub fn new(destination: u32, to: DynBytes, timeout: u64, data: Vec) -> Self { + Self { destination, to, timeout, data: DynBytes(data) } } } @@ -295,9 +295,9 @@ impl Post { #[derive(Clone, Debug, ink::SolDecode, ink::SolEncode)] pub struct StorageValue { /// The request storage key. - pub key: Bytes, + pub key: DynBytes, /// The verified value. - pub value: Option, + pub value: Option, } /// A callback for handling responses to ISMP `Get` requests. @@ -323,7 +323,7 @@ pub trait OnPostResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onPostResponse(&mut self, id: MessageId, response: Bytes); + fn onPostResponse(&mut self, id: MessageId, response: DynBytes); } /// Event emitted when a ISMP `Get` request is completed. @@ -343,5 +343,5 @@ pub struct IsmpPostCompleted { #[ink(topic)] pub id: MessageId, /// The response message. - pub response: Bytes, + pub response: DynBytes, } diff --git a/pop-api-vnext/src/messaging/ismp/v0/errors.rs b/pop-api-vnext/src/messaging/ismp/v0/errors.rs index 5afe61a86..1d502cbc6 100644 --- a/pop-api-vnext/src/messaging/ismp/v0/errors.rs +++ b/pop-api-vnext/src/messaging/ismp/v0/errors.rs @@ -89,7 +89,7 @@ const MAX_KEYS_EXCEEDED: [u8; 4] = sol_error_selector!("MaxKeysExceeded", ()); #[test] fn error_decoding_works() { - use ink::{sol::SolErrorDecode, SolBytes}; + use ink::sol::SolErrorDecode; for (encoded, expected) in [ ( @@ -107,7 +107,7 @@ fn error_decoding_works() { ("28915ac7", MessageNotFound), ( "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", - Module { index: 255, error: SolBytes([255; 4]) }, + Module { index: 255, error: FixedBytes([255; 4]) }, ), ("806d0f74", RequestPending), ( diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index dff67da8f..a6e011a87 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -21,7 +21,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&self, message: MessageId) -> Bytes; + fn getResponse(&mut self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -36,7 +36,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&self, message: MessageId) -> MessageStatus; + fn pollStatus(&mut self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -45,7 +45,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&self, message: MessageId) -> Result<(), Error>; + fn remove(&mut self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -55,7 +55,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&self, messages: Vec) -> Result<(), Error>; + fn removeMany(&mut self, messages: Vec) -> Result<(), Error>; } /// A message callback. @@ -93,7 +93,7 @@ impl Callback { Self { destination, encoding, - selector: SolBytes(selector.to_be_bytes()), + selector: FixedBytes(selector.to_be_bytes()), gas_limit, storage_deposit_limit, } @@ -143,8 +143,8 @@ pub struct Removed { /// # Parameters /// - `message` - The message identifier. #[inline] -pub fn get_response(message: MessageId) -> Bytes { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); +pub fn get_response(message: MessageId) -> DynBytes { + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -163,7 +163,7 @@ pub fn id() -> u32 { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -175,7 +175,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) -> Result<(), Error> { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -187,6 +187,6 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } diff --git a/pop-api-vnext/src/messaging/v0/errors.rs b/pop-api-vnext/src/messaging/v0/errors.rs index a15a7f869..87da6d706 100644 --- a/pop-api-vnext/src/messaging/v0/errors.rs +++ b/pop-api-vnext/src/messaging/v0/errors.rs @@ -77,8 +77,6 @@ pub(crate) const TRIE: [u8; 4] = sol_error_selector!("Trie", (u8,)); #[test] fn error_decoding_works() { - use ink::SolBytes; - for (encoded, expected) in [ ( "7fdb06c50000000000000000000000000000000000000000000000000000000000000001", @@ -91,7 +89,7 @@ fn error_decoding_works() { ("28915ac7", MessageNotFound), ( "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", - Module { index: 255, error: SolBytes([255; 4]) }, + Module { index: 255, error: FixedBytes([255; 4]) }, ), ("806d0f74", RequestPending), ( diff --git a/pop-api-vnext/src/messaging/xcm.rs b/pop-api-vnext/src/messaging/xcm.rs index cc4cf533c..03c243a5a 100644 --- a/pop-api-vnext/src/messaging/xcm.rs +++ b/pop-api-vnext/src/messaging/xcm.rs @@ -2,7 +2,7 @@ use ink::scale::Encode; pub use v0::*; use super::{ - contract_ref, fixed_address, BlockNumber, Bytes, MessageId, MessageStatus, Pop, Sol, Vec, + contract_ref, fixed_address, BlockNumber, DynBytes, MessageId, MessageStatus, Pop, Sol, Vec, Weight, }; diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index 83d0c7027..bd19b61d2 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -1,6 +1,6 @@ pub use errors::{Error, Error::*}; pub use ink::xcm::prelude::{Location, VersionedLocation, VersionedResponse, VersionedXcm}; -use ink::{scale::Decode, Address, SolBytes}; +use ink::{scale::Decode, Address}; use super::{super::v0::Callback, *}; @@ -26,7 +26,7 @@ pub trait Xcm { /// # Returns /// A SCALE-encoded dispatch result. #[ink(message)] - fn execute(&self, message: Bytes, weight: Weight) -> Bytes; + fn execute(&mut self, message: DynBytes, weight: Weight) -> DynBytes; /// Initiate a new XCM query. /// @@ -40,7 +40,7 @@ pub trait Xcm { /// A unique query identifier. #[ink(message)] #[allow(non_snake_case)] - fn newQuery(&self, responder: Bytes, timeout: BlockNumber) -> (MessageId, QueryId); + fn newQuery(&mut self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId); /// Send an XCM from a given origin. /// @@ -51,7 +51,7 @@ pub trait Xcm { /// # Returns /// A SCALE-encoded dispatch result. #[ink(message)] - fn send(&self, destination: Bytes, message: Bytes) -> Bytes; + fn send(&mut self, destination: DynBytes, message: DynBytes) -> DynBytes; } /// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus @@ -72,8 +72,8 @@ pub trait XcmCallback { #[ink(message)] #[allow(non_snake_case)] fn newQuery( - &self, - responder: Bytes, + &mut self, + responder: DynBytes, timeout: BlockNumber, callback: Callback, ) -> (MessageId, QueryId); @@ -95,7 +95,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&self, message: MessageId) -> Bytes; + fn getResponse(&mut self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -110,7 +110,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&self, message: MessageId) -> MessageStatus; + fn pollStatus(&mut self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -119,7 +119,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&self, message: MessageId); + fn remove(&mut self, message: MessageId); /// Remove a batch of completed or timed-out messages. /// @@ -129,7 +129,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&self, messages: Vec); + fn removeMany(&mut self, messages: Vec); } /// Execute an XCM message from a local, signed, origin. @@ -142,9 +142,9 @@ pub trait Messaging { /// A SCALE-encoded dispatch result. #[inline] pub fn execute(message: VersionedXcm, weight: Weight) -> Result<(), Error> { - let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - let result = precompile.execute(SolBytes(message.encode()), weight); - Result::<(), ()>::decode(&mut result.as_slice()) + let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let result = precompile.execute(DynBytes(message.encode()), weight); + Result::<(), ()>::decode(&mut result.0.as_slice()) .map_err(|_| Error::DecodingFailed)? .map_err(|_| Error::ExecutionFailed(result)) } @@ -157,8 +157,8 @@ pub fn execute(message: VersionedXcm, weight: Weight) -> Res /// # Parameters /// - `message` - The message identifier. #[inline] -pub fn get_response(message: MessageId) -> Bytes { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); +pub fn get_response(message: MessageId) -> DynBytes { + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -188,14 +188,14 @@ pub fn new_query( timeout: BlockNumber, callback: Option, ) -> (MessageId, QueryId) { - let responder = SolBytes(responder.encode()); + let responder = DynBytes(responder.encode()); match callback { None => { - let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout) }, Some(callback) => { - let precompile: contract_ref!(XcmCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(XcmCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout, callback) }, } @@ -207,7 +207,7 @@ pub fn new_query( /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -219,7 +219,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -231,7 +231,7 @@ pub fn remove(message: MessageId) { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) { - let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } @@ -248,9 +248,9 @@ pub fn send( destination: VersionedLocation, message: VersionedXcm, ) -> Result<(), Error> { - let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); - let result = precompile.send(SolBytes(destination.encode()), SolBytes(message.encode())); - Result::<(), ()>::decode(&mut result.as_slice()) + let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let result = precompile.send(DynBytes(destination.encode()), DynBytes(message.encode())); + Result::<(), ()>::decode(&mut result.0.as_slice()) .map_err(|_| Error::DecodingFailed)? .map_err(|_| Error::SendingFailed(result)) } @@ -265,7 +265,7 @@ pub trait OnQueryResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onQueryResponse(&mut self, id: MessageId, response: Bytes); + fn onQueryResponse(&mut self, id: MessageId, response: DynBytes); } /// Event emitted when a XCM query is completed. @@ -275,5 +275,5 @@ pub struct XcmCompleted { #[ink(topic)] pub id: MessageId, /// The response message. - pub result: Bytes, + pub result: DynBytes, } diff --git a/pop-api-vnext/src/messaging/xcm/v0/errors.rs b/pop-api-vnext/src/messaging/xcm/v0/errors.rs index ecb97548e..cb9bd516e 100644 --- a/pop-api-vnext/src/messaging/xcm/v0/errors.rs +++ b/pop-api-vnext/src/messaging/xcm/v0/errors.rs @@ -25,7 +25,7 @@ pub enum Error { /// Reason why a dispatch call failed. Dispatch(DispatchError), /// The execution of a XCM message failed. - ExecutionFailed(Bytes), + ExecutionFailed(DynBytes), /// Timeouts must be in the future. FutureTimeoutMandatory, /// Message block limit has been reached for this expiry block. Try a different timeout. @@ -44,7 +44,7 @@ pub enum Error { /// The request is pending. RequestPending, /// The sending of a XCM message failed. - SendingFailed(Bytes), + SendingFailed(DynBytes), /// An error to do with tokens. Token(TokenError), /// The number of messages exceeds the limit. @@ -69,7 +69,7 @@ impl PrecompileError for Error { DECODING_FAILED => Ok(Self::DecodingFailed), DISPATCH => Ok(Self::Dispatch(::decode(&data[4..])?)), EXECUTION_FAILED => - Ok(Self::ExecutionFailed(::decode(&data[4..])?)), + Ok(Self::ExecutionFailed(::decode(&data[4..])?)), FUTURE_TIMEOUT_MANDATORY => Ok(Self::FutureTimeoutMandatory), MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED => Ok(Self::MaxMessageTimeoutPerBlockReached), MESSAGE_NOT_FOUND => Ok(Self::MessageNotFound), @@ -79,7 +79,7 @@ impl PrecompileError for Error { }, ORIGIN_CONVERSION_FAILED => Ok(Self::OriginConversionFailed), REQUEST_PENDING => Ok(Self::RequestPending), - SENDING_FAILED => Ok(Self::SendingFailed(::decode(&data[4..])?)), + SENDING_FAILED => Ok(Self::SendingFailed(::decode(&data[4..])?)), TOKEN => Ok(Self::Token(::decode(&data[4..])?)), TOO_MANY_MESSAGES => Ok(Self::TooManyMessages), TRANSACTIONAL => @@ -91,16 +91,16 @@ impl PrecompileError for Error { } const DECODING_FAILED: [u8; 4] = sol_error_selector!("DecodingFailed", ()); -const EXECUTION_FAILED: [u8; 4] = sol_error_selector!("ExecutionFailed", (SolBytes>,)); +const EXECUTION_FAILED: [u8; 4] = sol_error_selector!("ExecutionFailed", (DynBytes,)); const FUTURE_TIMEOUT_MANDATORY: [u8; 4] = sol_error_selector!("FutureTimeoutMandatory", ()); const MAX_MESSAGE_TIMEOUT_PER_BLOCK_REACHED: [u8; 4] = sol_error_selector!("MaxMessageTimeoutPerBlockReached", ()); const ORIGIN_CONVERSION_FAILED: [u8; 4] = sol_error_selector!("OriginConversionFailed", ()); -const SENDING_FAILED: [u8; 4] = sol_error_selector!("SendingFailed", (SolBytes>,)); +const SENDING_FAILED: [u8; 4] = sol_error_selector!("SendingFailed", (DynBytes,)); #[test] fn error_decoding_works() { - use ink::{sol::SolErrorDecode, SolBytes}; + use ink::sol::SolErrorDecode; for (encoded, expected) in [ ( @@ -114,20 +114,20 @@ fn error_decoding_works() { ), ( "15fcd67500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", - ExecutionFailed(SolBytes(Vec::default())) + ExecutionFailed(DynBytes(Vec::default())) ), ("885a28b2", FutureTimeoutMandatory), ("fc952e0b", MaxMessageTimeoutPerBlockReached), ("28915ac7", MessageNotFound), ( "3323f3c100000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000000", - Module { index: 255, error: SolBytes([255; 4]) }, + Module { index: 255, error: FixedBytes([255; 4]) }, ), ("8926fba8", OriginConversionFailed), ("806d0f74", RequestPending), ( "0ff105a200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", - SendingFailed(SolBytes(Vec::default())) + SendingFailed(DynBytes(Vec::default())) ), ( "57fdc3d80000000000000000000000000000000000000000000000000000000000000009", diff --git a/pop-api-vnext/src/sol.rs b/pop-api-vnext/src/sol.rs index c15740f12..b2d8fe9c5 100644 --- a/pop-api-vnext/src/sol.rs +++ b/pop-api-vnext/src/sol.rs @@ -1,4 +1,4 @@ -pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolBytes, SolEncode}; +pub use ink::{abi::Sol, primitives::sol::SolErrorDecode, SolEncode}; /// Reverts the current contract execution, rolling back any changes and returning the specified /// `error`. From 2ccf4b3c5aadc924f8396d642298b37f58c5ee40 Mon Sep 17 00:00:00 2001 From: Daanvdplas Date: Thu, 21 Aug 2025 13:33:52 +0200 Subject: [PATCH 281/284] fmt --- Cargo.toml | 40 ++++++++-------- pop-api-vnext/Cargo.toml | 20 ++++---- pop-api-vnext/examples/fungibles/Cargo.toml | 14 +++--- pop-api-vnext/examples/messaging/Cargo.toml | 14 +++--- pop-api-vnext/integration-tests/Cargo.toml | 46 +++++++++---------- .../contracts/fungibles/Cargo.toml | 14 +++--- .../contracts/messaging/Cargo.toml | 14 +++--- 7 files changed, 81 insertions(+), 81 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3851cda5..8b1fa8ffc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ inherits = "release" lto = true [workspace.package] -authors = ["R0GUE "] +authors = [ "R0GUE " ] description = "Pop Network makes it easy for smart contract developers to use the Power of Polkadot." edition = "2021" homepage = "https://r0gue.io" @@ -16,31 +16,31 @@ repository = "https://github.com/r0gue-io/pop-node/" [workspace] exclude = [ - "extension/contract", - "pop-api", - "pop-api-vnext", - "tests/contracts", + "extension/contract", + "pop-api", + "pop-api-vnext", + "tests/contracts", ] members = [ - "integration-tests", - "node", - "pallets/*", - "pop-api-vnext/integration-tests", - "pop-api/integration-tests", - "primitives", - "runtime/devnet", - "runtime/mainnet", - "runtime/testnet", + "integration-tests", + "node", + "pallets/*", + "pop-api-vnext/integration-tests", + "pop-api/integration-tests", + "primitives", + "runtime/devnet", + "runtime/mainnet", + "runtime/testnet", ] resolver = "2" [workspace.dependencies] anyhow = { version = "1.0.81", default-features = false } -base64 = { version = "0.22.1", default-features = false, features = ["alloc"] } -clap = { version = "4.5.13", features = ["derive"] } +base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } +clap = { version = "4.5.13", features = [ "derive" ] } codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [ - "derive", + "derive", ] } color-print = "0.3.4" contract-build = { git = "https://github.com/use-ink/cargo-contract", tag = "v6.0.0-alpha.1" } @@ -51,18 +51,18 @@ futures = "0.3.31" hex = "0.4.3" hex-literal = "0.4.1" impl-trait-for-tuples = "0.2.2" -jsonrpsee = { version = "0.24.3", features = ["server"] } +jsonrpsee = { version = "0.24.3", features = [ "server" ] } log = { version = "0.4.22", default-features = false } rand = "0.8.5" scale-info = { version = "2.11.6", default-features = false, features = [ - "derive", + "derive", ] } serde = { version = "1.0.214", default-features = false } serde_json = { version = "1.0.132", default-features = false } smallvec = "1.11.2" subxt = "0.41.0" subxt-signer = "0.41.0" -tokio = { version = "1.45.0", features = ["macros", "rt-multi-thread", "time"] } +tokio = { version = "1.45.0", features = [ "macros", "rt-multi-thread", "time" ] } tracing-subscriber = { version = "0.3.18", default-features = false } # Build diff --git a/pop-api-vnext/Cargo.toml b/pop-api-vnext/Cargo.toml index 32b7dda56..393594117 100644 --- a/pop-api-vnext/Cargo.toml +++ b/pop-api-vnext/Cargo.toml @@ -9,8 +9,8 @@ version = "0.1.0" abi = "sol" [dependencies] -base64 = { version = "0.22.1", default-features = false, features = ["alloc"] } -ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } +base64 = { version = "0.22.1", default-features = false, features = [ "alloc" ] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = [ "unstable-hostfn" ] } pop-primitives = { path = "../primitives", default-features = false } [dev-dependencies] @@ -18,20 +18,20 @@ hex = { version = "0.4.3" } scale-info = { version = "2" } [lib] -crate-type = ["rlib"] +crate-type = [ "rlib" ] name = "pop_api" path = "src/lib.rs" [features] -default = ["std"] -fungibles = [] -messaging = [] -nonfungibles = [] +default = [ "std" ] +fungibles = [ ] +messaging = [ ] +nonfungibles = [ ] std = [ - "ink/std", - "pop-primitives/std", + "ink/std", + "pop-primitives/std", ] [lints.rust.unexpected_cfgs] -check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] level = "warn" diff --git a/pop-api-vnext/examples/fungibles/Cargo.toml b/pop-api-vnext/examples/fungibles/Cargo.toml index 1ea48faf5..2e90493ff 100644 --- a/pop-api-vnext/examples/fungibles/Cargo.toml +++ b/pop-api-vnext/examples/fungibles/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = ["R0GUE "] +authors = [ "R0GUE " ] edition = "2021" name = "fungibles" version = "0.1.0" @@ -11,18 +11,18 @@ abi = "all" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } -pop-api = { path = "../../../pop-api-vnext", default-features = false, features = ["fungibles"] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] hex = { version = "0.4.3" } scale-info = { version = "2" } [features] -default = ["std"] -ink-as-dependency = [] -std = ["ink/std", "pop-api/std"] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] [lints.rust.unexpected_cfgs] -check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] level = "warn" diff --git a/pop-api-vnext/examples/messaging/Cargo.toml b/pop-api-vnext/examples/messaging/Cargo.toml index fea273a9b..c3e423212 100644 --- a/pop-api-vnext/examples/messaging/Cargo.toml +++ b/pop-api-vnext/examples/messaging/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = ["R0GUE "] +authors = [ "R0GUE " ] edition = "2021" name = "messaging" version = "0.1.0" @@ -11,17 +11,17 @@ abi = "sol" path = "lib.rs" [dependencies] -ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } -pop-api = { path = "../../../pop-api-vnext", default-features = false, features = ["messaging"] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } [dev-dependencies] scale-info = { version = "2" } [features] -default = ["std"] -ink-as-dependency = [] -std = ["ink/std", "pop-api/std"] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] [lints.rust.unexpected_cfgs] -check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] level = "warn" diff --git a/pop-api-vnext/integration-tests/Cargo.toml b/pop-api-vnext/integration-tests/Cargo.toml index b98ac5e48..584247ce5 100644 --- a/pop-api-vnext/integration-tests/Cargo.toml +++ b/pop-api-vnext/integration-tests/Cargo.toml @@ -18,13 +18,13 @@ frame-system = { workspace = true, default-features = false } hex.workspace = true ismp.workspace = true log.workspace = true -pallet-api-vnext = { workspace = true, default-features = false, features = ["fungibles", "messaging"] } +pallet-api-vnext = { workspace = true, default-features = false, features = [ "fungibles", "messaging" ] } pallet-assets = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } pallet-ismp = { workspace = true, default-features = false } pallet-revive = { workspace = true, default-features = false } pallet-xcm = { workspace = true, default-features = false } -pop-api = { path = "../../pop-api-vnext", default-features = false, features = ["fungibles", "messaging"] } +pop-api = { path = "../../pop-api-vnext", default-features = false, features = [ "fungibles", "messaging" ] } pop-primitives = { workspace = true, default-features = false } pop-runtime-devnet.workspace = true pop-runtime-testnet.workspace = true @@ -34,26 +34,26 @@ xcm.workspace = true xcm-executor.workspace = true [features] -default = ["devnet", "std"] -devnet = ["pop-runtime-devnet/default"] +default = [ "devnet", "std" ] +devnet = [ "pop-runtime-devnet/default" ] std = [ - "codec/std", - "frame-support/std", - "frame-system/std", - "ismp/std", - "pallet-api-vnext/std", - "pallet-assets/std", - "pallet-balances/std", - "pallet-ismp/std", - "pallet-revive/std", - "pallet-xcm/std", - "pop-api/std", - "pop-primitives/std", - "pop-runtime-devnet/std", - "pop-runtime-testnet/std", - "sp-io/std", - "sp-runtime/std", - "xcm-executor/std", - "xcm/std", + "codec/std", + "frame-support/std", + "frame-system/std", + "ismp/std", + "pallet-api-vnext/std", + "pallet-assets/std", + "pallet-balances/std", + "pallet-ismp/std", + "pallet-revive/std", + "pallet-xcm/std", + "pop-api/std", + "pop-primitives/std", + "pop-runtime-devnet/std", + "pop-runtime-testnet/std", + "sp-io/std", + "sp-runtime/std", + "xcm-executor/std", + "xcm/std", ] -testnet = ["pop-runtime-testnet/default"] +testnet = [ "pop-runtime-testnet/default" ] diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml index 97e251dd2..f59e36257 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/fungibles/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = ["R0GUE "] +authors = [ "R0GUE " ] edition = "2021" name = "fungibles" version = "0.1.0" @@ -11,8 +11,8 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } -pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = ["fungibles"] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "fungibles" ] } [dev-dependencies] scale-info = { version = "2" } @@ -21,10 +21,10 @@ scale-info = { version = "2" } path = "lib.rs" [features] -default = ["std"] -ink-as-dependency = [] -std = ["ink/std", "pop-api/std"] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] [lints.rust.unexpected_cfgs] -check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] level = "warn" diff --git a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml index a364fb11f..58ff51930 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml +++ b/pop-api-vnext/integration-tests/contracts/messaging/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = ["R0GUE "] +authors = [ "R0GUE " ] edition = "2021" name = "messaging" version = "0.1.0" @@ -10,8 +10,8 @@ abi = "all" [workspace] [dependencies] -ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = ["unstable-hostfn"] } -pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = ["messaging"] } +ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.1", default-features = false, features = [ "unstable-hostfn" ] } +pop-api = { path = "../../../../pop-api-vnext", default-features = false, features = [ "messaging" ] } [dev-dependencies] scale-info = { version = "2" } @@ -20,10 +20,10 @@ scale-info = { version = "2" } path = "lib.rs" [features] -default = ["std"] -ink-as-dependency = [] -std = ["ink/std", "pop-api/std"] +default = [ "std" ] +ink-as-dependency = [ ] +std = [ "ink/std", "pop-api/std" ] [lints.rust.unexpected_cfgs] -check-cfg = ['cfg(ink_abi, values("ink", "sol", "all"))'] +check-cfg = [ 'cfg(ink_abi, values("ink", "sol", "all"))' ] level = "warn" From 5377bcd0e3229fc19c26258de0a02fd901c2b677 Mon Sep 17 00:00:00 2001 From: Daanvdplas Date: Thu, 21 Aug 2025 16:28:18 +0200 Subject: [PATCH 282/284] fix: build --- Cargo.lock | 188 +++++++++++++++++++++++++++++++++++++++++++++++++---- Cargo.toml | 3 +- 2 files changed, 177 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 159280fa6..20088646d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2320,6 +2320,20 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform 0.1.9", + "semver 1.0.26", + "serde", + "serde_json", + "thiserror 2.0.14", +] + [[package]] name = "cargo_metadata" version = "0.21.0" @@ -2588,6 +2602,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +[[package]] +name = "colored" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + [[package]] name = "colored" version = "3.0.0" @@ -2737,6 +2761,46 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +[[package]] +name = "contract-build" +version = "5.0.3" +source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" +dependencies = [ + "anyhow", + "blake2 0.10.6", + "bollard", + "cargo_metadata 0.19.2", + "clap", + "colored 2.2.0", + "contract-metadata 5.0.3", + "crossterm 0.28.1", + "duct 0.13.7", + "heck 0.5.0", + "hex", + "impl-serde 0.5.0", + "parity-scale-codec", + "regex", + "rustc_version 0.4.1", + "semver 1.0.26", + "serde", + "serde_json", + "strum 0.26.3", + "tempfile", + "term_size", + "tokio", + "tokio-stream", + "toml 0.8.23", + "tracing", + "url", + "uzers", + "walkdir", + "wasm-encoder", + "wasm-opt", + "wasmparser 0.220.1", + "which 7.0.3", + "zip 2.4.2", +] + [[package]] name = "contract-build" version = "6.0.0-alpha.1" @@ -2748,10 +2812,10 @@ dependencies = [ "bollard", "cargo_metadata 0.21.0", "clap", - "colored", - "contract-metadata", - "crossterm", - "duct", + "colored 3.0.0", + "contract-metadata 6.0.0-alpha.1", + "crossterm 0.29.0", + "duct 1.1.0", "heck 0.5.0", "hex", "impl-serde 0.5.0", @@ -2774,11 +2838,24 @@ dependencies = [ "url", "uzers", "walkdir", - "which", + "which 8.0.0", "zip 3.0.0", "zip 4.3.0", ] +[[package]] +name = "contract-metadata" +version = "5.0.3" +source = "git+https://github.com/use-ink/cargo-contract?branch=v5-rust-stable#450334b069b939afc877a312647a601fedbfbe01" +dependencies = [ + "anyhow", + "impl-serde 0.5.0", + "semver 1.0.26", + "serde", + "serde_json", + "url", +] + [[package]] name = "contract-metadata" version = "6.0.0-alpha.1" @@ -2964,7 +3041,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-types", ] @@ -3026,6 +3103,22 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.9.1", + "crossterm_winapi", + "mio", + "parking_lot 0.12.4", + "rustix 0.38.44", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm" version = "0.29.0" @@ -4479,6 +4572,18 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" +[[package]] +name = "duct" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c" +dependencies = [ + "libc", + "once_cell", + "os_pipe", + "shared_child", +] + [[package]] name = "duct" version = "1.1.0" @@ -8212,6 +8317,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" version = "0.2.175" @@ -14920,7 +15031,7 @@ dependencies = [ name = "pop-api-integration-tests" version = "0.1.0" dependencies = [ - "contract-build", + "contract-build 5.0.3", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -14948,7 +15059,7 @@ dependencies = [ name = "pop-api-vnext-integration-tests" version = "0.1.0" dependencies = [ - "contract-build", + "contract-build 6.0.0-alpha.1", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -14976,7 +15087,7 @@ dependencies = [ name = "pop-chain-extension" version = "0.1.0" dependencies = [ - "contract-build", + "contract-build 5.0.3", "env_logger 0.11.8", "frame-support 41.0.0", "frame-system 41.0.0", @@ -23778,6 +23889,16 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e913f9242315ca39eff82aee0e19ee7a372155717ff0eb082c741e435ce25ed1" +dependencies = [ + "leb128", + "wasmparser 0.220.1", +] + [[package]] name = "wasm-instrument" version = "0.4.0" @@ -23923,6 +24044,20 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d07b6a3b550fefa1a914b6d54fc175dd11c3392da11eee604e6ffc759805d25" +dependencies = [ + "ahash 0.8.12", + "bitflags 2.9.1", + "hashbrown 0.14.5", + "indexmap 2.10.0", + "semver 1.0.26", + "serde", +] + [[package]] name = "wasmparser-nostd" version = "0.100.2" @@ -23951,7 +24086,7 @@ dependencies = [ "rayon", "serde", "target-lexicon", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-cache", "wasmtime-cranelift", "wasmtime-environ", @@ -24006,7 +24141,7 @@ dependencies = [ "object 0.30.4", "target-lexicon", "thiserror 1.0.69", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-cranelift-shared", "wasmtime-environ", ] @@ -24041,7 +24176,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror 1.0.69", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-types", ] @@ -24124,7 +24259,7 @@ dependencies = [ "cranelift-entity", "serde", "thiserror 1.0.69", - "wasmparser", + "wasmparser 0.102.0", ] [[package]] @@ -24294,6 +24429,18 @@ dependencies = [ "staging-xcm-builder 21.0.0", ] +[[package]] +name = "which" +version = "7.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" +dependencies = [ + "either", + "env_home", + "rustix 1.0.8", + "winsafe", +] + [[package]] name = "which" version = "8.0.0" @@ -25209,6 +25356,21 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "zip" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "indexmap 2.10.0", + "memchr", + "thiserror 2.0.14", +] + [[package]] name = "zip" version = "3.0.0" diff --git a/Cargo.toml b/Cargo.toml index 8b1fa8ffc..4ce9045f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,8 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features = "derive", ] } color-print = "0.3.4" -contract-build = { git = "https://github.com/use-ink/cargo-contract", tag = "v6.0.0-alpha.1" } +contract-build = { git = "https://github.com/use-ink/cargo-contract", branch = "v5-rust-stable" } + docify = "0.2.9" enumflags2 = "0.7.11" env_logger = "0.11.5" From 47bd4c62e37d0938dedd32132afbc82c979ef775 Mon Sep 17 00:00:00 2001 From: Daanvdplas Date: Mon, 25 Aug 2025 19:58:38 +0200 Subject: [PATCH 283/284] refactor: remove mutability --- .../contracts/fungibles/lib.rs | 22 +++++----- .../contracts/messaging/lib.rs | 38 ++++++++-------- pop-api-vnext/src/fungibles/erc20/v0.rs | 12 ++--- pop-api-vnext/src/fungibles/v0.rs | 44 +++++++++---------- pop-api-vnext/src/messaging/ismp/v0.rs | 36 +++++++-------- pop-api-vnext/src/messaging/v0.rs | 16 +++---- pop-api-vnext/src/messaging/xcm/v0.rs | 34 +++++++------- 7 files changed, 101 insertions(+), 101 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs index 0b9b22a3a..f690162f5 100644 --- a/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/fungibles/lib.rs @@ -35,7 +35,7 @@ pub mod fungibles { impl Fungibles for Fungible { #[ink(message)] - fn transfer(&mut self, token: TokenId, to: Address, value: U256) -> Result<(), Error> { + fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error> { api::transfer(token, to, value)?; self.env().emit_event(Transfer { from: self.env().address(), to, value }); Ok(()) @@ -43,7 +43,7 @@ pub mod fungibles { #[ink(message)] fn transferFrom( - &mut self, + &self, token: TokenId, from: Address, to: Address, @@ -55,7 +55,7 @@ pub mod fungibles { } #[ink(message)] - fn approve(&mut self, token: TokenId, spender: Address, value: U256) -> Result<(), Error> { + fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error> { api::approve(token, spender, value)?; self.env().emit_event(Approval { owner: self.env().address(), spender, value }); Ok(()) @@ -63,7 +63,7 @@ pub mod fungibles { #[ink(message)] fn increaseAllowance( - &mut self, + &self, token: TokenId, spender: Address, value: U256, @@ -73,7 +73,7 @@ pub mod fungibles { #[ink(message)] fn decreaseAllowance( - &mut self, + &self, token: TokenId, spender: Address, value: U256, @@ -82,7 +82,7 @@ pub mod fungibles { } #[ink(message)] - fn create(&mut self, admin: Address, min_balance: U256) -> Result { + fn create(&self, admin: Address, min_balance: U256) -> Result { let token = api::create(admin, min_balance)?; self.env() .emit_event(Created { id: token, creator: self.env().address(), admin }); @@ -90,7 +90,7 @@ pub mod fungibles { } #[ink(message)] - fn startDestroy(&mut self, token: TokenId) -> Result<(), Error> { + fn startDestroy(&self, token: TokenId) -> Result<(), Error> { api::start_destroy(token)?; self.env().emit_event(DestroyStarted { token }); Ok(()) @@ -98,7 +98,7 @@ pub mod fungibles { #[ink(message)] fn setMetadata( - &mut self, + &self, token: TokenId, name: String, symbol: String, @@ -110,19 +110,19 @@ pub mod fungibles { } #[ink(message)] - fn clearMetadata(&mut self, token: TokenId) -> Result<(), Error> { + fn clearMetadata(&self, token: TokenId) -> Result<(), Error> { api::clear_metadata(token)?; self.env().emit_event(MetadataCleared { token }); Ok(()) } #[ink(message)] - fn mint(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { api::mint(token, account, value) } #[ink(message)] - fn burn(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { + fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error> { api::burn(token, account, value) } diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index f21605bf6..6bd8b212b 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -34,7 +34,7 @@ pub mod messaging { impl api::Messaging for Messaging { #[ink(message)] - fn getResponse(&mut self, message: MessageId) -> DynBytes { + fn getResponse(&self, message: MessageId) -> DynBytes { api::get_response(message) } @@ -44,19 +44,19 @@ pub mod messaging { } #[ink(message)] - fn pollStatus(&mut self, message: MessageId) -> MessageStatus { + fn pollStatus(&self, message: MessageId) -> MessageStatus { api::poll_status(message) } #[ink(message)] - fn remove(&mut self, message: MessageId) -> Result<(), Error> { + fn remove(&self, message: MessageId) -> Result<(), Error> { api::remove(message)?; self.responses.remove(&message); Ok(()) } #[ink(message)] - fn removeMany(&mut self, messages: Vec) -> Result<(), Error> { + fn removeMany(&self, messages: Vec) -> Result<(), Error> { for message in &messages { self.responses.remove(message); } @@ -67,12 +67,12 @@ pub mod messaging { impl Ismp for Messaging { #[ink(message)] - fn get(&mut self, request: Get, fee: U256) -> Result { + fn get(&self, request: Get, fee: U256) -> Result { ismp::get(request, fee, None) } #[ink(message)] - fn post(&mut self, request: Post, fee: U256) -> Result { + fn post(&self, request: Post, fee: U256) -> Result { ismp::post(request, fee, None) } } @@ -80,7 +80,7 @@ pub mod messaging { impl IsmpCallback for Messaging { #[ink(message)] fn get( - &mut self, + &self, request: Get, fee: U256, callback: Callback, @@ -90,7 +90,7 @@ pub mod messaging { #[ink(message)] fn post( - &mut self, + &self, request: Post, fee: U256, callback: Callback, @@ -101,7 +101,7 @@ pub mod messaging { impl OnGetResponse for Messaging { #[ink(message)] - fn onGetResponse(&mut self, id: MessageId, response: Vec) { + fn onGetResponse(&self, id: MessageId, response: Vec) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -112,7 +112,7 @@ pub mod messaging { impl OnPostResponse for Messaging { #[ink(message)] - fn onPostResponse(&mut self, id: MessageId, response: DynBytes) { + fn onPostResponse(&self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -123,20 +123,20 @@ pub mod messaging { impl Xcm for Messaging { #[ink(message)] - fn execute(&mut self, message: DynBytes, weight: Weight) -> DynBytes { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn execute(&self, message: DynBytes, weight: Weight) -> DynBytes { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.execute(message, weight) } #[ink(message)] - fn newQuery(&mut self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId) { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn newQuery(&self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId) { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout) } #[ink(message)] - fn send(&mut self, destination: DynBytes, message: DynBytes) -> DynBytes { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + fn send(&self, destination: DynBytes, message: DynBytes) -> DynBytes { + let precompile: contract_ref!(Xcm, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.send(destination, message) } } @@ -144,19 +144,19 @@ pub mod messaging { impl XcmCallback for Messaging { #[ink(message)] fn newQuery( - &mut self, + &self, responder: DynBytes, timeout: BlockNumber, callback: Callback, ) -> (MessageId, QueryId) { - let mut precompile: contract_ref!(XcmCallback, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(XcmCallback, Pop, Sol) = xcm::PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout, callback) } } impl OnQueryResponse for Messaging { #[ink(message)] - fn onQueryResponse(&mut self, id: MessageId, response: DynBytes) { + fn onQueryResponse(&self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index 49f72c511..eb48c8347 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -29,7 +29,7 @@ pub trait Erc20 { /// /// Emits a [`Transfer`] event. #[ink(message)] - fn transfer(&mut self, to: Address, value: U256) -> Result; + fn transfer(&self, to: Address, value: U256) -> Result; /// Returns the remaining number of tokens that `spender` will be allowed to spend /// on behalf of `owner` through [`transfer_from`]. This is zero by default. @@ -45,7 +45,7 @@ pub trait Erc20 { /// /// Emits an [`Approval`] event. #[ink(message)] - fn approve(&mut self, spender: Address, value: U256) -> Result; + fn approve(&self, spender: Address, value: U256) -> Result; /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. /// `value` is then deducted from the caller's allowance. @@ -55,7 +55,7 @@ pub trait Erc20 { /// Emits a [`Transfer`] event. #[ink(message)] #[allow(non_snake_case)] - fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> Result; + fn transferFrom(&self, from: Address, to: Address, value: U256) -> Result; } /// Returns the value of tokens in existence. @@ -85,7 +85,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); - let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); precompile.transfer(to, value) } @@ -111,7 +111,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result Result<(), Error>; + fn transfer(&self, token: TokenId, to: Address, value: U256) -> Result<(), Error>; /// Transfers `value` amount tokens on behalf of `from` to account `to`. /// @@ -36,7 +36,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn transferFrom( - &mut self, + &self, token: TokenId, from: Address, to: Address, @@ -50,7 +50,7 @@ pub trait Fungibles { /// - `spender` - The account that is allowed to spend the tokens. /// - `value` - The number of tokens to approve. #[ink(message)] - fn approve(&mut self, token: TokenId, spender: Address, value: U256) -> Result<(), Error>; + fn approve(&self, token: TokenId, spender: Address, value: U256) -> Result<(), Error>; /// Increases the allowance of `spender` by `value` amount of tokens. /// @@ -61,7 +61,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn increaseAllowance( - &mut self, + &self, token: TokenId, spender: Address, value: U256, @@ -76,7 +76,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn decreaseAllowance( - &mut self, + &self, token: TokenId, spender: Address, value: U256, @@ -90,7 +90,7 @@ pub trait Fungibles { /// /// NOTE: The minimum balance must be non-zero. #[ink(message)] - fn create(&mut self, admin: Address, min_balance: U256) -> Result; + fn create(&self, admin: Address, min_balance: U256) -> Result; /// Start the process of destroying a token. /// @@ -98,7 +98,7 @@ pub trait Fungibles { /// - `token` - The token to be destroyed. #[ink(message)] #[allow(non_snake_case)] - fn startDestroy(&mut self, token: TokenId) -> Result<(), Error>; + fn startDestroy(&self, token: TokenId) -> Result<(), Error>; /// Set the metadata for a token. /// @@ -110,7 +110,7 @@ pub trait Fungibles { #[ink(message)] #[allow(non_snake_case)] fn setMetadata( - &mut self, + &self, token: TokenId, name: String, symbol: String, @@ -123,7 +123,7 @@ pub trait Fungibles { /// - `token` - The token to update. #[ink(message)] #[allow(non_snake_case)] - fn clearMetadata(&mut self, token: TokenId) -> Result<(), Error>; + fn clearMetadata(&self, token: TokenId) -> Result<(), Error>; /// Creates `value` amount of tokens and assigns them to `account`, increasing the total /// supply. @@ -133,7 +133,7 @@ pub trait Fungibles { /// - `account` - The account to be credited with the created tokens. /// - `value` - The number of tokens to mint. #[ink(message)] - fn mint(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; + fn mint(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Destroys `value` amount of tokens from `account`, reducing the total supply. /// @@ -142,7 +142,7 @@ pub trait Fungibles { /// - `account` - The account from which the tokens will be destroyed. /// - `value` - The number of tokens to destroy. #[ink(message)] - fn burn(&mut self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; + fn burn(&self, token: TokenId, account: Address, value: U256) -> Result<(), Error>; /// Total token supply for a specified token. /// @@ -223,7 +223,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result<(), Erro ensure!(spender != Address::zero(), ZeroRecipientAddress); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.approve(token, spender, value) } @@ -251,7 +251,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.burn(token, account, value) } @@ -262,7 +262,7 @@ pub fn burn(token: TokenId, account: Address, value: U256) -> Result<(), Error> #[inline] pub fn clear_metadata(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.clearMetadata(token) } @@ -279,7 +279,7 @@ pub fn create(admin: Address, min_balance: U256) -> Result { ensure!(min_balance != U256::zero(), MinBalanceZero); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.create(admin, min_balance) } @@ -305,7 +305,7 @@ pub fn decrease_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.decreaseAllowance(token, spender, value) } @@ -331,7 +331,7 @@ pub fn increase_allowance(token: TokenId, spender: Address, value: U256) -> Resu ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.increaseAllowance(token, spender, value) } @@ -348,7 +348,7 @@ pub fn mint(token: TokenId, account: Address, value: U256) -> Result<(), Error> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.mint(token, account, value) } @@ -378,7 +378,7 @@ pub fn set_metadata( decimals: u8, ) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.setMetadata(token, name, symbol, decimals) } @@ -389,7 +389,7 @@ pub fn set_metadata( #[inline] pub fn start_destroy(token: TokenId) -> Result<(), Error> { let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.startDestroy(token) } @@ -427,7 +427,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result<(), Error> { ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.transfer(token, to, value) } @@ -446,6 +446,6 @@ pub fn transfer_from(token: TokenId, from: Address, to: Address, value: U256) -> ensure!(value != U256::zero(), ZeroValue); let address = fixed_address(PRECOMPILE); - let mut precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); + let precompile: contract_ref!(Fungibles, Pop, Sol) = address.into(); precompile.transferFrom(token, from, to, value) } diff --git a/pop-api-vnext/src/messaging/ismp/v0.rs b/pop-api-vnext/src/messaging/ismp/v0.rs index 845e01562..0ecab8f3c 100644 --- a/pop-api-vnext/src/messaging/ismp/v0.rs +++ b/pop-api-vnext/src/messaging/ismp/v0.rs @@ -23,7 +23,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn get(&mut self, request: Get, fee: U256) -> Result; + fn get(&self, request: Get, fee: U256) -> Result; /// Submit a new ISMP `Post` request. /// @@ -36,7 +36,7 @@ pub trait Ismp { /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&mut self, request: Post, fee: U256) -> Result; + fn post(&self, request: Post, fee: U256) -> Result; } /// The ISMP precompile offers a streamlined interface for messaging using the Interoperable State @@ -53,7 +53,7 @@ pub trait IsmpCallback { /// # Returns /// A unique message identifier. #[ink(message)] - fn get(&mut self, request: Get, fee: U256, callback: Callback) -> Result; + fn get(&self, request: Get, fee: U256, callback: Callback) -> Result; /// Submit a new ISMP `Post` request. /// @@ -67,7 +67,7 @@ pub trait IsmpCallback { /// # Returns /// A unique message identifier. #[ink(message)] - fn post(&mut self, request: Post, fee: U256, callback: Callback) -> Result; + fn post(&self, request: Post, fee: U256, callback: Callback) -> Result; } /// The messaging interface of the ISMP precompile offers a general interface for cross-chain @@ -86,7 +86,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&mut self, message: MessageId) -> DynBytes; + fn getResponse(&self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -101,7 +101,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&mut self, message: MessageId) -> MessageStatus; + fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -110,7 +110,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&mut self, message: MessageId) -> Result<(), Error>; + fn remove(&self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -120,7 +120,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&mut self, messages: Vec) -> Result<(), Error>; + fn removeMany(&self, messages: Vec) -> Result<(), Error>; } /// Submit a new ISMP `Get` request. @@ -136,11 +136,11 @@ pub trait Messaging { pub fn get(request: Get, fee: U256, callback: Option) -> Result { match callback { None => { - let mut precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.get(request, fee) }, Some(callback) => { - let mut precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.get(request, fee, callback) }, } @@ -155,7 +155,7 @@ pub fn get(request: Get, fee: U256, callback: Option) -> Result DynBytes { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -174,7 +174,7 @@ pub fn id() -> u32 { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -193,11 +193,11 @@ pub fn poll_status(message: MessageId) -> MessageStatus { pub fn post(request: Post, fee: U256, callback: Option) -> Result { match callback { None => { - let mut precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Ismp, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.post(request, fee) }, Some(callback) => { - let mut precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(IsmpCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.post(request, fee, callback) }, } @@ -211,7 +211,7 @@ pub fn post(request: Post, fee: U256, callback: Option) -> Result Result<(), Error> { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -223,7 +223,7 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } @@ -310,7 +310,7 @@ pub trait OnGetResponse { /// - `response` - The values derived from the state proof. #[ink(message)] #[allow(non_snake_case)] - fn onGetResponse(&mut self, id: MessageId, response: Vec); + fn onGetResponse(&self, id: MessageId, response: Vec); } /// A callback for handling responses to ISMP `Post` requests. @@ -323,7 +323,7 @@ pub trait OnPostResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onPostResponse(&mut self, id: MessageId, response: DynBytes); + fn onPostResponse(&self, id: MessageId, response: DynBytes); } /// Event emitted when a ISMP `Get` request is completed. diff --git a/pop-api-vnext/src/messaging/v0.rs b/pop-api-vnext/src/messaging/v0.rs index a6e011a87..84241a1e1 100644 --- a/pop-api-vnext/src/messaging/v0.rs +++ b/pop-api-vnext/src/messaging/v0.rs @@ -21,7 +21,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&mut self, message: MessageId) -> DynBytes; + fn getResponse(&self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -36,7 +36,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&mut self, message: MessageId) -> MessageStatus; + fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -45,7 +45,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&mut self, message: MessageId) -> Result<(), Error>; + fn remove(&self, message: MessageId) -> Result<(), Error>; /// Remove a batch of completed or timed-out messages. /// @@ -55,7 +55,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&mut self, messages: Vec) -> Result<(), Error>; + fn removeMany(&self, messages: Vec) -> Result<(), Error>; } /// A message callback. @@ -144,7 +144,7 @@ pub struct Removed { /// - `message` - The message identifier. #[inline] pub fn get_response(message: MessageId) -> DynBytes { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -163,7 +163,7 @@ pub fn id() -> u32 { /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -175,7 +175,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) -> Result<(), Error> { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -187,6 +187,6 @@ pub fn remove(message: MessageId) -> Result<(), Error> { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) -> Result<(), Error> { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index bd19b61d2..757ad9534 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -26,7 +26,7 @@ pub trait Xcm { /// # Returns /// A SCALE-encoded dispatch result. #[ink(message)] - fn execute(&mut self, message: DynBytes, weight: Weight) -> DynBytes; + fn execute(&self, message: DynBytes, weight: Weight) -> DynBytes; /// Initiate a new XCM query. /// @@ -40,7 +40,7 @@ pub trait Xcm { /// A unique query identifier. #[ink(message)] #[allow(non_snake_case)] - fn newQuery(&mut self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId); + fn newQuery(&self, responder: DynBytes, timeout: BlockNumber) -> (MessageId, QueryId); /// Send an XCM from a given origin. /// @@ -51,7 +51,7 @@ pub trait Xcm { /// # Returns /// A SCALE-encoded dispatch result. #[ink(message)] - fn send(&mut self, destination: DynBytes, message: DynBytes) -> DynBytes; + fn send(&self, destination: DynBytes, message: DynBytes) -> DynBytes; } /// The XCM precompile offers a streamlined interface for messaging using Polkadot's Cross-Consensus @@ -72,7 +72,7 @@ pub trait XcmCallback { #[ink(message)] #[allow(non_snake_case)] fn newQuery( - &mut self, + &self, responder: DynBytes, timeout: BlockNumber, callback: Callback, @@ -95,7 +95,7 @@ pub trait Messaging { /// - `message` - The message identifier. #[ink(message)] #[allow(non_snake_case)] - fn getResponse(&mut self, message: MessageId) -> DynBytes; + fn getResponse(&self, message: MessageId) -> DynBytes; /// The identifier of this chain. /// @@ -110,7 +110,7 @@ pub trait Messaging { /// - `message` - The message identifier to poll. #[ink(message)] #[allow(non_snake_case)] - fn pollStatus(&mut self, message: MessageId) -> MessageStatus; + fn pollStatus(&self, message: MessageId) -> MessageStatus; /// Remove a completed or timed-out message. /// @@ -119,7 +119,7 @@ pub trait Messaging { /// # Parameters /// - `message` - The identifier of the message to remove. #[ink(message)] - fn remove(&mut self, message: MessageId); + fn remove(&self, message: MessageId); /// Remove a batch of completed or timed-out messages. /// @@ -129,7 +129,7 @@ pub trait Messaging { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[ink(message)] #[allow(non_snake_case)] - fn removeMany(&mut self, messages: Vec); + fn removeMany(&self, messages: Vec); } /// Execute an XCM message from a local, signed, origin. @@ -142,7 +142,7 @@ pub trait Messaging { /// A SCALE-encoded dispatch result. #[inline] pub fn execute(message: VersionedXcm, weight: Weight) -> Result<(), Error> { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); let result = precompile.execute(DynBytes(message.encode()), weight); Result::<(), ()>::decode(&mut result.0.as_slice()) .map_err(|_| Error::DecodingFailed)? @@ -158,7 +158,7 @@ pub fn execute(message: VersionedXcm, weight: Weight) -> Res /// - `message` - The message identifier. #[inline] pub fn get_response(message: MessageId) -> DynBytes { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.getResponse(message) } @@ -191,11 +191,11 @@ pub fn new_query( let responder = DynBytes(responder.encode()); match callback { None => { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout) }, Some(callback) => { - let mut precompile: contract_ref!(XcmCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(XcmCallback, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.newQuery(responder, timeout, callback) }, } @@ -207,7 +207,7 @@ pub fn new_query( /// - `message` - The message identifier to poll. #[inline] pub fn poll_status(message: MessageId) -> MessageStatus { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.pollStatus(message) } @@ -219,7 +219,7 @@ pub fn poll_status(message: MessageId) -> MessageStatus { /// - `message` - The identifier of the message to remove. #[inline] pub fn remove(message: MessageId) { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.remove(message) } @@ -231,7 +231,7 @@ pub fn remove(message: MessageId) { /// - `messages` - A set of identifiers of messages to remove (bounded by `MaxRemovals`). #[inline] pub fn remove_many(messages: Vec) { - let mut precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Messaging, Pop, Sol) = PRECOMPILE_ADDRESS.into(); precompile.removeMany(messages) } @@ -248,7 +248,7 @@ pub fn send( destination: VersionedLocation, message: VersionedXcm, ) -> Result<(), Error> { - let mut precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); + let precompile: contract_ref!(Xcm, Pop, Sol) = PRECOMPILE_ADDRESS.into(); let result = precompile.send(DynBytes(destination.encode()), DynBytes(message.encode())); Result::<(), ()>::decode(&mut result.0.as_slice()) .map_err(|_| Error::DecodingFailed)? @@ -265,7 +265,7 @@ pub trait OnQueryResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onQueryResponse(&mut self, id: MessageId, response: DynBytes); + fn onQueryResponse(&self, id: MessageId, response: DynBytes); } /// Event emitted when a XCM query is completed. From 77c763a636b88565fac91c5d8221001854e3fd96 Mon Sep 17 00:00:00 2001 From: Daanvdplas Date: Tue, 26 Aug 2025 08:11:33 +0200 Subject: [PATCH 284/284] refactor: add mut --- .../integration-tests/contracts/messaging/lib.rs | 6 +++--- pop-api-vnext/src/fungibles/erc20/v0.rs | 12 ++++++------ pop-api-vnext/src/messaging/ismp/v0.rs | 4 ++-- pop-api-vnext/src/messaging/xcm/v0.rs | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs index 6bd8b212b..830629ac6 100644 --- a/pop-api-vnext/integration-tests/contracts/messaging/lib.rs +++ b/pop-api-vnext/integration-tests/contracts/messaging/lib.rs @@ -101,7 +101,7 @@ pub mod messaging { impl OnGetResponse for Messaging { #[ink(message)] - fn onGetResponse(&self, id: MessageId, response: Vec) { + fn onGetResponse(&mut self, id: MessageId, response: Vec) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -112,7 +112,7 @@ pub mod messaging { impl OnPostResponse for Messaging { #[ink(message)] - fn onPostResponse(&self, id: MessageId, response: DynBytes) { + fn onPostResponse(&mut self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. @@ -156,7 +156,7 @@ pub mod messaging { impl OnQueryResponse for Messaging { #[ink(message)] - fn onQueryResponse(&self, id: MessageId, response: DynBytes) { + fn onQueryResponse(&mut self, id: MessageId, response: DynBytes) { // Adding state requires storage deposit limit to be defined on callback. Deposit is // moved from caller to contract and placed on hold. Deposit is claimed by anyone that // removes state, so adequate controls should be implemented by contract as desired. diff --git a/pop-api-vnext/src/fungibles/erc20/v0.rs b/pop-api-vnext/src/fungibles/erc20/v0.rs index eb48c8347..49f72c511 100644 --- a/pop-api-vnext/src/fungibles/erc20/v0.rs +++ b/pop-api-vnext/src/fungibles/erc20/v0.rs @@ -29,7 +29,7 @@ pub trait Erc20 { /// /// Emits a [`Transfer`] event. #[ink(message)] - fn transfer(&self, to: Address, value: U256) -> Result; + fn transfer(&mut self, to: Address, value: U256) -> Result; /// Returns the remaining number of tokens that `spender` will be allowed to spend /// on behalf of `owner` through [`transfer_from`]. This is zero by default. @@ -45,7 +45,7 @@ pub trait Erc20 { /// /// Emits an [`Approval`] event. #[ink(message)] - fn approve(&self, spender: Address, value: U256) -> Result; + fn approve(&mut self, spender: Address, value: U256) -> Result; /// Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. /// `value` is then deducted from the caller's allowance. @@ -55,7 +55,7 @@ pub trait Erc20 { /// Emits a [`Transfer`] event. #[ink(message)] #[allow(non_snake_case)] - fn transferFrom(&self, from: Address, to: Address, value: U256) -> Result; + fn transferFrom(&mut self, from: Address, to: Address, value: U256) -> Result; } /// Returns the value of tokens in existence. @@ -85,7 +85,7 @@ pub fn transfer(token: TokenId, to: Address, value: U256) -> Result ensure!(value != U256::zero(), ERC20InsufficientValue); let address = prefixed_address(PRECOMPILE, token); - let precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); + let mut precompile: contract_ref!(Erc20, Pop, Sol) = address.into(); precompile.transfer(to, value) } @@ -111,7 +111,7 @@ pub fn approve(token: TokenId, spender: Address, value: U256) -> Result); + fn onGetResponse(&mut self, id: MessageId, response: Vec); } /// A callback for handling responses to ISMP `Post` requests. @@ -323,7 +323,7 @@ pub trait OnPostResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onPostResponse(&self, id: MessageId, response: DynBytes); + fn onPostResponse(&mut self, id: MessageId, response: DynBytes); } /// Event emitted when a ISMP `Get` request is completed. diff --git a/pop-api-vnext/src/messaging/xcm/v0.rs b/pop-api-vnext/src/messaging/xcm/v0.rs index 757ad9534..bc861d551 100644 --- a/pop-api-vnext/src/messaging/xcm/v0.rs +++ b/pop-api-vnext/src/messaging/xcm/v0.rs @@ -265,7 +265,7 @@ pub trait OnQueryResponse { /// - `response` - The response message. #[ink(message)] #[allow(non_snake_case)] - fn onQueryResponse(&self, id: MessageId, response: DynBytes); + fn onQueryResponse(&mut self, id: MessageId, response: DynBytes); } /// Event emitted when a XCM query is completed.