diff --git a/Cargo.lock b/Cargo.lock index d73ea692f..4182b63f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -939,7 +939,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hash-db", "log", @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" version = "0.6.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -2032,7 +2032,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "clap 4.5.4", "parity-scale-codec", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -2072,7 +2072,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-client-collator", @@ -2114,7 +2114,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -2143,7 +2143,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "anyhow", "async-trait", @@ -2158,7 +2158,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -2181,7 +2181,7 @@ dependencies = [ [[package]] name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2205,7 +2205,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2229,7 +2229,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2266,7 +2266,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -2284,7 +2284,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2319,7 +2319,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -2330,7 +2330,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2346,7 +2346,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -2371,7 +2371,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2385,7 +2385,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2402,7 +2402,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2419,7 +2419,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.2.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "sp-externalities", "sp-runtime-interface", @@ -2429,7 +2429,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "futures", @@ -2442,7 +2442,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2486,7 +2486,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2504,7 +2504,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "async-trait", @@ -2546,7 +2546,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2585,7 +2585,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -3761,7 +3761,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "12.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", ] @@ -3877,7 +3877,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-support-procedural", @@ -3902,7 +3902,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "32.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "Inflector", "array-bytes 6.2.2", @@ -3952,7 +3952,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -3963,7 +3963,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3980,7 +3980,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "aquamarine 0.3.3", "frame-support", @@ -4011,7 +4011,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "docify", @@ -4026,7 +4026,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.35.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "indicatif", @@ -4048,7 +4048,7 @@ dependencies = [ [[package]] name = "frame-support" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "aquamarine 0.5.0", "array-bytes 6.2.2", @@ -4089,7 +4089,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "23.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "Inflector", "cfg-expr", @@ -4108,7 +4108,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "10.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", @@ -4120,7 +4120,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro2", "quote", @@ -4130,7 +4130,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cfg-if", "docify", @@ -4150,7 +4150,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4165,7 +4165,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "sp-api", @@ -4174,7 +4174,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "parity-scale-codec", @@ -4754,7 +4754,7 @@ dependencies = [ [[package]] name = "hydra-dx-math" -version = "8.2.0" +version = "8.3.0" dependencies = [ "approx", "criterion", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "hydradx-adapters" -version = "1.3.9" +version = "1.3.10" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -4897,7 +4897,8 @@ dependencies = [ "pallet-referrals", "pallet-route-executor", "pallet-stableswap", - "pallet-staking 4.0.1", + "pallet-staking 4.0.2", + "pallet-support", "pallet-transaction-multi-payment", "pallet-uniques", "pallet-xyk", @@ -4918,7 +4919,7 @@ dependencies = [ [[package]] name = "hydradx-runtime" -version = "277.0.0" +version = "278.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -5009,8 +5010,9 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-stableswap", - "pallet-staking 4.0.1", + "pallet-staking 4.0.2", "pallet-state-trie-migration", + "pallet-support", "pallet-timestamp", "pallet-tips", "pallet-transaction-multi-payment", @@ -5062,7 +5064,7 @@ dependencies = [ [[package]] name = "hydradx-traits" -version = "3.10.0" +version = "3.11.0" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6601,7 +6603,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "log", @@ -6620,7 +6622,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7503,7 +7505,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-asset-conversion" version = "10.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7522,7 +7524,7 @@ dependencies = [ [[package]] name = "pallet-asset-rate" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7565,7 +7567,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7583,7 +7585,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "29.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7599,7 +7601,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -7616,7 +7618,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -7632,7 +7634,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -7646,7 +7648,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7670,7 +7672,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "aquamarine 0.5.0", "docify", @@ -7692,7 +7694,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -7708,7 +7710,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -7728,7 +7730,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", @@ -7777,7 +7779,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7795,7 +7797,7 @@ dependencies = [ [[package]] name = "pallet-broker" version = "0.6.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "frame-benchmarking", @@ -7814,7 +7816,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7832,7 +7834,7 @@ dependencies = [ [[package]] name = "pallet-circuit-breaker" -version = "1.1.27" +version = "1.1.28" dependencies = [ "frame-benchmarking", "frame-support", @@ -7843,6 +7845,7 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-omnipool", + "pallet-support", "parity-scale-codec", "pretty_assertions", "scale-info", @@ -7904,7 +7907,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "9.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7924,7 +7927,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -7941,7 +7944,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7988,7 +7991,7 @@ dependencies = [ [[package]] name = "pallet-dca" -version = "1.6.4" +version = "1.7.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8007,6 +8010,7 @@ dependencies = [ "pallet-ema-oracle", "pallet-omnipool", "pallet-route-executor", + "pallet-support", "pallet-xyk", "parity-scale-codec", "pretty_assertions", @@ -8048,7 +8052,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8136,7 +8140,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8159,7 +8163,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8173,7 +8177,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8380,7 +8384,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -8417,7 +8421,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8440,7 +8444,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8457,7 +8461,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8477,7 +8481,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8493,7 +8497,7 @@ dependencies = [ [[package]] name = "pallet-lbp" -version = "4.8.6" +version = "4.10.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8502,6 +8506,7 @@ dependencies = [ "hydradx-traits", "orml-tokens", "orml-traits", + "pallet-support", "parity-scale-codec", "primitive-types", "proptest", @@ -8518,7 +8523,7 @@ dependencies = [ [[package]] name = "pallet-liquidation" -version = "1.0.1" +version = "1.0.2" dependencies = [ "ethabi", "evm", @@ -8540,6 +8545,7 @@ dependencies = [ "pallet-evm-accounts", "pallet-omnipool", "pallet-route-executor", + "pallet-support", "parity-scale-codec", "parking_lot 0.12.3", "pretty_assertions", @@ -8555,7 +8561,7 @@ dependencies = [ [[package]] name = "pallet-liquidity-mining" -version = "4.4.4" +version = "4.4.5" dependencies = [ "fixed", "frame-support", @@ -8567,6 +8573,7 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "pretty_assertions", + "primitives", "proptest", "rand 0.8.5", "scale-info", @@ -8581,7 +8588,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8598,7 +8605,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "31.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "environmental", "frame-benchmarking", @@ -8618,7 +8625,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8636,7 +8643,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8672,7 +8679,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8688,7 +8695,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "25.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -8707,7 +8714,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8727,7 +8734,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "23.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8738,7 +8745,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -8755,7 +8762,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8778,7 +8785,7 @@ dependencies = [ [[package]] name = "pallet-omnipool" -version = "4.3.7" +version = "4.5.0" dependencies = [ "bitflags 1.3.2", "frame-benchmarking", @@ -8791,6 +8798,7 @@ dependencies = [ "orml-tokens", "orml-traits", "pallet-balances", + "pallet-support", "parity-scale-codec", "pretty_assertions", "primitive-types", @@ -8801,11 +8809,12 @@ dependencies = [ "sp-runtime", "sp-std", "sp-tracing", + "test-utils", ] [[package]] name = "pallet-omnipool-liquidity-mining" -version = "2.5.0" +version = "2.5.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8819,6 +8828,7 @@ dependencies = [ "pallet-ema-oracle", "pallet-liquidity-mining", "pallet-omnipool", + "pallet-support", "parity-scale-codec", "pretty_assertions", "primitive-types", @@ -8833,7 +8843,7 @@ dependencies = [ [[package]] name = "pallet-otc" -version = "2.0.4" +version = "2.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8841,6 +8851,7 @@ dependencies = [ "hydradx-traits", "orml-tokens", "orml-traits", + "pallet-support", "parity-scale-codec", "pretty_assertions", "proptest", @@ -8855,7 +8866,7 @@ dependencies = [ [[package]] name = "pallet-otc-settlements" -version = "1.0.6" +version = "1.1.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8871,6 +8882,7 @@ dependencies = [ "pallet-omnipool", "pallet-otc", "pallet-route-executor", + "pallet-support", "parity-scale-codec", "parking_lot 0.12.3", "pretty_assertions", @@ -8888,7 +8900,7 @@ dependencies = [ [[package]] name = "pallet-parameters" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -8906,7 +8918,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8923,7 +8935,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8938,7 +8950,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8957,7 +8969,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8972,7 +8984,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8990,7 +9002,7 @@ dependencies = [ [[package]] name = "pallet-referrals" -version = "1.2.7" +version = "1.2.8" dependencies = [ "frame-benchmarking", "frame-support", @@ -9027,7 +9039,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "4.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -9041,7 +9053,7 @@ dependencies = [ [[package]] name = "pallet-route-executor" -version = "2.6.3" +version = "2.7.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9053,8 +9065,10 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-currencies", + "pallet-support", "parity-scale-codec", "pretty_assertions", + "primitives", "scale-info", "serde", "sp-core", @@ -9067,7 +9081,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -9085,7 +9099,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -9107,7 +9121,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9124,7 +9138,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9141,7 +9155,7 @@ dependencies = [ [[package]] name = "pallet-stableswap" -version = "4.1.1" +version = "4.1.2" dependencies = [ "bitflags 1.3.2", "frame-benchmarking", @@ -9151,7 +9165,9 @@ dependencies = [ "hydradx-traits", "orml-tokens", "orml-traits", + "pallet-support", "parity-scale-codec", + "pretty_assertions", "proptest", "scale-info", "serde", @@ -9166,7 +9182,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "4.0.1" +version = "4.0.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -9193,7 +9209,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9216,7 +9232,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -9227,7 +9243,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "19.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "log", "sp-arithmetic", @@ -9236,7 +9252,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "14.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "sp-api", @@ -9246,7 +9262,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9263,7 +9279,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -9276,10 +9292,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-support" +version = "1.0.0" +dependencies = [ + "frame-support", + "frame-system", + "hydradx-traits", + "log", + "parity-scale-codec", + "primitives", + "scale-info", + "serde", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", +] + [[package]] name = "pallet-timestamp" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -9299,7 +9334,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9317,7 +9352,7 @@ dependencies = [ [[package]] name = "pallet-transaction-multi-payment" -version = "10.1.3" +version = "10.1.4" dependencies = [ "frame-support", "frame-system", @@ -9367,7 +9402,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -9383,7 +9418,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "30.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -9399,7 +9434,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -9411,7 +9446,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "frame-benchmarking", @@ -9430,7 +9465,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9445,11 +9480,12 @@ dependencies = [ [[package]] name = "pallet-utility" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-core", @@ -9461,7 +9497,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9476,7 +9512,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9491,7 +9527,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -9515,7 +9551,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9533,7 +9569,7 @@ dependencies = [ [[package]] name = "pallet-xyk" -version = "6.6.3" +version = "6.7.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9544,6 +9580,7 @@ dependencies = [ "orml-tokens", "orml-traits", "pallet-asset-registry", + "pallet-support", "parity-scale-codec", "primitive-types", "proptest", @@ -9585,7 +9622,7 @@ dependencies = [ [[package]] name = "parachains-common" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -9957,7 +9994,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "futures", @@ -9977,7 +10014,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "always-assert", "futures", @@ -9993,7 +10030,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "derive_more", "fatality", @@ -10016,7 +10053,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "fatality", @@ -10039,7 +10076,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cfg-if", "clap 4.5.4", @@ -10067,7 +10104,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "fatality", @@ -10089,7 +10126,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -10101,7 +10138,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "derive_more", "fatality", @@ -10126,7 +10163,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -10140,7 +10177,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "futures-timer", @@ -10162,7 +10199,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "always-assert", "async-trait", @@ -10185,7 +10222,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "parity-scale-codec", @@ -10203,7 +10240,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "derive_more", @@ -10236,7 +10273,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "futures", @@ -10258,7 +10295,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "fatality", @@ -10278,7 +10315,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "polkadot-node-subsystem", @@ -10293,7 +10330,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -10314,7 +10351,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "polkadot-node-metrics", @@ -10328,7 +10365,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "futures-timer", @@ -10345,7 +10382,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "fatality", "futures", @@ -10364,7 +10401,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -10381,7 +10418,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" version = "6.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "fatality", @@ -10398,7 +10435,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "fatality", @@ -10416,7 +10453,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "always-assert", "array-bytes 6.2.2", @@ -10445,7 +10482,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "polkadot-node-primitives", @@ -10461,7 +10498,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cpu-time", "futures", @@ -10487,7 +10524,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "polkadot-node-metrics", @@ -10502,7 +10539,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "lazy_static", "log", @@ -10521,7 +10558,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bs58 0.5.0", "futures", @@ -10540,7 +10577,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -10566,7 +10603,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "bounded-vec", @@ -10589,7 +10626,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -10599,7 +10636,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "bitvec", @@ -10628,7 +10665,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "derive_more", @@ -10663,7 +10700,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -10685,7 +10722,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "6.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bounded-collections", "derive_more", @@ -10702,7 +10739,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "hex-literal", @@ -10729,7 +10766,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -10762,7 +10799,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitvec", "frame-benchmarking", @@ -10813,7 +10850,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bs58 0.5.0", "frame-benchmarking", @@ -10826,7 +10863,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10875,7 +10912,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "frame-benchmarking", @@ -10993,7 +11030,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -11016,7 +11053,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -12072,7 +12109,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "binary-merkle-tree", "bitvec", @@ -12173,7 +12210,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "polkadot-primitives", @@ -12243,7 +12280,7 @@ dependencies = [ [[package]] name = "runtime-integration-tests" -version = "1.26.0" +version = "1.27.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -12315,7 +12352,8 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-stableswap", - "pallet-staking 4.0.1", + "pallet-staking 4.0.2", + "pallet-support", "pallet-timestamp", "pallet-tips", "pallet-transaction-multi-payment", @@ -12379,7 +12417,7 @@ dependencies = [ "pallet-asset-registry", "pallet-omnipool", "pallet-stableswap", - "pallet-staking 4.0.1", + "pallet-staking 4.0.2", "primitives", "scraper", "serde", @@ -12643,7 +12681,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "23.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "log", "sp-core", @@ -12654,7 +12692,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -12685,7 +12723,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "futures-timer", @@ -12707,7 +12745,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "sp-api", @@ -12722,7 +12760,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "docify", @@ -12749,7 +12787,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -12760,7 +12798,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.36.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "chrono", @@ -12801,7 +12839,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "fnv", "futures", @@ -12828,7 +12866,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.35.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hash-db", "kvdb", @@ -12854,7 +12892,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -12879,7 +12917,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -12908,7 +12946,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "fork-tree", @@ -12944,7 +12982,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "jsonrpsee", @@ -12966,7 +13004,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -13003,7 +13041,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "jsonrpsee", @@ -13022,7 +13060,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "fork-tree", "parity-scale-codec", @@ -13035,7 +13073,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.19.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ahash 0.8.6", "array-bytes 6.2.2", @@ -13079,7 +13117,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.19.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "finality-grandpa", "futures", @@ -13099,7 +13137,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -13122,7 +13160,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.32.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -13145,7 +13183,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.29.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "polkavm", "sc-allocator", @@ -13158,7 +13196,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.29.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "log", "polkavm", @@ -13169,7 +13207,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.29.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "anyhow", "cfg-if", @@ -13187,7 +13225,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ansi_term", "futures", @@ -13204,7 +13242,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "25.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "parking_lot 0.12.3", @@ -13218,7 +13256,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.4.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", @@ -13247,7 +13285,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -13298,7 +13336,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -13316,7 +13354,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ahash 0.8.6", "futures", @@ -13336,7 +13374,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -13357,7 +13395,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -13394,7 +13432,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "futures", @@ -13414,7 +13452,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.10.0-dev" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bs58 0.4.0", "libp2p-identity", @@ -13428,7 +13466,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "bytes", @@ -13463,7 +13501,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.17.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -13472,7 +13510,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "jsonrpsee", @@ -13504,7 +13542,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -13524,7 +13562,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "governor", @@ -13542,7 +13580,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "futures", @@ -13574,7 +13612,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.35.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "directories", @@ -13638,7 +13676,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.30.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "log", "parity-scale-codec", @@ -13649,7 +13687,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.16.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "clap 4.5.4", "fs4", @@ -13662,7 +13700,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -13681,7 +13719,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "derive_more", "futures", @@ -13702,7 +13740,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "15.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "chrono", "futures", @@ -13722,7 +13760,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ansi_term", "chrono", @@ -13752,7 +13790,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -13763,7 +13801,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -13790,7 +13828,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -13806,7 +13844,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "14.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-channel 1.9.0", "futures", @@ -14345,7 +14383,7 @@ dependencies = [ [[package]] name = "slot-range-helper" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "enumn", "parity-scale-codec", @@ -14539,7 +14577,7 @@ dependencies = [ [[package]] name = "sp-api" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hash-db", "log", @@ -14561,7 +14599,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "15.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "Inflector", "blake2 0.10.6", @@ -14575,7 +14613,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "30.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -14588,7 +14626,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "23.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "integer-sqrt", @@ -14621,7 +14659,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -14633,7 +14671,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "sp-api", "sp-inherents", @@ -14643,7 +14681,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "futures", "log", @@ -14661,7 +14699,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.32.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "futures", @@ -14676,7 +14714,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.32.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "parity-scale-codec", @@ -14692,7 +14730,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.32.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "parity-scale-codec", @@ -14710,7 +14748,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "lazy_static", "parity-scale-codec", @@ -14730,7 +14768,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "finality-grandpa", "log", @@ -14747,7 +14785,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.32.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -14758,7 +14796,7 @@ dependencies = [ [[package]] name = "sp-core" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "bandersnatch_vrfs", @@ -14825,7 +14863,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "blake2b_simd", "byteorder", @@ -14838,7 +14876,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "quote", "sp-crypto-hashing", @@ -14848,7 +14886,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -14857,7 +14895,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "proc-macro2", "quote", @@ -14867,7 +14905,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "environmental", "parity-scale-codec", @@ -14877,7 +14915,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.8.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -14889,7 +14927,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -14902,7 +14940,7 @@ dependencies = [ [[package]] name = "sp-io" version = "30.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bytes", "ed25519-dalek 2.1.0", @@ -14928,7 +14966,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "31.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "sp-core", "sp-runtime", @@ -14938,7 +14976,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.34.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -14949,7 +14987,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "thiserror", "zstd 0.12.4", @@ -14958,7 +14996,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.6.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -14968,7 +15006,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.4.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -14979,7 +15017,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -14996,7 +15034,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -15009,7 +15047,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "sp-api", "sp-core", @@ -15019,7 +15057,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "backtrace", "lazy_static", @@ -15029,7 +15067,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "rustc-hash", "serde", @@ -15039,7 +15077,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "docify", "either", @@ -15063,7 +15101,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -15082,7 +15120,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "Inflector", "expander 2.0.0", @@ -15095,7 +15133,7 @@ dependencies = [ [[package]] name = "sp-session" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "scale-info", @@ -15109,7 +15147,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -15122,7 +15160,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.35.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hash-db", "log", @@ -15142,7 +15180,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "10.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.1", @@ -15166,12 +15204,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -15183,7 +15221,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "parity-scale-codec", @@ -15195,7 +15233,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "tracing", @@ -15206,7 +15244,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "sp-api", "sp-runtime", @@ -15215,7 +15253,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "26.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "parity-scale-codec", @@ -15229,7 +15267,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "ahash 0.8.6", "hash-db", @@ -15252,7 +15290,7 @@ dependencies = [ [[package]] name = "sp-version" version = "29.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -15269,7 +15307,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "13.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -15280,7 +15318,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -15292,7 +15330,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -15369,7 +15407,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-parachain-info" version = "0.7.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -15383,7 +15421,7 @@ dependencies = [ [[package]] name = "staging-xcm" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "bounded-collections", @@ -15401,7 +15439,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "frame-system", @@ -15423,7 +15461,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "environmental", "frame-benchmarking", @@ -15580,7 +15618,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.4.7" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -15605,12 +15643,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" [[package]] name = "substrate-frame-rpc-system" version = "28.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -15629,7 +15667,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "hyper", "log", @@ -15641,7 +15679,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.33.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "async-trait", "jsonrpsee", @@ -15654,7 +15692,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "27.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -15671,7 +15709,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "17.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "array-bytes 6.2.2", "build-helper", @@ -16301,7 +16339,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "coarsetime", "polkadot-primitives", @@ -16312,7 +16350,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "expander 2.0.0", "proc-macro-crate 3.1.0", @@ -17175,7 +17213,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "binary-merkle-tree", "bitvec", @@ -17282,7 +17320,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "polkadot-primitives", @@ -17684,7 +17722,7 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.5.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -17718,7 +17756,7 @@ dependencies = [ [[package]] name = "xcm-fee-payment-runtime-api" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "frame-support", "parity-scale-codec", @@ -17733,7 +17771,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "7.0.0" -source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch3#ae76255bf6db06b4e194806670fc99484ed43a0e" +source = "git+https://github.com/galacticcouncil/polkadot-sdk?branch=release-polkadot-v1.11.0-patch4#fb3177d42f7ed729c03ea1184a5a74eb8f3e517c" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 559a3c691..c8a141091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,8 @@ members = [ 'pallets/xyk-liquidity-mining', 'pallets/liquidation', 'precompiles/call-permit', - 'runtime-mock' + 'runtime-mock', + 'pallets/support', ] resolver = "2" @@ -145,6 +146,7 @@ pallet-referrals = { path = "pallets/referrals", default-features = false } pallet-evm-accounts = { path = "pallets/evm-accounts", default-features = false } pallet-evm-accounts-rpc-runtime-api = { path = "pallets/evm-accounts/rpc/runtime-api", default-features = false } pallet-liquidation = { path = "pallets/liquidation", default-features = false } +pallet-support = { path = "pallets/support", default-features = false } hydra-dx-build-script-utils = { path = "utils/build-script-utils", default-features = false } scraper = { path = "scraper", default-features = false } @@ -157,110 +159,110 @@ pallet-evm-precompile-call-permit = { path = "precompiles/call-permit", default- precompile-utils = { path = "precompiles/utils", default-features = false } # Frame -frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false , features = ["tuples-96"]} -frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-consensus-beefy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-crypto-ec-utils= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sp-wasm-interface= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } - -sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } +frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false , features = ["tuples-96"]} +frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-consensus-beefy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-crypto-ec-utils= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sp-wasm-interface= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } + +sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } # Substrate Pallets -pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-bags-list = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-conviction-voting = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-referenda = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-whitelist = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } - -substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } +pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-bags-list = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-conviction-voting = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-referenda = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-whitelist = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } + +substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } #TODO: We use our custom ORML as it contains the fix of bug for reducible_balance check, for Preserve mode. Once the official ORML pushes a new version with the fix, we can use that again # ORML dependencies @@ -278,30 +280,30 @@ orml-xcm-support = { git = "https://github.com/galacticcouncil/open-runtime-modu orml-xtokens = { git = "https://github.com/galacticcouncil/open-runtime-module-library", branch = "polkadot-v1.11.0", default-features = false } # Cumulus dependencies -cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } +cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } # Frontier fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.11.0", default-features = false } @@ -334,35 +336,35 @@ module-evm-utility-macro = { path = "runtime/hydradx/src/evm/evm-utility/macro", ethereum = { version = "0.15.0", default-features = false, features = ["with-codec"] } # Polkadot dependencies -pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false, features = [ +pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false, features = [ "wasm-api", ]} -polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -polkadot-xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3", default-features = false } - -polkadot-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" , default-features = false} -polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } - -cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +polkadot-xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4", default-features = false } + +polkadot-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" , default-features = false} +polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } + +cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } [patch."https://github.com/moonbeam-foundation/open-runtime-module-library"] # ORML dependencies @@ -377,311 +379,311 @@ orml-xcm-support = { git = "https://github.com/galacticcouncil/open-runtime-modu orml-xtokens = { git = "https://github.com/galacticcouncil/open-runtime-module-library", branch = "polkadot-v1.11.0" } [patch."https://github.com/moonbeam-foundation/polkadot-sdk"] -frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-wasm-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-panic-handler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-database = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} +frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-wasm-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-panic-handler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-database = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} # Substrate Pallets -pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} - -substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} + +substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } # Cumulus dependencies -cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } # Polkadot dependencies -pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } - -polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } - -cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } + +polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } + +cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } [patch."https://github.com/paritytech/polkadot-sdk"] -frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-wasm-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-panic-handler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-database = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sc-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} +frame-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-benchmarking-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-executive = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-remote-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-support = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system-benchmarking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-system-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-try-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +frame-metadata-hash-extension = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-arithmetic = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-authority-discovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-block-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-genesis-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-blockchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-consensus-babe = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-externalities = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-inherents = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-io = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-npos-elections = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-offchain = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-runtime-interface-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-wasm-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-panic-handler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-database = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-staking = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-std = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-storage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-trie = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-version = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-basic-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-chain-spec = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-client-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-client-db = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-consensus-grandpa = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-executor = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-keystore = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network-sync = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-network-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-rpc-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-telemetry = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-tracing = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-transaction-pool = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-transaction-pool-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-sysinfo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sc-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-state-machine = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +sp-weights = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +sp-crypto-hashing= { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} # Substrate Pallets -pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} - -substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +pallet-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-authorship = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-balances = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-collective = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-elections-phragmen = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-identity = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-multisig = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-preimage = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-proxy = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-scheduler = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-session = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-sudo = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-tips = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-treasury = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-uniques = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-im-online = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-message-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +pallet-state-trie-migration = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} + +substrate-build-script-utils = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-frame-rpc-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-prometheus-endpoint = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-rpc-client = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-wasm-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +substrate-state-trie-migration-rpc = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } # Cumulus dependencies -cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +cumulus-client-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-collator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-aura = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-consensus-proposer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-network = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-client-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-aura-ext = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-parachain-system = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-core = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-timestamp = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-primitives-utility = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +pallet-collator-selection = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +staging-parachain-info = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-emulator = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +parachains-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +xcm-fee-payment-runtime-api = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } # Polkadot dependencies -pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3"} -polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } - -polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } - -cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch3" } +pallet-xcm = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-cli = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-core-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4"} +polkadot-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-runtime-parachains = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-service = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm = { package = "staging-xcm", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } + +polkadot-node-core-pvf = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-network-protocol = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-primitives = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-node-subsystem-util = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-overseer = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-runtime-common = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +polkadot-statement-table = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +rococo-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +westend-runtime = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } + +cumulus-client-pov-recovery = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/galacticcouncil/polkadot-sdk", branch = "release-polkadot-v1.11.0-patch4" } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index aebb4d1f7..10e9f140b 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-integration-tests" -version = "1.26.0" +version = "1.27.0" description = "Integration tests" authors = ["GalacticCouncil"] edition = "2021" @@ -44,6 +44,7 @@ pallet-evm-accounts = { workspace = true } pallet-xyk-liquidity-mining = { workspace = true } pallet-transaction-pause = { workspace = true } pallet-liquidation = { workspace = true } +pallet-support = { workspace = true } pallet-treasury = { workspace = true } pallet-democracy = { workspace = true } @@ -221,6 +222,7 @@ std = [ "precompile-utils/std", "pallet-transaction-pause/std", "pallet-liquidation/std", + "pallet-support/std", ] # we don't include integration tests when benchmarking feature is enabled diff --git a/integration-tests/src/cross_chain_transfer.rs b/integration-tests/src/cross_chain_transfer.rs index 4a168f696..4bc0012d2 100644 --- a/integration-tests/src/cross_chain_transfer.rs +++ b/integration-tests/src/cross_chain_transfer.rs @@ -110,7 +110,7 @@ fn rococo_should_receive_asset_when_sent_from_hydra() { Rococo::execute_with(|| { assert_eq!( hydradx_runtime::Balances::free_balance(AccountId::from(BOB)), - 2_999_989_698_923 // 3 * HDX - fee + 2_999_989_606_492 // 3 * HDX - fee ); }); } diff --git a/integration-tests/src/dca.rs b/integration-tests/src/dca.rs index 3101a3004..74f610193 100644 --- a/integration-tests/src/dca.rs +++ b/integration-tests/src/dca.rs @@ -24,6 +24,7 @@ use pallet_dca::types::{Order, Schedule}; use pallet_omnipool::types::Tradability; use pallet_stableswap::types::AssetAmount; use pallet_stableswap::MAX_ASSETS_IN_POOL; +use pallet_support::types::*; use primitives::{AssetId, Balance}; use sp_runtime::traits::ConstU32; use sp_runtime::DispatchError; @@ -201,6 +202,99 @@ mod omnipool { }); } + #[test] + fn buy_schedule_execution_should_emit_swapped_events() { + TestNet::reset(); + Hydra::execute_with(|| { + //Arrange + init_omnipool_with_oracle_for_block_10(); + + let dca_budget = 1000 * UNITS; + let amount_out = 100 * UNITS; + let schedule_id = 0; + let schedule1 = schedule_fake_with_buy_order(PoolType::Omnipool, HDX, DAI, amount_out, dca_budget); + create_schedule(ALICE, schedule1); + + //Act + run_to_block(11, 12); + + //Assert + let swapped_events = get_last_swapped_events(); + let last_two_swapped_events = &swapped_events[swapped_events.len() - 2..]; + pretty_assertions::assert_eq!( + last_two_swapped_events, + vec![ + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 140421094367051)], + outputs: vec![Asset::new(LRNA, 70210545436437)], + fees: vec![Fee::new(LRNA, 35105272718, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ] + }, + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 70175440163719)], + outputs: vec![Asset::new(DAI, amount_out)], + fees: vec![Fee::new(DAI, 250626566417, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ], + } + ] + ); + + run_to_block(13, 17); + + let swapped_events = get_last_swapped_events(); + let last_two_swapped_events = &swapped_events[swapped_events.len() - 2..]; + pretty_assertions::assert_eq!( + last_two_swapped_events, + vec![ + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 140421107716515)], + outputs: vec![Asset::new(LRNA, 70210548448729)], + fees: vec![Fee::new(LRNA, 35105274224, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 3), + ExecutionType::Router(4), + ExecutionType::Omnipool(5) + ], + }, + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 70175443174505)], + outputs: vec![Asset::new(DAI, amount_out)], + fees: vec![Fee::new(DAI, 250626566417, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 3), + ExecutionType::Router(4), + ExecutionType::Omnipool(5) + ], + } + ] + ); + }); + } + #[test] fn buy_schedule_execution_should_work_without_route() { TestNet::reset(); @@ -588,6 +682,106 @@ mod omnipool { }); } + #[test] + fn sell_schedule_execution_should_emit_swapped_event() { + TestNet::reset(); + Hydra::execute_with(|| { + //Arrange + init_omnipool_with_oracle_for_block_10(); + let alice_init_hdx_balance = 5000 * UNITS; + assert_ok!(Balances::force_set_balance( + RuntimeOrigin::root(), + ALICE.into(), + alice_init_hdx_balance, + )); + + let dca_budget = 1100 * UNITS; + let amount_to_sell = 100 * UNITS; + let schedule_id = 0; + let schedule1 = + schedule_fake_with_sell_order(ALICE, PoolType::Omnipool, dca_budget, HDX, DAI, amount_to_sell); + create_schedule(ALICE, schedule1); + + //Act + run_to_block(11, 12); + + //Assert + let swapped_events = get_last_swapped_events(); + let last_two_swapped_events = &swapped_events[swapped_events.len() - 2..]; + pretty_assertions::assert_eq!( + last_two_swapped_events, + vec![ + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell)], + outputs: vec![Asset::new(LRNA, 49999999159957)], + fees: vec![Fee::new(LRNA, 24999999579, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ], + }, + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 49974999160378)], + outputs: vec![Asset::new(DAI, 71214372624126)], + fees: vec![Fee::new(DAI, 178482136903, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ], + } + ] + ); + + run_to_block(13, 17); + + let swapped_events = get_last_swapped_events(); + let last_two_swapped_events = &swapped_events[swapped_events.len() - 2..]; + pretty_assertions::assert_eq!( + last_two_swapped_events, + vec![ + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell)], + outputs: vec![Asset::new(LRNA, 49999997360044)], + fees: vec![Fee::new(LRNA, 24999998680, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 3), + ExecutionType::Router(4), + ExecutionType::Omnipool(5) + ], + }, + pallet_support::Event::Swapped { + swapper: ALICE.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 49974997361364)], + outputs: vec![Asset::new(DAI, 71214367826179)], + fees: vec![Fee::new(DAI, 178482124878, Omnipool::protocol_account()),], + operation_stack: vec![ + ExecutionType::DCA(schedule_id, 3), + ExecutionType::Router(4), + ExecutionType::Omnipool(5) + ], + } + ] + ); + }); + } + #[test] fn sell_schedule_be_retried_when_route_is_invalid() { TestNet::reset(); @@ -4032,7 +4226,6 @@ pub fn run_to_block(from: BlockNumber, to: BlockNumber) { for b in from..=to { do_trade_to_populate_oracle(DAI, HDX, UNITS); set_relaychain_block_number(b); - do_trade_to_populate_oracle(DAI, HDX, UNITS); } } diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index 1bc3106e9..c4c359b83 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -1,5 +1,6 @@ #![cfg(test)] +use crate::assert_operation_stack; use crate::polkadot_test_net::*; use frame_support::dispatch::GetDispatchInfo; use frame_support::storage::with_transaction; @@ -7,7 +8,12 @@ use frame_support::traits::fungible::Balanced; use frame_support::traits::tokens::Precision; use frame_support::weights::Weight; use frame_support::{assert_ok, pallet_prelude::*}; -use hydradx_runtime::AssetRegistry; +use hydradx_runtime::Omnipool; +use hydradx_runtime::Router; +use hydradx_runtime::RuntimeEvent; +use hydradx_runtime::RuntimeOrigin; +use hydradx_runtime::TempAccountForXcmAssetExchange; +use hydradx_runtime::{AssetRegistry, LRNA}; use hydradx_traits::AssetKind; use hydradx_traits::Create; use orml_traits::currency::MultiCurrency; @@ -120,6 +126,50 @@ fn hydra_should_swap_assets_when_receiving_from_acala_with_sell() { // We receive about 39_101 HDX (HDX is super cheap in our test) let received = 39_101 * UNITS + BOB_INITIAL_NATIVE_BALANCE + 207_131_554_396; assert_eq!(hydradx_runtime::Balances::free_balance(AccountId::from(BOB)), received); + + let last_swapped_events: Vec> = get_last_swapped_events(); + let last_two_swapped_events = &last_swapped_events[last_swapped_events.len() - 2..]; + + let event1 = &last_two_swapped_events[0]; + assert_operation_stack!( + event1, + [ + ExecutionType::Xcm(_, 0), + ExecutionType::XcmExchange(1), + ExecutionType::Router(2), + ExecutionType::Omnipool(3) + ] + ); + + let event2 = &last_two_swapped_events[0]; + assert_operation_stack!( + event2, + [ + ExecutionType::Xcm(_, 0), + ExecutionType::XcmExchange(1), + ExecutionType::Router(2), + ExecutionType::Omnipool(3) + ] + ); + + //We assert that another trade doesnt have the xcm exchange type on stack + assert_ok!(Router::sell( + RuntimeOrigin::signed(ALICE.into()), + HDX, + ACA, + 1 * UNITS, + 0, + vec![], + )); + + let last_swapped_events: Vec> = get_last_swapped_events(); + let last_two_swapped_events = &last_swapped_events[last_swapped_events.len() - 2..]; + + let event1 = &last_two_swapped_events[0]; + assert_operation_stack!(event1, [ExecutionType::Router(4), ExecutionType::Omnipool(5)]); + + let event2 = &last_two_swapped_events[0]; + assert_operation_stack!(event2, [ExecutionType::Router(4), ExecutionType::Omnipool(5)]); }); } @@ -1143,6 +1193,7 @@ fn half(asset: &Asset) -> Asset { id: asset.clone().id, } } +use pallet_support::types::{ExecutionType, Fee}; use rococo_runtime::xcm_config::BaseXcmWeight; use xcm_builder::FixedWeightBounds; use xcm_executor::traits::WeightBounds; diff --git a/integration-tests/src/global_account_derivation.rs b/integration-tests/src/global_account_derivation.rs deleted file mode 100644 index 94c28931b..000000000 --- a/integration-tests/src/global_account_derivation.rs +++ /dev/null @@ -1,131 +0,0 @@ -#![cfg(test)] -use crate::polkadot_test_net::*; - -use frame_support::assert_ok; -use sp_runtime::codec::Encode; - -use frame_support::dispatch::GetDispatchInfo; -use orml_traits::MultiCurrency; -use polkadot_xcm::v4::prelude::*; -use sp_std::sync::Arc; -use xcm_builder::DescribeAllTerminal; -use xcm_builder::DescribeFamily; -use xcm_builder::HashedDescription; -use xcm_emulator::ConvertLocation; -use xcm_emulator::TestExt; - -#[test] -fn other_chain_remote_account_should_work_on_hydra() { - // Arrange - TestNet::reset(); - - let xcm_interior_at_acala = - cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::AccountId32 { - network: None, - id: evm_account().into(), - }])); - - let xcm_origin_at_hydra = Location { - parents: 1, - interior: cumulus_primitives_core::Junctions::X2(Arc::new([ - cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), - cumulus_primitives_core::Junction::AccountId32 { - network: None, - id: evm_account().into(), - }, - ])), - }; - - let acala_account_id_at_hydra: AccountId = - HashedDescription::>::convert_location(&xcm_origin_at_hydra) - .unwrap(); - - Hydra::execute_with(|| { - init_omnipool(); - - assert_ok!(hydradx_runtime::Balances::transfer_allow_death( - hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), - acala_account_id_at_hydra.clone(), - 1_000 * UNITS, - )); - - assert_eq!( - hydradx_runtime::Currencies::free_balance(DAI, &AccountId::from(acala_account_id_at_hydra.clone())), - 0 - ); - }); - - // Act - Acala::execute_with(|| { - let omni_sell = - hydradx_runtime::RuntimeCall::Omnipool(pallet_omnipool::Call::::sell { - asset_in: HDX, - asset_out: DAI, - amount: UNITS, - min_buy_amount: 0, - }); - - let hdx_loc = Location::new( - 1, - cumulus_primitives_core::Junctions::X2(Arc::new([ - cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), - cumulus_primitives_core::Junction::GeneralIndex(0), - ])), - ); - let asset_to_withdraw: Asset = Asset { - id: cumulus_primitives_core::AssetId(hdx_loc.clone()), - fun: Fungible(900 * UNITS), - }; - let asset_for_buy_execution: Asset = Asset { - id: cumulus_primitives_core::AssetId(hdx_loc), - fun: Fungible(800 * UNITS), - }; - - let message = Xcm(vec![ - WithdrawAsset(asset_to_withdraw.into()), - BuyExecution { - fees: asset_for_buy_execution, - weight_limit: Unlimited, - }, - Transact { - require_weight_at_most: omni_sell.get_dispatch_info().weight, - origin_kind: OriginKind::SovereignAccount, - call: omni_sell.encode().into(), - }, - ExpectTransactStatus(MaybeErrorCode::Success), - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: cumulus_primitives_core::Junction::AccountId32 { - id: acala_account_id_at_hydra.clone().into(), - network: None, - } - .into(), - }, - ]); - - let dest_hydradx = Location::new( - 1, - cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::Parachain( - HYDRA_PARA_ID, - )])), - ); - - assert_ok!(hydradx_runtime::PolkadotXcm::send_xcm( - xcm_interior_at_acala, - dest_hydradx, - message - )); - }); - - // Assert - Hydra::execute_with(|| { - assert_xcm_message_processing_passed(); - - let dai_balance = hydradx_runtime::Currencies::free_balance(DAI, &AccountId::from(acala_account_id_at_hydra)); - assert!( - dai_balance > 0, - "Omnipool sell swap failed as the user did not receive any DAI" - ); - }); -} diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index b8e0053ff..ec6d6752f 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -16,7 +16,6 @@ mod evm; mod evm_permit; mod exchange_asset; mod fee_calculation; -mod global_account_derivation; mod insufficient_assets_ed; mod liquidation; mod multi_payment; @@ -30,8 +29,10 @@ mod referrals; mod router; mod staking; mod transact_call_filter; +mod utility; pub mod utils; mod vesting; +mod xcm; mod xyk; mod xyk_liquidity_mining; diff --git a/integration-tests/src/polkadot_test_net.rs b/integration-tests/src/polkadot_test_net.rs index 5cec09995..e8c47051e 100644 --- a/integration-tests/src/polkadot_test_net.rs +++ b/integration-tests/src/polkadot_test_net.rs @@ -15,7 +15,7 @@ use cumulus_primitives_core::ParaId; use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; pub use frame_system::RawOrigin; use hex_literal::hex; -use hydradx_runtime::{evm::WETH_ASSET_LOCATION, Referrals, RuntimeOrigin}; +use hydradx_runtime::{evm::WETH_ASSET_LOCATION, Referrals, RuntimeEvent, RuntimeOrigin}; pub use hydradx_traits::{evm::InspectEvmAccounts, registry::Mutate}; use pallet_referrals::{FeeDistribution, Level}; pub use polkadot_primitives::v7::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}; @@ -893,3 +893,33 @@ pub fn assert_xcm_message_processing_passed() { hydradx_runtime::RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success: true, .. }) ))); } + +pub fn get_last_swapped_events() -> Vec> { + let last_events: Vec = last_hydra_events(1000); + + last_events + .into_iter() + .filter_map(|event| { + if let RuntimeEvent::AmmSupport(inner_event @ pallet_support::Event::Swapped { .. }) = event { + Some(inner_event) + } else { + None + } + }) + .collect() +} + +#[macro_export] +macro_rules! assert_operation_stack { + ($event:expr, [$($pattern:pat),*]) => { + if let pallet_support::Event::Swapped { operation_stack, .. } = $event { + assert!(matches!(&operation_stack[..], + [ + $($pattern),* + ] + )); + } else { + panic!("Expected Swapped event"); + } + } +} diff --git a/integration-tests/src/referrals.rs b/integration-tests/src/referrals.rs index 136992a5b..0b1b0d606 100644 --- a/integration-tests/src/referrals.rs +++ b/integration-tests/src/referrals.rs @@ -1,14 +1,20 @@ #![cfg(test)] + use crate::polkadot_test_net::*; use frame_support::assert_ok; use frame_system::RawOrigin; use hydradx_runtime::{Currencies, Omnipool, Referrals, Runtime, RuntimeOrigin, Staking, Tokens}; use orml_traits::MultiCurrency; use pallet_referrals::{FeeDistribution, ReferralCode}; +use pallet_support::types::Asset; +use pallet_support::types::Fee; +use pallet_support::types::Filler; +use pallet_support::types::TradeOperation; use primitives::AccountId; use sp_core::crypto::Ss58AddressFormat; use sp_runtime::FixedU128; use sp_runtime::Permill; +use std::vec; use xcm_emulator::TestExt; #[test] @@ -319,6 +325,39 @@ fn trading_in_omnipool_should_use_asset_rewards_when_set() { assert_eq!(external_shares, 1_095_625_113_667); let total_shares = Referrals::total_shares(); assert_eq!(total_shares, referrer_shares + trader_shares + external_shares); + + let swapped_events = get_last_swapped_events(); + let last_two_swapped_events = &swapped_events[swapped_events.len() - 2..]; + pretty_assertions::assert_eq!( + *last_two_swapped_events, + vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: Filler::Omnipool, + operation: TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 1000000000000)], + outputs: vec![Asset::new(LRNA, 1205768843)], + fees: vec![Fee::new(LRNA, 602884, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: Filler::Omnipool, + operation: TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 1205165959)], + outputs: vec![Asset::new(DAI, 26663424573622008)], + fees: vec![ + Fee::new(DAI, 61356016373131, Omnipool::protocol_account()), + Fee::new(DAI, 9168140377593, Referrals::pot_account_id()) + ], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ] + ); }); } @@ -339,18 +378,45 @@ fn buying_hdx_in_omnipool_should_transfer_correct_fee() { u128::MAX, )); - expect_hydra_last_events(vec![pallet_omnipool::Event::BuyExecuted { - who: BOB.into(), - asset_in: DAI, - asset_out: HDX, - amount_in: 26_835_579_541_620_354, - amount_out: 1_000_000_000_000, - hub_amount_in: 1_209_746_177, - hub_amount_out: 1_209_141_304, - asset_fee_amount: 2_794_789_078, - protocol_fee_amount: 604_873, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_omnipool::Event::BuyExecuted { + who: BOB.into(), + asset_in: DAI, + asset_out: HDX, + amount_in: 26_835_579_541_620_354, + amount_out: 1_000_000_000_000, + hub_amount_in: 1_209_746_177, + hub_amount_out: 1_209_141_304, + asset_fee_amount: 2_794_789_078, + protocol_fee_amount: 604_873, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: Filler::Omnipool, + operation: TradeOperation::ExactOut, + inputs: vec![Asset::new(DAI, 26_835_579_541_620_354)], + outputs: vec![Asset::new(LRNA, 1_209_746_177)], + fees: vec![Fee::new(LRNA, 604_873, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: Filler::Omnipool, + operation: TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 1_209_141_304)], + outputs: vec![Asset::new(HDX, 1_000_000_000_000)], + fees: vec![ + Fee::new(HDX, 1, Omnipool::protocol_account()), + Fee::new(HDX, 2794789077, Staking::pot_account_id()), + ], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); let ref_dai_balance = Currencies::free_balance(DAI, &ref_account); let staking_balance = Currencies::free_balance(HDX, &staking_acc); @@ -376,18 +442,45 @@ fn buying_with_hdx_in_omnipool_should_transfer_correct_fee() { u128::MAX, )); - expect_hydra_last_events(vec![pallet_omnipool::Event::BuyExecuted { - who: BOB.into(), - asset_in: HDX, - asset_out: DAI, - amount_in: 37_506_757_329_085, - amount_out: 1_000_000_000_000_000_000, - hub_amount_in: 45_222_713_080, - hub_amount_out: 45_200_101_724, - asset_fee_amount: 2_644_977_450_514_458, - protocol_fee_amount: 22_611_356, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_omnipool::Event::BuyExecuted { + who: BOB.into(), + asset_in: HDX, + asset_out: DAI, + amount_in: 37_506_757_329_085, + amount_out: 1_000_000_000_000_000_000, + hub_amount_in: 45_222_713_080, + hub_amount_out: 45_200_101_724, + asset_fee_amount: 2_644_977_450_514_458, + protocol_fee_amount: 22_611_356, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 37_506_757_329_085)], + outputs: vec![Asset::new(LRNA, 45_222_713_080)], + fees: vec![Fee::new(LRNA, 22_611_356, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 45_200_101_724)], + outputs: vec![Asset::new(DAI, 1_000_000_000_000_000_000)], + fees: vec![ + Fee::new(DAI, 1322488725257230, Omnipool::protocol_account()), + Fee::new(DAI, 1322488725257228, Referrals::pot_account_id()), + ], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); let ref_dai_balance = Currencies::free_balance(DAI, &ref_account); let staking_balance = Currencies::free_balance(HDX, &staking_acc); @@ -467,6 +560,14 @@ fn init_omnipool() { AccountId::from(ALICE), )); + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + ETH, + stable_price, + Permill::from_percent(100), + AccountId::from(ALICE), + )); + assert_ok!(hydradx_runtime::Omnipool::sacrifice_position( hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), native_position_id, @@ -521,6 +622,7 @@ fn seed_pot_account() { )); } +use pallet_support::types::ExecutionType; use scraper::ALICE; use sp_core::crypto::Ss58Codec; diff --git a/integration-tests/src/router.rs b/integration-tests/src/router.rs index 13683d76f..63157f29d 100644 --- a/integration-tests/src/router.rs +++ b/integration-tests/src/router.rs @@ -7,6 +7,7 @@ use hydradx_runtime::{ AssetRegistry, BlockNumber, Currencies, Omnipool, Router, RouterWeightInfo, Runtime, RuntimeOrigin, Stableswap, LBP, XYK, }; +use hydradx_traits::router::AssetPair as Pair; use hydradx_traits::router::RouteSpotPriceProvider; use hydradx_traits::{ registry::Create, @@ -19,11 +20,14 @@ use pallet_omnipool::traits::OmnipoolHooks; use pallet_omnipool::types::Tradability; use pallet_omnipool::weights::WeightInfo as OmnipoolWeights; use pallet_route_executor::AmmTradeWeights; -use std::convert::Into; - -use hydradx_traits::router::AssetPair as Pair; +use pallet_support::types::Asset; +use pallet_support::types::ExecutionType; +use pallet_support::types::Fee; +use pallet_support::types::Filler; +use pallet_support::types::TradeOperation; use primitives::AssetId; use sp_runtime::FixedPointNumber; +use std::convert::Into; use frame_support::{assert_noop, assert_ok, BoundedVec}; use xcm_emulator::TestExt; @@ -36,7 +40,7 @@ use sp_runtime::{ DispatchError, DispatchResult, FixedU128, Permill, TransactionOutcome, }; -use hydradx_runtime::InsufficientEDinHDX; +use hydradx_runtime::{AccountIdFor, InsufficientEDinHDX}; use orml_traits::MultiCurrency; pub const LBP_SALE_START: BlockNumber = 10; pub const LBP_SALE_END: BlockNumber = 40; @@ -54,6 +58,7 @@ fn router_weights_should_be_non_zero() { mod router_different_pools_tests { use super::*; use hydradx_traits::router::PoolType; + use pallet_support::types::ExecutionType; #[test] fn route_should_fail_when_route_is_not_consistent() { @@ -152,13 +157,70 @@ mod router_different_pools_tests { assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE); assert_balance!(BOB.into(), DOT, amount_out); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: DAI, - asset_out: DOT, - amount_in: amount_to_sell, - amount_out, - } - .into()]); + expect_hydra_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 9980000000)], + outputs: vec![Asset::new(LRNA, 5640664064)], + fees: vec![Fee::new( + DAI, + 20000000, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 5640664064)], + outputs: vec![Asset::new(HDX, 4682924837974)], + fees: vec![Fee::new(HDX, 11736653730, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 4682924837974)], + outputs: vec![Asset::new(DOT, 2230008413831)], + fees: vec![Fee::new( + DOT, + 6710155707, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: DAI, + asset_out: DOT, + amount_in: amount_to_sell, + amount_out, + event_id: 0, + } + .into(), + ]); }); TestNet::reset(); @@ -218,13 +280,80 @@ mod router_different_pools_tests { assert_balance!(BOB.into(), stable_asset_1, 0); assert_balance!(BOB.into(), stable_asset_2, amount_out); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: DAI, - asset_out: stable_asset_2, - amount_in: amount_to_sell, - amount_out, - } - .into()]); + expect_hydra_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX)), + filler_type: Filler::LBP, + operation: TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 9980000000)], + outputs: vec![Asset::new(HDX, 5640664064)], + fees: vec![Fee::new( + DAI, + 20000000, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 5640664064)], + outputs: vec![Asset::new(stable_asset_1, 2811712439)], + fees: vec![Fee::new( + stable_asset_1, + 8460516, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: ::ShareAccountId::from_assets( + &stable_pool_id, + Some(pallet_stableswap::POOL_IDENTIFIER), + ), + filler_type: pallet_support::types::Filler::Stableswap(stable_pool_id), + operation: TradeOperation::ExactIn, + inputs: vec![Asset::new(stable_asset_1, 2811712439)], + outputs: vec![Asset::new(stable_asset_2, 2783595233)], + fees: vec![Fee::new( + stable_asset_2, + 28117123, + ::ShareAccountId::from_assets( + &stable_pool_id, + Some(pallet_stableswap::POOL_IDENTIFIER), + ), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: DAI, + asset_out: stable_asset_2, + amount_in: amount_to_sell, + amount_out, + event_id: 0, + } + .into(), + ]); TransactionOutcome::Commit(DispatchResult::Ok(())) }); @@ -281,13 +410,70 @@ mod router_different_pools_tests { assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE); assert_balance!(BOB.into(), DOT, amount_to_buy); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: DAI, - asset_out: DOT, - amount_in, - amount_out: amount_to_buy, - } - .into()]); + expect_hydra_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(DAI, 4362157193)], + outputs: vec![Asset::new(LRNA, 2465566245)], + fees: vec![Fee::new( + DAI, + 8741796, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 2465566245)], + outputs: vec![Asset::new(HDX, 2046938775509)], + fees: vec![Fee::new(HDX, 5130172370, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 1000000000000)], + outputs: vec![Asset::new(DOT, 2040816326531)], + fees: vec![Fee::new( + HDX, + 6122448978, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: DAI, + asset_out: DOT, + amount_in, + amount_out: amount_to_buy, + event_id: 0, + } + .into(), + ]); }); TestNet::reset(); @@ -347,18 +533,214 @@ mod router_different_pools_tests { assert_balance!(BOB.into(), stable_asset_1, 0); assert_balance!(BOB.into(), stable_asset_2, amount_to_buy); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: DAI, - asset_out: stable_asset_2, - amount_in, - amount_out: amount_to_buy, - } - .into()]); + expect_hydra_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(DAI, 3746042043754)], + outputs: vec![Asset::new(HDX, 2067851065323)], + fees: vec![Fee::new( + DAI, + 7507098284, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 1010010000114)], + outputs: vec![Asset::new(stable_asset_1, 2061666067122)], + fees: vec![Fee::new( + HDX, + 6184998201, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: stable_asset_1, + }), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: ::ShareAccountId::from_assets( + &stable_pool_id, + Some(pallet_stableswap::POOL_IDENTIFIER), + ), + filler_type: pallet_support::types::Filler::Stableswap(stable_pool_id), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(stable_asset_1, 1010010000114)], + outputs: vec![Asset::new(stable_asset_2, 1000000000000)], + fees: vec![Fee::new( + stable_asset_1, + 10000099012, + ::ShareAccountId::from_assets( + &stable_pool_id, + Some(pallet_stableswap::POOL_IDENTIFIER), + ), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: DAI, + asset_out: stable_asset_2, + amount_in, + amount_out: amount_to_buy, + event_id: 0, + } + .into(), + ]); + TransactionOutcome::Commit(DispatchResult::Ok(())) }); }); } + #[test] + fn multiple_trades_should_increase_event_id() { + TestNet::reset(); + + Hydra::execute_with(|| { + //Arrange + create_xyk_pool(HDX, DOT); + + let amount_to_sell = UNITS / 100; + let limit = 0; + let trades = vec![Trade { + pool: PoolType::XYK, + asset_in: HDX, + asset_out: DOT, + }]; + + //Act + assert_ok!(Router::sell( + RuntimeOrigin::signed(BOB.into()), + HDX, + DOT, + amount_to_sell, + limit, + trades.clone() + )); + + assert_ok!(Router::buy( + RuntimeOrigin::signed(BOB.into()), + HDX, + DOT, + amount_to_sell, + 10 * amount_to_sell, + trades.clone() + )); + + assert_ok!(Router::sell( + RuntimeOrigin::signed(BOB.into()), + HDX, + DOT, + amount_to_sell, + limit, + trades + )); + + //Assert + expect_hydra_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 10000000000)], + outputs: vec![Asset::new(DOT, 4984501549)], + fees: vec![Fee::new( + DOT, + 14998500, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, 10000000000)], + outputs: vec![Asset::new(DOT, 20007996198)], + fees: vec![Fee::new( + HDX, + 60023988, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Router(1)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 10000000000)], + outputs: vec![Asset::new(DOT, 4981510054)], + fees: vec![Fee::new( + DOT, + 14989497, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Router(2)], + } + .into(), + ]); + }); + } + #[test] fn router_should_work_for_hopping_from_omnipool_to_stableswap() { TestNet::reset(); @@ -764,6 +1146,7 @@ mod omnipool_router_tests { use hydradx_runtime::{Balances, XYK}; use hydradx_traits::router::PoolType; use hydradx_traits::AssetKind; + use pallet_support::types::ExecutionType; #[test] fn sell_should_work_when_route_contains_single_trade() { @@ -802,6 +1185,7 @@ mod omnipool_router_tests { asset_out: DAI, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -1976,6 +2360,7 @@ mod omnipool_router_tests { asset_out: DAI, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2014,13 +2399,38 @@ mod omnipool_router_tests { assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_to_sell); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + amount_out); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: HDX, - asset_out: DAI, - amount_in: amount_to_sell, - amount_out, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell)], + outputs: vec![Asset::new(LRNA, 12014871681)], + fees: vec![Fee::new(LRNA, 6007435, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0), ExecutionType::Omnipool(1)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 12008864246)], + outputs: vec![Asset::new(DAI, amount_out)], + fees: vec![Fee::new(DAI, 667155563986401, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0), ExecutionType::Omnipool(1)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: HDX, + asset_out: DAI, + amount_in: amount_to_sell, + amount_out, + event_id: 0, + } + .into(), + ]); }); TestNet::reset(); @@ -2039,18 +2449,42 @@ mod omnipool_router_tests { )); //Assert - expect_hydra_last_events(vec![pallet_omnipool::Event::SellExecuted { - who: BOB.into(), - asset_in: HDX, - asset_out: DAI, - amount_in: amount_to_sell, - amount_out, - hub_amount_in: 12014871681, - hub_amount_out: 12008864246, - asset_fee_amount: 667_155_563_986_401, - protocol_fee_amount: 6_007_435, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_omnipool::Event::SellExecuted { + who: BOB.into(), + asset_in: HDX, + asset_out: DAI, + amount_in: amount_to_sell, + amount_out, + hub_amount_in: 12014871681, + hub_amount_out: 12008864246, + asset_fee_amount: 667_155_563_986_401, + protocol_fee_amount: 6_007_435, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell)], + outputs: vec![Asset::new(LRNA, 12014871681)], + fees: vec![Fee::new(LRNA, 6007435, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 12008864246)], + outputs: vec![Asset::new(DAI, amount_out)], + fees: vec![Fee::new(DAI, 667155563986401, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_to_sell); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + amount_out); @@ -2094,6 +2528,7 @@ mod omnipool_router_tests { asset_out: DAI, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2194,13 +2629,38 @@ mod omnipool_router_tests { assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_in); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + amount_to_buy); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: HDX, - asset_out: DAI, - amount_in, - amount_out: amount_to_buy, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, amount_in)], + outputs: vec![Asset::new(LRNA, 45135)], + fees: vec![Fee::new(LRNA, 22, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0), ExecutionType::Omnipool(1)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 45113)], + outputs: vec![Asset::new(DAI, amount_to_buy)], + fees: vec![Fee::new(DAI, 2506265665, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Router(0), ExecutionType::Omnipool(1)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: HDX, + asset_out: DAI, + amount_in, + amount_out: amount_to_buy, + event_id: 0, + } + .into(), + ]); }); TestNet::reset(); @@ -2219,18 +2679,42 @@ mod omnipool_router_tests { )); //Assert - expect_hydra_last_events(vec![pallet_omnipool::Event::BuyExecuted { - who: BOB.into(), - asset_in: HDX, - asset_out: DAI, - amount_in, - amount_out: amount_to_buy, - hub_amount_in: 45135, - hub_amount_out: 45113, - asset_fee_amount: 2_506_265_665, - protocol_fee_amount: 22, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_omnipool::Event::BuyExecuted { + who: BOB.into(), + asset_in: HDX, + asset_out: DAI, + amount_in, + amount_out: amount_to_buy, + hub_amount_in: 45135, + hub_amount_out: 45113, + asset_fee_amount: 2_506_265_665, + protocol_fee_amount: 22, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(HDX, amount_in)], + outputs: vec![Asset::new(LRNA, 45135)], + fees: vec![Fee::new(LRNA, 22, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(LRNA, 45113)], + outputs: vec![Asset::new(DAI, amount_to_buy)], + fees: vec![Fee::new(DAI, 2506265665, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_in); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + amount_to_buy); @@ -2311,6 +2795,7 @@ mod lbp_router_tests { asset_out: DAI, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2354,6 +2839,7 @@ mod lbp_router_tests { asset_out: HDX, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2406,6 +2892,7 @@ mod lbp_router_tests { asset_out: DOT, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2458,6 +2945,7 @@ mod lbp_router_tests { asset_out: DOT, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2496,13 +2984,35 @@ mod lbp_router_tests { assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_to_sell); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + received_amount_out); - expect_hydra_last_events(vec![pallet_route_executor::Event::Executed { - asset_in: HDX, - asset_out: DAI, - amount_in: amount_to_sell, - amount_out: received_amount_out, - } - .into()]); + let fee = 20000000000; + + expect_hydra_last_events(vec![ + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell - fee)], + outputs: vec![Asset::new(DAI, received_amount_out)], + fees: vec![Fee::new( + HDX, + fee, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(HDX, DAI))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Router(0)], + } + .into(), + pallet_route_executor::Event::Executed { + asset_in: HDX, + asset_out: DAI, + amount_in: amount_to_sell, + amount_out: received_amount_out, + event_id: 0, + } + .into(), + ]); }); TestNet::reset(); @@ -2522,16 +3032,35 @@ mod lbp_router_tests { )); //Assert - expect_hydra_last_events(vec![pallet_lbp::Event::SellExecuted { - who: BOB.into(), - asset_in: HDX, - asset_out: DAI, - amount: 9_980_000_000_000, - sale_price: received_amount_out, - fee_asset: HDX, - fee_amount: 20_000_000_000, - } - .into()]); + expect_hydra_last_events(vec![ + pallet_lbp::Event::SellExecuted { + who: BOB.into(), + asset_in: HDX, + asset_out: DAI, + amount: 9_980_000_000_000, + sale_price: received_amount_out, + fee_asset: HDX, + fee_amount: 20_000_000_000, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, HDX)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 9_980_000_000_000)], + outputs: vec![Asset::new(DAI, received_amount_out)], + fees: vec![Fee::new( + HDX, + 20_000_000_000, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(HDX, DAI))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![], + } + .into(), + ]); assert_balance!(BOB.into(), HDX, BOB_INITIAL_NATIVE_BALANCE - amount_to_sell); assert_balance!(BOB.into(), DAI, BOB_INITIAL_DAI_BALANCE + received_amount_out); @@ -2576,6 +3105,7 @@ mod lbp_router_tests { asset_out: DAI, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2619,6 +3149,7 @@ mod lbp_router_tests { asset_out: HDX, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2671,6 +3202,7 @@ mod lbp_router_tests { asset_out: DOT, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2723,6 +3255,7 @@ mod lbp_router_tests { asset_out: DOT, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2766,6 +3299,7 @@ mod lbp_router_tests { asset_out: DAI, amount_in: spent_amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -2868,6 +3402,7 @@ mod xyk_router_tests { asset_out: DOT, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -2931,6 +3466,7 @@ mod xyk_router_tests { asset_out: DOT, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -3096,6 +3632,7 @@ mod xyk_router_tests { asset_out: DOT, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -3151,6 +3688,7 @@ mod xyk_router_tests { asset_out: DAI, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -3214,6 +3752,7 @@ mod xyk_router_tests { asset_out: DAI, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -4935,6 +5474,7 @@ mod with_on_chain_and_default_route { asset_out: DAI, amount_in: amount_to_sell, amount_out, + event_id: 0, } .into()]); }); @@ -4972,6 +5512,7 @@ mod with_on_chain_and_default_route { asset_out: DAI, amount_in, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -5333,6 +5874,7 @@ mod sell_all { asset_out: DAI, amount_in: bob_hdx_balance, amount_out, + event_id: 0, } .into()]); }); @@ -5374,6 +5916,7 @@ mod sell_all { asset_out: HDX, amount_in: bob_nonnative_balance, amount_out, + event_id: 0, } .into()]); }); @@ -5427,7 +5970,7 @@ mod sell_all { } } -fn create_lbp_pool(accumulated_asset: u32, distributed_asset: u32) { +pub fn create_lbp_pool(accumulated_asset: u32, distributed_asset: u32) { assert_ok!(Currencies::update_balance( hydradx_runtime::RuntimeOrigin::root(), DAVE.into(), @@ -5483,7 +6026,7 @@ fn start_lbp_campaign() { set_relaychain_block_number(LBP_SALE_START + 1); } -fn create_xyk_pool(asset_a: u32, asset_b: u32) { +pub fn create_xyk_pool(asset_a: u32, asset_b: u32) { assert_ok!(XYK::create_pool( RuntimeOrigin::signed(ALICE.into()), asset_a, diff --git a/integration-tests/src/utility.rs b/integration-tests/src/utility.rs new file mode 100644 index 000000000..51846b2a5 --- /dev/null +++ b/integration-tests/src/utility.rs @@ -0,0 +1,350 @@ +#![cfg(test)] + +use crate::polkadot_test_net::*; +use frame_support::assert_ok; + +use crate::assert_balance; +use hydradx_runtime::LBP; +use hydradx_runtime::XYK; +use hydradx_runtime::{Currencies, Omnipool, Runtime, RuntimeEvent}; +use hydradx_runtime::{RuntimeCall, Utility}; +use hydradx_traits::router::PoolType; +use pallet_support::types::Asset; +use xcm_emulator::TestExt; + +use hydradx_traits::router::Trade; +use hydradx_traits::AMM; +use orml_traits::MultiCurrency; +use pallet_support::types::ExecutionType; +use pallet_support::types::Fee; +#[test] +fn batch_execution_type_should_be_included_in_batch() { + TestNet::reset(); + + Hydra::execute_with(|| { + //Arrange + init_omnipool(); + crate::router::create_lbp_pool(DAI, LRNA); + crate::router::create_xyk_pool(HDX, DOT); + + let amount_to_sell = UNITS / 100; + let limit = 0; + let trades = vec![ + Trade { + pool: PoolType::LBP, + asset_in: DAI, + asset_out: LRNA, + }, + Trade { + pool: PoolType::Omnipool, + asset_in: LRNA, + asset_out: HDX, + }, + Trade { + pool: PoolType::XYK, + asset_in: HDX, + asset_out: DOT, + }, + ]; + + start_lbp_campaign(); + + //Act + let router_call = RuntimeCall::Router(pallet_route_executor::Call::sell { + asset_in: DAI, + asset_out: DOT, + amount_in: amount_to_sell, + min_amount_out: limit, + route: trades.clone(), + }); + assert_ok!(Utility::batch( + hydradx_runtime::RuntimeOrigin::signed(BOB.into()), + vec![router_call.clone()] + )); + + //Assert + assert_balance!(BOB.into(), DAI, 1_000_000_000 * UNITS - amount_to_sell); + + let swapped_events = get_last_swapped_events(); + + pretty_assertions::assert_eq!( + swapped_events, + vec![ + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 9980000000)], + outputs: vec![Asset::new(LRNA, 5640664064)], + fees: vec![Fee::new( + DAI, + 20000000, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ExecutionType::Batch(0), ExecutionType::Router(1)], + }, + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 5640664064)], + outputs: vec![Asset::new(HDX, 4682924837974)], + fees: vec![Fee::new(HDX, 11736653730, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Batch(0), ExecutionType::Router(1)], + }, + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 4682924837974)], + outputs: vec![Asset::new(DOT, 2230008413831)], + fees: vec![Fee::new( + DOT, + 6710155707, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Batch(0), ExecutionType::Router(1)], + } + ] + ); + }); +} + +#[test] +fn batch_execution_type_should_be_popped_when_multiple_batch_calls_happen() { + TestNet::reset(); + + Hydra::execute_with(|| { + //Arrange + init_omnipool(); + crate::router::create_lbp_pool(DAI, LRNA); + crate::router::create_xyk_pool(HDX, DOT); + + let amount_to_sell = UNITS / 100; + let limit = 0; + let trades = vec![ + Trade { + pool: PoolType::LBP, + asset_in: DAI, + asset_out: LRNA, + }, + Trade { + pool: PoolType::Omnipool, + asset_in: LRNA, + asset_out: HDX, + }, + Trade { + pool: PoolType::XYK, + asset_in: HDX, + asset_out: DOT, + }, + ]; + + start_lbp_campaign(); + + let router_call = RuntimeCall::Router(pallet_route_executor::Call::sell { + asset_in: DAI, + asset_out: DOT, + amount_in: amount_to_sell, + min_amount_out: limit, + route: trades.clone(), + }); + assert_ok!(Utility::batch( + hydradx_runtime::RuntimeOrigin::signed(BOB.into()), + vec![router_call.clone()] + )); + + //Act + let trades = vec![Trade { + pool: PoolType::XYK, + asset_in: HDX, + asset_out: DOT, + }]; + let router_call = RuntimeCall::Router(pallet_route_executor::Call::sell { + asset_in: HDX, + asset_out: DOT, + amount_in: amount_to_sell, + min_amount_out: limit, + route: trades.clone(), + }); + assert_ok!(Utility::batch( + hydradx_runtime::RuntimeOrigin::signed(BOB.into()), + vec![router_call.clone()] + )); + + //Assert + pretty_assertions::assert_eq!( + *get_last_swapped_events().last().unwrap(), + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, amount_to_sell)], + outputs: vec![Asset::new(DOT, 4549178628)], + fees: vec![Fee::new( + DOT, + 13688601, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ExecutionType::Batch(2), ExecutionType::Router(3)], + } + ); + }); +} + +#[test] +fn nested_batch_should_represent_embeddedness() { + TestNet::reset(); + + Hydra::execute_with(|| { + //Arrange + init_omnipool(); + crate::router::create_lbp_pool(DAI, LRNA); + crate::router::create_xyk_pool(HDX, DOT); + + let amount_to_sell = UNITS / 100; + let limit = 0; + let trades = vec![ + Trade { + pool: PoolType::LBP, + asset_in: DAI, + asset_out: LRNA, + }, + Trade { + pool: PoolType::Omnipool, + asset_in: LRNA, + asset_out: HDX, + }, + Trade { + pool: PoolType::XYK, + asset_in: HDX, + asset_out: DOT, + }, + ]; + + start_lbp_campaign(); + + //Act + + let sell_via_utility = RuntimeCall::Utility(pallet_utility::Call::batch { + calls: vec![RuntimeCall::Router(pallet_route_executor::Call::sell { + asset_in: DAI, + asset_out: DOT, + amount_in: amount_to_sell, + min_amount_out: limit, + route: trades.clone(), + })], + }); + + assert_ok!(Utility::batch( + hydradx_runtime::RuntimeOrigin::signed(BOB.into()), + vec![sell_via_utility.clone()] + )); + + //Assert + assert_balance!(BOB.into(), DAI, 1_000_000_000 * UNITS - amount_to_sell); + + let swapped_events = get_last_swapped_events(); + + pretty_assertions::assert_eq!( + swapped_events, + vec![ + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA)), + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 9980000000)], + outputs: vec![Asset::new(LRNA, 5640664064)], + fees: vec![Fee::new( + DAI, + 20000000, + LBP::pool_data(LBP::get_pair_id(pallet_lbp::types::AssetPair::new(DAI, LRNA))) + .unwrap() + .fee_collector, + )], + operation_stack: vec![ + ExecutionType::Batch(0), + ExecutionType::Batch(1), + ExecutionType::Router(2) + ], + }, + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 5640664064)], + outputs: vec![Asset::new(HDX, 4682924837974)], + fees: vec![Fee::new(HDX, 11736653730, Omnipool::protocol_account())], + operation_stack: vec![ + ExecutionType::Batch(0), + ExecutionType::Batch(1), + ExecutionType::Router(2) + ], + }, + pallet_support::Event::::Swapped { + swapper: BOB.into(), + filler: XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + filler_type: pallet_support::types::Filler::XYK(XYK::share_token(XYK::get_pair_id( + pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }, + ))), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 4682924837974)], + outputs: vec![Asset::new(DOT, 2230008413831)], + fees: vec![Fee::new( + DOT, + 6710155707, + XYK::get_pair_id(pallet_xyk::types::AssetPair { + asset_in: HDX, + asset_out: DOT, + }), + )], + operation_stack: vec![ + ExecutionType::Batch(0), + ExecutionType::Batch(1), + ExecutionType::Router(2) + ], + } + ] + ); + }); +} + +fn start_lbp_campaign() { + set_relaychain_block_number(crate::router::LBP_SALE_START + 1); +} diff --git a/integration-tests/src/xcm.rs b/integration-tests/src/xcm.rs new file mode 100644 index 000000000..40ee88c28 --- /dev/null +++ b/integration-tests/src/xcm.rs @@ -0,0 +1,337 @@ +#![cfg(test)] +use crate::polkadot_test_net::*; + +use frame_support::assert_ok; +use sp_runtime::codec::Encode; + +use crate::assert_operation_stack; +use frame_support::dispatch::GetDispatchInfo; +use hydradx_runtime::Omnipool; +use hydradx_runtime::RuntimeEvent; +use orml_traits::MultiCurrency; +use pallet_support::types::Asset as UnifiedEventAsset; +use pallet_support::types::ExecutionType; +use pallet_support::types::Fee; +use polkadot_xcm::v4::prelude::*; +use sp_std::sync::Arc; +use xcm_builder::DescribeAllTerminal; +use xcm_builder::DescribeFamily; +use xcm_builder::HashedDescription; +use xcm_emulator::ConvertLocation; +use xcm_emulator::TestExt; + +#[test] +fn global_account_derivation_should_work_when_with_other_chain_remote_account() { + // Arrange + TestNet::reset(); + + let xcm_interior_at_acala = + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }])); + + let xcm_origin_at_hydra = Location { + parents: 1, + interior: cumulus_primitives_core::Junctions::X2(Arc::new([ + cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), + cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }, + ])), + }; + + let acala_account_id_at_hydra: AccountId = + HashedDescription::>::convert_location(&xcm_origin_at_hydra) + .unwrap(); + + Hydra::execute_with(|| { + init_omnipool(); + + assert_ok!(hydradx_runtime::Balances::transfer_allow_death( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + acala_account_id_at_hydra.clone(), + 1_000 * UNITS, + )); + + assert_eq!( + hydradx_runtime::Currencies::free_balance(DAI, &AccountId::from(acala_account_id_at_hydra.clone())), + 0 + ); + }); + + // Act + Acala::execute_with(|| { + let omni_sell = + hydradx_runtime::RuntimeCall::Omnipool(pallet_omnipool::Call::::sell { + asset_in: HDX, + asset_out: DAI, + amount: UNITS, + min_buy_amount: 0, + }); + + let hdx_loc = Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new([ + cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ])), + ); + let asset_to_withdraw: Asset = Asset { + id: cumulus_primitives_core::AssetId(hdx_loc.clone()), + fun: Fungible(900 * UNITS), + }; + let asset_for_buy_execution: Asset = Asset { + id: cumulus_primitives_core::AssetId(hdx_loc), + fun: Fungible(800 * UNITS), + }; + + let message = Xcm(vec![ + WithdrawAsset(asset_to_withdraw.into()), + BuyExecution { + fees: asset_for_buy_execution, + weight_limit: Unlimited, + }, + Transact { + require_weight_at_most: omni_sell.get_dispatch_info().weight, + origin_kind: OriginKind::SovereignAccount, + call: omni_sell.encode().into(), + }, + ExpectTransactStatus(MaybeErrorCode::Success), + RefundSurplus, + DepositAsset { + assets: All.into(), + beneficiary: cumulus_primitives_core::Junction::AccountId32 { + id: acala_account_id_at_hydra.clone().into(), + network: None, + } + .into(), + }, + ]); + + let dest_hydradx = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::Parachain( + HYDRA_PARA_ID, + )])), + ); + + assert_ok!(hydradx_runtime::PolkadotXcm::send_xcm( + xcm_interior_at_acala, + dest_hydradx, + message + )); + }); + + // Assert + Hydra::execute_with(|| { + assert_xcm_message_processing_passed(); + let account = AccountId::from(acala_account_id_at_hydra); + + let dai_balance = hydradx_runtime::Currencies::free_balance(DAI, &account); + assert!( + dai_balance > 0, + "Omnipool sell swap failed as the user did not receive any DAI" + ); + + let last_swapped_events: Vec> = get_last_swapped_events(); + let last_two_swapped_events = &last_swapped_events[last_swapped_events.len() - 2..]; + + let event1 = &last_two_swapped_events[0]; + assert_operation_stack!(event1, [ExecutionType::Xcm(_, 0), ExecutionType::Omnipool(1)]); + + let event2 = &last_two_swapped_events[0]; + assert_operation_stack!(event2, [ExecutionType::Xcm(_, 0), ExecutionType::Omnipool(1)]); + }); +} + +#[test] +fn xcm_call_should_populate_unified_event_call_context() { + // Arrange + TestNet::reset(); + + let xcm_interior_at_acala = + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }])); + + let xcm_origin_at_hydra = Location { + parents: 1, + interior: cumulus_primitives_core::Junctions::X2(Arc::new([ + cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), + cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }, + ])), + }; + + let acala_account_id_at_hydra: AccountId = + HashedDescription::>::convert_location(&xcm_origin_at_hydra) + .unwrap(); + + Hydra::execute_with(|| { + init_omnipool(); + + assert_ok!(hydradx_runtime::Balances::transfer_allow_death( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + acala_account_id_at_hydra.clone(), + 1_000 * UNITS, + )); + + assert_eq!( + hydradx_runtime::Currencies::free_balance(DAI, &AccountId::from(acala_account_id_at_hydra.clone())), + 0 + ); + }); + + // Act + Acala::execute_with(|| { + let omni_sell = + hydradx_runtime::RuntimeCall::Omnipool(pallet_omnipool::Call::::sell { + asset_in: HDX, + asset_out: DAI, + amount: UNITS, + min_buy_amount: 0, + }); + + let hdx_loc = Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new([ + cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ])), + ); + let asset_to_withdraw: Asset = Asset { + id: cumulus_primitives_core::AssetId(hdx_loc.clone()), + fun: Fungible(900 * UNITS), + }; + let asset_for_buy_execution: Asset = Asset { + id: cumulus_primitives_core::AssetId(hdx_loc), + fun: Fungible(800 * UNITS), + }; + + let message = Xcm(vec![ + WithdrawAsset(asset_to_withdraw.into()), + BuyExecution { + fees: asset_for_buy_execution, + weight_limit: Unlimited, + }, + Transact { + require_weight_at_most: omni_sell.get_dispatch_info().weight, + origin_kind: OriginKind::SovereignAccount, + call: omni_sell.encode().into(), + }, + ExpectTransactStatus(MaybeErrorCode::Success), + RefundSurplus, + DepositAsset { + assets: All.into(), + beneficiary: cumulus_primitives_core::Junction::AccountId32 { + id: acala_account_id_at_hydra.clone().into(), + network: None, + } + .into(), + }, + ]); + + let dest_hydradx = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::Parachain( + HYDRA_PARA_ID, + )])), + ); + + assert_ok!(hydradx_runtime::PolkadotXcm::send_xcm( + xcm_interior_at_acala, + dest_hydradx, + message + )); + }); + + // Assert + Hydra::execute_with(|| { + assert_xcm_message_processing_passed(); + + let last_swapped_events: Vec> = get_last_swapped_events(); + let last_two_swapped_events = &last_swapped_events[last_swapped_events.len() - 2..]; + + let event1 = &last_two_swapped_events[0]; + assert_operation_stack!(event1, [ExecutionType::Xcm(_, 0), ExecutionType::Omnipool(1)]); + + let event2 = &last_two_swapped_events[0]; + assert_operation_stack!(event2, [ExecutionType::Xcm(_, 0), ExecutionType::Omnipool(1)]); + + let unified_event_context = pallet_support::Pallet::::get_context(); + assert!(unified_event_context.is_empty()); + }); +} + +#[test] +fn unified_event_context_should_be_cleared_when_error_happens_in_xcm_prepare() { + // Arrange + TestNet::reset(); + + let xcm_interior_at_acala = + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }])); + + let xcm_origin_at_hydra = Location { + parents: 1, + interior: cumulus_primitives_core::Junctions::X2(Arc::new([ + cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), + cumulus_primitives_core::Junction::AccountId32 { + network: None, + id: evm_account().into(), + }, + ])), + }; + + let acala_account_id_at_hydra: AccountId = + HashedDescription::>::convert_location(&xcm_origin_at_hydra) + .unwrap(); + + Hydra::execute_with(|| { + init_omnipool(); + + assert_ok!(hydradx_runtime::Balances::transfer_allow_death( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + acala_account_id_at_hydra.clone(), + 1_000 * UNITS, + )); + + assert_eq!( + hydradx_runtime::Currencies::free_balance(DAI, &AccountId::from(acala_account_id_at_hydra.clone())), + 0 + ); + }); + + // Act + Acala::execute_with(|| { + //We make a big xcm so it results in error + const ARRAY_REPEAT_VALUE: cumulus_primitives_core::Instruction<()> = RefundSurplus; + let message: cumulus_primitives_core::Xcm<()> = Xcm([ARRAY_REPEAT_VALUE; 10000].to_vec()); + + let dest_hydradx = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new([cumulus_primitives_core::Junction::Parachain( + HYDRA_PARA_ID, + )])), + ); + + assert_ok!(hydradx_runtime::PolkadotXcm::send_xcm( + xcm_interior_at_acala, + dest_hydradx, + message + )); + }); + + // Assert + Hydra::execute_with(|| { + let context = pallet_support::Pallet::::get_context(); + assert!(context.is_empty()) + }); +} diff --git a/math/Cargo.toml b/math/Cargo.toml index e18fb4add..30af6ef33 100644 --- a/math/Cargo.toml +++ b/math/Cargo.toml @@ -6,7 +6,7 @@ license = 'Apache-2.0' name = "hydra-dx-math" description = "A collection of utilities to make performing liquidity pool calculations more convenient." repository = 'https://github.com/galacticcouncil/hydradx-math' -version = "8.2.0" +version = "8.3.0" [dependencies] primitive-types = { workspace = true } diff --git a/math/src/stableswap/math.rs b/math/src/stableswap/math.rs index 992c70a01..efe41df6b 100644 --- a/math/src/stableswap/math.rs +++ b/math/src/stableswap/math.rs @@ -129,7 +129,7 @@ pub fn calculate_shares( amplification: Balance, share_issuance: Balance, fee: Permill, -) -> Option { +) -> Option<(Balance, Vec)> { if initial_reserves.len() != updated_reserves.len() { return None; } @@ -152,6 +152,7 @@ pub fn calculate_shares( let (d0, d1) = to_u256!(initial_d, updated_d); + let mut fees = vec![]; let adjusted_reserves = if share_issuance > 0 { updated_reserves .iter() @@ -161,6 +162,7 @@ pub fn calculate_shares( let ideal_balance = d1.checked_mul(initial_reserve)?.checked_div(d0)?; let diff = Balance::try_from(updated_reserve.abs_diff(ideal_balance)).ok()?; let fee_amount = fee.checked_mul_int(diff)?; + fees.push(fee_amount); Some(AssetReserve::new( asset_reserve.amount.saturating_sub(fee_amount), asset_reserve.decimals, @@ -174,11 +176,13 @@ pub fn calculate_shares( if share_issuance == 0 { // if first liquidity added - Some(updated_d) + Some((updated_d, fees)) } else { let (issuance_hp, d_diff, d0) = to_u256!(share_issuance, adjusted_d.checked_sub(initial_d)?, initial_d); let share_amount = issuance_hp.checked_mul(d_diff)?.checked_div(d0)?; - Balance::try_from(share_amount).ok() + let shares_amount = Balance::try_from(share_amount).ok()?; + + Some((shares_amount, fees)) } } @@ -190,7 +194,7 @@ pub fn calculate_shares_for_amount( amplification: Balance, share_issuance: Balance, fee: Permill, -) -> Option { +) -> Option<(Balance, Vec)> { let n_coins = initial_reserves.len(); if n_coins <= 1 { return None; @@ -218,6 +222,7 @@ pub fn calculate_shares_for_amount( let initial_d = calculate_d::(initial_reserves, amplification)?; let updated_d = calculate_d::(&updated_reserves, amplification)?; let (d1, d0) = to_u256!(updated_d, initial_d); + let mut fees = vec![]; let adjusted_reserves: Vec = updated_reserves .iter() .enumerate() @@ -226,6 +231,7 @@ pub fn calculate_shares_for_amount( let ideal_balance = d1.checked_mul(initial_reserve)?.checked_div(d0)?; let diff = Balance::try_from(updated_reserve.abs_diff(ideal_balance)).ok()?; let fee_amount = fee.checked_mul_int(diff)?; + fees.push(fee_amount); Some(AssetReserve::new( asset_reserve.amount.saturating_sub(fee_amount), asset_reserve.decimals, @@ -239,7 +245,9 @@ pub fn calculate_shares_for_amount( .checked_mul(d_diff)? .checked_div(d0)? .checked_add(U256::one())?; - Balance::try_from(share_amount).ok() + let shares = Balance::try_from(share_amount).ok()?; + + Some((shares, fees)) } pub fn calculate_liquidity_out(reserve: Balance, share_amount: Balance, share_issuance: Balance) -> Option { @@ -793,7 +801,7 @@ pub fn calculate_spot_price( } (SHARE_ASSET, STABLE_ASSET) => { let asset_out_idx = asset_reserves.iter().position(|r| r.0 == asset_out)?; - let shares = calculate_shares_for_amount::( + let (shares, _fees) = calculate_shares_for_amount::( &reserves, asset_out_idx, min_trade_amount, @@ -815,7 +823,7 @@ pub fn calculate_spot_price( } let update_reserves: &Vec = &updated_reserves.into_iter().map(|(_, v)| v).collect::>(); - let shares_for_min_trade = calculate_shares::( + let (shares_for_min_trade, _fees) = calculate_shares::( &reserves, update_reserves, amplification, diff --git a/math/src/stableswap/tests/invariants.rs b/math/src/stableswap/tests/invariants.rs index 98122f94b..5cf3cae5b 100644 --- a/math/src/stableswap/tests/invariants.rs +++ b/math/src/stableswap/tests/invariants.rs @@ -407,7 +407,7 @@ proptest! { let result = calculate_shares_for_amount::(&pool, 0, amount, amp, issuance, Permill::zero()).unwrap(); let received = - calculate_withdraw_one_asset::(&pool, result, 0, issuance, amp, Permill::zero()) + calculate_withdraw_one_asset::(&pool, result.0, 0, issuance, amp, Permill::zero()) .unwrap(); // LP should not receive more than provided. assert!(received.0 <= amount); diff --git a/math/src/stableswap/tests/multi_assets.rs b/math/src/stableswap/tests/multi_assets.rs index dfa7a3c36..998ecd5a9 100644 --- a/math/src/stableswap/tests/multi_assets.rs +++ b/math/src/stableswap/tests/multi_assets.rs @@ -92,11 +92,11 @@ fn calculate_share_for_amount_should_return_correct_shares() { let result = calculate_shares_for_amount::(&balances, 0, amount, amp, issuance, Permill::zero()).unwrap(); - assert_eq!(result, 40001593768209443008); + assert_eq!(result.0, 40001593768209443008); let result = calculate_withdraw_one_asset::( &balances, - result, + result.0, 0, issuance, amp, @@ -119,10 +119,10 @@ fn calculate_share_for_amount_should_return_correct_shares_when_fee_applied() { let result = calculate_shares_for_amount::(&balances, 0, amount, amp, issuance, fee).unwrap(); - assert_eq!(result, 40021594667568399481); + assert_eq!(result.0, 40021594667568399481); let result = - calculate_withdraw_one_asset::(&balances, result, 0, issuance, amp, fee).unwrap(); + calculate_withdraw_one_asset::(&balances, result.0, 0, issuance, amp, fee).unwrap(); assert_eq!(result, (99999975001371, 50023249592)); } @@ -142,7 +142,7 @@ fn calculate_shares_should_work_when_correct_input_provided() { let result = result.unwrap(); - assert_eq!(result, 9983u128); + assert_eq!(result.0, 9983u128); } #[test] @@ -161,7 +161,7 @@ fn calculate_shares_should_work_when_share_issuance_is_zero() { let result = result.unwrap(); - assert_eq!(result, 54991983151); + assert_eq!(result.0, 54991983151); } #[test] @@ -364,7 +364,7 @@ fn calculate_withdraw_should_return_correct_amount_when_removing_provided_shares let issuance: Balance = 100_000; let result = calculate_shares::(&initial_balances, &updated_balances, amp, issuance, Permill::zero()); - let shares = result.unwrap(); + let shares = result.unwrap().0; let result = calculate_withdraw_one_asset::( &updated_balances, @@ -705,7 +705,7 @@ fn calculate_exact_amount_of_shares() { let issuance: Balance = 20_000_000_000_000_000_000_000; let result = calculate_shares::(&initial_balances, &updated_balances, amp, issuance, Permill::zero()); - assert_eq!(result, Some(399850144492663029649)); + assert_eq!(result.unwrap().0, 399850144492663029649); let result = calculate_add_one_asset::( &initial_balances, 399850144492663029649, @@ -736,7 +736,7 @@ fn calculate_exact_amount_of_shares_with_fee() { issuance, Permill::from_percent(0), ); - assert_eq!(result, Some(399850144492663029649)); + assert_eq!(result.unwrap().0, 399850144492663029649); let result = calculate_add_one_asset::( &initial_balances, 399850144492663029649, @@ -805,3 +805,28 @@ fn share_price_calculation_should_work_with_6_decimals() { Some((279206572581786940496760242, 279158579738033226972960348441675415837)) ); } + +#[test] +fn calculate_shares_should_return_fees_for_all_assets() { + let amp = 100_u128; + + let initial_balances = [AssetReserve::new(10_000, 12); MAX_BALANCES]; + let mut updated_balances = [AssetReserve::new(10_000, 12); MAX_BALANCES]; + updated_balances[2].amount += 5000u128; + + let issuance: Balance = 100_000; + + let result = calculate_shares::( + &initial_balances, + &updated_balances, + amp, + issuance, + Permill::from_percent(1), + ); + + assert!(result.is_some()); + + let result = result.unwrap(); + + assert_eq!(result.1, vec![(3), (3), (12), (3), (3)]); +} diff --git a/math/src/stableswap/tests/two_assets.rs b/math/src/stableswap/tests/two_assets.rs index 2ee1983b4..45f919f18 100644 --- a/math/src/stableswap/tests/two_assets.rs +++ b/math/src/stableswap/tests/two_assets.rs @@ -108,7 +108,7 @@ fn test_shares() { let result = calculate_shares::(initial_reserves, updated_reserves, amp, 0u128, Permill::zero()); assert!(result.is_some()); - assert_eq!(result.unwrap(), 736626243363217809); + assert_eq!(result.unwrap().0, 736626243363217809); } #[test] fn remove_one_asset_should_work() { diff --git a/pallets/circuit-breaker/Cargo.toml b/pallets/circuit-breaker/Cargo.toml index 059c27660..8fdd79b35 100644 --- a/pallets/circuit-breaker/Cargo.toml +++ b/pallets/circuit-breaker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-circuit-breaker" -version = "1.1.27" +version = "1.1.28" authors = ["GalacticCouncil "] edition = "2021" license = "Apache-2.0" @@ -31,6 +31,7 @@ hydradx-traits = { workspace = true } [dev-dependencies] pallet-omnipool = { workspace = true } +pallet-support = { workspace = true } pallet-balances = { workspace = true } orml-tokens = { workspace = true } orml-traits = { workspace = true } diff --git a/pallets/circuit-breaker/src/tests/mock.rs b/pallets/circuit-breaker/src/tests/mock.rs index bf61eddee..9346b03ed 100644 --- a/pallets/circuit-breaker/src/tests/mock.rs +++ b/pallets/circuit-breaker/src/tests/mock.rs @@ -24,7 +24,7 @@ use frame_system::EnsureRoot; use hydra_dx_math::omnipool::types::BalanceUpdate; use orml_traits::{parameter_type_with_key, GetByKey}; use sp_core::H256; -use sp_runtime::traits::{ConstU128, ConstU32, Zero}; +use sp_runtime::traits::{ConstU128, ConstU32}; use sp_runtime::DispatchResult; use sp_runtime::FixedU128; use sp_runtime::Permill; @@ -86,6 +86,7 @@ frame_support::construct_runtime!( Omnipool: pallet_omnipool, Tokens: orml_tokens, CircuitBreaker: pallet_circuit_breaker, + AmmSupport:pallet_support, } ); @@ -231,6 +232,10 @@ impl pallet_omnipool::Config for Test { type Fee = FeeProvider; } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + pub struct CircuitBreakerHooks(PhantomData); impl OmnipoolHooks for CircuitBreakerHooks @@ -313,8 +318,8 @@ where _trader: AccountId, _asset: AssetId, _amount: Balance, - ) -> Result { - Ok(Balance::zero()) + ) -> Result>, Self::Error> { + Ok(vec![]) } } diff --git a/pallets/dca/Cargo.toml b/pallets/dca/Cargo.toml index 36a55efc2..e4eca4ae1 100644 --- a/pallets/dca/Cargo.toml +++ b/pallets/dca/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-dca' -version = "1.6.4" +version = "1.7.0" description = 'A pallet to manage DCA scheduling' authors = ['GalacticCouncil'] edition = '2021' @@ -34,6 +34,7 @@ pallet-omnipool = { workspace = true } hydradx-traits = { workspace = true } hydradx-adapters = { workspace = true } pallet-ema-oracle = { workspace = true } +pallet-support = { workspace = true } hydra-dx-math = { workspace = true } diff --git a/pallets/dca/src/lib.rs b/pallets/dca/src/lib.rs index e8d19973c..ae9092c92 100644 --- a/pallets/dca/src/lib.rs +++ b/pallets/dca/src/lib.rs @@ -76,13 +76,6 @@ use frame_system::{ pallet_prelude::{BlockNumberFor, OriginFor}, Origin, }; -use hydradx_adapters::RelayChainBlockHashProvider; -use hydradx_traits::fee::{InspectTransactionFeeCurrency, SwappablePaymentAssetTrader}; -use hydradx_traits::router::{inverse_route, RouteProvider}; -use hydradx_traits::router::{AmmTradeWeights, AmountInAndOut, RouterT, Trade}; -use hydradx_traits::NativePriceOracle; -use hydradx_traits::OraclePeriod; -use hydradx_traits::PriceOracle; use orml_traits::{arithmetic::CheckedAdd, MultiCurrency, NamedMultiReservableCurrency}; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; @@ -92,8 +85,22 @@ use sp_runtime::{ traits::{BlockNumberProvider, Saturating}, ArithmeticError, BoundedVec, DispatchError, FixedPointNumber, FixedU128, Percent, Permill, Rounding, }; +use sp_std::cmp::min; use sp_std::vec::Vec; -use sp_std::{cmp::min, vec}; + +use hydradx_adapters::RelayChainBlockHashProvider; +use hydradx_traits::fee::{InspectTransactionFeeCurrency, SwappablePaymentAssetTrader}; +use hydradx_traits::router::{inverse_route, RouteProvider}; +use hydradx_traits::router::{AmmTradeWeights, AmountInAndOut, RouterT, Trade}; +use hydradx_traits::NativePriceOracle; +use hydradx_traits::OraclePeriod; +use hydradx_traits::PriceOracle; +pub use pallet::*; +use pallet_support::types::ExecutionType; +pub use weights::WeightInfo; + +// Re-export pallet items so that they can be accessed from the crate namespace. +use crate::types::*; #[cfg(test)] mod tests; @@ -101,29 +108,23 @@ mod tests; pub mod types; pub mod weights; -pub use weights::WeightInfo; - -// Re-export pallet items so that they can be accessed from the crate namespace. -use crate::types::*; -pub use pallet::*; - pub const SHORT_ORACLE_BLOCK_PERIOD: u32 = 10; pub const MAX_NUMBER_OF_RETRY_FOR_RESCHEDULING: u32 = 10; pub const FEE_MULTIPLIER_FOR_MIN_TRADE_LIMIT: Balance = 20; #[frame_support::pallet] pub mod pallet { - use super::*; use frame_support::traits::Contains; - use frame_support::weights::WeightToFee; - use frame_system::pallet_prelude::OriginFor; + use orml_traits::NamedMultiReservableCurrency; + use sp_runtime::Percent; + use hydra_dx_math::ema::EmaPrice; use hydradx_traits::fee::SwappablePaymentAssetTrader; use hydradx_traits::{NativePriceOracle, PriceOracle}; - use orml_traits::NamedMultiReservableCurrency; - use sp_runtime::Percent; + + use super::*; #[pallet::pallet] pub struct Pallet(_); @@ -205,7 +206,7 @@ pub mod pallet { } #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -330,7 +331,9 @@ pub mod pallet { who: T::AccountId, block: BlockNumberFor, }, - ///The DCA trade is successfully executed + /// Deprecated. Use pallet_amm::Event::Swapped instead. + /// The DCA trade is successfully executed + //TODO: remove once we migrated completely to pallet_amm::Event::Swapped TradeExecuted { id: ScheduleId, who: T::AccountId, @@ -691,9 +694,10 @@ impl Pallet { schedule_id: ScheduleId, schedule: &Schedule>, ) -> Result, DispatchError> { - let origin: OriginFor = Origin::::Signed(schedule.owner.clone()).into(); + pallet_support::Pallet::::add_to_context(|id| ExecutionType::DCA(schedule_id, id))?; - match &schedule.order { + let origin: OriginFor = Origin::::Signed(schedule.owner.clone()).into(); + let trade_result = match &schedule.order { Order::Sell { asset_in, asset_out, @@ -776,7 +780,11 @@ impl Pallet { amount_out: *amount_out, }) } - } + }; + + pallet_support::Pallet::::remove_from_context()?; + + trade_result } fn replan_or_complete( diff --git a/pallets/dca/src/tests/mock.rs b/pallets/dca/src/tests/mock.rs index a2a6fad25..a9143fecc 100644 --- a/pallets/dca/src/tests/mock.rs +++ b/pallets/dca/src/tests/mock.rs @@ -79,6 +79,7 @@ frame_support::construct_runtime!( Balances: pallet_balances, Currencies: pallet_currencies, EmaOracle: pallet_ema_oracle, + AmmSupport:pallet_support, } ); @@ -357,6 +358,10 @@ parameter_types! { } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + type Pools = (OmniPool, Xyk); impl pallet_route_executor::Config for Test { @@ -368,11 +373,11 @@ impl pallet_route_executor::Config for Test { type AMM = Pools; type InspectRegistry = DummyRegistry; type DefaultRoutePoolType = DefaultRoutePoolType; - type WeightInfo = (); type ForceInsertOrigin = EnsureRoot; type EdToRefundCalculator = MockedEdCalculator; type OraclePriceProvider = PriceProviderMock; type OraclePeriod = RouteValidationOraclePeriod; + type WeightInfo = (); } pub struct MockedEdCalculator; diff --git a/pallets/lbp/Cargo.toml b/pallets/lbp/Cargo.toml index 10cf93584..7b13597ab 100644 --- a/pallets/lbp/Cargo.toml +++ b/pallets/lbp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-lbp" -version = "4.8.6" +version = "4.10.0" description = "HydraDX Liquidity Bootstrapping Pool Pallet" authors = ["GalacticCouncil"] edition = "2021" @@ -20,9 +20,10 @@ scale-info = { workspace = true } primitive-types = { workspace = true } serde = { workspace = true, optional = true } -## Local dependencies +# HydraDX dependencies hydra-dx-math = { workspace = true } hydradx-traits = { workspace = true } +pallet-support = { workspace = true } ## ORML dependencies orml-traits = { workspace = true } @@ -66,5 +67,6 @@ std = [ 'frame-benchmarking/std', "scale-info/std", "hydra-dx-math/std", + "pallet-support/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/lbp/src/lib.rs b/pallets/lbp/src/lib.rs index aa3060a1d..c9b39a572 100644 --- a/pallets/lbp/src/lib.rs +++ b/pallets/lbp/src/lib.rs @@ -28,7 +28,6 @@ use frame_support::sp_runtime::{ DispatchError, RuntimeDebug, }; use frame_support::{ - dispatch, dispatch::DispatchResult, ensure, traits::{EnsureOrigin, Get, LockIdentifier}, @@ -38,6 +37,8 @@ use frame_system::ensure_signed; use frame_system::pallet_prelude::BlockNumberFor; use hydra_dx_math::types::LBPWeight; use hydradx_traits::{AMMTransfer, AssetPairAccountIdFor, CanCreatePool, LockedBalance, AMM}; +use pallet_support::types::{Asset, Fee}; + use orml_traits::{MultiCurrency, MultiCurrencyExtended, MultiLockableCurrency}; use scale_info::TypeInfo; @@ -184,7 +185,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Multi currency for transfer of currencies @@ -342,6 +343,7 @@ pub mod pallet { }, /// Sale executed. + /// Deprecated. Replaced by pallet_support::Swapped SellExecuted { who: T::AccountId, asset_in: AssetId, @@ -353,6 +355,7 @@ pub mod pallet { }, /// Purchase executed. + /// Deprecated. Replaced by pallet_support::Swapped BuyExecuted { who: T::AccountId, asset_out: AssetId, @@ -718,7 +721,8 @@ pub mod pallet { /// - `amount`: The amount of `asset_in` /// - `max_limit`: minimum amount of `asset_out` / amount of asset_out to be obtained from the pool in exchange for `asset_in`. /// - /// Emits `SellExecuted` when successful. + /// Emits `SellExecuted` when successful. Deprecated. + /// Emits `pallet_support::Swapped` when successful. #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::sell())] pub fn sell( @@ -748,7 +752,8 @@ pub mod pallet { /// - `amount`: The amount of `asset_out`. /// - `max_limit`: maximum amount of `asset_in` to be sold in exchange for `asset_out`. /// - /// Emits `BuyExecuted` when successful. + /// Emits `BuyExecuted` when successful. Deprecated. + /// Emits `pallet_support::Swapped` when successful. #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::buy())] pub fn buy( @@ -1102,6 +1107,7 @@ impl AMM> for Pallet) -> DispatchResult { Self::execute_trade(transfer)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::::SellExecuted { who: transfer.origin.clone(), asset_in: transfer.assets.asset_in, @@ -1112,6 +1118,23 @@ impl AMM> for Pallet>::try_get(&pool_account).map_err(|_| Error::::PoolNotFound)?; + + pallet_support::Pallet::::deposit_trade_event( + transfer.origin.clone(), + pool_account, + pallet_support::types::Filler::LBP, + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(transfer.assets.asset_in, transfer.amount)], + vec![Asset::new(transfer.assets.asset_out, transfer.amount_b)], + vec![Fee { + asset: transfer.fee.0, + amount: transfer.fee.1, + recipient: pool.fee_collector, + }], + ); + Ok(()) } @@ -1236,9 +1259,10 @@ impl AMM> for Pallet>, _destination: Option<&T::AccountId>, - ) -> dispatch::DispatchResult { + ) -> DispatchResult { Self::execute_trade(transfer)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::::BuyExecuted { who: transfer.origin.clone(), asset_out: transfer.assets.asset_out, @@ -1248,6 +1272,24 @@ impl AMM> for Pallet>::try_get(&pool_account).map_err(|_| Error::::PoolNotFound)?; + + pallet_support::Pallet::::deposit_trade_event( + transfer.origin.clone(), + pool_account, + pallet_support::types::Filler::LBP, + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new(transfer.assets.asset_in, transfer.amount)], + vec![Asset::new(transfer.assets.asset_out, transfer.amount_b)], + vec![Fee { + asset: transfer.fee.0, + amount: transfer.fee.1, + recipient: pool.fee_collector, + }], + ); + Ok(()) } diff --git a/pallets/lbp/src/mock.rs b/pallets/lbp/src/mock.rs index d186613b3..e702abc6a 100644 --- a/pallets/lbp/src/mock.rs +++ b/pallets/lbp/src/mock.rs @@ -75,6 +75,7 @@ frame_support::construct_runtime!( System: frame_system, LBPPallet: lbp, Currency: orml_tokens, + AmmSupport:pallet_support, } ); @@ -175,6 +176,10 @@ impl LockedBalance for MultiLockedBalance { } } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + impl Config for Test { type RuntimeEvent = RuntimeEvent; type MultiCurrency = Currency; diff --git a/pallets/lbp/src/tests.rs b/pallets/lbp/src/tests.rs index 16632ba64..0ef4c0dff 100644 --- a/pallets/lbp/src/tests.rs +++ b/pallets/lbp/src/tests.rs @@ -1809,6 +1809,7 @@ fn execute_sell_should_work() { let asset_in = KUSD; let asset_out = BSX; let pool_id = LBPPallet::get_pair_id(AssetPair { asset_in, asset_out }); + let pool_data = >::try_get(pool_id).unwrap(); let amount_in = 8_000_000_u128; let amount_b = 20_000_000_u128; @@ -1831,16 +1832,29 @@ fn execute_sell_should_work() { assert_ok!(LBPPallet::execute_sell(&t)); - expect_events(vec![Event::SellExecuted { - who: ALICE, - asset_in, - asset_out, - amount: amount_in, - sale_price: amount_b, - fee_asset: asset_in, - fee_amount: 1_000, - } - .into()]); + expect_events(vec![ + Event::SellExecuted { + who: ALICE, + asset_in, + asset_out, + amount: amount_in, + sale_price: amount_b, + fee_asset: asset_in, + fee_amount: 1_000, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_in, amount_in)], + outputs: vec![Asset::new(asset_out, amount_b)], + fees: vec![Fee::new(asset_in, 1_000, pool_data.fee_collector)], + operation_stack: vec![], + } + .into(), + ]); assert_eq!(Currency::free_balance(asset_in, &ALICE), 999_998_991_999_000); assert_eq!(Currency::free_balance(asset_out, &ALICE), 999_998_020_000_000); @@ -1848,17 +1862,6 @@ fn execute_sell_should_work() { assert_eq!(Currency::free_balance(asset_in, &pool_id), 1_008_000_000); assert_eq!(Currency::free_balance(asset_out, &pool_id), 1_980_000_000); - - expect_events(vec![Event::SellExecuted { - who: ALICE, - asset_in, - asset_out, - amount: 8_000_000, - sale_price: 20_000_000, - fee_asset: asset_in, - fee_amount: 1_000, - } - .into()]); }); } @@ -1940,6 +1943,7 @@ fn execute_buy_should_work() { let asset_in = KUSD; let asset_out = BSX; let pool_id = LBPPallet::get_pair_id(AssetPair { asset_in, asset_out }); + let pool_data = >::try_get(pool_id).unwrap(); let amount_in = 8_000_000_u128; let amount_b = 20_000_000_u128; @@ -1971,16 +1975,29 @@ fn execute_buy_should_work() { assert_eq!(Currency::free_balance(asset_in, &pool_id), 1_008_000_000); assert_eq!(Currency::free_balance(asset_out, &pool_id), 1_980_000_000); - expect_events(vec![Event::BuyExecuted { - who: ALICE, - asset_out, - asset_in, - amount: 8_000_000, - buy_price: 20_000_000, - fee_asset: asset_in, - fee_amount: 1_000, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: ALICE, + asset_in, + asset_out, + amount: amount_in, + buy_price: amount_b, + fee_asset: asset_in, + fee_amount: 1_000, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_in, amount_in)], + outputs: vec![Asset::new(asset_out, amount_b)], + fees: vec![Fee::new(asset_in, 1_000, pool_data.fee_collector)], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -2275,6 +2292,7 @@ fn buy_should_work() { let asset_in = KUSD; let asset_out = BSX; let pool_id = LBPPallet::get_pair_id(AssetPair { asset_in, asset_out }); + let pool_data = >::try_get(pool_id).unwrap(); //start sale set_block_number(11); @@ -2286,6 +2304,30 @@ fn buy_should_work() { 2_000_000_000_u128 )); + expect_events(vec![ + Event::BuyExecuted { + who: buyer, + asset_in, + asset_out, + amount: 17_894_738, + buy_price: 10_000_000, + fee_asset: asset_in, + fee_amount: 35860, + } + .into(), + pallet_support::Event::Swapped { + swapper: buyer, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_in, 17_894_738)], + outputs: vec![Asset::new(asset_out, 10_000_000)], + fees: vec![Fee::new(asset_in, 35860, pool_data.fee_collector)], + operation_stack: vec![], // calling buy directly from the pallet doesn't set event_id + } + .into(), + ]); + assert_eq!(Currency::free_balance(asset_in, &buyer), 999_999_982_069_402); assert_eq!(Currency::free_balance(asset_out, &buyer), 1_000_000_010_000_000); assert_eq!(Currency::free_balance(asset_in, &pool_id), 1_017_894_738); @@ -2393,6 +2435,8 @@ fn buy_should_work_when_limit_is_set_above_account_balance() { let buyer = BOB; let asset_in = KUSD; let asset_out = BSX; + let pool_id = LBPPallet::get_pair_id(AssetPair { asset_in, asset_out }); + let pool_data = >::try_get(pool_id).unwrap(); //start sale set_block_number(11); @@ -2405,16 +2449,29 @@ fn buy_should_work_when_limit_is_set_above_account_balance() { u128::MAX, )); - expect_events(vec![Event::BuyExecuted { - who: buyer, - asset_out: BSX, - asset_in: KUSD, - amount: 17_894_738, - buy_price: 10_000_000, - fee_asset: KUSD, - fee_amount: 35_860, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: buyer, + asset_in, + asset_out, + amount: 17_894_738, + buy_price: 10_000_000, + fee_asset: asset_in, + fee_amount: 35860, + } + .into(), + pallet_support::Event::Swapped { + swapper: buyer, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_in, 17_894_738)], + outputs: vec![Asset::new(asset_out, 10_000_000)], + fees: vec![Fee::new(asset_in, 35860, pool_data.fee_collector)], + operation_stack: vec![], + } + .into(), + ]); // swap assets set_block_number(11); @@ -2426,16 +2483,30 @@ fn buy_should_work_when_limit_is_set_above_account_balance() { u128::MAX, )); - expect_events(vec![Event::BuyExecuted { - who: buyer, - asset_out: KUSD, - asset_in: BSX, - amount: 5_560_304, - buy_price: 10_000_000, - fee_asset: KUSD, - fee_amount: 20_000, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: buyer, + asset_in: BSX, + asset_out: KUSD, + amount: 5_560_304, + buy_price: 10_000_000, + fee_asset: KUSD, + fee_amount: 20_000, + } + .into(), + pallet_support::Event::Swapped { + swapper: buyer, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(BSX, 5_560_304)], + outputs: vec![Asset::new(KUSD, 10_000_000)], + + fees: vec![Fee::new(KUSD, 20_000, pool_data.fee_collector)], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -2465,17 +2536,6 @@ fn update_pool_data_after_sale_should_not_work() { set_block_number(41); - expect_events(vec![Event::BuyExecuted { - who: buyer, - asset_out: BSX, - asset_in: KUSD, - amount: 17_894_738, - buy_price: 10_000_000, - fee_asset: KUSD, - fee_amount: 35_860, - } - .into()]); - assert_noop!( LBPPallet::update_pool_data( Origin::signed(ALICE), @@ -2501,6 +2561,7 @@ fn sell_should_work() { let asset_in = KUSD; let asset_out = BSX; let pool_id = LBPPallet::get_pair_id(AssetPair { asset_in, asset_out }); + let pool_data = >::try_get(pool_id).unwrap(); //start sale set_block_number(11); @@ -2513,6 +2574,30 @@ fn sell_should_work() { 2_000_u128 )); + expect_events(vec![ + Event::SellExecuted { + who: buyer, + asset_in, + asset_out, + amount: 9_980_000, + sale_price: 5_605_138, + fee_asset: asset_in, + fee_amount: 20_000, + } + .into(), + pallet_support::Event::Swapped { + swapper: buyer, + filler: pool_id, + filler_type: pallet_support::types::Filler::LBP, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_in, 9_980_000)], + outputs: vec![Asset::new(asset_out, 5_605_138)], + fees: vec![Fee::new(asset_in, 20_000, pool_data.fee_collector)], + operation_stack: vec![], + } + .into(), + ]); + assert_eq!(Currency::free_balance(asset_in, &buyer), 999_999_990_000_000); assert_eq!(Currency::free_balance(asset_out, &buyer), 1_000_000_005_605_138); assert_eq!(Currency::free_balance(asset_in, &pool_id), 1_009_980_000); diff --git a/pallets/lbp/src/trade_execution.rs b/pallets/lbp/src/trade_execution.rs index 0846640cb..423f4a6d5 100644 --- a/pallets/lbp/src/trade_execution.rs +++ b/pallets/lbp/src/trade_execution.rs @@ -5,6 +5,7 @@ use orml_traits::MultiCurrency; use sp_runtime::traits::BlockNumberProvider; use sp_runtime::DispatchError::Corruption; use sp_runtime::{ArithmeticError, DispatchError, FixedPointNumber, FixedU128}; + impl TradeExecution for Pallet { type Error = DispatchError; diff --git a/pallets/liquidation/Cargo.toml b/pallets/liquidation/Cargo.toml index ac08765bb..98b243076 100644 --- a/pallets/liquidation/Cargo.toml +++ b/pallets/liquidation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-liquidation' -version = '1.0.1' +version = '1.0.2' description = 'A pallet for money market liquidations' authors = ['GalacticCouncil'] edition = '2021' @@ -33,6 +33,9 @@ hex-literal = { workspace = true } # HydraDX dependencies hydradx-traits = { workspace = true } +pallet-support = { workspace = true } + + # Optional imports for benchmarking frame-benchmarking = { workspace = true, optional = true } pallet-evm-accounts = { workspace = true, optional = true } diff --git a/pallets/liquidation/src/tests/mock.rs b/pallets/liquidation/src/tests/mock.rs index 9aaf194d3..579f144e8 100644 --- a/pallets/liquidation/src/tests/mock.rs +++ b/pallets/liquidation/src/tests/mock.rs @@ -60,6 +60,7 @@ frame_support::construct_runtime!( Router: pallet_route_executor, EvmAccounts: pallet_evm_accounts, Liquidation: pallet_liquidation, + AmmSupport:pallet_support, } ); @@ -244,6 +245,10 @@ impl pallet_route_executor::Config for Test { type WeightInfo = (); } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + parameter_types! { pub const BlockHashCount: u64 = 250; pub const SS58Prefix: u8 = 63; diff --git a/pallets/liquidity-mining/Cargo.toml b/pallets/liquidity-mining/Cargo.toml index a278095dc..a94f4b733 100644 --- a/pallets/liquidity-mining/Cargo.toml +++ b/pallets/liquidity-mining/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-liquidity-mining" -version = "4.4.4" +version = "4.4.5" description = "Liquidity mining" authors = ["GalacticCouncil"] edition = "2021" @@ -34,6 +34,7 @@ test-utils = { workspace = true } sp-io = { workspace = true } sp-core = { workspace = true } orml-tokens = { workspace = true } +primitives = { workspace = true } pallet-balances = { workspace = true } fixed = { workspace = true } proptest = { workspace = true } diff --git a/pallets/omnipool-liquidity-mining/Cargo.toml b/pallets/omnipool-liquidity-mining/Cargo.toml index 50b3d4d00..21330faba 100644 --- a/pallets/omnipool-liquidity-mining/Cargo.toml +++ b/pallets/omnipool-liquidity-mining/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-omnipool-liquidity-mining" -version = "2.5.0" +version = "2.5.1" authors = ['GalacticCouncil'] edition = "2021" license = "Apache-2.0" @@ -51,6 +51,7 @@ sp-io = { workspace = true, optional = true } [dev-dependencies] sp-io = { workspace = true } sp-core = { workspace = true } +pallet-support = { workspace = true } orml-tokens = { workspace = true } pretty_assertions = { workspace = true } test-utils = { workspace = true } diff --git a/pallets/omnipool-liquidity-mining/src/tests/mock.rs b/pallets/omnipool-liquidity-mining/src/tests/mock.rs index 9353b4ece..853dc1db3 100644 --- a/pallets/omnipool-liquidity-mining/src/tests/mock.rs +++ b/pallets/omnipool-liquidity-mining/src/tests/mock.rs @@ -110,6 +110,7 @@ construct_runtime!( WarehouseLM: warehouse_liquidity_mining::, OmnipoolMining: omnipool_liquidity_mining, EmaOracle: pallet_ema_oracle, + AmmSupport:pallet_support, } ); @@ -307,6 +308,10 @@ impl pallet_omnipool::Config for Test { type Fee = FeeProvider; } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + pub struct ExtBuilder { endowed_accounts: Vec<(AccountId, AssetId, Balance)>, registered_assets: Vec, diff --git a/pallets/omnipool/Cargo.toml b/pallets/omnipool/Cargo.toml index e5cdb43c8..2a2576698 100644 --- a/pallets/omnipool/Cargo.toml +++ b/pallets/omnipool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-omnipool" -version = "4.3.7" +version = "4.5.0" authors = ['GalacticCouncil'] edition = "2021" license = "Apache-2.0" @@ -17,6 +17,11 @@ targets = ["x86_64-unknown-linux-gnu"] scale-info = { workspace = true } codec = { workspace = true } +# HydraDX dependencies +hydradx-traits = { workspace = true } +hydra-dx-math = { workspace = true } +pallet-support = { workspace = true } + # primitives sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -28,11 +33,6 @@ frame-system = { workspace = true } # ORML orml-traits = { workspace = true } -# Warehouse -hydradx-traits = { workspace = true } - -hydra-dx-math = { workspace = true } - # third party primitive-types = { workspace = true } bitflags = { workspace = true } @@ -54,6 +54,7 @@ frame-benchmarking = { workspace = true } orml-tokens = { workspace = true } proptest = { workspace = true } pretty_assertions = { workspace = true } +test-utils = { workspace = true } [features] default = ["std"] @@ -69,6 +70,10 @@ std = [ "pallet-balances/std", "orml-tokens/std", "frame-benchmarking/std", + "pallet-support/std", + 'hydradx-traits/std', + 'hydra-dx-math/std', + 'orml-traits/std', ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/pallets/omnipool/src/lib.rs b/pallets/omnipool/src/lib.rs index a9c5c046e..ca8fee115 100644 --- a/pallets/omnipool/src/lib.rs +++ b/pallets/omnipool/src/lib.rs @@ -84,27 +84,26 @@ #![cfg_attr(not(feature = "std"), no_std)] +use crate::traits::ShouldAllow; use frame_support::pallet_prelude::{DispatchResult, Get}; use frame_support::require_transactional; +use frame_support::traits::tokens::nonfungibles::{Create, Inspect, Mutate}; use frame_support::PalletId; use frame_support::{ensure, transactional}; -use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned, One}; -use sp_runtime::traits::{CheckedAdd, CheckedSub, Zero}; -use sp_std::ops::{Add, Sub}; -use sp_std::prelude::*; - -use crate::traits::ShouldAllow; -use frame_support::traits::tokens::nonfungibles::{Create, Inspect, Mutate}; -use frame_system::ensure_signed; -use frame_system::pallet_prelude::OriginFor; +use frame_system::{ensure_signed, pallet_prelude::OriginFor}; use hydra_dx_math::ema::EmaPrice; use hydra_dx_math::omnipool::types::{AssetStateChange, BalanceUpdate, I129}; use hydradx_traits::registry::Inspect as RegistryInspect; use orml_traits::{GetByKey, MultiCurrency}; +use pallet_support::types::{Asset, ExecutionType, Fee}; #[cfg(feature = "try-runtime")] use primitive_types::U256; use scale_info::TypeInfo; +use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned, One}; +use sp_runtime::traits::{CheckedAdd, CheckedSub, Zero}; use sp_runtime::{ArithmeticError, DispatchError, FixedPointNumber, FixedU128, Permill}; +use sp_std::ops::{Add, Sub}; +use sp_std::prelude::*; #[cfg(test)] mod tests; @@ -142,7 +141,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -155,7 +154,8 @@ pub mod pallet { + HasCompact + MaybeSerializeDeserialize + MaxEncodedLen - + TypeInfo; + + TypeInfo + + Into; /// Multi currency mechanism type Currency: MultiCurrency; @@ -305,6 +305,8 @@ pub mod pallet { shares_removed: Balance, }, /// Sell trade executed. + /// Deprecated. Replaced by pallet_support::Swapped + //TODO: remove when completely migrated to new Swapped event SellExecuted { who: T::AccountId, asset_in: T::AssetId, @@ -317,6 +319,8 @@ pub mod pallet { protocol_fee_amount: Balance, }, /// Buy trade executed. + /// Deprecated. Replaced bypallet_support::Swapped + //TODO: remove when completely migrated to new Swapped event BuyExecuted { who: T::AccountId, asset_in: T::AssetId, @@ -902,7 +906,8 @@ pub mod pallet { /// - `amount`: Amount of asset sold /// - `min_buy_amount`: Minimum amount required to receive /// - /// Emits `SellExecuted` event when successful. + /// Emits `SellExecuted` event when successful. Deprecated. + /// Emits `pallet_support::Swapped` event when successful. /// #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::sell() @@ -1069,7 +1074,7 @@ pub mod pallet { Self::update_hdx_subpool_hub_asset(origin, state_changes.hdx_hub_amount)?; - Self::process_trade_fee(&who, asset_out, state_changes.fee.asset_fee)?; + let trade_fees = Self::process_trade_fee(&who, asset_out, state_changes.fee.asset_fee)?; debug_assert!(*state_changes.asset_in.delta_hub_reserve >= *state_changes.asset_out.delta_hub_reserve); debug_assert_eq!( @@ -1078,7 +1083,7 @@ pub mod pallet { ); Self::deposit_event(Event::SellExecuted { - who, + who: who.clone(), asset_in, asset_out, amount_in: amount, @@ -1089,6 +1094,42 @@ pub mod pallet { protocol_fee_amount: state_changes.fee.protocol_fee, }); + pallet_support::Pallet::::add_to_context(ExecutionType::Omnipool)?; + + //Swapped event for AssetA to HubAsset + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(asset_in.into(), amount)], + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset_in.delta_hub_reserve, + )], + vec![Fee::new( + T::HubAssetId::get().into(), + state_changes.fee.protocol_fee, + Self::protocol_account(), + )], + ); + + //Swapped event for HubAsset to AssetB + pallet_support::Pallet::::deposit_trade_event( + who, + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset_out.delta_hub_reserve, + )], + vec![Asset::new(asset_out.into(), *state_changes.asset_out.delta_reserve)], + trade_fees, + ); + + pallet_support::Pallet::::remove_from_context()?; + #[cfg(feature = "try-runtime")] Self::ensure_trade_invariant( (asset_in, asset_in_state, new_asset_in_state), @@ -1112,7 +1153,8 @@ pub mod pallet { /// - `amount`: Amount of asset sold /// - `max_sell_amount`: Maximum amount to be sold. /// - /// Emits `BuyExecuted` event when successful. + /// Emits `BuyExecuted` event when successful. Deprecated. + /// Emits `pallet_support::Swapped` event when successful. /// #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::buy() @@ -1273,7 +1315,7 @@ pub mod pallet { Self::update_hdx_subpool_hub_asset(origin, state_changes.hdx_hub_amount)?; - Self::process_trade_fee(&who, asset_out, state_changes.fee.asset_fee)?; + let trade_fees = Self::process_trade_fee(&who, asset_out, state_changes.fee.asset_fee)?; debug_assert!(*state_changes.asset_in.delta_hub_reserve >= *state_changes.asset_out.delta_hub_reserve); debug_assert_eq!( @@ -1282,7 +1324,7 @@ pub mod pallet { ); Self::deposit_event(Event::BuyExecuted { - who, + who: who.clone(), asset_in, asset_out, amount_in: *state_changes.asset_in.delta_reserve, @@ -1293,6 +1335,42 @@ pub mod pallet { protocol_fee_amount: state_changes.fee.protocol_fee, }); + pallet_support::Pallet::::add_to_context(ExecutionType::Omnipool)?; + + //Swapped even from AssetA to HubAsset + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new(asset_in.into(), *state_changes.asset_in.delta_reserve)], + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset_in.delta_hub_reserve, + )], + vec![Fee::new( + T::HubAssetId::get().into(), + state_changes.fee.protocol_fee, + Self::protocol_account(), + )], + ); + + //Swapped even from HubAsset to AssetB + pallet_support::Pallet::::deposit_trade_event( + who, + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset_out.delta_hub_reserve, + )], + vec![Asset::new(asset_out.into(), *state_changes.asset_out.delta_reserve)], + trade_fees, + ); + + pallet_support::Pallet::::remove_from_context()?; + #[cfg(feature = "try-runtime")] Self::ensure_trade_invariant( (asset_in, asset_in_state, new_asset_in_state), @@ -1796,7 +1874,7 @@ impl Pallet { Self::set_asset_state(asset_out, new_asset_out_state); - Self::process_trade_fee(who, asset_out, state_changes.fee.asset_fee)?; + let trade_fees = Self::process_trade_fee(who, asset_out, state_changes.fee.asset_fee)?; Self::deposit_event(Event::SellExecuted { who: who.clone(), @@ -1810,6 +1888,20 @@ impl Pallet { protocol_fee_amount: state_changes.fee.protocol_fee, }); + //No protocol fee in case of selling hub asset + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset.delta_hub_reserve, + )], + vec![Asset::new(asset_out.into(), *state_changes.asset.delta_reserve)], + trade_fees, + ); + T::OmnipoolHooks::on_hub_asset_trade(origin, info)?; Ok(()) @@ -1903,8 +1995,9 @@ impl Pallet { Self::set_asset_state(asset_out, new_asset_out_state); - Self::process_trade_fee(who, asset_out, state_changes.fee.asset_fee)?; + let trade_fees = Self::process_trade_fee(who, asset_out, state_changes.fee.asset_fee)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::BuyExecuted { who: who.clone(), asset_in: T::HubAssetId::get(), @@ -1917,6 +2010,20 @@ impl Pallet { protocol_fee_amount: state_changes.fee.protocol_fee, }); + //No protocol fee in case of buying asset for hub asset + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + Self::protocol_account(), + pallet_support::types::Filler::Omnipool, + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new( + T::HubAssetId::get().into(), + *state_changes.asset.delta_hub_reserve, + )], + vec![Asset::new(asset_out.into(), *state_changes.asset.delta_reserve)], + trade_fees, + ); + T::OmnipoolHooks::on_hub_asset_trade(origin, info)?; Ok(()) @@ -2017,18 +2124,44 @@ impl Pallet { } /// Calls `on_trade_fee` hook and ensures that no more than the fee amount is transferred. - fn process_trade_fee(trader: &T::AccountId, asset: T::AssetId, amount: Balance) -> DispatchResult { + fn process_trade_fee( + trader: &T::AccountId, + asset: T::AssetId, + amount: Balance, + ) -> Result>, DispatchError> { let account = Self::protocol_account(); let original_asset_reserve = T::Currency::free_balance(asset, &account); // Let's give little bit less to process. Subtracting one due to potential rounding errors let allowed_amount = amount.saturating_sub(Balance::one()); - let used = T::OmnipoolHooks::on_trade_fee(account.clone(), trader.clone(), asset, allowed_amount)?; + let taken_fee = T::OmnipoolHooks::on_trade_fee(account.clone(), trader.clone(), asset, allowed_amount)?; + let taken_fee_entries: Vec> = taken_fee + .iter() + .filter_map(|opt| { + opt.clone() + .map(|(balance, recipient)| Fee::new(asset.into(), balance, recipient.clone())) + }) + .filter(|fee| fee.amount > 0) //filter out when we zero percentage is configured for fees + .collect(); + + let taken_fee_total: Balance = taken_fee_entries.iter().map(|fee| fee.amount).sum(); + let asset_reserve = T::Currency::free_balance(asset, &account); let diff = original_asset_reserve.saturating_sub(asset_reserve); ensure!(diff <= allowed_amount, Error::::FeeOverdraft); - ensure!(diff == used, Error::::FeeOverdraft); - Ok(()) + ensure!(diff == taken_fee_total, Error::::FeeOverdraft); + + let protocol_fee_amount = amount.saturating_sub(taken_fee_total); + + let mut all_trade_fees = vec![Fee { + asset: asset.into(), + amount: protocol_fee_amount, + recipient: Self::protocol_account(), + }]; + + all_trade_fees.extend(taken_fee_entries); + + Ok(all_trade_fees) } pub fn process_hub_amount(amount: Balance, dest: &T::AccountId) -> DispatchResult { diff --git a/pallets/omnipool/src/router_execution.rs b/pallets/omnipool/src/router_execution.rs index 7ff3e9df0..a6b17cccf 100644 --- a/pallets/omnipool/src/router_execution.rs +++ b/pallets/omnipool/src/router_execution.rs @@ -150,7 +150,6 @@ impl TradeExecution, T::AccountId, T::AssetId, Balance> if pool_type != PoolType::Omnipool { return Err(ExecutorError::NotSupported); } - Self::buy(who, asset_out, asset_in, amount_out, max_limit).map_err(ExecutorError::Error) } diff --git a/pallets/omnipool/src/tests/buy.rs b/pallets/omnipool/src/tests/buy.rs index 8d42f0b98..f97b40127 100644 --- a/pallets/omnipool/src/tests/buy.rs +++ b/pallets/omnipool/src/tests/buy.rs @@ -424,68 +424,94 @@ fn buy_should_emit_event_with_correct_asset_fee_amount() { max_limit )); - expect_events(vec![Event::BuyExecuted { - who: LP1, - asset_in: 100, - asset_out: 200, - amount_in: expected_sold_amount, - amount_out: buy_amount, - hub_amount_in: 57142857142858, - hub_amount_out: 57142857142858, - asset_fee_amount: 5_555_555_555_556, - protocol_fee_amount: 0, - } - .into()]); - }); -} - -#[test] -fn buy_should_emit_event_with_correct_protocol_fee_amount() { - ExtBuilder::default() - .with_endowed_accounts(vec![ - (Omnipool::protocol_account(), DAI, 1000 * ONE), - (Omnipool::protocol_account(), HDX, NATIVE_AMOUNT), - (LP2, 100, 2000 * ONE), - (LP3, 200, 2000 * ONE), - (LP1, 100, 1000 * ONE), - ]) - .with_registered_asset(100) - .with_registered_asset(200) - .with_protocol_fee(Permill::from_percent(10)) - .with_initial_pool(FixedU128::from(1), FixedU128::from(1)) - .with_token(100, FixedU128::from(1), LP2, 2000 * ONE) - .with_token(200, FixedU128::from(1), LP3, 2000 * ONE) - .build() - .execute_with(|| { - let buy_amount = 50 * ONE; - let max_limit = 100 * ONE; - let expected_sold_amount = 58_651_026_392_962; + expect_last_events(vec![ + Event::BuyExecuted { + who: LP1, + asset_in: 100, + asset_out: 200, + amount_in: expected_sold_amount, + amount_out: buy_amount, + hub_amount_in: 57142857142858, + hub_amount_out: 57142857142858, + asset_fee_amount: 5_555_555_555_556, + protocol_fee_amount: 0, + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(100, expected_sold_amount)], + outputs: vec![Asset::new(1, 57142857142858)], + fees: vec![Fee::new(LRNA, 0, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(1, 57142857142858)], + outputs: vec![Asset::new(200, buy_amount)], + fees: vec![Fee::new(200, 5555555555556, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); + let other_buy_amount = buy_amount + 100; + //We check again to see if the operation id is correct assert_ok!(Omnipool::buy( RuntimeOrigin::signed(LP1), 200, 100, - buy_amount, + other_buy_amount, max_limit )); - expect_events(vec![Event::BuyExecuted { - who: LP1, - asset_in: 100, - asset_out: 200, - amount_in: expected_sold_amount, - amount_out: buy_amount, - hub_amount_in: 56980056980057, - hub_amount_out: 51282051282052, - asset_fee_amount: 0, - protocol_fee_amount: 5698005698005, - } - .into()]); + expect_last_events(vec![ + Event::BuyExecuted { + who: LP1, + asset_in: 100, + asset_out: 200, + amount_in: 65976185738813, + amount_out: other_buy_amount, + hub_amount_in: 60326770004314, + hub_amount_out: 60326770004314, + asset_fee_amount: 5555555555567, + protocol_fee_amount: 0, + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(100, 65976185738813)], + outputs: vec![Asset::new(1, 60326770004314)], + fees: vec![Fee::new(LRNA, 0, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(1)], + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(1, 60326770004314)], + outputs: vec![Asset::new(200, other_buy_amount)], + fees: vec![Fee::new(200, 5555555555567, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(1)], + } + .into(), + ]); }); } #[test] -fn sell_should_get_same_amount() { +fn buy_should_emit_event_with_correct_protocol_fee_amount() { ExtBuilder::default() .with_endowed_accounts(vec![ (Omnipool::protocol_account(), DAI, 1000 * ONE), @@ -496,35 +522,60 @@ fn sell_should_get_same_amount() { ]) .with_registered_asset(100) .with_registered_asset(200) - .with_asset_fee(Permill::from_percent(10)) + .with_protocol_fee(Permill::from_percent(10)) .with_initial_pool(FixedU128::from(1), FixedU128::from(1)) .with_token(100, FixedU128::from(1), LP2, 2000 * ONE) .with_token(200, FixedU128::from(1), LP3, 2000 * ONE) .build() .execute_with(|| { let buy_amount = 50 * ONE; - let expected_sold_amount = 58_823_529_411_766; + let max_limit = 100 * ONE; + let expected_sold_amount = 58_651_026_392_962; - assert_ok!(Omnipool::sell( + assert_ok!(Omnipool::buy( RuntimeOrigin::signed(LP1), - 100, 200, - expected_sold_amount, - 0 + 100, + buy_amount, + max_limit )); - expect_events(vec![Event::SellExecuted { - who: LP1, - asset_in: 100, - asset_out: 200, - amount_in: expected_sold_amount, - amount_out: buy_amount, - hub_amount_in: 57142857142858, - hub_amount_out: 57142857142858, - asset_fee_amount: 5555555555556, - protocol_fee_amount: 0, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: LP1, + asset_in: 100, + asset_out: 200, + amount_in: expected_sold_amount, + amount_out: buy_amount, + hub_amount_in: 56980056980057, + hub_amount_out: 51282051282052, + asset_fee_amount: 0, + protocol_fee_amount: 5698005698005, + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(100, expected_sold_amount)], + outputs: vec![Asset::new(1, 56980056980057)], + fees: vec![Fee::new(LRNA, 5698005698005, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(1, 51282051282052)], + outputs: vec![Asset::new(200, buy_amount)], + fees: vec![Fee::new(200, 0, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); }); } diff --git a/pallets/omnipool/src/tests/mock.rs b/pallets/omnipool/src/tests/mock.rs index a1ddd1a9e..4408cec2f 100644 --- a/pallets/omnipool/src/tests/mock.rs +++ b/pallets/omnipool/src/tests/mock.rs @@ -86,6 +86,7 @@ construct_runtime!( Balances: pallet_balances, Omnipool: pallet_omnipool, Tokens: orml_tokens, + AmmSupport:pallet_support, } ); @@ -180,6 +181,10 @@ parameter_types! { pub MinWithdrawFee: Permill = WITHDRAWAL_FEE.with(|v| *v.borrow()); } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + impl Config for Test { type RuntimeEvent = RuntimeEvent; type AssetId = AssetId; @@ -684,6 +689,10 @@ pub(crate) fn expect_events(e: Vec) { e.into_iter().for_each(frame_system::Pallet::::assert_has_event); } +pub fn expect_last_events(e: Vec) { + test_utils::expect_events::(e); +} + pub struct MockHooks; impl OmnipoolHooks for MockHooks { @@ -721,10 +730,10 @@ impl OmnipoolHooks for MockHooks { _trader: AccountId, asset: AssetId, amount: Balance, - ) -> Result { + ) -> Result>, Self::Error> { let percentage = ON_TRADE_WITHDRAWAL.with(|v| *v.borrow()); let to_take = percentage.mul_floor(amount); Tokens::withdraw(asset, &fee_account, to_take)?; - Ok(to_take) + Ok(vec![Some((to_take, AccountId::default()))]) } } diff --git a/pallets/omnipool/src/tests/sell.rs b/pallets/omnipool/src/tests/sell.rs index 74cbeedee..b41c41c4d 100644 --- a/pallets/omnipool/src/tests/sell.rs +++ b/pallets/omnipool/src/tests/sell.rs @@ -701,3 +701,75 @@ fn sell_lrna_should_fail_when_exceeds_max_out_ratio() { ); }); } + +#[test] +fn sell_should_get_same_amount() { + ExtBuilder::default() + .with_endowed_accounts(vec![ + (Omnipool::protocol_account(), DAI, 1000 * ONE), + (Omnipool::protocol_account(), HDX, NATIVE_AMOUNT), + (LP2, 100, 2000 * ONE), + (LP3, 200, 2000 * ONE), + (LP1, 100, 1000 * ONE), + ]) + .with_registered_asset(100) + .with_registered_asset(200) + .with_asset_fee(Permill::from_percent(10)) + .with_initial_pool(FixedU128::from(1), FixedU128::from(1)) + .with_token(100, FixedU128::from(1), LP2, 2000 * ONE) + .with_token(200, FixedU128::from(1), LP3, 2000 * ONE) + .with_on_trade_withdrawal(Permill::from_percent(1)) + .build() + .execute_with(|| { + let buy_amount = 50 * ONE; + let expected_sold_amount = 58_823_529_411_766; + + assert_ok!(Omnipool::sell( + RuntimeOrigin::signed(LP1), + 100, + 200, + expected_sold_amount, + 0 + )); + + expect_events(vec![ + Event::SellExecuted { + who: LP1, + asset_in: 100, + asset_out: 200, + amount_in: expected_sold_amount, + amount_out: buy_amount, + hub_amount_in: 57142857142858, + hub_amount_out: 57142857142858, + asset_fee_amount: 5555555555556, + protocol_fee_amount: 0, + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(100, expected_sold_amount)], + outputs: vec![Asset::new(LRNA, 57142857142858)], + fees: vec![Fee::new(LRNA, 0, Omnipool::protocol_account())], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + pallet_support::Event::Swapped { + swapper: LP1, + filler: Omnipool::protocol_account(), + filler_type: pallet_support::types::Filler::Omnipool, + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(LRNA, 57142857142858)], + outputs: vec![Asset::new(200, buy_amount)], + fees: vec![ + Fee::new(200, 5500000000001, Omnipool::protocol_account()), + Fee::new(200, 55555555555, 0), + ], + operation_stack: vec![ExecutionType::Omnipool(0)], + } + .into(), + ]); + }); +} diff --git a/pallets/omnipool/src/traits.rs b/pallets/omnipool/src/traits.rs index d4ac40f1a..78fa28c38 100644 --- a/pallets/omnipool/src/traits.rs +++ b/pallets/omnipool/src/traits.rs @@ -7,7 +7,8 @@ use hydra_dx_math::omnipool::types::AssetStateChange; use sp_runtime::traits::{CheckedAdd, CheckedMul, Get, Saturating, Zero}; use sp_runtime::{DispatchError, FixedPointNumber, FixedU128, Permill}; use sp_std::fmt::Debug; - +use sp_std::vec; +use sp_std::vec::Vec; /// Asset In/Out information used in hooks. pub struct AssetInfo where @@ -64,7 +65,7 @@ where trader: AccountId, asset: AssetId, amount: Balance, - ) -> Result; + ) -> Result>, Self::Error>; } // Default implementation for no-op hooks. @@ -103,8 +104,8 @@ where _trader: AccountId, _asset: AssetId, _amount: Balance, - ) -> Result { - Ok(Balance::zero()) + ) -> Result>, Self::Error> { + Ok(vec![]) } } diff --git a/pallets/otc-settlements/Cargo.toml b/pallets/otc-settlements/Cargo.toml index 7dd61b609..695f1f048 100644 --- a/pallets/otc-settlements/Cargo.toml +++ b/pallets/otc-settlements/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-otc-settlements' -version = '1.0.6' +version = '1.1.1' description = 'A pallet with offchain worker closing OTC arbs' authors = ['GalacticCouncil'] edition = '2021' @@ -39,6 +39,7 @@ pallet-asset-registry = { workspace = true } pallet-route-executor = { workspace = true } pallet-balances = { workspace = true } pallet-currencies = { workspace = true } +pallet-support = { workspace = true } sp-api = { workspace = true } orml-traits = { workspace = true } orml-tokens = { workspace = true, features = ["std"] } diff --git a/pallets/otc-settlements/src/mock.rs b/pallets/otc-settlements/src/mock.rs index ce54bbb19..a1ab43e73 100644 --- a/pallets/otc-settlements/src/mock.rs +++ b/pallets/otc-settlements/src/mock.rs @@ -74,6 +74,7 @@ frame_support::construct_runtime!( Omnipool: pallet_omnipool, Router: pallet_route_executor, OtcSettlements: pallet_otc_settlements, + AmmSupport:pallet_support, } ); @@ -91,17 +92,17 @@ parameter_type_with_key! { }; } -impl pallet_otc_settlements::Config for Test { - type Currency = pallet_currencies::fungibles::FungibleCurrencies; +impl Config for Test { type RuntimeEvent = RuntimeEvent; + type Currency = FungibleCurrencies; type Router = Router; type ProfitReceiver = TreasuryAccount; type MinProfitPercentage = MinProfitPercentage; type PricePrecision = PricePrecision; type MinTradingLimit = MinTradingLimit; type MaxIterations = ConstU32<40>; - type WeightInfo = (); type RouterWeightInfo = (); + type WeightInfo = (); } impl pallet_otc::Config for Test { @@ -258,6 +259,10 @@ impl pallet_currencies::Config for Test { type WeightInfo = (); } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + parameter_types! { pub const MinTradingLimit: Balance = 1_000; pub const MinPoolLiquidity: Balance = 1_000; diff --git a/pallets/otc-settlements/src/tests.rs b/pallets/otc-settlements/src/tests.rs index fde983164..9dd07eef4 100644 --- a/pallets/otc-settlements/src/tests.rs +++ b/pallets/otc-settlements/src/tests.rs @@ -24,6 +24,8 @@ pub use crate::mock::*; use frame_support::{assert_ok, assert_storage_noop}; use hydradx_traits::Inspect; use orml_traits::MultiCurrency; +use pallet_support::types::Asset; +use pallet_support::types::Fee; pub fn expect_events(e: Vec) { e.into_iter().for_each(frame_system::Pallet::::assert_has_event); @@ -292,11 +294,28 @@ fn existing_arb_opportunity_should_trigger_trade_when_correct_amount_can_be_foun assert!(Currencies::free_balance(HDX, &OtcSettlements::account_id()) == 0); assert!(Currencies::free_balance(DAI, &OtcSettlements::account_id()) == 0); - expect_last_events(vec![Event::Executed { - asset_id: HDX, - profit: 17_736_110_470_326, - } - .into()]); + expect_events(vec![ + Event::Executed { + asset_id: HDX, + profit: 17_736_110_470_326, + } + .into(), + pallet_support::Event::Swapped { + swapper: otc.owner, + filler: OtcSettlements::account_id(), + filler_type: pallet_support::types::Filler::OTC(otc_id), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 2413749694825193)], + outputs: vec![Asset::new(DAI, 4948186874391645)], + fees: vec![Fee::new( + DAI, + 49481868743917, + ::FeeReceiver::get(), + )], + operation_stack: vec![], + } + .into(), + ]); }); } diff --git a/pallets/otc/Cargo.toml b/pallets/otc/Cargo.toml index 5a0b427c5..23249ba9e 100644 --- a/pallets/otc/Cargo.toml +++ b/pallets/otc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-otc' -version = '2.0.4' +version = '2.1.0' description = 'A pallet for trustless over-the-counter trading' authors = ['GalacticCouncil'] edition = '2021' @@ -12,6 +12,10 @@ repository = "https://github.com/galacticcouncil/Hydradx-node" codec = { workspace = true, features = ["derive", "max-encoded-len"] } scale-info = { workspace = true } +# HydraDX dependencies +hydradx-traits = { workspace = true } +pallet-support = { workspace = true } + # primitives sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -21,9 +25,6 @@ sp-core = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -# HydraDX dependencies -hydradx-traits = { workspace = true } - # ORML dependencies orml-traits = { workspace = true } @@ -41,18 +42,19 @@ test-utils = { workspace = true } [features] default = ['std'] std = [ - 'codec/std', - 'frame-support/std', - 'frame-system/std', - 'sp-runtime/std', - 'sp-core/std', - 'sp-io/std', - 'sp-std/std', - 'scale-info/std', - 'orml-tokens/std', - 'orml-traits/std', - 'hydradx-traits/std', - 'frame-benchmarking/std' + 'codec/std', + 'frame-support/std', + 'frame-system/std', + 'sp-runtime/std', + 'sp-core/std', + 'sp-io/std', + 'sp-std/std', + 'scale-info/std', + 'orml-tokens/std', + 'orml-traits/std', + 'hydradx-traits/std', + 'frame-benchmarking/std', + "pallet-support/std" ] runtime-benchmarks = [ diff --git a/pallets/otc/src/lib.rs b/pallets/otc/src/lib.rs index a4604329d..d43e8641f 100644 --- a/pallets/otc/src/lib.rs +++ b/pallets/otc/src/lib.rs @@ -39,9 +39,11 @@ use frame_support::{pallet_prelude::*, require_transactional}; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; use hydradx_traits::Inspect; use orml_traits::{GetByKey, MultiCurrency, NamedMultiReservableCurrency}; +use pallet_support::types::Fee; use sp_core::U256; use sp_runtime::traits::{One, Zero}; use sp_runtime::Permill; +use sp_std::vec; #[cfg(test)] mod tests; @@ -55,9 +57,9 @@ pub use weights::WeightInfo; // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; - +use pallet_support::types::Asset; pub type Balance = u128; -pub type OrderId = u32; +pub type OrderId = pallet_support::types::OtcOrderId; //TODO: just use exacty type pub type NamedReserveIdentifier = [u8; 8]; pub const NAMED_RESERVE_ID: NamedReserveIdentifier = *b"otcorder"; @@ -81,9 +83,9 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { /// Identifier for the class of asset. - type AssetId: Member + Parameter + Copy + HasCompact + MaybeSerializeDeserialize + MaxEncodedLen; + type AssetId: Member + Parameter + Copy + HasCompact + MaybeSerializeDeserialize + MaxEncodedLen + Into; /// Asset Registry mechanism - used to check if asset is correctly registered in asset registry. type AssetRegistry: Inspect; @@ -124,6 +126,7 @@ pub mod pallet { /// An Order has been cancelled Cancelled { order_id: OrderId }, /// An Order has been completely filled + /// Deprecated. Replaced bypallet_support::Swapped Filled { order_id: OrderId, who: T::AccountId, @@ -132,6 +135,7 @@ pub mod pallet { fee: Balance, }, /// An Order has been partially filled + /// Deprecated. Replaced bypallet_support::Swapped PartiallyFilled { order_id: OrderId, who: T::AccountId, @@ -266,7 +270,8 @@ pub mod pallet { /// of asset_out multiplied by ExistentialDepositMultiplier /// /// Events: - /// `PartiallyFilled` event when successful. + /// `PartiallyFilled` event when successful. Deprecated. + /// `pallet_support::Swapped` event when successful. #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::partial_fill_order())] pub fn partial_fill_order(origin: OriginFor, order_id: OrderId, amount_in: Balance) -> DispatchResult { @@ -296,13 +301,29 @@ pub mod pallet { Self::execute_order(order, &who, amount_in, amount_out, fee)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::PartiallyFilled { order_id, - who, + who: who.clone(), amount_in, amount_out, fee, }); + + pallet_support::Pallet::::deposit_trade_event( + order.owner.clone(), + who, + pallet_support::types::Filler::OTC(order_id), + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(order.asset_in.into(), amount_in)], + vec![Asset::new(order.asset_out.into(), amount_out)], + vec![Fee { + asset: order.asset_out.into(), + amount: fee, + recipient: T::FeeReceiver::get(), + }], + ); + Ok(()) }) } @@ -313,7 +334,8 @@ pub mod pallet { /// - `order_id`: ID of the order /// /// Events: - /// `Filled` event when successful. + /// `Filled` event when successful. Deprecated. + /// `pallet_support::Swapped` event when successful. #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::fill_order())] pub fn fill_order(origin: OriginFor, order_id: OrderId) -> DispatchResult { @@ -325,13 +347,29 @@ pub mod pallet { Self::execute_order(&order, &who, order.amount_in, order.amount_out, fee)?; >::remove(order_id); + // TODO: Deprecated, remove when ready Self::deposit_event(Event::Filled { order_id, - who, + who: who.clone(), amount_in: order.amount_in, amount_out: order.amount_out, fee, }); + + pallet_support::Pallet::::deposit_trade_event( + who, + order.owner, + pallet_support::types::Filler::OTC(order_id), + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(order.asset_in.into(), order.amount_in)], + vec![Asset::new(order.asset_out.into(), order.amount_out)], + vec![Fee { + asset: order.asset_out.into(), + amount: fee, + recipient: T::FeeReceiver::get(), + }], + ); + Ok(()) } diff --git a/pallets/otc/src/tests/fill_order.rs b/pallets/otc/src/tests/fill_order.rs index 42fb8fa70..1925f53f2 100644 --- a/pallets/otc/src/tests/fill_order.rs +++ b/pallets/otc/src/tests/fill_order.rs @@ -18,6 +18,7 @@ use crate::Event; use frame_support::{assert_noop, assert_ok}; use orml_tokens::Error::BalanceTooLow; use orml_traits::{MultiCurrency, NamedMultiReservableCurrency}; +use pallet_support::types::{Asset, Fee}; use pretty_assertions::assert_eq; #[test] @@ -45,8 +46,7 @@ fn complete_fill_order_should_work() { assert_ok!(OTC::fill_order(RuntimeOrigin::signed(BOB), 0)); // Assert - let order = OTC::orders(0); - assert!(order.is_none()); + assert!(OTC::orders(0).is_none()); let fee = OTC::calculate_fee(amount_out); @@ -71,14 +71,27 @@ fn complete_fill_order_should_work() { TREASURY_INITIAL_BALANCE + fee ); - expect_events(vec![Event::Filled { - order_id: 0, - who: BOB, - amount_in: 20 * ONE, - amount_out: 100 * ONE, - fee: ONE, - } - .into()]); + expect_events(vec![ + Event::Filled { + order_id: 0, + who: BOB, + amount_in: 20 * ONE, + amount_out: 100 * ONE, + fee: ONE, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB, + filler: ALICE, + filler_type: pallet_support::types::Filler::OTC(0), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 20 * ONE)], + outputs: vec![Asset::new(HDX, 100 * ONE)], + fees: vec![Fee::new(HDX, ONE, ::FeeReceiver::get())], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -133,14 +146,28 @@ fn complete_fill_order_should_work_when_order_is_not_partially_fillable() { TREASURY_INITIAL_BALANCE + fee ); - expect_events(vec![Event::Filled { - order_id: 0, - who: BOB, - amount_in: 20 * ONE, - amount_out: 100 * ONE, - fee: ONE, - } - .into()]); + let order_id = 0; + expect_events(vec![ + Event::Filled { + order_id, + who: BOB, + amount_in: 20 * ONE, + amount_out: 100 * ONE, + fee: ONE, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB, + filler: ALICE, + filler_type: pallet_support::types::Filler::OTC(order_id), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 20 * ONE)], + outputs: vec![Asset::new(HDX, 100 * ONE)], + fees: vec![Fee::new(HDX, ONE, ::FeeReceiver::get())], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -207,14 +234,28 @@ fn complete_fill_order_should_work_when_there_are_multiple_orders() { TREASURY_INITIAL_BALANCE + fee ); - expect_events(vec![Event::Filled { - order_id: 0, - who: BOB, - amount_in: 20 * ONE, - amount_out: 100 * ONE, - fee: ONE, - } - .into()]); + let order_id = 0; + expect_events(vec![ + Event::Filled { + order_id: 0, + who: BOB, + amount_in: 20 * ONE, + amount_out: 100 * ONE, + fee: ONE, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB, + filler: ALICE, + filler_type: pallet_support::types::Filler::OTC(order_id), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(DAI, 20 * ONE)], + outputs: vec![Asset::new(HDX, 100 * ONE)], + fees: vec![Fee::new(HDX, ONE, ::FeeReceiver::get())], + operation_stack: vec![], + } + .into(), + ]); }); } diff --git a/pallets/otc/src/tests/mock.rs b/pallets/otc/src/tests/mock.rs index 13546d1c0..79beaecdd 100644 --- a/pallets/otc/src/tests/mock.rs +++ b/pallets/otc/src/tests/mock.rs @@ -57,6 +57,7 @@ frame_support::construct_runtime!( System: frame_system, OTC: otc, Tokens: orml_tokens, + AmmSupport:pallet_support, } ); @@ -144,6 +145,10 @@ impl orml_tokens::Config for Test { type CurrencyHooks = (); } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + pub struct DummyRegistry(sp_std::marker::PhantomData); impl Inspect for DummyRegistry { diff --git a/pallets/otc/src/tests/partial_fill_order.rs b/pallets/otc/src/tests/partial_fill_order.rs index 2b97f4509..1f9ef36ac 100644 --- a/pallets/otc/src/tests/partial_fill_order.rs +++ b/pallets/otc/src/tests/partial_fill_order.rs @@ -18,6 +18,7 @@ use crate::{Error, Event}; use frame_support::{assert_noop, assert_ok}; use orml_tokens::Error::BalanceTooLow; use orml_traits::{MultiCurrency, NamedMultiReservableCurrency}; +use pallet_support::types::{Asset, Fee}; use pretty_assertions::assert_eq; #[test] @@ -83,14 +84,32 @@ fn partial_fill_order_should_work_when_order_is_partially_fillable() { TREASURY_INITIAL_BALANCE + fee ); - expect_events(vec![Event::PartiallyFilled { - order_id: 0, - who: BOB, - amount_in: 5 * ONE, - amount_out: expected_amount_out, - fee, - } - .into()]); + let order_id = 0; + expect_events(vec![ + Event::PartiallyFilled { + order_id, + who: BOB, + amount_in: 5 * ONE, + amount_out: expected_amount_out, + fee, + } + .into(), + pallet_support::Event::Swapped { + swapper: order.owner, + filler: BOB, + filler_type: pallet_support::types::Filler::OTC(order_id), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(order.asset_in, 5 * ONE)], + outputs: vec![Asset::new(order.asset_out, expected_amount_out)], + fees: vec![Fee::new( + order.asset_out, + fee, + ::FeeReceiver::get(), + )], + operation_stack: vec![], + } + .into(), + ]); }); } diff --git a/pallets/referrals/Cargo.toml b/pallets/referrals/Cargo.toml index 9f0aba73b..9fd040a0f 100644 --- a/pallets/referrals/Cargo.toml +++ b/pallets/referrals/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-referrals" -version = "1.2.7" +version = "1.2.8" authors = ['GalacticCouncil'] edition = "2021" license = "Apache-2.0" diff --git a/pallets/referrals/src/lib.rs b/pallets/referrals/src/lib.rs index 57871655b..3a88edf08 100644 --- a/pallets/referrals/src/lib.rs +++ b/pallets/referrals/src/lib.rs @@ -639,17 +639,17 @@ impl Pallet { /// `source`: account to take the fee from /// `trader`: account that does the trade /// - /// Returns used amount on success. + /// Returns used amount and recipient on success. #[transactional] pub fn process_trade_fee( source: T::AccountId, trader: T::AccountId, asset_id: T::AssetId, amount: Balance, - ) -> Result { + ) -> Result, DispatchError> { let Some(price) = T::PriceProvider::get_price(T::RewardAsset::get(), asset_id.clone()) else { // no price, no fun. - return Ok(Balance::zero()); + return Ok(None); }; let (level, ref_account) = if let Some(acc) = Self::linked_referral_account(&trader) { @@ -658,7 +658,7 @@ impl Pallet { (level, Some(acc)) } else { defensive!("Referrer details not found"); - return Ok(Balance::zero()); + return Ok(None); } } else { (Level::None, None) @@ -739,6 +739,6 @@ impl Pallet { PendingConversions::::insert(asset_id, ()); } - Ok(total_taken) + Ok(Some((total_taken, Self::pot_account_id()))) } } diff --git a/pallets/route-executor/Cargo.toml b/pallets/route-executor/Cargo.toml index a3d15e735..9d986078c 100644 --- a/pallets/route-executor/Cargo.toml +++ b/pallets/route-executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-route-executor' -version = '2.6.3' +version = '2.7.0' description = 'A pallet to execute a route containing a sequence of trades' authors = ['GalacticCouncil'] edition = '2021' @@ -15,6 +15,8 @@ serde = { workspace = true } # HydraDX dependencies hydradx-traits = { workspace = true } hydra-dx-math = { workspace = true } +pallet-support = { workspace = true } +primitives = { workspace = true } # ORML dependencies orml-traits = { workspace = true } @@ -44,13 +46,21 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", ] std = [ - 'serde/std', - 'codec/std', - 'sp-std/std', - 'frame-support/std', - 'frame-system/std', - 'orml-tokens/std', - "hydradx-adapters/std", - "pallet-balances/std", + 'serde/std', + 'codec/std', + 'scale-info/std', + 'sp-std/std', + 'frame-support/std', + 'frame-system/std', + 'orml-tokens/std', + 'orml-traits/std', + "hydradx-adapters/std", + "pallet-balances/std", + "pallet-support/std", + 'hydradx-traits/std', + 'hydra-dx-math/std', + 'frame-benchmarking/std', + 'sp-core/std', + 'sp-runtime/std', ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/route-executor/src/lib.rs b/pallets/route-executor/src/lib.rs index 980543694..9795e26bb 100644 --- a/pallets/route-executor/src/lib.rs +++ b/pallets/route-executor/src/lib.rs @@ -37,7 +37,10 @@ use hydradx_traits::router::{inverse_route, AssetPair, RefundEdCalculator, Route pub use hydradx_traits::router::{ AmmTradeWeights, AmountInAndOut, ExecutorError, PoolType, RouterT, Trade, TradeExecution, }; + use orml_traits::arithmetic::{CheckedAdd, CheckedSub}; +use pallet_support::types::IncrementalIdType; +pub use pallet_support::types::{ExecutionType, Fee}; use sp_core::U512; use sp_runtime::traits::{AccountIdConversion, CheckedDiv}; use sp_runtime::{ArithmeticError, DispatchError, FixedPointNumber, FixedU128, Saturating, TransactionOutcome}; @@ -71,7 +74,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Asset id type @@ -139,6 +142,7 @@ pub mod pallet { asset_out: T::AssetId, amount_in: T::Balance, amount_out: T::Balance, + event_id: IncrementalIdType, }, ///The route with trades has been successfully executed RouteUpdated { asset_ids: Vec }, @@ -254,6 +258,9 @@ pub mod pallet { ensure!(first_trade.amount_in <= max_amount_in, Error::::TradingLimitReached); let route_length = route.len(); + + let next_event_id = pallet_support::Pallet::::add_to_context(ExecutionType::Router)?; + for (trade_index, (trade_amount, trade)) in trade_amounts.iter().rev().zip(route).enumerate() { Self::disable_ed_handling_for_insufficient_assets(route_length, trade_index, trade); let user_balance_of_asset_out_before_trade = @@ -287,13 +294,17 @@ pub mod pallet { first_trade.amount_in, )?; + //TODO: we want to deprecate it once unified events are working fine Self::deposit_event(Event::Executed { asset_in, asset_out, amount_in: first_trade.amount_in, amount_out, + event_id: next_event_id, }); + pallet_support::Pallet::::remove_from_context()?; + Ok(()) } @@ -484,6 +495,9 @@ impl Pallet { ); let route_length = route.len(); + + let next_event_id = pallet_support::Pallet::::add_to_context(ExecutionType::Router)?; + for (trade_index, (trade_amount, trade)) in trade_amounts.iter().zip(route.clone()).enumerate() { Self::disable_ed_handling_for_insufficient_assets(route_length, trade_index, trade); @@ -524,8 +538,11 @@ impl Pallet { asset_out, amount_in, amount_out: last_trade_amount.amount_out, + event_id: next_event_id, }); + pallet_support::Pallet::::remove_from_context()?; + Ok(()) } diff --git a/pallets/route-executor/src/tests/buy.rs b/pallets/route-executor/src/tests/buy.rs index 62a02119f..1999e5499 100644 --- a/pallets/route-executor/src/tests/buy.rs +++ b/pallets/route-executor/src/tests/buy.rs @@ -49,6 +49,7 @@ fn buy_should_work_when_route_has_single_trade() { asset_out: AUSD, amount_in: XYK_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -78,6 +79,7 @@ fn buy_should_work_with_omnipool_when_no_route_or_onchain_route_exist() { asset_out: DOT, amount_in: OMNIPOOL_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -137,6 +139,7 @@ fn buy_should_work_when_onchain_route_present_in_reverse_order() { asset_out: HDX, amount_in: XYK_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -294,6 +297,7 @@ fn buy_should_when_route_has_multiple_trades_with_same_pool_type() { asset_out: KSM, amount_in: XYK_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -347,6 +351,7 @@ fn buy_should_work_when_route_has_multiple_trades_with_different_pool_type() { asset_out: KSM, amount_in: XYK_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); @@ -406,6 +411,7 @@ fn buy_should_work_with_onchain_route_when_no_route_specified() { asset_out: KSM, amount_in: XYK_BUY_CALCULATION_RESULT, amount_out: amount_to_buy, + event_id: 0, } .into()]); }); diff --git a/pallets/route-executor/src/tests/mock.rs b/pallets/route-executor/src/tests/mock.rs index 47347f93e..f673375aa 100644 --- a/pallets/route-executor/src/tests/mock.rs +++ b/pallets/route-executor/src/tests/mock.rs @@ -50,6 +50,7 @@ frame_support::construct_runtime!( Tokens: orml_tokens, Balances: pallet_balances, Currencies: pallet_currencies, + AmmSupport:pallet_support, } ); @@ -143,6 +144,10 @@ impl pallet_currencies::Config for Test { type WeightInfo = (); } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + type Pools = (XYK, StableSwap, OmniPool, LBP); parameter_types! { diff --git a/pallets/route-executor/src/tests/sell.rs b/pallets/route-executor/src/tests/sell.rs index c22447ef5..fa6638392 100644 --- a/pallets/route-executor/src/tests/sell.rs +++ b/pallets/route-executor/src/tests/sell.rs @@ -50,6 +50,7 @@ fn sell_should_work_when_route_has_single_trade() { asset_out: AUSD, amount_in: amount_to_sell, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -79,6 +80,7 @@ fn sell_should_work_with_omnipool_when_no_specified_or_onchain_route_exist() { asset_out: AUSD, amount_in: amount_to_sell, amount_out: OMNIPOOL_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -185,6 +187,7 @@ fn sell_should_work_when_route_has_multiple_trades_with_same_pooltype() { asset_out: KSM, amount_in: amount_to_sell, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -235,6 +238,7 @@ fn sell_should_work_when_route_has_multiple_trades_with_different_pool_type() { asset_out: KSM, amount_in: amount_to_sell, amount_out: OMNIPOOL_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -293,6 +297,7 @@ fn sell_should_work_with_onchain_route_when_no_routes_specified() { asset_out: KSM, amount_in: amount_to_sell, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -355,6 +360,7 @@ fn sell_should_work_with_onchain_route_when_onchain_route_present_in_reverse_ord asset_out: HDX, amount_in: amount_to_sell, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); diff --git a/pallets/route-executor/src/tests/sell_all.rs b/pallets/route-executor/src/tests/sell_all.rs index a95700ae4..26a8c3ed5 100644 --- a/pallets/route-executor/src/tests/sell_all.rs +++ b/pallets/route-executor/src/tests/sell_all.rs @@ -44,6 +44,7 @@ fn sell_should_work_when_route_has_single_trade() { asset_out: AUSD, amount_in: alice_balance, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -67,6 +68,7 @@ fn sell_should_work_with_omnipool_when_no_specified_or_onchain_route_exist() { asset_out: AUSD, amount_in: alice_balance, amount_out: OMNIPOOL_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -135,6 +137,7 @@ fn sell_should_work_when_route_has_multiple_trades_with_same_pooltype() { asset_out: KSM, amount_in: alice_native_balance, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -179,6 +182,7 @@ fn sell_should_work_when_route_has_multiple_trades_with_different_pool_type() { asset_out: KSM, amount_in: alice_native_balance, amount_out: OMNIPOOL_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -230,6 +234,7 @@ fn sell_should_work_with_onchain_route_when_no_routes_specified() { asset_out: KSM, amount_in: alice_native_balance, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); @@ -286,6 +291,7 @@ fn sell_should_work_with_onchain_route_when_onchain_route_present_in_reverse_ord asset_out: HDX, amount_in: alice_nonnative_balance, amount_out: XYK_SELL_CALCULATION_RESULT, + event_id: 0, } .into()]); }); diff --git a/pallets/stableswap/Cargo.toml b/pallets/stableswap/Cargo.toml index 77fa25e35..87efde250 100644 --- a/pallets/stableswap/Cargo.toml +++ b/pallets/stableswap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-stableswap' -version = '4.1.1' +version = '4.1.2' description = 'AMM for correlated assets' authors = ['GalacticCouncil'] edition = '2021' @@ -19,6 +19,10 @@ scale-info = { workspace = true } codec = { workspace = true } serde = { workspace = true } +# HydraDX dependencies +hydradx-traits = { workspace = true } +pallet-support = { workspace = true } + # primitives sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -32,9 +36,6 @@ frame-system = { workspace = true } # Math hydra-dx-math = { workspace = true } -# HydraDX dependencies -hydradx-traits = { workspace = true } - # ORML dependencies orml-traits = { workspace = true } @@ -47,6 +48,7 @@ sp-tracing = { workspace = true } orml-tokens = { workspace = true, features = ["std"] } proptest = { workspace = true } test-utils = { workspace = true } +pretty_assertions = "1.4.0" [features] default = ['std'] @@ -70,5 +72,6 @@ std = [ "frame-benchmarking/std", 'orml-traits/std', "hydra-dx-math/std", + "pallet-support/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/stableswap/src/lib.rs b/pallets/stableswap/src/lib.rs index 7b0335d97..e7f8036e1 100644 --- a/pallets/stableswap/src/lib.rs +++ b/pallets/stableswap/src/lib.rs @@ -55,7 +55,10 @@ extern crate core; use frame_support::pallet_prelude::{DispatchResult, Get}; use frame_support::{ensure, require_transactional, transactional, PalletId}; -use frame_system::pallet_prelude::BlockNumberFor; +use frame_system::{ + ensure_signed, + pallet_prelude::{BlockNumberFor, OriginFor}, +}; use hydradx_traits::{registry::Inspect, AccountIdFor}; pub use pallet::*; use sp_runtime::traits::{AccountIdConversion, BlockNumberProvider, Zero}; @@ -72,6 +75,7 @@ use crate::types::{AssetAmount, Balance, PoolInfo, PoolState, StableswapHooks, T use hydra_dx_math::stableswap::types::AssetReserve; use hydradx_traits::pools::DustRemovalAccountWhitelist; use orml_traits::MultiCurrency; +use pallet_support::types::{Asset, Fee}; use sp_std::collections::btree_map::BTreeMap; pub use weights::WeightInfo; @@ -99,8 +103,8 @@ pub mod pallet { use codec::HasCompact; use core::ops::RangeInclusive; use frame_support::pallet_prelude::*; - use frame_system::pallet_prelude::*; use hydradx_traits::pools::DustRemovalAccountWhitelist; + use pallet_support::types::Fee; use sp_runtime::traits::{BlockNumberProvider, Zero}; use sp_runtime::ArithmeticError; use sp_runtime::Permill; @@ -110,7 +114,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -126,7 +130,8 @@ pub mod pallet { + HasCompact + MaybeSerializeDeserialize + MaxEncodedLen - + TypeInfo; + + TypeInfo + + Into; /// Multi currency mechanism type Currency: MultiCurrency; @@ -207,6 +212,8 @@ pub mod pallet { fee: Balance, }, /// Sell trade executed. Trade fee paid in asset leaving the pool (already subtracted from amount_out). + /// Deprecated. Replaced by pallet_support::Swapped + //TODO: remove once we migrated completely to pallet_amm::Event::Swapped SellExecuted { who: T::AccountId, pool_id: T::AssetId, @@ -217,6 +224,7 @@ pub mod pallet { fee: Balance, }, /// Buy trade executed. Trade fee paid in asset entering the pool (already included in amount_in). + /// Deprecated. Replaced bypallet_support::Swapped BuyExecuted { who: T::AccountId, pool_id: T::AssetId, @@ -471,6 +479,7 @@ pub mod pallet { /// - `assets`: asset id and liquidity amount provided /// /// Emits `LiquidityAdded` event when successful. + /// Emits `pallet_support::Swapped` event when successful. #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::add_liquidity() .saturating_add(T::Hooks::on_liquidity_changed_weight(MAX_ASSETS_IN_POOL as usize)))] @@ -508,6 +517,7 @@ pub mod pallet { /// - `max_asset_amount`: slippage limit. Max amount of asset. /// /// Emits `LiquidityAdded` event when successful. + /// Emits `pallet_support::Swapped` event when successful. #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::add_liquidity_shares() .saturating_add(T::Hooks::on_liquidity_changed_weight(MAX_ASSETS_IN_POOL as usize)))] @@ -547,6 +557,7 @@ pub mod pallet { /// - 'min_amount_out': minimum amount to receive /// /// Emits `LiquidityRemoved` event when successful. + /// Emits `pallet_support::Swapped` event when successful. #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::remove_liquidity_one_asset() .saturating_add(T::Hooks::on_liquidity_changed_weight(MAX_ASSETS_IN_POOL as usize)))] @@ -613,12 +624,26 @@ pub mod pallet { Self::deposit_event(Event::LiquidityRemoved { pool_id, - who, + who: who.clone(), shares: share_amount, amounts: vec![AssetAmount { asset_id, amount }], fee, }); + pallet_support::Pallet::::deposit_trade_event( + who, + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::LiquidityRemove, + vec![Asset::new(pool_id.into(), share_amount)], + vec![Asset::new(asset_id.into(), amount)], + vec![Fee { + asset: pool_id.into(), + amount: fee, + recipient: pool_account, + }], + ); + #[cfg(feature = "try-runtime")] Self::ensure_remove_liquidity_invariant(pool_id, &initial_reserves); @@ -637,6 +662,7 @@ pub mod pallet { /// - 'max_share_amount': Slippage limit. Max amount of shares to burn. /// /// Emits `LiquidityRemoved` event when successful. + /// Emits `pallet_support::Swapped` event when successful. #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::withdraw_asset_amount() .saturating_add(T::Hooks::on_liquidity_changed_weight(MAX_ASSETS_IN_POOL as usize)))] @@ -663,11 +689,12 @@ pub mod pallet { let initial_reserves = pool .reserves_with_decimals::(&pool_account) .ok_or(Error::::UnknownDecimals)?; + let share_issuance = T::Currency::total_issuance(pool_id); let amplification = Self::get_amplification(&pool); // Calculate how much shares user needs to provide to receive `amount` of asset. - let shares = hydra_dx_math::stableswap::calculate_shares_for_amount::( + let (shares, fees) = hydra_dx_math::stableswap::calculate_shares_for_amount::( &initial_reserves, asset_idx, amount, @@ -695,12 +722,27 @@ pub mod pallet { Self::deposit_event(Event::LiquidityRemoved { pool_id, - who, + who: who.clone(), shares, amounts: vec![AssetAmount { asset_id, amount }], fee: 0u128, // dev note: figure out the actual fee amount in this case. For now, we dont need it. }); + let fees = fees + .iter() + .zip(pool.assets.iter()) + .map(|(balance, asset_id)| Fee::new((*asset_id).into(), *balance, pool_account.clone())) + .collect::>(); + pallet_support::Pallet::::deposit_trade_event( + who, + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::LiquidityRemove, + vec![Asset::new(pool_id.into(), shares)], + vec![Asset::new(asset_id.into(), amount)], + fees, + ); + Ok(()) } @@ -714,7 +756,8 @@ pub mod pallet { /// - `amount_in`: Amount of asset to be sold to the pool /// - `min_buy_amount`: Minimum amount required to receive /// - /// Emits `SellExecuted` event when successful. + /// Emits `SellExecuted` event when successful. Deprecated. + /// Emits `pallet_support::Swapped` event when successful. /// #[pallet::call_index(7)] #[pallet::weight(::WeightInfo::sell() @@ -764,7 +807,7 @@ pub mod pallet { Self::call_on_trade_hook(pool_id, asset_in, asset_out, &initial_reserves)?; Self::deposit_event(Event::SellExecuted { - who, + who: who.clone(), pool_id, asset_in, asset_out, @@ -773,6 +816,20 @@ pub mod pallet { fee: fee_amount, }); + pallet_support::Pallet::::deposit_trade_event( + who, + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(asset_in.into(), amount_in)], + vec![Asset::new(asset_out.into(), amount_out)], + vec![Fee { + asset: asset_out.into(), + amount: fee_amount, + recipient: pool_account, + }], + ); + #[cfg(feature = "try-runtime")] Self::ensure_trade_invariant(pool_id, &initial_reserves, pool.fee); @@ -789,7 +846,8 @@ pub mod pallet { /// - `amount_out`: Amount of asset to receive from the pool /// - `max_sell_amount`: Maximum amount allowed to be sold /// - /// Emits `BuyExecuted` event when successful. + /// Emits `BuyExecuted` event when successful. Deprecated. + /// Emits `pallet_support::Swapped` event when successful. /// #[pallet::call_index(8)] #[pallet::weight(::WeightInfo::buy() @@ -842,7 +900,7 @@ pub mod pallet { Self::call_on_trade_hook(pool_id, asset_in, asset_out, &initial_reserves)?; Self::deposit_event(Event::BuyExecuted { - who, + who: who.clone(), pool_id, asset_in, asset_out, @@ -851,6 +909,20 @@ pub mod pallet { fee: fee_amount, }); + pallet_support::Pallet::::deposit_trade_event( + who, + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new(asset_in.into(), amount_in)], + vec![Asset::new(asset_out.into(), amount_out)], + vec![Fee { + asset: asset_in.into(), + amount: fee_amount, + recipient: pool_account, + }], + ); + #[cfg(feature = "try-runtime")] Self::ensure_trade_invariant(pool_id, &initial_reserves, pool.fee); @@ -1162,7 +1234,7 @@ impl Pallet { let amplification = Self::get_amplification(&pool); let share_issuance = T::Currency::total_issuance(pool_id); - let share_amount = hydra_dx_math::stableswap::calculate_shares::( + let (share_amount, fees) = hydra_dx_math::stableswap::calculate_shares::( &initial_reserves, &updated_reserves, amplification, @@ -1191,6 +1263,25 @@ impl Pallet { #[cfg(feature = "try-runtime")] Self::ensure_add_liquidity_invariant(pool_id, &initial_reserves); + let inputs = assets + .iter() + .map(|asset| Asset::new(asset.asset_id.into(), asset.amount)) + .collect(); + let fees = fees + .iter() + .zip(pool.assets.iter()) + .map(|(balance, asset_id)| Fee::new((*asset_id).into(), *balance, pool_account.clone())) + .collect::>(); + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::LiquidityAdd, + inputs, + vec![Asset::new(pool_id.into(), share_amount)], + fees, + ); + Ok(share_amount) } @@ -1220,7 +1311,7 @@ impl Pallet { ensure!(!reserve.amount.is_zero(), Error::::InvalidInitialLiquidity); } - let (amount_in, _) = hydra_dx_math::stableswap::calculate_add_one_asset::( + let (amount_in, fee) = hydra_dx_math::stableswap::calculate_add_one_asset::( &initial_reserves, shares, asset_idx, @@ -1246,6 +1337,20 @@ impl Pallet { //All done and update. let's call the on_liquidity_changed hook. Self::call_on_liquidity_change_hook(pool_id, &initial_reserves, share_issuance)?; + pallet_support::Pallet::::deposit_trade_event( + who.clone(), + pool_account.clone(), + pallet_support::types::Filler::Stableswap(pool_id.into()), + pallet_support::types::TradeOperation::LiquidityAdd, + vec![Asset::new(asset_id.into(), amount_in)], + vec![Asset::new(pool_id.into(), shares)], + vec![Fee { + asset: pool_id.into(), + amount: fee, + recipient: pool_account, + }], + ); + Ok(amount_in) } @@ -1274,9 +1379,7 @@ impl Pallet { pub(crate) fn retrieve_decimals(asset_id: T::AssetId) -> Option { T::AssetInspection::decimals(asset_id) } -} -impl Pallet { fn calculate_shares(pool_id: T::AssetId, assets: &[AssetAmount]) -> Result { let pool = Pools::::get(pool_id).ok_or(Error::::PoolNotFound)?; let pool_account = Self::pool_account(pool_id); @@ -1327,9 +1430,9 @@ impl Pallet { let amplification = Self::get_amplification(&pool); let share_issuance = T::Currency::total_issuance(pool_id); - let share_amount = hydra_dx_math::stableswap::calculate_shares::( + let (share_amount, _fees) = hydra_dx_math::stableswap::calculate_shares::( &initial_reserves, - &updated_reserves, + &updated_reserves[..], amplification, share_issuance, pool.fee, diff --git a/pallets/stableswap/src/tests/add_liquidity.rs b/pallets/stableswap/src/tests/add_liquidity.rs index 76196d9b0..7e0811829 100644 --- a/pallets/stableswap/src/tests/add_liquidity.rs +++ b/pallets/stableswap/src/tests/add_liquidity.rs @@ -2,6 +2,7 @@ use crate::tests::mock::*; use crate::types::{AssetAmount, PoolInfo}; use crate::{assert_balance, to_precision, Error}; use frame_support::{assert_noop, assert_ok, BoundedVec}; +use pallet_support::types::{Asset, Fee}; use sp_runtime::Permill; use std::num::NonZeroU16; @@ -53,6 +54,77 @@ fn add_initial_liquidity_should_work_when_called_first_time() { }); } +#[test] +fn add_liquidity_should_emit_swapped_events() { + let asset_a: AssetId = 1; + let asset_b: AssetId = 2; + let asset_c: AssetId = 3; + + ExtBuilder::default() + .with_endowed_accounts(vec![ + (BOB, asset_a, 2_000_000_000_000_000_000), + (ALICE, asset_a, 52425995641788588073263117), + (ALICE, asset_b, 52033213790329), + (ALICE, asset_c, 119135337044269), + ]) + .with_registered_asset("one".as_bytes().to_vec(), asset_a, 18) + .with_registered_asset("two".as_bytes().to_vec(), asset_b, 6) + .with_registered_asset("three".as_bytes().to_vec(), asset_c, 6) + .with_pool( + ALICE, + PoolInfo:: { + assets: vec![asset_a, asset_b, asset_c].try_into().unwrap(), + initial_amplification: NonZeroU16::new(2000).unwrap(), + final_amplification: NonZeroU16::new(2000).unwrap(), + initial_block: 0, + final_block: 0, + fee: Permill::from_float(0.0001), + }, + InitialLiquidity { + account: ALICE, + assets: vec![ + AssetAmount::new(asset_a, 52425995641788588073263117), + AssetAmount::new(asset_b, 52033213790329), + AssetAmount::new(asset_c, 119135337044269), + ], + }, + ) + .build() + .execute_with(|| { + let pool_id = get_pool_id_at(0); + let amount = 2_000_000_000_000_000_000; + Tokens::withdraw(pool_id, &ALICE, 5906657405945079804575283).unwrap(); + assert_ok!(Stableswap::add_liquidity( + RuntimeOrigin::signed(BOB), + pool_id, + vec![AssetAmount::new(asset_a, amount),].try_into().unwrap() + )); + + let received = Tokens::free_balance(pool_id, &BOB); + assert_eq!(received, 1947487201901031408); + + let pool_account = pool_account(pool_id); + + pretty_assertions::assert_eq!( + *get_last_swapped_events().last().unwrap(), + RuntimeEvent::AmmSupport(pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(pool_id), + operation: pallet_support::types::TradeOperation::LiquidityAdd, + inputs: vec![Asset::new(asset_a, 2000000000000000000),], + outputs: vec![Asset::new(pool_id, 1947487201901031408)], + fees: vec![ + Fee::new(asset_a, 57410103828678, pool_account), + Fee::new(asset_b, 17, pool_account), + Fee::new(asset_c, 39, pool_account) + ], + operation_stack: vec![], + }) + ) + }); +} + #[test] fn add_initial_liquidity_should_fail_when_lp_has_insufficient_balance() { let pool_id: AssetId = 100u32; @@ -634,6 +706,21 @@ fn add_liquidity_should_work_correctly_when_providing_exact_amount_of_shares() { let used = Tokens::free_balance(asset_a, &BOB); assert_eq!(used, 0); + + let pool_account = pool_account(pool_id); + pretty_assertions::assert_eq!( + *get_last_swapped_events().last().unwrap(), + RuntimeEvent::AmmSupport(pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(pool_id), + operation: pallet_support::types::TradeOperation::LiquidityAdd, + inputs: vec![Asset::new(asset_a, 2000000000000000003),], + outputs: vec![Asset::new(pool_id, 1947597621401945851)], + fees: vec![Fee::new(pool_id, 0, pool_account)], + operation_stack: vec![], + }) + ) }); } diff --git a/pallets/stableswap/src/tests/creation.rs b/pallets/stableswap/src/tests/creation.rs index d191f6a0a..b9d1dfe0d 100644 --- a/pallets/stableswap/src/tests/creation.rs +++ b/pallets/stableswap/src/tests/creation.rs @@ -33,8 +33,8 @@ fn create_two_asset_pool_should_work_when_assets_are_registered() { assets: vec![asset_a, asset_b].try_into().unwrap(), initial_amplification: NonZeroU16::new(100).unwrap(), final_amplification: NonZeroU16::new(100).unwrap(), - initial_block: 0, - final_block: 0, + initial_block: 1, + final_block: 1, fee: Permill::from_percent(0), } ); @@ -102,8 +102,8 @@ fn create_pool_should_store_assets_correctly_when_input_is_not_sorted() { assets: vec![asset_a, asset_b, asset_c, asset_d].try_into().unwrap(), initial_amplification: NonZeroU16::new(amplification).unwrap(), final_amplification: NonZeroU16::new(100).unwrap(), - initial_block: 0, - final_block: 0, + initial_block: 1, + final_block: 1, fee: Permill::from_percent(5), } ); diff --git a/pallets/stableswap/src/tests/mock.rs b/pallets/stableswap/src/tests/mock.rs index 0150670b1..984059ee9 100644 --- a/pallets/stableswap/src/tests/mock.rs +++ b/pallets/stableswap/src/tests/mock.rs @@ -81,11 +81,12 @@ construct_runtime!( System: frame_system, Tokens: orml_tokens, Stableswap: pallet_stableswap, + AmmSupport:pallet_support, } ); impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; @@ -172,6 +173,10 @@ impl DustRemovalAccountWhitelist for Whitelist { } } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + impl Config for Test { type RuntimeEvent = RuntimeEvent; type AssetId = AssetId; @@ -281,6 +286,8 @@ impl ExtBuilder { let mut r: sp_io::TestExternalities = t.into(); r.execute_with(|| { + frame_system::Pallet::::set_block_number(1); + for (_who, pool, initial_liquid) in self.created_pools { let pool_id = retrieve_current_asset_id(); REGISTERED_ASSETS.with(|v| { @@ -446,3 +453,27 @@ pub(crate) fn last_trade_hook_state() -> Option<(AssetId, AssetId, AssetId, Pool pub(crate) fn expect_events(e: Vec) { e.into_iter().for_each(frame_system::Pallet::::assert_has_event); } + +pub fn get_last_swapped_events() -> Vec { + let last_events: Vec = last_hydra_events(1000); + let mut swapped_events = vec![]; + + for event in last_events { + let e = event.clone(); + if let RuntimeEvent::AmmSupport(pallet_support::Event::Swapped { .. }) = e { + swapped_events.push(e); + } + } + + swapped_events +} + +pub fn last_hydra_events(n: usize) -> Vec { + frame_system::Pallet::::events() + .into_iter() + .rev() + .take(n) + .rev() + .map(|e| e.event) + .collect() +} diff --git a/pallets/stableswap/src/tests/remove_liquidity.rs b/pallets/stableswap/src/tests/remove_liquidity.rs index 7e9675c84..94466d586 100644 --- a/pallets/stableswap/src/tests/remove_liquidity.rs +++ b/pallets/stableswap/src/tests/remove_liquidity.rs @@ -3,6 +3,7 @@ use crate::types::{AssetAmount, PoolInfo}; use crate::{assert_balance, Error, Event, Pools}; use frame_support::traits::Contains; use frame_support::{assert_noop, assert_ok, BoundedVec}; +use pallet_support::types::{Asset, Fee}; use sp_runtime::Permill; use std::num::NonZeroU16; @@ -71,6 +72,20 @@ fn remove_liquidity_should_work_when_withdrawing_all_shares() { assert_balance!(BOB, pool_id, 0u128); assert_balance!(pool_account, asset_a, 100 * ONE + amount_added); assert_balance!(pool_account, asset_c, 300 * ONE - amount_received); + + pretty_assertions::assert_eq!( + *get_last_swapped_events().last().unwrap(), + RuntimeEvent::AmmSupport(pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(pool_id), + operation: pallet_support::types::TradeOperation::LiquidityRemove, + inputs: vec![Asset::new(pool_id, 200516043533380244763),], + outputs: vec![Asset::new(asset_c, 199999999999999)], + fees: vec![Fee::new(pool_id, 0, pool_account)], + operation_stack: vec![], + }) + ); }); } @@ -848,6 +863,7 @@ fn removing_liquidity_with_exact_amount_should_work() { )); // ASSERT + let received = Tokens::free_balance(pool_id, &BOB); assert_eq!(received, 0); let balance = Tokens::free_balance(asset_a, &BOB); @@ -994,6 +1010,95 @@ fn removing_liquidity_with_exact_amount_should_apply_fee() { }); } +#[test] +fn removing_liquidity_with_exact_amount_should_emit_swapped_event() { + let asset_a: AssetId = 1; + let asset_b: AssetId = 2; + let asset_c: AssetId = 3; + + ExtBuilder::default() + .with_endowed_accounts(vec![ + (BOB, asset_a, 3_000_000_000_000_000_003), + (ALICE, asset_a, 52425995641788588073263117), + (ALICE, asset_b, 52033213790329), + (ALICE, asset_c, 119135337044269), + ]) + .with_registered_asset("one".as_bytes().to_vec(), asset_a, 18) + .with_registered_asset("two".as_bytes().to_vec(), asset_b, 6) + .with_registered_asset("three".as_bytes().to_vec(), asset_c, 6) + .with_pool( + ALICE, + PoolInfo:: { + assets: vec![asset_a, asset_b, asset_c].try_into().unwrap(), + initial_amplification: NonZeroU16::new(2000).unwrap(), + final_amplification: NonZeroU16::new(2000).unwrap(), + initial_block: 0, + final_block: 0, + fee: Permill::from_percent(1), + }, + InitialLiquidity { + account: ALICE, + assets: vec![ + AssetAmount::new(asset_a, 52425995641788588073263117), + AssetAmount::new(asset_b, 52033213790329), + AssetAmount::new(asset_c, 119135337044269), + ], + }, + ) + .build() + .execute_with(|| { + let pool_id = get_pool_id_at(0); + let amount = 2_000_000_000_000_000_000; + Tokens::withdraw(pool_id, &ALICE, 5906657405945079804575283).unwrap(); + let desired_shares = 1947597621401945851; + assert_ok!(Stableswap::add_liquidity_shares( + RuntimeOrigin::signed(BOB), + pool_id, + desired_shares, + asset_a, + amount * 2, // add liquidity for shares uses slightly more + )); + let received = Tokens::free_balance(pool_id, &BOB); + assert_eq!(received, desired_shares); + let balance = Tokens::free_balance(asset_a, &BOB); + let amount_used = 3_000_000_000_000_000_003 - balance; + assert_eq!(amount_used, 2011482020765837587); + // ACT + assert_ok!(Stableswap::withdraw_asset_amount( + RuntimeOrigin::signed(BOB), + pool_id, + asset_a, + 1_000_000_000_000_000_000, + desired_shares, + )); + + // ASSERT + let shares_left = Tokens::free_balance(pool_id, &BOB); + assert_eq!(shares_left, 968209693349892648); + let balance = Tokens::free_balance(asset_a, &BOB); + assert_eq!(balance, 1988517979234162416); + let pool_account = pool_account(pool_id); + + pretty_assertions::assert_eq!( + *get_last_swapped_events().last().unwrap(), + RuntimeEvent::AmmSupport(pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(4), + operation: pallet_support::types::TradeOperation::LiquidityRemove, + inputs: vec![Asset::new(pool_id, 979387928052053203)], + outputs: vec![Asset::new(asset_a, 1000000000000000000),], + fees: vec![ + Fee::new(asset_a, 2870505165609705, pool_account), + Fee::new(asset_b, 872, pool_account), + Fee::new(asset_c, 1998, pool_account) + ], + operation_stack: vec![], + }) + ); + }); +} + #[test] fn remove_multi_asset_liquidity_should_work_when_withdrawing_some_shares() { let asset_a: AssetId = 1; diff --git a/pallets/stableswap/src/tests/trades.rs b/pallets/stableswap/src/tests/trades.rs index d27b7fd44..c5e1b6c18 100644 --- a/pallets/stableswap/src/tests/trades.rs +++ b/pallets/stableswap/src/tests/trades.rs @@ -1,9 +1,10 @@ use crate::tests::mock::*; use crate::types::{AssetAmount, PoolInfo}; -use crate::{assert_balance, to_precision, Error}; +use crate::{assert_balance, to_precision, Error, Event}; use std::num::NonZeroU16; use frame_support::{assert_noop, assert_ok}; +use pallet_support::types::{Asset, Fee}; use sp_runtime::Permill; #[test] @@ -53,6 +54,30 @@ fn sell_should_work_when_correct_input_provided() { assert_balance!(BOB, asset_b, expected); assert_balance!(pool_account, asset_a, 130 * ONE); assert_balance!(pool_account, asset_b, 100 * ONE - expected); + + expect_events(vec![ + Event::SellExecuted { + who: BOB, + pool_id, + asset_in: asset_a, + asset_out: asset_b, + amount_in: 30000000000000, + amount_out: 29902625420922, + fee: 0, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(pool_id), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 30000000000000)], + outputs: vec![Asset::new(asset_b, 29902625420922)], + fees: vec![Fee::new(asset_b, 0, pool_account)], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -103,6 +128,30 @@ fn buy_should_work_when_correct_input_provided() { assert_balance!(BOB, asset_b, 30 * ONE); assert_balance!(pool_account, asset_a, 100 * ONE + expected_to_sell); assert_balance!(pool_account, asset_b, 70 * ONE); + + expect_events(vec![ + Event::BuyExecuted { + who: BOB, + pool_id, + asset_in: asset_a, + asset_out: asset_b, + amount_in: 30098072706882, + amount_out: 30000000000000, + fee: 0, + } + .into(), + pallet_support::Event::Swapped { + swapper: BOB, + filler: pool_account, + filler_type: pallet_support::types::Filler::Stableswap(pool_id), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_a, 30098072706882)], + outputs: vec![Asset::new(asset_b, 30000000000000)], + fees: vec![Fee::new(asset_a, 0, pool_account)], + operation_stack: vec![], + } + .into(), + ]); }); } diff --git a/pallets/stableswap/src/tests/update_pool.rs b/pallets/stableswap/src/tests/update_pool.rs index 2da8836af..2b7550a60 100644 --- a/pallets/stableswap/src/tests/update_pool.rs +++ b/pallets/stableswap/src/tests/update_pool.rs @@ -38,8 +38,8 @@ fn update_pool_should_work_when_all_parames_are_updated() { assets: vec![asset_a, asset_b].try_into().unwrap(), initial_amplification: NonZeroU16::new(100).unwrap(), final_amplification: NonZeroU16::new(100).unwrap(), - initial_block: 0, - final_block: 0, + initial_block: 1, + final_block: 1, fee: Permill::from_percent(10), } ); @@ -79,8 +79,8 @@ fn update_pool_should_work_when_only_fee_is_updated() { assets: vec![asset_a, asset_b].try_into().unwrap(), initial_amplification: NonZeroU16::new(100).unwrap(), final_amplification: NonZeroU16::new(100).unwrap(), - initial_block: 0, - final_block: 0, + initial_block: 1, + final_block: 1, fee: Permill::from_percent(20), } ); diff --git a/pallets/stableswap/src/trade_execution.rs b/pallets/stableswap/src/trade_execution.rs index 19962bb4f..d83b8db93 100644 --- a/pallets/stableswap/src/trade_execution.rs +++ b/pallets/stableswap/src/trade_execution.rs @@ -114,15 +114,16 @@ where let pool = Pools::::get(pool_id) .ok_or_else(|| ExecutorError::Error(Error::::PoolNotFound.into()))?; - let shares_amount = hydra_dx_math::stableswap::calculate_shares_for_amount::( - &balances, - asset_idx, - amount_out, - amplification, - share_issuance, - pool.fee, - ) - .ok_or_else(|| ExecutorError::Error(ArithmeticError::Overflow.into()))?; + let (shares_amount, _fees) = + hydra_dx_math::stableswap::calculate_shares_for_amount::( + &balances, + asset_idx, + amount_out, + amplification, + share_issuance, + pool.fee, + ) + .ok_or_else(|| ExecutorError::Error(ArithmeticError::Overflow.into()))?; Ok(shares_amount) } else { diff --git a/pallets/staking/Cargo.toml b/pallets/staking/Cargo.toml index cccb4f3f8..7095dcdfa 100644 --- a/pallets/staking/Cargo.toml +++ b/pallets/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking" -version = "4.0.1" +version = "4.0.2" authors = ['GalacticCouncil'] edition = "2021" license = "Apache-2.0" diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index 26f1f9197..fd4babcf0 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -961,17 +961,17 @@ impl Pallet { } /// Transfer given fee to pot account. - /// Returns amount of unused fee. + /// Returns amount of unused fee and its recipient. pub fn process_trade_fee( source: T::AccountId, asset: T::AssetId, amount: Balance, - ) -> Result { + ) -> Result, DispatchError> { if asset == T::NativeAssetId::get() && Self::is_initialized() { T::Currency::transfer(asset, &source, &Self::pot_account_id(), amount)?; - Ok(amount) + Ok(Some((amount, Self::pot_account_id()))) } else { - Ok(Balance::zero()) + Ok(None) } } diff --git a/pallets/support/Cargo.toml b/pallets/support/Cargo.toml new file mode 100644 index 000000000..15589dc83 --- /dev/null +++ b/pallets/support/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "pallet-support" +version = "1.0.0" +authors = ["GalacticCouncil"] +edition = "2021" +license = "Apache 2.0" +homepage = 'https://github.com/galacticcouncil/hydration-node' +repository = 'https://github.com/galacticcouncil/hydration-node' +description = "Support for AMMs" +readme = "README.md" + +[dependencies] +codec = { default-features = false, features = ["derive"], package = "parity-scale-codec", version = "3.4.0" } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +serde = { workspace = true } +sp-arithmetic = { workspace = true } +# HydraDX dependencies +hydradx-traits = { workspace = true } +primitives = { workspace = true } + +log = { workspace = true } + +# Substrate dependencies +sp-std = { workspace = true } +sp-api = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } + +[features] +default = ["std"] +std = [ + "codec/std", + "scale-info/std", + "frame-support/std", + "frame-system/std", + "sp-std/std", + "sp-api/std", + "sp-core/std", + "sp-io/std", + "primitives/std", +] +try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/support/README.md b/pallets/support/README.md new file mode 100644 index 000000000..702f20c02 --- /dev/null +++ b/pallets/support/README.md @@ -0,0 +1,3 @@ +# AMM support pallet + +Support pallet for AMMs. Includes the unified event that is emitted by all AMM pallets. diff --git a/pallets/support/src/lib.rs b/pallets/support/src/lib.rs new file mode 100644 index 000000000..a2a2985f8 --- /dev/null +++ b/pallets/support/src/lib.rs @@ -0,0 +1,165 @@ +// This file is part of hydration-node. + +// Copyright (C) 2020-2022 Intergalactic, Limited (GIB). +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::too_many_arguments)] + +use crate::types::*; +use frame_support::sp_runtime::app_crypto::sp_core; +use frame_support::sp_runtime::{BoundedVec, DispatchError, DispatchResult}; +use frame_system::pallet_prelude::BlockNumberFor; +use sp_core::ConstU32; +use sp_std::vec::Vec; + +#[cfg(test)] +mod tests; + +pub mod types; + +// Re-export pallet items so that they can be accessed from the crate namespace. +pub use pallet::*; + +pub const MAX_STACK_SIZE: u32 = 16; + +const LOG_TARGET: &str = "runtime::amm-support"; + +type ExecutionIdStack = BoundedVec>; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use frame_support::pallet_prelude::*; + + /// The current storage version. + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + } + + #[pallet::storage] + /// Next available incremental ID + #[pallet::getter(fn incremental_id)] + pub(super) type IncrementalId = StorageValue<_, IncrementalIdType, ValueQuery>; + + #[pallet::storage] + /// Execution context to figure out where the trade is originated from + #[pallet::getter(fn execution_context)] + pub(super) type ExecutionContext = StorageValue<_, ExecutionIdStack, ValueQuery>; + + #[pallet::error] + pub enum Error {} + + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { + /// Trade executed. + Swapped { + swapper: T::AccountId, + filler: T::AccountId, + filler_type: Filler, + operation: TradeOperation, + inputs: Vec, + outputs: Vec, + fees: Vec>, + operation_stack: Vec, + }, + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_initialize(_n: BlockNumberFor) -> Weight { + ExecutionContext::::kill(); + + T::DbWeight::get().reads_writes(1, 1) + } + } + + #[pallet::call] + impl Pallet {} +} + +impl Pallet { + pub fn deposit_trade_event( + swapper: T::AccountId, + filler: T::AccountId, + filler_type: Filler, + operation: TradeOperation, + inputs: Vec, + outputs: Vec, + fees: Vec>, + ) { + let operation_stack = Self::get_context(); + Self::deposit_event(Event::::Swapped { + swapper, + filler, + filler_type, + operation, + inputs, + outputs, + fees, + operation_stack, + }); + } + + pub fn add_to_context(execution_type: F) -> Result + where + F: FnOnce(u32) -> ExecutionType, + { + let next_id = IncrementalId::::try_mutate(|current_id| -> Result { + let inc_id = *current_id; + *current_id = current_id.overflowing_add(1).0; + Ok(inc_id) + })?; + + ExecutionContext::::try_mutate(|stack| -> DispatchResult { + //We make it fire and forget, and it should fail only in test and when if wrongly used + debug_assert_ne!(stack.len(), MAX_STACK_SIZE as usize, "Stack should not be full"); + if let Err(err) = stack.try_push(execution_type(next_id)) { + log::warn!(target: LOG_TARGET, "The max stack size of execution stack has been reached: {:?}", err); + } + + Ok(()) + })?; + + Ok(next_id) + } + + pub fn remove_from_context() -> DispatchResult { + ExecutionContext::::try_mutate(|stack| -> DispatchResult { + //We make it fire and forget, and it should fail only in test and when if wrongly used + debug_assert_ne!(stack.len(), 0, "The stack should not be empty when decreased"); + + if stack.pop().is_none() { + log::warn!(target: LOG_TARGET,"The execution stack should not be empty when decreased. The stack should be populated first, or should not be decreased more than its size"); + } + + Ok(()) + })?; + + Ok(()) + } + + pub fn get_context() -> Vec { + ExecutionContext::::get().to_vec() + } +} diff --git a/pallets/support/src/tests/incremental_id.rs b/pallets/support/src/tests/incremental_id.rs new file mode 100644 index 000000000..7baadaeef --- /dev/null +++ b/pallets/support/src/tests/incremental_id.rs @@ -0,0 +1,123 @@ +// This file is part of HydraDX-node. + +// Copyright (C) 2020-2022 Intergalactic, Limited (GIB). +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::tests::mock::*; +use crate::Event; + +#[test] +fn stack_should_be_populated_when_pushed() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(AmmSupport::add_to_context(ExecutionType::Router)); + assert_eq!(AmmSupport::execution_context(), vec![ExecutionType::Router(0)]); + assert_eq!( + AmmSupport::execution_context().into_inner(), + vec![ExecutionType::Router(0)] + ); + + assert_ok!(AmmSupport::add_to_context(ExecutionType::Router)); + assert_eq!( + AmmSupport::execution_context(), + vec![ExecutionType::Router(0), ExecutionType::Router(1)] + ); + assert_eq!( + AmmSupport::execution_context().into_inner(), + vec![ExecutionType::Router(0), ExecutionType::Router(1)] + ); + + assert_ok!(AmmSupport::add_to_context(ExecutionType::Omnipool)); + assert_eq!( + AmmSupport::execution_context(), + vec![ + ExecutionType::Router(0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ] + ); + assert_eq!( + AmmSupport::execution_context().into_inner(), + vec![ + ExecutionType::Router(0), + ExecutionType::Router(1), + ExecutionType::Omnipool(2) + ] + ); + }); +} + +#[test] +fn stack_should_be_reduced_when_poped() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(AmmSupport::add_to_context(ExecutionType::Router)); + assert_ok!(AmmSupport::add_to_context(ExecutionType::Router)); + assert_ok!(AmmSupport::add_to_context(ExecutionType::Omnipool)); + + AmmSupport::remove_from_context().unwrap(); + assert_eq!( + AmmSupport::execution_context(), + vec![ExecutionType::Router(0), ExecutionType::Router(1)] + ); + assert_eq!( + AmmSupport::execution_context().into_inner(), + vec![ExecutionType::Router(0), ExecutionType::Router(1)] + ); + + assert_ok!(AmmSupport::add_to_context(ExecutionType::Omnipool)); + assert_eq!( + AmmSupport::execution_context(), + vec![ + ExecutionType::Router(0), + ExecutionType::Router(1), + ExecutionType::Omnipool(3) + ] + ); + assert_eq!( + AmmSupport::execution_context().into_inner(), + vec![ + ExecutionType::Router(0), + ExecutionType::Router(1), + ExecutionType::Omnipool(3) + ] + ); + }); +} + +#[test] +fn event_should_be_deposited() { + ExtBuilder::default().build().execute_with(|| { + AmmSupport::deposit_trade_event( + ALICE, + BOB, + Filler::Omnipool, + TradeOperation::ExactIn, + vec![Asset::new(HDX, 1_000_000)], + vec![Asset::new(DOT, 2_000_000)], + vec![Fee::new(HDX, 1_000, ALICE), Fee::new(DOT, 2_000, BOB)], + ); + + expect_events(vec![Event::Swapped { + swapper: ALICE, + filler: BOB, + filler_type: Filler::Omnipool, + operation: TradeOperation::ExactIn, + inputs: vec![Asset::new(HDX, 1_000_000)], + outputs: vec![Asset::new(DOT, 2_000_000)], + fees: vec![Fee::new(HDX, 1_000, ALICE), Fee::new(DOT, 2_000, BOB)], + operation_stack: vec![], + } + .into()]); + }); +} diff --git a/pallets/support/src/tests/mock.rs b/pallets/support/src/tests/mock.rs new file mode 100644 index 000000000..a10ee6340 --- /dev/null +++ b/pallets/support/src/tests/mock.rs @@ -0,0 +1,105 @@ +// This file is part of HydraDX. + +// Copyright (C) 2020-2022 Intergalactic, Limited (GIB). +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate as pallet_support; +pub use crate::*; + +pub use frame_support::{ + assert_ok, construct_runtime, + sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, + }, + traits::{ConstU32, ConstU64, Everything}, +}; +use sp_core::H256; + +type Block = frame_system::mocking::MockBlock; + +pub type AccountId = u64; +pub type AssetId = u32; + +pub const HDX: AssetId = 0; +pub const DOT: AssetId = 1; + +pub const ALICE: AccountId = 1; +pub const BOB: AccountId = 2; + +construct_runtime!( + pub enum Test + { + System: frame_system, + AmmSupport:pallet_support, + } +); + +impl crate::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + +impl frame_system::Config for Test { + type BaseCallFilter = Everything; + type BlockWeights = (); + type BlockLength = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; + type Nonce = u64; + type Block = Block; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); +} + +#[derive(Default)] +pub struct ExtBuilder {} + +impl ExtBuilder { + pub fn build(self) -> sp_io::TestExternalities { + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + + let mut r: sp_io::TestExternalities = t.into(); + + r.execute_with(|| { + System::set_block_number(1); + }); + + r + } +} + +pub fn expect_events(e: Vec) { + e.into_iter().for_each(frame_system::Pallet::::assert_has_event); +} diff --git a/pallets/support/src/tests/mod.rs b/pallets/support/src/tests/mod.rs new file mode 100644 index 000000000..73687e527 --- /dev/null +++ b/pallets/support/src/tests/mod.rs @@ -0,0 +1,2 @@ +mod incremental_id; +pub mod mock; diff --git a/pallets/support/src/types.rs b/pallets/support/src/types.rs new file mode 100644 index 000000000..5aab6e313 --- /dev/null +++ b/pallets/support/src/types.rs @@ -0,0 +1,67 @@ +use codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +#[cfg(feature = "std")] +use serde::{Deserialize, Serialize}; + +pub type AssetId = u32; +pub type Balance = u128; +pub type IncrementalIdType = u32; +pub type OtcOrderId = u32; +pub type ScheduleId = u32; + +#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub enum Filler { + Omnipool, + Stableswap(AssetId), // pool id + XYK(AssetId), // share token + LBP, + OTC(OtcOrderId), + // ICE(solution_id/block id), swapper: alice, filler: solver +} + +#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub struct Fee { + pub asset: AssetId, + pub amount: Balance, + pub recipient: AccountId, +} +impl Fee { + pub fn new(asset: AssetId, amount: Balance, recipient: AccountId) -> Self { + Self { + asset, + amount, + recipient, + } + } +} + +#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub struct Asset { + pub asset: AssetId, + pub amount: Balance, +} +impl Asset { + pub fn new(asset: AssetId, amount: Balance) -> Self { + Self { asset, amount } + } +} + +#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub enum ExecutionType { + Router(IncrementalIdType), + DCA(ScheduleId, IncrementalIdType), + Batch(IncrementalIdType), + Omnipool(IncrementalIdType), + XcmExchange(IncrementalIdType), + Xcm([u8; 32], IncrementalIdType), +} + +#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub enum TradeOperation { + ExactIn, + ExactOut, + Limit, + LiquidityAdd, + LiquidityRemove, +} diff --git a/pallets/transaction-multi-payment/Cargo.toml b/pallets/transaction-multi-payment/Cargo.toml index a5c9d5237..7e7121a8c 100644 --- a/pallets/transaction-multi-payment/Cargo.toml +++ b/pallets/transaction-multi-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-multi-payment" -version = "10.1.3" +version = "10.1.4" description = "Transaction multi currency payment support module" authors = ["GalacticCoucil"] edition = "2021" diff --git a/pallets/transaction-multi-payment/src/mock.rs b/pallets/transaction-multi-payment/src/mock.rs index ad3cf3bcb..b68ffd19e 100644 --- a/pallets/transaction-multi-payment/src/mock.rs +++ b/pallets/transaction-multi-payment/src/mock.rs @@ -392,6 +392,7 @@ impl pallet_utility::Config for Test { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; + type BatchHook = (); type WeightInfo = (); } diff --git a/pallets/xyk/Cargo.toml b/pallets/xyk/Cargo.toml index adca6db5a..ba490041f 100644 --- a/pallets/xyk/Cargo.toml +++ b/pallets/xyk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'pallet-xyk' -version = "6.6.3" +version = "6.7.0" description = 'XYK automated market maker' authors = ['GalacticCouncil'] edition = '2021' @@ -29,6 +29,7 @@ orml-traits = { workspace = true } # HydraDX dependencies hydradx-traits = { workspace = true } +pallet-support = { workspace = true } # Substrate dependencies frame-benchmarking = { workspace = true, optional = true } @@ -65,5 +66,6 @@ std = [ 'frame-benchmarking/std', "scale-info/std", "pallet-asset-registry/std", + "pallet-support/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 99f994983..4a57f6524 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -36,6 +36,8 @@ use hydradx_traits::{ AMMPosition, AMMTransfer, AssetPairAccountIdFor, CanCreatePool, OnCreatePoolHandler, OnLiquidityChangedHandler, OnTradeHandler, AMM, }; +use pallet_support::types::{Asset, Fee}; + use sp_std::{vec, vec::Vec}; use crate::types::{Amount, AssetId, AssetPair, Balance}; @@ -76,7 +78,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::config] - pub trait Config: frame_system::Config { + pub trait Config: frame_system::Config + pallet_support::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Registry support @@ -250,6 +252,7 @@ pub mod pallet { }, /// Asset sale executed. + /// Deprecated. Replaced bypallet_support::Swapped SellExecuted { who: T::AccountId, asset_in: AssetId, @@ -262,6 +265,7 @@ pub mod pallet { }, /// Asset purchase executed. + /// Deprecated. Replaced bypallet_support::Swapped BuyExecuted { who: T::AccountId, asset_out: AssetId, @@ -543,7 +547,8 @@ pub mod pallet { /// /// `max_limit` - minimum amount of `asset_out` / amount of asset_out to be obtained from the pool in exchange for `asset_in`. /// - /// Emits `SellExecuted` when successful. + /// Emits `SellExecuted` when successful. Deprecated. + /// Emits `pallet_support::Swapped` when successful. #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::sell() + ::AMMHandler::on_trade_weight())] pub fn sell( @@ -566,8 +571,8 @@ pub mod pallet { /// Executes a swap of `asset_in` for `asset_out`. Price is determined by the liquidity pool. /// /// `max_limit` - maximum amount of `asset_in` to be sold in exchange for `asset_out`. - /// - /// Emits `BuyExecuted` when successful. + /// Emits `BuyExecuted` when successful. Deprecated. + /// Emits `pallet_support::Swapped` when successful. #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::buy() + ::AMMHandler::on_trade_weight())] pub fn buy( @@ -901,6 +906,7 @@ impl AMM for Pallet { ) .map_err(|(_w, e)| e)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::::SellExecuted { who: transfer.origin.clone(), asset_in: transfer.assets.asset_in, @@ -909,9 +915,23 @@ impl AMM for Pallet { sale_price: transfer.amount_b, fee_asset: transfer.fee.0, fee_amount: transfer.fee.1, - pool: pair_account, + pool: pair_account.clone(), }); + pallet_support::Pallet::::deposit_trade_event( + transfer.origin.clone(), + pair_account.clone(), + pallet_support::types::Filler::XYK(Self::share_token(&pair_account)), + pallet_support::types::TradeOperation::ExactIn, + vec![Asset::new(transfer.assets.asset_in, transfer.amount)], + vec![Asset::new(transfer.assets.asset_out, transfer.amount_b)], + vec![Fee { + asset: transfer.fee.0, + amount: transfer.fee.1, + recipient: pair_account, + }], + ); + Ok(()) } @@ -1066,6 +1086,7 @@ impl AMM for Pallet { ) .map_err(|(_w, e)| e)?; + // TODO: Deprecated, remove when ready Self::deposit_event(Event::::BuyExecuted { who: transfer.origin.clone(), asset_out: transfer.assets.asset_out, @@ -1074,9 +1095,23 @@ impl AMM for Pallet { buy_price: transfer.amount_b, fee_asset: transfer.fee.0, fee_amount: transfer.fee.1, - pool: pair_account, + pool: pair_account.clone(), }); + pallet_support::Pallet::::deposit_trade_event( + transfer.origin.clone(), + pair_account.clone(), + pallet_support::types::Filler::XYK(Self::share_token(&pair_account)), + pallet_support::types::TradeOperation::ExactOut, + vec![Asset::new(transfer.assets.asset_in, transfer.amount)], + vec![Asset::new(transfer.assets.asset_out, transfer.amount_b)], + vec![Fee { + asset: transfer.fee.0, + amount: transfer.fee.1, + recipient: pair_account, + }], + ); + Ok(()) } diff --git a/pallets/xyk/src/tests/fees.rs b/pallets/xyk/src/tests/fees.rs index 49937e3a8..e0db66fba 100644 --- a/pallets/xyk/src/tests/fees.rs +++ b/pallets/xyk/src/tests/fees.rs @@ -3,6 +3,7 @@ use crate::{Error, Event}; use frame_support::{assert_noop, assert_ok}; use hydradx_traits::AMM as AmmPool; use orml_traits::MultiCurrency; +use pallet_support::types::{Asset, Fee}; use crate::types::AssetPair; @@ -93,10 +94,14 @@ fn discount_sell_fees_should_work() { 400_000_000_000_000, )); - let pair_account = XYK::get_pair_id(AssetPair { + let pair = AssetPair { asset_in: asset_a, asset_out: asset_b, - }); + }; + + let pair_account = XYK::get_pair_id(pair); + + let share_token = XYK::get_share_token(pair); let native_pair_account = XYK::get_pair_id(AssetPair { asset_in: asset_a, asset_out: HDX, @@ -129,17 +134,30 @@ fn discount_sell_fees_should_work() { assert_eq!(Currency::free_balance(asset_b, &ALICE), 600_000_019_986_006); assert_eq!(Currency::free_balance(HDX, &ALICE), 997_999_999_972_014); - expect_events(vec![Event::SellExecuted { - who: ALICE, - asset_in: asset_a, - asset_out: asset_b, - amount: 10_000_000, - sale_price: 19_986_006, - fee_asset: asset_b, - fee_amount: 13_993, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::SellExecuted { + who: ALICE, + asset_in: asset_a, + asset_out: asset_b, + amount: 10_000_000, + sale_price: 19_986_006, + fee_asset: asset_b, + fee_amount: 13_993, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 10_000_000)], + outputs: vec![Asset::new(asset_b, 19_986_006)], + fees: vec![Fee::new(asset_b, 13_993, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); // 0.1% discount fee @@ -164,10 +182,14 @@ fn discount_sell_fees_should_work() { 400_000_000_000_000, )); - let pair_account = XYK::get_pair_id(AssetPair { + let pair = AssetPair { asset_in: asset_a, asset_out: asset_b, - }); + }; + let pair_account = XYK::get_pair_id(pair); + + let share_token = XYK::get_share_token(pair); + let native_pair_account = XYK::get_pair_id(AssetPair { asset_in: asset_a, asset_out: HDX, @@ -200,17 +222,30 @@ fn discount_sell_fees_should_work() { assert_eq!(Currency::free_balance(asset_b, &ALICE), 600_000_019_980_009); assert_eq!(Currency::free_balance(HDX, &ALICE), 997_999_999_960_020); - expect_events(vec![Event::SellExecuted { - who: ALICE, - asset_in: asset_a, - asset_out: asset_b, - amount: 10_000_000, - sale_price: 19_980_009, - fee_asset: asset_b, - fee_amount: 19_990, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::SellExecuted { + who: ALICE, + asset_in: asset_a, + asset_out: asset_b, + amount: 10_000_000, + sale_price: 19_980_009, + fee_asset: asset_b, + fee_amount: 19_990, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 10_000_000)], + outputs: vec![Asset::new(asset_b, 19_980_009)], + fees: vec![Fee::new(asset_b, 19_990, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); // zero discount fee @@ -238,11 +273,17 @@ fn discount_sell_fees_should_work() { 400_000_000_000_000, )); + let pair = AssetPair { + asset_in: asset_a, + asset_out: asset_b, + }; let pair_account = XYK::get_pair_id(AssetPair { asset_in: asset_a, asset_out: asset_b, }); + let share_token = XYK::get_share_token(pair); + assert_eq!(Currency::free_balance(asset_a, &pair_account), 200_000_000_000_000); assert_eq!(Currency::free_balance(asset_b, &pair_account), 400_000_000_000_000); @@ -264,17 +305,30 @@ fn discount_sell_fees_should_work() { assert_eq!(Currency::free_balance(asset_a, &ALICE), 798_999_990_000_000); assert_eq!(Currency::free_balance(asset_b, &ALICE), 600_000_019_999_999); - expect_events(vec![Event::SellExecuted { - who: ALICE, - asset_in: asset_a, - asset_out: asset_b, - amount: 10_000_000, - sale_price: 19_999_999, - fee_asset: asset_b, - fee_amount: 0, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::SellExecuted { + who: ALICE, + asset_in: asset_a, + asset_out: asset_b, + amount: 10_000_000, + sale_price: 19_999_999, + fee_asset: asset_b, + fee_amount: 0, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 10_000_000)], + outputs: vec![Asset::new(asset_b, 19_999_999)], + fees: vec![Fee::new(asset_b, 0, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); } @@ -313,11 +367,17 @@ fn discount_buy_fees_should_work() { asset_out: HDX, }); + let pair = AssetPair { + asset_in: asset_a, + asset_out: asset_b, + }; let pair_account = XYK::get_pair_id(AssetPair { asset_in: asset_a, asset_out: asset_b, }); + let share_token = XYK::get_share_token(pair); + assert_eq!(Currency::free_balance(asset_a, &pair_account), 200_000_000_000_000); assert_eq!(Currency::free_balance(asset_b, &pair_account), 400_000_000_000_000); assert_eq!(Currency::free_balance(asset_a, &native_pair_account), 1_000_000_000_000); @@ -345,17 +405,30 @@ fn discount_buy_fees_should_work() { assert_eq!(Currency::free_balance(asset_b, &ALICE), 599_999_979_985_998); // compare to values in previous test to see difference! assert_eq!(Currency::free_balance(HDX, &ALICE), 997_999_999_972_000); - expect_events(vec![Event::BuyExecuted { - who: ALICE, - asset_out: asset_a, - asset_in: asset_b, - amount: 10_000_000, - buy_price: 20_000_002, - fee_asset: asset_b, - fee_amount: 14_000, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: ALICE, + asset_in: asset_b, + asset_out: asset_a, + amount: 10_000_000, + buy_price: 20_000_002, + fee_asset: asset_b, + fee_amount: 14_000, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_b, 10_000_000)], + outputs: vec![Asset::new(asset_a, 20_000_002)], + fees: vec![Fee::new(asset_b, 14_000, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); // 0.1% discount fee @@ -386,11 +459,17 @@ fn discount_buy_fees_should_work() { asset_out: HDX, }); + let pair = AssetPair { + asset_in: asset_a, + asset_out: asset_b, + }; let pair_account = XYK::get_pair_id(AssetPair { asset_in: asset_a, asset_out: asset_b, }); + let share_token = XYK::get_share_token(pair); + assert_eq!(Currency::free_balance(asset_a, &pair_account), 200_000_000_000_000); assert_eq!(Currency::free_balance(asset_b, &pair_account), 400_000_000_000_000); assert_eq!(Currency::free_balance(asset_a, &native_pair_account), 1_000_000_000_000); @@ -418,17 +497,30 @@ fn discount_buy_fees_should_work() { assert_eq!(Currency::free_balance(asset_b, &ALICE), 599_999_979_979_998); // compare to values in previous test to see difference! assert_eq!(Currency::free_balance(HDX, &ALICE), 997_999_999_960_000); - expect_events(vec![Event::BuyExecuted { - who: ALICE, - asset_out: asset_a, - asset_in: asset_b, - amount: 10_000_000, - buy_price: 20_000_002, - fee_asset: asset_b, - fee_amount: 20_000, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: ALICE, + asset_in: asset_b, + asset_out: asset_a, + amount: 10_000_000, + buy_price: 20_000_002, + fee_asset: asset_b, + fee_amount: 20_000, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_b, 10_000_000)], + outputs: vec![Asset::new(asset_a, 20_000_002)], + fees: vec![Fee::new(asset_b, 20_000, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); // zero discount fee @@ -457,10 +549,13 @@ fn discount_buy_fees_should_work() { 400_000_000_000_000, )); - let pair_account = XYK::get_pair_id(AssetPair { + let pair = AssetPair { asset_in: asset_a, asset_out: asset_b, - }); + }; + let pair_account = XYK::get_pair_id(pair); + + let share_token = XYK::get_share_token(pair); assert_eq!(Currency::free_balance(asset_a, &pair_account), 200_000_000_000_000); assert_eq!(Currency::free_balance(asset_b, &pair_account), 400_000_000_000_000); @@ -483,16 +578,29 @@ fn discount_buy_fees_should_work() { assert_eq!(Currency::free_balance(asset_a, &ALICE), 799_000_010_000_000); assert_eq!(Currency::free_balance(asset_b, &ALICE), 599_999_979_999_998); - expect_events(vec![Event::BuyExecuted { - who: ALICE, - asset_out: asset_a, - asset_in: asset_b, - amount: 10_000_000, - buy_price: 20_000_002, - fee_asset: asset_b, - fee_amount: 0, - pool: pair_account, - } - .into()]); + expect_events(vec![ + Event::BuyExecuted { + who: ALICE, + asset_in: asset_b, + asset_out: asset_a, + amount: 10_000_000, + buy_price: 20_000_002, + fee_asset: asset_b, + fee_amount: 0, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_b, 10_000_000)], + outputs: vec![Asset::new(asset_a, 20_000_002)], + fees: vec![Fee::new(asset_b, 0, pair_account)], + operation_stack: vec![], + } + .into(), + ]); }); } diff --git a/pallets/xyk/src/tests/mock.rs b/pallets/xyk/src/tests/mock.rs index d03890528..5109b8ffc 100644 --- a/pallets/xyk/src/tests/mock.rs +++ b/pallets/xyk/src/tests/mock.rs @@ -61,6 +61,7 @@ frame_support::construct_runtime!( XYK: xyk, Currency: orml_tokens, AssetRegistry: pallet_asset_registry, + AmmSupport:pallet_support, } ); @@ -203,6 +204,10 @@ impl CanCreatePool for Disallow10_10Pool { } } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + impl xyk::Config for Test { type RuntimeEvent = RuntimeEvent; type AssetRegistry = AssetRegistry; diff --git a/pallets/xyk/src/tests/trades.rs b/pallets/xyk/src/tests/trades.rs index 5369bb9ea..6cfb62815 100644 --- a/pallets/xyk/src/tests/trades.rs +++ b/pallets/xyk/src/tests/trades.rs @@ -1,8 +1,9 @@ pub use super::mock::*; -use crate::{Error, Event}; +use crate::{AMMTransfer, Error, Event}; use frame_support::{assert_noop, assert_ok}; use hydradx_traits::AMM as AmmPool; use orml_traits::MultiCurrency; +use pallet_support::types::{Asset, Fee}; use crate::types::AssetPair; @@ -70,6 +71,81 @@ fn sell_test() { pool: pair_account, } .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 456444678)], + outputs: vec![Asset::new(asset_b, 1363483591788)], + fees: vec![Fee::new(asset_b, 2732432046, pair_account)], + operation_stack: vec![], + } + .into(), + ]); + }); +} + +#[test] +fn execute_sell_should_use_event_id() { + new_test_ext().execute_with(|| { + let user_1 = ALICE; + let asset_a = ACA; + let asset_b = DOT; + + assert_ok!(XYK::create_pool( + RuntimeOrigin::signed(user_1), + asset_a, + 200_000_000_000, + asset_b, + 600_000_000_000_000, + )); + + let pair_account = XYK::get_pair_id(AssetPair { + asset_in: asset_a, + asset_out: asset_b, + }); + + let share_token = XYK::share_token(pair_account); + + let t = AMMTransfer { + origin: user_1, + assets: AssetPair { + asset_in: asset_a, + asset_out: asset_b, + }, + amount: 456_444_678, + amount_b: 1363483591788, + discount: false, + discount_amount: 0_u128, + fee: (asset_b, 2732432046), + }; + + assert_ok!(XYK::execute_sell(&t)); + + expect_events(vec![ + Event::SellExecuted { + who: ALICE, + asset_in: asset_a, + asset_out: asset_b, + amount: 456444678, + sale_price: 1363483591788, + fee_asset: asset_b, + fee_amount: 2732432046, + pool: pair_account, + } + .into(), + pallet_support::Event::Swapped { + swapper: ALICE, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 456444678)], + outputs: vec![Asset::new(asset_b, 1363483591788)], + fees: vec![Fee::new(asset_b, 2732432046, pair_account)], + operation_stack: vec![], + } + .into(), ]); }); } @@ -366,6 +442,17 @@ fn sell_with_correct_fees_should_work() { pool: pair_account, } .into(), + pallet_support::Event::Swapped { + swapper: user_1, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactIn, + inputs: vec![Asset::new(asset_a, 100_000)], + outputs: vec![Asset::new(asset_b, 19_762_378)], + fees: vec![Fee::new(asset_b, 39_602, pair_account)], + operation_stack: vec![], + } + .into(), ]); }); } @@ -573,6 +660,17 @@ fn single_buy_should_work() { pool: pair_account, } .into(), + pallet_support::Event::Swapped { + swapper: user_1, + filler: pair_account, + filler_type: pallet_support::types::Filler::XYK(share_token), + operation: pallet_support::types::TradeOperation::ExactOut, + inputs: vec![Asset::new(asset_b, 6_666_666)], + outputs: vec![Asset::new(asset_a, 22_068_963_235)], + fees: vec![Fee::new(asset_b, 44_137_926, pair_account)], + operation_stack: vec![], + } + .into(), ]); }); } diff --git a/runtime/adapters/Cargo.toml b/runtime/adapters/Cargo.toml index 1339157ad..5963983cf 100644 --- a/runtime/adapters/Cargo.toml +++ b/runtime/adapters/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hydradx-adapters" -version = "1.3.9" +version = "1.3.10" description = "Structs and other generic types for building runtimes." authors = ["GalacticCouncil"] edition = "2021" @@ -32,6 +32,7 @@ pallet-referrals = { workspace = true } pallet-lbp = { workspace = true } pallet-asset-registry = { workspace = true } pallet-bonds = { workspace = true } +pallet-support = { workspace = true } # Substrate dependencies frame-support = { workspace = true } @@ -66,6 +67,7 @@ pallet-balances = { workspace = true } lazy_static = { workspace = true } pretty_assertions = { workspace = true } pallet-xyk = { workspace = true } +pallet-support = { workspace = true } [features] default = ["std"] diff --git a/runtime/adapters/src/lib.rs b/runtime/adapters/src/lib.rs index ab6240ef0..e38ca8821 100644 --- a/runtime/adapters/src/lib.rs +++ b/runtime/adapters/src/lib.rs @@ -51,6 +51,7 @@ use primitive_types::{U128, U512}; use primitives::constants::chain::{STABLESWAP_SOURCE, XYK_SOURCE}; use primitives::{constants::chain::OMNIPOOL_SOURCE, AccountId, AssetId, Balance, BlockNumber, CollectionId}; use sp_runtime::traits::BlockNumberProvider; +use sp_std::vec; use sp_std::vec::Vec; use sp_std::{collections::btree_map::BTreeMap, fmt::Debug, marker::PhantomData}; use warehouse_liquidity_mining::GlobalFarmData; @@ -335,7 +336,7 @@ where NativeAsset: Get, Runtime: pallet_ema_oracle::Config + pallet_circuit_breaker::Config - + frame_system::Config + + frame_system::Config + pallet_staking::Config + pallet_referrals::Config, ::AccountId: From, @@ -472,27 +473,23 @@ where trader: AccountId, asset: AssetId, amount: Balance, - ) -> Result { + ) -> Result>, Self::Error> { if asset == Lrna::get() { - return Ok(Balance::zero()); + return Ok(vec![]); } let referrals_used = if asset == NativeAsset::get() { - Balance::zero() + None } else { - pallet_referrals::Pallet::::process_trade_fee( - fee_account.clone().into(), - trader.into(), - asset.into(), - amount, - )? + pallet_referrals::Pallet::::process_trade_fee(fee_account.clone(), trader, asset.into(), amount)? }; + let referral_amount = referrals_used.clone().map(|(balance, _)| balance).unwrap_or_default(); let staking_used = pallet_staking::Pallet::::process_trade_fee( - fee_account.into(), + fee_account, asset.into(), - amount.saturating_sub(referrals_used), + amount.saturating_sub(referral_amount), )?; - Ok(staking_used.saturating_add(referrals_used)) + Ok(vec![staking_used, referrals_used]) } } diff --git a/runtime/adapters/src/tests/mock.rs b/runtime/adapters/src/tests/mock.rs index 43e2f3b1f..73edd8bb3 100644 --- a/runtime/adapters/src/tests/mock.rs +++ b/runtime/adapters/src/tests/mock.rs @@ -101,6 +101,7 @@ construct_runtime!( RouteExecutor: pallet_route_executor, Currencies: pallet_currencies, XYK: pallet_xyk, + AmmSupport:pallet_support, } ); @@ -264,6 +265,10 @@ impl pallet_xyk::Config for Test { type NonDustableWhitelistHandler = DummyDuster; } +impl pallet_support::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + pub struct Whitelist; impl Contains for Whitelist { diff --git a/runtime/adapters/src/xcm_exchange.rs b/runtime/adapters/src/xcm_exchange.rs index b4704724c..d053b74d8 100644 --- a/runtime/adapters/src/xcm_exchange.rs +++ b/runtime/adapters/src/xcm_exchange.rs @@ -1,4 +1,5 @@ use orml_traits::MultiCurrency; +use pallet_support::types::ExecutionType; use polkadot_xcm::v4::prelude::*; use sp_core::Get; use sp_runtime::traits::{Convert, Zero}; @@ -27,6 +28,7 @@ where CurrencyIdConvert: Convert>, Currency: MultiCurrency, Runtime::Balance: From + Zero + Into, + Runtime::AssetId: Into, { fn exchange_asset( _origin: Option<&Location>, @@ -62,7 +64,9 @@ where }; let use_onchain_route = vec![]; - if maximal { + pallet_support::Pallet::::add_to_context(ExecutionType::XcmExchange).map_err(|_| give.clone())?; + + let trade_result = if maximal { // sell let Fungible(amount) = given.fun else { return Err(give) }; let Fungible(min_buy_amount) = wanted.fun else { @@ -90,9 +94,10 @@ where ); Currency::withdraw(asset_out, &account, amount_received)?; // burn the received tokens let holding: Asset = (wanted.id.clone(), amount_received.into()).into(); + Ok(holding.into()) }) - .map_err(|_| give) + .map_err(|_| give.clone()) } else { // buy let Fungible(amount) = wanted.fun else { return Err(give) }; @@ -127,7 +132,11 @@ where assets.push(holding); Ok(assets.into()) }) - .map_err(|_| give) - } + .map_err(|_| give.clone()) + }; + + pallet_support::Pallet::::remove_from_context().map_err(|_| give)?; + + trade_result } } diff --git a/runtime/hydradx/Cargo.toml b/runtime/hydradx/Cargo.toml index 98c887f7f..80e0428a5 100644 --- a/runtime/hydradx/Cargo.toml +++ b/runtime/hydradx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hydradx-runtime" -version = "277.0.0" +version = "278.0.0" authors = ["GalacticCouncil"] edition = "2021" license = "Apache 2.0" @@ -40,6 +40,7 @@ pallet-bonds = { workspace = true } pallet-lbp = { workspace = true } pallet-xyk = { workspace = true } pallet-referrals = { workspace = true } +pallet-support = { workspace = true } pallet-evm-accounts = { workspace = true } pallet-evm-accounts-rpc-runtime-api = { workspace = true } pallet-xyk-liquidity-mining = { workspace = true } @@ -341,6 +342,7 @@ std = [ "pallet-conviction-voting/std", "pallet-referenda/std", "pallet-whitelist/std", + "pallet-support/std", ] try-runtime = [ "frame-try-runtime", @@ -416,6 +418,7 @@ try-runtime = [ "pallet-conviction-voting/try-runtime", "pallet-referenda/try-runtime", "pallet-whitelist/try-runtime", + "pallet-support/try-runtime", ] metadata-hash = [ diff --git a/runtime/hydradx/src/assets.rs b/runtime/hydradx/src/assets.rs index 8fda4c1e5..315c93592 100644 --- a/runtime/hydradx/src/assets.rs +++ b/runtime/hydradx/src/assets.rs @@ -1637,6 +1637,10 @@ impl pallet_liquidation::Config for Runtime { type WeightInfo = weights::pallet_liquidation::HydraWeight; } +impl pallet_support::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} + pub struct ConvertViaOmnipool(PhantomData); impl Convert for ConvertViaOmnipool where diff --git a/runtime/hydradx/src/lib.rs b/runtime/hydradx/src/lib.rs index f2dd210b3..80a392856 100644 --- a/runtime/hydradx/src/lib.rs +++ b/runtime/hydradx/src/lib.rs @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("hydradx"), impl_name: create_runtime_str!("hydradx"), authoring_version: 1, - spec_version: 277, + spec_version: 278, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -240,6 +240,7 @@ construct_runtime!( // Warehouse - let's allocate indices 100+ for warehouse pallets EmaOracle: pallet_ema_oracle = 202, + AmmSupport:pallet_support = 204, } ); diff --git a/runtime/hydradx/src/system.rs b/runtime/hydradx/src/system.rs index 033476857..e9ff0aca1 100644 --- a/runtime/hydradx/src/system.rs +++ b/runtime/hydradx/src/system.rs @@ -47,7 +47,10 @@ use frame_support::{ }; use frame_system::EnsureRoot; use hydradx_adapters::{OraclePriceProvider, RelayChainBlockNumberProvider}; +use pallet_support::types::ExecutionType; +use pallet_utility::BatchHook; use scale_info::TypeInfo; +use sp_runtime::DispatchResult; pub struct CallFilter; impl Contains for CallFilter { @@ -376,9 +379,26 @@ impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; + type BatchHook = ManageExecutionTypeForUnifiedEvent; type WeightInfo = weights::pallet_utility::HydraWeight; } +pub struct ManageExecutionTypeForUnifiedEvent; + +impl BatchHook for ManageExecutionTypeForUnifiedEvent { + fn on_batch_start() -> DispatchResult { + AmmSupport::add_to_context(ExecutionType::Batch)?; + + Ok(()) + } + + fn on_batch_end() -> DispatchResult { + AmmSupport::remove_from_context()?; + + Ok(()) + } +} + parameter_types! { pub const BasicDeposit: Balance = 5 * DOLLARS; pub const ByteDeposit: Balance = DOLLARS / 10; diff --git a/runtime/hydradx/src/weights/pallet_dca.rs b/runtime/hydradx/src/weights/pallet_dca.rs index a922fb210..87c2dec2b 100644 --- a/runtime/hydradx/src/weights/pallet_dca.rs +++ b/runtime/hydradx/src/weights/pallet_dca.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_dca` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -61,39 +61,41 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `DCA::ScheduleIdsPerBlock` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) /// Storage: `DCA::Schedules` (r:1 w:0) /// Proof: `DCA::Schedules` (`max_values`: None, `max_size`: Some(191), added: 2666, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:1 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `DCA::RemainingAmounts` (r:1 w:1) /// Proof: `DCA::RemainingAmounts` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `Balances::Reserves` (r:1 w:1) /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `DCA::RetriesOnError` (r:0 w:1) /// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) fn on_initialize_with_buy_trade() -> Weight { // Proof Size summary in bytes: - // Measured: `55175` + // Measured: `54994` // Estimated: `31902` - // Minimum execution time: 229_651_000 picoseconds. - Weight::from_parts(235_813_000, 31902) - .saturating_add(T::DbWeight::get().reads(18_u64)) - .saturating_add(T::DbWeight::get().writes(7_u64)) + // Minimum execution time: 221_144_000 picoseconds. + Weight::from_parts(224_534_000, 31902) + .saturating_add(T::DbWeight::get().reads(19_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: `DCA::ScheduleIdsPerBlock` (r:12 w:2) /// Proof: `DCA::ScheduleIdsPerBlock` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) /// Storage: `DCA::Schedules` (r:1 w:0) /// Proof: `DCA::Schedules` (`max_values`: None, `max_size`: Some(191), added: 2666, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:2 w:0) + /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::NextAssetId` (r:1 w:0) /// Proof: `AssetRegistry::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::LocationAssets` (r:1 w:0) /// Proof: `AssetRegistry::LocationAssets` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) - /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0) - /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Router::Routes` (r:1 w:0) /// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `DCA::RemainingAmounts` (r:1 w:1) @@ -102,6 +104,8 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `Tokens::Reserves` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Router::SkipEd` (r:1 w:0) + /// Proof: `Router::SkipEd` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `Duster::AccountBlacklist` (r:2 w:0) /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) @@ -112,54 +116,60 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `DCA::RetriesOnError` (r:0 w:1) /// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) fn on_initialize_with_buy_trade_with_insufficient_fee_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `60689` + // Measured: `61068` // Estimated: `31902` - // Minimum execution time: 364_296_000 picoseconds. - Weight::from_parts(370_868_000, 31902) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(10_u64)) + // Minimum execution time: 388_604_000 picoseconds. + Weight::from_parts(396_604_000, 31902) + .saturating_add(T::DbWeight::get().reads(39_u64)) + .saturating_add(T::DbWeight::get().writes(12_u64)) } /// Storage: `DCA::ScheduleIdsPerBlock` (r:12 w:2) /// Proof: `DCA::ScheduleIdsPerBlock` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) /// Storage: `DCA::Schedules` (r:1 w:0) /// Proof: `DCA::Schedules` (`max_values`: None, `max_size`: Some(191), added: 2666, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:1 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `DCA::RemainingAmounts` (r:1 w:1) /// Proof: `DCA::RemainingAmounts` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `Balances::Reserves` (r:1 w:1) /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `DCA::RetriesOnError` (r:0 w:1) /// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) fn on_initialize_with_sell_trade() -> Weight { // Proof Size summary in bytes: - // Measured: `54963` + // Measured: `54782` // Estimated: `31902` - // Minimum execution time: 233_583_000 picoseconds. - Weight::from_parts(236_857_000, 31902) - .saturating_add(T::DbWeight::get().reads(18_u64)) - .saturating_add(T::DbWeight::get().writes(7_u64)) + // Minimum execution time: 223_733_000 picoseconds. + Weight::from_parts(227_341_000, 31902) + .saturating_add(T::DbWeight::get().reads(19_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: `DCA::ScheduleIdsPerBlock` (r:12 w:2) /// Proof: `DCA::ScheduleIdsPerBlock` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) /// Storage: `DCA::Schedules` (r:1 w:0) /// Proof: `DCA::Schedules` (`max_values`: None, `max_size`: Some(191), added: 2666, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:2 w:0) + /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::NextAssetId` (r:1 w:0) /// Proof: `AssetRegistry::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::LocationAssets` (r:1 w:0) /// Proof: `AssetRegistry::LocationAssets` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) - /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0) - /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Router::Routes` (r:1 w:0) /// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `DCA::RemainingAmounts` (r:1 w:1) @@ -168,6 +178,8 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `Tokens::Reserves` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Router::SkipEd` (r:1 w:0) + /// Proof: `Router::SkipEd` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `Duster::AccountBlacklist` (r:2 w:0) /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) @@ -178,16 +190,20 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `DCA::RetriesOnError` (r:0 w:1) /// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) fn on_initialize_with_sell_trade_with_insufficient_fee_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `61565` + // Measured: `61944` // Estimated: `31902` - // Minimum execution time: 365_645_000 picoseconds. - Weight::from_parts(367_426_000, 31902) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(10_u64)) + // Minimum execution time: 387_494_000 picoseconds. + Weight::from_parts(393_880_000, 31902) + .saturating_add(T::DbWeight::get().reads(39_u64)) + .saturating_add(T::DbWeight::get().writes(12_u64)) } /// Storage: `DCA::ScheduleIdsPerBlock` (r:1 w:0) /// Proof: `DCA::ScheduleIdsPerBlock` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`) @@ -195,20 +211,20 @@ impl pallet_dca::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `1113` // Estimated: `3566` - // Minimum execution time: 15_430_000 picoseconds. - Weight::from_parts(15_771_000, 3566) + // Minimum execution time: 15_121_000 picoseconds. + Weight::from_parts(15_348_000, 3566) .saturating_add(T::DbWeight::get().reads(1_u64)) } - /// Storage: `AssetRegistry::Assets` (r:1 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:2 w:0) + /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::NextAssetId` (r:1 w:0) /// Proof: `AssetRegistry::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::LocationAssets` (r:1 w:0) /// Proof: `AssetRegistry::LocationAssets` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`) - /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0) - /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Router::Routes` (r:1 w:0) /// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:3 w:1) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `DCA::ScheduleIdSequencer` (r:1 w:1) @@ -227,11 +243,11 @@ impl pallet_dca::WeightInfo for HydraWeight { /// Proof: `DCA::RemainingAmounts` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) fn schedule() -> Weight { // Proof Size summary in bytes: - // Measured: `53252` + // Measured: `53335` // Estimated: `29326` - // Minimum execution time: 192_467_000 picoseconds. - Weight::from_parts(195_247_000, 29326) - .saturating_add(T::DbWeight::get().reads(21_u64)) + // Minimum execution time: 197_371_000 picoseconds. + Weight::from_parts(199_471_000, 29326) + .saturating_add(T::DbWeight::get().reads(23_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: `DCA::Schedules` (r:1 w:1) @@ -252,8 +268,8 @@ impl pallet_dca::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `2530` // Estimated: `4714` - // Minimum execution time: 73_512_000 picoseconds. - Weight::from_parts(74_398_000, 4714) + // Minimum execution time: 73_251_000 picoseconds. + Weight::from_parts(74_112_000, 4714) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } diff --git a/runtime/hydradx/src/weights/pallet_lbp.rs b/runtime/hydradx/src/weights/pallet_lbp.rs index fb172bd35..e5a09e2d1 100644 --- a/runtime/hydradx/src/weights/pallet_lbp.rs +++ b/runtime/hydradx/src/weights/pallet_lbp.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_lbp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-lbp -// --extrinsic=* +// --pallet +// pallet-lbp +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_lbp.rs +// --output +// lbp.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,6 +61,8 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) /// Storage: `LBP::FeeCollectorWithAsset` (r:1 w:1) /// Proof: `LBP::FeeCollectorWithAsset` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -63,8 +71,6 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:1) @@ -73,10 +79,10 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn create_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `1519` + // Measured: `1586` // Estimated: `11322` - // Minimum execution time: 136_266_000 picoseconds. - Weight::from_parts(137_668_000, 11322) + // Minimum execution time: 142_561_000 picoseconds. + Weight::from_parts(144_186_000, 11322) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -88,13 +94,15 @@ impl pallet_lbp::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3628` - // Minimum execution time: 24_713_000 picoseconds. - Weight::from_parts(25_213_000, 3628) + // Minimum execution time: 24_589_000 picoseconds. + Weight::from_parts(24_818_000, 3628) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -103,21 +111,21 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `1780` + // Measured: `1846` // Estimated: `11322` - // Minimum execution time: 104_132_000 picoseconds. - Weight::from_parts(104_897_000, 11322) + // Minimum execution time: 110_251_000 picoseconds. + Weight::from_parts(111_333_000, 11322) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `LBP::PoolData` (r:1 w:1) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -126,8 +134,6 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:1) @@ -138,13 +144,15 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `LBP::FeeCollectorWithAsset` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `1895` + // Measured: `1962` // Estimated: `11322` - // Minimum execution time: 135_138_000 picoseconds. - Weight::from_parts(136_175_000, 11322) + // Minimum execution time: 143_015_000 picoseconds. + Weight::from_parts(144_411_000, 11322) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `LBP::PoolData` (r:1 w:0) @@ -157,21 +165,23 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn sell() -> Weight { // Proof Size summary in bytes: - // Measured: `2185` + // Measured: `2393` // Estimated: `13905` - // Minimum execution time: 237_882_000 picoseconds. - Weight::from_parts(239_360_000, 13905) - .saturating_add(T::DbWeight::get().reads(17_u64)) + // Minimum execution time: 257_842_000 picoseconds. + Weight::from_parts(259_082_000, 13905) + .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:1) @@ -182,21 +192,23 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn buy() -> Weight { // Proof Size summary in bytes: - // Measured: `2185` + // Measured: `2393` // Estimated: `13905` - // Minimum execution time: 237_046_000 picoseconds. - Weight::from_parts(238_347_000, 13905) - .saturating_add(T::DbWeight::get().reads(17_u64)) + // Minimum execution time: 256_944_000 picoseconds. + Weight::from_parts(258_678_000, 13905) + .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:1) @@ -207,29 +219,31 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. fn router_execution_sell(c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `822 + e * (1363 ±0)` + // Measured: `1052 + e * (1341 ±0)` // Estimated: `8799 + e * (7749 ±0)` - // Minimum execution time: 87_361_000 picoseconds. - Weight::from_parts(88_580_000, 8799) - // Standard Error: 241_438 - .saturating_add(Weight::from_parts(1_047_223, 0).saturating_mul(c.into())) - // Standard Error: 537_751 - .saturating_add(Weight::from_parts(152_397_271, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().reads((14_u64).saturating_mul(e.into()))) + // Minimum execution time: 95_985_000 picoseconds. + Weight::from_parts(96_871_000, 8799) + // Standard Error: 246_612 + .saturating_add(Weight::from_parts(1_068_115, 0).saturating_mul(c.into())) + // Standard Error: 549_275 + .saturating_add(Weight::from_parts(164_399_349, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((13_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 7749).saturating_mul(e.into())) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:1) @@ -240,51 +254,55 @@ impl pallet_lbp::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 3]`. /// The range of component `e` is `[0, 1]`. fn router_execution_buy(c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `822 + e * (1363 ±0)` - // Estimated: `6156 + e * (8544 ±0)` - // Minimum execution time: 160_618_000 picoseconds. - Weight::from_parts(161_967_000, 6156) - // Standard Error: 434_297 - .saturating_add(Weight::from_parts(2_807_924, 0).saturating_mul(c.into())) - // Standard Error: 1_464_590 - .saturating_add(Weight::from_parts(113_441_082, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().reads((14_u64).saturating_mul(e.into()))) + // Measured: `1052 + e * (1341 ±0)` + // Estimated: `6190 + e * (8544 ±6_084_484_329_818_434)` + // Minimum execution time: 170_892_000 picoseconds. + Weight::from_parts(172_182_000, 6190) + // Standard Error: 451_274 + .saturating_add(Weight::from_parts(3_188_052, 0).saturating_mul(c.into())) + // Standard Error: 1_521_843 + .saturating_add(Weight::from_parts(123_952_641, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((13_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 8544).saturating_mul(e.into())) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn calculate_buy() -> Weight { // Proof Size summary in bytes: - // Measured: `822` - // Estimated: `6156` - // Minimum execution time: 89_869_000 picoseconds. - Weight::from_parts(90_917_000, 6156) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `1052` + // Estimated: `6190` + // Minimum execution time: 98_436_000 picoseconds. + Weight::from_parts(98_880_000, 6190) + .saturating_add(T::DbWeight::get().reads(5_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:0) /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn calculate_spot_price_with_fee() -> Weight { // Proof Size summary in bytes: - // Measured: `822` - // Estimated: `6156` - // Minimum execution time: 25_211_000 picoseconds. - Weight::from_parts(25_559_000, 6156) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `1052` + // Estimated: `6190` + // Minimum execution time: 32_751_000 picoseconds. + Weight::from_parts(33_277_000, 6190) + .saturating_add(T::DbWeight::get().reads(6_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_omnipool.rs b/runtime/hydradx/src/weights/pallet_omnipool.rs index 3c81a7897..f3fed51b7 100644 --- a/runtime/hydradx/src/weights/pallet_omnipool.rs +++ b/runtime/hydradx/src/weights/pallet_omnipool.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_omnipool` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-omnipool -// --extrinsic=* +// --pallet +// pallet-omnipool +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_omnipool.rs +// --output +// omni.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -79,13 +85,15 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Omnipool::Positions` (`max_values`: None, `max_size`: Some(100), added: 2575, mode: `MaxEncodedLen`) fn add_token() -> Weight { // Proof Size summary in bytes: - // Measured: `3128` + // Measured: `3162` // Estimated: `7406` - // Minimum execution time: 129_737_000 picoseconds. - Weight::from_parts(131_001_000, 7406) + // Minimum execution time: 133_850_000 picoseconds. + Weight::from_parts(135_071_000, 7406) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:3 w:3) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::Assets` (r:1 w:1) @@ -108,8 +116,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Tokens::TotalIssuance` (r:1 w:1) @@ -130,10 +136,10 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Omnipool::Positions` (`max_values`: None, `max_size`: Some(100), added: 2575, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `4552` + // Measured: `4619` // Estimated: `8739` - // Minimum execution time: 218_146_000 picoseconds. - Weight::from_parts(219_509_000, 8739) + // Minimum execution time: 225_181_000 picoseconds. + Weight::from_parts(226_916_000, 8739) .saturating_add(T::DbWeight::get().reads(24_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } @@ -143,6 +149,8 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Omnipool::Positions` (`max_values`: None, `max_size`: Some(100), added: 2575, mode: `MaxEncodedLen`) /// Storage: `Omnipool::Assets` (r:1 w:1) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Oracles` (r:2 w:0) @@ -155,8 +163,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Tokens::TotalIssuance` (r:1 w:1) @@ -183,13 +189,15 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(113), added: 2588, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `7463` + // Measured: `7925` // Estimated: `11322` - // Minimum execution time: 288_313_000 picoseconds. - Weight::from_parts(290_432_000, 11322) + // Minimum execution time: 293_473_000 picoseconds. + Weight::from_parts(294_927_000, 11322) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::Assets` (r:3 w:3) @@ -204,8 +212,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:2 w:2) @@ -240,17 +246,23 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Referrals::PendingConversions` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) /// Storage: `Referrals::CounterForPendingConversions` (r:1 w:1) /// Proof: `Referrals::CounterForPendingConversions` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn sell() -> Weight { // Proof Size summary in bytes: - // Measured: `7823` + // Measured: `8475` // Estimated: `13905` - // Minimum execution time: 333_717_000 picoseconds. - Weight::from_parts(335_901_000, 13905) - .saturating_add(T::DbWeight::get().reads(42_u64)) - .saturating_add(T::DbWeight::get().writes(23_u64)) + // Minimum execution time: 362_238_000 picoseconds. + Weight::from_parts(364_468_000, 13905) + .saturating_add(T::DbWeight::get().reads(44_u64)) + .saturating_add(T::DbWeight::get().writes(25_u64)) } /// Storage: `Omnipool::Assets` (r:3 w:3) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::HubAssetImbalance` (r:1 w:1) @@ -263,8 +275,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:2 w:2) @@ -299,28 +309,34 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Referrals::PendingConversions` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) /// Storage: `Referrals::CounterForPendingConversions` (r:1 w:1) /// Proof: `Referrals::CounterForPendingConversions` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn buy() -> Weight { // Proof Size summary in bytes: - // Measured: `7823` + // Measured: `8475` // Estimated: `13905` - // Minimum execution time: 335_910_000 picoseconds. - Weight::from_parts(337_763_000, 13905) - .saturating_add(T::DbWeight::get().reads(42_u64)) - .saturating_add(T::DbWeight::get().writes(23_u64)) + // Minimum execution time: 363_114_000 picoseconds. + Weight::from_parts(364_872_000, 13905) + .saturating_add(T::DbWeight::get().reads(44_u64)) + .saturating_add(T::DbWeight::get().writes(25_u64)) } /// Storage: `Omnipool::Assets` (r:1 w:1) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn set_asset_tradable_state() -> Weight { // Proof Size summary in bytes: - // Measured: `1305` + // Measured: `1338` // Estimated: `3550` - // Minimum execution time: 28_270_000 picoseconds. - Weight::from_parts(28_812_000, 3550) + // Minimum execution time: 27_936_000 picoseconds. + Weight::from_parts(28_283_000, 3550) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Omnipool::Assets` (r:1 w:0) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:1 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:2) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -329,8 +345,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:1 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:1 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:1) @@ -339,10 +353,10 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn refund_refused_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `2850` + // Measured: `2918` // Estimated: `6196` - // Minimum execution time: 104_659_000 picoseconds. - Weight::from_parts(105_287_000, 6196) + // Minimum execution time: 106_732_000 picoseconds. + Weight::from_parts(107_480_000, 6196) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -360,10 +374,10 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(113), added: 2588, mode: `MaxEncodedLen`) fn sacrifice_position() -> Weight { // Proof Size summary in bytes: - // Measured: `2910` + // Measured: `2943` // Estimated: `3655` - // Minimum execution time: 67_565_000 picoseconds. - Weight::from_parts(68_526_000, 3655) + // Minimum execution time: 66_273_000 picoseconds. + Weight::from_parts(66_844_000, 3655) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -371,15 +385,17 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn set_asset_weight_cap() -> Weight { // Proof Size summary in bytes: - // Measured: `1305` + // Measured: `1338` // Estimated: `3550` - // Minimum execution time: 28_717_000 picoseconds. - Weight::from_parts(29_137_000, 3550) + // Minimum execution time: 28_141_000 picoseconds. + Weight::from_parts(28_478_000, 3550) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Omnipool::Assets` (r:1 w:1) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:3 w:3) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::HubAssetImbalance` (r:1 w:1) @@ -390,8 +406,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:1 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) @@ -404,21 +418,21 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) fn withdraw_protocol_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `4545` + // Measured: `4613` // Estimated: `8739` - // Minimum execution time: 150_915_000 picoseconds. - Weight::from_parts(152_374_000, 8739) + // Minimum execution time: 155_481_000 picoseconds. + Weight::from_parts(156_810_000, 8739) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: `Omnipool::Assets` (r:1 w:1) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:3 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:3) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::HubAssetImbalance` (r:1 w:1) /// Proof: `Omnipool::HubAssetImbalance` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::TotalIssuance` (r:1 w:1) /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -435,15 +449,17 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn remove_token() -> Weight { // Proof Size summary in bytes: - // Measured: `3636` + // Measured: `3721` // Estimated: `11322` - // Minimum execution time: 151_145_000 picoseconds. - Weight::from_parts(152_034_000, 11322) - .saturating_add(T::DbWeight::get().reads(17_u64)) + // Minimum execution time: 158_665_000 picoseconds. + Weight::from_parts(160_565_000, 11322) + .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: `Omnipool::Assets` (r:3 w:3) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::HubAssetImbalance` (r:1 w:1) @@ -456,8 +472,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:2 w:2) @@ -488,25 +502,29 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Referrals::PendingConversions` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) /// Storage: `Referrals::CounterForPendingConversions` (r:1 w:1) /// Proof: `Referrals::CounterForPendingConversions` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. - fn router_execution_sell(c: u32, e: u32, ) -> Weight { + fn router_execution_sell(_c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1974 + e * (5348 ±0)` - // Estimated: `11390 + e * (7749 ±0)` - // Minimum execution time: 45_263_000 picoseconds. - Weight::from_parts(45_693_748, 11390) - // Standard Error: 134_488 - .saturating_add(Weight::from_parts(268_691, 0).saturating_mul(c.into())) - // Standard Error: 134_488 - .saturating_add(Weight::from_parts(289_580_167, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `2403 + e * (5571 ±0)` + // Estimated: `8799 + e * (7749 ±0)` + // Minimum execution time: 56_991_000 picoseconds. + Weight::from_parts(58_969_824, 8799) + // Standard Error: 117_597 + .saturating_add(Weight::from_parts(305_808_985, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((32_u64).saturating_mul(e.into()))) - .saturating_add(T::DbWeight::get().writes((21_u64).saturating_mul(e.into()))) + .saturating_add(T::DbWeight::get().writes((23_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 7749).saturating_mul(e.into())) } /// Storage: `Omnipool::Assets` (r:3 w:3) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Omnipool::HubAssetImbalance` (r:1 w:1) @@ -519,8 +537,6 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:2 w:2) @@ -551,31 +567,37 @@ impl pallet_omnipool::WeightInfo for HydraWeight { /// Proof: `Referrals::PendingConversions` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) /// Storage: `Referrals::CounterForPendingConversions` (r:1 w:1) /// Proof: `Referrals::CounterForPendingConversions` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. fn router_execution_buy(c: u32, _e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7322` + // Measured: `7974` // Estimated: `13905` - // Minimum execution time: 319_285_000 picoseconds. - Weight::from_parts(311_604_346, 13905) - // Standard Error: 213_268 - .saturating_add(Weight::from_parts(12_523_973, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(39_u64)) - .saturating_add(T::DbWeight::get().writes(21_u64)) + // Minimum execution time: 344_466_000 picoseconds. + Weight::from_parts(333_207_673, 13905) + // Standard Error: 156_769 + .saturating_add(Weight::from_parts(15_937_317, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(41_u64)) + .saturating_add(T::DbWeight::get().writes(23_u64)) } /// Storage: `DynamicFees::AssetFee` (r:2 w:0) /// Proof: `DynamicFees::AssetFee` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Omnipool::Assets` (r:2 w:0) /// Proof: `Omnipool::Assets` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn calculate_spot_price_with_fee() -> Weight { // Proof Size summary in bytes: - // Measured: `1933` - // Estimated: `6156` - // Minimum execution time: 44_268_000 picoseconds. - Weight::from_parts(44_633_000, 6156) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Measured: `2362` + // Estimated: `6190` + // Minimum execution time: 53_222_000 picoseconds. + Weight::from_parts(53_566_000, 6190) + .saturating_add(T::DbWeight::get().reads(8_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_otc.rs b/runtime/hydradx/src/weights/pallet_otc.rs index 4159772bc..0e2e11e32 100644 --- a/runtime/hydradx/src/weights/pallet_otc.rs +++ b/runtime/hydradx/src/weights/pallet_otc.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_otc` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-otc -// --extrinsic=* +// --pallet +// pallet-otc +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_otc.rs +// --output +// otc.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -63,10 +69,10 @@ impl pallet_otc::WeightInfo for HydraWeight { /// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) fn place_order() -> Weight { // Proof Size summary in bytes: - // Measured: `963` + // Measured: `996` // Estimated: `6190` - // Minimum execution time: 46_446_000 picoseconds. - Weight::from_parts(47_816_000, 6190) + // Minimum execution time: 48_891_000 picoseconds. + Weight::from_parts(49_393_000, 6190) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -90,17 +96,21 @@ impl pallet_otc::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0) /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn partial_fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2436` + // Measured: `2645` // Estimated: `13905` - // Minimum execution time: 165_029_000 picoseconds. - Weight::from_parts(166_577_000, 13905) - .saturating_add(T::DbWeight::get().reads(19_u64)) + // Minimum execution time: 177_304_000 picoseconds. + Weight::from_parts(178_656_000, 13905) + .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: `OTC::Orders` (r:1 w:1) /// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) /// Proof: `Router::SkipEd` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `Duster::AccountBlacklist` (r:2 w:0) @@ -109,8 +119,6 @@ impl pallet_otc::WeightInfo for HydraWeight { /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Tokens::Reserves` (r:1 w:1) @@ -119,29 +127,31 @@ impl pallet_otc::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0) /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2436` + // Measured: `2645` // Estimated: `13905` - // Minimum execution time: 161_252_000 picoseconds. - Weight::from_parts(162_540_000, 13905) - .saturating_add(T::DbWeight::get().reads(19_u64)) + // Minimum execution time: 174_232_000 picoseconds. + Weight::from_parts(175_930_000, 13905) + .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: `OTC::Orders` (r:1 w:1) /// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:1 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Reserves` (r:1 w:1) /// Proof: `Tokens::Reserves` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:1 w:1) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:1 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) fn cancel_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1197` + // Measured: `1230` // Estimated: `4726` - // Minimum execution time: 42_576_000 picoseconds. - Weight::from_parts(42_962_000, 4726) + // Minimum execution time: 43_680_000 picoseconds. + Weight::from_parts(44_561_000, 4726) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } diff --git a/runtime/hydradx/src/weights/pallet_otc_settlements.rs b/runtime/hydradx/src/weights/pallet_otc_settlements.rs index 510edd4a0..b67c4e42d 100644 --- a/runtime/hydradx/src/weights/pallet_otc_settlements.rs +++ b/runtime/hydradx/src/weights/pallet_otc_settlements.rs @@ -19,32 +19,40 @@ //! Autogenerated weights for `pallet_otc_settlements` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-otc-settlements -// --extrinsic=* +// --pallet +// pallet-otc_settlements +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_otc_settlements.rs +// --output +// otcs.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] #![allow(missing_docs)] -use frame_support::{traits::Get, weights::Weight}; +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; +/// Weights for `pallet_otc_settlements`. + /// Weights for `pallet_otc_settlements` using the HydraDX node and recommended hardware. pub struct HydraWeight(PhantomData); impl pallet_otc_settlements::weights::WeightInfo for HydraWeight { @@ -52,15 +60,17 @@ impl pallet_otc_settlements::weights::WeightInfo for Hy /// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:1 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:1 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn settle_otc_order() -> Weight { // Proof Size summary in bytes: - // Measured: `747` + // Measured: `1099` // Estimated: `6196` - // Minimum execution time: 101_333_000 picoseconds. - Weight::from_parts(102_441_000, 6196) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Minimum execution time: 107_618_000 picoseconds. + Weight::from_parts(108_445_000, 6196) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_route_executor.rs b/runtime/hydradx/src/weights/pallet_route_executor.rs index 2aaa06528..fea357b97 100644 --- a/runtime/hydradx/src/weights/pallet_route_executor.rs +++ b/runtime/hydradx/src/weights/pallet_route_executor.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_route_executor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-route-executor -// --extrinsic=* +// --pallet +// pallet-route-executor +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_route_executor.rs +// --output +// router.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -59,19 +65,23 @@ impl pallet_route_executor::WeightInfo for HydraWeight< // Proof Size summary in bytes: // Measured: `944` // Estimated: `3590` - // Minimum execution time: 14_078_000 picoseconds. - Weight::from_parts(14_311_000, 3590) + // Minimum execution time: 14_401_000 picoseconds. + Weight::from_parts(14_833_000, 3590) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:1) /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:1) @@ -83,23 +93,27 @@ impl pallet_route_executor::WeightInfo for HydraWeight< /// The range of component `c` is `[0, 1]`. fn calculate_and_execute_sell_in_lbp(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3743` + // Measured: `3951` // Estimated: `13905` - // Minimum execution time: 358_498_000 picoseconds. - Weight::from_parts(363_434_920, 13905) - // Standard Error: 527_071 - .saturating_add(Weight::from_parts(73_831_579, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(17_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + // Minimum execution time: 394_133_000 picoseconds. + Weight::from_parts(399_837_120, 13905) + // Standard Error: 480_761 + .saturating_add(Weight::from_parts(79_466_379, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(19_u64)) + .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:5 w:5) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:1) /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:1) @@ -112,17 +126,17 @@ impl pallet_route_executor::WeightInfo for HydraWeight< /// The range of component `b` is `[0, 1]`. fn calculate_and_execute_buy_in_lbp(c: u32, b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1637 + b * (2131 ±0)` + // Measured: `1992 + b * (1984 ±0)` // Estimated: `8799 + b * (7749 ±0)` - // Minimum execution time: 97_161_000 picoseconds. - Weight::from_parts(98_156_000, 8799) - // Standard Error: 243_998 - .saturating_add(Weight::from_parts(1_011_059, 0).saturating_mul(c.into())) - // Standard Error: 543_453 - .saturating_add(Weight::from_parts(269_812_210, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Minimum execution time: 105_766_000 picoseconds. + Weight::from_parts(106_850_000, 8799) + // Standard Error: 247_261 + .saturating_add(Weight::from_parts(1_058_218, 0).saturating_mul(c.into())) + // Standard Error: 550_720 + .saturating_add(Weight::from_parts(295_076_249, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((14_u64).saturating_mul(b.into()))) - .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(b.into()))) .saturating_add(Weight::from_parts(0, 7749).saturating_mul(b.into())) } /// Storage: `EmaOracle::Oracles` (r:2 w:0) @@ -131,12 +145,16 @@ impl pallet_route_executor::WeightInfo for HydraWeight< /// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:7 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Tokens::Accounts` (r:15 w:0) - /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::Assets` (r:6 w:0) /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) + /// Storage: `Tokens::Accounts` (r:15 w:0) + /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `XYK::ShareToken` (r:6 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:0) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) /// Proof: `Router::SkipEd` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `Duster::AccountBlacklist` (r:7 w:0) @@ -153,11 +171,11 @@ impl pallet_route_executor::WeightInfo for HydraWeight< /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn set_route_for_xyk() -> Weight { // Proof Size summary in bytes: - // Measured: `7004` + // Measured: `7213` // Estimated: `39735` - // Minimum execution time: 1_934_148_000 picoseconds. - Weight::from_parts(1_942_875_000, 39735) - .saturating_add(T::DbWeight::get().reads(58_u64)) + // Minimum execution time: 2_267_256_000 picoseconds. + Weight::from_parts(2_276_393_000, 39735) + .saturating_add(T::DbWeight::get().reads(60_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Router::Routes` (r:0 w:1) @@ -166,8 +184,8 @@ impl pallet_route_executor::WeightInfo for HydraWeight< // Proof Size summary in bytes: // Measured: `1012` // Estimated: `0` - // Minimum execution time: 25_655_000 picoseconds. - Weight::from_parts(26_130_000, 0) + // Minimum execution time: 25_660_000 picoseconds. + Weight::from_parts(25_971_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Router::Routes` (r:1 w:0) @@ -176,8 +194,8 @@ impl pallet_route_executor::WeightInfo for HydraWeight< // Proof Size summary in bytes: // Measured: `800` // Estimated: `3555` - // Minimum execution time: 7_524_000 picoseconds. - Weight::from_parts(7_759_000, 3555) + // Minimum execution time: 7_380_000 picoseconds. + Weight::from_parts(7_625_000, 3555) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `EmaOracle::Oracles` (r:2 w:0) @@ -186,8 +204,8 @@ impl pallet_route_executor::WeightInfo for HydraWeight< // Proof Size summary in bytes: // Measured: `1452` // Estimated: `6294` - // Minimum execution time: 26_686_000 picoseconds. - Weight::from_parts(26_929_000, 6294) + // Minimum execution time: 26_435_000 picoseconds. + Weight::from_parts(26_846_000, 6294) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `EmaOracle::Oracles` (r:4 w:0) @@ -196,22 +214,24 @@ impl pallet_route_executor::WeightInfo for HydraWeight< // Proof Size summary in bytes: // Measured: `1814` // Estimated: `11598` - // Minimum execution time: 40_799_000 picoseconds. - Weight::from_parts(41_526_000, 11598) + // Minimum execution time: 40_530_000 picoseconds. + Weight::from_parts(41_113_000, 11598) .saturating_add(T::DbWeight::get().reads(4_u64)) } /// Storage: `LBP::PoolData` (r:1 w:0) /// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`) /// Storage: `Tokens::Locks` (r:1 w:0) /// Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn calculate_spot_price_with_fee_in_lbp() -> Weight { // Proof Size summary in bytes: - // Measured: `1674` - // Estimated: `6156` - // Minimum execution time: 36_673_000 picoseconds. - Weight::from_parts(37_031_000, 6156) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `2029` + // Estimated: `6190` + // Minimum execution time: 44_535_000 picoseconds. + Weight::from_parts(45_317_000, 6190) + .saturating_add(T::DbWeight::get().reads(6_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_stableswap.rs b/runtime/hydradx/src/weights/pallet_stableswap.rs index 2c48d648b..88bf0cf47 100644 --- a/runtime/hydradx/src/weights/pallet_stableswap.rs +++ b/runtime/hydradx/src/weights/pallet_stableswap.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_stableswap` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-11-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` @@ -41,7 +41,7 @@ // 20 // --template=scripts/pallet-weight-template.hbs // --output -// weights.rs +// stable.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -67,8 +67,8 @@ impl pallet_stableswap::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `855` // Estimated: `16590` - // Minimum execution time: 43_034_000 picoseconds. - Weight::from_parts(43_494_000, 16590) + // Minimum execution time: 42_627_000 picoseconds. + Weight::from_parts(43_257_000, 16590) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -96,13 +96,15 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `3679` + // Measured: `3888` // Estimated: `29403` - // Minimum execution time: 1_392_606_000 picoseconds. - Weight::from_parts(1_396_550_000, 29403) - .saturating_add(T::DbWeight::get().reads(36_u64)) + // Minimum execution time: 1_396_711_000 picoseconds. + Weight::from_parts(1_399_810_000, 29403) + .saturating_add(T::DbWeight::get().reads(37_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } /// Storage: `Stableswap::AssetTradability` (r:1 w:0) @@ -129,13 +131,15 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn add_liquidity_shares() -> Weight { // Proof Size summary in bytes: - // Measured: `3548` + // Measured: `3757` // Estimated: `19071` - // Minimum execution time: 942_454_000 picoseconds. - Weight::from_parts(946_345_000, 19071) - .saturating_add(T::DbWeight::get().reads(24_u64)) + // Minimum execution time: 951_042_000 picoseconds. + Weight::from_parts(956_992_000, 19071) + .saturating_add(T::DbWeight::get().reads(25_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `Stableswap::AssetTradability` (r:1 w:0) @@ -160,15 +164,17 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:0 w:1) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn remove_liquidity_one_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `3571` + // Measured: `3780` // Estimated: `19071` - // Minimum execution time: 981_411_000 picoseconds. - Weight::from_parts(986_942_000, 19071) - .saturating_add(T::DbWeight::get().reads(23_u64)) + // Minimum execution time: 973_675_000 picoseconds. + Weight::from_parts(978_123_000, 19071) + .saturating_add(T::DbWeight::get().reads(24_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `AssetRegistry::Assets` (r:6 w:0) @@ -197,10 +203,10 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `3571` + // Measured: `3638` // Estimated: `29403` - // Minimum execution time: 713_843_000 picoseconds. - Weight::from_parts(717_284_000, 29403) + // Minimum execution time: 714_149_000 picoseconds. + Weight::from_parts(717_802_000, 29403) .saturating_add(T::DbWeight::get().reads(40_u64)) .saturating_add(T::DbWeight::get().writes(14_u64)) } @@ -228,13 +234,15 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn withdraw_asset_amount() -> Weight { // Proof Size summary in bytes: - // Measured: `3571` + // Measured: `3780` // Estimated: `19071` - // Minimum execution time: 1_321_443_000 picoseconds. - Weight::from_parts(1_330_485_000, 19071) - .saturating_add(T::DbWeight::get().reads(24_u64)) + // Minimum execution time: 1_304_045_000 picoseconds. + Weight::from_parts(1_310_888_000, 19071) + .saturating_add(T::DbWeight::get().reads(25_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `Stableswap::AssetTradability` (r:2 w:0) @@ -259,15 +267,17 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:0 w:1) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn sell() -> Weight { // Proof Size summary in bytes: - // Measured: `3634` + // Measured: `3843` // Estimated: `19071` - // Minimum execution time: 916_352_000 picoseconds. - Weight::from_parts(920_145_000, 19071) - .saturating_add(T::DbWeight::get().reads(26_u64)) + // Minimum execution time: 932_943_000 picoseconds. + Weight::from_parts(938_765_000, 19071) + .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `Stableswap::AssetTradability` (r:2 w:0) @@ -294,13 +304,15 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn buy() -> Weight { // Proof Size summary in bytes: - // Measured: `3604` + // Measured: `3813` // Estimated: `19071` - // Minimum execution time: 896_389_000 picoseconds. - Weight::from_parts(900_423_000, 19071) - .saturating_add(T::DbWeight::get().reads(27_u64)) + // Minimum execution time: 899_028_000 picoseconds. + Weight::from_parts(902_695_000, 19071) + .saturating_add(T::DbWeight::get().reads(28_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `Stableswap::Pools` (r:1 w:0) @@ -311,8 +323,8 @@ impl pallet_stableswap::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `291` // Estimated: `3522` - // Minimum execution time: 20_400_000 picoseconds. - Weight::from_parts(20_642_000, 3522) + // Minimum execution time: 20_448_000 picoseconds. + Weight::from_parts(20_790_000, 3522) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -322,8 +334,8 @@ impl pallet_stableswap::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `291` // Estimated: `3522` - // Minimum execution time: 17_775_000 picoseconds. - Weight::from_parts(18_177_000, 3522) + // Minimum execution time: 18_046_000 picoseconds. + Weight::from_parts(18_248_000, 3522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -333,8 +345,8 @@ impl pallet_stableswap::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `291` // Estimated: `3522` - // Minimum execution time: 18_598_000 picoseconds. - Weight::from_parts(19_175_000, 3522) + // Minimum execution time: 18_832_000 picoseconds. + Weight::from_parts(19_283_000, 3522) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -360,22 +372,22 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:0 w:1) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. - fn router_execution_sell(c: u32, e: u32, ) -> Weight { + fn router_execution_sell(_c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1621 + e * (2013 ±0)` + // Measured: `1654 + e * (2189 ±0)` // Estimated: `13990 + e * (5166 ±0)` - // Minimum execution time: 387_637_000 picoseconds. - Weight::from_parts(387_839_091, 13990) - // Standard Error: 754_096 - .saturating_add(Weight::from_parts(2_363_309, 0).saturating_mul(c.into())) - // Standard Error: 754_096 - .saturating_add(Weight::from_parts(891_811_539, 0).saturating_mul(e.into())) + // Minimum execution time: 389_951_000 picoseconds. + Weight::from_parts(413_140_502, 13990) + // Standard Error: 1_517_346 + .saturating_add(Weight::from_parts(890_143_515, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().reads((15_u64).saturating_mul(e.into()))) + .saturating_add(T::DbWeight::get().reads((16_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 5166).saturating_mul(e.into())) } @@ -403,20 +415,22 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Accumulator` (r:1 w:1) /// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(5921), added: 6416, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. fn router_execution_buy(c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1620 + e * (1984 ±0)` + // Measured: `1653 + e * (2160 ±0)` // Estimated: `13990 + e * (5166 ±0)` - // Minimum execution time: 389_169_000 picoseconds. - Weight::from_parts(391_578_000, 13990) - // Standard Error: 1_117_835 - .saturating_add(Weight::from_parts(4_197_174, 0).saturating_mul(c.into())) - // Standard Error: 2_489_735 - .saturating_add(Weight::from_parts(517_256_553, 0).saturating_mul(e.into())) + // Minimum execution time: 389_033_000 picoseconds. + Weight::from_parts(390_900_000, 13990) + // Standard Error: 1_178_861 + .saturating_add(Weight::from_parts(4_367_320, 0).saturating_mul(c.into())) + // Standard Error: 2_625_656 + .saturating_add(Weight::from_parts(529_308_020, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().reads((16_u64).saturating_mul(e.into()))) + .saturating_add(T::DbWeight::get().reads((17_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 5166).saturating_mul(e.into())) } @@ -430,10 +444,10 @@ impl pallet_stableswap::WeightInfo for HydraWeight { /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn calculate_spot_price_with_fee() -> Weight { // Proof Size summary in bytes: - // Measured: `1852` + // Measured: `1885` // Estimated: `16590` - // Minimum execution time: 334_088_000 picoseconds. - Weight::from_parts(335_160_000, 16590) + // Minimum execution time: 325_545_000 picoseconds. + Weight::from_parts(326_127_000, 16590) .saturating_add(T::DbWeight::get().reads(13_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_transaction_multi_payment.rs b/runtime/hydradx/src/weights/pallet_transaction_multi_payment.rs index f667bd8b2..bc9ab15ba 100644 --- a/runtime/hydradx/src/weights/pallet_transaction_multi_payment.rs +++ b/runtime/hydradx/src/weights/pallet_transaction_multi_payment.rs @@ -19,18 +19,15 @@ //! Autogenerated weights for `pallet_transaction_multi_payment` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled // --pallet // pallet_transaction_multi_payment @@ -64,10 +61,10 @@ impl pallet_transaction_multi_payment::WeightInfo for H /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn add_currency() -> Weight { // Proof Size summary in bytes: - // Measured: `1176` + // Measured: `1209` // Estimated: `3493` - // Minimum execution time: 20_221_000 picoseconds. - Weight::from_parts(20_863_000, 3493) + // Minimum execution time: 19_680_000 picoseconds. + Weight::from_parts(20_493_000, 3493) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -75,10 +72,10 @@ impl pallet_transaction_multi_payment::WeightInfo for H /// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn remove_currency() -> Weight { // Proof Size summary in bytes: - // Measured: `1207` + // Measured: `1240` // Estimated: `3493` - // Minimum execution time: 20_985_000 picoseconds. - Weight::from_parts(21_358_000, 3493) + // Minimum execution time: 20_452_000 picoseconds. + Weight::from_parts(20_811_000, 3493) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -88,10 +85,10 @@ impl pallet_transaction_multi_payment::WeightInfo for H /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_currency() -> Weight { // Proof Size summary in bytes: - // Measured: `1272` + // Measured: `1305` // Estimated: `3493` - // Minimum execution time: 29_947_000 picoseconds. - Weight::from_parts(30_593_000, 3493) + // Minimum execution time: 30_233_000 picoseconds. + Weight::from_parts(30_698_000, 3493) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -103,8 +100,8 @@ impl pallet_transaction_multi_payment::WeightInfo for H // Proof Size summary in bytes: // Measured: `3221` // Estimated: `27510` - // Minimum execution time: 89_961_000 picoseconds. - Weight::from_parts(92_275_000, 27510) + // Minimum execution time: 88_773_000 picoseconds. + Weight::from_parts(89_513_000, 27510) .saturating_add(T::DbWeight::get().reads(11_u64)) } /// Storage: `AssetRegistry::NextAssetId` (r:1 w:0) @@ -117,8 +114,8 @@ impl pallet_transaction_multi_payment::WeightInfo for H // Proof Size summary in bytes: // Measured: `1313` // Estimated: `4087` - // Minimum execution time: 23_076_000 picoseconds. - Weight::from_parts(23_748_000, 4087) + // Minimum execution time: 22_879_000 picoseconds. + Weight::from_parts(23_385_000, 4087) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -136,6 +133,8 @@ impl pallet_transaction_multi_payment::WeightInfo for H /// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::Oracles` (r:1 w:0) /// Proof: `EmaOracle::Oracles` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:4 w:4) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `XYK::ShareToken` (r:1 w:0) @@ -146,21 +145,21 @@ impl pallet_transaction_multi_payment::WeightInfo for H /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:2 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:2 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `Tokens::TotalIssuance` (r:1 w:1) /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn withdraw_fee() -> Weight { // Proof Size summary in bytes: - // Measured: `4091` + // Measured: `4300` // Estimated: `11322` - // Minimum execution time: 222_263_000 picoseconds. - Weight::from_parts(223_179_000, 11322) - .saturating_add(T::DbWeight::get().reads(24_u64)) + // Minimum execution time: 246_466_000 picoseconds. + Weight::from_parts(248_428_000, 11322) + .saturating_add(T::DbWeight::get().reads(25_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_utility.rs b/runtime/hydradx/src/weights/pallet_utility.rs index e30a8a166..8a8f113db 100644 --- a/runtime/hydradx/src/weights/pallet_utility.rs +++ b/runtime/hydradx/src/weights/pallet_utility.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` @@ -51,48 +51,66 @@ pub struct WeightInfo(PhantomData); /// Weights for `pallet_utility` using the HydraDX node and recommended hardware. pub struct HydraWeight(PhantomData); impl pallet_utility::WeightInfo for HydraWeight { + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IdStack` (r:1 w:1) + /// Proof: `AmmSupport::IdStack` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_275_000 picoseconds. - Weight::from_parts(6_413_000, 0) - // Standard Error: 1_609 - .saturating_add(Weight::from_parts(3_722_278, 0).saturating_mul(c.into())) + // Measured: `109` + // Estimated: `1536` + // Minimum execution time: 11_565_000 picoseconds. + Weight::from_parts(1_469_920, 1536) + // Standard Error: 2_956 + .saturating_add(Weight::from_parts(4_030_477, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_401_000 picoseconds. - Weight::from_parts(6_546_000, 0) + // Minimum execution time: 6_183_000 picoseconds. + Weight::from_parts(6_383_000, 0) } + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IdStack` (r:1 w:1) + /// Proof: `AmmSupport::IdStack` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_281_000 picoseconds. - Weight::from_parts(6_139_425, 0) - // Standard Error: 2_538 - .saturating_add(Weight::from_parts(4_015_708, 0).saturating_mul(c.into())) + // Measured: `109` + // Estimated: `1536` + // Minimum execution time: 11_377_000 picoseconds. + Weight::from_parts(12_184_543, 1536) + // Standard Error: 2_950 + .saturating_add(Weight::from_parts(4_283_377, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_731_000 picoseconds. - Weight::from_parts(8_957_000, 0) + // Minimum execution time: 8_714_000 picoseconds. + Weight::from_parts(8_898_000, 0) } + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IdStack` (r:1 w:1) + /// Proof: `AmmSupport::IdStack` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`) /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_152_000 picoseconds. - Weight::from_parts(8_319_759, 0) - // Standard Error: 2_825 - .saturating_add(Weight::from_parts(3_699_376, 0).saturating_mul(c.into())) + // Measured: `109` + // Estimated: `1536` + // Minimum execution time: 11_519_000 picoseconds. + Weight::from_parts(11_090_812, 1536) + // Standard Error: 2_756 + .saturating_add(Weight::from_parts(4_001_584, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_xcm.rs b/runtime/hydradx/src/weights/pallet_xcm.rs index d289dbbd6..09cad56dc 100644 --- a/runtime/hydradx/src/weights/pallet_xcm.rs +++ b/runtime/hydradx/src/weights/pallet_xcm.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-xcm -// --extrinsic=* +// --pallet +// pallet-xcm +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_xcm.rs +// --output +// xcm.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -63,10 +69,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `145` - // Estimated: `3610` - // Minimum execution time: 26_808_000 picoseconds. - Weight::from_parts(27_657_000, 3610) + // Measured: `178` + // Estimated: `3643` + // Minimum execution time: 29_644_000 picoseconds. + Weight::from_parts(30_115_000, 3643) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -81,6 +87,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) @@ -97,15 +107,19 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `4001` - // Minimum execution time: 119_808_000 picoseconds. - Weight::from_parts(120_772_000, 4001) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `711` + // Estimated: `4176` + // Minimum execution time: 128_779_000 picoseconds. + Weight::from_parts(129_535_000, 4176) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) @@ -122,19 +136,25 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `4001` - // Minimum execution time: 113_768_000 picoseconds. - Weight::from_parts(114_458_000, 4001) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `711` + // Estimated: `4176` + // Minimum execution time: 122_013_000 picoseconds. + Weight::from_parts(123_163_000, 4176) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn execute() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 10_674_000 picoseconds. - Weight::from_parts(11_085_000, 0) + // Measured: `142` + // Estimated: `2078` + // Minimum execution time: 17_574_000 picoseconds. + Weight::from_parts(18_069_000, 2078) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -142,8 +162,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_294_000 picoseconds. - Weight::from_parts(10_566_000, 0) + // Minimum execution time: 10_032_000 picoseconds. + Weight::from_parts(10_479_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1) @@ -152,8 +172,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_300_000 picoseconds. - Weight::from_parts(3_438_000, 0) + // Minimum execution time: 3_395_000 picoseconds. + Weight::from_parts(3_543_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) @@ -174,10 +194,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `145` - // Estimated: `3610` - // Minimum execution time: 34_496_000 picoseconds. - Weight::from_parts(35_126_000, 3610) + // Measured: `178` + // Estimated: `3643` + // Minimum execution time: 37_227_000 picoseconds. + Weight::from_parts(37_856_000, 3643) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -197,10 +217,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `328` - // Estimated: `3793` - // Minimum execution time: 35_498_000 picoseconds. - Weight::from_parts(36_205_000, 3793) + // Measured: `396` + // Estimated: `3861` + // Minimum execution time: 38_626_000 picoseconds. + Weight::from_parts(39_233_000, 3861) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -210,8 +230,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_429_000 picoseconds. - Weight::from_parts(3_514_000, 0) + // Minimum execution time: 3_311_000 picoseconds. + Weight::from_parts(3_389_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) @@ -220,8 +240,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `125` // Estimated: `13490` - // Minimum execution time: 23_899_000 picoseconds. - Weight::from_parts(24_595_000, 13490) + // Minimum execution time: 24_330_000 picoseconds. + Weight::from_parts(24_610_000, 13490) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -231,8 +251,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `129` // Estimated: `13494` - // Minimum execution time: 24_345_000 picoseconds. - Weight::from_parts(24_819_000, 13494) + // Minimum execution time: 24_094_000 picoseconds. + Weight::from_parts(24_531_000, 13494) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -242,8 +262,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `16018` - // Minimum execution time: 25_896_000 picoseconds. - Weight::from_parts(26_370_000, 16018) + // Minimum execution time: 25_687_000 picoseconds. + Weight::from_parts(26_023_000, 16018) .saturating_add(T::DbWeight::get().reads(6_u64)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) @@ -260,10 +280,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6152` - // Minimum execution time: 33_012_000 picoseconds. - Weight::from_parts(33_556_000, 6152) + // Measured: `245` + // Estimated: `6185` + // Minimum execution time: 35_187_000 picoseconds. + Weight::from_parts(35_810_000, 6185) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -273,8 +293,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `172` // Estimated: `11062` - // Minimum execution time: 15_074_000 picoseconds. - Weight::from_parts(15_300_000, 11062) + // Minimum execution time: 15_029_000 picoseconds. + Weight::from_parts(15_317_000, 11062) .saturating_add(T::DbWeight::get().reads(4_u64)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) @@ -283,8 +303,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `136` // Estimated: `13501` - // Minimum execution time: 24_481_000 picoseconds. - Weight::from_parts(24_983_000, 13501) + // Minimum execution time: 24_032_000 picoseconds. + Weight::from_parts(24_609_000, 13501) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -302,10 +322,10 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `13577` - // Minimum execution time: 43_872_000 picoseconds. - Weight::from_parts(44_246_000, 13577) + // Measured: `245` + // Estimated: `13610` + // Minimum execution time: 45_864_000 picoseconds. + Weight::from_parts(46_515_000, 13610) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -317,8 +337,8 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1554` - // Minimum execution time: 5_184_000 picoseconds. - Weight::from_parts(5_385_000, 1554) + // Minimum execution time: 5_268_000 picoseconds. + Weight::from_parts(5_334_000, 1554) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -328,11 +348,15 @@ impl pallet_xcm::WeightInfo for HydraWeight { // Proof Size summary in bytes: // Measured: `7706` // Estimated: `11171` - // Minimum execution time: 36_167_000 picoseconds. - Weight::from_parts(36_522_000, 11171) + // Minimum execution time: 34_683_000 picoseconds. + Weight::from_parts(35_383_000, 11171) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `AmmSupport::IncrementalId` (r:1 w:1) + /// Proof: `AmmSupport::IncrementalId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:1) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `AssetRegistry::LocationAssets` (r:1 w:0) @@ -341,11 +365,11 @@ impl pallet_xcm::WeightInfo for HydraWeight { /// Proof: `UnknownTokens::ConcreteFungibleBalances` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `448` + // Measured: `590` // Estimated: `4087` - // Minimum execution time: 42_235_000 picoseconds. - Weight::from_parts(42_824_000, 4087) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Minimum execution time: 50_134_000 picoseconds. + Weight::from_parts(50_681_000, 4087) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/weights/pallet_xyk.rs b/runtime/hydradx/src/weights/pallet_xyk.rs index 1e6fc1551..d4f2bf1f9 100644 --- a/runtime/hydradx/src/weights/pallet_xyk.rs +++ b/runtime/hydradx/src/weights/pallet_xyk.rs @@ -19,23 +19,29 @@ //! Autogenerated weights for `pallet_xyk` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-09-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/release/hydradx +// ./target/release/hydradx // benchmark // pallet -// --chain=dev -// --steps=50 -// --repeat=20 // --wasm-execution=compiled -// --pallet=pallet-xyk -// --extrinsic=* +// --pallet +// pallet-xyk +// --extrinsic +// * +// --heap-pages +// 4096 +// --steps +// 50 +// --repeat +// 20 // --template=scripts/pallet-weight-template.hbs -// --output=./weights/pallet_xyk.rs +// --output +// xyk.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -85,21 +91,25 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `AssetRegistry::ExistentialDepositCounter` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `Tokens::TotalIssuance` (r:1 w:1) /// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:0 w:1) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `XYK::TotalLiquidity` (r:0 w:1) /// Proof: `XYK::TotalLiquidity` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) /// Storage: `XYK::PoolAssets` (r:0 w:1) /// Proof: `XYK::PoolAssets` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn create_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `3863` + // Measured: `3930` // Estimated: `19071` - // Minimum execution time: 482_234_000 picoseconds. - Weight::from_parts(487_055_000, 19071) + // Minimum execution time: 514_551_000 picoseconds. + Weight::from_parts(517_902_000, 19071) .saturating_add(T::DbWeight::get().reads(34_u64)) - .saturating_add(T::DbWeight::get().writes(20_u64)) + .saturating_add(T::DbWeight::get().writes(21_u64)) } /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:7 w:7) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `XYK::TotalLiquidity` (r:1 w:1) @@ -110,8 +120,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:4 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) @@ -130,10 +138,10 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) fn add_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `4499` + // Measured: `4566` // Estimated: `19071` - // Minimum execution time: 300_637_000 picoseconds. - Weight::from_parts(301_659_000, 19071) + // Minimum execution time: 322_959_000 picoseconds. + Weight::from_parts(324_407_000, 19071) .saturating_add(T::DbWeight::get().reads(28_u64)) .saturating_add(T::DbWeight::get().writes(13_u64)) } @@ -141,6 +149,8 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `XYK::TotalLiquidity` (r:1 w:1) /// Proof: `XYK::TotalLiquidity` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:4 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:7 w:7) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -149,8 +159,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:3 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:4 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:2 w:0) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AcceptedCurrencyPrice` (r:1 w:0) @@ -171,15 +179,17 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `XYK::PoolAssets` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn remove_liquidity() -> Weight { // Proof Size summary in bytes: - // Measured: `4549` + // Measured: `4616` // Estimated: `19071` - // Minimum execution time: 437_485_000 picoseconds. - Weight::from_parts(441_006_000, 19071) + // Minimum execution time: 465_242_000 picoseconds. + Weight::from_parts(467_621_000, 19071) .saturating_add(T::DbWeight::get().reads(30_u64)) .saturating_add(T::DbWeight::get().writes(17_u64)) } /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:3 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:6 w:6) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -188,8 +198,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:3 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:3 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) @@ -204,17 +212,21 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencyPrice` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn sell() -> Weight { // Proof Size summary in bytes: - // Measured: `4398` + // Measured: `4607` // Estimated: `16488` - // Minimum execution time: 263_251_000 picoseconds. - Weight::from_parts(265_158_000, 16488) - .saturating_add(T::DbWeight::get().reads(25_u64)) + // Minimum execution time: 291_799_000 picoseconds. + Weight::from_parts(294_762_000, 16488) + .saturating_add(T::DbWeight::get().reads(26_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:3 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:6 w:6) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -223,8 +235,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:3 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:3 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AcceptedCurrencyPrice` (r:1 w:0) @@ -239,17 +249,21 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `AssetRegistry::ExistentialDepositCounter` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) fn buy() -> Weight { // Proof Size summary in bytes: - // Measured: `4398` + // Measured: `4607` // Estimated: `16488` - // Minimum execution time: 261_604_000 picoseconds. - Weight::from_parts(262_778_000, 16488) - .saturating_add(T::DbWeight::get().reads(25_u64)) + // Minimum execution time: 290_794_000 picoseconds. + Weight::from_parts(291_891_000, 16488) + .saturating_add(T::DbWeight::get().reads(26_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:3 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:6 w:6) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -258,8 +272,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:3 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:3 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) @@ -274,25 +286,29 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `MultiTransactionPayment::AcceptedCurrencyPrice` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 2]`. /// The range of component `e` is `[0, 1]`. fn router_execution_sell(c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1221 + e * (3177 ±0)` + // Measured: `1786 + e * (2821 ±0)` // Estimated: `8799 + e * (10332 ±0)` - // Minimum execution time: 24_468_000 picoseconds. - Weight::from_parts(8_259_951, 8799) - // Standard Error: 78_193 - .saturating_add(Weight::from_parts(8_502_639, 0).saturating_mul(c.into())) - // Standard Error: 78_193 - .saturating_add(Weight::from_parts(247_520_019, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().reads((22_u64).saturating_mul(e.into()))) + // Minimum execution time: 36_204_000 picoseconds. + Weight::from_parts(15_925_932, 8799) + // Standard Error: 142_323 + .saturating_add(Weight::from_parts(10_665_022, 0).saturating_mul(c.into())) + // Standard Error: 142_323 + .saturating_add(Weight::from_parts(265_461_022, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((21_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 10332).saturating_mul(e.into())) } /// Storage: `XYK::ShareToken` (r:1 w:0) /// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `AssetRegistry::Assets` (r:3 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:6 w:6) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) /// Storage: `Router::SkipEd` (r:1 w:0) @@ -301,8 +317,6 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `Duster::AccountBlacklist` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// Storage: `AssetRegistry::BannedAssets` (r:3 w:0) /// Proof: `AssetRegistry::BannedAssets` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// Storage: `AssetRegistry::Assets` (r:3 w:0) - /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:1 w:0) /// Proof: `MultiTransactionPayment::AccountCurrencyMap` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// Storage: `MultiTransactionPayment::AcceptedCurrencyPrice` (r:1 w:0) @@ -317,31 +331,35 @@ impl pallet_xyk::WeightInfo for HydraWeight { /// Proof: `AssetRegistry::ExistentialDepositCounter` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// Storage: `EmaOracle::WhitelistedAssets` (r:1 w:0) /// Proof: `EmaOracle::WhitelistedAssets` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `AmmSupport::ExecutionContext` (r:1 w:0) + /// Proof: `AmmSupport::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 3]`. /// The range of component `e` is `[0, 1]`. fn router_execution_buy(c: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1221 + e * (3177 ±0)` - // Estimated: `6156 + e * (10332 ±3_500_844_840_074_025)` - // Minimum execution time: 31_785_000 picoseconds. - Weight::from_parts(11_618_923, 6156) - // Standard Error: 29_806 - .saturating_add(Weight::from_parts(6_978_081, 0).saturating_mul(c.into())) - // Standard Error: 49_613 - .saturating_add(Weight::from_parts(245_134_509, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().reads((22_u64).saturating_mul(e.into()))) + // Measured: `1786 + e * (2821 ±0)` + // Estimated: `6190 + e * (10332 ±13_724_751_572_184_578)` + // Minimum execution time: 46_966_000 picoseconds. + Weight::from_parts(16_613_427, 6190) + // Standard Error: 34_017 + .saturating_add(Weight::from_parts(10_415_848, 0).saturating_mul(c.into())) + // Standard Error: 56_624 + .saturating_add(Weight::from_parts(263_188_553, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((21_u64).saturating_mul(e.into()))) .saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(e.into()))) .saturating_add(Weight::from_parts(0, 10332).saturating_mul(e.into())) } + /// Storage: `AssetRegistry::Assets` (r:2 w:0) + /// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`) /// Storage: `Tokens::Accounts` (r:2 w:0) /// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn calculate_spot_price_with_fee() -> Weight { // Proof Size summary in bytes: - // Measured: `1021` - // Estimated: `6156` - // Minimum execution time: 19_349_000 picoseconds. - Weight::from_parts(19_578_000, 6156) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `1586` + // Estimated: `6190` + // Minimum execution time: 31_091_000 picoseconds. + Weight::from_parts(31_529_000, 6190) + .saturating_add(T::DbWeight::get().reads(4_u64)) } } \ No newline at end of file diff --git a/runtime/hydradx/src/xcm.rs b/runtime/hydradx/src/xcm.rs index 2bbadaea1..4920db8c1 100644 --- a/runtime/hydradx/src/xcm.rs +++ b/runtime/hydradx/src/xcm.rs @@ -15,6 +15,7 @@ use frame_support::{ traits::{ConstU32, Contains, ContainsPair, EitherOf, Everything, Get, Nothing, TransformOrigin}, PalletId, }; +use frame_system::unique; use frame_system::EnsureRoot; use hydradx_adapters::{xcm_exchange::XcmAssetExchanger, xcm_execute_filter::AllowTransferAndSwap}; use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; @@ -32,7 +33,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FixedWeightBounds, HashedDescription, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{Config, XcmExecutor}; @@ -226,7 +227,64 @@ impl Config for XcmConfig { impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; + type XcmExecutor = WithUnifiedEventSupport>; +} + +pub struct WithUnifiedEventSupport(PhantomData); + +impl::RuntimeCall>> ExecuteXcm<::RuntimeCall> + for WithUnifiedEventSupport +{ + type Prepared = >::Prepared; + + fn prepare( + message: Xcm<::RuntimeCall>, + ) -> Result::RuntimeCall>> { + //We populate the context in `prepare` as we have the xcm message at this point so we can get the unique topic id + let unique_id = if let Some(SetTopic(id)) = message.last() { + *id + } else { + unique(&message) + }; + pallet_support::Pallet::::add_to_context(|event_id| ExecutionType::Xcm(unique_id, event_id)) + .map_err(|_| message.clone())?; + + let prepare_result = Inner::prepare(message); + + //In case of error we need to clean context as xcm execution won't happen + if prepare_result.is_err() { + let _ = pallet_support::Pallet::::remove_from_context(); + } + + prepare_result + } + + fn execute( + origin: impl Into, + pre: Self::Prepared, + id: &mut XcmHash, + weight_credit: XcmWeight, + ) -> Outcome { + let outcome = Inner::execute(origin, pre, id, weight_credit); + + let Ok(_) = pallet_support::Pallet::::remove_from_context() else { + return Outcome::Error { + error: XcmError::FailedToTransactAsset("Unexpected error at modifying unified events stack"), + }; + }; + + outcome + } + + fn charge_fees(location: impl Into, fees: Assets) -> XcmResult { + Inner::charge_fees(location, fees) + } +} + +impl::RuntimeCall>> XcmAssetTransfers for WithUnifiedEventSupport { + type IsReserve = ::IsReserve; + type IsTeleporter = ::IsTeleporter; + type AssetTransactor = ::AssetTransactor; } parameter_types! { @@ -264,7 +322,7 @@ impl orml_xtokens::Config for Runtime { type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; - type XcmExecutor = XcmExecutor; + type XcmExecutor = WithUnifiedEventSupport>; type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -293,7 +351,7 @@ impl pallet_xcm::Config for Runtime { type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = AllowTransferAndSwap; - type XcmExecutor = XcmExecutor; + type XcmExecutor = WithUnifiedEventSupport>; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; @@ -324,7 +382,11 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = xcm_builder::ProcessXcmMessage, RuntimeCall>; + type MessageProcessor = xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + WithUnifiedEventSupport>, + RuntimeCall, + >; type Size = u32; type QueueChangeHandler = NarrowOriginToSibling; type QueuePausedQuery = NarrowOriginToSibling; @@ -401,12 +463,12 @@ impl Convert for AccountIdToMultiLocation { /// The means for routing XCM messages which are not for local execution into the right message /// queues. -pub type XcmRouter = ( +pub type XcmRouter = WithUniqueTopic<( // Two routers - use UMP to communicate with the relay chain: cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, -); +)>; /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM @@ -423,7 +485,8 @@ pub type LocationToAccountId = ( // Convert ETH to local substrate account EvmAddressConversion, ); -use xcm_executor::traits::ConvertLocation; +use pallet_support::types::ExecutionType; +use xcm_executor::traits::{ConvertLocation, XcmAssetTransfers}; /// Converts Account20 (ethereum) addresses to AccountId32 (substrate) addresses. pub struct EvmAddressConversion(PhantomData); diff --git a/traits/Cargo.toml b/traits/Cargo.toml index e1cd13374..0654d2730 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hydradx-traits" -version = "3.10.0" +version = "3.11.0" description = "Shared traits" authors = ["GalacticCouncil"] edition = "2021" diff --git a/traits/src/lib.rs b/traits/src/lib.rs index c21b44ebb..9bc526b2b 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -93,6 +93,7 @@ pub trait AMM { discount: bool, ) -> dispatch::DispatchResult { Self::execute_sell(&Self::validate_sell(origin, assets, amount, min_bought, discount)?)?; + Ok(()) } @@ -121,6 +122,7 @@ pub trait AMM { discount: bool, ) -> dispatch::DispatchResult { Self::execute_buy(&Self::validate_buy(origin, assets, amount, max_limit, discount)?, None)?; + Ok(()) }