difftreelog
Merge pull request #932 from UniqueNetwork/fix/support_for_old_versions_in_collection_by_id_method
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3712,6 +3712,12 @@
checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0"
[[package]]
+name = "hex-literal"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
+
+[[package]]
name = "hkdf"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4282,7 +4288,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.3.4",
"kusama-runtime-constants",
"log",
"pallet-authority-discovery",
@@ -5730,7 +5736,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.4.1",
"impl-trait-for-tuples",
"log",
"num_enum",
@@ -8446,7 +8452,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
- "hex-literal",
+ "hex-literal 0.3.4",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
@@ -8512,7 +8518,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.3.4",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -8714,7 +8720,7 @@
"frame-support",
"frame-system-rpc-runtime-api",
"futures",
- "hex-literal",
+ "hex-literal 0.3.4",
"kusama-runtime",
"kvdb",
"kvdb-rocksdb",
@@ -9169,7 +9175,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.4.1",
"impl-trait-for-tuples",
"log",
"num_enum",
@@ -9637,7 +9643,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.3.4",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -13327,6 +13333,7 @@
"anyhow",
"app-promotion-rpc",
"frame-benchmarking",
+ "hex-literal 0.4.1",
"jsonrpsee",
"opal-runtime",
"pallet-evm",
@@ -13537,7 +13544,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.4.1",
"impl-trait-for-tuples",
"log",
"num_enum",
@@ -14437,7 +14444,7 @@
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
- "hex-literal",
+ "hex-literal 0.3.4",
"log",
"pallet-authority-discovery",
"pallet-authorship",
Cargo.tomldiffbeforeafterboth1[workspace]2default-members = ['client/*', 'node/*', 'runtime/opal']3members = [4 'client/*',5 'crates/*',6 'node/*',7 'pallets/*',8 'primitives/*',9 'runtime/opal',10 'runtime/quartz',11 'runtime/tests',12 'runtime/unique',13]14package.version = "0.9.41"15resolver = "2"1617[profile.release]18# Runtime requires unwinding19panic = "unwind"2021[profile.production]22inherits = "release"23lto = true24codegen-units = 125opt-level = 32627[workspace.dependencies]28# Unique29app-promotion-rpc = { path = "primitives/app_promotion_rpc", default-features = false }30evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.1", default-features = false }31pallet-app-promotion = { path = "pallets/app-promotion", default-features = false }32pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.41" }33pallet-collator-selection = { default-features = false, path = "pallets/collator-selection" }34pallet-common = { default-features = false, path = "pallets/common" }35pallet-configuration = { default-features = false, path = "pallets/configuration" }36pallet-evm-coder-substrate = { default-features = false, path = "pallets/evm-coder-substrate" }37pallet-evm-contract-helpers = { path = "pallets/evm-contract-helpers", default-features = false }38pallet-evm-migration = { path = "pallets/evm-migration", default-features = false }39pallet-evm-transaction-payment = { path = "pallets/evm-transaction-payment", default-features = false }40pallet-foreign-assets = { default-features = false, path = "pallets/foreign-assets" }41pallet-fungible = { default-features = false, path = "pallets/fungible" }42pallet-identity = { default-features = false, path = "pallets/identity" }43pallet-inflation = { path = "pallets/inflation", default-features = false }44pallet-maintenance = { default-features = false, path = "pallets/maintenance" }45pallet-nonfungible = { default-features = false, path = "pallets/nonfungible" }46pallet-refungible = { default-features = false, path = "pallets/refungible" }47pallet-structure = { default-features = false, path = "pallets/structure" }48pallet-test-utils = { default-features = false, path = "test-pallets/utils" }49pallet-unique = { path = "pallets/unique", default-features = false }50pallet-unique-scheduler-v2 = { path = "pallets/scheduler-v2", default-features = false }51precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }52struct-versioning = { path = "crates/struct-versioning" }53uc-rpc = { path = "client/rpc" }54unique-rpc = { path = "node/rpc" }55up-common = { path = "primitives/common", default-features = false }56up-data-structs = { path = "primitives/data-structs", default-features = false }57up-pov-estimate-rpc = { path = "primitives/pov-estimate-rpc", default-features = false }58up-rpc = { path = "primitives/rpc", default-features = false }59up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.41" }6061# Unique: Runtimes62opal-runtime = { path = "runtime/opal" }63quartz-runtime = { path = "runtime/quartz" }64unique-runtime = { path = "runtime/unique" }6566# Frontier (Unique patches over the Parity version)67fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }68fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }69fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }70fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }71fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }72fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }73fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }74fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }75fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }76pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }77pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }78pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }79pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }8081# Parity82codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.2.2" }83cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }84cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }85cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }86cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }87cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }88cumulus-pallet-aura-ext = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }89cumulus-pallet-dmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }90cumulus-pallet-parachain-system = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }91cumulus-pallet-xcm = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }92cumulus-pallet-xcmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }93cumulus-primitives-core = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }94cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }95cumulus-primitives-timestamp = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }96cumulus-primitives-utility = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }97cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }98cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }99cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }100frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }101frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }102frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }103frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }104pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }105pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }106pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }107pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }108pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }109pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }110pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }111pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }112pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }113pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }114pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }115pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }116parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }117polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }118polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }119polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }120polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }121sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }122sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }123sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }124sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }125sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }126sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }127sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }128sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }129sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }130sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }131sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }132sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }133sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }134sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }135sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }136sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }137sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }138scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }139sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }140sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }141sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }142sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }143sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }144sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }145sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }146sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }147sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }148sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }149sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }150sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }151sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }152sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }153sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }154sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }155sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }156sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }157sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }158sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }159sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }160substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }161substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }162xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }163xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }164xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }165166# Parity: Build utils167substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }168substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }169170# Parity: Benchmarking171frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }172frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }173frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }174175# Parity: Try Runtime176frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }177try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }178179# ORML180orml-tokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }181orml-traits = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }182orml-vesting = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }183orml-xtokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }184orml-xcm-support = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }185186# Other187derivative = { version = "2.2.0", features = ["use_core"] }188ethereum = { version = "0.14.0", default-features = false }189evm-core = { default-features = false, version = "0.37.0" }190hex-literal = "0.3.4"191impl-trait-for-tuples = "0.2.2"192jsonrpsee = { version = "0.16.2", features = ["macros", "server"] }193log = { version = "0.4.16", default-features = false }194num_enum = { version = "0.5.3", default-features = false }195primitive-types = { version = "0.12.1", default-features = false }196serde = { default-features = false, features = ['derive'], version = "1.0.136" }197smallvec = "1.6.1"198199[workspace.metadata.deppatcher.originals.workspace.dependencies]200orml-tokens = { git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }201orml-traits = { git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }202orml-vesting = { git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }203orml-xtokens = { git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }204cumulus-client-cli = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }205cumulus-client-consensus-aura = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }206cumulus-client-consensus-common = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }207cumulus-client-network = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }208cumulus-client-service = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }209cumulus-pallet-aura-ext = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }210cumulus-pallet-dmp-queue = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }211cumulus-pallet-parachain-system = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }212cumulus-pallet-xcm = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }213cumulus-pallet-xcmp-queue = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }214cumulus-primitives-core = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }215cumulus-primitives-parachain-inherent = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }216cumulus-primitives-timestamp = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }217cumulus-primitives-utility = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }218cumulus-relay-chain-inprocess-interface = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }219cumulus-relay-chain-interface = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }220cumulus-relay-chain-minimal-node = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }221parachain-info = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }222pallet-template-transaction-payment = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }223up-sponsorship = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }224frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }225frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }226frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }227frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }228pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }229pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }230pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }231pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }232pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }233pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }234pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }235pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }236pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }237pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }238pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }239sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }240sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }241sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }242sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }243sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }244sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }245sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }246sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }247sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }248sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }249sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }250sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }251sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }252sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }253sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }254sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }255sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }256sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }257sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }258sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }259sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }260sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }261sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }262sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }263sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }264sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }265sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }266sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }267sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }268sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }269sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }270sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }271sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }272sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }273sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }274sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }275sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }276substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }277substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }278substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }279substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }280frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }281frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }282frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }283frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }284try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }285orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }286pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }287polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }288polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }289polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }290polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }291xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }292xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }293xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }294fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }295fc-db = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }296fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }297fc-rpc = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }298fc-rpc-core = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }299fp-evm = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }300fp-rpc = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }301fp-self-contained = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }302fp-storage = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }303pallet-base-fee = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }304pallet-ethereum = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }305pallet-evm = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }306pallet-evm-precompile-simple = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }307client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -40,6 +40,9 @@
quartz-runtime = { workspace = true, optional = true }
unique-runtime = { workspace = true, optional = true }
+[dev-dependencies]
+hex-literal = { workspace = true }
+
[features]
default = ['opal-runtime']
all-runtimes = [
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -450,16 +450,10 @@
pass_method!(
collection_by_id(collection: CollectionId) -> Option<RpcCollection<AccountId>>, unique_api;
changed_in 3, collection_by_id_before_version_3(collection) => |value| {
- use codec::IoReader;
- use up_data_structs::RpcCollectionVersion1;
- use up_data_structs::CollectionVersion1;
use sp_runtime::DispatchError;
if let Some(bytes) = value {
- let mut reader = IoReader(bytes.as_slice());
- Ok(Some(RpcCollection::<AccountId>::decode(&mut reader)
- .or_else(|_| RpcCollectionVersion1::<AccountId>::decode(&mut reader).map(|col| col.into()))
- .or_else(|_| CollectionVersion1::<AccountId>::decode(&mut reader).map(|col| col.into()))
+ Ok(Some(detect_type_and_decode_collection(bytes.as_slice())
.map_err(|_| DispatchError::Other("API Error: UniqueApi_collection_by_id"))?))
} else {
Ok(None)
@@ -506,3 +500,73 @@
fn string_keys_to_bytes_keys(keys: Option<Vec<String>>) -> Option<Vec<Vec<u8>>> {
keys.map(|keys| keys.into_iter().map(|key| key.into_bytes()).collect())
}
+
+fn decode_collection_from_bytes<T: codec::Decode>(
+ bytes: &[u8],
+) -> core::result::Result<T, codec::Error> {
+ let mut reader = codec::IoReader(bytes);
+ T::decode(&mut reader)
+}
+
+fn detect_type_and_decode_collection<AccountId: Decode>(
+ bytes: &[u8],
+) -> core::result::Result<RpcCollection<AccountId>, codec::Error> {
+ use up_data_structs::{CollectionVersion1, RpcCollectionVersion1};
+
+ decode_collection_from_bytes::<RpcCollection<AccountId>>(bytes)
+ .or_else(|_| {
+ decode_collection_from_bytes::<RpcCollectionVersion1<AccountId>>(bytes)
+ .map(|col| col.into())
+ })
+ .or_else(|_| {
+ decode_collection_from_bytes::<CollectionVersion1<AccountId>>(bytes)
+ .map(|col| col.into())
+ })
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use codec::IoReader;
+ use hex_literal::hex;
+ use up_data_structs::{CollectionVersion1, RawEncoded};
+
+ const ENCODED_COLLECTION_V1: [u8; 180] = hex!("aab94a1ee784bc17f68d76d4d48d736916ca6ff6315b8c1fa1175726c8345a390000285000720069006d00610020004c00690076006500d04500730065006d00700069006f00200064006900200063007200650061007a0069006f006e006500200064006900200075006e00610020006e0075006f0076006100200063006f006c006c0065007a0069006f006e00650020006400690020004e004600540021000c464e5400000000000000000000000000000000");
+ const ENCODED_RPC_COLLECTION_V2: [u8; 618] = hex!("d00dcc24bf66750d3809aa26884b930ec8a3094d6f6f19fdc62020b2fbec013400604d0069006e007400460065007300740020002d002000460075006e006e007900200061006e0069006d0061006c0073008c430072006f00730073006f0076006500720020006200650074007700650065006e00200061006e0069006d0061006c00730020002d00200066006f0072002000660075006e00104d46464100000000000000000000010001000100000004385f6f6c645f636f6e7374446174610001000c5c5f6f6c645f636f6e73744f6e436861696e536368656d6139047b226e6573746564223a7b226f6e436861696e4d65746144617461223a7b226e6573746564223a7b224e46544d657461223a7b226669656c6473223a7b22697066734a736f6e223a7b226964223a312c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c2248656164223a7b226964223a322c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c22426f6479223a7b226964223a332c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d2c225461696c223a7b226964223a342c2272756c65223a227265717569726564222c2274797065223a22737472696e67227d7d7d7d7d7d7d485f6f6c645f736368656d6156657273696f6e18556e69717565685f6f6c645f7661726961626c654f6e436861696e536368656d6111017b22636f6c6c656374696f6e436f766572223a22516d53557a7139354c357a556777795a584d3731576a3762786b36557048515468633162536965347766706e5435227d000000");
+
+ #[test]
+ fn decoding_collection_v1() {
+ decode_collection_from_bytes::<CollectionVersion1<[u8; 32]>>(
+ ENCODED_COLLECTION_V1.as_slice(),
+ )
+ .unwrap();
+ }
+
+ #[test]
+ fn detecting_and_decoding_collection_v1() {
+ detect_type_and_decode_collection::<[u8; 32]>(ENCODED_COLLECTION_V1.as_slice()).unwrap();
+ }
+
+ #[test]
+ fn decoding_rpc_collection_v2() {
+ decode_collection_from_bytes::<RpcCollection<[u8; 32]>>(
+ ENCODED_RPC_COLLECTION_V2.as_slice(),
+ )
+ .unwrap();
+ }
+
+ #[test]
+ fn detecting_decoding_rpc_collection_v2() {
+ detect_type_and_decode_collection::<[u8; 32]>(ENCODED_RPC_COLLECTION_V2.as_slice())
+ .unwrap();
+ }
+
+ #[test]
+ fn rpc_collection_supports_decoding_through_vec() {
+ let mut bytes = IoReader(ENCODED_RPC_COLLECTION_V2.as_slice());
+ let vec = RawEncoded::decode(&mut bytes).unwrap();
+ println!("{:?}", vec.len());
+ let mut bytes = IoReader(vec.as_slice());
+ RpcCollection::<[u8; 32]>::decode(&mut bytes).unwrap();
+ }
+}
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -1437,243 +1437,3 @@
pub type CollectionProperties = Properties<MAX_COLLECTION_PROPERTIES_SIZE>;
pub type TokenProperties = Properties<MAX_TOKEN_PROPERTIES_SIZE>;
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use codec::IoReader;
-
- #[test]
- fn rpc_collection_supports_decoding_old_versions() {
- let encoded_rpc_collection: [u8; 1013] = [
- 0, 1, 250, 241, 137, 120, 188, 29, 94, 210, 193, 237, 186, 22, 203, 241, 52, 248, 167,
- 235, 241, 211, 236, 28, 138, 156, 59, 160, 156, 105, 39, 247, 207, 101, 0, 0, 48, 65,
- 0, 73, 0, 32, 0, 67, 0, 114, 0, 101, 0, 97, 0, 116, 0, 105, 0, 111, 0, 110, 0, 115, 0,
- 252, 65, 0, 32, 0, 112, 0, 105, 0, 101, 0, 99, 0, 101, 0, 32, 0, 111, 0, 102, 0, 32, 0,
- 97, 0, 32, 0, 109, 0, 97, 0, 99, 0, 104, 0, 105, 0, 110, 0, 101, 0, 32, 0, 109, 0, 105,
- 0, 110, 0, 100, 0, 46, 0, 32, 0, 69, 0, 118, 0, 101, 0, 114, 0, 121, 0, 32, 0, 78, 0,
- 70, 0, 84, 0, 32, 0, 105, 0, 115, 0, 32, 0, 109, 0, 97, 0, 100, 0, 101, 0, 32, 0, 101,
- 0, 120, 0, 99, 0, 108, 0, 117, 0, 115, 0, 105, 0, 118, 0, 101, 0, 108, 0, 121, 0, 32,
- 0, 98, 0, 121, 0, 32, 0, 65, 0, 73, 0, 46, 0, 12, 65, 73, 67, 0, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 1, 123, 34, 99, 111, 108, 108, 101, 99, 116, 105, 111, 110, 67, 111,
- 118, 101, 114, 34, 58, 34, 81, 109, 98, 52, 104, 122, 76, 101, 51, 49, 102, 98, 71, 74,
- 77, 89, 68, 82, 88, 84, 115, 107, 56, 49, 76, 103, 76, 97, 88, 76, 69, 112, 121, 97,
- 122, 102, 66, 85, 103, 111, 110, 118, 49, 118, 84, 85, 34, 125, 125, 11, 123, 34, 110,
- 101, 115, 116, 101, 100, 34, 58, 123, 34, 111, 110, 67, 104, 97, 105, 110, 77, 101,
- 116, 97, 68, 97, 116, 97, 34, 58, 123, 34, 110, 101, 115, 116, 101, 100, 34, 58, 123,
- 34, 78, 70, 84, 77, 101, 116, 97, 34, 58, 123, 34, 102, 105, 101, 108, 100, 115, 34,
- 58, 123, 34, 105, 112, 102, 115, 74, 115, 111, 110, 34, 58, 123, 34, 105, 100, 34, 58,
- 49, 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34,
- 44, 34, 116, 121, 112, 101, 34, 58, 34, 115, 116, 114, 105, 110, 103, 34, 125, 44, 34,
- 67, 111, 108, 111, 114, 34, 58, 123, 34, 105, 100, 34, 58, 50, 44, 34, 114, 117, 108,
- 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44, 34, 116, 121, 112,
- 101, 34, 58, 34, 67, 111, 108, 111, 114, 34, 125, 44, 34, 73, 110, 116, 101, 110, 115,
- 105, 111, 110, 115, 34, 58, 123, 34, 105, 100, 34, 58, 51, 44, 34, 114, 117, 108, 101,
- 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44, 34, 116, 121, 112, 101, 34,
- 58, 34, 73, 110, 116, 101, 110, 115, 105, 111, 110, 115, 34, 125, 44, 34, 77, 111, 111,
- 100, 34, 58, 123, 34, 105, 100, 34, 58, 52, 44, 34, 114, 117, 108, 101, 34, 58, 34,
- 114, 101, 113, 117, 105, 114, 101, 100, 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 77,
- 111, 111, 100, 34, 125, 125, 125, 44, 34, 67, 111, 108, 111, 114, 34, 58, 123, 34, 111,
- 112, 116, 105, 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34,
- 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 67, 111, 108, 111, 114, 101, 100, 92, 34,
- 125, 34, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92,
- 34, 58, 92, 34, 66, 108, 97, 99, 107, 38, 87, 104, 105, 116, 101, 92, 34, 125, 34, 125,
- 44, 34, 118, 97, 108, 117, 101, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34,
- 58, 48, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 49, 125, 125, 44, 34, 73, 110,
- 116, 101, 110, 115, 105, 111, 110, 115, 34, 58, 123, 34, 111, 112, 116, 105, 111, 110,
- 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92, 34, 101, 110,
- 92, 34, 58, 92, 34, 101, 118, 105, 108, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108,
- 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 103, 111, 111, 100, 92,
- 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 34, 123, 92, 34, 101, 110,
- 92, 34, 58, 92, 34, 110, 101, 117, 116, 114, 97, 108, 92, 34, 125, 34, 125, 44, 34,
- 118, 97, 108, 117, 101, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 48,
- 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 49, 44, 34, 102, 105, 101, 108, 100, 51,
- 34, 58, 50, 125, 125, 44, 34, 77, 111, 111, 100, 34, 58, 123, 34, 111, 112, 116, 105,
- 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92, 34,
- 101, 110, 92, 34, 58, 92, 34, 65, 98, 115, 116, 114, 97, 99, 116, 92, 34, 125, 34, 44,
- 34, 102, 105, 101, 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34,
- 85, 110, 99, 97, 110, 110, 101, 121, 32, 118, 97, 108, 108, 101, 121, 92, 34, 125, 34,
- 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92,
- 34, 83, 117, 114, 114, 101, 97, 108, 105, 115, 116, 92, 34, 125, 34, 125, 44, 34, 118,
- 97, 108, 117, 101, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 48, 44,
- 34, 102, 105, 101, 108, 100, 50, 34, 58, 49, 44, 34, 102, 105, 101, 108, 100, 51, 34,
- 58, 50, 125, 125, 125, 125, 125, 125, 0,
- ];
- let mut bytes = IoReader(encoded_rpc_collection.as_slice());
- CollectionVersion1::<[u8; 34]>::decode(&mut bytes).unwrap();
- }
-
- #[test]
- fn rpc_collection_supports_decoding_new_versions() {
- let encoded_rpc_collection: [u8; 1576] = [
- 0, 1, 238, 236, 179, 149, 150, 47, 71, 194, 69, 174, 250, 116, 251, 148, 90, 15, 56,
- 220, 91, 79, 49, 79, 45, 197, 171, 98, 14, 171, 80, 23, 58, 92, 0, 96, 77, 0, 105, 0,
- 110, 0, 116, 0, 70, 0, 101, 0, 115, 0, 116, 0, 32, 0, 83, 0, 121, 0, 109, 0, 109, 0,
- 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 66, 0, 114, 0, 101, 0, 97, 0, 99, 0, 104, 0,
- 113, 3, 83, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 104, 0,
- 97, 0, 115, 0, 32, 0, 115, 0, 111, 0, 109, 0, 101, 0, 116, 0, 104, 0, 105, 0, 110, 0,
- 103, 0, 32, 0, 105, 0, 110, 0, 116, 0, 111, 0, 120, 0, 105, 0, 99, 0, 97, 0, 116, 0,
- 105, 0, 110, 0, 103, 0, 32, 0, 116, 0, 104, 0, 97, 0, 116, 0, 32, 0, 100, 0, 114, 0,
- 97, 0, 119, 0, 115, 0, 32, 0, 121, 0, 111, 0, 117, 0, 32, 0, 105, 0, 110, 0, 46, 0, 10,
- 0, 73, 0, 110, 0, 115, 0, 112, 0, 105, 0, 114, 0, 101, 0, 100, 0, 32, 0, 98, 0, 121, 0,
- 32, 0, 116, 0, 104, 0, 101, 0, 32, 0, 112, 0, 101, 0, 114, 0, 102, 0, 101, 0, 99, 0,
- 116, 0, 105, 0, 111, 0, 110, 0, 32, 0, 111, 0, 102, 0, 32, 0, 116, 0, 104, 0, 101, 0,
- 32, 0, 115, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 44, 0, 32, 0,
- 73, 0, 32, 0, 104, 0, 97, 0, 118, 0, 101, 0, 32, 0, 99, 0, 114, 0, 101, 0, 97, 0, 116,
- 0, 101, 0, 100, 0, 32, 0, 115, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 105,
- 0, 99, 0, 97, 0, 108, 0, 32, 0, 105, 0, 109, 0, 97, 0, 103, 0, 101, 0, 115, 0, 32, 0,
- 111, 0, 102, 0, 32, 0, 115, 0, 101, 0, 118, 0, 101, 0, 114, 0, 97, 0, 108, 0, 32, 0,
- 118, 0, 101, 0, 114, 0, 116, 0, 105, 0, 99, 0, 101, 0, 115, 0, 44, 0, 32, 0, 98, 0,
- 117, 0, 116, 0, 32, 0, 115, 0, 111, 0, 109, 0, 101, 0, 32, 0, 115, 0, 121, 0, 109, 0,
- 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 98, 0, 114, 0, 101, 0, 97, 0, 99, 0,
- 104, 0, 101, 0, 115, 0, 32, 0, 97, 0, 110, 0, 100, 0, 32, 0, 99, 0, 111, 0, 108, 0,
- 111, 0, 114, 0, 115, 0, 32, 0, 116, 0, 104, 0, 97, 0, 116, 0, 32, 0, 109, 0, 97, 0,
- 107, 0, 101, 0, 32, 0, 101, 0, 97, 0, 99, 0, 104, 0, 32, 0, 105, 0, 109, 0, 97, 0, 103,
- 0, 101, 0, 32, 0, 85, 0, 78, 0, 73, 0, 81, 0, 85, 0, 69, 0, 46, 0, 12, 83, 121, 66, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 4, 56, 95, 111, 108, 100, 95, 99,
- 111, 110, 115, 116, 68, 97, 116, 97, 0, 1, 0, 12, 92, 95, 111, 108, 100, 95, 99, 111,
- 110, 115, 116, 79, 110, 67, 104, 97, 105, 110, 83, 99, 104, 101, 109, 97, 97, 13, 123,
- 34, 110, 101, 115, 116, 101, 100, 34, 58, 123, 34, 111, 110, 67, 104, 97, 105, 110, 77,
- 101, 116, 97, 68, 97, 116, 97, 34, 58, 123, 34, 110, 101, 115, 116, 101, 100, 34, 58,
- 123, 34, 78, 70, 84, 77, 101, 116, 97, 34, 58, 123, 34, 102, 105, 101, 108, 100, 115,
- 34, 58, 123, 34, 105, 112, 102, 115, 74, 115, 111, 110, 34, 58, 123, 34, 105, 100, 34,
- 58, 49, 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100,
- 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 115, 116, 114, 105, 110, 103, 34, 125, 44,
- 34, 67, 111, 108, 111, 114, 34, 58, 123, 34, 105, 100, 34, 58, 50, 44, 34, 114, 117,
- 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44, 34, 116, 121,
- 112, 101, 34, 58, 34, 67, 111, 108, 111, 114, 34, 125, 44, 34, 83, 121, 109, 109, 101,
- 116, 114, 121, 32, 66, 114, 101, 97, 99, 104, 34, 58, 123, 34, 105, 100, 34, 58, 51,
- 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44,
- 34, 116, 121, 112, 101, 34, 58, 34, 83, 121, 109, 109, 101, 116, 114, 121, 32, 66, 114,
- 101, 97, 99, 104, 34, 125, 44, 34, 86, 101, 114, 116, 105, 99, 101, 34, 58, 123, 34,
- 105, 100, 34, 58, 52, 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105,
- 114, 101, 100, 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 86, 101, 114, 116, 105, 99,
- 101, 34, 125, 125, 125, 44, 34, 67, 111, 108, 111, 114, 34, 58, 123, 34, 111, 112, 116,
- 105, 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92,
- 34, 101, 110, 92, 34, 58, 92, 34, 49, 32, 32, 32, 92, 34, 125, 34, 44, 34, 102, 105,
- 101, 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 50, 32, 92,
- 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 34, 123, 92, 34, 101, 110,
- 92, 34, 58, 92, 34, 51, 92, 34, 125, 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34,
- 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100,
- 50, 34, 58, 49, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 50, 125, 125, 44, 34, 83,
- 121, 109, 109, 101, 116, 114, 121, 32, 66, 114, 101, 97, 99, 104, 34, 58, 123, 34, 111,
- 112, 116, 105, 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34,
- 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 49, 92, 34, 125, 34, 44, 34, 102, 105, 101,
- 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 50, 92, 34, 125,
- 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100,
- 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 49, 125, 125, 44, 34, 86,
- 101, 114, 116, 105, 99, 101, 34, 58, 123, 34, 111, 112, 116, 105, 111, 110, 115, 34,
- 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34,
- 58, 92, 34, 54, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 34, 123,
- 92, 34, 101, 110, 92, 34, 58, 92, 34, 55, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108,
- 100, 51, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 56, 92, 34, 125, 34,
- 44, 34, 102, 105, 101, 108, 100, 52, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92,
- 34, 57, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 53, 34, 58, 34, 123, 92, 34,
- 101, 110, 92, 34, 58, 92, 34, 49, 48, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100,
- 54, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 49, 49, 92, 34, 125, 34, 44,
- 34, 102, 105, 101, 108, 100, 55, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34,
- 49, 50, 92, 34, 125, 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34, 58, 123, 34,
- 102, 105, 101, 108, 100, 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58,
- 49, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 50, 44, 34, 102, 105, 101, 108, 100,
- 52, 34, 58, 51, 44, 34, 102, 105, 101, 108, 100, 53, 34, 58, 52, 44, 34, 102, 105, 101,
- 108, 100, 54, 34, 58, 53, 44, 34, 102, 105, 101, 108, 100, 55, 34, 58, 54, 125, 125,
- 125, 125, 125, 125, 72, 95, 111, 108, 100, 95, 115, 99, 104, 101, 109, 97, 86, 101,
- 114, 115, 105, 111, 110, 24, 85, 110, 105, 113, 117, 101, 104, 95, 111, 108, 100, 95,
- 118, 97, 114, 105, 97, 98, 108, 101, 79, 110, 67, 104, 97, 105, 110, 83, 99, 104, 101,
- 109, 97, 17, 1, 123, 34, 99, 111, 108, 108, 101, 99, 116, 105, 111, 110, 67, 111, 118,
- 101, 114, 34, 58, 34, 81, 109, 82, 67, 77, 84, 109, 57, 118, 81, 107, 76, 89, 86, 65,
- 54, 54, 87, 80, 49, 75, 72, 57, 55, 106, 84, 76, 76, 115, 56, 74, 78, 86, 65, 114, 80,
- 66, 52, 56, 98, 106, 87, 84, 75, 74, 110, 34, 125, 0, 0, 0,
- ];
- let mut bytes = IoReader(encoded_rpc_collection.as_slice());
- RpcCollection::<[u8; 34]>::decode(&mut bytes).unwrap();
- }
-
- #[test]
- fn rpc_collection_supports_decoding_through_vec() {
- let encoded_rpc_collection: [u8; 1576] = [
- 0, 1, 238, 236, 179, 149, 150, 47, 71, 194, 69, 174, 250, 116, 251, 148, 90, 15, 56,
- 220, 91, 79, 49, 79, 45, 197, 171, 98, 14, 171, 80, 23, 58, 92, 0, 96, 77, 0, 105, 0,
- 110, 0, 116, 0, 70, 0, 101, 0, 115, 0, 116, 0, 32, 0, 83, 0, 121, 0, 109, 0, 109, 0,
- 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 66, 0, 114, 0, 101, 0, 97, 0, 99, 0, 104, 0,
- 113, 3, 83, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 104, 0,
- 97, 0, 115, 0, 32, 0, 115, 0, 111, 0, 109, 0, 101, 0, 116, 0, 104, 0, 105, 0, 110, 0,
- 103, 0, 32, 0, 105, 0, 110, 0, 116, 0, 111, 0, 120, 0, 105, 0, 99, 0, 97, 0, 116, 0,
- 105, 0, 110, 0, 103, 0, 32, 0, 116, 0, 104, 0, 97, 0, 116, 0, 32, 0, 100, 0, 114, 0,
- 97, 0, 119, 0, 115, 0, 32, 0, 121, 0, 111, 0, 117, 0, 32, 0, 105, 0, 110, 0, 46, 0, 10,
- 0, 73, 0, 110, 0, 115, 0, 112, 0, 105, 0, 114, 0, 101, 0, 100, 0, 32, 0, 98, 0, 121, 0,
- 32, 0, 116, 0, 104, 0, 101, 0, 32, 0, 112, 0, 101, 0, 114, 0, 102, 0, 101, 0, 99, 0,
- 116, 0, 105, 0, 111, 0, 110, 0, 32, 0, 111, 0, 102, 0, 32, 0, 116, 0, 104, 0, 101, 0,
- 32, 0, 115, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 44, 0, 32, 0,
- 73, 0, 32, 0, 104, 0, 97, 0, 118, 0, 101, 0, 32, 0, 99, 0, 114, 0, 101, 0, 97, 0, 116,
- 0, 101, 0, 100, 0, 32, 0, 115, 0, 121, 0, 109, 0, 109, 0, 101, 0, 116, 0, 114, 0, 105,
- 0, 99, 0, 97, 0, 108, 0, 32, 0, 105, 0, 109, 0, 97, 0, 103, 0, 101, 0, 115, 0, 32, 0,
- 111, 0, 102, 0, 32, 0, 115, 0, 101, 0, 118, 0, 101, 0, 114, 0, 97, 0, 108, 0, 32, 0,
- 118, 0, 101, 0, 114, 0, 116, 0, 105, 0, 99, 0, 101, 0, 115, 0, 44, 0, 32, 0, 98, 0,
- 117, 0, 116, 0, 32, 0, 115, 0, 111, 0, 109, 0, 101, 0, 32, 0, 115, 0, 121, 0, 109, 0,
- 109, 0, 101, 0, 116, 0, 114, 0, 121, 0, 32, 0, 98, 0, 114, 0, 101, 0, 97, 0, 99, 0,
- 104, 0, 101, 0, 115, 0, 32, 0, 97, 0, 110, 0, 100, 0, 32, 0, 99, 0, 111, 0, 108, 0,
- 111, 0, 114, 0, 115, 0, 32, 0, 116, 0, 104, 0, 97, 0, 116, 0, 32, 0, 109, 0, 97, 0,
- 107, 0, 101, 0, 32, 0, 101, 0, 97, 0, 99, 0, 104, 0, 32, 0, 105, 0, 109, 0, 97, 0, 103,
- 0, 101, 0, 32, 0, 85, 0, 78, 0, 73, 0, 81, 0, 85, 0, 69, 0, 46, 0, 12, 83, 121, 66, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 4, 56, 95, 111, 108, 100, 95, 99,
- 111, 110, 115, 116, 68, 97, 116, 97, 0, 1, 0, 12, 92, 95, 111, 108, 100, 95, 99, 111,
- 110, 115, 116, 79, 110, 67, 104, 97, 105, 110, 83, 99, 104, 101, 109, 97, 97, 13, 123,
- 34, 110, 101, 115, 116, 101, 100, 34, 58, 123, 34, 111, 110, 67, 104, 97, 105, 110, 77,
- 101, 116, 97, 68, 97, 116, 97, 34, 58, 123, 34, 110, 101, 115, 116, 101, 100, 34, 58,
- 123, 34, 78, 70, 84, 77, 101, 116, 97, 34, 58, 123, 34, 102, 105, 101, 108, 100, 115,
- 34, 58, 123, 34, 105, 112, 102, 115, 74, 115, 111, 110, 34, 58, 123, 34, 105, 100, 34,
- 58, 49, 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100,
- 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 115, 116, 114, 105, 110, 103, 34, 125, 44,
- 34, 67, 111, 108, 111, 114, 34, 58, 123, 34, 105, 100, 34, 58, 50, 44, 34, 114, 117,
- 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44, 34, 116, 121,
- 112, 101, 34, 58, 34, 67, 111, 108, 111, 114, 34, 125, 44, 34, 83, 121, 109, 109, 101,
- 116, 114, 121, 32, 66, 114, 101, 97, 99, 104, 34, 58, 123, 34, 105, 100, 34, 58, 51,
- 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105, 114, 101, 100, 34, 44,
- 34, 116, 121, 112, 101, 34, 58, 34, 83, 121, 109, 109, 101, 116, 114, 121, 32, 66, 114,
- 101, 97, 99, 104, 34, 125, 44, 34, 86, 101, 114, 116, 105, 99, 101, 34, 58, 123, 34,
- 105, 100, 34, 58, 52, 44, 34, 114, 117, 108, 101, 34, 58, 34, 114, 101, 113, 117, 105,
- 114, 101, 100, 34, 44, 34, 116, 121, 112, 101, 34, 58, 34, 86, 101, 114, 116, 105, 99,
- 101, 34, 125, 125, 125, 44, 34, 67, 111, 108, 111, 114, 34, 58, 123, 34, 111, 112, 116,
- 105, 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92,
- 34, 101, 110, 92, 34, 58, 92, 34, 49, 32, 32, 32, 92, 34, 125, 34, 44, 34, 102, 105,
- 101, 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 50, 32, 92,
- 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 34, 123, 92, 34, 101, 110,
- 92, 34, 58, 92, 34, 51, 92, 34, 125, 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34,
- 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100,
- 50, 34, 58, 49, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 50, 125, 125, 44, 34, 83,
- 121, 109, 109, 101, 116, 114, 121, 32, 66, 114, 101, 97, 99, 104, 34, 58, 123, 34, 111,
- 112, 116, 105, 111, 110, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34,
- 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 49, 92, 34, 125, 34, 44, 34, 102, 105, 101,
- 108, 100, 50, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 50, 92, 34, 125,
- 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34, 58, 123, 34, 102, 105, 101, 108, 100,
- 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 49, 125, 125, 44, 34, 86,
- 101, 114, 116, 105, 99, 101, 34, 58, 123, 34, 111, 112, 116, 105, 111, 110, 115, 34,
- 58, 123, 34, 102, 105, 101, 108, 100, 49, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34,
- 58, 92, 34, 54, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58, 34, 123,
- 92, 34, 101, 110, 92, 34, 58, 92, 34, 55, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108,
- 100, 51, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 56, 92, 34, 125, 34,
- 44, 34, 102, 105, 101, 108, 100, 52, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92,
- 34, 57, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100, 53, 34, 58, 34, 123, 92, 34,
- 101, 110, 92, 34, 58, 92, 34, 49, 48, 92, 34, 125, 34, 44, 34, 102, 105, 101, 108, 100,
- 54, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34, 49, 49, 92, 34, 125, 34, 44,
- 34, 102, 105, 101, 108, 100, 55, 34, 58, 34, 123, 92, 34, 101, 110, 92, 34, 58, 92, 34,
- 49, 50, 92, 34, 125, 34, 125, 44, 34, 118, 97, 108, 117, 101, 115, 34, 58, 123, 34,
- 102, 105, 101, 108, 100, 49, 34, 58, 48, 44, 34, 102, 105, 101, 108, 100, 50, 34, 58,
- 49, 44, 34, 102, 105, 101, 108, 100, 51, 34, 58, 50, 44, 34, 102, 105, 101, 108, 100,
- 52, 34, 58, 51, 44, 34, 102, 105, 101, 108, 100, 53, 34, 58, 52, 44, 34, 102, 105, 101,
- 108, 100, 54, 34, 58, 53, 44, 34, 102, 105, 101, 108, 100, 55, 34, 58, 54, 125, 125,
- 125, 125, 125, 125, 72, 95, 111, 108, 100, 95, 115, 99, 104, 101, 109, 97, 86, 101,
- 114, 115, 105, 111, 110, 24, 85, 110, 105, 113, 117, 101, 104, 95, 111, 108, 100, 95,
- 118, 97, 114, 105, 97, 98, 108, 101, 79, 110, 67, 104, 97, 105, 110, 83, 99, 104, 101,
- 109, 97, 17, 1, 123, 34, 99, 111, 108, 108, 101, 99, 116, 105, 111, 110, 67, 111, 118,
- 101, 114, 34, 58, 34, 81, 109, 82, 67, 77, 84, 109, 57, 118, 81, 107, 76, 89, 86, 65,
- 54, 54, 87, 80, 49, 75, 72, 57, 55, 106, 84, 76, 76, 115, 56, 74, 78, 86, 65, 114, 80,
- 66, 52, 56, 98, 106, 87, 84, 75, 74, 110, 34, 125, 0, 0, 0,
- ];
- let mut bytes = IoReader(encoded_rpc_collection.as_slice());
- let vec = RawEncoded::decode(&mut bytes).unwrap();
- let mut bytes = IoReader(vec.as_slice());
- RpcCollection::<[u8; 34]>::decode(&mut bytes).unwrap();
- }
-}