diff --git a/Cargo.lock b/Cargo.lock index c40e4459a..97040960c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,6 +66,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-runtime-interface", + "sp-storage", ] [[package]] @@ -89,6 +90,7 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-version", + "sp-weights", ] [[package]] @@ -1020,7 +1022,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -1043,7 +1045,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1054,7 +1056,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -1071,7 +1073,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -1110,7 +1112,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "bitflags", "frame-metadata 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1142,7 +1144,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "Inflector", "cfg-expr", @@ -1156,7 +1158,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1168,7 +1170,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro2", "quote", @@ -1178,7 +1180,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "log", @@ -1196,7 +1198,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -1211,7 +1213,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "sp-api", @@ -1220,7 +1222,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "parity-scale-codec", @@ -1814,7 +1816,7 @@ dependencies = [ [[package]] name = "kitchensink-runtime" version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -1854,6 +1856,7 @@ dependencies = [ "pallet-message-queue", "pallet-mmr", "pallet-multisig", + "pallet-nfts", "pallet-nis", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -2232,7 +2235,7 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-system", "parity-scale-codec", @@ -2245,7 +2248,7 @@ dependencies = [ [[package]] name = "node-template-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2435,7 +2438,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2454,7 +2457,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2472,7 +2475,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2487,7 +2490,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -2503,7 +2506,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -2519,7 +2522,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -2534,7 +2537,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2558,7 +2561,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -2578,7 +2581,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2593,7 +2596,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2611,7 +2614,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2630,7 +2633,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2647,7 +2650,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "bitflags", "frame-benchmarking", @@ -2675,7 +2678,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "bitflags", "parity-scale-codec", @@ -2687,7 +2690,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro2", "quote", @@ -2697,7 +2700,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "assert_matches", "frame-benchmarking", @@ -2714,7 +2717,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2732,7 +2735,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -2755,7 +2758,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -2768,7 +2771,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2786,7 +2789,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -2804,7 +2807,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2827,7 +2830,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "enumflags2", "frame-benchmarking", @@ -2843,7 +2846,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2863,7 +2866,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2880,7 +2883,7 @@ dependencies = [ [[package]] name = "pallet-lottery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2894,7 +2897,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2911,7 +2914,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2930,7 +2933,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2947,7 +2950,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2960,10 +2963,26 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-nfts" +version = "4.0.0-dev" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" +dependencies = [ + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -2979,7 +2998,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -2996,7 +3015,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3016,7 +3035,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "sp-api", @@ -3026,7 +3045,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3043,7 +3062,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3066,7 +3085,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3083,7 +3102,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3098,7 +3117,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3112,7 +3131,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3130,7 +3149,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3145,7 +3164,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3163,7 +3182,7 @@ dependencies = [ [[package]] name = "pallet-remark" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3180,7 +3199,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3195,7 +3214,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3212,7 +3231,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3233,7 +3252,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3249,7 +3268,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3263,7 +3282,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -3285,7 +3304,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3296,7 +3315,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3313,7 +3332,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3327,7 +3346,7 @@ dependencies = [ [[package]] name = "pallet-template" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3339,7 +3358,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3357,7 +3376,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3376,7 +3395,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-support", "frame-system", @@ -3392,7 +3411,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -3404,7 +3423,7 @@ dependencies = [ [[package]] name = "pallet-transaction-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3424,7 +3443,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3441,7 +3460,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3456,7 +3475,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3472,7 +3491,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -3487,7 +3506,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "frame-benchmarking", "frame-support", @@ -4009,7 +4028,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "array-bytes", "async-trait", @@ -4381,7 +4400,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "hash-db", "log", @@ -4399,7 +4418,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "blake2", "proc-macro-crate", @@ -4411,7 +4430,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4424,7 +4443,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "integer-sqrt", "num-traits", @@ -4438,7 +4457,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4451,7 +4470,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "parity-scale-codec", @@ -4460,10 +4479,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "sp-api", @@ -4475,7 +4511,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "futures", @@ -4493,7 +4529,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "parity-scale-codec", @@ -4511,7 +4547,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "merlin", @@ -4534,7 +4570,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4546,7 +4582,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4559,7 +4595,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "array-bytes", "base58", @@ -4601,7 +4637,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "blake2", "byteorder", @@ -4615,7 +4651,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro2", "quote", @@ -4626,7 +4662,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "proc-macro2", "quote", @@ -4636,7 +4672,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "environmental", "parity-scale-codec", @@ -4647,7 +4683,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "finality-grandpa", "log", @@ -4665,7 +4701,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -4679,7 +4715,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "bytes 1.2.1", "ed25519", @@ -4704,7 +4740,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "lazy_static", "sp-core", @@ -4715,7 +4751,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "futures", @@ -4726,13 +4762,14 @@ dependencies = [ "serde", "sp-core", "sp-externalities", + "sp-std", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "thiserror", "zstd", @@ -4741,7 +4778,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -4759,7 +4796,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4773,7 +4810,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "sp-api", "sp-core", @@ -4783,17 +4820,28 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "backtrace", "lazy_static", "regex", ] +[[package]] +name = "sp-rpc" +version = "6.0.0" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" +dependencies = [ + "rustc-hash", + "serde", + "sp-core", + "sp-std", +] + [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "either", "hash256-std-hasher", @@ -4815,7 +4863,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "bytes 1.2.1", "impl-trait-for-tuples", @@ -4833,7 +4881,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "Inflector", "proc-macro-crate", @@ -4842,10 +4890,20 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-serializer" +version = "4.0.0-dev" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" +dependencies = [ + "serde", + "serde_json", + "sp-std", +] + [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4859,7 +4917,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -4871,7 +4929,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "hash-db", "log", @@ -4891,12 +4949,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "impl-serde", "parity-scale-codec", @@ -4906,10 +4964,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-test-primitives" +version = "2.0.0" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "futures-timer", @@ -4924,7 +4995,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "sp-std", @@ -4936,7 +5007,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "sp-api", "sp-runtime", @@ -4945,7 +5016,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "async-trait", "log", @@ -4961,7 +5032,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "ahash", "hash-db", @@ -4984,7 +5055,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "impl-serde", "parity-scale-codec", @@ -5001,7 +5072,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -5012,7 +5083,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "impl-trait-for-tuples", "log", @@ -5025,7 +5096,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "parity-scale-codec", "scale-info", @@ -5140,8 +5211,11 @@ dependencies = [ "serde", "serde_json", "sp-core", + "sp-rpc", "sp-runtime", "sp-runtime-interface", + "sp-storage", + "sp-version", "thiserror-core", "tungstenite", "url", @@ -5180,7 +5254,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=master#ce025f3a989d165225c0f2f7ab497cf53319dd6d" +source = "git+https://github.com/haerdib/substrate.git?branch=add-serde-feature-to-primitives#7c28e6038df7869d342923cbf70623b83471a9f6" dependencies = [ "ansi_term", "build-helper", @@ -5265,7 +5339,25 @@ dependencies = [ "ac-compose-macros", "ac-node-api", "libc", + "sp-application-crypto", + "sp-arithmetic", + "sp-beefy", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", + "sp-finality-grandpa", "sp-io", + "sp-keystore", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-rpc", + "sp-runtime", + "sp-runtime-interface", + "sp-serializer", + "sp-storage", + "sp-test-primitives", + "sp-version", + "sp-weights", "substrate-api-client", ] @@ -5543,7 +5635,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "digest 0.10.5", "rand 0.8.5", "static_assertions", diff --git a/Cargo.toml b/Cargo.toml index fccf01572..e14f409f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,12 +39,15 @@ ws = { version = "0.9.2", optional = true, features = ["ssl"] } # Substrate no_std dependencies frame-metadata = { default-features = false, git = "https://github.com/paritytech/frame-metadata", features = ["v14", "serde_full", "decode"] } -sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-rpc = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime-interface = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-storage = { default-features = false, features = ["serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-version = { default-features = false, features = ["serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # substrate std / wasm only -frame-support = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # local deps ac-compose-macros = { path = "compose-macros", default-features = false } @@ -53,7 +56,7 @@ ac-primitives = { path = "primitives", default-features = false } [dev-dependencies] ac-node-api = { path = "node-api", features = ["mocks"] } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +kitchensink-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } scale-info = { version = "2.1.1", features = ["derive"] } [features] @@ -75,8 +78,11 @@ std = [ # substrate no_std "frame-metadata/std", "sp-core/std", + "sp-rpc/std", "sp-runtime/std", "sp-runtime-interface/std", + "sp-storage/std", + "sp-version/std", # substrate std "frame-support", # local deps diff --git a/client-keystore/Cargo.toml b/client-keystore/Cargo.toml index 0c325df83..c79e2987b 100644 --- a/client-keystore/Cargo.toml +++ b/client-keystore/Cargo.toml @@ -12,11 +12,11 @@ parking_lot = "0.12.0" serde_json = "1.0.79" # Substrate dependencies -sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-keystore = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-application-crypto = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-core = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-keyring = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-keystore = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } [dev-dependencies] tempfile = "3.3.0" diff --git a/compose-macros/Cargo.toml b/compose-macros/Cargo.toml index 707597ce4..2701254f5 100644 --- a/compose-macros/Cargo.toml +++ b/compose-macros/Cargo.toml @@ -10,11 +10,11 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = log = { version = "0.4.14", default-features = false } # substrate -sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # need to add this for the app_crypto macro -sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "master" } +sp-application-crypto = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", features = ["full_crypto", "serde"] } # local ac-primitives = { path = "../primitives", default-features = false } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 253186d84..4d5d345e1 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -13,16 +13,16 @@ tokio = { version = "1.16", features = ["rt-multi-thread", "macros", "time"] } wabt = "0.10.0" # Substrate dependencies -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-core = { features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +frame-system = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +kitchensink-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-balances = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-identity = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-staking = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-core = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-keyring = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-version = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # local deps substrate-api-client = { path = "..", features = ["tungstenite-client", "ws-client", "staking-xt"] } diff --git a/node-api/Cargo.toml b/node-api/Cargo.toml index 9ee3cff51..417a8f7eb 100644 --- a/node-api/Cargo.toml +++ b/node-api/Cargo.toml @@ -17,12 +17,13 @@ serde_json = { version = "1.0.79", default-features = false, features = ["alloc" # substrate frame-metadata = { default-features = false, git = "https://github.com/paritytech/frame-metadata", features = ["v14", "serde_full", "decode"] } -sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-storage = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # need to add this for `no_std` -sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "master" } -sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-application-crypto = { default-features = false, git = "https://github.com/haerdib/substrate.git", features = ["full_crypto"], branch = "add-serde-feature-to-primitives" } +sp-runtime-interface = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # local ac-primitives = { path = "../primitives", default-features = false } @@ -47,6 +48,7 @@ std = [ "frame-metadata/std", "sp-core/std", "sp-runtime/std", + "sp-storage/std", # no_std support "sp-application-crypto/std", "sp-runtime-interface/std", diff --git a/node-api/src/metadata.rs b/node-api/src/metadata.rs index ba8ea021d..47375f12c 100644 --- a/node-api/src/metadata.rs +++ b/node-api/src/metadata.rs @@ -11,13 +11,13 @@ //! This file is mostly subxt. use crate::{alloc::borrow::ToOwned, storage::GetStorageTypes, Encoded}; -use ac_primitives::StorageKey; use codec::{Decode, Encode, Error as CodecError}; use frame_metadata::{ PalletConstantMetadata, RuntimeMetadata, RuntimeMetadataLastVersion, RuntimeMetadataPrefixed, StorageEntryMetadata, META_RESERVED, }; use scale_info::{form::PortableForm, PortableRegistry, Type}; +use sp_storage::StorageKey; #[cfg(feature = "std")] use serde::Serialize; diff --git a/node-api/src/storage.rs b/node-api/src/storage.rs index 9dc845f05..63bfd1636 100644 --- a/node-api/src/storage.rs +++ b/node-api/src/storage.rs @@ -14,12 +14,12 @@ //! For querying runtime storage. use crate::metadata::MetadataError; -use ac_primitives::StorageKey; use alloc::{borrow::ToOwned, vec::Vec}; use codec::Encode; use core::marker::PhantomData; use frame_metadata::{StorageEntryMetadata, StorageEntryType, StorageHasher}; use scale_info::form::PortableForm; +use sp_storage::StorageKey; #[derive(Clone, Debug, PartialEq, Eq, Ord, PartialOrd)] pub struct StorageValue { diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 35da6b6df..eab9e4c8b 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -15,20 +15,21 @@ serde = { version = "1.0", default-features = false, features = ["derive", "allo serde_json = { version = "1.0", default-features = false, features = ["alloc"] } # substrate no_std -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-staking = { default-features = false, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-version = { default-features = false, features = ["serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-weights = { default-features = false, features = ["serde"], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # substrate std / wasm only -frame-system = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-assets = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-contracts = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-system = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-assets = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-balances = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-contracts = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-staking = { optional = true, git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } [dev-dependencies] -node-template-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +node-template-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } [features] default = ["std"] @@ -44,6 +45,7 @@ std = [ "sp-runtime/std", "sp-staking/std", "sp-version/std", + "sp-weights/std", # substrate std "frame-system", "pallet-assets", diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index b613bd456..cfdabb123 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -22,15 +22,11 @@ extern crate alloc; pub use extrinsic_params::*; pub use extrinsics::*; pub use pallet_traits::*; -pub use rpc_numbers::*; pub use rpc_params::RpcParams; -pub use serde_impls::*; pub use types::*; pub mod extrinsic_params; pub mod extrinsics; pub mod pallet_traits; -pub mod rpc_numbers; pub mod rpc_params; -pub mod serde_impls; pub mod types; diff --git a/primitives/src/pallet_traits/pallet_staking_config.rs b/primitives/src/pallet_traits/pallet_staking_config.rs index 919fafbb1..7ff5e078a 100644 --- a/primitives/src/pallet_traits/pallet_staking_config.rs +++ b/primitives/src/pallet_traits/pallet_staking_config.rs @@ -56,7 +56,7 @@ pub trait StakingConfig: FrameSystemConfig { type SessionsPerEra: Get; type BondingDuration: Get; type SlashDeferDuration: Get; - type SlashCancelOrigin; + type AdminOrigin; type SessionInterface; type EraPayout; type NextNewSession; @@ -89,7 +89,7 @@ where type SessionsPerEra = T::SessionsPerEra; type BondingDuration = T::BondingDuration; type SlashDeferDuration = T::SlashDeferDuration; - type SlashCancelOrigin = T::SlashCancelOrigin; + type AdminOrigin = T::AdminOrigin; type SessionInterface = T::SessionInterface; type EraPayout = T::EraPayout; type NextNewSession = T::NextNewSession; diff --git a/primitives/src/rpc_numbers.rs b/primitives/src/rpc_numbers.rs deleted file mode 100644 index a14bdb97e..000000000 --- a/primitives/src/rpc_numbers.rs +++ /dev/null @@ -1,113 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! A number type that can be serialized both as a number or a string that encodes a number in a -//! string. - -// Copied the whole file from substrate, as sp_rpc is not no_std compatible. -// https://github.com/paritytech/substrate/blob/cd2fdcf85eb96c53ce2a5d418d4338eb92f5d4f5/primitives/rpc/src/number.rs - -use core::fmt::Debug; -use primitive_types::U256; -use serde::{Deserialize, Serialize}; - -/// A number type that can be serialized both as a number or a string that encodes a number in a -/// string. -/// -/// We allow two representations of the block number as input. Either we deserialize to the type -/// that is specified in the block type or we attempt to parse given hex value. -/// -/// The primary motivation for having this type is to avoid overflows when using big integers in -/// JavaScript (which we consider as an important RPC API consumer). -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum NumberOrHex { - /// The number represented directly. - Number(u64), - /// Hex representation of the number. - Hex(U256), -} - -impl Default for NumberOrHex { - fn default() -> Self { - Self::Number(Default::default()) - } -} - -impl NumberOrHex { - /// Converts this number into an U256. - pub fn into_u256(self) -> U256 { - match self { - NumberOrHex::Number(n) => n.into(), - NumberOrHex::Hex(h) => h, - } - } -} - -impl From for NumberOrHex { - fn from(n: u32) -> Self { - NumberOrHex::Number(n.into()) - } -} - -impl From for NumberOrHex { - fn from(n: u64) -> Self { - NumberOrHex::Number(n) - } -} - -impl From for NumberOrHex { - fn from(n: u128) -> Self { - NumberOrHex::Hex(n.into()) - } -} - -impl From for NumberOrHex { - fn from(n: U256) -> Self { - NumberOrHex::Hex(n) - } -} - -/// An error type that signals an out-of-range conversion attempt. -pub struct TryFromIntError(pub(crate) ()); - -impl TryFrom for u32 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex.into_u256().try_into().map_err(|_| TryFromIntError(())) - } -} - -impl TryFrom for u64 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex.into_u256().try_into().map_err(|_| TryFromIntError(())) - } -} - -impl TryFrom for u128 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex.into_u256().try_into().map_err(|_| TryFromIntError(())) - } -} - -impl From for U256 { - fn from(num_or_hex: NumberOrHex) -> U256 { - num_or_hex.into_u256() - } -} diff --git a/primitives/src/serde_impls.rs b/primitives/src/serde_impls.rs deleted file mode 100644 index a947054b7..000000000 --- a/primitives/src/serde_impls.rs +++ /dev/null @@ -1,462 +0,0 @@ -/* - Copyright 2019 Supercomputing Systems AG - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -//! Re-defintion of substrate primitives that do not implement -//! (De)Serialization in no_std. They can be converted to -//! the original substrate types with From / Into. -//! This may be omitted, if substrate allows serde impls also in no_std: https://github.com/paritytech/substrate/issues/12994 - -use alloc::{string::String, vec::Vec}; -use codec::{Decode, Encode}; -use impl_serde::serialize::{from_hex, FromHexError}; -use scale_info::TypeInfo; -use serde::{Deserialize, Serialize}; -use sp_core::RuntimeDebug; -use sp_runtime::Justification; -use sp_version::{ApiId, ApisVec}; - -/// Hex-serialized shim for `Vec`. -// https://github.com/paritytech/substrate/blob/5aaf5f42a7850f00b15a14f635b67061d831ac2d/primitives/core/src/lib.rs#L131 -#[derive(PartialEq, Eq, Clone, RuntimeDebug, Serialize, Deserialize, Hash, PartialOrd, Ord)] -pub struct Bytes(#[serde(with = "impl_serde::serialize")] pub Vec); - -impl From> for Bytes { - fn from(s: Vec) -> Self { - Bytes(s) - } -} - -impl core::str::FromStr for Bytes { - type Err = FromHexError; - - fn from_str(s: &str) -> Result { - from_hex(s).map(Bytes) - } -} - -impl From for sp_core::Bytes { - fn from(bytes: Bytes) -> Self { - Self(bytes.0) - } -} - -impl From for Bytes { - fn from(bytes: sp_core::Bytes) -> Self { - Self(bytes.0) - } -} - -/// Storage key. -// https://github.com/paritytech/substrate/blob/cd2fdcf85eb96c53ce2a5d418d4338eb92f5d4f5/primitives/storage/src/lib.rs#L41-L43 -#[derive( - PartialEq, - Eq, - RuntimeDebug, - Serialize, - Deserialize, - Hash, - PartialOrd, - Ord, - Clone, - Encode, - Decode, -)] -pub struct StorageKey(#[serde(with = "impl_serde::serialize")] pub Vec); - -impl AsRef<[u8]> for StorageKey { - fn as_ref(&self) -> &[u8] { - self.0.as_ref() - } -} - -impl From for sp_core::storage::StorageKey { - fn from(storage_key: StorageKey) -> Self { - Self(storage_key.0) - } -} - -impl From for StorageKey { - fn from(storage_key: sp_core::storage::StorageKey) -> Self { - Self(storage_key.0) - } -} - -/// Storage data associated to a [`StorageKey`]. -// https://github.com/paritytech/substrate/blob/cd2fdcf85eb96c53ce2a5d418d4338eb92f5d4f5/primitives/storage/src/lib.rs#L148-L150 -#[derive( - PartialEq, - Eq, - RuntimeDebug, - Serialize, - Deserialize, - Hash, - PartialOrd, - Ord, - Clone, - Encode, - Decode, - Default, -)] -pub struct StorageData(#[serde(with = "impl_serde::serialize")] pub Vec); - -impl From for sp_core::storage::StorageData { - fn from(storage_data: StorageData) -> Self { - Self(storage_data.0) - } -} - -impl From for StorageData { - fn from(storage_data: sp_core::storage::StorageData) -> Self { - Self(storage_data.0) - } -} - -/// Storage change set -#[derive(RuntimeDebug, Serialize, Deserialize, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct StorageChangeSet { - /// Block hash - pub block: Hash, - /// A list of changes - pub changes: Vec<(StorageKey, Option)>, -} - -impl From> for sp_core::storage::StorageChangeSet { - fn from(storage_change_set: StorageChangeSet) -> Self { - Self { - block: storage_change_set.block, - changes: storage_change_set - .changes - .iter() - .map(|(key, maybe_data)| { - (key.clone().into(), maybe_data.as_ref().map(|data| data.clone().into())) - }) - .collect(), - } - } -} - -impl From> for StorageChangeSet { - fn from(storage_change_set: sp_core::storage::StorageChangeSet) -> Self { - Self { - block: storage_change_set.block, - changes: storage_change_set - .changes - .into_iter() - .map(|(key, maybe_data)| { - let key: StorageKey = key.into(); - let maybe_data: Option = maybe_data.map(|data| data.into()); - (key, maybe_data) - }) - .collect(), - } - } -} - -/// Runtime version. -/// This should not be thought of as classic Semver (major/minor/tiny). -/// This triplet have different semantics and mis-interpretation could cause problems. -/// In particular: bug fixes should result in an increment of `spec_version` and possibly -/// `authoring_version`, absolutely not `impl_version` since they change the semantics of the -/// runtime. -// https://github.com/paritytech/substrate/blob/1b3ddae9dec6e7653b5d6ef0179df1af831f46f0/primitives/version/src/lib.rs#L152-L215 -// FIXME: For now RuntimeVersion conversion is not implemented to the substrate RuntimeVersion. -// It's a little more complicated because of the RuntimeString, which is different in no_std than in std mode. -#[derive( - Clone, PartialEq, Eq, Default, sp_runtime::RuntimeDebug, TypeInfo, Serialize, Deserialize, -)] -#[serde(rename_all = "camelCase")] -pub struct RuntimeVersion { - /// Identifies the different Substrate runtimes. There'll be at least polkadot and node. - /// A different on-chain spec_name to that of the native runtime would normally result - /// in node not attempting to sync or author blocks. - pub spec_name: String, - - /// Name of the implementation of the spec. This is of little consequence for the node - /// and serves only to differentiate code of different implementation teams. For this - /// codebase, it will be parity-polkadot. If there were a non-Rust implementation of the - /// Polkadot runtime (e.g. C++), then it would identify itself with an accordingly different - /// `impl_name`. - pub impl_name: String, - - /// `authoring_version` is the version of the authorship interface. An authoring node - /// will not attempt to author blocks unless this is equal to its native runtime. - pub authoring_version: u32, - - /// Version of the runtime specification. A full-node will not attempt to use its native - /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, - /// `spec_version` and `authoring_version` are the same between Wasm and native. - pub spec_version: u32, - - /// Version of the implementation of the specification. Nodes are free to ignore this; it - /// serves only as an indication that the code is different; as long as the other two versions - /// are the same then while the actual code may be different, it is nonetheless required to - /// do the same thing. - /// Non-consensus-breaking optimizations are about the only changes that could be made which - /// would result in only the `impl_version` changing. - pub impl_version: u32, - - /// List of supported API "features" along with their versions. - #[serde( - serialize_with = "apis_serialize::serialize", - deserialize_with = "apis_serialize::deserialize" - )] - pub apis: ApisVec, - //pub apis: alloc::borrow::Cow<'static, [([u8; 8], u32)]>, - /// All existing dispatches are fully compatible when this number doesn't change. If this - /// number changes, then `spec_version` must change, also. - /// - /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, - /// either through an alteration in its user-level semantics, a parameter - /// added/removed/changed, a dispatchable being removed, a module being removed, or a - /// dispatchable/module changing its index. - /// - /// It need *not* change when a new module is added or when a dispatchable is added. - pub transaction_version: u32, - - /// Version of the state implementation used by this runtime. - /// Use of an incorrect version is consensus breaking. - pub state_version: u8, -} -/// Abstraction over a substrate block and justification. -// https://github.com/paritytech/substrate/blob/fafc8e0ba8c98bd22b47913ded414e74a0fcb67f/primitives/runtime/src/generic/block.rs -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[serde(deny_unknown_fields)] -pub struct SignedBlock { - /// Full block. - pub block: Block, - /// Block justification. - pub justifications: Option, -} - -impl From> for SignedBlock { - fn from(signed_block: sp_runtime::generic::SignedBlock) -> Self { - Self { - block: signed_block.block, - justifications: signed_block.justifications.map(|justifactions| justifactions.into()), - } - } -} - -impl From> for sp_runtime::generic::SignedBlock { - fn from(signed_block: SignedBlock) -> Self { - Self { - block: signed_block.block, - justifications: signed_block.justifications.map(|justifactions| justifactions.into()), - } - } -} - -/// Collection of justifications for a given block, multiple justifications may -/// be provided by different consensus engines for the same block. -// https://github.com/paritytech/substrate/blob/fafc8e0ba8c98bd22b47913ded414e74a0fcb67f/primitives/runtime/src/lib.rs#L125-L127 -#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)] -pub struct Justifications(pub Vec); - -impl From for Justifications { - fn from(justifications: sp_runtime::Justifications) -> Self { - let mut justification_vec = Vec::new(); - for justification in justifications.iter() { - justification_vec.push(justification.clone()); - } - Self(justification_vec) - } -} - -impl From for sp_runtime::Justifications { - fn from(justifications: Justifications) -> Self { - let first_justifaction = justifications.0[0].clone(); - let mut sp_runtime_justifications: sp_runtime::Justifications = first_justifaction.into(); - for justification in justifications.0 { - sp_runtime_justifications.append(justification); - } - sp_runtime_justifications - } -} - -/// The old weight type. -// https://github.com/paritytech/substrate/blob/d0540a79967cb06cd7598a4965c7c06afc788b0c/primitives/weights/src/lib.rs#L78 -#[derive( - Decode, - Encode, - PartialEq, - Eq, - Clone, - Copy, - RuntimeDebug, - Default, - TypeInfo, - Serialize, - Deserialize, -)] -#[serde(transparent)] -pub struct OldWeight(pub u64); - -// Copied from sp_version (only available in std in the substrate version). -// https://github.com/paritytech/substrate/blob/1b3ddae9dec6e7653b5d6ef0179df1af831f46f0/primitives/version/src/lib.rs#L392-L393 -mod apis_serialize { - use super::*; - use impl_serde::serialize as bytes; - use serde::{de, ser::SerializeTuple, Serializer}; - - #[derive(Serialize)] - struct ApiId<'a>(#[serde(serialize_with = "serialize_bytesref")] &'a super::ApiId, &'a u32); - - pub fn serialize(apis: &ApisVec, ser: S) -> Result - where - S: Serializer, - { - let len = apis.len(); - let mut seq = ser.serialize_tuple(len)?; - for (api, ver) in &**apis { - seq.serialize_element(&ApiId(api, ver))?; - } - seq.end() - } - - pub fn serialize_bytesref(&apis: &&super::ApiId, ser: S) -> Result - where - S: Serializer, - { - bytes::serialize(apis, ser) - } - - #[derive(Deserialize)] - struct ApiIdOwned(#[serde(deserialize_with = "deserialize_bytes")] super::ApiId, u32); - - pub fn deserialize<'de, D>(deserializer: D) -> Result - where - D: de::Deserializer<'de>, - { - struct Visitor; - impl<'de> de::Visitor<'de> for Visitor { - type Value = ApisVec; - - fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result { - formatter.write_str("a sequence of api id and version tuples") - } - - fn visit_seq(self, mut visitor: V) -> Result - where - V: de::SeqAccess<'de>, - { - let mut apis = Vec::new(); - while let Some(value) = visitor.next_element::()? { - apis.push((value.0, value.1)); - } - Ok(apis.into()) - } - } - deserializer.deserialize_seq(Visitor) - } - - pub fn deserialize_bytes<'de, D>(d: D) -> Result - where - D: de::Deserializer<'de>, - { - let mut arr = [0; 8]; - bytes::deserialize_check_len(d, bytes::ExpectedLen::Exact(&mut arr[..]))?; - Ok(arr) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use codec::Encode; - use core::str::FromStr; - use primitive_types::H256; - - #[test] - fn from_substrate_bytes_to_bytes_works() { - let string = "0x12341560"; - let bytes = Bytes::from_str(string).unwrap(); - let substrate_bytes: sp_core::Bytes = bytes.clone().into(); - let original_bytes: Bytes = substrate_bytes.into(); - - assert_eq!(original_bytes, bytes); - } - - #[test] - fn from_substrate_storage_data_to_storage_data_works() { - let test_vec = "test_string".encode(); - let storage_data = StorageData(test_vec); - let substrate_storage_data: sp_core::storage::StorageData = storage_data.clone().into(); - let original_storage_data: StorageData = substrate_storage_data.into(); - - assert_eq!(original_storage_data, storage_data); - } - - #[test] - fn from_substrate_storage_key_to_storage_key_works() { - let test_vec = "test_string".encode(); - let storage_key = StorageKey(test_vec); - let substrate_storage_key: sp_core::storage::StorageKey = storage_key.clone().into(); - let original_storage_key: StorageKey = substrate_storage_key.into(); - - assert_eq!(original_storage_key, storage_key); - } - - #[test] - fn from_substrate_change_set_to_change_set_works() { - let test_vec = "test_data".encode(); - let storage_data = StorageData(test_vec); - let test_vec = "test_key".encode(); - let storage_key = StorageKey(test_vec); - let changes = vec![(storage_key, Some(storage_data))]; - let hash = H256::random(); - - let change_set = StorageChangeSet { block: hash, changes: changes.clone() }; - - let substrate_change_set: sp_core::storage::StorageChangeSet = change_set.into(); - let original_change_set: StorageChangeSet = substrate_change_set.into(); - - assert_eq!(original_change_set.block, hash); - assert_eq!(original_change_set.changes, changes); - } - - #[test] - fn from_substrate_justifications_to_justification_works() { - let encoded_justifcation = "test_string".encode(); - let consensus_engine_id: [u8; 4] = [1, 2, 3, 4]; - let justification: Justification = (consensus_engine_id, encoded_justifcation); - let justifications = Justifications(vec![justification]); - - let substrate_justifications: sp_runtime::Justifications = justifications.clone().into(); - let original_justifications: Justifications = substrate_justifications.into(); - - assert_eq!(original_justifications, justifications); - } - - #[test] - fn from_substrate_signed_block_to_signed_block_works() { - let block = "test_string".encode(); - let encoded_justifcation = "test_string".encode(); - let consensus_engine_id: [u8; 4] = [1, 2, 3, 4]; - let justification: Justification = (consensus_engine_id, encoded_justifcation); - let justifications = Some(Justifications(vec![justification])); - - let signed_block = SignedBlock { block, justifications }; - - let substrate_signed_block: sp_runtime::generic::SignedBlock> = - signed_block.clone().into(); - let original_signed_block: SignedBlock> = substrate_signed_block.into(); - - assert_eq!(original_signed_block, signed_block); - } -} diff --git a/primitives/src/types.rs b/primitives/src/types.rs index e6a2dd522..0f9156a43 100644 --- a/primitives/src/types.rs +++ b/primitives/src/types.rs @@ -116,7 +116,7 @@ impl FeeDetails { #[serde(rename_all = "camelCase")] #[serde(bound(serialize = "Balance: core::fmt::Display, Weight: Serialize"))] #[serde(bound(deserialize = "Balance: core::str::FromStr, Weight: Deserialize<'de>"))] -pub struct RuntimeDispatchInfo { +pub struct RuntimeDispatchInfo { /// Weight of this dispatch. pub weight: Weight, /// Class of this dispatch. diff --git a/src/api/api_client.rs b/src/api/api_client.rs index 6b800818a..890ead6ef 100644 --- a/src/api/api_client.rs +++ b/src/api/api_client.rs @@ -19,13 +19,14 @@ use crate::{ }; use ac_compose_macros::rpc_params; use ac_node_api::metadata::Metadata; -use ac_primitives::{Bytes, ExtrinsicParams, FrameSystemConfig, RuntimeVersion}; +use ac_primitives::{ExtrinsicParams, FrameSystemConfig}; use codec::Decode; use core::convert::TryFrom; use frame_metadata::RuntimeMetadataPrefixed; use log::{debug, info}; -use sp_core::Pair; +use sp_core::{Bytes, Pair}; use sp_runtime::MultiSignature; +use sp_version::RuntimeVersion; /// Api to talk with substrate-nodes /// diff --git a/src/api/mod.rs b/src/api/mod.rs index d8eca0cf1..1df0c3e51 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -24,9 +24,9 @@ pub mod error; pub mod rpc_api; use ac_node_api::EventDetails; -use ac_primitives::Bytes; use alloc::{string::String, vec::Vec}; use serde::{Deserialize, Serialize}; +use sp_core::Bytes; /// Extrinsic report returned upon a submit_and_watch request. /// Holds as much information as available. diff --git a/src/api/rpc_api/author.rs b/src/api/rpc_api/author.rs index 7e5cdd1a0..0b19e3348 100644 --- a/src/api/rpc_api/author.rs +++ b/src/api/rpc_api/author.rs @@ -253,15 +253,20 @@ where #[cfg(test)] mod tests { use super::*; - use crate::{rpc::mocks::RpcClientMock, AssetTipExtrinsicParams, StorageData}; + use crate::{rpc::mocks::RpcClientMock, AssetTipExtrinsicParams}; use ac_node_api::{metadata::Metadata, test_utils::*}; - use ac_primitives::{FrameSystemConfig, RuntimeVersion, SignedBlock}; + use ac_primitives::FrameSystemConfig; use codec::{Decode, Encode}; use frame_metadata::RuntimeMetadataPrefixed; use kitchensink_runtime::{BalancesCall, Runtime, RuntimeCall, UncheckedExtrinsic}; use scale_info::TypeInfo; use sp_core::{crypto::Ss58Codec, sr25519, sr25519::Pair, H256}; - use sp_runtime::{generic::Block, AccountId32, MultiAddress}; + use sp_runtime::{ + generic::{Block, SignedBlock}, + AccountId32, MultiAddress, + }; + use sp_storage::StorageData; + use sp_version::RuntimeVersion; use std::{collections::HashMap, fs}; #[derive(Clone, Copy, Debug, PartialEq, Decode, Encode, TypeInfo)] diff --git a/src/api/rpc_api/chain.rs b/src/api/rpc_api/chain.rs index 82a96a709..1c9c0ae2d 100644 --- a/src/api/rpc_api/chain.rs +++ b/src/api/rpc_api/chain.rs @@ -17,10 +17,10 @@ use crate::{ FromHexString, }; use ac_compose_macros::rpc_params; -use ac_primitives::{ExtrinsicParams, FrameSystemConfig, SignedBlock}; +use ac_primitives::{ExtrinsicParams, FrameSystemConfig}; use log::*; use serde::de::DeserializeOwned; -use sp_runtime::traits::GetRuntimeBlockType; +use sp_runtime::{generic::SignedBlock, traits::GetRuntimeBlockType}; pub trait GetHeader { type Header; diff --git a/src/api/rpc_api/frame_system.rs b/src/api/rpc_api/frame_system.rs index ae0e18714..fea160cb9 100644 --- a/src/api/rpc_api/frame_system.rs +++ b/src/api/rpc_api/frame_system.rs @@ -19,14 +19,13 @@ use crate::{ utils, }; use ac_compose_macros::rpc_params; -use ac_primitives::{ - AccountInfo, ExtrinsicParams, FrameSystemConfig, StorageChangeSet, StorageKey, -}; +use ac_primitives::{AccountInfo, ExtrinsicParams, FrameSystemConfig}; use alloc::{string::String, vec, vec::Vec}; use log::*; use serde::de::DeserializeOwned; use sp_core::Pair; use sp_runtime::MultiSignature; +use sp_storage::{StorageChangeSet, StorageKey}; pub trait GetAccountInformation { type Index; diff --git a/src/api/rpc_api/pallet_transaction_payment.rs b/src/api/rpc_api/pallet_transaction_payment.rs index 2b866e8b8..478147942 100644 --- a/src/api/rpc_api/pallet_transaction_payment.rs +++ b/src/api/rpc_api/pallet_transaction_payment.rs @@ -17,9 +17,11 @@ use crate::{ ExtrinsicParams, }; use ac_compose_macros::rpc_params; -use ac_primitives::{BalancesConfig, FeeDetails, InclusionFee, NumberOrHex, RuntimeDispatchInfo}; +use ac_primitives::{BalancesConfig, FeeDetails, InclusionFee, RuntimeDispatchInfo}; use alloc::vec::Vec; use core::str::FromStr; +use sp_rpc::number::NumberOrHex; + /// Interface to common calls of the substrate transaction payment pallet. pub trait GetTransactionPayment { type Balance; diff --git a/src/api/rpc_api/state.rs b/src/api/rpc_api/state.rs index 619efec75..b5d5c3ff1 100644 --- a/src/api/rpc_api/state.rs +++ b/src/api/rpc_api/state.rs @@ -16,13 +16,12 @@ use crate::{ utils, Api, MetadataError, ReadProof, }; use ac_compose_macros::rpc_params; -use ac_primitives::{ - ExtrinsicParams, FrameSystemConfig, StorageChangeSet, StorageData, StorageKey, -}; +use ac_primitives::{ExtrinsicParams, FrameSystemConfig}; use alloc::{string::String, vec, vec::Vec}; use codec::{Decode, Encode}; use log::*; use serde::de::DeserializeOwned; +use sp_storage::{StorageChangeSet, StorageData, StorageKey}; /// Generic interface to substrate storage. pub trait GetStorage { diff --git a/src/api/rpc_api/subscribe_events.rs b/src/api/rpc_api/subscribe_events.rs index 016e45b8d..5a7d599ba 100644 --- a/src/api/rpc_api/subscribe_events.rs +++ b/src/api/rpc_api/subscribe_events.rs @@ -16,9 +16,10 @@ use crate::{ rpc::{HandleSubscription, Subscribe}, }; use ac_node_api::{events::EventDetails, Events, StaticEvent}; -use ac_primitives::{ExtrinsicParams, FrameSystemConfig, StorageChangeSet}; +use ac_primitives::{ExtrinsicParams, FrameSystemConfig}; use log::*; use serde::de::DeserializeOwned; +use sp_storage::StorageChangeSet; // FIXME: This should rather be implemented directly on the // Subscription return value, rather than the api. Or directly diff --git a/src/utils.rs b/src/utils.rs index 31e32a073..92cce2774 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,10 +15,10 @@ */ -use ac_primitives::StorageKey; use alloc::{string::String, vec::Vec}; use hex::FromHexError; use sp_core::{twox_128, H256}; +use sp_storage::StorageKey; pub fn storage_key(module: &str, storage_key_name: &str) -> StorageKey { let mut key = twox_128(module.as_bytes()).to_vec(); diff --git a/test-no-std/Cargo.toml b/test-no-std/Cargo.toml index a7d97c05e..10fffcf66 100644 --- a/test-no-std/Cargo.toml +++ b/test-no-std/Cargo.toml @@ -13,8 +13,51 @@ ac-compose-macros = { path = "../compose-macros", default-features = false, opti ac-node-api = { path = "../node-api", default-features = false, optional = true, features = ["disable_target_static_assertions"] } substrate-api-client = { path = "..", default-features = false, optional = true, features = ["disable_target_static_assertions"] } +sp-application-crypto = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde", "full_crypto"] } +sp-arithmetic = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-beefy = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-consensus-babe = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-consensus-slots = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-core = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde", "full_crypto"] } +sp-finality-grandpa = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde", "full_crypto"] } +sp-keystore = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-mmr-primitives = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-npos-elections = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-rpc = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde", "full_crypto"] } +sp-serializer = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true } +sp-storage = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-test-primitives = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-version = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } +sp-weights = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, optional = true, features = ["serde"] } + + # substrate dependencies -sp-io = { default-features = false, features = ["disable_oom", "disable_panic_handler"], git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-io = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, features = ["disable_oom", "disable_panic_handler"] } +sp-runtime-interface = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives", default-features = false, features = ["disable_target_static_assertions"] } + +# sp-application-crypto = { path = "../../../haerdib/substrate/primitives/application-crypto", default-features = false, optional = true, features = ["serde","full_crypto"] } +# sp-arithmetic = { path = "../../../haerdib/substrate/primitives/arithmetic", default-features = false, optional = true, features = ["serde"] } +# sp-beefy = { path = "../../../haerdib/substrate/primitives/beefy", default-features = false, optional = true, features = ["serde"] } +# sp-consensus-babe = { path = "../../../haerdib/substrate/primitives/consensus/babe", default-features = false, optional = true, features = ["serde"] } +# sp-consensus-slots = { path = "../../../haerdib/substrate/primitives/consensus/slots", default-features = false, optional = true, features = ["serde"] } +# sp-core = { path = "../../../haerdib/substrate/primitives/core", default-features = false, optional = true, features = ["serde", "full_crypto"] } +# sp-finality-grandpa = { path = "../../../haerdib/substrate/primitives/finality-grandpa", default-features = false, optional = true, features = ["serde", "full_crypto"] } +# sp-keystore = { path = "../../../haerdib/substrate/primitives/keystore", default-features = false, optional = true, features = ["serde"] } +# sp-mmr-primitives = { path = "../../../haerdib/substrate/primitives/merkle-mountain-range", default-features = false, optional = true, features = ["serde"] } +# sp-npos-elections = { path = "../../../haerdib/substrate/primitives/npos-elections", default-features = false, optional = true, features = ["serde"] } +# sp-rpc = { path = "../../../haerdib/substrate/primitives/rpc", default-features = false, optional = true } +# sp-runtime = { path = "../../../haerdib/substrate/primitives/runtime", default-features = false, optional = true, features = ["serde", "full_crypto"] } +# sp-serializer = { path = "../../../haerdib/substrate/primitives/serializer", default-features = false, optional = true } +# sp-storage = { path = "../../../haerdib/substrate/primitives/storage", default-features = false, optional = true, features = ["serde"] } +# sp-test-primitives = { path = "../../../haerdib/substrate/primitives/test-primitives", default-features = false, optional = true, features = ["serde"] } +# sp-version = { path = "../../../haerdib/substrate/primitives/version", default-features = false, optional = true, features = ["serde"] } +# sp-weights = { path = "../../../haerdib/substrate/primitives/weights", default-features = false, optional = true, features = ["serde"] } +# +# +# # substrate dependencies +# sp-io = { path = "../../../haerdib/substrate/primitives/io", default-features = false, features = ["disable_oom", "disable_panic_handler"] } +# sp-runtime-interface = { path = "../../../haerdib/substrate/primitives/runtime-interface", default-features = false, features = ["disable_target_static_assertions"] } [features] # It is better to test the no-std crates standalone (don't enable both features at the same time) because dependency @@ -22,3 +65,20 @@ sp-io = { default-features = false, features = ["disable_oom", "disable_panic_ha api-client = ["substrate-api-client"] compose-macros = ["ac-compose-macros"] node-api = ["ac-node-api"] +application-crypto = ["sp-application-crypto"] +arithmetic = ["sp-arithmetic"] +beefy = ["sp-beefy"] +babe = ["sp-consensus-babe"] +slots = ["sp-consensus-slots"] +core = ["sp-core"] +finality-grandpa = ["sp-finality-grandpa"] +keystore = ["sp-keystore"] +mmr = ["sp-mmr-primitives"] +npos-elections = ["sp-npos-elections"] +rpc = ["sp-rpc"] +runtime = ["sp-runtime"] +serializer = ["sp-serializer"] +storage = ["sp-storage"] +test-primitives = ["sp-test-primitives"] +version = ["sp-version"] +weights = ["sp-weights"] diff --git a/test-no-std/src/main.rs b/test-no-std/src/main.rs index 4afbe0d79..0fe6cd91b 100644 --- a/test-no-std/src/main.rs +++ b/test-no-std/src/main.rs @@ -3,11 +3,6 @@ #![no_std] #![no_main] -#[cfg(not(any(feature = "api-client", feature = "node-api", feature = "compose-macros")))] -compile_error!( - "either feature \"api-client\", \"compose-macro\", or feature \"node-api\" must be enabled" -); - // DUTs #[cfg(feature = "api-client")] @@ -19,6 +14,57 @@ extern crate ac_compose_macros; #[cfg(feature = "node-api")] extern crate ac_node_api; +#[cfg(feature = "application-crypto")] +extern crate sp_application_crypto; + +#[cfg(feature = "arithmetic")] +extern crate sp_arithmetic; + +#[cfg(feature = "beefy")] +extern crate sp_beefy; + +#[cfg(feature = "babe")] +extern crate sp_consensus_babe; + +#[cfg(feature = "slots")] +extern crate sp_consensus_slots; + +#[cfg(feature = "core")] +extern crate sp_core; + +#[cfg(feature = "finality-grandpa")] +extern crate sp_finality_grandpa; + +#[cfg(feature = "keystore")] +extern crate sp_keystore; + +#[cfg(feature = "mmr")] +extern crate sp_mmr_primitives; + +#[cfg(feature = "npos-elections")] +extern crate sp_npos_elections; + +#[cfg(feature = "rpc")] +extern crate sp_rpc; + +#[cfg(feature = "runtime")] +extern crate sp_runtime; + +#[cfg(feature = "serializer")] +extern crate sp_serializer; + +#[cfg(feature = "storage")] +extern crate sp_storage; + +#[cfg(feature = "test-primitives")] +extern crate sp_test_primitives; + +#[cfg(feature = "versiom")] +extern crate sp_version; + +#[cfg(feature = "weights")] +extern crate sp_weights; + // The libc crate allows importing functions from C. extern crate libc; use core::{ diff --git a/test-no-std/substrate.sh b/test-no-std/substrate.sh new file mode 100755 index 000000000..a93c02da7 --- /dev/null +++ b/test-no-std/substrate.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -euo pipefail + +echo "[+] Testing Application Crypto" +cargo build --release -p test-no-std --features application-crypto +echo "[+] Testing arithmetic" +cargo build --release -p test-no-std --features arithmetic +echo "[+] Testing beefy" +cargo build --release -p test-no-std --features beefy +echo "[+] Testing babe" +cargo build --release -p test-no-std --features babe +echo "[+] Testing slots" +cargo build --release -p test-no-std --features slots +echo "[+] Testing core" +cargo build --release -p test-no-std --features core +echo "[+] Testing finality-grandpa" +cargo build --release -p test-no-std --features finality-grandpa +echo "[+] Testing mmr" +cargo build --release -p test-no-std --features mmr +echo "[+] Testing npos-elections" +cargo build --release -p test-no-std --features npos-elections +echo "[+] Testing rpc" +cargo build --release -p test-no-std --features rpc +echo "[+] Testing runtime" +cargo build --release -p test-no-std --features runtime +echo "[+] Testing serializer" +cargo build --release -p test-no-std --features serializer +echo "[+] Testing test-primitives" +cargo build --release -p test-no-std --features test-primitives +echo "[+] Testing version" +cargo build --release -p test-no-std --features version +echo "[+] Testing weights" +cargo build --release -p test-no-std --features weights +echo "[+] Testing keystore" +cargo build --release -p test-no-std --features keystore diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 1c17846c5..6f7cc57ff 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -14,19 +14,19 @@ tokio = { version = "1.16", features = ["rt-multi-thread", "macros", "time"] } wabt = "0.10.0" # Substrate dependencies -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +frame-support = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +frame-system = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +kitchensink-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } sp-core = { features = [ "full_crypto", -], git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +], git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-keyring = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-runtime = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-staking = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +sp-version = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-balances = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-identity = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } +pallet-staking = { git = "https://github.com/haerdib/substrate.git", branch = "add-serde-feature-to-primitives" } # local deps substrate-api-client = { path = "..", features = [