diff --git a/parachain/Cargo.lock b/parachain/Cargo.lock index 82720f6523..32539c80e9 100644 --- a/parachain/Cargo.lock +++ b/parachain/Cargo.lock @@ -791,16 +791,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "binary-merkle-tree" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", -] - [[package]] name = "bincode" version = "1.3.3" @@ -1025,9 +1015,9 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "staging-xcm", ] [[package]] @@ -1819,8 +1809,8 @@ dependencies = [ "sc-client-api", "sc-service", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "url", ] @@ -1831,19 +1821,19 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "futures 0.3.31", "parity-scale-codec", "parking_lot 0.12.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "tracing", ] @@ -1858,7 +1848,7 @@ dependencies = [ "cumulus-client-consensus-proposer", "cumulus-client-parachain-inherent", "cumulus-primitives-aura", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.31", "parity-scale-codec", @@ -1867,7 +1857,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -1876,18 +1866,18 @@ dependencies = [ "sc-telemetry", "sc-utils", "schnellru", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", "substrate-prometheus-endpoint", "tokio", "tracing", @@ -1900,25 +1890,25 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "async-trait", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", "futures 0.3.31", "log", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-core", + "sp-runtime", + "sp-timestamp", + "sp-trie", + "sp-version", "substrate-prometheus-endpoint", "tracing", ] @@ -1930,11 +1920,11 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "anyhow", "async-trait", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-parachain-inherent", "sp-consensus", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror 1.0.69", ] @@ -1951,16 +1941,16 @@ dependencies = [ "parking_lot 0.12.5", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-version", "tracing", ] @@ -1970,19 +1960,19 @@ version = "0.15.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", "parity-scale-codec", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", "tracing", ] @@ -1992,7 +1982,7 @@ version = "0.21.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.31", "futures-timer", @@ -2000,15 +1990,15 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus", "sp-maybe-compressed-blob", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-version", "tracing", ] @@ -2022,13 +2012,13 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-client-pov-recovery", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", "futures 0.3.31", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-network", @@ -2040,12 +2030,12 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", "sp-transaction-pool", ] @@ -2055,32 +2045,15 @@ version = "0.18.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "cumulus-pallet-parachain-system", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "pallet-aura", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "cumulus-pallet-dmp-queue" -version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" -dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -2090,31 +2063,31 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-message-queue", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "staging-xcm", "staging-xcm-builder", "trie-db", ] @@ -2133,14 +2106,14 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.1", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-runtime", ] [[package]] @@ -2148,14 +2121,14 @@ name = "cumulus-pallet-xcm" version = "0.18.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "staging-xcm", ] [[package]] @@ -2165,20 +2138,20 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-message-queue", "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] @@ -2188,7 +2161,7 @@ name = "cumulus-primitives-aura" version = "0.16.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus-aura", ] @@ -2198,30 +2171,14 @@ version = "0.17.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "cumulus-primitives-core" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-runtime", + "sp-trie", + "staging-xcm", ] [[package]] @@ -2230,26 +2187,12 @@ version = "0.17.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-inherents", + "sp-trie", ] [[package]] @@ -2257,19 +2200,9 @@ name = "cumulus-primitives-proof-size-hostfunction" version = "0.11.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "cumulus-primitives-timestamp" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" -dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-externalities", + "sp-runtime-interface", + "sp-trie", ] [[package]] @@ -2277,14 +2210,14 @@ name = "cumulus-primitives-utility" version = "0.18.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "frame-support", "log", "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] @@ -2295,7 +2228,7 @@ version = "0.22.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.31", "futures-timer", @@ -2306,11 +2239,11 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -2319,16 +2252,16 @@ version = "0.21.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "futures 0.3.31", "jsonrpsee-core 0.24.10", "parity-scale-codec", "polkadot-overseer", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-state-machine", + "sp-version", "thiserror 1.0.69", ] @@ -2339,16 +2272,16 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "array-bytes", "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures 0.3.31", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "polkadot-service", "sc-authority-discovery", "sc-client-api", @@ -2357,11 +2290,11 @@ dependencies = [ "sc-service", "sc-tracing", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "substrate-prometheus-endpoint", "tokio", "tracing", @@ -2373,7 +2306,7 @@ version = "0.21.2" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "either", "futures 0.3.31", @@ -2392,14 +2325,14 @@ dependencies = [ "serde_json", "smoldot 0.11.0", "smoldot-light 0.9.0", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-authority-discovery", "sp-consensus-babe", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-version", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -2413,12 +2346,12 @@ name = "cumulus-test-relay-sproof-builder" version = "0.17.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -3377,8 +3310,8 @@ dependencies = [ "async-trait", "fp-storage", "parity-scale-codec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -3390,10 +3323,10 @@ dependencies = [ "fp-consensus", "fp-rpc", "sc-consensus", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-consensus", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "thiserror 1.0.69", ] @@ -3413,9 +3346,9 @@ dependencies = [ "sc-client-db", "smallvec", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-database", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -3433,10 +3366,10 @@ dependencies = [ "parking_lot 0.12.5", "sc-client-api", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -3475,19 +3408,19 @@ dependencies = [ "sc-utils", "schnellru", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-timestamp", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -3519,10 +3452,10 @@ dependencies = [ "fp-storage", "parity-scale-codec", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-io", + "sp-runtime", + "sp-storage", ] [[package]] @@ -3711,11 +3644,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "staging-xcm", ] [[package]] @@ -3725,8 +3658,8 @@ source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2 dependencies = [ "ethereum", "parity-scale-codec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -3737,7 +3670,7 @@ dependencies = [ "ethereum", "ethereum-types", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "parity-scale-codec", ] @@ -3748,13 +3681,13 @@ source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2 dependencies = [ "environmental", "evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "num_enum", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -3767,10 +3700,10 @@ dependencies = [ "fp-evm", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -3778,11 +3711,11 @@ name = "fp-self-contained" version = "1.0.0-dev" source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2df49e2cc7981485392c31160929d1bd48" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -3805,46 +3738,22 @@ name = "frame-benchmarking" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-support-procedural 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "static_assertions", -] - -[[package]] -name = "frame-benchmarking" -version = "39.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "frame-support-procedural 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-support", + "frame-support-procedural", + "frame-system", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-storage", "static_assertions", ] @@ -3860,9 +3769,9 @@ dependencies = [ "comfy-table", "cumulus-client-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "gethostname", "handlebars", "hex", @@ -3870,8 +3779,8 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -3885,25 +3794,25 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", "sp-database", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-externalities", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-timestamp", "sp-transaction-pool", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-trie", + "sp-version", + "sp-wasm-interface", "subxt", "subxt-signer", "thiserror 1.0.69", @@ -3927,14 +3836,14 @@ version = "39.0.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "frame-election-provider-solution-type", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", "sp-npos-elections", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -3943,16 +3852,16 @@ version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "aquamarine", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-tracing", ] [[package]] @@ -3998,12 +3907,12 @@ dependencies = [ "array-bytes", "const-hex", "docify", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -4013,55 +3922,12 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "aquamarine", "array-bytes", - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata 18.0.0", - "frame-support-procedural 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "impl-trait-for-tuples", - "k256", - "log", - "macro_magic", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "smallvec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-metadata-ir 0.8.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "static_assertions", - "tt-call", -] - -[[package]] -name = "frame-support" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "aquamarine", - "array-bytes", - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "binary-merkle-tree", "bitflags 1.3.2", "docify", "environmental", "frame-metadata 18.0.0", - "frame-support-procedural 31.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", @@ -4072,22 +3938,22 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-metadata-ir 0.8.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-weights", "static_assertions", "tt-call", ] @@ -4102,7 +3968,7 @@ dependencies = [ "derive-syn-parse", "docify", "expander", - "frame-support-procedural-tools 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support-procedural-tools", "itertools 0.11.0", "macro_magic", "proc-macro-warning 1.84.1", @@ -4112,44 +3978,12 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "frame-support-procedural" -version = "31.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "docify", - "expander", - "frame-support-procedural-tools 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "itertools 0.11.0", - "macro_magic", - "proc-macro-warning 1.84.1", - "proc-macro2", - "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "syn 2.0.111", -] - [[package]] name = "frame-support-procedural-tools" version = "13.0.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support-procedural-tools-derive 12.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "proc-macro-crate 3.4.0", - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "frame-support-procedural-tools" -version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "frame-support-procedural-tools-derive 12.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-support-procedural-tools-derive", "proc-macro-crate 3.4.0", "proc-macro2", "quote", @@ -4166,16 +4000,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "frame-support-procedural-tools-derive" -version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "frame-system" version = "39.1.0" @@ -4183,37 +4007,17 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "cfg-if", "docify", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "frame-system" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "cfg-if", - "docify", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "sp-weights", ] [[package]] @@ -4221,13 +4025,13 @@ name = "frame-system-benchmarking" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -4237,7 +4041,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "docify", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", ] [[package]] @@ -4245,10 +4049,10 @@ name = "frame-try-runtime" version = "0.45.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-runtime", ] [[package]] @@ -4729,10 +4533,8 @@ dependencies = [ "cumulus-client-parachain-inherent", "cumulus-client-service", "cumulus-primitives-aura", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "cumulus-primitives-core", "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", "fc-api", "fc-consensus", "fc-db", @@ -4741,10 +4543,9 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-benchmarking-cli", - "frame-metadata-hash-extension", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "frame-system-rpc-runtime-api", "frame-try-runtime", "futures 0.3.31", @@ -4754,15 +4555,13 @@ dependencies = [ "log", "pallet-ethereum", "pallet-evm", - "pallet-omni-account-runtime-api", "pallet-transaction-payment", "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "paseo-runtime", "polkadot-cli", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-service", + "polkadot-primitives", "runtime-common", "sc-basic-authorship", "sc-chain-spec", @@ -4782,27 +4581,25 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-keystore", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-std", + "sp-timestamp", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", + "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", - "tokio", ] [[package]] @@ -4814,7 +4611,7 @@ dependencies = [ "chrono", "der", "ecdsa", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "heima-utils", "heima-utils-proc-macros", "hex", @@ -4827,10 +4624,10 @@ dependencies = [ "serde_json", "sha2 0.10.9", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "strum 0.27.2", "strum_macros 0.27.2", "x509-cert", @@ -4841,24 +4638,21 @@ name = "heima-runtime" version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "cumulus-primitives-timestamp", + "cumulus-primitives-core", "cumulus-primitives-utility", "fp-evm", "fp-rpc", "fp-self-contained", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-executive", "frame-metadata-hash-extension", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -4867,7 +4661,6 @@ dependencies = [ "hex-literal 1.1.0", "log", "num_enum", - "pallet-account-fix", "pallet-asset-manager", "pallet-assets", "pallet-assets-handler", @@ -4910,10 +4703,10 @@ dependencies = [ "pallet-proxy", "pallet-scheduler", "pallet-score-staking", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-state-trie-migration", "pallet-teebag", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -4923,30 +4716,26 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-utils", "runtime-common", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-std", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", "staging-parachain-info", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", @@ -7145,13 +6934,13 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-mmr-primitives", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -7162,11 +6951,11 @@ dependencies = [ "jsonrpsee 0.24.10", "parity-scale-codec", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-mmr-primitives", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -7800,30 +7589,13 @@ dependencies = [ name = "pallet-account-fix" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-aiusd-convertor" -version = "0.1.0" -dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "pallet-assets", + "frame-support", + "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-std", ] [[package]] @@ -7831,34 +7603,34 @@ name = "pallet-asset-conversion" version = "21.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-asset-manager" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", ] [[package]] @@ -7866,13 +7638,13 @@ name = "pallet-asset-rate" version = "18.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -7880,16 +7652,16 @@ name = "pallet-asset-tx-payment" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "pallet-transaction-payment", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -7897,23 +7669,23 @@ name = "pallet-assets" version = "41.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] name = "pallet-assets-handler" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "hex-literal 1.1.0", "pallet-assets", "pallet-balances", @@ -7923,10 +7695,10 @@ dependencies = [ "pallet-parachain-staking", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7934,15 +7706,15 @@ name = "pallet-aura" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -7950,14 +7722,14 @@ name = "pallet-authority-discovery" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", ] [[package]] @@ -7965,12 +7737,12 @@ name = "pallet-authorship" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -7978,22 +7750,22 @@ name = "pallet-babe" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-authorship", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-babe", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", ] [[package]] @@ -8003,18 +7775,18 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "aquamarine", "docify", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-tracing", ] [[package]] @@ -8023,13 +7795,13 @@ version = "40.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -8037,18 +7809,18 @@ name = "pallet-beefy" version = "40.1.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-authorship", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-staking", ] [[package]] @@ -8057,39 +7829,37 @@ version = "40.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "array-bytes", - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "binary-merkle-tree", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-beefy", "pallet-mmr", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus-beefy", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "pallet-bitacross" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "heima-primitives", "pallet-balances", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", ] [[package]] @@ -8097,49 +7867,47 @@ name = "pallet-bounties" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-bridge-common" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] name = "pallet-bridge-transfer" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "hex-literal 1.1.0", "pallet-assets", "pallet-assets-handler", "pallet-balances", "pallet-bridge-common", "pallet-chain-bridge", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8148,32 +7916,32 @@ version = "0.18.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "bitvec", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-runtime", ] [[package]] name = "pallet-chain-bridge" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8181,30 +7949,17 @@ name = "pallet-child-bounties" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bounties", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-collab-ai-common" -version = "0.1.0" -dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -8212,18 +7967,18 @@ name = "pallet-collator-selection" version = "20.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-balances", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-staking", ] [[package]] @@ -8232,15 +7987,15 @@ version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -8249,30 +8004,14 @@ version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "assert_matches", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-curator" -version = "0.1.0" -dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-balances", - "pallet-collab-ai-common", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", ] [[package]] @@ -8280,14 +8019,14 @@ name = "pallet-delegated-staking" version = "6.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-staking", ] [[package]] @@ -8295,16 +8034,16 @@ name = "pallet-democracy" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -8312,20 +8051,20 @@ name = "pallet-election-provider-multi-phase" version = "38.2.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "strum 0.26.3", ] @@ -8334,12 +8073,12 @@ name = "pallet-election-provider-support-benchmarking" version = "38.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -8347,17 +8086,17 @@ name = "pallet-elections-phragmen" version = "40.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-staking", ] [[package]] @@ -8373,14 +8112,14 @@ dependencies = [ "fp-evm", "fp-rpc", "fp-storage", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "pallet-evm", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-version", ] [[package]] @@ -8392,59 +8131,33 @@ dependencies = [ "evm", "fp-account", "fp-evm", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "hash-db", "hex-literal 0.4.1", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-evm-assertions" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-evm-precompile-aiusd-convertor" -version = "0.1.0" -dependencies = [ - "derive_more 2.0.1", - "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "libsecp256k1", - "pallet-aiusd-convertor", - "pallet-assets", + "frame-support", + "frame-system", "pallet-balances", - "pallet-evm", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", "parity-scale-codec", - "precompile-utils", "scale-info", - "serde", - "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8453,21 +8166,21 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "pallet-assets", "pallet-balances", "pallet-evm", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "precompile-utils", "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8484,7 +8197,7 @@ version = "2.0.0-dev" source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2df49e2cc7981485392c31160929d1bd48" dependencies = [ "fp-evm", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "substrate-bn", ] @@ -8494,47 +8207,18 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "hex-literal 1.1.0", "libsecp256k1", "pallet-bridge-transfer", "pallet-evm", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-evm-precompile-curator" -version = "0.1.0" -dependencies = [ - "derive_more 2.0.1", - "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "libsecp256k1", - "pallet-balances", - "pallet-collab-ai-common", - "pallet-curator", - "pallet-evm", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", + "pallet-timestamp", "precompile-utils", - "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -8543,10 +8227,10 @@ version = "2.0.0-dev" source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2df49e2cc7981485392c31160929d1bd48" dependencies = [ "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "pallet-evm", "parity-scale-codec", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -8558,56 +8242,6 @@ dependencies = [ "fp-evm", ] -[[package]] -name = "pallet-evm-precompile-guardian" -version = "0.1.0" -dependencies = [ - "derive_more 2.0.1", - "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "libsecp256k1", - "pallet-balances", - "pallet-collab-ai-common", - "pallet-evm", - "pallet-guardian", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-evm-precompile-investing-pool" -version = "0.1.0" -dependencies = [ - "derive_more 2.0.1", - "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "libsecp256k1", - "pallet-collab-ai-common", - "pallet-evm", - "pallet-investing-pool", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" @@ -8623,22 +8257,19 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "heima-primitives", "hex-literal 1.1.0", "libsecp256k1", "pallet-evm", "pallet-omni-bridge", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", + "pallet-timestamp", "precompile-utils", - "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -8647,45 +8278,21 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "pallet-balances", "pallet-evm", "pallet-parachain-staking", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-evm-precompile-pool-proposal" -version = "0.1.0" -dependencies = [ - "derive_more 2.0.1", - "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "hex-literal 1.1.0", - "libsecp256k1", - "pallet-collab-ai-common", - "pallet-evm", - "pallet-pool-proposal", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "precompile-utils", "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8694,23 +8301,23 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "heima-primitives", "pallet-balances", "pallet-evm", "pallet-parachain-staking", "pallet-score-staking", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "precompile-utils", "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8729,7 +8336,7 @@ source = "git+https://github.com/polkadot-evm/frontier?branch=stable2412#75329a2 dependencies = [ "fp-evm", "ripemd", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", ] [[package]] @@ -8738,39 +8345,35 @@ version = "0.1.0" dependencies = [ "derive_more 2.0.1", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "hex-literal 1.1.0", "libsecp256k1", "pallet-evm", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-vesting", - "parity-scale-codec", "precompile-utils", - "scale-info", "serde", "sha3", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-extrinsic-filter" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-balances", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8779,16 +8382,16 @@ version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-staking", ] [[package]] @@ -8796,91 +8399,57 @@ name = "pallet-grandpa" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-authorship", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", ] [[package]] -name = "pallet-guardian" -version = "0.1.0" +name = "pallet-identity" +version = "39.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-balances", - "pallet-collab-ai-common", + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", ] [[package]] -name = "pallet-halving-mint" +name = "pallet-identity-management" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-assets", + "frame-benchmarking", + "frame-support", + "frame-system", + "heima-primitives", "pallet-balances", + "pallet-teebag", + "pallet-timestamp", + "pallet-utility", "parity-scale-codec", "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-identity" -version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" -dependencies = [ - "enumflags2", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-identity-management" -version = "0.1.0" -dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "heima-primitives", - "pallet-balances", - "pallet-teebag", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8888,18 +8457,18 @@ name = "pallet-im-online" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", ] [[package]] @@ -8907,34 +8476,15 @@ name = "pallet-indices" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-investing-pool" -version = "0.1.0" -dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-assets", - "pallet-balances", - "pallet-collab-ai-common", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -8942,15 +8492,15 @@ name = "pallet-membership" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -8959,17 +8509,17 @@ version = "42.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "environmental", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8979,15 +8529,15 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "cfg-if", "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -8995,16 +8545,16 @@ name = "pallet-mmr" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-mmr-primitives", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -9023,14 +8573,14 @@ name = "pallet-nis" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-runtime", ] [[package]] @@ -9038,17 +8588,17 @@ name = "pallet-nomination-pools" version = "37.0.2" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-tracing", ] [[package]] @@ -9056,19 +8606,19 @@ name = "pallet-nomination-pools-benchmarking" version = "37.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "pallet-bags-list", "pallet-delegated-staking", "pallet-nomination-pools", "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-runtime-interface", + "sp-staking", ] [[package]] @@ -9078,7 +8628,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", ] [[package]] @@ -9086,15 +8636,15 @@ name = "pallet-offences" version = "38.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-staking", ] [[package]] @@ -9102,42 +8652,41 @@ name = "pallet-offences-benchmarking" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-babe", "pallet-balances", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-staking", ] [[package]] name = "pallet-omni-account" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "heima-primitives", "pallet-balances", "pallet-teebag", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-utility", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", "sp-keyring", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-std", ] [[package]] @@ -9145,52 +8694,51 @@ name = "pallet-omni-account-runtime-api" version = "0.1.0" dependencies = [ "heima-primitives", - "pallet-omni-account", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", ] [[package]] name = "pallet-omni-bridge" version = "0.1.0" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "heima-primitives", "hex", "pallet-assets", "pallet-balances", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-parachain-staking" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "heima-primitives", "log", "pallet-authorship", "pallet-balances", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "scale-info", "serde", "similar-asserts", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", "substrate-fixed", ] @@ -9200,34 +8748,15 @@ version = "0.10.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-pool-proposal" -version = "0.1.0" -dependencies = [ - "bitflags 2.10.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-assets", - "pallet-balances", - "pallet-collab-ai-common", - "pallet-multisig", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -9235,15 +8764,15 @@ name = "pallet-preimage" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9261,17 +8790,17 @@ name = "pallet-ranked-collective" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9279,13 +8808,13 @@ name = "pallet-recovery" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", ] [[package]] @@ -9294,16 +8823,16 @@ version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "assert_matches", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-io", + "sp-runtime", ] [[package]] @@ -9311,13 +8840,13 @@ name = "pallet-root-testing" version = "15.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9326,24 +8855,23 @@ version = "40.2.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-score-staking" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "heima-primitives", "num-integer", "pallet-balances", @@ -9351,11 +8879,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-std", ] [[package]] @@ -9363,41 +8891,20 @@ name = "pallet-session" version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "impl-trait-for-tuples", - "log", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-session" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -9405,15 +8912,15 @@ name = "pallet-session-benchmarking" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", "pallet-staking", "parity-scale-codec", "rand 0.8.5", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", ] [[package]] @@ -9421,16 +8928,16 @@ name = "pallet-society" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-io", + "sp-runtime", ] [[package]] @@ -9438,21 +8945,21 @@ name = "pallet-staking" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-authorship", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", "serde", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", ] [[package]] @@ -9461,7 +8968,7 @@ version = "22.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "log", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", ] [[package]] @@ -9470,8 +8977,8 @@ version = "25.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-staking", ] [[package]] @@ -9479,15 +8986,15 @@ name = "pallet-state-trie-migration" version = "43.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9496,13 +9003,13 @@ version = "39.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", ] [[package]] @@ -9513,25 +9020,25 @@ dependencies = [ "chrono", "der", "env_logger 0.11.8", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "heima-primitives", "hex", "hex-literal 1.1.0", "log", "pallet-balances", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-utility", "parity-scale-codec", "scale-info", "serde", "serde_json", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-std", "x509-cert", ] @@ -9541,36 +9048,17 @@ version = "38.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "pallet-timestamp" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "docify", - "frame-benchmarking 39.1.1", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-storage", + "sp-timestamp", ] [[package]] @@ -9578,17 +9066,17 @@ name = "pallet-tips" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-treasury", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9596,15 +9084,15 @@ name = "pallet-transaction-payment" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -9615,12 +9103,12 @@ dependencies = [ "jsonrpsee 0.24.10", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-rpc", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-weights", ] [[package]] @@ -9630,9 +9118,9 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] @@ -9641,17 +9129,17 @@ version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -9659,34 +9147,34 @@ name = "pallet-utility" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-vc-management" version = "0.1.0" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "heima-primitives", "pallet-balances", "pallet-teebag", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-utility", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -9694,13 +9182,13 @@ name = "pallet-vesting" version = "39.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -9708,13 +9196,13 @@ name = "pallet-whitelist" version = "38.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-runtime", ] [[package]] @@ -9723,17 +9211,17 @@ version = "18.1.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "bounded-collections", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "tracing", @@ -9745,14 +9233,14 @@ name = "pallet-xcm-benchmarks" version = "18.1.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] @@ -9762,10 +9250,10 @@ name = "parachains-common" version = "19.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", "cumulus-primitives-utility", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -9775,14 +9263,14 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "scale-info", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", "staging-parachain-info", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "staging-xcm", "staging-xcm-executor", "substrate-wasm-builder", ] @@ -9921,24 +9409,21 @@ name = "paseo-runtime" version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "cumulus-primitives-timestamp", + "cumulus-primitives-core", "cumulus-primitives-utility", "fp-evm", "fp-rpc", "fp-self-contained", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-executive", "frame-metadata-hash-extension", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -9946,8 +9431,6 @@ dependencies = [ "hex-literal 1.1.0", "log", "num_enum", - "pallet-account-fix", - "pallet-aiusd-convertor", "pallet-asset-manager", "pallet-assets", "pallet-assets-handler", @@ -9958,37 +9441,28 @@ dependencies = [ "pallet-bounties", "pallet-bridge-transfer", "pallet-chain-bridge", - "pallet-collab-ai-common", "pallet-collective", "pallet-conviction-voting", - "pallet-curator", "pallet-democracy", "pallet-ethereum", "pallet-evm", "pallet-evm-assertions", - "pallet-evm-precompile-aiusd-convertor", "pallet-evm-precompile-assets-erc20", "pallet-evm-precompile-blake2", "pallet-evm-precompile-bn128", "pallet-evm-precompile-bridge-transfer", - "pallet-evm-precompile-curator", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-ed25519", - "pallet-evm-precompile-guardian", - "pallet-evm-precompile-investing-pool", "pallet-evm-precompile-modexp", "pallet-evm-precompile-omni-bridge", "pallet-evm-precompile-parachain-staking", - "pallet-evm-precompile-pool-proposal", "pallet-evm-precompile-score-staking", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", "pallet-evm-precompile-vesting", "pallet-extrinsic-filter", - "pallet-guardian", "pallet-identity", "pallet-identity-management", - "pallet-investing-pool", "pallet-membership", "pallet-message-queue", "pallet-migrations", @@ -9997,17 +9471,16 @@ dependencies = [ "pallet-omni-account-runtime-api", "pallet-omni-bridge", "pallet-parachain-staking", - "pallet-pool-proposal", "pallet-preimage", "pallet-proxy", "pallet-referenda", "pallet-scheduler", "pallet-score-staking", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-state-trie-migration", "pallet-sudo", "pallet-teebag", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -10019,29 +9492,26 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-utils", "runtime-common", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-std", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", "staging-parachain-info", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", @@ -10241,7 +9711,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "tracing-gum", ] @@ -10257,7 +9727,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "tracing-gum", ] @@ -10276,12 +9746,12 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "sc-network", "schnellru", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", ] @@ -10300,7 +9770,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "sc-network", "schnellru", @@ -10338,11 +9808,11 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-keyring", "sp-maybe-compressed-blob", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "substrate-build-script-utils", "thiserror 1.0.69", ] @@ -10360,11 +9830,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "schnellru", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror 1.0.69", "tokio-util", "tracing-gum", @@ -10377,19 +9847,8 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "polkadot-core-primitives" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-runtime", ] [[package]] @@ -10408,11 +9867,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", ] @@ -10424,10 +9883,10 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-trie", "thiserror 1.0.69", ] @@ -10441,15 +9900,15 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", "tracing-gum", ] @@ -10469,7 +9928,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-network", "sp-consensus", "thiserror 1.0.69", @@ -10487,9 +9946,9 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "schnellru", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-maybe-compressed-blob", "thiserror 1.0.69", "tracing-gum", @@ -10513,17 +9972,17 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", "schnellru", "schnorrkel 0.11.5", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-runtime", "thiserror 1.0.69", "tracing-gum", ] @@ -10545,15 +10004,15 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-runtime", "thiserror 1.0.69", "tracing-gum", ] @@ -10573,7 +10032,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sp-consensus", "thiserror 1.0.69", "tracing-gum", @@ -10591,11 +10050,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-statement-table", "schnellru", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", ] @@ -10608,8 +10067,8 @@ dependencies = [ "futures 0.3.31", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", "wasm-timer", @@ -10630,10 +10089,10 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sp-application-crypto", + "sp-keystore", "tracing-gum", ] @@ -10663,7 +10122,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "thiserror 1.0.69", "tracing-gum", ] @@ -10680,7 +10139,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-keystore", "schnellru", "thiserror 1.0.69", @@ -10697,9 +10156,9 @@ dependencies = [ "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sp-blockchain", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-inherents", "thiserror 1.0.69", "tracing-gum", ] @@ -10713,7 +10172,7 @@ dependencies = [ "futures 0.3.31", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "thiserror 1.0.69", "tracing-gum", ] @@ -10730,7 +10189,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "schnellru", "thiserror 1.0.69", "tracing-gum", @@ -10749,16 +10208,16 @@ dependencies = [ "futures-timer", "parity-scale-codec", "pin-project", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "rand 0.8.5", "slotmap", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "strum 0.26.3", "tempfile", "thiserror 1.0.69", @@ -10776,8 +10235,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", ] @@ -10793,17 +10252,17 @@ dependencies = [ "libc", "nix 0.28.0", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "seccompiler", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-externalities", + "sp-io", + "sp-tracing", "thiserror 1.0.69", "tracing-gum", ] @@ -10817,7 +10276,7 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "schnellru", "sp-consensus-babe", "tracing-gum", @@ -10833,7 +10292,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "prioritized-metered-channel", "sc-cli", "sc-service", @@ -10856,12 +10315,12 @@ dependencies = [ "hex", "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "rand 0.8.5", "sc-authority-discovery", "sc-network", "sc-network-types", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "strum 0.26.3", "thiserror 1.0.69", "tracing-gum", @@ -10877,18 +10336,18 @@ dependencies = [ "futures 0.3.31", "futures-timer", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "sc-keystore", "schnorrkel 0.11.5", "serde", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-core", + "sp-keystore", "sp-maybe-compressed-blob", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "thiserror 1.0.69", "zstd 0.12.4", ] @@ -10915,18 +10374,18 @@ dependencies = [ "orchestra", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "polkadot-statement-table", "sc-client-api", "sc-network", "sc-network-types", "sc-transaction-pool-api", "smallvec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-authority-discovery", "sp-blockchain", "sp-consensus-babe", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -10954,14 +10413,14 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "prioritized-metered-channel", "rand 0.8.5", "sc-client-api", "schnellru", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror 1.0.69", "tracing-gum", ] @@ -10980,10 +10439,10 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-client-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -10996,28 +10455,12 @@ dependencies = [ "bounded-collections", "derive_more 0.99.20", "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "bounded-collections", - "derive_more 0.99.20", - "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "polkadot-core-primitives", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] @@ -11029,50 +10472,22 @@ dependencies = [ "hex-literal 0.4.1", "log", "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "scale-info", - "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", -] - -[[package]] -name = "polkadot-primitives" -version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "bitvec", - "hex-literal 0.4.1", - "log", - "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", "thiserror 1.0.69", ] @@ -11084,7 +10499,7 @@ dependencies = [ "jsonrpsee 0.24.10", "mmr-rpc", "pallet-transaction-payment-rpc", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -11098,15 +10513,15 @@ dependencies = [ "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-beefy", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", + "sp-runtime", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -11117,10 +10532,10 @@ version = "18.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "bitvec", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "libsecp256k1", "log", @@ -11132,31 +10547,31 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-identity", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-staking", "pallet-staking-reward-fn", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "polkadot-runtime-parachains", "rustc-hex", "scale-info", "serde", "serde_derive", "slot-range-helper", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-inherents", + "sp-io", "sp-keyring", "sp-npos-elections", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-staking", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", @@ -11168,10 +10583,10 @@ version = "18.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "bs58", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-tracing", ] [[package]] @@ -11182,9 +10597,9 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more 0.99.20", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-authority-discovery", @@ -11194,31 +10609,31 @@ dependencies = [ "pallet-broker", "pallet-message-queue", "pallet-mmr", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-staking", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-vesting", "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", "rand_chacha 0.3.1", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "staging-xcm", "staging-xcm-executor", "static_assertions", ] @@ -11229,32 +10644,32 @@ version = "0.8.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "docify", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-executive", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-arithmetic", "sp-block-builder", "sp-consensus-aura", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-storage", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", ] [[package]] @@ -11263,9 +10678,9 @@ version = "22.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "async-trait", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-benchmarking-cli", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-system", "frame-system-rpc-runtime-api", "futures 0.3.31", "is_executable", @@ -11283,7 +10698,7 @@ dependencies = [ "polkadot-availability-distribution", "polkadot-availability-recovery", "polkadot-collator-protocol", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -11309,7 +10724,7 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "polkadot-rpc", "polkadot-runtime-parachains", "polkadot-statement-distribution", @@ -11336,28 +10751,28 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-authority-discovery", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-timestamp", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", + "sp-weights", + "staging-xcm", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tracing-gum", @@ -11381,9 +10796,9 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-keystore", + "sp-staking", "thiserror 1.0.69", "tracing-gum", ] @@ -11394,8 +10809,8 @@ version = "17.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "parity-scale-codec", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", + "sp-core", "tracing-gum", ] @@ -11583,8 +10998,8 @@ dependencies = [ "environmental", "evm", "fp-evm", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "hex", "hex-literal 0.4.1", "impl-trait-for-tuples", @@ -11596,11 +11011,11 @@ dependencies = [ "scale-info", "serde", "similar-asserts", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", ] [[package]] @@ -12393,13 +11808,13 @@ name = "rococo-runtime" version = "21.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "binary-merkle-tree", "bitvec", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-executive", "frame-metadata-hash-extension", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -12436,12 +11851,12 @@ dependencies = [ "pallet-referenda", "pallet-root-testing", "pallet-scheduler", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-society", "pallet-staking", "pallet-state-trie-migration", "pallet-sudo", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -12452,8 +11867,8 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "rococo-runtime-constants", @@ -12462,27 +11877,27 @@ dependencies = [ "serde_derive", "serde_json", "smallvec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-storage", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", @@ -12495,14 +11910,14 @@ name = "rococo-runtime-constants" version = "18.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", "staging-xcm-builder", ] @@ -12555,13 +11970,10 @@ dependencies = [ name = "runtime-common" version = "0.1.0" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "cumulus-primitives-parachain-inherent 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "cumulus-test-relay-sproof-builder", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "frame-support", + "frame-system", "heima-primitives", - "log", "pallet-asset-manager", "pallet-assets", "pallet-authorship", @@ -12579,18 +11991,16 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "parity-scale-codec", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "staging-parachain-info", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "xcm-simulator", @@ -12946,8 +12356,8 @@ version = "30.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "log", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-wasm-interface", "thiserror 1.0.69", ] @@ -12971,12 +12381,12 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-types", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-authority-discovery", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -12994,12 +12404,12 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-inherents", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -13009,13 +12419,13 @@ version = "0.43.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "parity-scale-codec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-trie", ] [[package]] @@ -13036,13 +12446,13 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-genesis-builder", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-tracing", ] [[package]] @@ -13088,12 +12498,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-keyring", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-panic-handler 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", + "sp-panic-handler", + "sp-runtime", + "sp-version", "thiserror 1.0.69", "tokio", ] @@ -13111,17 +12521,17 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-database", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-externalities", + "sp-runtime", + "sp-state-machine", "sp-statement-store", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] @@ -13142,13 +12552,13 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-database", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -13165,12 +12575,12 @@ dependencies = [ "sc-network-types", "sc-utils", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -13189,17 +12599,17 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -13224,18 +12634,18 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -13251,14 +12661,14 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror 1.0.69", ] @@ -13282,16 +12692,16 @@ dependencies = [ "sc-network-sync", "sc-network-types", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -13311,10 +12721,10 @@ dependencies = [ "sc-consensus-beefy", "sc-rpc", "serde", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", "sp-consensus-beefy", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "thiserror 1.0.69", ] @@ -13328,7 +12738,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -13361,16 +12771,16 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", ] @@ -13390,8 +12800,8 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "thiserror 1.0.69", ] @@ -13408,14 +12818,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -13429,15 +12839,15 @@ dependencies = [ "sc-executor-polkavm", "sc-executor-wasmtime", "schnellru", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-panic-handler 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-trie", + "sp-version", + "sp-wasm-interface", "tracing", ] @@ -13449,7 +12859,7 @@ dependencies = [ "polkavm", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-wasm-interface", "thiserror 1.0.69", "wasm-instrument", ] @@ -13462,7 +12872,7 @@ dependencies = [ "log", "polkavm", "sc-executor-common", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-wasm-interface", ] [[package]] @@ -13478,8 +12888,8 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime-interface", + "sp-wasm-interface", "wasmtime", ] @@ -13497,7 +12907,7 @@ dependencies = [ "sc-network-common", "sc-network-sync", "sp-blockchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -13508,9 +12918,9 @@ dependencies = [ "array-bytes", "parking_lot 0.12.5", "serde_json", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror 1.0.69", ] @@ -13534,12 +12944,12 @@ dependencies = [ "sc-network", "sc-network-types", "sc-transaction-pool-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", "sp-mixnet", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "thiserror 1.0.69", ] @@ -13580,10 +12990,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -13609,7 +13019,7 @@ dependencies = [ "sc-network-types", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -13626,7 +13036,7 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -13647,8 +13057,8 @@ dependencies = [ "sc-network", "sc-network-types", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "thiserror 1.0.69", ] @@ -13676,12 +13086,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", "tokio", @@ -13703,7 +13113,7 @@ dependencies = [ "sc-network-types", "sc-utils", "sp-consensus", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -13751,12 +13161,12 @@ dependencies = [ "sc-network-types", "sc-transaction-pool-api", "sc-utils", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "threadpool", "tracing", ] @@ -13789,16 +13199,16 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", "sp-statement-store", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", "tokio", ] @@ -13815,10 +13225,10 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-rpc", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-version", "thiserror 1.0.69", ] @@ -13867,12 +13277,12 @@ dependencies = [ "sc-transaction-pool-api", "schnellru", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-rpc", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-version", "thiserror 1.0.69", "tokio", "tokio-stream", @@ -13919,20 +13329,20 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-trie", + "sp-version", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -13950,7 +13360,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.5", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", ] [[package]] @@ -13961,7 +13371,7 @@ dependencies = [ "clap", "fs4", "log", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "thiserror 1.0.69", "tokio", ] @@ -13981,7 +13391,7 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", "thiserror 1.0.69", ] @@ -14000,10 +13410,10 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-std", ] [[package]] @@ -14042,12 +13452,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-rpc", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-tracing", "thiserror 1.0.69", "tracing", "tracing-log", @@ -14083,12 +13493,12 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror 1.0.69", @@ -14107,8 +13517,8 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "thiserror 1.0.69", ] @@ -14123,7 +13533,7 @@ dependencies = [ "log", "parking_lot 0.12.5", "prometheus", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", ] [[package]] @@ -14721,7 +14131,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -15048,37 +14458,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 21.0.0", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-metadata-ir 0.8.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", -] - -[[package]] -name = "sp-api" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "docify", - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro 21.0.2", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-metadata-ir 0.8.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", + "sp-metadata-ir", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-trie", + "sp-version", "thiserror 1.0.69", ] @@ -15096,20 +14484,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "sp-api-proc-macro" -version = "21.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "Inflector", - "blake2 0.10.6", - "expander", - "proc-macro-crate 3.4.0", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "sp-application-crypto" version = "39.0.0" @@ -15118,20 +14492,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-application-crypto" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-io", ] [[package]] @@ -15148,20 +14510,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-arithmetic" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "docify", - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "static_assertions", -] - [[package]] name = "sp-authority-discovery" version = "35.0.0" @@ -15169,21 +14517,9 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-authority-discovery" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-application-crypto", + "sp-runtime", ] [[package]] @@ -15191,9 +14527,9 @@ name = "sp-block-builder" version = "35.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-inherents", + "sp-runtime", ] [[package]] @@ -15205,12 +14541,12 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.5", "schnellru", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-consensus", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-database", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-state-machine", "thiserror 1.0.69", "tracing", ] @@ -15223,10 +14559,10 @@ dependencies = [ "async-trait", "futures 0.3.31", "log", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror 1.0.69", ] @@ -15238,12 +14574,12 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-timestamp", ] [[package]] @@ -15255,13 +14591,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-consensus-slots 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp", ] [[package]] @@ -15272,15 +14608,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-keystore", "sp-mmr-primitives", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-weights", "strum 0.26.3", ] @@ -15294,11 +14630,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", ] [[package]] @@ -15309,18 +14645,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-consensus-slots" -version = "0.41.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-timestamp 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-timestamp", ] [[package]] @@ -15356,59 +14681,13 @@ dependencies = [ "secrecy", "serde", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", - "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", - "tracing", - "w3f-bls", - "zeroize", -] - -[[package]] -name = "sp-core" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "array-bytes", - "bitflags 1.3.2", - "blake2 0.10.6", - "bounded-collections", - "bs58", - "dyn-clonable", - "ed25519-zebra", - "futures 0.3.31", - "hash-db", - "hash256-std-hasher", - "impl-serde 0.5.0", - "itertools 0.11.0", - "k256", - "libsecp256k1", - "log", - "merlin", - "parity-bip39", - "parity-scale-codec", - "parking_lot 0.12.5", - "paste", - "primitive-types 0.13.1", - "rand 0.8.5", - "scale-info", - "schnorrkel 0.11.5", - "secp256k1 0.28.2", - "secrecy", - "serde", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "ss58-registry", - "substrate-bip39 0.6.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "substrate-bip39", "thiserror 1.0.69", "tracing", "w3f-bls", @@ -15442,19 +14721,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "sp-crypto-hashing" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.9", - "sha3", - "twox-hash", -] - [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" @@ -15465,16 +14731,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "sp-crypto-hashing-proc-macro" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "syn 2.0.111", -] - [[package]] name = "sp-database" version = "10.0.0" @@ -15494,16 +14750,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "sp-debug-derive" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "sp-externalities" version = "0.30.0" @@ -15511,17 +14757,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-externalities" -version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-storage", ] [[package]] @@ -15532,20 +14768,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-genesis-builder" -version = "0.16.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde_json", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-runtime", ] [[package]] @@ -15557,20 +14781,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", -] - -[[package]] -name = "sp-inherents" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-runtime", "thiserror 1.0.69", ] @@ -15588,40 +14799,14 @@ dependencies = [ "polkavm-derive", "rustversion", "secp256k1 0.28.2", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "tracing", - "tracing-core", -] - -[[package]] -name = "sp-io" -version = "39.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "bytes", - "docify", - "ed25519-dalek", - "libsecp256k1", - "log", - "parity-scale-codec", - "polkavm-derive", - "rustversion", - "secp256k1 0.28.2", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-tracing", + "sp-trie", "tracing", "tracing-core", ] @@ -15631,8 +14816,8 @@ name = "sp-keyring" version = "40.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", "strum 0.26.3", ] @@ -15643,19 +14828,8 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "parking_lot 0.12.5", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-keystore" -version = "0.41.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.5", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-externalities", ] [[package]] @@ -15677,16 +14851,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "sp-metadata-ir" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "frame-metadata 18.0.0", - "parity-scale-codec", - "scale-info", -] - [[package]] name = "sp-mixnet" version = "0.13.0" @@ -15694,8 +14858,8 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", ] [[package]] @@ -15708,10 +14872,10 @@ dependencies = [ "polkadot-ckb-merkle-mountain-range", "scale-info", "serde", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-debug-derive", + "sp-runtime", "thiserror 1.0.69", ] @@ -15723,9 +14887,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-runtime", ] [[package]] @@ -15733,9 +14897,9 @@ name = "sp-offchain" version = "35.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-core", + "sp-runtime", ] [[package]] @@ -15747,15 +14911,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-panic-handler" -version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "backtrace", - "regex", -] - [[package]] name = "sp-rpc" version = "33.0.0" @@ -15763,7 +14918,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "rustc-hash 1.1.0", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", ] [[package]] @@ -15771,36 +14926,7 @@ name = "sp-runtime" version = "40.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "docify", - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "num-traits", - "parity-scale-codec", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "simple-mermaid", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "tracing", - "tuplex", -] - -[[package]] -name = "sp-runtime" -version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "binary-merkle-tree", "docify", "either", "hash256-std-hasher", @@ -15813,13 +14939,13 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-trie", + "sp-weights", "tracing", "tuplex", ] @@ -15834,31 +14960,12 @@ dependencies = [ "parity-scale-codec", "polkavm-derive", "primitive-types 0.13.1", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface-proc-macro 18.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "polkavm-derive", - "primitive-types 0.13.1", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime-interface-proc-macro 18.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-wasm-interface 21.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] @@ -15875,19 +14982,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "Inflector", - "expander", - "proc-macro-crate 3.4.0", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "sp-session" version = "37.0.0" @@ -15895,25 +14989,11 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-session" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-keystore 0.41.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-api", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-staking", ] [[package]] @@ -15925,21 +15005,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-staking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-runtime", ] [[package]] @@ -15953,30 +15020,10 @@ dependencies = [ "parking_lot 0.12.5", "rand 0.8.5", "smallvec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-panic-handler 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", - "tracing", - "trie-db", -] - -[[package]] -name = "sp-state-machine" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.12.5", - "rand 0.8.5", - "smallvec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-panic-handler 13.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", "thiserror 1.0.69", "tracing", "trie-db", @@ -15995,13 +15042,13 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.9", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime-interface 29.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", "thiserror 1.0.69", "x25519-dalek", ] @@ -16011,11 +15058,6 @@ name = "sp-std" version = "14.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" -[[package]] -name = "sp-std" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" - [[package]] name = "sp-storage" version = "22.0.0" @@ -16025,19 +15067,7 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-storage" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "impl-serde 0.5.0", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-debug-derive", ] [[package]] @@ -16047,20 +15077,8 @@ source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412 dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", -] - -[[package]] -name = "sp-timestamp" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-inherents", + "sp-runtime", "thiserror 1.0.69", ] @@ -16075,24 +15093,13 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sp-tracing" -version = "17.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-transaction-pool" version = "35.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-runtime", ] [[package]] @@ -16103,10 +15110,10 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-trie", ] [[package]] @@ -16123,30 +15130,8 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", - "tracing", - "trie-db", - "trie-root", -] - -[[package]] -name = "sp-trie" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "ahash", - "hash-db", - "memory-db", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.5", - "rand 0.8.5", - "scale-info", - "schnellru", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-core", + "sp-externalities", "thiserror 1.0.69", "tracing", "trie-db", @@ -16163,27 +15148,10 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version-proc-macro 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "thiserror 1.0.69", -] - -[[package]] -name = "sp-version" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "impl-serde 0.5.0", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-crypto-hashing-proc-macro 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-version-proc-macro 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-crypto-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", "thiserror 1.0.69", ] @@ -16199,18 +15167,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "sp-version-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "parity-scale-codec", - "proc-macro-warning 1.84.1", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "sp-wasm-interface" version = "21.0.1" @@ -16223,17 +15179,6 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sp-wasm-interface" -version = "21.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", -] - [[package]] name = "sp-weights" version = "31.0.0" @@ -16244,22 +15189,8 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "sp-weights" -version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "bounded-collections", - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-arithmetic", + "sp-debug-derive", ] [[package]] @@ -16319,12 +15250,12 @@ name = "staging-parachain-info" version = "0.18.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "cumulus-primitives-core 0.17.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", ] [[package]] @@ -16336,37 +15267,16 @@ dependencies = [ "bounded-collections", "derivative", "environmental", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "hex-literal 0.4.1", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "xcm-procedural 11.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", -] - -[[package]] -name = "staging-xcm" -version = "15.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "array-bytes", - "bounded-collections", - "derivative", - "environmental", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "hex-literal 0.4.1", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", - "xcm-procedural 11.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2412)", + "sp-runtime", + "sp-weights", + "xcm-procedural", ] [[package]] @@ -16374,20 +15284,20 @@ name = "staging-xcm-builder" version = "18.2.1" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-asset-conversion", "pallet-transaction-payment", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", "staging-xcm-executor", ] @@ -16397,17 +15307,17 @@ version = "18.0.3" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "environmental", - "frame-benchmarking 39.1.0", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-benchmarking", + "frame-support", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-weights", + "staging-xcm", "tracing", ] @@ -16528,18 +15438,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "substrate-bip39" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "hmac 0.12.1", - "pbkdf2", - "schnorrkel 0.11.5", - "sha2 0.10.9", - "zeroize", -] - [[package]] name = "substrate-bn" version = "0.6.0" @@ -16582,11 +15480,11 @@ dependencies = [ "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", ] [[package]] @@ -16613,10 +15511,10 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "serde", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-state-machine 0.44.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-trie 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", "trie-db", ] @@ -16648,11 +15546,11 @@ dependencies = [ "polkavm-linker", "sc-executor", "shlex", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-io", "sp-maybe-compressed-blob", - "sp-tracing 17.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-tracing", + "sp-version", "strum 0.26.3", "tempfile", "toml 0.8.23", @@ -17417,7 +16315,7 @@ version = "17.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ "coarsetime", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-primitives", "tracing", "tracing-gum-proc-macro", ] @@ -18303,14 +17201,14 @@ name = "westend-runtime" version = "21.2.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "binary-merkle-tree 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "binary-merkle-tree", "bitvec", - "frame-benchmarking 39.1.0", + "frame-benchmarking", "frame-election-provider-support", "frame-executive", "frame-metadata-hash-extension", - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -18352,14 +17250,14 @@ dependencies = [ "pallet-referenda", "pallet-root-testing", "pallet-scheduler", - "pallet-session 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-session", "pallet-session-benchmarking", "pallet-society", "pallet-staking", "pallet-staking-runtime-api", "pallet-state-trie-migration", "pallet-sudo", - "pallet-timestamp 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -18369,8 +17267,8 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", @@ -18378,29 +17276,29 @@ dependencies = [ "serde_derive", "serde_json", "smallvec", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-application-crypto 39.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-arithmetic 26.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-authority-discovery 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-genesis-builder 0.16.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-inherents 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-session 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-staking 37.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-storage 22.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-storage", "sp-transaction-pool", - "sp-version 38.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-version", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", @@ -18413,14 +17311,14 @@ name = "westend-runtime-constants" version = "18.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", "staging-xcm-builder", ] @@ -18965,28 +17863,17 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "xcm-procedural" -version = "11.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2412#33663108c248b645ef106e4e9d07598d34ac89ac" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "xcm-runtime-apis" version = "0.5.3" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", "parity-scale-codec", "scale-info", - "sp-api 35.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-weights 31.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-api", + "sp-weights", + "staging-xcm", "staging-xcm-executor", ] @@ -18995,19 +17882,19 @@ name = "xcm-simulator" version = "18.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753" dependencies = [ - "frame-support 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "frame-system 39.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "frame-support", + "frame-system", "parity-scale-codec", "paste", - "polkadot-core-primitives 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-parachain-primitives 15.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "polkadot-primitives 17.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-io 39.0.1 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-runtime 40.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", - "staging-xcm 15.1.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6)", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index 6fcf46155f..483bc60921 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -8,13 +8,6 @@ members = [ 'pallets/bridge/chain-bridge', 'pallets/bridge/bridge-transfer', 'pallets/bridge/common', - 'pallets/collab-ai/aiusd-convertor', - 'pallets/collab-ai/common', - 'pallets/collab-ai/curator', - 'pallets/collab-ai/guardian', - 'pallets/collab-ai/halving-mint', - 'pallets/collab-ai/pool-proposal', - 'pallets/collab-ai/investing-pool', 'pallets/extrinsic-filter', 'pallets/evm-assertions', 'pallets/identity-management', @@ -28,11 +21,6 @@ members = [ 'pallets/omni-bridge', 'precompiles/assets-erc20', 'precompiles/bridge-transfer', - 'precompiles/collab-ai/aiusd-convertor', - 'precompiles/collab-ai/curator', - 'precompiles/collab-ai/guardian', - 'precompiles/collab-ai/pool-proposal', - 'precompiles/collab-ai/investing-pool', 'precompiles/omni-bridge', 'precompiles/parachain-staking', 'precompiles/score-staking', @@ -248,7 +236,7 @@ cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "stable2412", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } @@ -260,7 +248,7 @@ substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", defaul frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "stable2412", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false } substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", features = ["metadata-hash"] } # local @@ -293,19 +281,5 @@ pallet-evm-precompile-parachain-staking = { path = "precompiles/parachain-stakin pallet-evm-precompile-score-staking = { path = "precompiles/score-staking", default-features = false } pallet-evm-precompile-vesting = { path = "precompiles/vesting", default-features = false } -pallet-evm-precompile-aiusd-convertor = { path = "precompiles/collab-ai/aiusd-convertor", default-features = false } -pallet-evm-precompile-curator = { path = "precompiles/collab-ai/curator", default-features = false } -pallet-evm-precompile-guardian = { path = "precompiles/collab-ai/guardian", default-features = false } -pallet-evm-precompile-pool-proposal = { path = "precompiles/collab-ai/pool-proposal", default-features = false } -pallet-evm-precompile-investing-pool = { path = "precompiles/collab-ai/investing-pool", default-features = false } pallet-evm-assertions = { path = "pallets/evm-assertions", default-features = false } - -# CollabAI local - TODO: will remove unused deps later -pallet-aiusd-convertor = { path = "pallets/collab-ai/aiusd-convertor", default-features = false } -pallet-collab-ai-common = { path = "pallets/collab-ai/common", default-features = false } -pallet-curator = { path = "pallets/collab-ai/curator", default-features = false } -pallet-guardian = { path = "pallets/collab-ai/guardian", default-features = false } -pallet-halving-mint = { path = "pallets/collab-ai/halving-mint", default-features = false } -pallet-pool-proposal = { path = "pallets/collab-ai/pool-proposal", default-features = false } -pallet-investing-pool = { path = "pallets/collab-ai/investing-pool", default-features = false } diff --git a/parachain/node/Cargo.toml b/parachain/node/Cargo.toml index 4d4dbbd828..1adfdcfd6a 100644 --- a/parachain/node/Cargo.toml +++ b/parachain/node/Cargo.toml @@ -18,20 +18,16 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] async-trait = { workspace = true } clap = { workspace = true } +frame-support = { workspace = true, features = ["std"] } futures = { workspace = true } jsonrpsee = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -tokio = { workspace = true } - -frame-support = { workspace = true, features = ["std"] } pallet-ethereum = { workspace = true, features = ["std"] } pallet-evm = { workspace = true, features = ["std"] } pallet-transaction-payment = { workspace = true, features = ["std"] } pallet-transaction-payment-rpc = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = ["std"] } +parity-scale-codec = { workspace = true } sc-basic-authorship = { workspace = true } sc-chain-spec = { workspace = true } sc-cli = { workspace = true } @@ -48,6 +44,8 @@ sc-telemetry = { workspace = true } sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } sp-api = { workspace = true, features = ["std"] } sp-block-builder = { workspace = true, features = ["std"] } sp-blockchain = { workspace = true } @@ -55,7 +53,6 @@ sp-consensus-aura = { workspace = true, features = ["std"] } sp-core = { workspace = true, features = ["std"] } sp-genesis-builder = { workspace = true, features = ["std"] } sp-inherents = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } sp-keystore = { workspace = true, features = ["std"] } sp-offchain = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } @@ -86,24 +83,19 @@ cumulus-client-parachain-inherent = { workspace = true } cumulus-client-service = { workspace = true } cumulus-primitives-aura = { workspace = true, features = ["std"] } cumulus-primitives-core = { workspace = true, features = ["std"] } -cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } cumulus-relay-chain-interface = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } polkadot-cli = { workspace = true } polkadot-primitives = { workspace = true, features = ["std"] } -polkadot-service = { workspace = true } xcm = { workspace = true } frame-benchmarking = { workspace = true } frame-benchmarking-cli = { workspace = true } -frame-metadata-hash-extension = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { workspace = true, optional = true } heima-primitives = { workspace = true, features = ["std"] } heima-runtime = { workspace = true, features = ["std"] } -pallet-omni-account-runtime-api = { workspace = true, features = ["std"] } paseo-runtime = { workspace = true, features = ["std"] } runtime-common = { workspace = true, features = ["std"] } @@ -127,7 +119,6 @@ runtime-benchmarks = [ "paseo-runtime/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", - "polkadot-service/runtime-benchmarks", "runtime-common/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -140,7 +131,6 @@ try-runtime = [ "pallet-transaction-payment/try-runtime", "paseo-runtime/try-runtime", "polkadot-cli/try-runtime", - "polkadot-service/try-runtime", "runtime-common/try-runtime", "sp-runtime/try-runtime", "frame-try-runtime", diff --git a/parachain/pallets/account-fix/Cargo.toml b/parachain/pallets/account-fix/Cargo.toml index c07989fa0e..ae316d5d56 100644 --- a/parachain/pallets/account-fix/Cargo.toml +++ b/parachain/pallets/account-fix/Cargo.toml @@ -11,11 +11,11 @@ version = '0.1.0' [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } +sp-runtime = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } pallet-balances = { workspace = true } -sp-runtime = { workspace = true } sp-std = { workspace = true } [features] @@ -25,11 +25,11 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "frame-support/std", "frame-system/std", "pallet-balances/std", - "parity-scale-codec/std", - "scale-info/std", "sp-runtime/std", "sp-std/std", ] diff --git a/parachain/pallets/bitacross/Cargo.toml b/parachain/pallets/bitacross/Cargo.toml index 882f1afc76..5d368f1d84 100644 --- a/parachain/pallets/bitacross/Cargo.toml +++ b/parachain/pallets/bitacross/Cargo.toml @@ -10,10 +10,8 @@ version = '0.1.0' parity-scale-codec = { workspace = true } scale-info = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -sp-runtime = { workspace = true } heima-primitives = { workspace = true } @@ -25,21 +23,18 @@ sp-io = { workspace = true, features = ["std"] } [features] default = ["std"] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "heima-primitives/std", - "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "pallet-balances/std", "pallet-timestamp/std", - "parity-scale-codec/std", - "scale-info/std", "sp-io/std", - "sp-runtime/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bridge/assets-handler/Cargo.toml b/parachain/pallets/bridge/assets-handler/Cargo.toml index d8239e0ada..3ef8b9d7b9 100644 --- a/parachain/pallets/bridge/assets-handler/Cargo.toml +++ b/parachain/pallets/bridge/assets-handler/Cargo.toml @@ -12,6 +12,7 @@ version = '0.1.0' hex-literal = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } +sp-core = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -20,7 +21,6 @@ pallet-balances = { workspace = true } pallet-bridge-common = { workspace = true } pallet-chain-bridge = { workspace = true } pallet-parachain-staking = { workspace = true } -sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -39,6 +39,9 @@ runtime-benchmarks = [ "pallet-parachain-staking/runtime-benchmarks", ] std = [ + "sp-core/std", + "parity-scale-codec/std", + "scale-info/std", "frame-support/std", "frame-system/std", "pallet-assets/std", @@ -47,9 +50,6 @@ std = [ "pallet-bridge-transfer/std", "pallet-chain-bridge/std", "pallet-parachain-staking/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", diff --git a/parachain/pallets/bridge/bridge-transfer/Cargo.toml b/parachain/pallets/bridge/bridge-transfer/Cargo.toml index b566d443c7..e6ca419a1e 100644 --- a/parachain/pallets/bridge/bridge-transfer/Cargo.toml +++ b/parachain/pallets/bridge/bridge-transfer/Cargo.toml @@ -11,8 +11,6 @@ hex-literal = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -41,6 +39,8 @@ runtime-benchmarks = [ "pallet-chain-bridge/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", @@ -50,10 +50,6 @@ std = [ "pallet-bridge-common/std", "pallet-chain-bridge/std", "pallet-timestamp/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-arithmetic/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", diff --git a/parachain/pallets/bridge/chain-bridge/Cargo.toml b/parachain/pallets/bridge/chain-bridge/Cargo.toml index 0c00375102..4b2478e392 100644 --- a/parachain/pallets/bridge/chain-bridge/Cargo.toml +++ b/parachain/pallets/bridge/chain-bridge/Cargo.toml @@ -9,10 +9,10 @@ version = '0.1.0' [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } - sp-core = { workspace = true } -sp-io = { workspace = true } sp-runtime = { workspace = true } + +sp-io = { workspace = true } sp-std = { workspace = true } frame-benchmarking = { workspace = true, optional = true } @@ -28,13 +28,13 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ + "sp-core/std", + "parity-scale-codec/std", + "scale-info/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "pallet-balances/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", diff --git a/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml b/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml deleted file mode 100644 index e1641a11dc..0000000000 --- a/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -authors = ['Trust Computing GmbH '] -description = 'Pallet for converting among AIUSD and other stable token' -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -name = 'pallet-aiusd-convertor' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[dependencies] -hex-literal = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -std = [ - "frame-support/std", - "frame-system/std", - "pallet-assets/std", - "pallet-balances/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "pallet-assets/try-runtime", - "pallet-balances/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/aiusd-convertor/src/lib.rs b/parachain/pallets/collab-ai/aiusd-convertor/src/lib.rs deleted file mode 100644 index f8f0ef64de..0000000000 --- a/parachain/pallets/collab-ai/aiusd-convertor/src/lib.rs +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -//! Pallet for converting among AIUSD and other stable token. -//! -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::useless_conversion)] - -use frame_support::{ - pallet_prelude::*, - traits::{ - tokens::{ - fungibles::{Inspect as FsInspect, Mutate as FsMutate}, - Fortitude, Precision, Preservation, - }, - StorageVersion, - }, - transactional, -}; -use frame_system::pallet_prelude::*; -pub use pallet::*; -use sp_runtime::traits::{CheckedDiv, CheckedMul}; -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -#[frame_support::pallet] -pub mod pallet { - use super::*; - pub type InspectFungibles = pallet_assets::Pallet; - /// Balance type alias for balances of assets that implement the `fungibles` trait. - pub type AssetBalanceOf = - as FsInspect<::AccountId>>::Balance; - /// Type alias for Asset IDs. - pub type AssetIdOf = - as FsInspect<::AccountId>>::AssetId; - - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + pallet_assets::Config { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - // This is not a treasury account - // Balance of all types in this account record the - // available stable coin for AIUSD to switch back - type ConvertingPool: Get; - - // Declare the asset id of AIUSD - type AIUSDAssetId: Get>; - - /// The privileged origin to enable/disable AIUSD switch - type ManagerOrigin: EnsureOrigin; - } - - // Asset Id => ratio of system exchange rate for AIUSD to other token in 10^18 - // e.g. - // (1 USDT) = 10^6 in system - // (1 AIUSD) = 10^18 in system - // Value of StorageMap n = 10^(-12) * 10^(18) = 10^(6), - // which means (1 AIUSD) * n = (10^18) * (1 USDT) in system balance when converting. - #[pallet::storage] - #[pallet::getter(fn enabled_tokens)] - pub type EnabledTokens = - StorageMap<_, Twox64Concat, AssetIdOf, AssetBalanceOf, OptionQuery>; - - #[pallet::error] - pub enum Error { - InvalidAssetId, - AssetNotEnabled, - Overflow, - } - - #[pallet::event] - #[pallet::generate_deposit(pub (crate) fn deposit_event)] - pub enum Event { - /// AIUSD minted with other eligible stable token locked - AIUSDCreated { - beneficiary: T::AccountId, - aiusd_amount: AssetBalanceOf, - asset_id: AssetIdOf, - asset_amount: AssetBalanceOf, - }, - /// AIUSD burned with other eligible stable token released - AIUSDDestroyed { - beneficiary: T::AccountId, - aiusd_amount: AssetBalanceOf, - asset_id: AssetIdOf, - asset_amount: AssetBalanceOf, - }, - AssetEnabled { - asset_id: AssetIdOf, - decimal_ratio: AssetBalanceOf, - }, - AssetDisabled { - asset_id: AssetIdOf, - }, - } - - #[pallet::call] - impl Pallet { - // Lock source_asset_id token and mint AIUSD - #[pallet::call_index(0)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn mint_aiusd( - origin: OriginFor, - source_asset_id: AssetIdOf, - aiusd_amount: AssetBalanceOf, - ) -> DispatchResult { - let beneficiary = ensure_signed(origin)?; - if let Some(ratio) = EnabledTokens::::get(&source_asset_id) { - let aiusd_id = T::AIUSDAssetId::get(); - ensure!( - InspectFungibles::::asset_exists(aiusd_id.clone()) - && InspectFungibles::::asset_exists(source_asset_id.clone()), - Error::::InvalidAssetId - ); - - let aiusd_minted_amount: AssetBalanceOf = - >::mint_into(aiusd_id, &beneficiary, aiusd_amount)?; - - // Maybe it is better to save decimal of AIUSD somewhere - let aiusd_decimal_unit_expression: T::Balance = - 10u128.pow(18).try_into().or(Err(Error::::Overflow))?; - let asset_target_transfer_amount = aiusd_minted_amount - .checked_mul(&ratio) - .ok_or(Error::::Overflow)? - .checked_div(&aiusd_decimal_unit_expression) - .ok_or(Error::::Overflow)?; - let asset_actual_transfer_amount: AssetBalanceOf = - as FsMutate<::AccountId>>::transfer( - source_asset_id.clone(), - &beneficiary, - &T::ConvertingPool::get(), - asset_target_transfer_amount, - Preservation::Expendable, - )?; - - Self::deposit_event(Event::AIUSDCreated { - beneficiary, - aiusd_amount: aiusd_minted_amount, - asset_id: source_asset_id, - asset_amount: asset_actual_transfer_amount, - }); - - Ok(()) - } else { - Err(Error::::AssetNotEnabled.into()) - } - } - - // Burn aiusd and get source_asset_id token released - // Failed if pool does not have enough token of one type - #[pallet::call_index(1)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn burn_aiusd( - origin: OriginFor, - source_asset_id: AssetIdOf, - aiusd_amount: AssetBalanceOf, - ) -> DispatchResult { - let beneficiary = ensure_signed(origin)?; - if let Some(ratio) = EnabledTokens::::get(&source_asset_id) { - let aiusd_id = T::AIUSDAssetId::get(); - ensure!( - InspectFungibles::::asset_exists(aiusd_id.clone()) - && InspectFungibles::::asset_exists(source_asset_id.clone()), - Error::::InvalidAssetId - ); - // It will fail if insufficient fund - let aiusd_destroyed_amount: AssetBalanceOf = >::burn_from( - aiusd_id, - &beneficiary, - aiusd_amount, - Preservation::Expendable, - Precision::Exact, - Fortitude::Polite, - )?; - - // Maybe it is better to save decimal of AIUSD somewhere - let aiusd_decimal_unit_expression: T::Balance = - 10u128.pow(18).try_into().or(Err(Error::::Overflow))?; - let asset_target_transfer_amount = aiusd_destroyed_amount - .checked_mul(&ratio) - .ok_or(Error::::Overflow)? - .checked_div(&aiusd_decimal_unit_expression) - .ok_or(Error::::Overflow)?; - let asset_actual_transfer_amount: AssetBalanceOf = - as FsMutate<::AccountId>>::transfer( - source_asset_id.clone(), - &T::ConvertingPool::get(), - &beneficiary, - asset_target_transfer_amount, - Preservation::Expendable, - )?; - - Self::deposit_event(Event::AIUSDDestroyed { - beneficiary, - aiusd_amount: aiusd_destroyed_amount, - asset_id: source_asset_id, - asset_amount: asset_actual_transfer_amount, - }); - Ok(()) - } else { - Err(Error::::AssetNotEnabled.into()) - } - } - - /// Enable a specific type of token available for switching - #[pallet::call_index(2)] - #[pallet::weight({195_000_000})] - pub fn enable_token( - origin: OriginFor, - source_asset_id: AssetIdOf, - decimal_ratio: AssetBalanceOf, - ) -> DispatchResultWithPostInfo { - T::ManagerOrigin::ensure_origin(origin)?; - EnabledTokens::::insert(&source_asset_id, decimal_ratio); - Self::deposit_event(Event::AssetEnabled { asset_id: source_asset_id, decimal_ratio }); - Ok(Pays::No.into()) - } - - /// disable a specific type of token available for switching - #[pallet::call_index(3)] - #[pallet::weight({195_000_000})] - pub fn disable_token( - origin: OriginFor, - source_asset_id: AssetIdOf, - ) -> DispatchResultWithPostInfo { - T::ManagerOrigin::ensure_origin(origin)?; - EnabledTokens::::remove(&source_asset_id); - Self::deposit_event(Event::AssetDisabled { asset_id: source_asset_id }); - Ok(Pays::No.into()) - } - } -} diff --git a/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs b/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs deleted file mode 100644 index f1ce8085ee..0000000000 --- a/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate as pallet_aiusd; -use frame_support::{ - assert_ok, construct_runtime, derive_impl, parameter_types, - traits::{ - tokens::fungibles::{Inspect, Mutate}, - AsEnsureOriginWithArg, ConstU128, ConstU32, - }, -}; -use sp_core::Get; -use sp_runtime::{ - traits::{IdentifyAccount, IdentityLookup, Verify}, - AccountId32, BuildStorage, -}; - -pub type Signature = sp_runtime::MultiSignature; -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -pub type Balance = u128; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Assets: pallet_assets, - Balances: pallet_balances, - AIUSD: pallet_aiusd, - } -); - -parameter_types! { - pub const AIUSDAssetId: u32 = 1; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -impl pallet_assets::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = u32; - type AssetIdParameter = u32; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = frame_system::EnsureRoot; - type AssetDeposit = ConstU128<1>; - type AssetAccountDeposit = ConstU128<10>; - type MetadataDepositBase = ConstU128<1>; - type MetadataDepositPerByte = ConstU128<1>; - type ApprovalDeposit = ConstU128<1>; - type StringLimit = ConstU32<50>; - type Freezer = (); - type WeightInfo = (); - type CallbackHandle = (); - type Extra = (); - type RemoveItemsLimit = ConstU32<5>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - -pub struct ConvertingPool; -impl Get for ConvertingPool { - fn get() -> AccountId32 { - AccountId32::new([1u8; 32]) - } -} - -impl pallet_aiusd::Config for Test { - type RuntimeEvent = RuntimeEvent; - type ConvertingPool = ConvertingPool; - type AIUSDAssetId = AIUSDAssetId; - type ManagerOrigin = frame_system::EnsureRoot<::AccountId>; -} - -pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - - let owner = AccountId32::from([2u8; 32]); - let origin = RuntimeOrigin::root(); - - // Create the AIUSD asset - assert_ok!(pallet_assets::Pallet::::force_create( - origin.clone(), - 1, // AIUSD asset id - owner.clone(), - true, - 1, - )); - // Create the target asset - let source_asset_id = 2; - assert_ok!(pallet_assets::Pallet::::force_create( - origin, - source_asset_id, - owner.clone(), - true, - 1, - )); - - // Check if these assets exists - assert!(pallet_aiusd::InspectFungibles::::asset_exists(1)); - assert!(pallet_aiusd::InspectFungibles::::asset_exists(2)); - - // Set total supply - assert_ok!(pallet_aiusd::InspectFungibles::::mint_into( - source_asset_id, - &owner, - 1_000_000_000 // 1000 (10^6 * 1000) - )); - }); - ext -} diff --git a/parachain/pallets/collab-ai/aiusd-convertor/src/tests.rs b/parachain/pallets/collab-ai/aiusd-convertor/src/tests.rs deleted file mode 100644 index 8eb01e2e10..0000000000 --- a/parachain/pallets/collab-ai/aiusd-convertor/src/tests.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{mock::*, *}; -use frame_support::{assert_err, assert_ok}; -use sp_runtime::{AccountId32, TokenError}; - -#[test] -fn test_mint_aiusd() { - new_test_ext().execute_with(|| { - let beneficiary: AccountId32 = AccountId32::from([2u8; 32]); - let aiusd_asset_id: u32 = 1; - let source_asset_id: u32 = 2; - let target_decimal_ratio = 1_000_000; - let target_asset_supply_amount: u128 = target_decimal_ratio * 1000; - let mint_amount: u128 = 2_000_000_000_000_000_000; // 2 AIUSD (10^18 * 2) - - // Check balance - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, 0); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount); - - assert_ok!(AIUSD::enable_token( - RuntimeOrigin::root(), - source_asset_id, - target_decimal_ratio - )); - - assert_err!( - AIUSD::mint_aiusd(RuntimeOrigin::signed(beneficiary.clone()), 3, mint_amount), - Error::::AssetNotEnabled - ); - - assert_ok!(AIUSD::mint_aiusd( - RuntimeOrigin::signed(beneficiary.clone()), - source_asset_id, - mint_amount - )); - // Check balance after mint - let asset_amount = target_decimal_ratio * 2; - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, mint_amount); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount - asset_amount); - - System::assert_last_event(RuntimeEvent::AIUSD(Event::AIUSDCreated { - beneficiary, - aiusd_amount: mint_amount, - asset_id: source_asset_id, - asset_amount, - })); - }); -} - -#[test] -fn test_burn_aiusd() { - new_test_ext().execute_with(|| { - let beneficiary: AccountId32 = AccountId32::from([2u8; 32]); - let aiusd_asset_id: u32 = 1; - let source_asset_id: u32 = 2; - let target_decimal_ratio = 1_000_000; - let target_asset_supply_amount: u128 = target_decimal_ratio * 1000; - let aiusd_amount: u128 = 2_000_000_000_000_000_000; // 2 AIUSD (10^18 * 2) - - // Check balance - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, 0); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount); - - assert_ok!(AIUSD::enable_token( - RuntimeOrigin::root(), - source_asset_id, - target_decimal_ratio - )); - - // FundsUnavailable - assert_err!( - AIUSD::burn_aiusd( - RuntimeOrigin::signed(beneficiary.clone()), - source_asset_id, - aiusd_amount - ), - TokenError::FundsUnavailable - ); - - assert_ok!(AIUSD::mint_aiusd( - RuntimeOrigin::signed(beneficiary.clone()), - source_asset_id, - aiusd_amount - )); - // Check balance after mint - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, aiusd_amount); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount - target_decimal_ratio * 2); - - assert_ok!(AIUSD::burn_aiusd( - RuntimeOrigin::signed(beneficiary.clone()), - source_asset_id, - aiusd_amount - )); - // Check balance after burn - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, 0); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount); - - System::assert_last_event(RuntimeEvent::AIUSD(Event::AIUSDDestroyed { - beneficiary, - aiusd_amount, - asset_id: source_asset_id, - asset_amount: target_decimal_ratio * 2, - })); - }); -} - -#[test] -fn test_enable_disable_token() { - new_test_ext().execute_with(|| { - let source_asset_id: u32 = 2; - let decimal_ratio: u128 = 1_000_000; - - // enable - assert_ok!(AIUSD::enable_token(RuntimeOrigin::root(), source_asset_id, decimal_ratio)); - assert!(AIUSD::enabled_tokens(source_asset_id).is_some()); - System::assert_last_event(RuntimeEvent::AIUSD(Event::AssetEnabled { - asset_id: source_asset_id, - decimal_ratio, - })); - - // disable - assert_ok!(AIUSD::disable_token(RuntimeOrigin::root(), source_asset_id)); - assert!(AIUSD::enabled_tokens(source_asset_id).is_none()); - - System::assert_last_event(RuntimeEvent::AIUSD(Event::AssetDisabled { - asset_id: source_asset_id, - })); - }); -} diff --git a/parachain/pallets/collab-ai/common/Cargo.toml b/parachain/pallets/collab-ai/common/Cargo.toml deleted file mode 100644 index a3ba121e0f..0000000000 --- a/parachain/pallets/collab-ai/common/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -authors = ['Trust Computing GmbH '] -edition = '2021' -homepage = 'https://www.heima.network' -name = 'pallet-collab-ai-common' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "frame-system/runtime-benchmarks", -] -std = [ - "frame-support/std", - "frame-system/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/common/src/lib.rs b/parachain/pallets/collab-ai/common/src/lib.rs deleted file mode 100644 index 9a42b75236..0000000000 --- a/parachain/pallets/collab-ai/common/src/lib.rs +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] -use frame_support::{ - pallet_prelude::{DispatchResult, EnsureOrigin}, - traits::EitherOfDiverse, -}; -use frame_system::{EnsureRoot, RawOrigin}; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -use sp_core::{RuntimeDebug, H256}; -use sp_runtime::traits::AtLeast32BitUnsigned; -use sp_std::{marker::PhantomData, vec::Vec}; - -pub type InfoHash = H256; -pub type CuratorIndex = u128; -pub type GuardianIndex = u128; -pub type PoolProposalIndex = u128; -pub type InvestingPoolIndex = PoolProposalIndex; - -#[derive(Clone, Encode, Decode, Eq, PartialEq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo)] -pub struct PoolMetadata { - /// The user friendly name of this staking pool. Limited in length by `PoolStringLimit`. - pub name: BoundedString, - /// The short description for this staking pool. Limited in length by `PoolStringLimit`. - pub description: BoundedString, -} - -#[derive(PartialEq, Eq, Clone, Copy, Default, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] -pub enum CandidateStatus { - /// Initial status of legal file - #[default] - #[codec(index = 0)] - Unverified, - /// Checked and authorized status of legal file - #[codec(index = 1)] - Verified, - /// Legal file suspicious and banned - #[codec(index = 2)] - Banned, -} - -#[derive(PartialEq, Eq, Copy, Clone, Default, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] -pub enum GuardianVote { - /// Does not care if this guardian get selected - /// Please be aware Neutral will increase participate percentage - /// which will increase the winning rate of guardian selection - /// given a large amount of guardian competitor - #[default] - #[codec(index = 0)] - Neutral, - /// Want this guardian no matter which pool proposal - #[codec(index = 1)] - Aye, - /// Against this guardian no matter which pool proposal - #[codec(index = 2)] - Nay, - /// Support this guardian for only specific pool proposal - /// And neutral for other pool proposal - #[codec(index = 3)] - Specific(PoolProposalIndex), -} - -/// Some sort of check on the account is from some group. -pub trait CuratorQuery { - /// All curator but banned ones - fn is_curator(account: AccountId) -> bool; - - /// Only verified one - fn is_verified_curator(account: AccountId) -> bool; -} - -pub trait ProposerQuery { - fn is_proposer(account: AccountId, proposal_index: PoolProposalIndex) -> bool; -} - -#[derive(PartialEq, Eq, Clone, Encode, Debug, Decode, MaxEncodedLen, TypeInfo)] -pub struct PoolSetting { - // The start time of investing pool - pub start_time: BlockNumber, - // How many epoch will investing pool last, n > 0, valid epoch index :[0..n) - pub epoch: u128, - // How many blocks each epoch consist - pub epoch_range: BlockNumber, - // Max staked amount of pool - pub pool_cap: Balance, - // Curator - pub admin: AccountId, -} - -impl PoolSetting -where - Balance: AtLeast32BitUnsigned + Copy, - BlockNumber: AtLeast32BitUnsigned + Copy, -{ - // None means TypeIncompatible Or Overflow - pub fn end_time(&self) -> Option { - let er: u128 = self.epoch_range.try_into().ok()?; - let st: u128 = self.start_time.try_into().ok()?; - let result = st.checked_add(er.checked_mul(self.epoch)?)?; - result.try_into().ok() - } -} - -pub struct EnsureSignedAndCurator(PhantomData<(AccountId, EC)>); -impl< - O: Into, O>> + From>, - AccountId: Decode + Clone, - EC, - > EnsureOrigin for EnsureSignedAndCurator -where - EC: CuratorQuery, -{ - type Success = AccountId; - fn try_origin(o: O) -> Result { - o.into().and_then(|o| match o { - RawOrigin::Signed(who) => { - if EC::is_curator(who.clone()) { - Ok(who) - } else { - Err(O::from(RawOrigin::Signed(who))) - } - }, - r => Err(O::from(r)), - }) - } - - #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin() -> Result { - // No promised successful_origin - Err(()) - } -} - -pub struct EnsureSignedAndVerifiedCurator(PhantomData<(AccountId, EC)>); -impl< - O: Into, O>> + From>, - AccountId: Decode + Clone, - EC, - > EnsureOrigin for EnsureSignedAndVerifiedCurator -where - EC: CuratorQuery, -{ - type Success = AccountId; - fn try_origin(o: O) -> Result { - o.into().and_then(|o| match o { - RawOrigin::Signed(who) => { - if EC::is_verified_curator(who.clone()) { - Ok(who) - } else { - Err(O::from(RawOrigin::Signed(who))) - } - }, - r => Err(O::from(r)), - }) - } - - #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin() -> Result { - // No promised successful_origin - Err(()) - } -} - -pub type EnsureRootOrVerifiedCurator = - EitherOfDiverse, EnsureSignedAndVerifiedCurator>; - -pub const INVESTING_POOL_INDEX_SHIFTER: u128 = 1_000_000_000_000_000; -pub const INVESTING_POOL_START_EPOCH_SHIFTER: u128 = 1_000; -pub const INVESTING_POOL_END_EPOCH_SHIFTER: u128 = 1; - -pub struct InvestingPoolAssetIdGenerator(PhantomData); -impl + Into> InvestingPoolAssetIdGenerator { - /// Create a series of new asset id based on pool index and reward epoch - /// Return None if impossible to generate. e.g. overflow - pub fn get_all_pool_token(pool_index: InvestingPoolIndex, epoch: u128) -> Option> { - let pool_index_prefix = pool_index.checked_mul(INVESTING_POOL_INDEX_SHIFTER)?; - - let mut vec: Vec = Vec::new(); - let end_epoch_suffix = epoch.checked_mul(INVESTING_POOL_END_EPOCH_SHIFTER)?; - for n in 0..(epoch + 1) { - let infix = n.checked_mul(INVESTING_POOL_START_EPOCH_SHIFTER)?; - vec.push(pool_index_prefix.checked_add(infix)?.checked_add(end_epoch_suffix)?.into()); - } - Some(vec) - } - - pub fn get_initial_epoch_token(pool_index: InvestingPoolIndex, epoch: u128) -> Option { - let pool_index_prefix = pool_index.checked_mul(INVESTING_POOL_INDEX_SHIFTER)?; - - let end_epoch_suffix = epoch.checked_mul(INVESTING_POOL_END_EPOCH_SHIFTER)?; - let infix = 1u128.checked_mul(INVESTING_POOL_START_EPOCH_SHIFTER)?; - Some(pool_index_prefix.checked_add(infix)?.checked_add(end_epoch_suffix)?.into()) - } - - pub fn get_intermediate_epoch_token( - pool_index: InvestingPoolIndex, - start_epoch: u128, - end_epoch: u128, - ) -> Option { - let pool_index_prefix = pool_index.checked_mul(INVESTING_POOL_INDEX_SHIFTER)?; - - let end_epoch_suffix = end_epoch.checked_mul(INVESTING_POOL_END_EPOCH_SHIFTER)?; - let infix = start_epoch.checked_mul(INVESTING_POOL_START_EPOCH_SHIFTER)?; - Some(pool_index_prefix.checked_add(infix)?.checked_add(end_epoch_suffix)?.into()) - } - - pub fn get_debt_token(pool_index: InvestingPoolIndex, epoch: u128) -> Option { - let pool_index_prefix = pool_index.checked_mul(INVESTING_POOL_INDEX_SHIFTER)?; - - let end_epoch_suffix = epoch.checked_mul(INVESTING_POOL_END_EPOCH_SHIFTER)?; - Some(pool_index_prefix.checked_add(end_epoch_suffix)?.into()) - } - - pub fn get_token_pool_index(asset_id: AssetId) -> u128 { - let asset_id_u128: u128 = asset_id.into(); - asset_id_u128 / INVESTING_POOL_INDEX_SHIFTER - } - - pub fn get_token_start_epoch(asset_id: AssetId) -> u128 { - let asset_id_u128: u128 = asset_id.into(); - (asset_id_u128 % INVESTING_POOL_INDEX_SHIFTER) / INVESTING_POOL_START_EPOCH_SHIFTER - } - - pub fn get_token_end_epoch(asset_id: AssetId) -> u128 { - let asset_id_u128: u128 = asset_id.into(); - ((asset_id_u128 % INVESTING_POOL_INDEX_SHIFTER) % INVESTING_POOL_START_EPOCH_SHIFTER) - / INVESTING_POOL_END_EPOCH_SHIFTER - } -} - -/// Some sort of check on the account is from some group. -pub trait GuardianQuery { - /// All guardian but banned ones - fn is_guardian(account: AccountId) -> bool; - - /// Only verified one - fn is_verified_guardian(account: AccountId) -> bool; - - /// Get vote - fn get_vote(voter: AccountId, guardian: AccountId) -> Option; -} - -/// Inject investment into pool -pub trait InvestmentInjector { - fn create_investing_pool( - pool_id: InvestingPoolIndex, - setting: PoolSetting, - admin: AccountId, - ) -> DispatchResult; - fn inject_investment( - pool_id: InvestingPoolIndex, - investments: Vec<(AccountId, Balance)>, - ) -> DispatchResult; -} diff --git a/parachain/pallets/collab-ai/curator/Cargo.toml b/parachain/pallets/collab-ai/curator/Cargo.toml deleted file mode 100644 index ebce0e17dc..0000000000 --- a/parachain/pallets/collab-ai/curator/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -authors = ['Litentry Dev'] -description = 'Pallet for managing curator' -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -name = 'pallet-curator' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -pallet-collab-ai-common = { workspace = true } - -[dev-dependencies] -pallet-balances = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-collab-ai-common/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -std = [ - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-std/std", - "sp-core/std", - "sp-io/std", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "pallet-balances/try-runtime", - "pallet-collab-ai-common/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/curator/src/lib.rs b/parachain/pallets/collab-ai/curator/src/lib.rs deleted file mode 100644 index 42fcd10516..0000000000 --- a/parachain/pallets/collab-ai/curator/src/lib.rs +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . -// -//! # Curator Pallet -//! -//! - [`Config`] -//! - [`Call`] -//! -//! ## Overview -//! -//! The Curator pallet handles the administration of general curator and proposed staking pool. -//! -//! -#![cfg_attr(not(feature = "std"), no_std)] -use frame_support::{ - ensure, - pallet_prelude::*, - traits::{Currency, EnsureOrigin, Get, LockableCurrency, ReservableCurrency}, - transactional, -}; -use frame_system::{ - ensure_signed, - pallet_prelude::{BlockNumberFor, OriginFor}, -}; -pub use pallet::*; -use pallet_collab_ai_common::*; -use sp_runtime::ArithmeticError; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -type BalanceOf = - <::Currency as Currency<::AccountId>>::Balance; - -#[frame_support::pallet] -pub mod pallet { - use super::*; - - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + Sized { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Currency type for this pallet. - type Currency: ReservableCurrency - + LockableCurrency>; - - /// The minimum amount to be used as a deposit for a curator - #[pallet::constant] - type MinimumCuratorDeposit: Get>; - - /// Origin from curator legal file verified by - type CuratorJudgeOrigin: EnsureOrigin; - } - - #[pallet::type_value] - pub fn DefaultForCuratorIndex() -> CuratorIndex { - 1u128 - } - - /// The next curator index, the number of (public) curator that have been made so far + 1. - #[pallet::storage] - #[pallet::getter(fn public_curator_count)] - pub type PublicCuratorCount = - StorageValue<_, CuratorIndex, ValueQuery, DefaultForCuratorIndex>; - - /// The public curator to index - #[pallet::storage] - #[pallet::getter(fn public_curator_to_index)] - pub type PublicCuratorToIndex = - StorageMap<_, Twox64Concat, T::AccountId, CuratorIndex, OptionQuery>; - - /// Curator index to hash and update time. Info Hash is current used curator legal file hash. - #[pallet::storage] - #[pallet::getter(fn curator_index_to_info)] - pub type CuratorIndexToInfo = StorageMap< - _, - Twox64Concat, - CuratorIndex, - (InfoHash, BlockNumberFor, T::AccountId, CandidateStatus), - OptionQuery, - >; - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - CuratorRegisted { - curator: T::AccountId, - curator_index: CuratorIndex, - info_hash: InfoHash, - }, - CuratorUpdated { - curator: T::AccountId, - curator_index: CuratorIndex, - info_hash: InfoHash, - }, - CuratorCleaned { - curator: T::AccountId, - curator_index: CuratorIndex, - }, - CuratorStatusUpdated { - curator: T::AccountId, - curator_index: CuratorIndex, - status: CandidateStatus, - }, - } - - #[pallet::error] - pub enum Error { - CuratorAlreadyRegistered, - CuratorNotRegistered, - CuratorIndexNotExist, - } - - #[pallet::call] - impl Pallet { - /// Registing a curator legal info - #[pallet::call_index(0)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn regist_curator(origin: OriginFor, info_hash: InfoHash) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure curator not existing yet - ensure!( - !PublicCuratorToIndex::::contains_key(&who), - Error::::CuratorAlreadyRegistered - ); - // New registed curator need to make a balance reserve - T::Currency::reserve(&who, T::MinimumCuratorDeposit::get())?; - - // Update curator - let current_block = frame_system::Pallet::::block_number(); - let next_curator_index = PublicCuratorCount::::get(); - - PublicCuratorToIndex::::insert(&who, next_curator_index); - CuratorIndexToInfo::::insert( - next_curator_index, - (info_hash, current_block, who.clone(), CandidateStatus::Unverified), - ); - PublicCuratorCount::::put( - next_curator_index.checked_add(1u32.into()).ok_or(ArithmeticError::Overflow)?, - ); - - Self::deposit_event(Event::CuratorRegisted { - curator: who, - curator_index: next_curator_index, - info_hash, - }); - Ok(()) - } - - /// Updating a curator legal info - #[pallet::call_index(1)] - #[pallet::weight({195_000_000})] - pub fn update_curator(origin: OriginFor, info_hash: InfoHash) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure existing - let curator_index = - PublicCuratorToIndex::::get(&who).ok_or(Error::::CuratorNotRegistered)?; - - // Update curator - // But if banned, then require extra reserve - CuratorIndexToInfo::::try_mutate_exists( - curator_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_mut().ok_or(Error::::CuratorIndexNotExist)?; - - if info.3 == CandidateStatus::Banned { - T::Currency::reserve(&who, T::MinimumCuratorDeposit::get())?; - } - - // Update hash - info.0 = info_hash; - // Update block number - info.1 = frame_system::Pallet::::block_number(); - Self::deposit_event(Event::CuratorUpdated { - curator: who, - curator_index, - info_hash, - }); - Ok(()) - }, - )?; - Ok(()) - } - - /// Clean a curator legal info - #[pallet::call_index(2)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn clean_curator(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure existing - let curator_index = - PublicCuratorToIndex::::take(&who).ok_or(Error::::CuratorNotRegistered)?; - - // Update curator - // But if banned, then require extra reserve - CuratorIndexToInfo::::try_mutate_exists( - curator_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_ref().ok_or(Error::::CuratorIndexNotExist)?; - - if info.3 != CandidateStatus::Banned { - let _ = T::Currency::unreserve(&who, T::MinimumCuratorDeposit::get()); - } - - // Delete item - *maybe_info = None; - Self::deposit_event(Event::CuratorCleaned { curator: who, curator_index }); - Ok(()) - }, - )?; - Ok(()) - } - - #[pallet::call_index(3)] - #[pallet::weight({195_000_000})] - pub fn judge_curator_status( - origin: OriginFor, - curator: T::AccountId, - status: CandidateStatus, - ) -> DispatchResult { - T::CuratorJudgeOrigin::ensure_origin(origin)?; - let curator_index = PublicCuratorToIndex::::get(curator.clone()) - .ok_or(Error::::CuratorNotRegistered)?; - CuratorIndexToInfo::::try_mutate_exists( - curator_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_mut().ok_or(Error::::CuratorIndexNotExist)?; - // Update block number - info.1 = frame_system::Pallet::::block_number(); - // Update status - info.3 = status; - - Self::deposit_event(Event::CuratorStatusUpdated { - curator, - curator_index, - status, - }); - Ok(()) - }, - )?; - Ok(()) - } - } -} - -/// Some sort of check on the origin is from curator. -impl CuratorQuery for Pallet { - fn is_curator(account: T::AccountId) -> bool { - if let Some(curator_index) = PublicCuratorToIndex::::get(&account) { - if let Some(info) = CuratorIndexToInfo::::get(curator_index) { - if info.3 != CandidateStatus::Banned { - return true; - } - } - } - - false - } - - fn is_verified_curator(account: T::AccountId) -> bool { - if let Some(curator_index) = PublicCuratorToIndex::::get(&account) { - if let Some(info) = CuratorIndexToInfo::::get(curator_index) { - if info.3 == CandidateStatus::Verified { - return true; - } - } - } - - false - } -} diff --git a/parachain/pallets/collab-ai/curator/src/mock.rs b/parachain/pallets/collab-ai/curator/src/mock.rs deleted file mode 100644 index 82f3847751..0000000000 --- a/parachain/pallets/collab-ai/curator/src/mock.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate as pallet_curator; -use frame_support::{construct_runtime, derive_impl, parameter_types}; -use sp_runtime::{traits::IdentityLookup, AccountId32}; -// use sp_io::TestExternalities; -use sp_runtime::BuildStorage; - -// Define mock runtime types -pub type Balance = u128; -pub type AccountId = AccountId32; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Balances: pallet_balances, - Curator: pallet_curator, - } -); - -parameter_types! { - pub const MinimumCuratorDeposit: Balance = 10; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -// Implement pallet_curator config trait for mock runtime. -impl pallet_curator::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumCuratorDeposit = MinimumCuratorDeposit; - type CuratorJudgeOrigin = frame_system::EnsureRoot; -} - -// Helper function to initialize the test environment. -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - pallet_balances::GenesisConfig:: { - balances: vec![(AccountId32::from([1u8; 32]), 100), (AccountId32::from([2u8; 32]), 11)], - } - .assimilate_storage(&mut t) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} diff --git a/parachain/pallets/collab-ai/curator/src/tests.rs b/parachain/pallets/collab-ai/curator/src/tests.rs deleted file mode 100644 index b8ca319771..0000000000 --- a/parachain/pallets/collab-ai/curator/src/tests.rs +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{ - mock::*, CandidateStatus, CuratorIndexToInfo, Error, PublicCuratorCount, PublicCuratorToIndex, -}; -use frame_support::{assert_noop, assert_ok}; -use pallet_balances::Error as BalanceError; -use sp_core::crypto::AccountId32; - -#[test] -fn test_register_curator_ok() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - let curator_index = PublicCuratorCount::::get(); - - // Register curator - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Check if curator is stored correctly - assert_eq!(PublicCuratorToIndex::::get(&curator), Some(curator_index)); - assert_eq!(PublicCuratorCount::::get(), curator_index + 1); - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Unverified)) - ); - - System::assert_last_event(RuntimeEvent::Curator(crate::Event::CuratorRegisted { - curator, - curator_index, - info_hash: sp_core::H256(info_hash), - })); - }) -} - -#[test] -fn test_register_curator_curator_already_registered() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register curator - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Register curator twice - assert_noop!( - Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - ), - Error::::CuratorAlreadyRegistered - ); - }); -} - -#[test] -fn test_register_curator_without_minimum_curator_deposit() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([5u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register curator with insufficient balance - assert_noop!( - Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - ), - BalanceError::::InsufficientBalance - ); - }); -} - -#[test] -fn test_update_curator_ok() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let curator_index = PublicCuratorCount::::get(); - let info_hash: [u8; 32] = [1; 32]; - let updated_info_hash: [u8; 32] = [2; 32]; - - // Register curator with info_hash - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Check the storage - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Unverified)) - ); - - // Update the info hash - assert_ok!(Curator::update_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(updated_info_hash) - )); - - // Check the storage after update - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some(( - sp_core::H256(updated_info_hash), - 1, - curator.clone(), - CandidateStatus::Unverified - )) - ); - - System::assert_last_event(RuntimeEvent::Curator(crate::Event::CuratorUpdated { - curator, - curator_index, - info_hash: sp_core::H256(updated_info_hash), - })); - }); -} - -#[test] -fn test_update_curator_curator_not_registered() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Update the info hash - assert_noop!( - Curator::update_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - ), - Error::::CuratorNotRegistered - ); - }); -} - -#[test] -fn test_update_curator_curator_banned_insufficient_balance() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([2u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - let updated_info_hash: [u8; 32] = [2; 32]; - - // Register curator with info_hash - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - assert_ok!(Curator::judge_curator_status( - RuntimeOrigin::root(), - curator.clone(), - CandidateStatus::Banned - )); - - // Update the info hash - assert_noop!( - Curator::update_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(updated_info_hash) - ), - BalanceError::::InsufficientBalance - ); - }); -} - -#[test] -fn test_update_curator_curator_banned_sufficient_balance() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let curator_index = PublicCuratorCount::::get(); - let info_hash: [u8; 32] = [1; 32]; - let updated_info_hash: [u8; 32] = [2; 32]; - - // Register curator with info_hash - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Check the storage - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Unverified)) - ); - - assert_ok!(Curator::judge_curator_status( - RuntimeOrigin::root(), - curator.clone(), - CandidateStatus::Banned - )); - - // Update the info hash - assert_ok!(Curator::update_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(updated_info_hash) - )); - - // Check the storage after update - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(updated_info_hash), 1, curator.clone(), CandidateStatus::Banned)) - ); - - System::assert_last_event(RuntimeEvent::Curator(crate::Event::CuratorUpdated { - curator, - curator_index, - info_hash: sp_core::H256(updated_info_hash), - })); - }); -} - -#[test] -fn test_judge_curator_status_ok() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let curator_index = PublicCuratorCount::::get(); - let info_hash: [u8; 32] = [1; 32]; - - // Register curator with info_hash - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Check the storage - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Unverified)) - ); - - assert_ok!(Curator::judge_curator_status( - RuntimeOrigin::root(), - curator.clone(), - CandidateStatus::Verified - )); - - // Check the storage after status update - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Verified)) - ); - - System::assert_last_event(RuntimeEvent::Curator(crate::Event::CuratorStatusUpdated { - curator, - curator_index, - status: CandidateStatus::Verified, - })); - }); -} - -#[test] -fn test_judge_curator_curator_not_registered() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - - // Try judging the curator status - assert_noop!( - Curator::judge_curator_status( - RuntimeOrigin::root(), - curator.clone(), - CandidateStatus::Verified - ), - Error::::CuratorNotRegistered - ); - }) -} - -#[test] -fn test_clean_curator_ok() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - let curator_index = PublicCuratorCount::::get(); - let info_hash: [u8; 32] = [1; 32]; - - // Register curator with info_hash - assert_ok!(Curator::regist_curator( - RuntimeOrigin::signed(curator.clone()), - sp_core::H256(info_hash) - )); - - // Check the storage - assert_eq!( - CuratorIndexToInfo::::get(curator_index), - Some((sp_core::H256(info_hash), 1, curator.clone(), CandidateStatus::Unverified)) - ); - - assert_ok!(Curator::clean_curator(RuntimeOrigin::signed(curator.clone()),)); - - // Check the storage after status update - assert_eq!(CuratorIndexToInfo::::get(curator_index), None); - - System::assert_last_event(RuntimeEvent::Curator(crate::Event::CuratorCleaned { - curator, - curator_index, - })); - }); -} - -#[test] -fn test_clean_curator_curator_not_registered() { - new_test_ext().execute_with(|| { - let curator: AccountId32 = AccountId32::from([1u8; 32]); - - // Try cleaning the curator info - assert_noop!( - Curator::clean_curator(RuntimeOrigin::signed(curator),), - Error::::CuratorNotRegistered - ); - }) -} diff --git a/parachain/pallets/collab-ai/guardian/Cargo.toml b/parachain/pallets/collab-ai/guardian/Cargo.toml deleted file mode 100644 index 52dedcd838..0000000000 --- a/parachain/pallets/collab-ai/guardian/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -authors = ['Litentry Dev'] -description = 'Pallet for managing guardian' -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -name = 'pallet-guardian' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -pallet-balances = { workspace = true } -pallet-collab-ai-common = { workspace = true } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-collab-ai-common/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -std = [ - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-std/std", - "sp-core/std", - "sp-io/std", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "pallet-balances/try-runtime", - "pallet-collab-ai-common/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/guardian/src/lib.rs b/parachain/pallets/collab-ai/guardian/src/lib.rs deleted file mode 100644 index ece2a2b7d9..0000000000 --- a/parachain/pallets/collab-ai/guardian/src/lib.rs +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . -// -//! # Guardian Pallet -//! -//! - [`Config`] -//! - [`Call`] -//! -//! ## Overview -//! -//! The Guardian pallet handles the administration of general guardian and guardian voting. -//! -//! -#![cfg_attr(not(feature = "std"), no_std)] -use frame_support::{ - ensure, - pallet_prelude::*, - traits::{Currency, EnsureOrigin, Get, LockableCurrency, ReservableCurrency}, - transactional, -}; -use frame_system::{ - ensure_signed, - pallet_prelude::{BlockNumberFor, OriginFor}, -}; -pub use pallet::*; -use pallet_collab_ai_common::*; -use sp_runtime::ArithmeticError; - -type BalanceOf = - <::Currency as Currency<::AccountId>>::Balance; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -#[frame_support::pallet] -pub mod pallet { - use super::*; - - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + Sized { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Currency type for this pallet. - type Currency: ReservableCurrency - + LockableCurrency>; - - /// The minimum amount to be used as a deposit for a guardian - #[pallet::constant] - type MinimumGuardianDeposit: Get>; - - /// Origin from guardian legal file verified by - type GuardianJudgeOrigin: EnsureOrigin; - } - - #[pallet::type_value] - pub fn DefaultForGuardianIndex() -> GuardianIndex { - 1u128 - } - - /// Next guardian index, the number of (public) guardian that have been made so far + 1. - #[pallet::storage] - #[pallet::getter(fn public_guardian_count)] - pub type PublicGuardianCount = - StorageValue<_, GuardianIndex, ValueQuery, DefaultForGuardianIndex>; - - /// The public guardian to index - #[pallet::storage] - #[pallet::getter(fn public_guardian_to_index)] - pub type PublicGuardianToIndex = - StorageMap<_, Twox64Concat, T::AccountId, GuardianIndex, OptionQuery>; - - /// Guardian index to hash and update time. Info Hash is current used guardian legal file hash. - #[pallet::storage] - #[pallet::getter(fn guardian_index_to_info)] - pub type GuardianIndexToInfo = StorageMap< - _, - Twox64Concat, - GuardianIndex, - (InfoHash, BlockNumberFor, T::AccountId, CandidateStatus), - OptionQuery, - >; - - /// Votings for guardian - #[pallet::storage] - #[pallet::getter(fn guardian_votes)] - pub type GuardianVotes = StorageDoubleMap< - _, - Twox64Concat, - T::AccountId, - Twox64Concat, - GuardianIndex, - GuardianVote, - OptionQuery, - >; - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - GuardianRegisted { - guardian: T::AccountId, - guardian_index: GuardianIndex, - info_hash: InfoHash, - }, - GuardianUpdated { - guardian: T::AccountId, - guardian_index: GuardianIndex, - info_hash: InfoHash, - }, - GuardianCleaned { - guardian: T::AccountId, - guardian_index: GuardianIndex, - }, - GuardianStatusUpdated { - guardian: T::AccountId, - guardian_index: GuardianIndex, - status: CandidateStatus, - }, - VoteGuardian { - voter: T::AccountId, - guardian_index: GuardianIndex, - guardian: T::AccountId, - status: Option, - }, - RemoveAllVote { - voter: T::AccountId, - }, - } - - #[pallet::error] - pub enum Error { - GuardianAlreadyRegistered, - GuardianNotRegistered, - GuardianIndexNotExist, - } - - #[pallet::call] - impl Pallet { - /// Registing a guardian legal info - #[pallet::call_index(0)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn regist_guardian(origin: OriginFor, info_hash: InfoHash) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure guardian not existing yet - ensure!( - !PublicGuardianToIndex::::contains_key(&who), - Error::::GuardianAlreadyRegistered - ); - // New registed guardian need to make a balance reserve - T::Currency::reserve(&who, T::MinimumGuardianDeposit::get())?; - - // Update guardian - let current_block = frame_system::Pallet::::block_number(); - let next_guardian_index = PublicGuardianCount::::get(); - - PublicGuardianToIndex::::insert(&who, next_guardian_index); - GuardianIndexToInfo::::insert( - next_guardian_index, - (info_hash, current_block, who.clone(), CandidateStatus::Unverified), - ); - PublicGuardianCount::::put( - next_guardian_index.checked_add(1u32.into()).ok_or(ArithmeticError::Overflow)?, - ); - - Self::deposit_event(Event::GuardianRegisted { - guardian: who, - guardian_index: next_guardian_index, - info_hash, - }); - Ok(()) - } - - /// Updating a guardian legal info - #[pallet::call_index(1)] - #[pallet::weight({195_000_000})] - pub fn update_guardian(origin: OriginFor, info_hash: InfoHash) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure existing - let guardian_index = - PublicGuardianToIndex::::get(&who).ok_or(Error::::GuardianNotRegistered)?; - - // Update guardian - // But if banned, then require extra reserve - GuardianIndexToInfo::::try_mutate_exists( - guardian_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_mut().ok_or(Error::::GuardianIndexNotExist)?; - - if info.3 == CandidateStatus::Banned { - T::Currency::reserve(&who, T::MinimumGuardianDeposit::get())?; - } - - // Update hash - info.0 = info_hash; - // Update block number - info.1 = frame_system::Pallet::::block_number(); - Self::deposit_event(Event::GuardianUpdated { - guardian: who, - guardian_index, - info_hash, - }); - Ok(()) - }, - )?; - Ok(()) - } - - /// Clean a guardian legal info - #[pallet::call_index(2)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn clean_guardian(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; - - // Ensure existing - let guardian_index = - PublicGuardianToIndex::::take(&who).ok_or(Error::::GuardianNotRegistered)?; - - // Update guardian - // But if banned, then require extra reserve - GuardianIndexToInfo::::try_mutate_exists( - guardian_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_ref().ok_or(Error::::GuardianIndexNotExist)?; - - if info.3 != CandidateStatus::Banned { - let _ = T::Currency::unreserve(&who, T::MinimumGuardianDeposit::get()); - } - - // Delete item - *maybe_info = None; - Self::deposit_event(Event::GuardianCleaned { guardian: who, guardian_index }); - Ok(()) - }, - )?; - Ok(()) - } - - #[pallet::call_index(3)] - #[pallet::weight({195_000_000})] - pub fn judge_guardian_status( - origin: OriginFor, - guardian: T::AccountId, - status: CandidateStatus, - ) -> DispatchResult { - T::GuardianJudgeOrigin::ensure_origin(origin)?; - let guardian_index = PublicGuardianToIndex::::get(&guardian) - .ok_or(Error::::GuardianNotRegistered)?; - GuardianIndexToInfo::::try_mutate_exists( - guardian_index, - |maybe_info| -> Result<(), DispatchError> { - let info = maybe_info.as_mut().ok_or(Error::::GuardianIndexNotExist)?; - // Update block number - info.1 = frame_system::Pallet::::block_number(); - // Update status - info.3 = status; - - Self::deposit_event(Event::GuardianStatusUpdated { - guardian, - guardian_index, - status, - }); - Ok(()) - }, - )?; - Ok(()) - } - - /// Anyone can vote for guardian - /// However if voter is not participating the staking pool - /// then its vote will never effecting guardian selection procedure - #[pallet::call_index(4)] - #[pallet::weight({195_000_000})] - pub fn vote( - origin: OriginFor, - guardian: T::AccountId, - status: Option, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - // Ensure existing - let guardian_index = PublicGuardianToIndex::::get(&guardian) - .ok_or(Error::::GuardianNotRegistered)?; - if let Some(i) = status { - GuardianVotes::::insert(&who, guardian_index, i); - } else { - GuardianVotes::::remove(&who, guardian_index); - } - - Self::deposit_event(Event::VoteGuardian { - voter: who, - guardian_index, - guardian, - status, - }); - Ok(()) - } - - /// Remove vote to None - #[pallet::call_index(5)] - #[pallet::weight({195_000_000})] - pub fn remove_all_votes(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; - let _ = GuardianVotes::::clear_prefix(&who, u32::MAX, None); - Self::deposit_event(Event::RemoveAllVote { voter: who }); - Ok(()) - } - } -} - -/// Some sort of check on the origin is from guardian. -impl GuardianQuery for Pallet { - fn is_guardian(account: T::AccountId) -> bool { - if let Some(guardian_index) = PublicGuardianToIndex::::get(&account) { - if let Some(info) = GuardianIndexToInfo::::get(guardian_index) { - if info.3 != CandidateStatus::Banned { - return true; - } - } - } - - false - } - - fn is_verified_guardian(account: T::AccountId) -> bool { - if let Some(guardian_index) = PublicGuardianToIndex::::get(&account) { - if let Some(info) = GuardianIndexToInfo::::get(guardian_index) { - if info.3 == CandidateStatus::Verified { - return true; - } - } - } - - false - } - - fn get_vote(voter: T::AccountId, guardian: T::AccountId) -> Option { - // Ensure existing - if let Some(guardian_index) = PublicGuardianToIndex::::get(&guardian) { - return GuardianVotes::::get(&voter, guardian_index); - } - None - } -} diff --git a/parachain/pallets/collab-ai/guardian/src/mock.rs b/parachain/pallets/collab-ai/guardian/src/mock.rs deleted file mode 100644 index 8dbf91a431..0000000000 --- a/parachain/pallets/collab-ai/guardian/src/mock.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate as pallet_guardian; -use frame_support::{construct_runtime, derive_impl, parameter_types}; -use sp_runtime::{traits::IdentityLookup, AccountId32}; -// use sp_io::TestExternalities; -use sp_runtime::BuildStorage; - -// Define mock runtime types -pub type Balance = u128; -pub type AccountId = AccountId32; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Balances: pallet_balances, - Guardian: pallet_guardian, - } -); - -parameter_types! { - pub const MinimumGuardianDeposit: Balance = 10; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -// Implement pallet_guardian config trait for mock runtime. -impl pallet_guardian::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumGuardianDeposit = MinimumGuardianDeposit; - type GuardianJudgeOrigin = frame_system::EnsureRoot; -} - -// Helper function to initialize the test environment. -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - pallet_balances::GenesisConfig:: { - balances: vec![(AccountId32::from([1u8; 32]), 100), (AccountId32::from([2u8; 32]), 100)], - } - .assimilate_storage(&mut t) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} diff --git a/parachain/pallets/collab-ai/guardian/src/tests.rs b/parachain/pallets/collab-ai/guardian/src/tests.rs deleted file mode 100644 index 8886406a92..0000000000 --- a/parachain/pallets/collab-ai/guardian/src/tests.rs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::mock::*; -use frame_support::assert_ok; -use pallet_collab_ai_common::GuardianQuery; // Import GuardianQuery trait -use pallet_collab_ai_common::GuardianVote; -use sp_runtime::AccountId32; - -#[test] -fn test_regist_guardian() { - new_test_ext().execute_with(|| { - let guardian: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register guardian - assert_ok!(Guardian::regist_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(info_hash) - )); - - // Check if guardian is stored correctly - assert_eq!(Guardian::public_guardian_to_index(&guardian), Some(1)); - System::assert_last_event(RuntimeEvent::Guardian(crate::Event::GuardianRegisted { - guardian, - guardian_index: 1, - info_hash: sp_core::H256(info_hash), - })); - }); -} - -#[test] -fn test_update_guardian() { - new_test_ext().execute_with(|| { - let guardian: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - let updated_hash: [u8; 32] = [2; 32]; - - // Register guardian - assert_ok!(Guardian::regist_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(info_hash) - )); - - // Update guardian - assert_ok!(Guardian::update_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(updated_hash) - )); - - // Check if guardian info is updated correctly - let guardian_info = Guardian::guardian_index_to_info(1).unwrap(); - assert_eq!(guardian_info.0, sp_core::H256(updated_hash)); - System::assert_last_event(RuntimeEvent::Guardian(crate::Event::GuardianUpdated { - guardian, - guardian_index: 1, - info_hash: sp_core::H256(updated_hash), - })); - }); -} - -#[test] -fn test_clean_guardian() { - new_test_ext().execute_with(|| { - let guardian: AccountId32 = AccountId32::from([1u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register and clean guardian - assert_ok!(Guardian::regist_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(info_hash) - )); - assert_ok!(Guardian::clean_guardian(RuntimeOrigin::signed(guardian.clone()))); - - // Check if guardian is removed - assert_eq!(Guardian::public_guardian_to_index(&guardian), None); - System::assert_last_event(RuntimeEvent::Guardian(crate::Event::GuardianCleaned { - guardian, - guardian_index: 1, - })); - }); -} - -#[test] -fn test_vote_for_guardian() { - new_test_ext().execute_with(|| { - let guardian: AccountId32 = AccountId32::from([1u8; 32]); - let voter: AccountId32 = AccountId32::from([2u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register guardian - assert_ok!(Guardian::regist_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(info_hash) - )); - - // Cast a vote - assert_ok!(Guardian::vote( - RuntimeOrigin::signed(voter.clone()), - guardian.clone(), - Some(GuardianVote::Specific(1)) - )); - - // Check if vote is recorded - assert_eq!( - Guardian::get_vote(voter.clone(), guardian.clone()), - Some(GuardianVote::Specific(1)) - ); - System::assert_last_event(RuntimeEvent::Guardian(crate::Event::VoteGuardian { - voter, - guardian_index: 1, - guardian, - status: Some(GuardianVote::Specific(1)), - })); - }); -} - -#[test] -fn test_remove_all_votes() { - new_test_ext().execute_with(|| { - let guardian: AccountId32 = AccountId32::from([1u8; 32]); - let voter: AccountId32 = AccountId32::from([2u8; 32]); - let info_hash: [u8; 32] = [1; 32]; - - // Register guardian and vote - assert_ok!(Guardian::regist_guardian( - RuntimeOrigin::signed(guardian.clone()), - sp_core::H256(info_hash) - )); - assert_ok!(Guardian::vote( - RuntimeOrigin::signed(voter.clone()), - guardian.clone(), - Some(GuardianVote::Specific(1)) - )); - - // Remove all votes - assert_ok!(Guardian::remove_all_votes(RuntimeOrigin::signed(voter.clone()))); - - // Check if votes are removed - assert_eq!(Guardian::get_vote(voter.clone(), guardian.clone()), None); - System::assert_last_event(RuntimeEvent::Guardian(crate::Event::RemoveAllVote { voter })); - }); -} diff --git a/parachain/pallets/collab-ai/halving-mint/Cargo.toml b/parachain/pallets/collab-ai/halving-mint/Cargo.toml deleted file mode 100644 index 2bf01e4580..0000000000 --- a/parachain/pallets/collab-ai/halving-mint/Cargo.toml +++ /dev/null @@ -1,60 +0,0 @@ -[package] -name = 'pallet-halving-mint' -description = 'pallet to mint tokens in a halving way similar to BTC' -authors = ['Trust Computing GmbH '] -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[lints] -workspace = true - -[dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } -serde = { workspace = true } - -frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-assets = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -[dev-dependencies] -sp-core = { workspace = true } -sp-io = { workspace = true } -pallet-balances = { workspace = true } - -[features] -default = ["std"] -std = [ - "parity-scale-codec/std", - "serde/std", - "frame-benchmarking?/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "pallet-assets/std", - "pallet-balances/std", -] -runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/halving-mint/src/lib.rs b/parachain/pallets/collab-ai/halving-mint/src/lib.rs deleted file mode 100644 index e181b884f8..0000000000 --- a/parachain/pallets/collab-ai/halving-mint/src/lib.rs +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -//! # Pallet halving-mint -//! -//! This pallet mints the (native) token in a halving way. -//! -//! It will be parameterized with the total issuance count and halving interval (in blocks), -//! The minted token is deposited to the `beneficiary` account, which should be a privated -//! account derived from the PalletId(similar to treasury). There's a trait `OnTokenMinted` -//! to hook the callback into other pallet. -//! -//! The main parameters: -//! - total issuance -//! - halving interval -//! - beneficiary account -//! are defined as runtime constants. It implies that once onboarded, they can be changed -//! only by runtime upgrade. Thus it has a stronger guarantee in comparison to extrinsics. - -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::useless_conversion)] - -use frame_support::traits::tokens::{ - fungibles::{metadata::Mutate as MMutate, Create, Inspect, Mutate}, - AssetId, Balance, -}; -pub use pallet::*; -use parity_scale_codec::{Decode, Encode}; -use scale_info::TypeInfo; -use serde::{Deserialize, Serialize}; - -#[cfg(test)] -mod mock; - -#[cfg(test)] -mod tests; - -mod traits; -pub use traits::OnTokenMinted; - -/// an on/off flag, used in both `MintState` and `OnTokenMintedState` -#[derive( - PartialEq, Eq, Clone, Copy, Default, Serialize, Deserialize, Encode, Decode, Debug, TypeInfo, -)] -pub enum State { - #[default] - #[codec(index = 0)] - Stopped, - #[codec(index = 1)] - Running, -} - -#[frame_support::pallet] -pub mod pallet { - use super::*; - use frame_support::{pallet_prelude::*, traits::StorageVersion, PalletId}; - use frame_system::pallet_prelude::{BlockNumberFor, *}; - use sp_runtime::{ - traits::{AccountIdConversion, One, Zero}, - Saturating, - }; - - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] - pub struct Pallet(PhantomData<(T, I)>); - - #[pallet::config] - pub trait Config: frame_system::Config { - type Assets: Inspect - + Mutate - + Create - + MMutate; - type AssetId: AssetId + Copy; - type AssetBalance: Balance; - type RuntimeEvent: From> - + IsType<::RuntimeEvent>; - /// The origin to control the minting configuration - type ManagerOrigin: EnsureOrigin; - /// The total issuance of the (native) token - #[pallet::constant] - type TotalIssuance: Get; - /// Halving internal in blocks, we force u32 type, BlockNumberFor implements - /// AtLeast32BitUnsigned so it's safe - #[pallet::constant] - type HalvingInterval: Get; - /// The beneficiary PalletId, used for deriving its sovereign AccountId - #[pallet::constant] - type BeneficiaryId: Get; - /// Hook for other pallets to deal with OnTokenMinted event - type OnTokenMinted: OnTokenMinted; - } - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event, I: 'static = ()> { - MintStateChanged { new_state: State }, - OnTokenMintedStateChanged { new_state: State }, - MintStarted { asset_id: T::AssetId, start_block: BlockNumberFor }, - Minted { asset_id: T::AssetId, to: T::AccountId, amount: T::AssetBalance }, - } - - #[pallet::error] - pub enum Error { - MintStateUnchanged, - OnTokenMintedStateUnchanged, - MintAlreadyStarted, - MintNotStarted, - StartBlockTooEarly, - SkippedBlocksOverflow, - } - - #[pallet::storage] - #[pallet::getter(fn mint_asset_id)] - pub type MintAssetId, I: 'static = ()> = StorageValue<_, T::AssetId, OptionQuery>; - - #[pallet::storage] - #[pallet::getter(fn mint_state)] - pub type MintState, I: 'static = ()> = StorageValue<_, State, ValueQuery>; - - /// If the `OnTokenMinted` callback is stopped or not - #[pallet::storage] - #[pallet::getter(fn on_token_minted_state)] - pub type OnTokenMintedState, I: 'static = ()> = StorageValue<_, State, ValueQuery>; - - /// the block number from which the minting is started, `None` means minting - /// is not started yet - #[pallet::storage] - #[pallet::getter(fn start_block)] - pub type StartBlock, I: 'static = ()> = - StorageValue<_, BlockNumberFor, OptionQuery>; - - /// Number of skipped blocks being counted when `MintState` is `Stopped` - #[pallet::storage] - #[pallet::getter(fn skipped_blocks)] - pub type SkippedBlocks, I: 'static = ()> = - StorageValue<_, BlockNumberFor, ValueQuery>; - - #[pallet::genesis_config] - pub struct GenesisConfig, I: 'static = ()> { - pub mint_state: State, - pub on_token_minted_state: State, - pub start_block: Option>, - #[serde(skip)] - pub phantom: PhantomData, - } - - impl, I: 'static> Default for GenesisConfig { - fn default() -> Self { - Self { - mint_state: State::Stopped, - on_token_minted_state: State::Stopped, - start_block: None, - phantom: Default::default(), - } - } - } - - #[pallet::genesis_build] - impl, I: 'static> BuildGenesisConfig for GenesisConfig { - fn build(&self) { - MintState::::put(self.mint_state); - OnTokenMintedState::::put(self.on_token_minted_state); - if let Some(n) = self.start_block { - StartBlock::::put(n); - } - } - } - - #[pallet::hooks] - impl, I: 'static> Hooks> for Pallet { - fn on_initialize(now: BlockNumberFor) -> Weight { - let mut weight = Weight::zero(); - if let Some(start_block) = Self::start_block() { - if Self::mint_state() == State::Running { - let skipped_blocks = Self::skipped_blocks(); - // 3 reads: `mint_state`, `start_block`, `skipped_blocks` - weight = weight.saturating_add(T::DbWeight::get().reads_writes(3, 0)); - - if now < start_block.saturating_add(skipped_blocks) { - return weight; - } - - let halving_interval = T::HalvingInterval::get(); - - // calculate the amount of initially minted tokens before first halving - let mut minted = T::TotalIssuance::get() / (halving_interval * 2).into(); - // halving round index - let halving_round = (now - start_block.saturating_add(skipped_blocks)) - / halving_interval.into(); - // beneficiary account - let to = Self::beneficiary_account(); - - // 2 reads: `total_issuance`, `halving_interval` - weight = weight.saturating_add(T::DbWeight::get().reads_writes(2, 0)); - - // if we want to use bit shift, we need to: - // 1. know the overlfow limit similar to what bitcoin has: `if (halvings >= - // 64) return 0;` so 127 for u128 - // 2. coerce the `halving_round` to u32 - // but both `halving_round` and `minted` are associated types that need to be - // defined during runtime binding thus plain division is used - let mut i = BlockNumberFor::::zero(); - while i < halving_round { - minted /= 2u32.into(); - i += BlockNumberFor::::one(); - } - - // theoreticlaly we can deal with the minted tokens directly in the trait impl - // pallet, without depositing to an account first. - // but the purpose of having the extra logic is to make sure the tokens are - // minted to the beneficiary account, regardless of what happens callback. Even - // if the callback errors out, it's guaranteed that the tokens are - // already minted (and stored on an account), which resonates with the "fair - // launch" concept. - // - // Also imagine there's no callback impl, in this case the tokens will still be - // minted and accumulated. - if let Some(id) = Self::mint_asset_id() { - if let Ok(actual) = T::Assets::mint_into(id, &to, minted) { - Self::deposit_event(Event::Minted { - asset_id: id, - to: to.clone(), - amount: actual, - }) - } - - if Self::on_token_minted_state() == State::Running { - weight = weight - .saturating_add(T::OnTokenMinted::token_minted(id, to, minted)); - } - } - - // 2 reads: `asset_id`, `on_token_minted_state` - weight = weight.saturating_add(T::DbWeight::get().reads_writes(2, 0)); - } else { - // we should have minted tokens but it's forcibly stopped - let skipped_blocks = - Self::skipped_blocks().saturating_add(BlockNumberFor::::one()); - SkippedBlocks::::put(skipped_blocks); - // 1 read, 1 write: `SkippedBlocks` - weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); - } - } - weight - } - } - - // TODO: benchmarking and WeightInfo - // IMO it's not **that** bad to use constant weight for extrinsics now as they are simple calls - // and should only be called once or very few times. - #[pallet::call] - impl, I: 'static> Pallet { - /// Set the state of the minting, it essentially "pause" and "resume" the minting process. - #[pallet::call_index(0)] - #[pallet::weight((195_000_000, DispatchClass::Normal))] - pub fn set_mint_state(origin: OriginFor, state: State) -> DispatchResultWithPostInfo { - T::ManagerOrigin::ensure_origin(origin)?; - ensure!(StartBlock::::get().is_some(), Error::::MintNotStarted); - ensure!(state != Self::mint_state(), Error::::MintStateUnchanged); - MintState::::put(state); - Self::deposit_event(Event::MintStateChanged { new_state: state }); - Ok(Pays::No.into()) - } - - #[pallet::call_index(1)] - #[pallet::weight((195_000_000, DispatchClass::Normal))] - pub fn set_on_token_minted_state( - origin: OriginFor, - state: State, - ) -> DispatchResultWithPostInfo { - T::ManagerOrigin::ensure_origin(origin)?; - ensure!(StartBlock::::get().is_some(), Error::::MintNotStarted); - ensure!( - state != Self::on_token_minted_state(), - Error::::OnTokenMintedStateUnchanged - ); - OnTokenMintedState::::put(state); - Self::deposit_event(Event::OnTokenMintedStateChanged { new_state: state }); - Ok(Pays::No.into()) - } - - /// Start mint from next block, this is the earliest block the next minting can happen, - /// as we already missed the intialization of current block and we don't do retroactive - /// minting - #[pallet::call_index(2)] - #[pallet::weight((195_000_000, DispatchClass::Normal))] - pub fn start_mint_from_next_block( - origin: OriginFor, - id: T::AssetId, - name: Vec, - symbol: Vec, - decimals: u8, - ) -> DispatchResultWithPostInfo { - Self::start_mint_from_block( - origin, - frame_system::Pallet::::block_number() + BlockNumberFor::::one(), - id, - name, - symbol, - decimals, - ) - } - - /// Start mint from a given block that is larger than the current block number - #[pallet::call_index(3)] - #[pallet::weight((195_000_000, DispatchClass::Normal))] - pub fn start_mint_from_block( - origin: OriginFor, - start_block: BlockNumberFor, - id: T::AssetId, - name: Vec, - symbol: Vec, - decimals: u8, - ) -> DispatchResultWithPostInfo { - T::ManagerOrigin::ensure_origin(origin)?; - ensure!(StartBlock::::get().is_none(), Error::::MintAlreadyStarted); - ensure!( - start_block > frame_system::Pallet::::block_number(), - Error::::StartBlockTooEarly - ); - MintState::::put(State::Running); - OnTokenMintedState::::put(State::Running); - StartBlock::::put(start_block); - T::Assets::create(id, Self::beneficiary_account(), true, 1u32.into())?; - T::Assets::set(id, &Self::beneficiary_account(), name, symbol, decimals)?; - MintAssetId::::put(id); - Self::deposit_event(Event::MintStarted { asset_id: id, start_block }); - Ok(Pays::No.into()) - } - } - - impl, I: 'static> Pallet { - pub fn beneficiary_account() -> T::AccountId { - T::BeneficiaryId::get().into_account_truncating() - } - } -} diff --git a/parachain/pallets/collab-ai/halving-mint/src/mock.rs b/parachain/pallets/collab-ai/halving-mint/src/mock.rs deleted file mode 100644 index c3fae1809c..0000000000 --- a/parachain/pallets/collab-ai/halving-mint/src/mock.rs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{self as pallet_halving_mint, Config, Instance1, OnTokenMinted}; -use frame_support::{ - construct_runtime, derive_impl, - pallet_prelude::*, - parameter_types, - traits::{ - tokens::{fungibles::Mutate, Preservation}, - AsEnsureOriginWithArg, - }, - PalletId, -}; -use frame_system::{EnsureRoot, EnsureSigned}; -use sp_core::{ConstU32, ConstU64}; -use sp_runtime::BuildStorage; - -type AccountId = u64; -type Balance = u64; -type AssetId = u64; - -construct_runtime!( - pub enum Test - { - System: frame_system, - Assets: pallet_assets, - Balances: pallet_balances, - HalvingMint: pallet_halving_mint::, - } -); - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -parameter_types! { - pub const AssetDeposit: Balance = 0; - pub const AssetAccountDeposit: Balance = 0; - pub const ApprovalDeposit: Balance = 0; - pub const AssetsStringLimit: u32 = 50; - pub const MetadataDepositBase: Balance = 0; - pub const MetadataDepositPerByte: Balance = 0; -} - -impl pallet_assets::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = AssetId; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = EnsureRoot; - type AssetDeposit = AssetDeposit; - type AssetAccountDeposit = AssetAccountDeposit; - type MetadataDepositBase = MetadataDepositBase; - type MetadataDepositPerByte = MetadataDepositPerByte; - type ApprovalDeposit = ApprovalDeposit; - type StringLimit = AssetsStringLimit; - type Freezer = (); - type Extra = (); - type WeightInfo = (); - type RemoveItemsLimit = ConstU32<0>; - type AssetIdParameter = AssetId; - type CallbackHandle = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - -parameter_types! { - pub const BeneficiaryId: PalletId = PalletId(*b"lty/hlvm"); - pub const TestAssetId: AssetId = 1; -} - -impl pallet_halving_mint::Config for Test { - type RuntimeEvent = RuntimeEvent; - type AssetBalance = Balance; - type AssetId = AssetId; - type Assets = Assets; - type ManagerOrigin = frame_system::EnsureRoot; - type TotalIssuance = ConstU64<1000>; - type HalvingInterval = ConstU32<10>; - type BeneficiaryId = BeneficiaryId; - type OnTokenMinted = TransferOnTokenMinted; -} - -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - pallet_balances::GenesisConfig:: { - balances: vec![(HalvingMint::beneficiary_account(), 10)], - } - .assimilate_storage(&mut t) - .unwrap(); - let mut ext: sp_io::TestExternalities = t.into(); - ext.execute_with(|| { - System::set_block_number(1); - }); - ext -} - -pub fn run_to_block(n: u64) { - while System::block_number() < n { - if System::block_number() > 1 { - System::on_finalize(System::block_number()); - } - System::set_block_number(System::block_number() + 1); - System::on_initialize(System::block_number()); - HalvingMint::on_initialize(System::block_number()); - } -} - -pub struct TransferOnTokenMinted(sp_std::marker::PhantomData<(T, I)>); - -impl OnTokenMinted for TransferOnTokenMinted -where - T: frame_system::Config + Config, - T::Assets: Mutate, -{ - fn token_minted( - asset_id: T::AssetId, - beneficiary: T::AccountId, - amount: T::AssetBalance, - ) -> Weight { - let _ = T::Assets::transfer(asset_id, &beneficiary, &1, amount, Preservation::Expendable) - .unwrap(); - Weight::zero() - } -} diff --git a/parachain/pallets/collab-ai/halving-mint/src/tests.rs b/parachain/pallets/collab-ai/halving-mint/src/tests.rs deleted file mode 100644 index 074534ef8b..0000000000 --- a/parachain/pallets/collab-ai/halving-mint/src/tests.rs +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{mock::*, Error, Event, Inspect, Instance1, State}; -use frame_support::{assert_noop, assert_ok}; - -#[test] -fn set_mint_state_check_works() { - new_test_ext().execute_with(|| { - assert_eq!(HalvingMint::mint_state(), State::Stopped); - assert_noop!( - HalvingMint::set_mint_state(RuntimeOrigin::signed(1), State::Running), - sp_runtime::DispatchError::BadOrigin, - ); - assert_noop!( - HalvingMint::set_mint_state(RuntimeOrigin::root(), State::Running), - Error::::MintNotStarted, - ); - assert_ok!(HalvingMint::start_mint_from_next_block( - RuntimeOrigin::root(), - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - )); - assert_eq!(HalvingMint::mint_state(), State::Running); - assert_noop!( - HalvingMint::set_mint_state(RuntimeOrigin::root(), State::Running), - Error::::MintStateUnchanged, - ); - assert_ok!(HalvingMint::set_mint_state(RuntimeOrigin::root(), State::Stopped)); - assert_eq!(HalvingMint::mint_state(), State::Stopped); - System::assert_last_event(Event::MintStateChanged { new_state: State::Stopped }.into()); - }); -} - -#[test] -fn start_mint_too_early_fails() { - new_test_ext().execute_with(|| { - assert_eq!(System::block_number(), 1); - assert_noop!( - HalvingMint::start_mint_from_block( - RuntimeOrigin::root(), - 0, - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - ), - Error::::StartBlockTooEarly, - ); - assert_noop!( - HalvingMint::start_mint_from_block( - RuntimeOrigin::root(), - 1, - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - ), - Error::::StartBlockTooEarly, - ); - assert_ok!(HalvingMint::start_mint_from_block( - RuntimeOrigin::root(), - 2, - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - )); - System::assert_last_event(Event::MintStarted { asset_id: 1, start_block: 2 }.into()); - }); -} - -#[test] -fn halving_mint_works() { - new_test_ext().execute_with(|| { - let beneficiary = HalvingMint::beneficiary_account(); - - assert_eq!(System::block_number(), 1); - assert_eq!(Assets::total_issuance(1), 0); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_ok!(HalvingMint::start_mint_from_next_block( - RuntimeOrigin::root(), - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - )); - System::assert_last_event(Event::MintStarted { asset_id: 1, start_block: 2 }.into()); - - run_to_block(2); - // 50 tokens are minted - assert_eq!(Assets::total_issuance(1), 50); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_eq!(Assets::balance(1, 1), 50); - - run_to_block(11); - assert_eq!(Assets::total_issuance(1), 500); - assert_eq!(Assets::balance(1, 1), 500); - - run_to_block(12); - // the first halving - assert_eq!(Assets::total_issuance(1), 525); - assert_eq!(Assets::balance(1, 1), 525); - - run_to_block(22); - // the second halving - assert_eq!(Assets::total_issuance(1), 762); - assert_eq!(Assets::balance(1, 1), 762); - - run_to_block(52); - // the fifth halving - only 1 token is minted - assert_eq!(Assets::total_issuance(1), 961); - assert_eq!(Assets::balance(1, 1), 961); - - run_to_block(62); - // the sixth halving - but 0 tokens will be minted - assert_eq!(Assets::total_issuance(1), 970); - assert_eq!(Assets::balance(1, 1), 970); - - run_to_block(1_000); - // no changes since the sixth halving, the total minted token will be fixated on 970, - // the "missing" 30 comes from the integer division and the total_issuance is too small. - // - // we'll have much accurate result in reality where token unit is 18 decimal - assert_eq!(Assets::total_issuance(1), 970); - assert_eq!(Assets::balance(1, 1), 970); - }); -} - -#[test] -fn set_on_token_minted_state_works() { - new_test_ext().execute_with(|| { - let beneficiary = HalvingMint::beneficiary_account(); - - assert_ok!(HalvingMint::start_mint_from_next_block( - RuntimeOrigin::root(), - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - )); - assert_ok!(HalvingMint::set_on_token_minted_state(RuntimeOrigin::root(), State::Stopped)); - System::assert_last_event( - Event::OnTokenMintedStateChanged { new_state: State::Stopped }.into(), - ); - - run_to_block(2); - // 50 tokens are minted, but none is transferred away - assert_eq!(Assets::total_issuance(1), 50); - assert_eq!(Assets::balance(1, beneficiary), 50); - assert_eq!(Assets::balance(1, 1), 0); - - run_to_block(10); - assert_ok!(HalvingMint::set_on_token_minted_state(RuntimeOrigin::root(), State::Running)); - System::assert_last_event( - Event::OnTokenMintedStateChanged { new_state: State::Running }.into(), - ); - - run_to_block(11); - // start to transfer token - assert_eq!(Assets::total_issuance(1), 500); - assert_eq!(Assets::balance(1, beneficiary), 450); - assert_eq!(Assets::balance(1, 1), 50); - }); -} - -#[test] -fn set_mint_state_works() { - new_test_ext().execute_with(|| { - let beneficiary = HalvingMint::beneficiary_account(); - - assert_ok!(HalvingMint::start_mint_from_next_block( - RuntimeOrigin::root(), - 1, - "Test".as_bytes().to_vec(), - "Test".as_bytes().to_vec(), - 18 - )); - - run_to_block(2); - assert_eq!(Assets::total_issuance(1), 50); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_eq!(Assets::balance(1, 1), 50); - // stop the minting - assert_ok!(HalvingMint::set_mint_state(RuntimeOrigin::root(), State::Stopped)); - - run_to_block(3); - // no new tokens should be minted - assert_eq!(Assets::total_issuance(1), 50); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_eq!(Assets::balance(1, 1), 50); - - run_to_block(4); - // resume the minting - assert_ok!(HalvingMint::set_mint_state(RuntimeOrigin::root(), State::Running)); - - run_to_block(5); - assert_eq!(Assets::total_issuance(1), 100); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_eq!(Assets::balance(1, 1), 100); - assert_eq!(HalvingMint::skipped_blocks(), 2); - - // the first halving should be delayed to block 14 - run_to_block(14); - assert_eq!(Assets::total_issuance(1), 525); - assert_eq!(Assets::balance(1, beneficiary), 0); - assert_eq!(Assets::balance(1, 1), 525); - }); -} diff --git a/parachain/pallets/collab-ai/halving-mint/src/traits.rs b/parachain/pallets/collab-ai/halving-mint/src/traits.rs deleted file mode 100644 index 19bfdcebf7..0000000000 --- a/parachain/pallets/collab-ai/halving-mint/src/traits.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -/// Traits for pallet-halving-mint -use frame_support::pallet_prelude::Weight; - -pub trait OnTokenMinted { - fn token_minted(asset_id: AssetId, beneficiary: AccountId, amount: Balance) -> Weight; -} - -impl OnTokenMinted for () { - fn token_minted(_asset_id: AssetId, _beneficiary: AccountId, _amount: Balance) -> Weight { - Weight::zero() - } -} diff --git a/parachain/pallets/collab-ai/investing-pool/Cargo.toml b/parachain/pallets/collab-ai/investing-pool/Cargo.toml deleted file mode 100644 index 6e3fe47921..0000000000 --- a/parachain/pallets/collab-ai/investing-pool/Cargo.toml +++ /dev/null @@ -1,66 +0,0 @@ -[package] -authors = ['Litentry Dev'] -description = 'Pallet for managing investing pool' -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -name = 'pallet-investing-pool' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } -serde = { workspace = true } - -frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-runtime = { workspace = true, features = ["serde"] } -sp-std = { workspace = true } - -pallet-collab-ai-common = { workspace = true } - -[dev-dependencies] -sp-core = { workspace = true } -sp-io = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } - -[features] -default = ["std"] -std = [ - "frame-benchmarking?/std", - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", - "parity-scale-codec/std", - "scale-info/std", - "serde/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "pallet-assets/std", -] -runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-collab-ai-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "sp-runtime/try-runtime", - "pallet-assets/try-runtime", - "pallet-balances/try-runtime", - "pallet-collab-ai-common/try-runtime", -] diff --git a/parachain/pallets/collab-ai/investing-pool/src/lib.rs b/parachain/pallets/collab-ai/investing-pool/src/lib.rs deleted file mode 100644 index d90f1e0cc8..0000000000 --- a/parachain/pallets/collab-ai/investing-pool/src/lib.rs +++ /dev/null @@ -1,899 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(dead_code)] -use frame_support::{ - pallet_prelude::*, - traits::{ - tokens::{ - fungibles::{Create as FsCreate, Inspect as FsInspect, Mutate as FsMutate}, - Fortitude, Precision, Preservation, - }, - StorageVersion, - }, - PalletId, -}; -use frame_system::pallet_prelude::*; -pub use pallet::*; -use sp_runtime::{ - traits::{ - AccountIdConversion, AtLeast32BitUnsigned, CheckedAdd, CheckedDiv, CheckedMul, One, Zero, - }, - ArithmeticError, Perquintill, Saturating, -}; -use sp_std::{fmt::Debug, prelude::*}; - -use pallet_collab_ai_common::*; - -// #[cfg(test)] -// mod mock; -// #[cfg(test)] -// mod tests; - -#[derive(PartialEq, Eq, Clone, Encode, Debug, Decode, TypeInfo)] -pub struct InvestingWeightInfo { - // For a single position or - // Synthetic overall average effective_time weighted by staked amount - pub effective_time: BlockNumber, - // Staked amount - pub amount: Balance, - // This is recorded for not allowing weight calculation when time < some of history effective - // time - pub last_add_time: BlockNumber, -} - -impl InvestingWeightInfo -where - Balance: AtLeast32BitUnsigned + Copy, - BlockNumber: AtLeast32BitUnsigned + Copy, -{ - // Mixing a new added investing position, replace the checkpoint with Synthetic new one - // Notice: The logic will be wrong if weight calculated time is before any single added - // effective_time - // None means TypeIncompatible Or Overflow Or Division Zero - fn add(&mut self, effective_time: BlockNumber, amount: Balance) -> Option<()> { - // If last_add_time always > effective_time, only new added effective time can effect - // last_add_time - self.last_add_time = self.last_add_time.max(effective_time); - - // We try force all types into u128, then convert it back - let e: u128 = effective_time.try_into().ok()?; - let s: u128 = amount.try_into().ok()?; - - let oe: u128 = self.effective_time.try_into().ok()?; - let os: u128 = self.amount.try_into().ok()?; - - let new_amount: u128 = os.checked_add(s)?; - // (oe * os + e * s) / (os + s) - let new_effective_time: u128 = - (oe.checked_mul(os)?.checked_add(e.checked_mul(s)?)?).checked_div(new_amount)?; - self.amount = new_amount.try_into().ok()?; - self.effective_time = new_effective_time.try_into().ok()?; - Some(()) - } - - // Mixing a new investing position removed, replace the checkpoint with Synthetic new one - // Notice: The logic will be wrong if weight calculated time is before any single added - // effective_time - // None means TypeIncompatible Or Overflow Or Division Zero - fn remove(&mut self, effective_time: BlockNumber, amount: Balance) -> Option<()> { - // We try force all types into u128, then convert it back - let e: u128 = effective_time.try_into().ok()?; - let s: u128 = amount.try_into().ok()?; - - let oe: u128 = self.effective_time.try_into().ok()?; - let os: u128 = self.amount.try_into().ok()?; - - let new_amount: u128 = os.checked_sub(s)?; - // (oe * os - e * s) / (os - s) - let new_effective_time: u128 = - (oe.checked_mul(os)?.checked_sub(e.checked_mul(s)?)?).checked_div(new_amount)?; - self.amount = new_amount.try_into().ok()?; - self.effective_time = new_effective_time.try_into().ok()?; - Some(()) - } - - // Claim/Update weighted info based on target until-block and return the consumed weight - // None means TypeIncompatible Or Overflow - fn claim(&mut self, n: BlockNumber) -> Option { - // Claim time before last_add_time is not allowed, since weight can not be calculated - let weight = self.weight(n)?; - self.effective_time = n; - - Some(weight) - } - - // consume corresponding weight, change effective time without changing staked amount, return - // the changed effective time - // This function is mostly used for Synthetic checkpoint change - // None means TypeIncompatible Or Division Zero - fn claim_based_on_weight(&mut self, weight: u128) -> Option { - let oe: u128 = self.effective_time.try_into().ok()?; - let os: u128 = self.amount.try_into().ok()?; - - let delta_e: u128 = weight.checked_div(os)?; - let new_effective_time: BlockNumber = (oe + delta_e).try_into().ok()?; - self.effective_time = new_effective_time; - - Some(new_effective_time) - } - - // Withdraw investing amount and return the amount after withdrawal - // None means underflow - fn withdraw(&mut self, v: Balance) -> Option { - self.amount = self.amount.checked_sub(&v)?; - - Some(self.amount) - } - - // You should never use n < any single effective_time - // it only works for n > all effective_time - // None means TypeIncompatible Or Overflow - fn weight(&self, n: BlockNumber) -> Option { - // Estimate weight before last_add_time can be biased so not allowed - if self.last_add_time > n { - return None; - } - - let e: u128 = n.checked_sub(&self.effective_time)?.try_into().ok()?; - let s: u128 = self.amount.try_into().ok()?; - e.checked_mul(s) - } - - // Force estimate weight regardless - // None means TypeIncompatible Or Overflow - fn weight_force(&self, n: BlockNumber) -> Option { - let e: u128 = n.checked_sub(&self.effective_time)?.try_into().ok()?; - let s: u128 = self.amount.try_into().ok()?; - e.checked_mul(s) - } -} - -#[frame_support::pallet] -pub mod pallet { - use frame_support::transactional; - - use super::*; - - pub type BalanceOf = - <::Fungibles as FsInspect<::AccountId>>::Balance; - pub type AssetIdOf = - <::Fungibles as FsInspect<::AccountId>>::AssetId; - - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config { - /// Overarching event type - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Pool proposal pallet origin used to start an investing pool - type PoolProposalPalletOrigin: EnsureOrigin; - - /// Origin used to update epoch reward for investing pool - type RewardUpdateOrigin: EnsureOrigin; - - /// Origin used to administer the investing pool - type InvestingPoolAdminOrigin: EnsureOrigin; - - type Fungibles: FsMutate + FsCreate; - - /// The beneficiary PalletId, used fro deriving its sovereign account to hold assets of reward - #[pallet::constant] - type StableTokenBeneficiaryId: Get; - - /// The beneficiary PalletId, used for deriving its sovereign AccountId for providing native - /// token reward - #[pallet::constant] - type CANBeneficiaryId: Get; - } - - // Setting of investing pools - #[pallet::storage] - #[pallet::getter(fn investing_pool_setting)] - pub type InvestingPoolSetting = StorageMap< - _, - Twox64Concat, - InvestingPoolIndex, - PoolSetting, BalanceOf>, - OptionQuery, - >; - - // investing pools' stable token reward waiting claiming - // Pool id, epcoh index => (total epoch reward, claimed reward) - #[pallet::storage] - #[pallet::getter(fn stable_investing_pool_epoch_reward)] - pub type StableInvestingPoolEpochReward = StorageDoubleMap< - _, - Twox64Concat, - InvestingPoolIndex, - Twox64Concat, - u128, - (BalanceOf, BalanceOf), - OptionQuery, - >; - - // Checkpoint of single stable staking pool - // For stable token reward distribution - #[pallet::storage] - #[pallet::getter(fn stable_investing_pool_checkpoint)] - pub type StableInvestingPoolCheckpoint = StorageMap< - _, - Twox64Concat, - InvestingPoolIndex, - InvestingWeightInfo, BalanceOf>, - OptionQuery, - >; - - // Checkpoint of overall investing condition synthetic by tracking all investing pools - // For CAN token reward distribution - #[pallet::storage] - #[pallet::getter(fn can_checkpoint)] - pub type CANCheckpoint = - StorageValue<_, InvestingWeightInfo, BalanceOf>, OptionQuery>; - - // Asset id of AIUSD - #[pallet::storage] - #[pallet::getter(fn aiusd_asset_id)] - pub type AIUSDAssetId = StorageValue<_, AssetIdOf, OptionQuery>; - - // Asset id of CAN - #[pallet::storage] - #[pallet::getter(fn can_asset_id)] - pub type CANAssetId = StorageValue<_, AssetIdOf, OptionQuery>; - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - InvestingPoolCreated { - pool_id: InvestingPoolIndex, - admin: T::AccountId, - start_time: BlockNumberFor, - epoch: u128, - epoch_range: BlockNumberFor, - pool_cap: BalanceOf, - }, - /// New metadata has been set for a investing pool. - MetadataSet { - pool_id: InvestingPoolIndex, - name: Vec, - description: Vec, - }, - /// Metadata has been removed for a investing pool. - MetadataRemoved { - pool_id: InvestingPoolIndex, - }, - /// Reward updated - RewardUpdated { - pool_id: InvestingPoolIndex, - epoch: u128, - amount: BalanceOf, - }, - PendingInvestingSolved { - who: T::AccountId, - pool_id: InvestingPoolIndex, - effective_time: BlockNumberFor, - amount: BalanceOf, - }, - Staked { - who: T::AccountId, - pool_id: InvestingPoolIndex, - target_effective_time: BlockNumberFor, - amount: BalanceOf, - }, - CANRewardClaimed { - who: T::AccountId, - claim_duration: BlockNumberFor, - // Investing amount related of claim - invest_amount: BalanceOf, - // Amount of reward - reward_amount: BalanceOf, - }, - StableRewardClaimed { - who: T::AccountId, - pool_id: InvestingPoolIndex, - epoch: u128, - reward_amount: BalanceOf, - }, - Withdraw { - who: T::AccountId, - pool_id: InvestingPoolIndex, - time: BlockNumberFor, - amount: BalanceOf, - }, - AIUSDRegisted { - asset_id: >::AssetId, - }, - } - - #[pallet::error] - pub enum Error { - RewardAlreadyExisted, - PoolAlreadyStarted, - PoolAlreadyEnded, - PoolAlreadyExisted, - PoolCapLimit, - // If this happens, asset manager might cheat - PoolRewardOverflow, - PoolNotEnded, - PoolNotExisted, - PoolNotStarted, - BadMetadata, - EpochAlreadyEnded, - EpochRewardNotUpdated, - EpochNotExist, - NoAssetId, - TypeIncompatibleOrArithmeticError, - WrongPoolAdmin, - } - - #[pallet::hooks] - impl Hooks> for Pallet { - /// Weight: see `begin_block` - fn on_initialize(_n: BlockNumberFor) -> Weight { - Weight::zero() - } - } - - #[pallet::call] - impl Pallet { - /// Create a investing pool - /// Admin should be guardian multisig - #[pallet::call_index(0)] - #[pallet::weight({1000})] - #[transactional] - pub fn create_investing_pool( - origin: OriginFor, - pool_id: InvestingPoolIndex, - setting: PoolSetting, BalanceOf>, - admin: T::AccountId, - ) -> DispatchResult { - T::PoolProposalPalletOrigin::ensure_origin(origin)?; - - Self::do_create_investing_pool(pool_id, setting, admin) - } - - /// Update a reward for an investing pool of specific epoch - /// Each epoch can be only updated once - /// Pool admin will transfer its AIUSD into pool accordingly - #[pallet::call_index(1)] - #[pallet::weight({1000})] - #[transactional] - pub fn update_reward( - origin: OriginFor, - pool_id: InvestingPoolIndex, - epoch: u128, - reward: BalanceOf, - ) -> DispatchResult { - let who = T::RewardUpdateOrigin::ensure_origin(origin)?; - - let setting = - >::get(pool_id).ok_or(Error::::PoolNotExisted)?; - ensure!(0 < epoch && epoch <= setting.epoch, Error::::EpochNotExist); - ensure!(setting.admin == who.clone(), Error::::WrongPoolAdmin); - - >::try_mutate( - pool_id, - epoch, - |maybe_reward| -> DispatchResult { - ensure!(maybe_reward.is_none(), Error::::RewardAlreadyExisted); - - *maybe_reward = Some((reward, Zero::zero())); - Self::deposit_event(Event::::RewardUpdated { - pool_id, - epoch, - amount: reward, - }); - Ok(()) - }, - )?; - - // Mint AIUSD into reward pool - let aiusd_asset_id = >::get().ok_or(Error::::NoAssetId)?; - let beneficiary_account: T::AccountId = Self::stable_token_beneficiary_account(); - - // Curator must transfer corresponding cash into reward pool - T::Fungibles::transfer( - aiusd_asset_id, - &who, - &beneficiary_account, - reward, - Preservation::Expendable, - )?; - - Ok(()) - } - - // Claim CAN and stable token reward, destroy/create corresponding pool token category - #[pallet::call_index(2)] - #[pallet::weight({1000})] - #[transactional] - pub fn claim( - origin: OriginFor, - asset_id: AssetIdOf, - amount: BalanceOf, - ) -> DispatchResult { - let source = ensure_signed(origin)?; - - let current_block = frame_system::Pallet::::block_number(); - let pool_id = InvestingPoolAssetIdGenerator::get_token_pool_index(asset_id); - // Epoch reward may update before epoch ends, which is also fine to claim early - let mut claimed_until_epoch = - Self::get_epoch_index_with_reward_updated_before(pool_id, current_block)?; - let token_start_epoch = InvestingPoolAssetIdGenerator::get_token_start_epoch(asset_id); - let token_end_epoch = InvestingPoolAssetIdGenerator::get_token_end_epoch(asset_id); - - // Technically speaking, start_epoch <= end_epoch - // If start epoch = 0, means this is a collateral token, can not claim anything - if token_start_epoch > claimed_until_epoch || token_start_epoch == 0 { - // Nothing to claim - return Ok(()); - } - - // Burn old category token - T::Fungibles::burn_from( - asset_id, - &source, - amount, - Preservation::Expendable, - Precision::Exact, - // Seem to be no effect - Fortitude::Polite, - )?; - // Whether this claim leads to termination of investing procedure - let mut terminated: bool = false; - if token_end_epoch <= claimed_until_epoch { - // We simply destroy the category token without minting new - claimed_until_epoch = token_end_epoch; - terminated = true; - } else { - // Mint new category token - let new_asset_id = InvestingPoolAssetIdGenerator::get_intermediate_epoch_token( - pool_id, - claimed_until_epoch + 1, - token_end_epoch, - ) - .ok_or(ArithmeticError::Overflow)?; - T::Fungibles::mint_into(new_asset_id, &source, amount)?; - } - Self::do_can_claim( - source.clone(), - amount, - Self::get_epoch_start_time(pool_id, token_start_epoch)?, - Self::get_epoch_end_time(pool_id, claimed_until_epoch)?, - terminated, - )?; - Self::do_stable_claim(source, pool_id, amount, token_start_epoch, claimed_until_epoch) - } - - // Registing AIUSD asset id - #[pallet::call_index(3)] - #[pallet::weight({1000})] - #[transactional] - pub fn regist_aiusd(origin: OriginFor, asset_id: AssetIdOf) -> DispatchResult { - T::InvestingPoolAdminOrigin::ensure_origin(origin)?; - >::put(asset_id); - Self::deposit_event(Event::::AIUSDRegisted { asset_id }); - Ok(()) - } - - // Registing CAN asset id - #[pallet::call_index(4)] - #[pallet::weight({1000})] - #[transactional] - pub fn regist_can(origin: OriginFor, asset_id: AssetIdOf) -> DispatchResult { - T::InvestingPoolAdminOrigin::ensure_origin(origin)?; - >::put(asset_id); - Self::deposit_event(Event::::AIUSDRegisted { asset_id }); - Ok(()) - } - } - - impl Pallet { - // Epoch starting from 1, epoch 0 means not start - // The undergoing epoch index if at "time" - // return setting.epoch if time >= pool end_time - fn get_epoch_index( - pool_id: InvestingPoolIndex, - time: BlockNumberFor, - ) -> Result { - let setting = - >::get(pool_id).ok_or(Error::::PoolNotExisted)?; - // If start_time > time, means epoch 0 - if setting.start_time > time { - return Ok(0); - } - let index_bn = time - .saturating_sub(setting.start_time) - .checked_div(&setting.epoch_range) - .ok_or(ArithmeticError::DivisionByZero)?; - let index: u128 = - index_bn.try_into().or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - if index >= setting.epoch { - Ok(setting.epoch) - } else { - Ok(index.checked_add(1u128).ok_or(ArithmeticError::Overflow)?) - } - } - - // Epoch starting from 1 - // The largest epoch index with reward updated before "time" (including epoch during that time) - // return setting.epoch if all epoch reward updated and time >= pool end_time - fn get_epoch_index_with_reward_updated_before( - pool_id: InvestingPoolIndex, - time: BlockNumberFor, - ) -> Result { - let epoch_index: u128 = Self::get_epoch_index(pool_id, time)?; - - for i in 1u128..(epoch_index + 1u128) { - if >::get(pool_id, i).is_none() { - return Ok(i); - } - } - Ok(epoch_index) - } - - // return pool ending time if epoch > setting.epoch - // Epoch starting from 1 - fn get_epoch_start_time( - pool_id: InvestingPoolIndex, - epoch: u128, - ) -> Result, sp_runtime::DispatchError> { - let setting = - >::get(pool_id).ok_or(Error::::PoolNotExisted)?; - // If epoch larger than setting - if epoch > setting.epoch { - return Ok(setting - .end_time() - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?); - } - let epoch_bn: BlockNumberFor = epoch - .checked_sub(1u128) - .ok_or(ArithmeticError::Overflow)? - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let result = setting - .start_time - .checked_add( - &setting.epoch_range.checked_mul(&epoch_bn).ok_or(ArithmeticError::Overflow)?, - ) - .ok_or(ArithmeticError::Overflow)?; - Ok(result) - } - - // return pool ending time if epoch >= setting.epoch - // Epoch starting from 1 - fn get_epoch_end_time( - pool_id: InvestingPoolIndex, - epoch: u128, - ) -> Result, sp_runtime::DispatchError> { - let setting = - >::get(pool_id).ok_or(Error::::PoolNotExisted)?; - // If epoch larger than setting - if epoch >= setting.epoch { - return Ok(setting - .end_time() - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?); - } - let epoch_bn: BlockNumberFor = - epoch.try_into().or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let result = setting - .start_time - .checked_add( - &setting.epoch_range.checked_mul(&epoch_bn).ok_or(ArithmeticError::Overflow)?, - ) - .ok_or(ArithmeticError::Overflow)?; - Ok(result) - } - - // For can_investing - fn do_can_add(amount: BalanceOf, effective_time: BlockNumberFor) -> DispatchResult { - >::try_mutate(|maybe_checkpoint| { - if let Some(checkpoint) = maybe_checkpoint { - checkpoint - .add(effective_time, amount) - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?; - } else { - *maybe_checkpoint = Some(InvestingWeightInfo { - effective_time, - amount, - last_add_time: effective_time, - }); - } - Ok::<(), DispatchError>(()) - })?; - Ok(()) - } - - // For stable_investing - fn do_stable_add( - pool_id: InvestingPoolIndex, - amount: BalanceOf, - effective_time: BlockNumberFor, - ) -> DispatchResult { - >::try_mutate(pool_id, |maybe_checkpoint| { - if let Some(checkpoint) = maybe_checkpoint { - checkpoint - .add(effective_time, amount) - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?; - } else { - *maybe_checkpoint = Some(InvestingWeightInfo { - effective_time, - amount, - last_add_time: effective_time, - }); - } - Ok::<(), DispatchError>(()) - })?; - Ok(()) - } - - // Distribute can reward - // No category token destroyed/created - fn do_can_claim( - who: T::AccountId, - amount: BalanceOf, - start_time: BlockNumberFor, - end_time: BlockNumberFor, - terminated: bool, - ) -> DispatchResult { - let beneficiary_account: T::AccountId = Self::can_token_beneficiary_account(); - let can_asset_id = >::get().ok_or(Error::::NoAssetId)?; - // BalanceOf - let reward_pool = T::Fungibles::balance(can_asset_id, &beneficiary_account); - let current_block = frame_system::Pallet::::block_number(); - - if start_time > end_time { - // Nothing to claim - // Do nothing - return Ok(()); - } else if let Some(mut ncp) = >::get() { - let claim_duration: BlockNumberFor = if terminated { - // This means the effective investing duration is beyond the pool lifespan - // i.e. users who do not claim reward after the pool end are still considering as in-pool contributing their weights - current_block - start_time - } else { - // Only counting the investing weight during the epoch - // Claim from start_time until the end_time - end_time - start_time - }; - - let claim_duration_u128: u128 = claim_duration - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let amount_u128 = - amount.try_into().or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let claim_weight: u128 = claim_duration_u128 - .checked_mul(amount_u128) - .ok_or(ArithmeticError::Overflow)?; - let proportion = Perquintill::from_rational( - claim_weight, - ncp.weight_force(current_block) - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?, - ); - - let reward_pool_u128: u128 = reward_pool - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let distributed_reward_u128: u128 = proportion * reward_pool_u128; - let distributed_reward: BalanceOf = distributed_reward_u128 - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - // Transfer CAN reward - T::Fungibles::transfer( - can_asset_id, - &beneficiary_account, - &who, - distributed_reward, - Preservation::Expendable, - )?; - - // Update gloabl investing status - if terminated { - ncp.remove(start_time, amount) - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?; - } else { - // Do not care what new Synthetic effective_time of investing pool - ncp.claim_based_on_weight(claim_weight) - .ok_or(Error::::TypeIncompatibleOrArithmeticError)?; - } - - // Adjust checkpoint - >::put(ncp); - Self::deposit_event(Event::::CANRewardClaimed { - who, - claim_duration, - invest_amount: amount, - reward_amount: distributed_reward, - }); - } - Ok(()) - } - - // Distribute stable reward - // No category token destroyed/created - // Claim epoch between start_epoch - end_epoch (included) - fn do_stable_claim( - who: T::AccountId, - pool_id: InvestingPoolIndex, - amount: BalanceOf, - start_epoch: u128, - end_epoch: u128, - ) -> DispatchResult { - let beneficiary_account: T::AccountId = Self::stable_token_beneficiary_account(); - let aiusd_asset_id = >::get().ok_or(Error::::NoAssetId)?; - let amount_u128 = - amount.try_into().or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - - let mut total_distributed_reward: BalanceOf = Zero::zero(); - - if start_epoch > end_epoch { - // Nothing to claim - // Do nothing - return Ok(()); - } else if let Some(scp) = >::get(pool_id) { - // Must exist - let total_investing: u128 = - scp.amount.try_into().or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - // Claim until the claimed_until_epoch - // loop through each epoch - for i in start_epoch..(end_epoch + 1) { - let mut reward_pool = >::get(pool_id, i) - .ok_or(Error::::EpochRewardNotUpdated)?; - - let proportion = Perquintill::from_rational(amount_u128, total_investing); - - let reward_pool_u128: u128 = reward_pool - .0 - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - let distributed_reward_u128: u128 = proportion * reward_pool_u128; - let distributed_reward: BalanceOf = distributed_reward_u128 - .try_into() - .or(Err(Error::::TypeIncompatibleOrArithmeticError))?; - total_distributed_reward = total_distributed_reward - .checked_add(&distributed_reward) - .ok_or(ArithmeticError::Overflow)?; - - // Make sure no overflow of reward even if asset manager cheating - reward_pool.1 = reward_pool - .1 - .checked_add(&distributed_reward) - .ok_or(ArithmeticError::Overflow)?; - ensure!(reward_pool.1 < reward_pool.0, Error::::PoolRewardOverflow); - >::insert(pool_id, i, reward_pool); - - Self::deposit_event(Event::::StableRewardClaimed { - who: who.clone(), - pool_id, - epoch: i, - reward_amount: distributed_reward, - }); - } - } - - // Stable token reward - // Will fail if insufficient balance - T::Fungibles::transfer( - aiusd_asset_id, - &beneficiary_account, - &who, - total_distributed_reward, - Preservation::Expendable, - )?; - - Ok(()) - } - - pub fn can_token_beneficiary_account() -> T::AccountId { - T::CANBeneficiaryId::get().into_account_truncating() - } - - pub fn stable_token_beneficiary_account() -> T::AccountId { - T::StableTokenBeneficiaryId::get().into_account_truncating() - } - - pub fn do_create_investing_pool( - pool_id: InvestingPoolIndex, - setting: PoolSetting, BalanceOf>, - admin: T::AccountId, - ) -> DispatchResult { - ensure!( - frame_system::Pallet::::block_number() <= setting.start_time, - Error::::PoolAlreadyStarted - ); - ensure!( - !InvestingPoolSetting::::contains_key(pool_id), - Error::::PoolAlreadyExisted - ); - - // Create all asset token categories - let asset_id_vec: Vec> = - InvestingPoolAssetIdGenerator::get_all_pool_token(pool_id, setting.epoch) - .ok_or(ArithmeticError::Overflow)?; - for i in asset_id_vec.iter() { - ::AccountId>>::create( - *i, - admin.clone(), - true, - One::one(), - )?; - } - - >::insert(pool_id, setting.clone()); - Self::deposit_event(Event::InvestingPoolCreated { - pool_id, - admin: setting.admin, - start_time: setting.start_time, - epoch: setting.epoch, - epoch_range: setting.epoch_range, - pool_cap: setting.pool_cap, - }); - Ok(()) - } - - // Mint category token to user, record can token checkpoint accordingly - pub fn inject_investment( - pool_id: InvestingPoolIndex, - investments: Vec<(T::AccountId, BalanceOf)>, - ) -> DispatchResult { - let setting = - >::get(pool_id).ok_or(Error::::PoolNotExisted)?; - let effective_time = Self::get_epoch_start_time(pool_id, One::one())?; - - let debt_asset_id = - InvestingPoolAssetIdGenerator::get_debt_token(pool_id, setting.epoch) - .ok_or(ArithmeticError::Overflow)?; - let initial_epoch_asset_id = - InvestingPoolAssetIdGenerator::get_initial_epoch_token(pool_id, setting.epoch) - .ok_or(ArithmeticError::Overflow)?; - for i in investments.iter() { - // Mint certification token to user - let _ = T::Fungibles::mint_into(debt_asset_id, &i.0, i.1)?; - - let _ = T::Fungibles::mint_into(initial_epoch_asset_id, &i.0, i.1)?; - - // Add CAN token global checkpoint - Self::do_can_add(i.1, effective_time)?; - Self::do_stable_add(pool_id, i.1, effective_time)?; - } - Ok(()) - } - } - - impl InvestmentInjector, BalanceOf> for Pallet { - fn create_investing_pool( - pool_id: InvestingPoolIndex, - setting: PoolSetting, BalanceOf>, - admin: T::AccountId, - ) -> DispatchResult { - Self::do_create_investing_pool(pool_id, setting, admin) - } - fn inject_investment( - pool_id: InvestingPoolIndex, - investments: Vec<(T::AccountId, BalanceOf)>, - ) -> DispatchResult { - Self::inject_investment(pool_id, investments) - } - } -} diff --git a/parachain/pallets/collab-ai/investing-pool/src/mock.rs b/parachain/pallets/collab-ai/investing-pool/src/mock.rs deleted file mode 100644 index 002a4ea7e1..0000000000 --- a/parachain/pallets/collab-ai/investing-pool/src/mock.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -// TODO -// TODO -// TODO \ No newline at end of file diff --git a/parachain/pallets/collab-ai/investing-pool/src/tests.rs b/parachain/pallets/collab-ai/investing-pool/src/tests.rs deleted file mode 100644 index 002a4ea7e1..0000000000 --- a/parachain/pallets/collab-ai/investing-pool/src/tests.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -// TODO -// TODO -// TODO \ No newline at end of file diff --git a/parachain/pallets/collab-ai/pool-proposal/Cargo.toml b/parachain/pallets/collab-ai/pool-proposal/Cargo.toml deleted file mode 100644 index 63ce2cf8d4..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/Cargo.toml +++ /dev/null @@ -1,63 +0,0 @@ -[package] -authors = ['Litentry Dev'] -description = 'Pallet for managing pool proposal' -edition = '2021' -homepage = 'https://www.heima.network' -license = 'GPL-3.0' -name = 'pallet-pool-proposal' -repository = 'https://github.com/litentry/heima' -version = '0.1.0' - -[dependencies] -bitflags = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-multisig = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -pallet-collab-ai-common = { workspace = true } - -[dev-dependencies] -sp-core = { workspace = true } -sp-io = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-collab-ai-common/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -std = [ - "frame-support/std", - "frame-system/std", - "pallet-collab-ai-common/std", - "pallet-multisig/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-runtime/std", - "sp-std/std", - "pallet-assets/std", - "pallet-balances/std", - "sp-core/std", - "sp-io/std", -] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "pallet-assets/try-runtime", - "pallet-balances/try-runtime", - "pallet-collab-ai-common/try-runtime", - "pallet-multisig/try-runtime", - "sp-runtime/try-runtime", -] diff --git a/parachain/pallets/collab-ai/pool-proposal/src/lib.rs b/parachain/pallets/collab-ai/pool-proposal/src/lib.rs deleted file mode 100644 index 8bfbe67c9e..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/src/lib.rs +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . -// -//! # Pool Proposal Pallet -//! -//! - [`Config`] -//! - [`Call`] -//! -//! ## Overview -//! -//! The Pool Proposal handles the administration of proposed investing pool and pre-investing. -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::type_complexity)] -mod ordered_set; -pub mod types; - -use frame_support::{ - ensure, - pallet_prelude::*, - traits::{ - tokens::{ - fungibles::{Create as FsCreate, Inspect as FsInspect, Mutate as FsMutate}, - Preservation, - }, - Currency, EnsureOrigin, Get, LockableCurrency, ReservableCurrency, - }, - transactional, - weights::Weight, - PalletId, -}; -use frame_system::{ - ensure_signed, - pallet_prelude::{BlockNumberFor, OriginFor}, - RawOrigin, -}; -use ordered_set::OrderedSet; -pub use pallet::*; -use pallet_collab_ai_common::*; -use sp_runtime::{ - traits::{AccountIdConversion, CheckedAdd, CheckedSub, Zero}, - ArithmeticError, -}; -use sp_std::{collections::vec_deque::VecDeque, vec::Vec}; - -pub use types::*; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -#[frame_support::pallet] -pub mod pallet { - use frame_support::{dispatch::DispatchResult, pallet_prelude::OptionQuery}; - - use super::*; - - /// CollabAI investing pool proposal - const MODULE_ID: PalletId = PalletId(*b"cbai/ipp"); - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - pub type BalanceOf = - <::Currency as Currency<::AccountId>>::Balance; - - pub type AssetBalanceOf = - <::Fungibles as FsInspect<::AccountId>>::Balance; - pub type AssetIdOf = - <::Fungibles as FsInspect<::AccountId>>::AssetId; - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + pallet_multisig::Config { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Currency type for this pallet. - type Currency: ReservableCurrency - + LockableCurrency>; - - type Fungibles: FsMutate + FsCreate; - - // Declare the asset id of AIUSD - type AIUSDAssetId: Get>; - - /// Period of time between proposal ended and pool start - #[pallet::constant] - type OfficialGapPeriod: Get>; - - /// Minimum period of time for proposal voting end/expired - #[pallet::constant] - type MinimumProposalLastTime: Get>; - - /// The minimum amount to be used as a deposit for creating a pool curator - #[pallet::constant] - type MinimumPoolDeposit: Get>; - - /// The maximum amount of allowed pool proposed by a single curator - #[pallet::constant] - type MaximumPoolProposed: Get; - - /// The maximum amount of investor per pool for both pre-investing and queued - #[pallet::constant] - type MaximumInvestingPerProposal: Get; - - /// Standard epoch length - #[pallet::constant] - type StandardEpoch: Get>; - - /// Origin who can make a pool proposal - type ProposalOrigin: EnsureOrigin; - - /// Origin who can make a pool proposal pass public vote check - type PublicVotingOrigin: EnsureOrigin; - - /// Guardian vote resource - type GuardianVoteResource: GuardianQuery; - - /// The maximum amount of guardian allowed for a proposal before expired - #[pallet::constant] - type MaxGuardianPerProposal: Get; - - /// The maximum amount of guardian allowed for a proposal - #[pallet::constant] - type MaxGuardianSelectedPerProposal: Get; - - /// System Account holding pre-investing assets - type PreInvestingPool: Get; - - /// Baking the effect proposal into investing pool - type InvestmentInjector: InvestmentInjector< - Self::AccountId, - BlockNumberFor, - AssetBalanceOf, - >; - } - - #[pallet::type_value] - pub fn DefaultForProposalIndex() -> PoolProposalIndex { - 1u128 - } - - /// The next free Pool Proposal index, aka the number of pool proposed so far + 1. - #[pallet::storage] - #[pallet::getter(fn pool_proposal_count)] - pub type PoolProposalCount = - StorageValue<_, PoolProposalIndex, ValueQuery, DefaultForProposalIndex>; - - /// Those who have a reserve for his pool proposal. - #[pallet::storage] - #[pallet::getter(fn pool_proposal_deposit_of)] - pub type PoolProposalDepositOf = StorageMap< - _, - Twox64Concat, - T::AccountId, - OrderedSet>, T::MaximumPoolProposed>, - OptionQuery, - >; - - // Pending pool proposal status of investing pools - // Ordered by expired time - #[pallet::storage] - #[pallet::getter(fn pending_pool_proposal_status)] - pub type PendingPoolProposalStatus = - StorageValue<_, VecDeque>>, ValueQuery>; - - // Pool proposal content - // This storage is not allowed to update once any ProposalStatusFlags passed - // Yet root is allowed to do that - #[pallet::storage] - #[pallet::getter(fn pool_proposal)] - pub type PoolProposal = StorageMap< - _, - Twox64Concat, - PoolProposalIndex, - PoolProposalInfo, BlockNumberFor, T::AccountId>, - OptionQuery, - >; - - // Preinvesting of pool proposal - // This storage will be modified/delete correspondingly when solving pending pool - #[pallet::storage] - #[pallet::getter(fn pool_pre_investings)] - pub type PoolPreInvestings = StorageMap< - _, - Twox64Concat, - PoolProposalIndex, - PoolProposalPreInvesting< - T::AccountId, - AssetBalanceOf, - BlockNumberFor, - T::MaximumInvestingPerProposal, - >, - OptionQuery, - >; - - // Guardian willingness of proposal - #[pallet::storage] - #[pallet::getter(fn pool_guardian)] - pub type PoolGuardian = StorageMap< - _, - Twox64Concat, - PoolProposalIndex, - OrderedSet, - OptionQuery, - >; - - // Proposal Failed to bake, or other reasons, ready to dissolve - #[pallet::storage] - #[pallet::getter(fn proposal_ready_for_dissolve)] - pub type ProposalReadyForDissolve = - StorageValue<_, VecDeque, ValueQuery>; - - // Proposal Succeed, ready to bake into investing pool, along with selected guardian info - #[pallet::storage] - #[pallet::getter(fn proposal_ready_for_bake)] - pub type ProposalReadyForBake = StorageValue< - _, - VecDeque<(PoolProposalIndex, BoundedVec)>, - ValueQuery, - >; - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - /// A motion has been proposed by a public account. - PoolProposed { - proposer: T::AccountId, - pool_proposal_index: PoolProposalIndex, - info_hash: InfoHash, - }, - /// A pre investing becomes valid - PoolPreInvested { - user: T::AccountId, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - }, - /// A pre investing queued - PoolPreStakeQueued { - user: T::AccountId, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - }, - /// A queued pre investing becomes a valid pre investing - PoolQueuedInvested { - user: T::AccountId, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - }, - /// Some amount of pre investing regardless of queue or pre invested, withdrawed (Withdraw queue ones first) - PoolWithdrawed { - user: T::AccountId, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - }, - /// A public vote result of proposal get passed - ProposalPublicVoted { - pool_proposal_index: PoolProposalIndex, - vote_result: bool, - }, - /// A proposal is ready for baking - ProposalReadyForBake { - pool_proposal_index: PoolProposalIndex, - }, - /// A proposal is ready for full dissolve, since the proposal expired but not satisifed all requirement - ProposalReadyForDissolve { - pool_proposal_index: PoolProposalIndex, - }, - /// A proposal passed all checking and become a investing pool - ProposalBaked { - pool_proposal_index: PoolProposalIndex, - curator: T::AccountId, - proposal_settlement: AssetBalanceOf, - }, - /// A proposal failed some checking or type error, but fund is returned - ProposalDissolved { - pool_proposal_index: PoolProposalIndex, - }, - PorposalGuardian { - pool_proposal_index: PoolProposalIndex, - guardian: T::AccountId, - }, - } - - #[pallet::error] - pub enum Error { - ProposalDepositDuplicatedOrOversized, - ProposalExpired, - ProposalPreInvestingLocked, - ProposalPublicTimeTooShort, - ProposalNotExist, - InvestingPoolOversized, - InsufficientPreInvesting, - GuardianDuplicatedOrOversized, - GuardianInvalid, - } - - #[pallet::hooks] - impl Hooks> for Pallet { - fn on_initialize(n: BlockNumberFor) -> Weight { - // Check proposal expire and status flag - // Mature the pool by proposal if qualified - // No money transfer/investing pool creating so far - Self::solve_pending(n); - - // TODO::check epoch number not too large so asset id will not overflow - // curator must be verified by this time since there is committe vote - // TODO::make sure curator is verified by now - - Weight::zero() - } - } - - #[pallet::call] - impl Pallet { - /// Curator propose a investing pool - /// - /// max_pool_size: At most this amount of raised money curator/investing pool willing to take - /// proposal_last_time: How long does the proposal lasts for voting/preinvesting. - /// All ProposalStatusFlags must be satisfied after this period passed, which is also - /// the approximate date when pool begins. - /// pool_last_time: How long does the investing pool last if passed - /// estimated_pool_reward: This number is only for displaying purpose without any techinical meaning - /// pool_info_hash: Hash of pool info for including pool details - #[pallet::call_index(0)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn propose_investing_pool( - origin: OriginFor, - max_pool_size: AssetBalanceOf, - proposal_last_time: BlockNumberFor, - pool_last_time: BlockNumberFor, - estimated_pool_reward: AssetBalanceOf, - pool_info_hash: InfoHash, - ) -> DispatchResult { - let who = T::ProposalOrigin::ensure_origin(origin)?; - - let current_block = frame_system::Pallet::::block_number(); - ensure!( - proposal_last_time >= T::MinimumProposalLastTime::get(), - Error::::ProposalPublicTimeTooShort - ); - - let proposal_end_time = current_block - .checked_add(&proposal_last_time) - .ok_or(ArithmeticError::Overflow)?; - - let pool_start_time = proposal_end_time - .checked_add(&T::OfficialGapPeriod::get()) - .ok_or(ArithmeticError::Overflow)?; - - let new_proposal_info = PoolProposalInfo { - proposer: who.clone(), - pool_info_hash, - max_pool_size, - pool_start_time, - pool_end_time: pool_start_time - .checked_add(&pool_last_time) - .ok_or(ArithmeticError::Overflow)?, - estimated_pool_reward, - proposal_status_flags: ProposalStatusFlags::empty(), - }; - - let next_proposal_index = PoolProposalCount::::get(); - PoolProposal::::insert(next_proposal_index, new_proposal_info); - PoolProposalDepositOf::::try_mutate_exists( - &who, - |maybe_ordered_set| -> Result<(), DispatchError> { - let reserved_amount = T::MinimumPoolDeposit::get(); - ::Currency::reserve(&who, reserved_amount)?; - // We should not care about duplicating since the proposal index is auto-increment - match maybe_ordered_set.as_mut() { - Some(ordered_set) => { - ensure!( - ordered_set.insert(Bond { - owner: next_proposal_index, - amount: reserved_amount, - }), - Error::::ProposalDepositDuplicatedOrOversized - ); - Ok(()) - }, - None => { - let mut new_ordered_set = OrderedSet::new(); - - ensure!( - new_ordered_set.insert(Bond { - owner: next_proposal_index, - amount: reserved_amount, - }), - Error::::ProposalDepositDuplicatedOrOversized - ); - *maybe_ordered_set = Some(new_ordered_set); - Ok(()) - }, - } - }, - )?; - >::mutate(|pending_proposals| { - let new_proposal_status = PoolProposalStatus { - pool_proposal_index: next_proposal_index, - proposal_expire_time: proposal_end_time, - }; - pending_proposals.push_back(new_proposal_status); - // Make sure the first element has earlies effective time - pending_proposals - .make_contiguous() - .sort_by(|a, b| a.proposal_expire_time.cmp(&b.proposal_expire_time)); - }); - PoolProposalCount::::put( - next_proposal_index.checked_add(1u32.into()).ok_or(ArithmeticError::Overflow)?, - ); - Self::deposit_event(Event::PoolProposed { - proposer: who, - pool_proposal_index: next_proposal_index, - info_hash: pool_info_hash, - }); - Ok(()) - } - - #[pallet::call_index(1)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn pre_stake_proposal( - origin: OriginFor, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - - let asset_actual_transfer_amount: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &who, - &T::PreInvestingPool::get(), - amount, - Preservation::Expendable, - )?; - - let mut pool_proposal_pre_investing = - >::take(pool_proposal_index).unwrap_or_default(); - - // Check pool maximum size limit and make pool size limit flag change accordingly - let mut pool_proposal = - >::get(pool_proposal_index).ok_or(Error::::ProposalNotExist)?; - // Proposal not expired - ensure!( - !pool_proposal - .proposal_status_flags - .contains(ProposalStatusFlags::PROPOSAL_EXPIRED), - Error::::ProposalExpired - ); - // If proposal is fully pre-Investing or partial oversized after this stake - - // Check BoundedVec limit - ensure!( - !pool_proposal_pre_investing.pre_investings.is_full() - && !pool_proposal_pre_investing.queued_pre_investings.is_full(), - Error::::InvestingPoolOversized - ); - - let target_pre_investing_amount = pool_proposal_pre_investing - .total_pre_investing_amount - .checked_add(&asset_actual_transfer_amount) - .ok_or(ArithmeticError::Overflow)?; - if target_pre_investing_amount <= pool_proposal.max_pool_size { - // take all pre-investing into valid pre-investing line - pool_proposal_pre_investing - .add_pre_investing::(who.clone(), asset_actual_transfer_amount)?; - - // Emit event only - Self::deposit_event(Event::PoolPreInvested { - user: who.clone(), - pool_proposal_index, - amount: asset_actual_transfer_amount, - }); - // Flag proposal status if pool is just fully Investing - if target_pre_investing_amount == pool_proposal.max_pool_size { - pool_proposal.proposal_status_flags |= ProposalStatusFlags::STAKE_AMOUNT_PASSED; - >::insert(pool_proposal_index, pool_proposal); - } - } else { - // Partially - let queued_pre_investing_amount = target_pre_investing_amount - .checked_sub(&pool_proposal.max_pool_size) - .ok_or(ArithmeticError::Overflow)?; - pool_proposal_pre_investing.add_queued_investing::( - who.clone(), - queued_pre_investing_amount, - frame_system::Pallet::::block_number(), - )?; - - // If pool not already full, flag proposal status - if asset_actual_transfer_amount > queued_pre_investing_amount { - let actual_pre_investing_amount = asset_actual_transfer_amount - .checked_sub(&queued_pre_investing_amount) - .ok_or(ArithmeticError::Overflow)?; - pool_proposal_pre_investing - .add_pre_investing::(who.clone(), actual_pre_investing_amount)?; - - Self::deposit_event(Event::PoolPreInvested { - user: who.clone(), - pool_proposal_index, - amount: actual_pre_investing_amount, - }); - - pool_proposal.proposal_status_flags |= ProposalStatusFlags::STAKE_AMOUNT_PASSED; - >::insert(pool_proposal_index, pool_proposal); - } - - // Emit events - Self::deposit_event(Event::PoolPreStakeQueued { - user: who, - pool_proposal_index, - amount: queued_pre_investing_amount, - }); - } - - >::insert(pool_proposal_index, pool_proposal_pre_investing); - Ok(()) - } - - // Withdraw is not allowed when proposal has STAKE_AMOUNT_PASSED flag - // unless there is queued amount pending - #[pallet::call_index(2)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn withdraw_pre_investing( - origin: OriginFor, - pool_proposal_index: PoolProposalIndex, - amount: AssetBalanceOf, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - - let mut pool_proposal_pre_investing = - >::take(pool_proposal_index).unwrap_or_default(); - - let pool_proposal = - >::get(pool_proposal_index).ok_or(Error::::ProposalNotExist)?; - // Either investing pool has not locked yet, - // Or queued amount is enough to replace the withdrawal - ensure!( - !pool_proposal - .proposal_status_flags - .contains(ProposalStatusFlags::STAKE_AMOUNT_PASSED) - || (pool_proposal_pre_investing.total_queued_amount >= amount), - Error::::ProposalPreInvestingLocked - ); - - // If proposal expired, all bondings should already be returned - ensure!( - !pool_proposal - .proposal_status_flags - .contains(ProposalStatusFlags::PROPOSAL_EXPIRED), - Error::::ProposalExpired - ); - - pool_proposal_pre_investing.withdraw::(who.clone(), amount)?; - Self::deposit_event(Event::PoolWithdrawed { - user: who.clone(), - pool_proposal_index, - amount, - }); - - // Make queued amount fill the missing Investing amount if pool Investing flag ever reached - if (pool_proposal_pre_investing.total_pre_investing_amount - < pool_proposal.max_pool_size) - && (pool_proposal - .proposal_status_flags - .contains(ProposalStatusFlags::STAKE_AMOUNT_PASSED)) - { - let moved_bonds = pool_proposal_pre_investing - .move_queued_to_pre_investing_until::(pool_proposal.max_pool_size)?; - for i in moved_bonds.iter() { - // Emit events - Self::deposit_event(Event::PoolQueuedInvested { - user: i.owner.clone(), - pool_proposal_index, - amount: i.amount, - }); - } - } - - // Return funds - let _asset_actual_transfer_amount: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &T::PreInvestingPool::get(), - &who, - amount, - Preservation::Expendable, - )?; - - >::insert(pool_proposal_index, pool_proposal_pre_investing); - - Ok(()) - } - - // This is democracy/committe passing check for investing pool proposal - // TODO: Related logic with "pallet-conviction-voting" - #[pallet::call_index(3)] - #[pallet::weight({195_000_000})] - pub fn public_vote_proposal( - origin: OriginFor, - pool_proposal_index: PoolProposalIndex, - vote: bool, - ) -> DispatchResult { - T::PublicVotingOrigin::ensure_origin(origin)?; - let mut pool_proposal = - >::get(pool_proposal_index).ok_or(Error::::ProposalNotExist)?; - - if vote { - pool_proposal.proposal_status_flags |= ProposalStatusFlags::PUBLIC_VOTE_PASSED; - } else { - pool_proposal.proposal_status_flags &= !ProposalStatusFlags::PUBLIC_VOTE_PASSED; - } - >::insert(pool_proposal_index, pool_proposal); - - Self::deposit_event(Event::ProposalPublicVoted { - pool_proposal_index, - vote_result: vote, - }); - Ok(()) - } - - // A guardian has decided to participate the investing pool - // When proposal expired, the guardian must have everything ready - // Including KYC. Otherwise he will be ignored no matter how much vote he collects - #[pallet::call_index(4)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn guardian_participate_proposal( - origin: OriginFor, - pool_proposal_index: PoolProposalIndex, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - // Ensure guardian exists when participate, will double check if verified when mature the proposal) - ensure!(T::GuardianVoteResource::is_guardian(who.clone()), Error::::GuardianInvalid); - PoolGuardian::::try_mutate_exists( - pool_proposal_index, - |maybe_ordered_set| -> Result<(), DispatchError> { - match maybe_ordered_set.as_mut() { - Some(ordered_set) => { - ensure!( - ordered_set.insert(who.clone()), - Error::::GuardianDuplicatedOrOversized - ); - Ok(()) - }, - None => { - let mut new_ordered_set = OrderedSet::new(); - - ensure!( - new_ordered_set.insert(who.clone()), - Error::::GuardianDuplicatedOrOversized - ); - *maybe_ordered_set = Some(new_ordered_set); - Ok(()) - }, - } - }, - )?; - - Self::deposit_event(Event::PorposalGuardian { pool_proposal_index, guardian: who }); - Ok(()) - } - - // Make all avaialable qualified proposal into investing pool - // Refund the queued - #[pallet::call_index(5)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn bake_proposal(_origin: OriginFor) -> DispatchResult { - let mut pending = >::take(); - - while let Some(x) = pending.pop_front() { - if let Some(pool_proposal) = >::get(x.0) { - // Creating investing pool - let start_time_u128: u128 = pool_proposal - .pool_start_time - .try_into() - .or(Err(ArithmeticError::Overflow))?; - let end_time_u128: u128 = pool_proposal - .pool_end_time - .try_into() - .or(Err(ArithmeticError::Overflow))?; - let epoch_range_u128: u128 = - T::StandardEpoch::get().try_into().or(Err(ArithmeticError::Overflow))?; - - let vec_inner = x.1.into_inner(); - let signatories: &[T::AccountId] = vec_inner.as_slice(); - let guardian_multisig = pallet_multisig::Pallet::::multi_account_id( - signatories, - signatories.len().try_into().or(Err(ArithmeticError::Overflow))?, - ); - - let total_epoch: u128 = - ((end_time_u128 - start_time_u128) / epoch_range_u128) + 1; - let pool_setting: PoolSetting< - T::AccountId, - BlockNumberFor, - AssetBalanceOf, - > = PoolSetting { - start_time: pool_proposal.pool_start_time, - epoch: total_epoch, - epoch_range: T::StandardEpoch::get(), - pool_cap: pool_proposal.max_pool_size, - // Curator - admin: pool_proposal.proposer.clone(), - }; - - T::InvestmentInjector::create_investing_pool( - x.0, - pool_setting, - guardian_multisig, - )?; - - // Prepare Money related material - let mut pre_investments: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - let mut queued_investments: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - - let mut total_investment_amount: AssetBalanceOf = Default::default(); - - // ignored if return none, but technically it is impossible - if let Some(pool_bonds) = >::get(x.0) { - pre_investments = pool_bonds - .pre_investings - .into_iter() - .map(|b| (b.owner, b.amount)) - .collect(); - queued_investments = pool_bonds - .queued_pre_investings - .into_iter() - .map(|b| (b.0.owner, b.0.amount)) - .collect(); - total_investment_amount = pool_bonds.total_pre_investing_amount; - } - - // Inject investment - T::InvestmentInjector::inject_investment(x.0, pre_investments)?; - - // Do refund - // Return Queued queued_investments always - for investor in queued_investments.iter() { - let asset_refund_amount: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &T::PreInvestingPool::get(), - &investor.0, - investor.1, - Preservation::Expendable, - )?; - Self::deposit_event(Event::::PoolWithdrawed { - user: investor.0.clone(), - pool_proposal_index: x.0, - amount: asset_refund_amount, - }); - } - - // Transfer official investment money to curator - let proposal_settlement: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &T::PreInvestingPool::get(), - &pool_proposal.proposer, - total_investment_amount, - Preservation::Expendable, - )?; - - Self::deposit_event(Event::::ProposalBaked { - pool_proposal_index: x.0, - curator: pool_proposal.proposer, - proposal_settlement, - }); - } - } - >::put(pending); - Ok(()) - } - - // Make all avaialable failed proposal refund - #[pallet::call_index(6)] - #[pallet::weight({195_000_000})] - #[transactional] - pub fn dissolve_proposal(_origin: OriginFor) -> DispatchResult { - let mut pending = >::take(); - - while let Some(x) = pending.pop_front() { - // Prepare Money related material - let mut pre_investments: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - let mut queued_investments: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - - // ignored if return none, but technically it is impossible - if let Some(pool_bonds) = >::get(x) { - pre_investments = pool_bonds - .pre_investings - .into_iter() - .map(|b| (b.owner, b.amount)) - .collect(); - queued_investments = pool_bonds - .queued_pre_investings - .into_iter() - .map(|b| (b.0.owner, b.0.amount)) - .collect(); - } - // Do Refund - // Return bonding - for investor in pre_investments.iter() { - let asset_refund_amount: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &T::PreInvestingPool::get(), - &investor.0, - investor.1, - Preservation::Expendable, - )?; - Self::deposit_event(Event::::PoolWithdrawed { - user: investor.clone().0, - pool_proposal_index: x, - amount: asset_refund_amount, - }); - } - - // Return Queued queued_investments always - for investor in queued_investments.iter() { - let asset_refund_amount: AssetBalanceOf = T::Fungibles::transfer( - T::AIUSDAssetId::get(), - &T::PreInvestingPool::get(), - &investor.0, - investor.1, - Preservation::Expendable, - )?; - Self::deposit_event(Event::::PoolWithdrawed { - user: investor.clone().0, - pool_proposal_index: x, - amount: asset_refund_amount, - }); - } - - Self::deposit_event(Event::::ProposalDissolved { pool_proposal_index: x }); - } - - >::put(pending); - Ok(()) - } - } - - impl Pallet { - fn solve_pending(n: BlockNumberFor) { - let mut pending_setup = >::take(); - loop { - match pending_setup.pop_front() { - // Latest Pending tx effective - Some(x) if x.proposal_expire_time <= n => { - // Mature the proposal, ignore if no PoolProposal Storage - if let Some(mut pool_proposal) = - >::get(x.pool_proposal_index) - { - pool_proposal.proposal_status_flags |= - ProposalStatusFlags::PROPOSAL_EXPIRED; - >::insert(x.pool_proposal_index, pool_proposal.clone()); - - let mut pre_investments: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - // ignored if return none - if let Some(pool_bonds) = - >::get(x.pool_proposal_index) - { - pre_investments = pool_bonds - .pre_investings - .into_iter() - .map(|b| (b.owner, b.amount)) - .collect(); - } - - // Judege guardian - // guardian with aye > nye will be selected - // And select top N guardians with highest aye - let mut best_guardians: Vec<(T::AccountId, AssetBalanceOf)> = - Default::default(); - if let Some(pool_guardians) = - >::get(x.pool_proposal_index) - { - for guardian_candidate in pool_guardians.0.into_iter() { - // AccountId, Aye, Nye - let mut guardian: ( - T::AccountId, - AssetBalanceOf, - AssetBalanceOf, - ) = (guardian_candidate.clone(), Zero::zero(), Zero::zero()); - for investor in pre_investments.iter() { - match T::GuardianVoteResource::get_vote( - investor.0.clone(), - guardian_candidate.clone(), - ) { - None => {}, - Some(GuardianVote::Neutral) => {}, - Some(GuardianVote::Aye) => guardian.1 += investor.1, - Some(GuardianVote::Nay) => guardian.2 += investor.1, - Some(GuardianVote::Specific(t)) - if t == x.pool_proposal_index => - { - guardian.1 += investor.1 - }, - _ => {}, - }; - } - // As long as Aye > Nye and kyc passed, valid guardian - if guardian.1 >= guardian.2 - && T::GuardianVoteResource::is_verified_guardian( - guardian.0.clone(), - ) { - best_guardians.push((guardian.0, guardian.1)); - } - } - } - // Order best_guardians based on Aye - // temp sorted by Aye from largestsmallest to smallest - best_guardians.sort_by(|a, b| b.1.cmp(&a.1)); - - let split_index: usize = >::try_into( - T::MaxGuardianSelectedPerProposal::get(), - ) - .unwrap_or(0usize); - - if best_guardians.len() > split_index { - let _ = best_guardians.split_off(split_index); - } - - // If existing one guardian - if !best_guardians.is_empty() { - pool_proposal.proposal_status_flags |= - ProposalStatusFlags::GUARDIAN_SELECTED; - } else { - pool_proposal.proposal_status_flags &= - !ProposalStatusFlags::GUARDIAN_SELECTED; - } - - match BoundedVec::< - T::AccountId, - T::MaxGuardianSelectedPerProposal, - >::try_from( - best_guardians - .into_iter() - .map(|b| b.0) - .collect::>(), - ) { - // guardian is bounded and status satisfied - // guardian bounded is technically for sure - Ok(best_guardian_bounded) if pool_proposal.proposal_status_flags.is_all() => { - >::mutate(|proposal_rb| { - proposal_rb - .push_back((x.pool_proposal_index, best_guardian_bounded)); - }); - Self::deposit_event(Event::::ProposalReadyForBake { - pool_proposal_index: x.pool_proposal_index, - }); - }, - _ => { - >::mutate(|proposal_fb| { - proposal_fb.push_back(x.pool_proposal_index); - }); - Self::deposit_event(Event::::ProposalReadyForDissolve { - pool_proposal_index: x.pool_proposal_index, - }); - } - } - // Put status flag updated - >::insert(x.pool_proposal_index, pool_proposal); - } - }, - // Latest Pending tx not effective - Some(x) => { - // Put it back - pending_setup.push_front(x); - break; - }, - // No pending tx - _ => { - break; - }, - } - } - >::put(pending_setup); - } - } - - /// Simple ensure origin from pallet pool proposal - pub struct EnsurePoolProposal(sp_std::marker::PhantomData); - impl EnsureOrigin for EnsurePoolProposal { - type Success = T::AccountId; - fn try_origin(o: T::RuntimeOrigin) -> Result { - let sync_account_id = MODULE_ID.into_account_truncating(); - o.into().and_then(|o| match o { - RawOrigin::Signed(who) if who == sync_account_id => Ok(sync_account_id), - r => Err(T::RuntimeOrigin::from(r)), - }) - } - - #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin() -> Result { - let sync_account_id = MODULE_ID.into_account_truncating(); - Ok(T::RuntimeOrigin::from(RawOrigin::Signed(sync_account_id))) - } - } - - /// Some sort of check on the origin is from proposer. - impl ProposerQuery for Pallet { - fn is_proposer(account: T::AccountId, proposal_index: PoolProposalIndex) -> bool { - if let Some(info) = Self::pool_proposal(proposal_index) { - info.proposer == account - } else { - false - } - } - } -} diff --git a/parachain/pallets/collab-ai/pool-proposal/src/mock.rs b/parachain/pallets/collab-ai/pool-proposal/src/mock.rs deleted file mode 100644 index d3ad162816..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/src/mock.rs +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate as pallet_pool_proposal; -use frame_support::{ - assert_ok, construct_runtime, derive_impl, parameter_types, - traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, OnFinalize, OnInitialize}, -}; -use sp_core::Get; -use sp_runtime::{ - traits::{IdentifyAccount, IdentityLookup, Verify}, - AccountId32, BuildStorage, DispatchResult, -}; - -use pallet_collab_ai_common::*; - -pub type Signature = sp_runtime::MultiSignature; -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -pub type Balance = u128; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Assets: pallet_assets, - Balances: pallet_balances, - Multisig: pallet_multisig, - PoolProposal: pallet_pool_proposal, - } -); - -parameter_types! { - pub const AIUSDAssetId: u32 = 1; - pub const OfficialGapPeriod: u32 = 10; - pub const MinimumProposalLastTime: u32 = 10; - pub const MinimumPoolDeposit: Balance = 100; - pub const MaxGuardianPerProposal: u32 = 2; - pub const MaxGuardianSelectedPerProposal: u32 = 1; - pub const MaximumPoolProposed: u32 = 1; - pub const MaximumInvestingPerProposal: u32 = 100; - - pub const DepositBase: Balance = 1; - pub const DepositFactor: Balance = 1; - - pub const StandardEpoch: u32 = 10; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -impl pallet_multisig::Config for Test { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = ConstU32<3>; - type WeightInfo = (); -} - -impl pallet_assets::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = u128; - type AssetIdParameter = u128; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = frame_system::EnsureRoot; - type AssetDeposit = ConstU128<1>; - type AssetAccountDeposit = ConstU128<10>; - type MetadataDepositBase = ConstU128<1>; - type MetadataDepositPerByte = ConstU128<1>; - type ApprovalDeposit = ConstU128<1>; - type StringLimit = ConstU32<50>; - type Freezer = (); - type WeightInfo = (); - type CallbackHandle = (); - type Extra = (); - type RemoveItemsLimit = ConstU32<5>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - -pub struct PreInvestingPool; -impl Get for PreInvestingPool { - fn get() -> AccountId32 { - AccountId32::new([8u8; 32]) - } -} - -pub struct MockCuratorQuery; -impl CuratorQuery for MockCuratorQuery { - /// All curator but banned ones - fn is_curator(_account: AccountId) -> bool { - true - } - - /// Only verified one - fn is_verified_curator(_account: AccountId) -> bool { - true - } -} - -pub struct MockGuardianQuery; -impl GuardianQuery for MockGuardianQuery { - /// All guardian but banned ones - fn is_guardian(_account: AccountId) -> bool { - true - } - - /// Only verified one - fn is_verified_guardian(_account: AccountId) -> bool { - true - } - - /// Get vote - fn get_vote(_voter: AccountId, _guardian: AccountId) -> Option { - Some(GuardianVote::Aye) - } -} - -pub struct MockInvestmentInjector; -impl InvestmentInjector for MockInvestmentInjector { - fn create_investing_pool( - _pool_id: InvestingPoolIndex, - _setting: PoolSetting, - _admin: AccountId, - ) -> DispatchResult { - Ok(()) - } - fn inject_investment( - _pool_id: InvestingPoolIndex, - _investments: Vec<(AccountId, Balance)>, - ) -> DispatchResult { - Ok(()) - } -} - -impl pallet_pool_proposal::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Fungibles = Assets; - type AIUSDAssetId = AIUSDAssetId; - type OfficialGapPeriod = OfficialGapPeriod; - type MinimumProposalLastTime = MinimumProposalLastTime; - type MinimumPoolDeposit = MinimumPoolDeposit; - type MaximumPoolProposed = MaximumPoolProposed; - type MaximumInvestingPerProposal = MaximumInvestingPerProposal; - type StandardEpoch = StandardEpoch; - type ProposalOrigin = EnsureSignedAndCurator; - type PublicVotingOrigin = frame_system::EnsureRoot; - type GuardianVoteResource = MockGuardianQuery; - type MaxGuardianPerProposal = MaxGuardianPerProposal; - type MaxGuardianSelectedPerProposal = MaxGuardianSelectedPerProposal; - type PreInvestingPool = PreInvestingPool; - type InvestmentInjector = MockInvestmentInjector; -} - -pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - - let owner = AccountId32::from([1u8; 32]); - let origin = RuntimeOrigin::root(); - - // Create the AIUSD asset - assert_ok!(pallet_assets::Pallet::::force_create( - origin.clone(), - 1, // AIUSD asset id - owner.clone(), - true, - 1, - )); - - // Set total supply - assert_ok!(pallet_assets::Pallet::::mint( - RuntimeOrigin::signed(owner.clone()), - 1, // AIUSD asset id - owner.clone(), - 1_000_000_000_000_000_000_000_000, // 1 000 000 (10^18 * 1000) - )); - }); - ext -} - -// Checks events against the latest. A contiguous set of events must be provided. They must -// include the most recent event, but do not have to include every past event. -pub fn assert_events(mut expected: Vec) { - let mut actual: Vec = - frame_system::Pallet::::events().iter().map(|e| e.event.clone()).collect(); - - expected.reverse(); - - for evt in expected { - let next = actual.pop().expect("event expected"); - assert_eq!(next, evt, "Events don't match"); - } -} - -/// Rolls forward one block. Returns the new block number. -pub(crate) fn roll_one_block() -> u64 { - PoolProposal::on_finalize(System::block_number()); - Balances::on_finalize(System::block_number()); - System::on_finalize(System::block_number()); - System::set_block_number(System::block_number() + 1); - System::on_initialize(System::block_number()); - Balances::on_initialize(System::block_number()); - PoolProposal::on_initialize(System::block_number()); - System::block_number() -} - -/// Rolls to the desired block. Returns the number of blocks played. -pub(crate) fn roll_to(n: u64) -> u64 { - let mut num_blocks = 0; - let mut block = System::block_number(); - while block < n { - block = roll_one_block(); - num_blocks += 1; - } - num_blocks -} diff --git a/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs b/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs deleted file mode 100644 index 0b9eb5d7c6..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs +++ /dev/null @@ -1,93 +0,0 @@ -// Copied from ORML: https://github.com/open-web3-stack/open-runtime-module-library - -use frame_support::{traits::Get, BoundedVec, CloneNoBound, DefaultNoBound, PartialEqNoBound}; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -#[cfg(feature = "std")] -use sp_std::{fmt, prelude::*}; - -/// An ordered set backed by `BoundedVec` -#[derive( - PartialEqNoBound, Eq, Encode, Decode, DefaultNoBound, CloneNoBound, TypeInfo, MaxEncodedLen, -)] -#[codec(mel_bound())] -#[scale_info(skip_type_params(S))] -pub struct OrderedSet< - T: Ord + Encode + Decode + MaxEncodedLen + Clone + Eq + PartialEq, - S: Get, ->(pub BoundedVec); - -impl> - OrderedSet -{ - /// Create a new empty set - pub fn new() -> Self { - Self(BoundedVec::default()) - } - - /// Create a set from a `Vec`. - /// `v` will be sorted and dedup first. - pub fn from(bv: BoundedVec) -> Self { - let mut v = bv.into_inner(); - v.sort(); - v.dedup(); - - Self::from_sorted_set(v.try_into().map_err(|_| ()).expect("Did not add any values")) - } - - /// Create a set from a `Vec`. - /// Assume `v` is sorted and contain unique elements. - pub fn from_sorted_set(bv: BoundedVec) -> Self { - Self(bv) - } - - /// Insert an element. - /// Return true if insertion happened. - pub fn insert(&mut self, value: T) -> bool { - match self.0.binary_search(&value) { - Ok(_) => false, - Err(loc) => self.0.try_insert(loc, value).is_ok(), - } - } - - /// Remove an element. - /// Return true if removal happened. - pub fn remove(&mut self, value: &T) -> bool { - match self.0.binary_search(value) { - Ok(loc) => { - self.0.remove(loc); - true - }, - Err(_) => false, - } - } - - /// Return if the set contains `value` - pub fn contains(&self, value: &T) -> bool { - self.0.binary_search(value).is_ok() - } - - /// Clear the set - pub fn clear(&mut self) { - self.0 = BoundedVec::default(); - } -} - -impl> - From> for OrderedSet -{ - fn from(v: BoundedVec) -> Self { - Self::from(v) - } -} - -#[cfg(feature = "std")] -impl fmt::Debug for OrderedSet -where - T: Ord + Encode + Decode + MaxEncodedLen + Clone + Eq + PartialEq + fmt::Debug, - S: Get, -{ - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("OrderedSet").field(&self.0).finish() - } -} diff --git a/parachain/pallets/collab-ai/pool-proposal/src/tests.rs b/parachain/pallets/collab-ai/pool-proposal/src/tests.rs deleted file mode 100644 index e6b4594315..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/src/tests.rs +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::mock::*; -use frame_support::{assert_err, assert_noop, assert_ok, traits::Currency}; -use pallet_balances::Error as BalanceError; -use sp_core::{Get, H256}; -use sp_runtime::{AccountId32, ArithmeticError}; - -#[test] -fn test_propose_investing_pool_ok() { - new_test_ext().execute_with(|| { - let user_a: AccountId32 = AccountId32::from([1u8; 32]); - let user_b: AccountId32 = AccountId32::from([2u8; 32]); - Balances::make_free_balance_be(&user_a, 100_000_000_000_000_000_000); - - let max_pool_size = 1_000_000_000_000_000_000_000u128; - let proposal_last_time = 100; - let pool_last_time = 10000; - let estimated_pool_reward = 2_000_000_000_000_000_000_000u128; - let pool_info_hash: H256 = H256([2; 32]); - let pool_info_hash_2: H256 = H256([3; 32]); - - // ProposalPublicTimeTooShort - assert_noop!( - PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a.clone()), - max_pool_size, - 1, - pool_last_time, - estimated_pool_reward, - pool_info_hash - ), - crate::Error::::ProposalPublicTimeTooShort - ); - - // No enough reserve token - assert_err!( - PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_b.clone()), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash - ), - BalanceError::::InsufficientBalance - ); - - // Worked - assert_ok!(PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a.clone()), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash - )); - - assert_events(vec![RuntimeEvent::PoolProposal(crate::Event::PoolProposed { - proposer: user_a.clone(), - pool_proposal_index: 1u128, - info_hash: pool_info_hash, - })]); - - // Oversized - assert_noop!( - PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash_2 - ), - crate::Error::::ProposalDepositDuplicatedOrOversized - ); - }) -} - -#[test] -fn test_pre_stake_proposal_ok() { - new_test_ext().execute_with(|| { - let user_a: AccountId32 = AccountId32::from([1u8; 32]); - let user_b: AccountId32 = AccountId32::from([2u8; 32]); - Balances::make_free_balance_be(&user_a, 100_000_000_000_000_000_000); - Balances::make_free_balance_be(&user_b, 100_000_000_000_000_000_000); - - let max_pool_size = 1_000_000_000_000_000_000_000u128; - let proposal_last_time = 100; - let pool_last_time = 10000; - let estimated_pool_reward = 2_000_000_000_000_000_000_000u128; - let pool_info_hash: H256 = H256([2; 32]); - - // Setup - assert_ok!(PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a.clone()), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash - )); - - // Not enough token - assert_noop!( - PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 2_000_000_000_000_000_000_000_000, - ), - ArithmeticError::Underflow - ); - - // Pool not exist - assert_noop!( - PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a.clone()), - 2u128, - 500_000_000_000_000_000_000u128, - ), - crate::Error::::ProposalNotExist - ); - - // Normal pre staking worked - assert_ok!(PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 500_000_000_000_000_000_000u128, - )); - - assert_events(vec![RuntimeEvent::PoolProposal(crate::Event::PoolPreInvested { - user: user_a.clone(), - pool_proposal_index: 1u128, - amount: 500_000_000_000_000_000_000u128, - })]); - - // Go to proposal expire time - roll_to(150); - // Proposal Expired, Not work - assert_noop!( - PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a), - 1u128, - 500_000_000_000_000_000_000u128, - ), - crate::Error::::ProposalExpired - ); - }) -} - -#[test] -fn test_withdraw_pre_investing_ok() { - new_test_ext().execute_with(|| { - let user_a: AccountId32 = AccountId32::from([1u8; 32]); - let user_b: AccountId32 = AccountId32::from([2u8; 32]); - Balances::make_free_balance_be(&user_a, 100_000_000_000_000_000_000); - Balances::make_free_balance_be(&user_b, 100_000_000_000_000_000_000); - - let max_pool_size = 10_000_000_000_000_000_000u128; - let proposal_last_time = 100; - let pool_last_time = 10000; - let estimated_pool_reward = 2_000_000_000_000_000_000_000u128; - let pool_info_hash: H256 = H256([2; 32]); - - // Setup - assert_ok!(PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a.clone()), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash - )); - - // Normal pre staking worked - assert_ok!(PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 5_000_000_000_000_000_000u128, - )); - - // Can not withdraw if pool is fullfiled - assert_noop!( - PoolProposal::withdraw_pre_investing( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 1_000_000_000_000_000_000u128, - ), - crate::Error::::InsufficientPreInvesting - ); - - // Fullfil the pool - assert_ok!(PoolProposal::pre_stake_proposal( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 495_000_000_000_000_000_000u128, - )); - - // pre investing and queued - assert_events(vec![ - RuntimeEvent::PoolProposal(crate::Event::PoolPreInvested { - user: user_a.clone(), - pool_proposal_index: 1u128, - amount: 5_000_000_000_000_000_000u128, - }), - RuntimeEvent::PoolProposal(crate::Event::PoolPreStakeQueued { - user: user_a.clone(), - pool_proposal_index: 1u128, - amount: 490_000_000_000_000_000_000u128, - }), - ]); - - // Withdraw succeed - assert_ok!(PoolProposal::withdraw_pre_investing( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - 490_000_000_000_000_000_000u128, - )); - assert_events(vec![ - RuntimeEvent::PoolProposal(crate::Event::PoolWithdrawed { - user: user_a.clone(), - pool_proposal_index: 1u128, - amount: 490_000_000_000_000_000_000u128, - }), - RuntimeEvent::Assets(pallet_assets::Event::Transferred { - asset_id: 1, - from: PreInvestingPool::get(), - to: user_a, - amount: 490_000_000_000_000_000_000, - }), - ]); - }) -} - -#[test] -fn test_public_vote_proposal_ok() { - new_test_ext().execute_with(|| { - // Pool not exist - assert_noop!( - PoolProposal::public_vote_proposal(RuntimeOrigin::root(), 1u128, true,), - crate::Error::::ProposalNotExist - ); - - let user_a: AccountId32 = AccountId32::from([1u8; 32]); - let user_b: AccountId32 = AccountId32::from([2u8; 32]); - Balances::make_free_balance_be(&user_a, 100_000_000_000_000_000_000); - Balances::make_free_balance_be(&user_b, 100_000_000_000_000_000_000); - - let max_pool_size = 10_000_000_000_000_000_000u128; - let proposal_last_time = 100; - let pool_last_time = 10000; - let estimated_pool_reward = 2_000_000_000_000_000_000_000u128; - let pool_info_hash: H256 = H256([2; 32]); - - // Setup - assert_ok!(PoolProposal::propose_investing_pool( - RuntimeOrigin::signed(user_a.clone()), - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash - )); - - // Wrong origin - assert_noop!( - PoolProposal::public_vote_proposal(RuntimeOrigin::signed(user_a), 1u128, true,), - sp_runtime::DispatchError::BadOrigin - ); - - // Works - assert_ok!(PoolProposal::public_vote_proposal(RuntimeOrigin::root(), 1u128, true,)); - assert_events(vec![RuntimeEvent::PoolProposal(crate::Event::ProposalPublicVoted { - pool_proposal_index: 1u128, - vote_result: true, - })]); - }) -} - -#[test] -fn test_guardian_participate_proposal_ok() { - new_test_ext().execute_with(|| { - let user_a: AccountId32 = AccountId32::from([1u8; 32]); - assert_ok!(PoolProposal::guardian_participate_proposal( - RuntimeOrigin::signed(user_a.clone()), - 1u128, - )); - - assert_events(vec![RuntimeEvent::PoolProposal(crate::Event::PorposalGuardian { - pool_proposal_index: 1u128, - guardian: user_a, - })]); - }) -} - -// TODO: test_bake_proposal_ok, test_dissolve_proposal_ok, solve pending test, types test diff --git a/parachain/pallets/collab-ai/pool-proposal/src/types.rs b/parachain/pallets/collab-ai/pool-proposal/src/types.rs deleted file mode 100644 index ac54ee75ad..0000000000 --- a/parachain/pallets/collab-ai/pool-proposal/src/types.rs +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . -use crate::{Config, Error}; -use bitflags::bitflags; -use frame_support::{ensure, pallet_prelude::*}; -use pallet_collab_ai_common::PoolProposalIndex; -use sp_runtime::{ - traits::{CheckedAdd, CheckedSub}, - ArithmeticError, BoundedVec, -}; -use sp_std::{cmp::Ordering, vec::Vec}; - -bitflags! { - /// Flags used to record the status of pool proposal - #[derive(Clone, PartialEq, Eq, Debug)] - pub struct ProposalStatusFlags: u8 { - /// Whether the pool proposal passing the committee/democracy voting. - /// - /// # Note - /// - /// A valid pool must passing committee/public's audit procedure regarding legal files and other pool parameters. - const PUBLIC_VOTE_PASSED = 0b0000_0001; - /// Whether the minimum Investing amount proposed by curator is satisfied. - /// - /// # Note - /// - /// Currently, a full size must be satisfied. - /// - /// Once a pool is satisfied this requirement, all Investing amount can no longer be withdrawed - /// unless the pool is later denied passing by voting or until the end of pool maturity. - /// - /// Otherwise, the pool will be refunded. - const STAKE_AMOUNT_PASSED = 0b0000_0010; - /// Whether the pool guardian has been selected - /// - /// # Note - /// - /// A valid pool must have guardian or a default one will be used (committee) - const GUARDIAN_SELECTED = 0b0000_0100; - /// Whether the proposal expired yet - /// - /// # Note - /// - /// Has nothing to do with pool. Only related to proposal expired time - const PROPOSAL_EXPIRED = 0b0000_1000; - } -} - -impl Encode for ProposalStatusFlags { - fn encode(&self) -> Vec { - self.bits().encode() - } -} - -impl Decode for ProposalStatusFlags { - fn decode( - input: &mut I, - ) -> Result { - let bits = u8::decode(input)?; - ProposalStatusFlags::from_bits(bits).ok_or_else(|| "Invalid bitflags value".into()) - } -} - -impl TypeInfo for ProposalStatusFlags { - type Identity = Self; - fn type_info() -> scale_info::Type { - ::type_info() - } -} - -impl MaxEncodedLen for ProposalStatusFlags { - fn max_encoded_len() -> usize { - ::max_encoded_len() - } -} - -#[derive(PartialEq, Eq, Clone, Encode, Debug, Decode, MaxEncodedLen, TypeInfo)] -pub struct PoolProposalStatus { - pub pool_proposal_index: PoolProposalIndex, - pub proposal_expire_time: BlockNumber, -} - -#[derive(PartialEq, Eq, Clone, Encode, Debug, Decode, MaxEncodedLen, TypeInfo)] -pub struct PoolProposalInfo { - // Proposer/Curator - pub proposer: AccountId, - // Hash of pool info like legal files etc. - pub pool_info_hash: InfoHash, - // The maximum investing amount that the pool can handle - pub max_pool_size: Balance, - // If proposal passed, when the investing pool will start - pub pool_start_time: BlockNumber, - // If proposal passed, when the investing pool will end - pub pool_end_time: BlockNumber, - // estimated APR, but in percentage form - // i.e. 100 => 100% - pub estimated_pool_reward: Balance, - // Proposal status flags - pub proposal_status_flags: ProposalStatusFlags, -} - -#[derive(Clone, Encode, Debug, Decode, MaxEncodedLen, TypeInfo)] -pub struct Bond { - pub owner: Identity, - pub amount: BalanceType, -} - -impl Default for Bond { - fn default() -> Bond { - Bond { - owner: A::decode(&mut sp_runtime::traits::TrailingZeroInput::zeroes()) - .expect("infinite length input; no invalid inputs for type; qed"), - amount: B::default(), - } - } -} - -impl Bond { - pub fn from_owner(owner: A) -> Self { - Bond { owner, amount: B::default() } - } -} - -impl Eq for Bond {} - -impl Ord for Bond { - fn cmp(&self, other: &Self) -> Ordering { - self.owner.cmp(&other.owner) - } -} - -impl PartialOrd for Bond { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl PartialEq for Bond { - fn eq(&self, other: &Self) -> bool { - self.owner == other.owner - } -} - -#[derive(Clone, Encode, Debug, Decode, MaxEncodedLen, TypeInfo)] -#[scale_info(skip_type_params(S))] -pub struct PoolProposalPreInvesting> { - // Exluding queued part - pub total_pre_investing_amount: Balance, - // Ordered by bond owner AccountId - pub pre_investings: BoundedVec, S>, - pub total_queued_amount: Balance, - // Ordered by bond owner AccountId - pub queued_pre_investings: BoundedVec<(Bond, BlockNumber), S>, -} - -impl< - AccountId: Ord + Clone, - Balance: Default + CheckedAdd + CheckedSub + PartialOrd + Copy, - BlockNumber: Ord + Clone, - S: Get, - > PoolProposalPreInvesting -{ - /// Create a new empty default - pub fn new() -> Self { - PoolProposalPreInvesting { - total_pre_investing_amount: Default::default(), - pre_investings: Default::default(), - total_queued_amount: Default::default(), - queued_pre_investings: Default::default(), - } - } - - pub fn get_pre_investing(&self, account: AccountId) -> Result<(usize, Balance), usize> { - match self.pre_investings.binary_search(&Bond::from_owner(account)) { - Ok(loc) => Ok((loc, self.pre_investings[loc].amount)), - Err(loc) => Err(loc), - } - } - - pub fn add_pre_investing( - &mut self, - account: AccountId, - amount: Balance, - ) -> Result<(), DispatchError> { - match self.get_pre_investing(account.clone()) { - Ok(existing) => { - self.pre_investings.remove(existing.0); - let new_balance = - existing.1.checked_add(&amount).ok_or(ArithmeticError::Overflow)?; - self.pre_investings - .try_insert(existing.0, Bond { owner: account.clone(), amount: new_balance }) - .map_err(|_| Error::::InvestingPoolOversized)?; - }, - Err(potential_index) => { - self.pre_investings - .try_insert(potential_index, Bond { owner: account, amount }) - .map_err(|_| Error::::InvestingPoolOversized)?; - }, - } - self.total_pre_investing_amount = self - .total_pre_investing_amount - .checked_add(&amount) - .ok_or(ArithmeticError::Overflow)?; - Ok(()) - } - - pub fn withdraw( - &mut self, - account: AccountId, - amount: Balance, - ) -> Result<(), DispatchError> { - // Withdraw Queued one if any - if let Ok(existing_q) = self.get_queued_investing(account.clone()) { - if existing_q.1 > amount { - // Existing queue is larger than target amount - // Finish withdrawing and return early - self.queued_pre_investings.remove(existing_q.0); - let new_balance_q = - existing_q.1.checked_sub(&amount).ok_or(ArithmeticError::Overflow)?; - self.queued_pre_investings - .try_insert( - existing_q.0, - (Bond { owner: account, amount: new_balance_q }, existing_q.2), - ) - .map_err(|_| Error::::InvestingPoolOversized)?; - - self.total_queued_amount = self - .total_queued_amount - .checked_sub(&amount) - .ok_or(ArithmeticError::Overflow)?; - return Ok(()); - } else { - // Totally remove queued - self.queued_pre_investings.remove(existing_q.0); - self.total_queued_amount = self - .total_queued_amount - .checked_sub(&existing_q.1) - .ok_or(ArithmeticError::Overflow)?; - - let left_amount = amount - existing_q.1; - - if let Ok(existing_p) = self.get_pre_investing(account.clone()) { - // Existing pre-investing is larger than left target amount - // Finish withdrawing and return early - if existing_p.1 > left_amount { - self.pre_investings.remove(existing_p.0); - let new_balance_p = existing_p - .1 - .checked_sub(&left_amount) - .ok_or(ArithmeticError::Overflow)?; - self.pre_investings - .try_insert( - existing_q.0, - Bond { owner: account, amount: new_balance_p }, - ) - .map_err(|_| Error::::InvestingPoolOversized)?; - self.total_pre_investing_amount = self - .total_pre_investing_amount - .checked_sub(&left_amount) - .ok_or(ArithmeticError::Overflow)?; - return Ok(()); - } else if existing_p.1 == left_amount { - // Exact amount to finish everything - self.pre_investings.remove(existing_p.0); - self.total_pre_investing_amount = self - .total_pre_investing_amount - .checked_sub(&left_amount) - .ok_or(ArithmeticError::Overflow)?; - return Ok(()); - } else { - // Not enough fund to finish operation - return Err(Error::::InsufficientPreInvesting.into()); - } - } - } - } - // No pre-investing of all kinds - Err(Error::::InsufficientPreInvesting.into()) - } - - pub fn get_queued_investing( - &self, - account: AccountId, - ) -> Result<(usize, Balance, BlockNumber), usize> { - match self - .queued_pre_investings - .binary_search_by(|p| p.0.cmp(&Bond::from_owner(account.clone()))) - { - Ok(loc) => Ok(( - loc, - self.queued_pre_investings[loc].0.amount, - self.queued_pre_investings[loc].1.clone(), - )), - Err(loc) => Err(loc), - } - } - - pub fn add_queued_investing( - &mut self, - account: AccountId, - amount: Balance, - current_block: BlockNumber, - ) -> Result<(), DispatchError> { - match self.get_queued_investing(account.clone()) { - Ok(existing) => { - self.queued_pre_investings.remove(existing.0); - let new_balance = - existing.1.checked_add(&amount).ok_or(ArithmeticError::Overflow)?; - self.queued_pre_investings - .try_insert( - existing.0, - (Bond { owner: account.clone(), amount: new_balance }, current_block), - ) - .map_err(|_| Error::::InvestingPoolOversized)?; - }, - Err(potential_index) => { - self.queued_pre_investings - .try_insert(potential_index, (Bond { owner: account, amount }, current_block)) - .map_err(|_| Error::::InvestingPoolOversized)?; - }, - } - self.total_queued_amount = - self.total_queued_amount.checked_add(&amount).ok_or(ArithmeticError::Overflow)?; - Ok(()) - } - - // Transfer queued amount into pre investing - pub fn move_queued_to_pre_investing_until( - &mut self, - target_pre_investing_amount: Balance, - ) -> Result>, DispatchError> { - let mut result: Vec> = Vec::new(); - // Make sure target transfer is possible - ensure!( - self.total_queued_amount - >= target_pre_investing_amount - .checked_sub(&self.total_pre_investing_amount) - .ok_or(ArithmeticError::Overflow)?, - Error::::InsufficientPreInvesting - ); - - let mut v = self.queued_pre_investings.clone().into_inner(); - // temp sorted by blocknumber from smallest to largest - v.sort_by(|a, b| a.1.cmp(&b.1)); - - for i in v.iter() { - let target_bond_owner = i.0.owner.clone(); - let transfer_amount = target_pre_investing_amount - .checked_sub(&self.total_pre_investing_amount) - .ok_or(ArithmeticError::Overflow)?; - if i.0.amount >= transfer_amount { - self.withdraw::(target_bond_owner.clone(), transfer_amount)?; - self.add_pre_investing::(target_bond_owner.clone(), transfer_amount)?; - result.push(Bond { owner: target_bond_owner.clone(), amount: transfer_amount }); - break; - } else { - self.withdraw::(target_bond_owner.clone(), i.0.amount)?; - self.add_pre_investing::(target_bond_owner.clone(), i.0.amount)?; - result.push(Bond { owner: target_bond_owner, amount: i.0.amount }); - } - } - - Ok(result) - } -} - -impl< - AccountId: Ord + Clone, - Balance: Default + CheckedAdd + CheckedSub + PartialOrd + Copy, - BlockNumber: Ord + Clone, - S: Get, - > Default for PoolProposalPreInvesting -{ - fn default() -> Self { - Self::new() - } -} diff --git a/parachain/pallets/extrinsic-filter/Cargo.toml b/parachain/pallets/extrinsic-filter/Cargo.toml index 3151aa3e0a..485ba3d763 100644 --- a/parachain/pallets/extrinsic-filter/Cargo.toml +++ b/parachain/pallets/extrinsic-filter/Cargo.toml @@ -15,15 +15,14 @@ workspace = true log = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } +sp-runtime = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -sp-runtime = { workspace = true } sp-std = { workspace = true } [dev-dependencies] -sp-core = { workspace = true, features = ["std"] } sp-io = { workspace = true, features = ["std"] } pallet-balances = { workspace = true, features = ["std"] } pallet-timestamp = { workspace = true, features = ["std"] } @@ -36,15 +35,14 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "log/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "pallet-balances/std", "pallet-timestamp/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", diff --git a/parachain/pallets/identity-management/Cargo.toml b/parachain/pallets/identity-management/Cargo.toml index c126fd15a2..539854b780 100644 --- a/parachain/pallets/identity-management/Cargo.toml +++ b/parachain/pallets/identity-management/Cargo.toml @@ -7,12 +7,11 @@ repository = 'https://github.com/litentry/heima' version = '0.1.0' [dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +parity-scale-codec = { workspace = true } +scale-info = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -37,6 +36,8 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "heima-primitives/std", "frame-benchmarking?/std", "frame-support/std", @@ -45,8 +46,6 @@ std = [ "pallet-teebag/std", "pallet-timestamp/std", "pallet-utility/std", - "parity-scale-codec/std", - "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", diff --git a/parachain/pallets/omni-account/Cargo.toml b/parachain/pallets/omni-account/Cargo.toml index b0e9a082d6..db3fbbca61 100644 --- a/parachain/pallets/omni-account/Cargo.toml +++ b/parachain/pallets/omni-account/Cargo.toml @@ -9,13 +9,12 @@ repository = 'https://github.com/litentry/heima' [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } +sp-runtime = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -sp-core = { workspace = true } sp-io = { workspace = true } -sp-runtime = { workspace = true } sp-std = { workspace = true } heima-primitives = { workspace = true } @@ -36,15 +35,14 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", ] std = [ + "parity-scale-codec/std", + "scale-info/std", "heima-primitives/std", "frame-support/std", "frame-system/std", "pallet-teebag/std", "pallet-timestamp/std", "pallet-utility/std", - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", "sp-io/std", "sp-keyring/std", "sp-runtime/std", diff --git a/parachain/pallets/omni-account/runtime-api/Cargo.toml b/parachain/pallets/omni-account/runtime-api/Cargo.toml index c5b72375c0..46ba0131f8 100644 --- a/parachain/pallets/omni-account/runtime-api/Cargo.toml +++ b/parachain/pallets/omni-account/runtime-api/Cargo.toml @@ -11,13 +11,11 @@ parity-scale-codec = { workspace = true } sp-api = { workspace = true } heima-primitives = { workspace = true } -pallet-omni-account = { workspace = true } [features] default = ["std"] std = [ "heima-primitives/std", - "pallet-omni-account/std", "parity-scale-codec/std", "sp-api/std", ] diff --git a/parachain/pallets/omni-bridge/Cargo.toml b/parachain/pallets/omni-bridge/Cargo.toml index d9f94f2f03..6ed6a95e0d 100644 --- a/parachain/pallets/omni-bridge/Cargo.toml +++ b/parachain/pallets/omni-bridge/Cargo.toml @@ -7,11 +7,10 @@ name = 'pallet-omni-bridge' repository = 'https://github.com/litentry/heima' [dependencies] -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - frame-support = { workspace = true } frame-system = { workspace = true } +parity-scale-codec = { workspace = true } +scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } diff --git a/parachain/pallets/score-staking/Cargo.toml b/parachain/pallets/score-staking/Cargo.toml index 595b3bc281..3f33c1fa74 100644 --- a/parachain/pallets/score-staking/Cargo.toml +++ b/parachain/pallets/score-staking/Cargo.toml @@ -5,14 +5,12 @@ version = "0.1.0" edition = "2021" [dependencies] +frame-support = { workspace = true } +frame-system = { workspace = true } num-integer = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } serde = { workspace = true } - -frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -28,15 +26,15 @@ sp-keyring = { workspace = true } [features] default = ["std"] std = [ + "parity-scale-codec/std", + "scale-info/std", "heima-primitives/std", - "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "num-integer/std", "pallet-balances/std", "pallet-parachain-staking/std", "parity-scale-codec/std", - "scale-info/std", "serde/std", "sp-core/std", "sp-io/std", @@ -45,7 +43,6 @@ std = [ "sp-std/std", ] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/parachain/pallets/teebag/Cargo.toml b/parachain/pallets/teebag/Cargo.toml index 0f0a496f01..3510261e69 100644 --- a/parachain/pallets/teebag/Cargo.toml +++ b/parachain/pallets/teebag/Cargo.toml @@ -18,25 +18,24 @@ log = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } serde = { workspace = true } -serde_json = { workspace = true, features = ["alloc"] } +serde_json = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } x509-cert = { workspace = true } -frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } pallet-balances = { workspace = true, optional = true } pallet-timestamp = { workspace = true } pallet-utility = { workspace = true } -sp-core = { workspace = true } sp-io = { workspace = true } -sp-runtime = { workspace = true } sp-std = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } heima-primitives = { workspace = true } [dev-dependencies] env_logger = { workspace = true } -frame-benchmarking = { workspace = true, features = ["std"] } pallet-balances = { workspace = true, features = ["std"] } sp-keyring = { workspace = true } @@ -45,6 +44,11 @@ default = ["std"] std = [ "base64/std", "chrono/std", + "serde/std", + "serde_json/std", + "sp-core/std", + "parity-scale-codec/std", + "scale-info/std", "heima-primitives/std", "der/std", "frame-benchmarking?/std", @@ -55,11 +59,6 @@ std = [ "pallet-balances?/std", "pallet-timestamp/std", "pallet-utility/std", - "parity-scale-codec/std", - "scale-info/std", - "serde/std", - "serde_json/std", - "sp-core/std", "sp-io/std", "sp-keyring/std", "sp-runtime/std", diff --git a/parachain/precompiles/bridge-transfer/Cargo.toml b/parachain/precompiles/bridge-transfer/Cargo.toml index d6cabc6a41..b76ce20c93 100644 --- a/parachain/precompiles/bridge-transfer/Cargo.toml +++ b/parachain/precompiles/bridge-transfer/Cargo.toml @@ -6,13 +6,10 @@ version = '0.1.0' [dependencies] precompile-utils = { workspace = true } +sp-core = { workspace = true } frame-support = { workspace = true } -frame-system = { workspace = true } pallet-bridge-transfer = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -27,25 +24,21 @@ serde = { workspace = true } sha3 = { workspace = true } precompile-utils = { workspace = true, features = ["std", "testing"] } pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ + "sp-core/std", "fp-evm/std", "frame-support/std", - "frame-system/std", "libsecp256k1/std", "pallet-bridge-transfer/std", "pallet-evm/std", "pallet-timestamp/std", - "parity-scale-codec/std", "precompile-utils/std", - "scale-info/std", "serde/std", "sha3/std", - "sp-core/std", "sp-runtime/std", "sp-std/std", ] diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/AIUSDConvertor.sol b/parachain/precompiles/collab-ai/aiusd-convertor/AIUSDConvertor.sol deleted file mode 100644 index be633ca881..0000000000 --- a/parachain/precompiles/collab-ai/aiusd-convertor/AIUSDConvertor.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -interface IAIUSDConvertor { - /// @notice Lock target asset_id and mint AIUSD - /// @param asset_id: target asset id in exchange for AIUSD - /// @param aiusd_amount: The amount of AIUSD token - /// @custom:selector 0x1a15980f - /// mintAIUSD(uint256,uint256) - function mintAIUSD(uint256 asset_id, uint256 aiusd_amount) external; - - /// @notice Burn aiusd and get target asset_id token released - /// @param asset_id: target asset id in exchange for AIUSD - /// @param aiusd_amount: The amount of AIUSD token - /// @custom:selector 0xa89bb55f - /// burnAIUSD(uint256,uint256) - function burnAIUSD(uint256 asset_id, uint256 aiusd_amount) external; -} diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/Cargo.toml b/parachain/precompiles/collab-ai/aiusd-convertor/Cargo.toml deleted file mode 100644 index 0acb788a11..0000000000 --- a/parachain/precompiles/collab-ai/aiusd-convertor/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = "pallet-evm-precompile-aiusd-convertor" -version = '0.1.0' - -[dependencies] -precompile-utils = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-aiusd-convertor = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } -serde = { workspace = true } -sha3 = { workspace = true } -precompile-utils = { workspace = true, features = ["std", "testing"] } -pallet-timestamp = { workspace = true, features = ["std"] } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true, features = ["std", "insecure_zero_ed"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } -sp-io = { workspace = true } -sp-runtime = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -runtime-benchmarks = [ - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", -] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-aiusd-convertor/std", - "pallet-evm/std", - "pallet-timestamp/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/src/lib.rs b/parachain/precompiles/collab-ai/aiusd-convertor/src/lib.rs deleted file mode 100644 index 7e7fefe273..0000000000 --- a/parachain/precompiles/collab-ai/aiusd-convertor/src/lib.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::{PrecompileFailure, PrecompileHandle}; -use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; -use pallet_evm::AddressMapping; -use precompile_utils::prelude::*; -use sp_core::U256; -use sp_runtime::traits::Dispatchable; -use sp_std::marker::PhantomData; - -use pallet_aiusd_convertor::{AssetBalanceOf, AssetIdOf}; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -pub struct AIUSDConvertorPrecompile(PhantomData); - -#[precompile_utils::precompile] -impl AIUSDConvertorPrecompile -where - Runtime: pallet_aiusd_convertor::Config + pallet_evm::Config, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, - Runtime::RuntimeCall: From>, - ::RuntimeOrigin: - From::AccountId>>, - AssetBalanceOf: TryFrom + Into, - AssetIdOf: TryFrom + Into, -{ - #[precompile::public("mintAIUSD(uint256,uint256)")] - fn mint_aiusd(handle: &mut impl PrecompileHandle, asset_id: U256, amount: U256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let asset_id: AssetIdOf = asset_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("asset id type")) - })?; - let amount: AssetBalanceOf = amount.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_aiusd_convertor::Call::::mint_aiusd { - source_asset_id: asset_id, - aiusd_amount: amount, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("burnAIUSD(uint256,uint256)")] - fn burn_aiusd(handle: &mut impl PrecompileHandle, asset_id: U256, amount: U256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let asset_id: AssetIdOf = asset_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("asset id type")) - })?; - let amount: AssetBalanceOf = amount.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_aiusd_convertor::Call::::burn_aiusd { - source_asset_id: asset_id, - aiusd_amount: amount, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } -} diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs b/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs deleted file mode 100644 index 11ced56f81..0000000000 --- a/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::*; -use frame_support::{ - assert_ok, construct_runtime, derive_impl, - pallet_prelude::Weight, - parameter_types, - traits::{ - tokens::fungibles::{Inspect, Mutate}, - AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, - }, -}; -use pallet_aiusd_convertor as pallet_aiusd; -use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; -use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::{Get, H160}; -use sp_runtime::{ - traits::{IdentifyAccount, IdentityLookup, Verify}, - AccountId32, BuildStorage, -}; - -pub type Signature = sp_runtime::MultiSignature; -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -pub type Balance = u128; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Timestamp: pallet_timestamp, - Assets: pallet_assets, - Balances: pallet_balances, - Evm: pallet_evm, - AIUSD: pallet_aiusd, - } -); - -parameter_types! { - pub const AIUSDAssetId: u32 = 1; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -impl pallet_assets::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = u32; - type AssetIdParameter = u32; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = frame_system::EnsureRoot; - type AssetDeposit = ConstU128<1>; - type AssetAccountDeposit = ConstU128<10>; - type MetadataDepositBase = ConstU128<1>; - type MetadataDepositPerByte = ConstU128<1>; - type ApprovalDeposit = ConstU128<1>; - type StringLimit = ConstU32<50>; - type Freezer = (); - type WeightInfo = (); - type CallbackHandle = (); - type Extra = (); - type RemoveItemsLimit = ConstU32<5>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - -pub struct ConvertingPool; -impl Get for ConvertingPool { - fn get() -> AccountId32 { - let h160_address: H160 = H160::from_low_u64_be(1000); - TruncatedAddressMapping::into_account_id(h160_address) - } -} - -impl pallet_aiusd::Config for Test { - type RuntimeEvent = RuntimeEvent; - type ConvertingPool = ConvertingPool; - type AIUSDAssetId = AIUSDAssetId; - type ManagerOrigin = frame_system::EnsureRoot<::AccountId>; -} - -pub fn precompile_address() -> H160 { - H160::from_low_u64_be(20480 + 115) -} - -pub type AIUSDConvertorMockPrecompile = - PrecompileSetBuilder, AIUSDConvertorPrecompile>,)>; - -pub type PCall = AIUSDConvertorPrecompileCall; - -pub struct TruncatedAddressMapping; -impl AddressMapping for TruncatedAddressMapping { - fn into_account_id(address: H160) -> AccountId { - let mut data = [0u8; 32]; - data[0..20].copy_from_slice(&address[..]); - AccountId::from(Into::<[u8; 32]>::into(data)) - } -} - -parameter_types! { - pub PrecompilesValue: AIUSDConvertorMockPrecompile = AIUSDConvertorMockPrecompile::new(); - pub WeightPerGas: Weight = Weight::from_parts(1, 0); -} - -impl pallet_evm::Config for Test { - type AccountProvider = pallet_evm::FrameSystemAccountProvider; - type FeeCalculator = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type CallOrigin = EnsureAddressRoot; - type WithdrawOrigin = EnsureAddressNever; - type AddressMapping = TruncatedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = AIUSDConvertorMockPrecompile; - type PrecompilesValue = PrecompilesValue; - type Timestamp = Timestamp; - type ChainId = (); - type OnChargeTransaction = (); - type BlockGasLimit = (); - type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type FindAuthor = (); - type OnCreate = (); - type WeightInfo = (); - type GasLimitPovSizeRatio = ConstU64<4>; - type GasLimitStorageGrowthRatio = ConstU64<4>; -} - -parameter_types! { - pub const VerifyPRuntime: bool = false; - pub const VerifyRelaychainGenesisBlockHash: bool = false; -} - -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<1>; - type WeightInfo = (); -} - -pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - - let h160_address: H160 = H160::from_low_u64_be(1001); - let owner = TruncatedAddressMapping::into_account_id(h160_address); - let origin = RuntimeOrigin::root(); - - // Create the AIUSD asset - assert_ok!(pallet_assets::Pallet::::force_create( - origin.clone(), - 1, // AIUSD asset id - owner.clone(), - true, - 1, - )); - // Create the target asset - let source_asset_id = 2; - assert_ok!(pallet_assets::Pallet::::force_create( - origin, - source_asset_id, - owner.clone(), - true, - 1, - )); - - // Check if these assets exists - assert!(pallet_aiusd::InspectFungibles::::asset_exists(1)); - assert!(pallet_aiusd::InspectFungibles::::asset_exists(2)); - - // Set total supply - assert_ok!(pallet_aiusd::InspectFungibles::::mint_into( - source_asset_id, - &owner, - 1_000_000_000 // 1000 (10^6 * 1000) - )); - - // Enable assert - assert_ok!(AIUSD::enable_token(RuntimeOrigin::root(), source_asset_id, 1_000_000)); - }); - ext -} diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/src/tests.rs b/parachain/precompiles/collab-ai/aiusd-convertor/src/tests.rs deleted file mode 100644 index d6de7512a5..0000000000 --- a/parachain/precompiles/collab-ai/aiusd-convertor/src/tests.rs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::mock::*; -use pallet_aiusd_convertor::{Event, InspectFungibles}; -use pallet_evm::AddressMapping; -use precompile_utils::testing::PrecompileTesterExt; -use sp_core::H160; -use sp_runtime::AccountId32; - -#[test] -fn test_mint_and_burn_aiusd() { - new_test_ext().execute_with(|| { - let aiusd_asset_id = 1; - let source_asset_id = 2; - let target_decimal_ratio = 1_000_000; - let target_asset_supply_amount: u128 = target_decimal_ratio * 1000; - let h160_address: H160 = H160::from_low_u64_be(1001); - let beneficiary = - >::into_account_id(h160_address); - - // Check balance - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, 0); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount); - - // mint - let mint_amount: u128 = 3_000_000_000_000_000_000; // 3 AIUSD (10^18 * 3) - PrecompilesValue::get() - .prepare_test( - h160_address, - precompile_address(), - PCall::::mint_aiusd { - asset_id: source_asset_id.into(), - amount: mint_amount.into(), - }, - ) - .expect_no_logs() - .execute_returns(()); - - let mint_asset_amount = target_decimal_ratio * 3; - // Check balance after mint - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, mint_amount); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!(target_balance, target_asset_supply_amount - mint_asset_amount); - System::assert_last_event(RuntimeEvent::AIUSD(Event::AIUSDCreated { - beneficiary: beneficiary.clone(), - aiusd_amount: mint_amount, - asset_id: source_asset_id, - asset_amount: mint_asset_amount, - })); - - // burn - let burn_amount: u128 = 2_000_000_000_000_000_000; // 2 AIUSD (10^18 * 2) - PrecompilesValue::get() - .prepare_test( - h160_address, - precompile_address(), - PCall::::burn_aiusd { - asset_id: source_asset_id.into(), - amount: burn_amount.into(), - }, - ) - .expect_no_logs() - .execute_returns(()); - - let burn_asset_amount = target_decimal_ratio * 2; - // Check balance after burn - let aiusd_balance = InspectFungibles::::balance(aiusd_asset_id, &beneficiary); - assert_eq!(aiusd_balance, mint_amount - burn_amount); - let target_balance = InspectFungibles::::balance(source_asset_id, &beneficiary); - assert_eq!( - target_balance, - target_asset_supply_amount - mint_asset_amount + burn_asset_amount - ); - System::assert_last_event(RuntimeEvent::AIUSD(Event::AIUSDDestroyed { - beneficiary, - aiusd_amount: burn_amount, - asset_id: source_asset_id, - asset_amount: burn_asset_amount, - })); - }); -} diff --git a/parachain/precompiles/collab-ai/curator/Cargo.toml b/parachain/precompiles/collab-ai/curator/Cargo.toml deleted file mode 100644 index 10c8a5457a..0000000000 --- a/parachain/precompiles/collab-ai/curator/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = "pallet-evm-precompile-curator" -version = '0.1.0' - -[dependencies] -pallet-balances = { workspace = true } -precompile-utils = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-collab-ai-common = { workspace = true } -pallet-curator = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } -serde = { workspace = true } -sha3 = { workspace = true } -precompile-utils = { workspace = true, features = ["std", "testing"] } -pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } -sp-runtime = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", - "pallet-curator/std", - "pallet-evm/std", - "pallet-timestamp/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/parachain/precompiles/collab-ai/curator/Curator.sol b/parachain/precompiles/collab-ai/curator/Curator.sol deleted file mode 100644 index f1d4785e50..0000000000 --- a/parachain/precompiles/collab-ai/curator/Curator.sol +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -interface ICurator { - /// @dev Defines the candidate status type. - enum CandidateStatus { - Unverified, - Verified, - Banned - } - - /// @dev A structure for curator query result - struct CuratorQueryResult { - bool exist; - bytes32 info_hash; - uint256 update_block; - bytes32 curator; - CandidateStatus status; - } - - /// @notice Regist info hash of curator and reserve funds, only work if not already registed - /// @param info_hash: H256 hash of info image - /// @custom:selector 0x8ead391c - /// registCurator(bytes32) - function registCurator(bytes32 info_hash) external; - - /// @notice Update info hash of curator, only work if already registed - /// @param info_hash: H256 hash of info image - /// @custom:selector 0x457c00e6 - /// updateCurator(bytes32) - function updateCurator(bytes32 info_hash) external; - - /// @notice clean curator info and return funds if not banned, otherwise no fund return - /// @custom:selector 0xe3b134e6 - /// cleanCurator() - function cleanCurator() external; - - /// @notice public curator count of next curator index will be - /// @custom:selector 0x566537c5 - /// publicCuratorCount() - function publicCuratorCount() external view returns (uint256 count); - - /// @notice public curator to index, substrate address format, bool represents if such index exists - /// @param curator: substrate format address - /// @custom:selector 0x039997d0 - /// publicCuratorToIndex(bytes32) - function publicCuratorToIndex(bytes32 curator) external view returns (bool exist, uint256 index); - - /// @notice Curator index to curator info, bool represents if such info exists - /// @param index: Curator index - /// @custom:selector 0x74cded61 - /// curatorIndexToInfo(uint256) - function curatorIndexToInfo(uint256 index) external view returns (CuratorQueryResult memory result); - - /// @notice Curator index to curator info, bool represents if such info exists - /// @param start_id: Guardian index start_id, included - /// @param end_id: Guardian index end id, excluded - /// @custom:selector 0xf2e508c7 - /// batchCuratorIndexToInfo(uint256,uint256) - function batchCuratorIndexToInfo(uint256 start_id, uint256 end_id) external view returns (CuratorQueryResult[] memory result); - -} \ No newline at end of file diff --git a/parachain/precompiles/collab-ai/curator/src/lib.rs b/parachain/precompiles/collab-ai/curator/src/lib.rs deleted file mode 100644 index 04e7d1de5b..0000000000 --- a/parachain/precompiles/collab-ai/curator/src/lib.rs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::{PrecompileFailure, PrecompileHandle}; -use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_evm::AddressMapping; -use precompile_utils::prelude::*; -use sp_core::{H256, U256}; -use sp_runtime::traits::Dispatchable; -use sp_std::{marker::PhantomData, vec::Vec}; - -use pallet_collab_ai_common::CandidateStatus; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -pub struct CuratorPrecompile(PhantomData); - -#[precompile_utils::precompile] -impl CuratorPrecompile -where - Runtime: pallet_curator::Config + pallet_evm::Config, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, - Runtime::RuntimeCall: From>, - ::RuntimeOrigin: - From::AccountId>>, - BlockNumberFor: TryFrom + Into, -{ - #[precompile::public("registCurator(bytes32)")] - fn regist_curator(handle: &mut impl PrecompileHandle, info_hash: H256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_curator::Call::::regist_curator { info_hash }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("updateCurator(bytes32)")] - fn update_curator(handle: &mut impl PrecompileHandle, info_hash: H256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_curator::Call::::update_curator { info_hash }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("cleanCurator()")] - fn clean_curator(handle: &mut impl PrecompileHandle) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_curator::Call::::clean_curator {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("publicCuratorCount()")] - #[precompile::view] - fn public_curator_count(handle: &mut impl PrecompileHandle) -> EvmResult { - // Storage item: CuratorIndex u128: - // 16 - handle.record_db_read::(16)?; - - Ok(pallet_curator::Pallet::::public_curator_count().into()) - } - - #[precompile::public("publicCuratorToIndex(bytes32)")] - #[precompile::view] - fn public_curator_to_index( - handle: &mut impl PrecompileHandle, - curator: H256, - ) -> EvmResult<(bool, U256)> { - // Storage item: CuratorIndex u128: - // Twox64Concat(8) + T::AccountId(32) + CuratorIndex(16) - handle.record_db_read::(56)?; - - let curator: [u8; 32] = curator.into(); - let curator = Runtime::AccountId::from(curator); - - if let Some(result) = pallet_curator::Pallet::::public_curator_to_index(curator) { - Ok((true, result.into())) - } else { - Ok((false, Default::default())) - } - } - - fn candidate_status_to_u8(status: CandidateStatus) -> MayRevert { - match status { - CandidateStatus::Unverified => Ok(0u8), - CandidateStatus::Verified => Ok(1u8), - CandidateStatus::Banned => Ok(2u8), - } - } - - #[precompile::public("curatorIndexToInfo(uint256)")] - #[precompile::view] - fn curator_index_to_info( - handle: &mut impl PrecompileHandle, - index: U256, - ) -> EvmResult { - // Storage item: CuratorIndex u128: - // Twox64Concat(8) + CuratorIndex(16) + InfoHash(32) + BlockNumber(4) + T::AccountId(32) + CandidateStatus(1) - handle.record_db_read::(93)?; - - let index: u128 = index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - if let Some((info_hash, update_block, curator, status)) = - pallet_curator::Pallet::::curator_index_to_info(index) - { - let update_block: U256 = update_block.into(); - - let curator: [u8; 32] = curator.into(); - let curator: H256 = curator.into(); - - let status = Self::candidate_status_to_u8(status).in_field("candidateStatus")?; - - Ok(CuratorQueryResult { exist: true, info_hash, update_block, curator, status }) - } else { - Ok(CuratorQueryResult { - exist: false, - info_hash: Default::default(), - update_block: Default::default(), - curator: Default::default(), - status: Default::default(), - }) - } - } - - #[precompile::public("batchCuratorIndexToInfo(uint256,uint256)")] - #[precompile::view] - fn batch_curator_index_to_info( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let length: u128 = end_id.checked_sub(start_id).ok_or(Into::::into( - RevertReason::value_is_too_large("id overflow"), - ))?; - // Storage item: CuratorIndex u128: - // Twox64Concat(8) + CuratorIndex(16) + InfoHash(32) + BlockNumber(4) + T::AccountId(32) + CandidateStatus(1) - let length_usize: usize = length.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - handle.record_db_read::(length_usize.saturating_mul(93_usize))?; - - let result = (start_id..end_id) - .map(|i| { - if let Some((info_hash, update_block, curator, status)) = - pallet_curator::Pallet::::curator_index_to_info(i) - { - let update_block: U256 = update_block.into(); - - let curator: [u8; 32] = curator.into(); - let curator: H256 = curator.into(); - - let status: u8 = Self::candidate_status_to_u8(status).unwrap_or_default(); - - CuratorQueryResult { exist: true, info_hash, update_block, curator, status } - } else { - CuratorQueryResult { - exist: false, - info_hash: Default::default(), - update_block: Default::default(), - curator: Default::default(), - status: Default::default(), - } - } - }) - .collect(); - Ok(result) - } -} - -#[derive(Default, Debug, solidity::Codec)] -struct CuratorQueryResult { - exist: bool, - info_hash: H256, - update_block: U256, - curator: H256, - status: u8, -} diff --git a/parachain/precompiles/collab-ai/curator/src/mock.rs b/parachain/precompiles/collab-ai/curator/src/mock.rs deleted file mode 100644 index 0d2d716328..0000000000 --- a/parachain/precompiles/collab-ai/curator/src/mock.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::*; -use frame_support::{construct_runtime, derive_impl, parameter_types, traits::ConstU64}; -use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; -use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::H160; -use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; - -pub type Balance = u128; -pub type AccountId = AccountId32; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Balances: pallet_balances, - Evm: pallet_evm, - Curator: pallet_curator, - Timestamp: pallet_timestamp, - } -); - -parameter_types! { - pub const MinimumCuratorDeposit: Balance = 10; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -// Implement pallet_curator config trait for mock runtime. -impl pallet_curator::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumCuratorDeposit = MinimumCuratorDeposit; - type CuratorJudgeOrigin = frame_system::EnsureRoot; -} - -// Setup EVM configuration -parameter_types! { - pub WeightPerGas: u64 = 1; -} - -impl pallet_evm::Config for Test { - type AccountProvider = pallet_evm::FrameSystemAccountProvider; - type FeeCalculator = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type CallOrigin = EnsureAddressRoot; - type WithdrawOrigin = EnsureAddressNever; - type AddressMapping = TruncatedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = CuratorMockPrecompile; - type PrecompilesValue = PrecompilesValue; - type ChainId = (); - type Timestamp = Timestamp; - type OnChargeTransaction = (); - type BlockGasLimit = (); - type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type FindAuthor = (); - type OnCreate = (); - type WeightInfo = (); - type GasLimitPovSizeRatio = ConstU64<4>; - type GasLimitStorageGrowthRatio = ConstU64<4>; -} - -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<1>; - type WeightInfo = (); -} - -pub struct TruncatedAddressMapping; -impl pallet_evm::AddressMapping for TruncatedAddressMapping { - fn into_account_id(address: H160) -> AccountId { - let mut data = [0u8; 32]; - data[0..20].copy_from_slice(&address[..]); - AccountId::from(Into::<[u8; 32]>::into(data)) - } -} - -pub type CuratorMockPrecompile = - PrecompileSetBuilder, CuratorPrecompile>,)>; - -parameter_types! { - pub PrecompilesValue: CuratorMockPrecompile = CuratorMockPrecompile::new(); -} - -// Helper function to initialize the test environment. -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - // Add initial balances for the involved accounts - pallet_balances::GenesisConfig:: { - balances: vec![ - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1000)), 1_000_000), - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1001)), 1_000_000), - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1002)), 1_000_000), - ], - } - .assimilate_storage(&mut t) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} diff --git a/parachain/precompiles/collab-ai/curator/src/tests.rs b/parachain/precompiles/collab-ai/curator/src/tests.rs deleted file mode 100644 index 8007c4997f..0000000000 --- a/parachain/precompiles/collab-ai/curator/src/tests.rs +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::mock::{RuntimeEvent, *}; -use pallet_evm::AddressMapping; -// use pallet_evm::AddressMapping::GuardianPrecompileCall; -use crate::CuratorPrecompileCall; -use pallet_curator::Event; -use precompile_utils::testing::PrecompileTesterExt; -use sp_core::{H160, H256, U256}; - -pub type PCall = CuratorPrecompileCall; - -#[test] -fn test_regist_curator() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .expect_no_logs() - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Curator(Event::CuratorRegisted { - curator: TruncatedAddressMapping::into_account_id(curator), - curator_index: 1, - info_hash, - })); - }); -} - -#[test] -fn test_update_curator() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - let updated_hash: H256 = H256::from([2u8; 32]); - - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::update_curator { info_hash: updated_hash }, - ) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Curator(Event::CuratorUpdated { - curator: TruncatedAddressMapping::into_account_id(curator), - curator_index: 1, - info_hash: updated_hash, - })); - }); -} - -#[test] -fn test_clean_curator() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - PrecompilesValue::get() - .prepare_test(curator, H160::from_low_u64_be(1000), PCall::::clean_curator {}) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Curator(Event::CuratorCleaned { - curator: TruncatedAddressMapping::into_account_id(curator), - curator_index: 1, - })); - }); -} - -#[test] -fn test_public_curator_count() { - new_test_ext().execute_with(|| { - // Initially, there should be no curators - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::public_curator_count {}, - ) - .execute_returns(U256::from(1)); // Provide expected result - - // Register a curator to increase the count - let info_hash: H256 = H256::from([1u8; 32]); - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - // Check the curator count again, should be 1 - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::public_curator_count {}, - ) - .execute_returns(U256::from(2)); - }); -} - -#[test] -fn test_public_curator_to_index() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the curator - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - // Query the curator's index - let curator_account = TruncatedAddressMapping::into_account_id(curator); - let curator_account: [u8; 32] = curator_account.into(); - let curator_account: H256 = curator_account.into(); - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::public_curator_to_index { curator: curator_account }, - ) - .execute_returns((true, U256::from(1))); - }); -} - -#[test] -fn test_curator_index_to_info() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - // Query the curator info by index - let curator_account = TruncatedAddressMapping::into_account_id(curator); - let curator_account: [u8; 32] = curator_account.into(); - let curator_account: H256 = curator_account.into(); - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::curator_index_to_info { index: 1.into() }, - ) - .execute_returns(crate::CuratorQueryResult { - exist: true, - info_hash, - update_block: U256::from(1), - curator: curator_account, - status: 0u8, - }); - }); -} - -#[test] -fn test_batch_curator_index_to_info() { - new_test_ext().execute_with(|| { - let curator: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::regist_curator { info_hash }, - ) - .execute_returns(()); - - // Query the curator info by index - let curator_account = TruncatedAddressMapping::into_account_id(curator); - let curator_account: [u8; 32] = curator_account.into(); - let curator_account: H256 = curator_account.into(); - - PrecompilesValue::get() - .prepare_test( - curator, - H160::from_low_u64_be(1000), - PCall::::batch_curator_index_to_info { start_id: 1.into(), end_id: 2.into() }, - ) - .execute_returns(vec![crate::CuratorQueryResult { - exist: true, - info_hash, - update_block: U256::from(1), - curator: curator_account, - status: 0u8, - }]); - }); -} diff --git a/parachain/precompiles/collab-ai/guardian/Cargo.toml b/parachain/precompiles/collab-ai/guardian/Cargo.toml deleted file mode 100644 index 340517fc73..0000000000 --- a/parachain/precompiles/collab-ai/guardian/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = "pallet-evm-precompile-guardian" -version = '0.1.0' - -[dependencies] -pallet-balances = { workspace = true } -precompile-utils = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-collab-ai-common = { workspace = true } -pallet-guardian = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } -serde = { workspace = true } -sha3 = { workspace = true } -precompile-utils = { workspace = true, features = ["std", "testing"] } -pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } -sp-runtime = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", - "pallet-evm/std", - "pallet-guardian/std", - "pallet-timestamp/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/parachain/precompiles/collab-ai/guardian/Guardian.sol b/parachain/precompiles/collab-ai/guardian/Guardian.sol deleted file mode 100644 index 342e01bd43..0000000000 --- a/parachain/precompiles/collab-ai/guardian/Guardian.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -interface IGuardian { - /// @dev Defines the candidate status type. - enum CandidateStatus { - Unverified, - Verified, - Banned - } - - /// @dev A structure for Guardian query result - struct GuardianQueryResult { - bool exist; - bytes32 info_hash; - uint256 update_block; - bytes32 guardian; - CandidateStatus status; - } - - /// @dev Defines GuardianVote type - enum GuardianVote { - Neutral, - Aye, - Nay, - Specific - } - /// @notice Regist info hash of guardian and reserve funds, only work if not already registed - /// @param info_hash: H256 hash of info image - /// @custom:selector 0x3cf5464a - /// registGuardian(bytes32) - function registGuardian(bytes32 info_hash) external; - - /// @notice Update info hash of guardian, only work if already registed - /// @param info_hash: H256 hash of info image - /// @custom:selector 0x2b764649 - /// updateGuardian(bytes32) - function updateGuardian(bytes32 info_hash) external; - - /// @notice Clean guardian info and return funds if not banned, otherwise no fund return - /// @custom:selector 0xc654e77d - /// cleanGuardian() - function cleanGuardian() external; - - /// @notice Vote guardian and express the corresponding status, evm - /// @custom:selector 0x55b90ea7 - /// vote(bytes32,uint8,uint256) - function vote(bytes32 guardian, GuardianVote status, uint256 potential_proposal_index) external; - - /// @notice Remove msg.sender's all existing guardian vote - /// @custom:selector 0x3219bdc0 - /// removeAllVotes() - function removeAllVotes() external; - - /// @notice public guardian count of next guardian index will be - /// @custom:selector 0x69d0b14e - /// publicGuardianCount() - function publicGuardianCount() external view returns (uint256 count); - - /// @notice public guardian to index, substrate address format, bool represents if such index exists - /// @param guardian: substrate format address - /// @custom:selector 0xf46175b8 - /// publicGuardianToIndex(bytes32) - function publicGuardianToIndex(bytes32 guardian) external view returns (bool exist, uint256 index); - - /// @notice Guardian index to guardian info, bool represents if such info exists - /// @param index: Guardian index - /// @custom:selector 0x59c95743 - /// guardianIndexToInfo(address) - function guardianIndexToInfo(uint256 index) external view returns (GuardianQueryResult memory result); - - /// @notice Guardian index to guardian info, bool represents if such info exists - /// @param start_id: Guardian index start_id, included - /// @param end_id: Guardian index end id, excluded - /// @custom:selector 0x92bd7975 - /// batchGuardianIndexToInfo(uint256,uint256) - function batchGuardianIndexToInfo(uint256 start_id, uint256 end_id) external view returns (GuardianQueryResult[] memory result); - - /// @notice Query voter's vote of one specific guardian given its guardian index, substrate - /// @param voter: voter address, substrate - /// @param guardian_index: Guardian index - /// @custom:selector 0xfaad0ba2 - /// guardianVotes(bytes32,uint256) - function guardianVotes(bytes32 voter, uint256 guardian_index) external view returns (GuardianVote guardian_vote, uint256 potential_proposal_index); -} \ No newline at end of file diff --git a/parachain/precompiles/collab-ai/guardian/src/lib.rs b/parachain/precompiles/collab-ai/guardian/src/lib.rs deleted file mode 100644 index 0bb1fe3c7f..0000000000 --- a/parachain/precompiles/collab-ai/guardian/src/lib.rs +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::{PrecompileFailure, PrecompileHandle}; -use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_evm::AddressMapping; -use precompile_utils::prelude::*; -use sp_core::{H256, U256}; -use sp_runtime::traits::Dispatchable; -use sp_std::{marker::PhantomData, vec::Vec}; - -use pallet_collab_ai_common::{CandidateStatus, GuardianVote}; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -pub struct GuardianPrecompile(PhantomData); - -#[precompile_utils::precompile] -impl GuardianPrecompile -where - Runtime: pallet_guardian::Config + pallet_evm::Config, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, - Runtime::RuntimeCall: From>, - ::RuntimeOrigin: - From::AccountId>>, - BlockNumberFor: TryFrom + Into, -{ - #[precompile::public("registGuardian(bytes32)")] - fn regist_guardian(handle: &mut impl PrecompileHandle, info_hash: H256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_guardian::Call::::regist_guardian { info_hash }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("updateGuardian(bytes32)")] - fn update_guardian(handle: &mut impl PrecompileHandle, info_hash: H256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_guardian::Call::::update_guardian { info_hash }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("cleanGuardian()")] - fn clean_guardian(handle: &mut impl PrecompileHandle) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_guardian::Call::::clean_guardian {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("vote(bytes32,uint8,uint256)")] - fn vote( - handle: &mut impl PrecompileHandle, - guardian: H256, - status: u8, - potential_proposal_index: U256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let guardian: [u8; 32] = guardian.into(); - let guardian = Runtime::AccountId::from(guardian); - let guardian_vote: GuardianVote = - Self::to_guardian_vote(status, potential_proposal_index).in_field("guardianVote")?; - let call = pallet_guardian::Call::::vote { guardian, status: Some(guardian_vote) }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - fn to_guardian_vote(status: u8, potential_proposal_index: U256) -> MayRevert { - match status { - 0u8 => Ok(GuardianVote::Neutral), - 1u8 => Ok(GuardianVote::Aye), - 2u8 => Ok(GuardianVote::Nay), - 3u8 => { - Ok(GuardianVote::Specific(potential_proposal_index.try_into().map_err(|_| { - >::into(RevertReason::value_is_too_large( - "proposal index type", - )) - })?)) - }, - _ => Err(RevertReason::custom("Out of potential status result").into()), - } - } - - fn guardian_vote_to(guardian_vote: Option) -> MayRevert<(u8, U256)> { - match guardian_vote { - None => Ok((0u8, 0.into())), - Some(GuardianVote::Neutral) => Ok((0u8, 0.into())), - Some(GuardianVote::Aye) => Ok((1u8, 0.into())), - Some(GuardianVote::Nay) => Ok((2u8, 0.into())), - Some(GuardianVote::Specific(i)) => Ok((3u8, i.into())), - } - } - - #[precompile::public("removeAllVotes()")] - fn remove_all_votes(handle: &mut impl PrecompileHandle) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let call = pallet_guardian::Call::::remove_all_votes {}; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("publicGuardianCount()")] - #[precompile::view] - fn public_guardian_count(handle: &mut impl PrecompileHandle) -> EvmResult { - // Storage item: GuardianIndex u128: - // 16 - handle.record_db_read::(16)?; - - Ok(pallet_guardian::Pallet::::public_guardian_count().into()) - } - - #[precompile::public("publicGuardianToIndex(bytes32)")] - #[precompile::view] - fn public_guardian_to_index( - handle: &mut impl PrecompileHandle, - guardian: H256, - ) -> EvmResult<(bool, U256)> { - // Storage item: GuardianIndex u128: - // Twox64Concat(8) + T::AccountId(32) + GuardianIndex(16) - handle.record_db_read::(56)?; - - let guardian = Runtime::AccountId::from(guardian.into()); - - if let Some(result) = pallet_guardian::Pallet::::public_guardian_to_index(guardian) - { - Ok((true, result.into())) - } else { - Ok((false, Default::default())) - } - } - - fn candidate_status_to_u8(status: CandidateStatus) -> MayRevert { - match status { - CandidateStatus::Unverified => Ok(0u8), - CandidateStatus::Verified => Ok(1u8), - CandidateStatus::Banned => Ok(2u8), - } - } - - #[precompile::public("guardianIndexToInfo(uint256)")] - #[precompile::view] - fn guardian_index_to_info( - handle: &mut impl PrecompileHandle, - index: U256, - ) -> EvmResult { - // Storage item: GuardianIndex u128: - // Twox64Concat(8) + GuardianIndex(16) + InfoHash(32) + BlockNumber(4) + T::AccountId(32) + CandidateStatus(1) - handle.record_db_read::(93)?; - - let index: u128 = index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - if let Some((info_hash, update_block, guardian, status)) = - pallet_guardian::Pallet::::guardian_index_to_info(index) - { - let update_block: U256 = update_block.into(); - - let guardian: [u8; 32] = guardian.into(); - let guardian: H256 = guardian.into(); - - let status = Self::candidate_status_to_u8(status).in_field("candidateStatus")?; - - Ok(GuardianQueryResult { exist: true, info_hash, update_block, guardian, status }) - } else { - Ok(GuardianQueryResult { - exist: false, - info_hash: Default::default(), - update_block: Default::default(), - guardian: Default::default(), - status: Default::default(), - }) - } - } - - #[precompile::public("batchGuardianIndexToInfo(uint256,uint256)")] - #[precompile::view] - fn batch_guardian_index_to_info( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let length: u128 = end_id.checked_sub(start_id).ok_or(Into::::into( - RevertReason::value_is_too_large("id overflow"), - ))?; - // Storage item: GuardianIndex u128: - // Twox64Concat(8) + GuardianIndex(16) + InfoHash(32) + BlockNumber(4) + T::AccountId(32) + CandidateStatus(1) - let length_usize: usize = length.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - handle.record_db_read::(length_usize.saturating_mul(93_usize))?; - - let result = (start_id..end_id) - .map(|i| { - if let Some((info_hash, update_block, guardian, status)) = - pallet_guardian::Pallet::::guardian_index_to_info(i) - { - let update_block: U256 = update_block.into(); - - let guardian: [u8; 32] = guardian.into(); - let guardian: H256 = guardian.into(); - - let status: u8 = Self::candidate_status_to_u8(status).unwrap_or_default(); - - GuardianQueryResult { exist: true, info_hash, update_block, guardian, status } - } else { - GuardianQueryResult { - exist: false, - info_hash: Default::default(), - update_block: Default::default(), - guardian: Default::default(), - status: Default::default(), - } - } - }) - .collect(); - Ok(result) - } - - #[precompile::public("guardianVotes(bytes32,uint256)")] - #[precompile::view] - fn guardian_votes( - handle: &mut impl PrecompileHandle, - voter: H256, - guardian_index: U256, - ) -> EvmResult<(u8, U256)> { - // Storage item: GuardianIndex u128: - // 2 * Twox64Concat(8) + GuardianIndex(16) + T::AccountId(32) + GuardianVote(1) + ProposalIndex(16) - handle.record_db_read::(81)?; - - let voter = Runtime::AccountId::from(voter.into()); - - let guardian_index: u128 = guardian_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let result = Self::guardian_vote_to(pallet_guardian::Pallet::::guardian_votes( - voter, - guardian_index, - )) - .in_field("GuardianVote")?; - - Ok(result) - } -} - -#[derive(Default, Debug, solidity::Codec)] -struct GuardianQueryResult { - exist: bool, - info_hash: H256, - update_block: U256, - guardian: H256, - status: u8, -} diff --git a/parachain/precompiles/collab-ai/guardian/src/mock.rs b/parachain/precompiles/collab-ai/guardian/src/mock.rs deleted file mode 100644 index 1bda28496d..0000000000 --- a/parachain/precompiles/collab-ai/guardian/src/mock.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::*; -use frame_support::{construct_runtime, derive_impl, parameter_types, traits::ConstU64}; -use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; -use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::H160; -use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; - -pub type Balance = u128; -pub type AccountId = AccountId32; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Test { - System: frame_system, - Balances: pallet_balances, - Evm: pallet_evm, - Guardian: pallet_guardian, - Timestamp: pallet_timestamp, - } -); - -parameter_types! { - pub const MinimumGuardianDeposit: Balance = 10; -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] -impl frame_system::Config for Test { - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type AccountData = pallet_balances::AccountData; - type Lookup = IdentityLookup; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] -impl pallet_balances::Config for Test { - type Balance = Balance; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; -} - -// Implement pallet_guardian config trait for mock runtime. -impl pallet_guardian::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumGuardianDeposit = MinimumGuardianDeposit; - type GuardianJudgeOrigin = frame_system::EnsureRoot; -} - -// Setup EVM configuration -parameter_types! { - pub WeightPerGas: u64 = 1; -} - -impl pallet_evm::Config for Test { - type AccountProvider = pallet_evm::FrameSystemAccountProvider; - type FeeCalculator = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type CallOrigin = EnsureAddressRoot; - type WithdrawOrigin = EnsureAddressNever; - type AddressMapping = TruncatedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = GuardianMockPrecompile; - type PrecompilesValue = PrecompilesValue; - type ChainId = (); - type Timestamp = Timestamp; - type OnChargeTransaction = (); - type BlockGasLimit = (); - type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type FindAuthor = (); - type OnCreate = (); - type WeightInfo = (); - type GasLimitPovSizeRatio = ConstU64<4>; - type GasLimitStorageGrowthRatio = ConstU64<4>; -} - -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<1>; - type WeightInfo = (); -} - -pub struct TruncatedAddressMapping; -impl pallet_evm::AddressMapping for TruncatedAddressMapping { - fn into_account_id(address: H160) -> AccountId { - let mut data = [0u8; 32]; - data[0..20].copy_from_slice(&address[..]); - AccountId::from(Into::<[u8; 32]>::into(data)) - } -} - -pub type GuardianMockPrecompile = - PrecompileSetBuilder, GuardianPrecompile>,)>; - -parameter_types! { - pub PrecompilesValue: GuardianMockPrecompile = GuardianMockPrecompile::new(); -} - -// Helper function to initialize the test environment. -pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - // Add initial balances for the involved accounts - pallet_balances::GenesisConfig:: { - balances: vec![ - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1000)), 1_000_000), - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1001)), 1_000_000), - (TruncatedAddressMapping::into_account_id(H160::from_low_u64_be(1002)), 1_000_000), - ], - } - .assimilate_storage(&mut t) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} diff --git a/parachain/precompiles/collab-ai/guardian/src/tests.rs b/parachain/precompiles/collab-ai/guardian/src/tests.rs deleted file mode 100644 index 171620f1dd..0000000000 --- a/parachain/precompiles/collab-ai/guardian/src/tests.rs +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::mock::{RuntimeEvent, *}; -use pallet_collab_ai_common::GuardianVote; -use pallet_evm::AddressMapping; -use pallet_guardian::Event; -// use pallet_evm::AddressMapping::GuardianPrecompileCall; -use crate::GuardianPrecompileCall; -use precompile_utils::testing::PrecompileTesterExt; -use sp_core::{H160, H256, U256}; - -pub type PCall = GuardianPrecompileCall; - -#[test] -fn test_regist_guardian() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .expect_no_logs() - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Guardian(Event::GuardianRegisted { - guardian: TruncatedAddressMapping::into_account_id(guardian), - guardian_index: 1, - info_hash, - })); - }); -} - -#[test] -fn test_update_guardian() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - let updated_hash: H256 = H256::from([2u8; 32]); - - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::update_guardian { info_hash: updated_hash }, - ) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Guardian(Event::GuardianUpdated { - guardian: TruncatedAddressMapping::into_account_id(guardian), - guardian_index: 1, - info_hash: updated_hash, - })); - }); -} - -#[test] -fn test_clean_guardian() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - PrecompilesValue::get() - .prepare_test(guardian, H160::from_low_u64_be(1000), PCall::::clean_guardian {}) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Guardian(Event::GuardianCleaned { - guardian: TruncatedAddressMapping::into_account_id(guardian), - guardian_index: 1, - })); - }); -} - -#[test] -fn test_vote_for_guardian() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let voter: H160 = H160::from_low_u64_be(1002); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian first - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Ensure the guardian is successfully registered before proceeding - assert!(pallet_guardian::Pallet::::public_guardian_to_index( - TruncatedAddressMapping::into_account_id(guardian) - ) - .is_some()); - - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - // Cast the vote - PrecompilesValue::get() - .prepare_test( - voter, - H160::from_low_u64_be(1000), - PCall::::vote { - guardian: guardian_account, - status: 1, - potential_proposal_index: 1.into(), - }, - ) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Guardian(Event::VoteGuardian { - voter: TruncatedAddressMapping::into_account_id(voter), - guardian_index: 1, - guardian: TruncatedAddressMapping::into_account_id(guardian), - status: Some(GuardianVote::Aye), - })); - }); -} - -#[test] -fn test_remove_all_votes() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let voter: H160 = H160::from_low_u64_be(1002); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian first - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Ensure the guardian is successfully registered before proceeding - assert!(pallet_guardian::Pallet::::public_guardian_to_index( - TruncatedAddressMapping::into_account_id(guardian) - ) - .is_some()); - - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - // Cast a vote - PrecompilesValue::get() - .prepare_test( - voter, - H160::from_low_u64_be(1000), - PCall::::vote { - guardian: guardian_account, - status: 1, - potential_proposal_index: 1.into(), - }, - ) - .execute_returns(()); - - // Remove all votes - PrecompilesValue::get() - .prepare_test(voter, H160::from_low_u64_be(1000), PCall::::remove_all_votes {}) - .execute_returns(()); - - System::assert_last_event(RuntimeEvent::Guardian(Event::RemoveAllVote { - voter: TruncatedAddressMapping::into_account_id(voter), - })); - }); -} - -#[test] -fn test_public_guardian_count() { - new_test_ext().execute_with(|| { - // Initially, there should be no guardians - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::public_guardian_count {}, - ) - .execute_returns(U256::from(1)); // Provide expected result - - // Register a guardian to increase the count - let info_hash: H256 = H256::from([1u8; 32]); - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Check the guardian count again, should be 2 - PrecompilesValue::get() - .prepare_test( - H160::from_low_u64_be(1001), - H160::from_low_u64_be(1000), - PCall::::public_guardian_count {}, - ) - .execute_returns(U256::from(2)); - }); -} - -#[test] -fn test_public_guardian_to_index() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Query the guardian's index - - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::public_guardian_to_index { guardian: guardian_account }, - ) - .execute_returns((true, U256::from(1))); - }); -} - -#[test] -fn test_guardian_index_to_info() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Query the guardian info by index - - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::guardian_index_to_info { index: 1.into() }, - ) - .execute_returns(crate::GuardianQueryResult { - exist: true, - info_hash, - update_block: U256::from(1), - guardian: guardian_account, - status: 0u8, - }); - }); -} - -#[test] -fn test_guardian_votes() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let voter: H160 = H160::from_low_u64_be(1002); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Cast a vote for the guardian - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - PrecompilesValue::get() - .prepare_test( - voter, - H160::from_low_u64_be(1000), - PCall::::vote { - guardian: guardian_account, - status: 1, - potential_proposal_index: 0.into(), - }, - ) - .execute_returns(()); - - // Check the vote for the guardian - - let voter_account = TruncatedAddressMapping::into_account_id(voter); - let voter_account: [u8; 32] = voter_account.into(); - let voter_account: H256 = voter_account.into(); - PrecompilesValue::get() - .prepare_test( - voter, - H160::from_low_u64_be(1000), - PCall::::guardian_votes { voter: voter_account, guardian_index: 1.into() }, - ) - .execute_returns((1u8, U256::from(0))); // Aye vote - }); -} - -#[test] -fn test_batch_guardian_index_to_info() { - new_test_ext().execute_with(|| { - let guardian: H160 = H160::from_low_u64_be(1001); - let info_hash: H256 = H256::from([1u8; 32]); - - // Register the guardian - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::regist_guardian { info_hash }, - ) - .execute_returns(()); - - // Query the guardian info by index - - let guardian_account = TruncatedAddressMapping::into_account_id(guardian); - let guardian_account: [u8; 32] = guardian_account.into(); - let guardian_account: H256 = guardian_account.into(); - - PrecompilesValue::get() - .prepare_test( - guardian, - H160::from_low_u64_be(1000), - PCall::::batch_guardian_index_to_info { - start_id: 1.into(), - end_id: 2.into(), - }, - ) - .execute_returns(vec![crate::GuardianQueryResult { - exist: true, - info_hash, - update_block: U256::from(1), - guardian: guardian_account, - status: 0u8, - }]); - }); -} diff --git a/parachain/precompiles/collab-ai/investing-pool/Cargo.toml b/parachain/precompiles/collab-ai/investing-pool/Cargo.toml deleted file mode 100644 index 0ea9cc7830..0000000000 --- a/parachain/precompiles/collab-ai/investing-pool/Cargo.toml +++ /dev/null @@ -1,51 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = "pallet-evm-precompile-investing-pool" -version = '0.1.0' - -[dependencies] -precompile-utils = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-collab-ai-common = { workspace = true } -pallet-investing-pool = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } -serde = { workspace = true } -sha3 = { workspace = true } -precompile-utils = { workspace = true, features = ["std", "testing"] } -pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } -sp-runtime = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-collab-ai-common/std", - "pallet-evm/std", - "pallet-investing-pool/std", - "pallet-timestamp/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/parachain/precompiles/collab-ai/investing-pool/InvestingPool.sol b/parachain/precompiles/collab-ai/investing-pool/InvestingPool.sol deleted file mode 100644 index a6655d6063..0000000000 --- a/parachain/precompiles/collab-ai/investing-pool/InvestingPool.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -interface IInvestingPool { - - /// @notice Update epoch reward of pool - /// @param pool_proposal_index: Index of pool proposal - /// @param epoch: Epoch index - /// @param reward: Amount of total reward for epoch - /// @custom:selector 0xb712851b - /// updateReward(uint256,uint256,uint256) - function updateReward(uint256 pool_proposal_index, uint256 epoch, uint256 reward) external; - - /// @notice Claim both epoch reward and CAN token reward, will claim until the epoch where reward updated - /// @param asset_id: Token id of corresponding token - /// @param amount: Amount of token - /// @custom:selector 0xc3490263 - /// claim(uint256,uint256) - function claim(uint256 asset_id, uint256 amount) external; - - - /// @dev A structure for pool setting - struct PoolSetting { - uint256 start_time; - uint256 epoch; - uint256 epoch_range; - uint256 pool_cap; - bytes32 admin; - } - - /// @notice Claim both epoch reward and CAN token reward, will claim until the epoch where reward updated - /// @param pool_proposal_index: List of pool proposal index - /// @custom:selector 0xd3e557b6 - /// investingPoolSetting(uint256[]) - function investingPoolSetting(uint256[] calldata pool_proposal_index) external view returns (PoolSetting[] memory pool_setting); - - /// @dev A structure for recording epoch reward - struct EpochReward { - uint256 total_reward; - uint256 claimed_reward; - } - - /// @notice Query All epoch rewards updated by curator - /// @param pool_proposal_index: Pool proposal index - /// @custom:selector 0x25819dc7 - /// stableInvestingPoolEpochReward(uint256) - function stableInvestingPoolEpochReward(uint256 pool_proposal_index) external view returns (EpochReward[] memory epcoh_reward); -} \ No newline at end of file diff --git a/parachain/precompiles/collab-ai/investing-pool/src/lib.rs b/parachain/precompiles/collab-ai/investing-pool/src/lib.rs deleted file mode 100644 index e4ac634b89..0000000000 --- a/parachain/precompiles/collab-ai/investing-pool/src/lib.rs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::{PrecompileFailure, PrecompileHandle}; -use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_evm::AddressMapping; -use pallet_investing_pool::{AssetIdOf, BalanceOf}; - -use parity_scale_codec::MaxEncodedLen; -use precompile_utils::prelude::*; -use sp_runtime::traits::Dispatchable; - -use sp_core::{H256, U256}; -use sp_std::{marker::PhantomData, vec::Vec}; - -use pallet_collab_ai_common::{PoolProposalIndex, PoolSetting as InvestingPoolSetting}; - -pub struct InvestingPoolPrecompile(PhantomData); - -#[precompile_utils::precompile] -impl InvestingPoolPrecompile -where - Runtime: pallet_investing_pool::Config + pallet_evm::Config, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - ::RuntimeCall: - Dispatchable + GetDispatchInfo, - ::RuntimeCall: From>, - ::RuntimeOrigin: - From::AccountId>>, - <::RuntimeCall as Dispatchable>::RuntimeOrigin: - From>, - AssetIdOf: TryFrom + Into, - BlockNumberFor: TryFrom + Into, - BalanceOf: TryFrom + Into, -{ - #[precompile::public("updateReward(uint256,uint256,uint256)")] - fn update_reward( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - epoch: U256, - reward: U256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let pool_proposal_index: PoolProposalIndex = - pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let epoch: u128 = epoch.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("epoch type")) - })?; - - let reward: BalanceOf = reward.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_investing_pool::Call::::update_reward { - pool_id: pool_proposal_index, - epoch, - reward, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("claim(uint256,uint256)")] - fn claim(handle: &mut impl PrecompileHandle, asset_id: U256, amount: U256) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let asset_id: u128 = asset_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("asset type")) - })?; - - let amount: BalanceOf = amount.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_investing_pool::Call::::claim { asset_id, amount }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("investingPoolSetting(uint256[])")] - #[precompile::view] - fn investing_pool_setting( - handle: &mut impl PrecompileHandle, - pool_proposal_index: Vec, - ) -> EvmResult> { - // Storage item: PoolSetting - let length_usize: usize = pool_proposal_index.len(); - handle.record_db_read::( - InvestingPoolSetting::, BalanceOf>::max_encoded_len( - ) - .saturating_mul(length_usize), - )?; - - let mut setting_result = Vec::::new(); - - for index in pool_proposal_index.iter() { - let index_u128: PoolProposalIndex = (*index).try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // get underlying investings - if let Some(result) = - pallet_investing_pool::Pallet::::investing_pool_setting(index_u128) - { - let admin: [u8; 32] = result.admin.into(); - let admin = admin.into(); - setting_result.push(PoolSetting { - start_time: result.start_time.into(), - epoch: result.epoch.into(), - epoch_range: result.epoch_range.into(), - pool_cap: result.pool_cap.into(), - admin, - }); - } else { - setting_result.push(Default::default()); - } - } - - Ok(setting_result) - } - - #[precompile::public("stableInvestingPoolEpochReward(uint256)")] - #[precompile::view] - fn stable_investing_pool_epoch_reward( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - ) -> EvmResult> { - // Storage item: PoolSetting - handle.record_db_read::(InvestingPoolSetting::< - Runtime::AccountId, - BlockNumberFor, - BalanceOf, - >::max_encoded_len())?; - let mut reward_result = Vec::::new(); - let epoch: u128; - - let pool_proposal_index: PoolProposalIndex = - pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - if let Some(result) = - pallet_investing_pool::Pallet::::investing_pool_setting(pool_proposal_index) - { - epoch = result.epoch; - let length_usize: usize = epoch.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // Storage item: (BalanceOf, BalanceOf) - handle.record_db_read::(32 * length_usize)?; - } else { - return Ok(reward_result); - } - - for i in 1..(epoch + 1) { - if let Some(result) = - pallet_investing_pool::Pallet::::stable_investing_pool_epoch_reward( - pool_proposal_index, - i, - ) { - reward_result.push(EpochReward { - total_reward: result.0.into(), - claimed_reward: result.1.into(), - }); - } else { - // Until the first pending epoch - break; - } - } - Ok(reward_result) - } -} - -#[derive(Default, Debug, solidity::Codec)] -struct PoolSetting { - start_time: U256, - epoch: U256, - epoch_range: U256, - pool_cap: U256, - admin: H256, -} - -#[derive(Default, Debug, solidity::Codec)] -struct EpochReward { - total_reward: U256, - claimed_reward: U256, -} diff --git a/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml b/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml deleted file mode 100644 index c430377434..0000000000 --- a/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml +++ /dev/null @@ -1,51 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = "pallet-evm-precompile-pool-proposal" -version = '0.1.0' - -[dependencies] -precompile-utils = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-collab-ai-common = { workspace = true } -pallet-pool-proposal = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } -serde = { workspace = true } -sha3 = { workspace = true } -precompile-utils = { workspace = true, features = ["std", "testing"] } -pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } -sp-runtime = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-collab-ai-common/std", - "pallet-evm/std", - "pallet-pool-proposal/std", - "pallet-timestamp/std", - "precompile-utils/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/parachain/precompiles/collab-ai/pool-proposal/PoolProposal.sol b/parachain/precompiles/collab-ai/pool-proposal/PoolProposal.sol deleted file mode 100644 index 4e3c277242..0000000000 --- a/parachain/precompiles/collab-ai/pool-proposal/PoolProposal.sol +++ /dev/null @@ -1,174 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -interface IPoolProposal { - /// @dev A structure for bonding of curator's pool desposit - struct DepositBond { - uint256 owner; - uint256 amount; - } - - /// @dev A structure for bonding of user's official pre-staking - struct StakingBond { - uint256 poolIndex; - bytes32 owner; - uint256 amount; - } - - /// @dev A structure for bonding of user's queued pre-staking - struct QueuedStakingBond { - uint256 poolIndex; - bytes32 owner; - uint256 amount; - uint256 queuedTime; - } - - /// @dev A structure for proposal and its expiry time - struct PoolProposalStatus { - uint256 index; - uint256 expiryTime; - } - - /// @dev A strcuture for proposal details - struct PoolProposalInfo { - bool exist; - // Proposer/Curator - bytes32 proposer; - // Hash of pool info like legal files etc. - bytes32 infoHash; - // The maximum investing amount that the pool can handle - uint256 maxPoolSize; - // If proposal passed, when the investing pool will start, Block number - uint256 poolStartTime; - // If proposal passed, when the investing pool will end, Block number - uint256 poolEndTime; - // estimated APR, but in percentage form - // i.e. 100 => 100% - uint256 estimatedEpochReward; - // Proposal status flags - // /// Whether the pool proposal passing the committee/democracy voting. - // /// A valid pool must passing committee/public's audit procedure regarding legal files and other pool parameters. - // const PUBLIC_VOTE_PASSED = 0b0000_0001; - // /// - // /// Whether the minimum Investing amount proposed by curator is satisfied. - // /// Currently, a full size must be satisfied. - // /// Once a pool is satisfied this requirement, all Investing amount can no longer be withdrawed - // /// unless the pool is later denied passing by voting or until the end of pool maturity. - // /// Otherwise, the pool will be refunded. - // const STAKE_AMOUNT_PASSED = 0b0000_0010; - // /// - // /// Whether the pool guardian has been selected - // /// A valid pool must have guardian or a default one will be used (committee) - // const GUARDIAN_SELECTED = 0b0000_0100; - // /// - // /// Whether the proposal expired yet - // /// Has nothing to do with pool. Only related to proposal expired time - // const PROPOSAL_EXPIRED = 0b0000_1000; - uint8 proposalStatusFlags; - } - - /// @notice Propose an investing pool proposal - /// @param max_pool_size: At most this amount of raised money curator/investing pool willing to take - /// @param proposal_last_time: How does the proposal lasts for voting/preinvesting. - /// @param pool_last_time: How long does the investing pool last if passed - /// @param estimated_pool_reward: This number is only for displaying purpose without any techinical meaning - /// @param pool_info_hash: H256 hash of pool info for including pool details - /// @custom:selector 0x7bc55add - /// proposeInvestingPool(uint256,uint256,uint256,uint256,bytes32) - function proposeInvestingPool(uint256 max_pool_size, uint256 proposal_last_time, uint256 pool_last_time, uint256 estimated_pool_reward, bytes32 pool_info_hash) external; - - /// @notice Prestake the pool proposal - /// @param pool_proposal_index: Index of pool proposal - /// @param amount: Amount of per-staking user provides - /// @custom:selector 0x68e3a76c - /// preStakeProposal(uint256,uint256) - function preStakeProposal(uint256 pool_proposal_index, uint256 amount) external; - - /// @notice Withdrawal the prestaking the pool proposal - /// @param pool_proposal_index: Index of pool proposal - /// @param amount: Amount of per-staking user provides - /// @custom:selector 0x389cd4af - /// withdrawPreInvesting(uint256,uint256) - function withdrawPreInvesting(uint256 pool_proposal_index, uint256 amount) external; - - /// @notice A guardian declaring his incentive of participating pool - /// @param pool_proposal_index: Index of pool proposal - /// @custom:selector 0x619c08e2 - /// guardianParticipateProposal(uint256) - function guardianParticipateProposal(uint256 pool_proposal_index) external; - - /// @notice The next free Pool Proposal index, aka the number of pool proposed so far. - /// @custom:selector 0x1b9e695b - /// poolProposalCount() - function poolProposalCount() external view returns (uint256 next_proposal_index); - - /// @notice Query a curator's pool proposal deposit, bond owner = proposal index - /// @param curator: curator address, substrate - /// @custom:selector 0x87178c26 - /// poolProposalDepositOf(bytes32) - function poolProposalDepositOf(bytes32 curator) external view returns (DepositBond[] memory deposit_record); - - /// @notice Query all pending pool proposal and their schedule - /// @custom:selector 0x2f4f6b2a - /// pendingPoolProposalStatus() - function pendingPoolProposalStatus() external view returns (PoolProposalStatus[] memory proposal_status); - - /// @notice Query a single pool proposal and its detail, bool represents if such info exists - /// @param pool_proposal_index: Index of pool proposal - /// @custom:selector 0x18afd9ad - /// poolProposal(uint256) - function poolProposal(uint256 pool_proposal_index) external view returns (PoolProposalInfo memory proposal_info); - - /// @notice Query a batch of pool proposal and their details, bool represents if such info exists - /// @param start_id: Proposal index start_id, included - /// @param end_id: Proposal index end id, excluded - /// @custom:selector 0x1b3fb27c - /// batchPoolProposal(uint256,uint256) - function batchPoolProposal(uint256 start_id, uint256 end_id) external view returns (PoolProposalInfo[] memory proposal_info); - - /// @notice Batch query pool proposals and their existing included pre stakings - /// @param start_id: Proposal index start_id, included - /// @param end_id: Proposal index end id, excluded - /// @custom:selector 0x49dc251a - /// poolPreInvestings(uint256,uint256) - function poolPreInvestings(uint256 start_id, uint256 end_id) external view returns (StakingBond[] memory pre_investing_bond); - - /// @notice Batch query pool proposals and their queued pre stakings - /// @param start_id: Proposal index start_id, included - /// @param end_id: Proposal index end id, excluded - /// @custom:selector 0x201be573 - /// poolPreInvestingsQueued(uint256,uint256) - function poolPreInvestingsQueued(uint256 start_id, uint256 end_id) external view returns (QueuedStakingBond[] memory queued_bond); - - /// @notice Query a single pool proposal and its potential guardian detail - /// @param pool_proposal_index: Index of pool proposal - /// @custom:selector 0x6630e6ee - /// poolGuardian(uint256) - function poolGuardian(uint256 pool_proposal_index) external view returns (bytes32[] memory guardian); - - /// @notice Query a user's all invested positions - /// @param user_address: user address, substrate - /// @custom:selector 0x814f8437 - /// userPoolPreInvestings(bytes32) - function userPoolPreInvestings(bytes32 user_address) external view returns (StakingBond[] memory pre_investing_bond); - - /// @notice Query a user's all queued positions - /// @param user_address: user address, substrate - /// @custom:selector 0x64833a66 - /// userPoolPreInvestingsQueued(bytes32) - function userPoolPreInvestingsQueued(bytes32 user_address) external view returns (QueuedStakingBond[] memory queued_bond); - - /// @notice Query corresponding pool proposal index's total pre-investing amount - /// @param start_id: Proposal index start_id, included - /// @param end_id: Proposal index end id, excluded - /// @custom:selector 0x3a4fbb0f - /// poolPreInvestingsTotal(uint256,uint256) - function poolPreInvestingsTotal(uint256 start_id, uint256 end_id) external view returns (uint256[] memory pre_investing_total); - - /// @notice Query corresponding pool proposal index's total pre-investing queued amount - /// @param start_id: Proposal index start_id, included - /// @param end_id: Proposal index end id, excluded - /// @custom:selector 0xa54205c4 - /// poolPreInvestingsQueuedTotal(uint256,uint256) - function poolPreInvestingsQueuedTotal(uint256 start_id, uint256 end_id) external view returns (uint256[] memory queued_total); -} \ No newline at end of file diff --git a/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs b/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs deleted file mode 100644 index 2136870a54..0000000000 --- a/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs +++ /dev/null @@ -1,662 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::{PrecompileFailure, PrecompileHandle}; -use frame_support::{ - dispatch::{GetDispatchInfo, PostDispatchInfo}, - traits::Currency, -}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_evm::AddressMapping; -use pallet_pool_proposal::{ - AssetBalanceOf, Bond as PalletBond, PoolProposalInfo as PalletPoolProposalInfo, -}; -use parity_scale_codec::MaxEncodedLen; -use precompile_utils::prelude::*; -use sp_runtime::traits::Dispatchable; - -use sp_core::{Get, H256, U256}; -use sp_std::{marker::PhantomData, vec::Vec}; - -use pallet_collab_ai_common::PoolProposalIndex; - -pub struct PoolProposalPrecompile(PhantomData); - -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -#[precompile_utils::precompile] -impl PoolProposalPrecompile -where - Runtime: pallet_pool_proposal::Config + pallet_evm::Config, - Runtime::AccountId: From<[u8; 32]> + Into<[u8; 32]>, - ::RuntimeCall: - Dispatchable + GetDispatchInfo, - ::RuntimeCall: From>, - <::RuntimeCall as Dispatchable>::RuntimeOrigin: - From::AccountId>>, - <::RuntimeCall as Dispatchable>::RuntimeOrigin: - From>, - AssetBalanceOf: TryFrom + Into, - BlockNumberFor: TryFrom + Into, - BalanceOf: TryFrom + Into, -{ - #[precompile::public("proposeInvestingPool(uint256,uint256,uint256,uint256,bytes32)")] - fn propose_investing_pool( - handle: &mut impl PrecompileHandle, - max_pool_size: U256, - proposal_last_time: U256, - pool_last_time: U256, - estimated_pool_reward: U256, - pool_info_hash: H256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let max_pool_size: AssetBalanceOf = max_pool_size.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let proposal_last_time: BlockNumberFor = - proposal_last_time.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large( - "block number type", - )) - })?; - - let pool_last_time: BlockNumberFor = pool_last_time.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("block number type")) - })?; - - let estimated_pool_reward: AssetBalanceOf = - estimated_pool_reward.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_pool_proposal::Call::::propose_investing_pool { - max_pool_size, - proposal_last_time, - pool_last_time, - estimated_pool_reward, - pool_info_hash, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("preStakeProposal(uint256,uint256)")] - fn pre_stake_proposal( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - amount: U256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let pool_proposal_index: u128 = pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let amount: AssetBalanceOf = amount.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_pool_proposal::Call::::pre_stake_proposal { - pool_proposal_index, - amount, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("withdrawPreInvesting(uint256,uint256)")] - fn withdraw_pre_investing( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - amount: U256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let pool_proposal_index: u128 = pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let amount: AssetBalanceOf = amount.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("balance type")) - })?; - - let call = pallet_pool_proposal::Call::::withdraw_pre_investing { - pool_proposal_index, - amount, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("guardianParticipateProposal(uint256)")] - fn guardian_participate_proposal( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - ) -> EvmResult { - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - - let pool_proposal_index: u128 = pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let call = pallet_pool_proposal::Call::::guardian_participate_proposal { - pool_proposal_index, - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("poolProposalCount()")] - #[precompile::view] - fn pool_proposal_count(handle: &mut impl PrecompileHandle) -> EvmResult { - // Storage item: PoolProposalCount -> - // PoolProposalIndex (16) - handle.record_db_read::(16)?; - - let next_proposal_index: U256 = - pallet_pool_proposal::Pallet::::pool_proposal_count().into(); - Ok(next_proposal_index) - } - - #[precompile::public("poolProposalDepositOf(bytes32)")] - #[precompile::view] - fn pool_proposal_deposit_of( - handle: &mut impl PrecompileHandle, - curator: H256, - ) -> EvmResult> { - // Storage item: PoolProposalDepositOf -> - // OrderedSet>, T::MaximumPoolProposed> - handle.record_db_read::( - PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let curator: [u8; 32] = curator.into(); - let curator = Runtime::AccountId::from(curator); - - if let Some(result) = - pallet_pool_proposal::Pallet::::pool_proposal_deposit_of(curator) - { - Ok(result - .0 - .into_iter() - .map(|bond| DepositBond { owner: bond.owner.into(), amount: bond.amount.into() }) - .collect()) - } else { - Ok(Vec::new()) - } - } - - #[precompile::public("pendingPoolProposalStatus()")] - #[precompile::view] - fn pending_pool_proposal_status( - handle: &mut impl PrecompileHandle, - ) -> EvmResult> { - // Storage item: PendingPoolProposalStatus -> - // VecDeque> - // 16 * max number - handle.record_db_read::( - 16usize.saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let result = pallet_pool_proposal::Pallet::::pending_pool_proposal_status() - .into_iter() - .map(|status| PoolProposalStatus { - index: status.pool_proposal_index.into(), - expiry_time: status.proposal_expire_time.into(), - }) - .collect(); - - Ok(result) - } - - #[precompile::public("poolProposal(uint256)")] - #[precompile::view] - fn pool_proposal( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - ) -> EvmResult { - // Storage item: PoolProposal -> - // PoolProposalInfo, BlockNumberFor, T::AccountId> - handle.record_db_read::(PalletPoolProposalInfo::< - H256, - AssetBalanceOf, - BlockNumberFor, - Runtime::AccountId, - >::max_encoded_len())?; - - let pool_proposal_index: u128 = pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - if let Some(info) = - pallet_pool_proposal::Pallet::::pool_proposal(pool_proposal_index) - { - let proposer: [u8; 32] = info.proposer.into(); - let proposer = proposer.into(); - - Ok(PoolProposalInfo { - exist: true, - proposer, - info_hash: info.pool_info_hash, - max_pool_size: info.max_pool_size.into(), - pool_start_time: info.pool_start_time.into(), - pool_end_time: info.pool_end_time.into(), - estimated_pool_reward: info.estimated_pool_reward.into(), - proposal_status_flags: info.proposal_status_flags.bits(), - }) - } else { - Ok(PoolProposalInfo { - exist: false, - proposer: Default::default(), - info_hash: Default::default(), - max_pool_size: Default::default(), - pool_start_time: Default::default(), - pool_end_time: Default::default(), - estimated_pool_reward: Default::default(), - proposal_status_flags: Default::default(), - }) - } - } - - #[precompile::public("batchPoolProposal(uint256,uint256)")] - #[precompile::view] - fn batch_pool_proposal( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - let length: u128 = end_id.checked_sub(start_id).ok_or(Into::::into( - RevertReason::value_is_too_large("id overflow"), - ))?; - // Storage item: PoolProposal -> - // PoolProposalInfo, BlockNumberFor, T::AccountId> - let length_usize: usize = length.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - handle.record_db_read::( - PalletPoolProposalInfo::< - H256, - AssetBalanceOf, - BlockNumberFor, - Runtime::AccountId, - >::max_encoded_len() - .saturating_mul(length_usize), - )?; - - let result = (start_id..end_id) - .map(|i| { - if let Some(info) = pallet_pool_proposal::Pallet::::pool_proposal(i) { - let proposer: [u8; 32] = info.proposer.into(); - let proposer = proposer.into(); - - PoolProposalInfo { - exist: true, - proposer, - info_hash: info.pool_info_hash, - max_pool_size: info.max_pool_size.into(), - pool_start_time: info.pool_start_time.into(), - pool_end_time: info.pool_end_time.into(), - estimated_pool_reward: info.estimated_pool_reward.into(), - proposal_status_flags: info.proposal_status_flags.bits(), - } - } else { - PoolProposalInfo { - exist: false, - proposer: Default::default(), - info_hash: Default::default(), - max_pool_size: Default::default(), - pool_start_time: Default::default(), - pool_end_time: Default::default(), - estimated_pool_reward: Default::default(), - proposal_status_flags: Default::default(), - } - } - }) - .collect(); - - Ok(result) - } - - #[precompile::public("poolPreInvestings(uint256,uint256)")] - #[precompile::view] - fn pool_pre_investings( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - let mut bond_result = Vec::::new(); - for n in start_id..end_id { - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings(n) { - let bond_vec: Vec = result - .pre_investings - .into_iter() - .map(|bond| { - let owner: [u8; 32] = bond.owner.into(); - let owner = owner.into(); - StakingBond { pool_index: n.into(), owner, amount: bond.amount.into() } - }) - .collect(); - - bond_result.extend(bond_vec); - } - } - - Ok(bond_result) - } - - #[precompile::public("poolPreInvestingsQueued(uint256,uint256)")] - #[precompile::view] - fn pool_pre_investings_queued( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let mut bond_result = Vec::::new(); - for n in start_id..end_id { - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings(n) { - let bond_vec: Vec = result - .queued_pre_investings - .into_iter() - .map(|bond| { - let owner: [u8; 32] = bond.0.owner.into(); - let owner = owner.into(); - QueuedStakingBond { - pool_index: n.into(), - owner, - amount: bond.0.amount.into(), - queued_time: bond.1.into(), - } - }) - .collect(); - - bond_result.extend(bond_vec); - } - } - - Ok(bond_result) - } - - #[precompile::public("poolGuardian(uint256)")] - #[precompile::view] - fn pool_guardian( - handle: &mut impl PrecompileHandle, - pool_proposal_index: U256, - ) -> EvmResult> { - // Storage item: PoolGuardian -> - // OrderedSet - handle.record_db_read::( - 32usize.saturating_mul(Runtime::MaxGuardianPerProposal::get() as usize), - )?; - - let pool_proposal_index: u128 = pool_proposal_index.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - - if let Some(result) = - pallet_pool_proposal::Pallet::::pool_guardian(pool_proposal_index) - { - let guardian_vec = result - .0 - .into_iter() - .map(|guardian| { - let guardian: [u8; 32] = guardian.into(); - guardian.into() - }) - .collect(); - - Ok(guardian_vec) - } else { - Ok(Default::default()) - } - } - - #[precompile::public("userPoolPreInvestings(bytes32)")] - #[precompile::view] - fn user_pool_pre_investings( - handle: &mut impl PrecompileHandle, - user_address: H256, - ) -> EvmResult> { - // Storage item: PendingPoolProposalStatus -> - // VecDeque> - // 16 * max number - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - 16usize.saturating_mul(Runtime::MaximumPoolProposed::get() as usize) - + PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let user_address: [u8; 32] = user_address.into(); - let user_address = Runtime::AccountId::from(user_address); - - let mut bond_result = Vec::::new(); - - let pendings = pallet_pool_proposal::Pallet::::pending_pool_proposal_status(); - for pool_proposal_status in pendings.iter() { - // get underlying investings - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings( - pool_proposal_status.pool_proposal_index, - ) { - if let Some(bond) = - result.pre_investings.into_iter().find(|x| x.owner == user_address) - { - let owner: [u8; 32] = bond.owner.into(); - let owner = owner.into(); - bond_result.push(StakingBond { - pool_index: pool_proposal_status.pool_proposal_index.into(), - owner, - amount: bond.amount.into(), - }); - } - } - } - - Ok(bond_result) - } - - #[precompile::public("userPoolPreInvestingsQueued(bytes32)")] - #[precompile::view] - fn user_pool_pre_investings_queued( - handle: &mut impl PrecompileHandle, - user_address: H256, - ) -> EvmResult> { - // Storage item: PendingPoolProposalStatus -> - // VecDeque> - // 16 * max number - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - 16usize.saturating_mul(Runtime::MaximumPoolProposed::get() as usize) - + PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let user_address: [u8; 32] = user_address.into(); - let user_address = Runtime::AccountId::from(user_address); - - let mut bond_result = Vec::::new(); - - let pendings = pallet_pool_proposal::Pallet::::pending_pool_proposal_status(); - for pool_proposal_status in pendings.iter() { - // get underlying investings - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings( - pool_proposal_status.pool_proposal_index, - ) { - if let Some(bond) = - result.queued_pre_investings.into_iter().find(|x| x.0.owner == user_address) - { - let owner: [u8; 32] = bond.0.owner.into(); - let owner = owner.into(); - bond_result.push(QueuedStakingBond { - pool_index: pool_proposal_status.pool_proposal_index.into(), - owner, - amount: bond.0.amount.into(), - queued_time: bond.1.into(), - }); - } - } - } - - Ok(bond_result) - } - - #[precompile::public("poolPreInvestingsTotal(uint256,uint256)")] - #[precompile::view] - fn pool_pre_investings_total( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let mut total_vec_result = Vec::::new(); - for n in start_id..end_id { - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings(n) { - let total: U256 = result.total_pre_investing_amount.into(); - - total_vec_result.push(total); - } - } - - Ok(total_vec_result) - } - - #[precompile::public("poolPreInvestingsQueuedTotal(uint256,uint256)")] - #[precompile::view] - fn pool_pre_investings_queued_total( - handle: &mut impl PrecompileHandle, - start_id: U256, - end_id: U256, - ) -> EvmResult> { - let start_id: u128 = start_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - let end_id: u128 = end_id.try_into().map_err(|_| { - Into::::into(RevertReason::value_is_too_large("index type")) - })?; - // Storage item: PoolPreInvestings -> - // PoolProposalPreInvesting, BlockNumberFor, T::MaximumPoolProposed> - handle.record_db_read::( - PalletBond::>::max_encoded_len() - .saturating_mul(Runtime::MaximumPoolProposed::get() as usize), - )?; - - let mut total_vec_result = Vec::::new(); - for n in start_id..end_id { - if let Some(result) = pallet_pool_proposal::Pallet::::pool_pre_investings(n) { - let total: U256 = result.total_queued_amount.into(); - - total_vec_result.push(total); - } - } - - Ok(total_vec_result) - } -} - -#[derive(Default, Debug, solidity::Codec)] -pub struct DepositBond { - owner: U256, - amount: U256, -} - -#[derive(Default, Debug, solidity::Codec)] -pub struct StakingBond { - pool_index: U256, - owner: H256, - amount: U256, -} - -#[derive(Default, Debug, solidity::Codec)] -pub struct QueuedStakingBond { - pool_index: U256, - owner: H256, - amount: U256, - queued_time: U256, -} - -#[derive(Default, Debug, solidity::Codec)] -pub struct PoolProposalStatus { - index: U256, - expiry_time: U256, -} - -#[derive(Default, Debug, solidity::Codec)] -struct PoolProposalInfo { - exist: bool, - proposer: H256, - info_hash: H256, - max_pool_size: U256, - pool_start_time: U256, - pool_end_time: U256, - estimated_pool_reward: U256, - proposal_status_flags: u8, -} diff --git a/parachain/precompiles/omni-bridge/Cargo.toml b/parachain/precompiles/omni-bridge/Cargo.toml index 9af1582cbe..6382c4c6c3 100644 --- a/parachain/precompiles/omni-bridge/Cargo.toml +++ b/parachain/precompiles/omni-bridge/Cargo.toml @@ -6,13 +6,10 @@ version = '0.1.0' [dependencies] precompile-utils = { workspace = true } +sp-core = { workspace = true } frame-support = { workspace = true } -frame-system = { workspace = true } pallet-omni-bridge = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -29,26 +26,22 @@ serde = { workspace = true } sha3 = { workspace = true } precompile-utils = { workspace = true, features = ["std", "testing"] } pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ + "sp-core/std", "heima-primitives/std", "fp-evm/std", "frame-support/std", - "frame-system/std", "libsecp256k1/std", "pallet-omni-bridge/std", "pallet-evm/std", "pallet-timestamp/std", - "parity-scale-codec/std", "precompile-utils/std", - "scale-info/std", "serde/std", "sha3/std", - "sp-core/std", "sp-runtime/std", "sp-std/std", ] diff --git a/parachain/precompiles/vesting/Cargo.toml b/parachain/precompiles/vesting/Cargo.toml index a8d64068dc..536b4159be 100644 --- a/parachain/precompiles/vesting/Cargo.toml +++ b/parachain/precompiles/vesting/Cargo.toml @@ -6,13 +6,10 @@ version = '0.1.0' [dependencies] precompile-utils = { workspace = true } +sp-core = { workspace = true } frame-support = { workspace = true } -frame-system = { workspace = true } pallet-vesting = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -27,25 +24,21 @@ serde = { workspace = true } sha3 = { workspace = true } precompile-utils = { workspace = true, features = ["std", "testing"] } pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ + "sp-core/std", "fp-evm/std", "frame-support/std", - "frame-system/std", "libsecp256k1/std", "pallet-vesting/std", "pallet-evm/std", "pallet-timestamp/std", - "parity-scale-codec/std", "precompile-utils/std", - "scale-info/std", "serde/std", "sha3/std", - "sp-core/std", "sp-runtime/std", "sp-std/std", ] diff --git a/parachain/runtime/common/Cargo.toml b/parachain/runtime/common/Cargo.toml index fd9d5d0933..b64f50ad13 100644 --- a/parachain/runtime/common/Cargo.toml +++ b/parachain/runtime/common/Cargo.toml @@ -5,7 +5,6 @@ name = 'runtime-common' version = '0.1.0' [dependencies] -log = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } @@ -14,7 +13,6 @@ frame-system = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } sp-std = { workspace = true } pallet-assets = { workspace = true } @@ -29,7 +27,6 @@ pallet-treasury = { workspace = true } pallet-vesting = { workspace = true } cumulus-primitives-core = { workspace = true } -cumulus-primitives-parachain-inherent = { workspace = true } parachain-info = { workspace = true } pallet-xcm = { workspace = true } @@ -40,10 +37,8 @@ xcm-simulator = { workspace = true, optional = true } polkadot-core-primitives = { workspace = true } polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } polkadot-runtime-parachains = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true, optional = true } heima-primitives = { workspace = true } pallet-asset-manager = { workspace = true } pallet-extrinsic-filter = { workspace = true } @@ -56,11 +51,8 @@ default = ["std"] std = [ "heima-primitives/std", "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", - "cumulus-test-relay-sproof-builder/std", "frame-support/std", "frame-system/std", - "log/std", "pallet-asset-manager/std", "pallet-assets/std", "pallet-authorship/std", @@ -80,18 +72,16 @@ std = [ "parachain-info/std", "parity-scale-codec/std", "polkadot-core-primitives/std", - "polkadot-primitives/std", "polkadot-runtime-parachains/std", + "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-state-machine/std", "sp-std/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", "polkadot-parachain-primitives/std", - "scale-info/std", ] runtime-benchmarks = [ @@ -112,7 +102,6 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/parachain/runtime/heima/Cargo.toml b/parachain/runtime/heima/Cargo.toml index 311e6a3c17..d39cec281b 100644 --- a/parachain/runtime/heima/Cargo.toml +++ b/parachain/runtime/heima/Cargo.toml @@ -16,10 +16,8 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } -sp-debug-derive = { workspace = true, features = ["force-debug"], optional = true } sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } -sp-io = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } @@ -60,13 +58,11 @@ pallet-utility = { workspace = true } pallet-vesting = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } parachains-common = { workspace = true } @@ -83,7 +79,6 @@ frame-benchmarking = { workspace = true, optional = true } frame-system-benchmarking = { workspace = true, optional = true } heima-primitives = { workspace = true } -pallet-account-fix = { workspace = true } pallet-asset-manager = { workspace = true } pallet-bridge-transfer = { workspace = true } pallet-chain-bridge = { workspace = true } @@ -122,11 +117,8 @@ pallet-evm-precompile-vesting = { workspace = true } precompile-utils = { workspace = true } [dev-dependencies] -cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } -polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } runtime-common = { workspace = true, features = ["tests"] } -sp-state-machine = { workspace = true, features = ["std"] } xcm-simulator = { workspace = true } pallet-message-queue = { workspace = true, features = ["std"] } @@ -137,7 +129,6 @@ substrate-wasm-builder = { workspace = true, optional = true } default = ["std"] fast-runtime = [] runtime-benchmarks = [ - "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -147,7 +138,6 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-account-fix/runtime-benchmarks", "pallet-asset-manager/runtime-benchmarks", "pallet-assets-handler/runtime-benchmarks", "pallet-assets/runtime-benchmarks", @@ -185,7 +175,6 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "runtime-common/runtime-benchmarks", @@ -194,17 +183,16 @@ runtime-benchmarks = [ "xcm-executor/runtime-benchmarks", ] std = [ + "log/std", + "num_enum/std", "heima-primitives/std", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-session-benchmarking?/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", - "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "fp-evm/std", "fp-rpc/std", @@ -218,9 +206,6 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "hex?/std", - "log/std", - "num_enum/std", - "pallet-account-fix/std", "pallet-asset-manager/std", "pallet-assets-handler/std", "pallet-assets/std", @@ -277,25 +262,21 @@ std = [ "parachain-info/std", "parachains-common/std", "parity-scale-codec/std", + "scale-info/std", "polkadot-parachain-primitives/std", - "polkadot-primitives/std", "polkadot-runtime-common/std", "polkadot-runtime-parachains/std", "precompile-utils/std", 'runtime-common/std', - "scale-info/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", - "sp-debug-derive?/std", "sp-genesis-builder/std", "sp-inherents/std", - "sp-io/std", "sp-offchain/std", "sp-runtime/std", "sp-session/std", - "sp-state-machine/std", "sp-std/std", "sp-transaction-pool/std", "sp-version/std", @@ -306,7 +287,6 @@ std = [ ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", @@ -316,7 +296,6 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime", "hex", - "pallet-account-fix/try-runtime", "pallet-asset-manager/try-runtime", "pallet-assets-handler/try-runtime", "pallet-assets/try-runtime", @@ -358,6 +337,5 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "polkadot-runtime-parachains/try-runtime", "runtime-common/try-runtime", - "sp-debug-derive/std", "sp-runtime/try-runtime", ] diff --git a/parachain/runtime/paseo/Cargo.toml b/parachain/runtime/paseo/Cargo.toml index 837e6e65da..5f704cff04 100644 --- a/parachain/runtime/paseo/Cargo.toml +++ b/parachain/runtime/paseo/Cargo.toml @@ -17,7 +17,6 @@ sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } -sp-io = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } @@ -61,13 +60,11 @@ pallet-vesting = { workspace = true } pallet-whitelist = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } parachains-common = { workspace = true } @@ -84,7 +81,6 @@ frame-benchmarking = { workspace = true, optional = true } frame-system-benchmarking = { workspace = true, optional = true } heima-primitives = { workspace = true } -pallet-account-fix = { workspace = true } pallet-asset-manager = { workspace = true } pallet-assets = { workspace = true } pallet-assets-handler = { workspace = true } @@ -103,12 +99,6 @@ pallet-teebag = { workspace = true } pallet-vc-management = { workspace = true } runtime-common = { workspace = true } -pallet-aiusd-convertor = { workspace = true } -pallet-collab-ai-common = { workspace = true } -pallet-curator = { workspace = true } -pallet-guardian = { workspace = true } -pallet-investing-pool = { workspace = true } -pallet-pool-proposal = { workspace = true } fp-evm = { workspace = true } fp-rpc = { workspace = true } @@ -130,20 +120,12 @@ pallet-evm-precompile-parachain-staking = { workspace = true } pallet-evm-precompile-score-staking = { workspace = true } pallet-evm-precompile-vesting = { workspace = true } -pallet-evm-precompile-aiusd-convertor = { workspace = true } -pallet-evm-precompile-curator = { workspace = true } -pallet-evm-precompile-guardian = { workspace = true } -pallet-evm-precompile-investing-pool = { workspace = true } -pallet-evm-precompile-pool-proposal = { workspace = true } precompile-utils = { workspace = true } [dev-dependencies] -cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } -polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } runtime-common = { workspace = true, features = ["tests"] } -sp-state-machine = { workspace = true, features = ["std"] } xcm-simulator = { workspace = true } pallet-message-queue = { workspace = true, features = ["std"] } @@ -154,7 +136,6 @@ substrate-wasm-builder = { workspace = true, optional = true } default = ["std"] fast-runtime = [] runtime-benchmarks = [ - "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -164,7 +145,6 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-account-fix/runtime-benchmarks", "pallet-asset-manager/runtime-benchmarks", "pallet-assets-handler/runtime-benchmarks", "pallet-assets/runtime-benchmarks", @@ -207,34 +187,25 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "pallet-aiusd-convertor/runtime-benchmarks", - "pallet-collab-ai-common/runtime-benchmarks", - "pallet-curator/runtime-benchmarks", - "pallet-evm-precompile-aiusd-convertor/runtime-benchmarks", - "pallet-guardian/runtime-benchmarks", - "pallet-investing-pool/runtime-benchmarks", - "pallet-pool-proposal/runtime-benchmarks", "pallet-omni-bridge/runtime-benchmarks", ] std = [ + "log/std", + "num_enum/std", "heima-primitives/std", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-session-benchmarking?/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", - "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "fp-evm/std", "fp-rpc/std", @@ -247,9 +218,6 @@ std = [ "frame-metadata-hash-extension/std", "frame-system/std", "frame-try-runtime?/std", - "log/std", - "num_enum/std", - "pallet-account-fix/std", "pallet-asset-manager/std", "pallet-assets-handler/std", "pallet-assets/std", @@ -311,24 +279,21 @@ std = [ "parachain-info/std", "parachains-common/std", "parity-scale-codec/std", + "scale-info/std", "polkadot-parachain-primitives/std", - "polkadot-primitives/std", "polkadot-runtime-common/std", "polkadot-runtime-parachains/std", "precompile-utils/std", 'runtime-common/std', - "scale-info/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", "sp-genesis-builder/std", "sp-inherents/std", - "sp-io/std", "sp-offchain/std", "sp-runtime/std", "sp-session/std", - "sp-state-machine/std", "sp-std/std", "sp-transaction-pool/std", "sp-version/std", @@ -336,22 +301,10 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "pallet-aiusd-convertor/std", - "pallet-collab-ai-common/std", - "pallet-curator/std", - "pallet-evm-precompile-aiusd-convertor/std", - "pallet-evm-precompile-curator/std", - "pallet-evm-precompile-guardian/std", - "pallet-evm-precompile-investing-pool/std", - "pallet-evm-precompile-pool-proposal/std", - "pallet-guardian/std", - "pallet-investing-pool/std", - "pallet-pool-proposal/std", "pallet-omni-bridge/std", ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", @@ -360,7 +313,6 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime", - "pallet-account-fix/try-runtime", "pallet-asset-manager/try-runtime", "pallet-assets-handler/try-runtime", "pallet-assets/try-runtime", @@ -409,11 +361,5 @@ try-runtime = [ "polkadot-runtime-parachains/try-runtime", "runtime-common/try-runtime", "sp-runtime/try-runtime", - "pallet-aiusd-convertor/try-runtime", - "pallet-collab-ai-common/try-runtime", - "pallet-curator/try-runtime", - "pallet-guardian/try-runtime", - "pallet-investing-pool/try-runtime", - "pallet-pool-proposal/try-runtime", "pallet-omni-bridge/try-runtime", ] diff --git a/parachain/runtime/paseo/src/lib.rs b/parachain/runtime/paseo/src/lib.rs index abffae0a86..2af54c3649 100644 --- a/parachain/runtime/paseo/src/lib.rs +++ b/parachain/runtime/paseo/src/lib.rs @@ -54,8 +54,6 @@ use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; // for TEE pub use pallet_balances::Call as BalancesCall; -// for CollabAI -use pallet_collab_ai_common::EnsureSignedAndVerifiedCurator; use parachains_common::message_queue::NarrowOriginToSibling; use sp_api::impl_runtime_apis; @@ -66,8 +64,8 @@ pub use sp_runtime::BuildStorage; use sp_runtime::{ generic, impl_opaque_keys, traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, - DispatchInfoOf, Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, + AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, DispatchInfoOf, Dispatchable, + PostDispatchInfoOf, UniqueSaturatedInto, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, @@ -1245,87 +1243,6 @@ impl pallet_vc_management::Config for Runtime { type DelegateeAdminOrigin = EnsureRootOrAllCouncil; } -parameter_types! { - pub const MinimumCuratorDeposit: Balance = 100 * DOLLARS; - pub const MinimumGuardianDeposit: Balance = 20 * DOLLARS; - // Declare the official AIUSDAssetId - pub const AIUSDAssetId: u128 = 1000; - pub OfficialGapPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 10 * MINUTES, "ROCOCO_OFFICIALGAPPERIOD"); - pub MinimumProposalLastTime: BlockNumber = prod_or_fast!(30 * DAYS, 10 * MINUTES, "ROCOCO_MINIMUMPROPOSALLASTTIME"); - pub const MinimumPoolDeposit: Balance = 1000 * DOLLARS; - pub const MaximumPoolProposed: u32 = 10000; - pub const MaximumInvestingPerProposal: u32 = 100000; - pub StandardEpoch: BlockNumber = prod_or_fast!(30 * DAYS, 10 * MINUTES, "ROCOCO_STANDARDEPOCH"); - pub const MaxGuardianPerProposal: u32 = 1000; - pub const MaxGuardianSelectedPerProposal: u32 = 3; - - pub const PoolProposalPalletId: PalletId = PalletId(*b"cbai/ipp"); - pub PreInvestingPool: AccountId = PoolProposalPalletId::get().into_account_truncating(); -} - -impl pallet_curator::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumCuratorDeposit = MinimumCuratorDeposit; - type CuratorJudgeOrigin = EnsureRootOrHalfCouncil; -} - -impl pallet_guardian::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MinimumGuardianDeposit = MinimumGuardianDeposit; - type GuardianJudgeOrigin = - pallet_collective::EnsureMember; -} - -impl pallet_pool_proposal::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Fungibles = Assets; - type AIUSDAssetId = AIUSDAssetId; - type OfficialGapPeriod = OfficialGapPeriod; - type MinimumProposalLastTime = MinimumProposalLastTime; - type MinimumPoolDeposit = MinimumPoolDeposit; - type MaximumPoolProposed = MaximumPoolProposed; - type MaximumInvestingPerProposal = MaximumInvestingPerProposal; - type StandardEpoch = StandardEpoch; - type ProposalOrigin = EnsureSignedAndVerifiedCurator; - type PublicVotingOrigin = EnsureRootOrAllCouncil; - type GuardianVoteResource = Guardian; - type MaxGuardianPerProposal = MaxGuardianPerProposal; - type MaxGuardianSelectedPerProposal = MaxGuardianSelectedPerProposal; - type PreInvestingPool = PreInvestingPool; - type InvestmentInjector = InvestingPool; -} - -parameter_types! { - pub const StableTokenBeneficiaryId: PalletId = PalletId(*b"cbai/sid"); - pub const CANBeneficiaryId: PalletId = PalletId(*b"cbai/nid"); -} - -impl pallet_investing_pool::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PoolProposalPalletOrigin = EnsureRoot; - // Equal to Proposal's admin is judged inside pallet - type RewardUpdateOrigin = EnsureSignedAndVerifiedCurator; - type InvestingPoolAdminOrigin = EnsureRoot; - type Fungibles = Assets; - type StableTokenBeneficiaryId = StableTokenBeneficiaryId; - type CANBeneficiaryId = CANBeneficiaryId; -} - -parameter_types! { - pub const AIUSDConvertorPalletId: PalletId = PalletId(*b"cbai/scv"); - pub ConvertingPool: AccountId = AIUSDConvertorPalletId::get().into_account_truncating(); -} - -impl pallet_aiusd_convertor::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ConvertingPool = ConvertingPool; - type AIUSDAssetId = AIUSDAssetId; - type ManagerOrigin = EnsureRoot; -} - parameter_types! { pub const DefaultYearlyInflation: Perbill = Perbill::from_perthousand(5); } @@ -1437,13 +1354,6 @@ construct_runtime! { EVM: pallet_evm = 120, Ethereum: pallet_ethereum = 121, - // CollabAI - Curator: pallet_curator = 150, - Guardian: pallet_guardian = 151, - PoolProposal: pallet_pool_proposal = 152, - InvestingPool: pallet_investing_pool = 153, - AIUSDConvertor: pallet_aiusd_convertor = 154, - // OpenGov ConvictionVoting: pallet_conviction_voting = 170, Referenda: pallet_referenda = 171, @@ -1547,13 +1457,7 @@ impl Contains for NormalModeFilter { RuntimeCall::EvmAssertions(_) | RuntimeCall::ScoreStaking(_) | RuntimeCall::OmniAccount(_) | - RuntimeCall::OmniBridge(_) | - // CollabAI - RuntimeCall::Curator(_) | - RuntimeCall::Guardian(_) | - RuntimeCall::PoolProposal(_) | - RuntimeCall::InvestingPool(_) | - RuntimeCall::AIUSDConvertor(_) + RuntimeCall::OmniBridge(_) ) } } diff --git a/parachain/runtime/paseo/src/precompiles.rs b/parachain/runtime/paseo/src/precompiles.rs index e12c111131..9a3e43609a 100644 --- a/parachain/runtime/paseo/src/precompiles.rs +++ b/parachain/runtime/paseo/src/precompiles.rs @@ -39,13 +39,6 @@ use pallet_evm_precompile_vesting::VestingPrecompile; use precompile_utils::precompile_set::*; use sp_std::fmt::Debug; -// CollabAI -use pallet_evm_precompile_aiusd_convertor::AIUSDConvertorPrecompile; -use pallet_evm_precompile_curator::CuratorPrecompile; -use pallet_evm_precompile_guardian::GuardianPrecompile; -use pallet_evm_precompile_investing_pool::InvestingPoolPrecompile; -use pallet_evm_precompile_pool_proposal::PoolProposalPrecompile; - /// The asset precompile address prefix. Addresses that match against this prefix will be routed /// to Erc20AssetsPrecompileSet pub const ASSET_PRECOMPILE_ADDRESS_PREFIX: &[u8] = &[255u8; 4]; @@ -156,36 +149,6 @@ pub type PrecompilesSetAt = ( OmniBridgePrecompile, (CallableByContract, CallableByPrecompile), >, - // Curator: pallet_curator = 150 + 20480 - PrecompileAt< - AddressU64<20630>, - CuratorPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // Guardian: pallet_guardian = 151 + 20480 - PrecompileAt< - AddressU64<20631>, - GuardianPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // PoolProposal: pallet_pool_proposal = 152 + 20480 - PrecompileAt< - AddressU64<20632>, - PoolProposalPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // InvestingPool: pallet_investing_pool = 153 + 20480 - PrecompileAt< - AddressU64<20633>, - InvestingPoolPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // AIUSDConvertor: pallet_aiusd_convertor = 154 + 20480 - PrecompileAt< - AddressU64<20634>, - AIUSDConvertorPrecompile, - (CallableByContract, CallableByPrecompile), - >, ); pub type RococoNetworkPrecompiles = PrecompileSetBuilder< @@ -194,7 +157,7 @@ pub type RococoNetworkPrecompiles = PrecompileSetBuilder< // Skip precompiles if out of range. PrecompilesInRangeInclusive< // We take range as last precompile index, UPDATE this once new prcompile is added - (AddressU64<1>, AddressU64<20634>), + (AddressU64<1>, AddressU64<20565>), PrecompilesSetAt, >, // Prefixed precompile sets (XC20)