diff --git a/Cargo.lock b/Cargo.lock index 5e3e9d53e..7c59cd4d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2421,7 +2421,7 @@ dependencies = [ [[package]] name = "extrinsic-shuffler" version = "4.0.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "derive_more", "log", @@ -2604,7 +2604,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "12.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", ] @@ -2627,7 +2627,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "frame-support-procedural", @@ -2652,7 +2652,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "32.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "Inflector", "array-bytes 6.2.3", @@ -2706,7 +2706,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "aquamarine 0.3.3", "extrinsic-shuffler", @@ -2740,7 +2740,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.35.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#cc2046d2ba128a9ad452953ea5971ccc02248893" +source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#6661f2890fa822ae738bff9d8072438a270054cd" dependencies = [ "futures", "indicatif", @@ -2762,7 +2762,7 @@ dependencies = [ [[package]] name = "frame-support" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "aquamarine 0.5.0", "array-bytes 6.2.3", @@ -2804,7 +2804,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "23.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "Inflector", "cfg-expr", @@ -2823,7 +2823,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "10.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.2.0", @@ -2835,7 +2835,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "proc-macro2", "quote", @@ -2845,7 +2845,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "cfg-if", "docify", @@ -2867,7 +2867,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -2882,7 +2882,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "sp-api", @@ -2891,7 +2891,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "parity-scale-codec", @@ -4775,7 +4775,7 @@ dependencies = [ [[package]] name = "mangata-support" version = "0.1.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "mangata-types", @@ -4788,7 +4788,7 @@ dependencies = [ [[package]] name = "mangata-types" version = "0.1.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "scale-info", @@ -5490,7 +5490,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "frame-system", @@ -5507,7 +5507,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "frame-system", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -5546,7 +5546,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "docify", "frame-benchmarking", @@ -5594,7 +5594,7 @@ dependencies = [ [[package]] name = "pallet-collective-mangata" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -5665,7 +5665,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -5688,7 +5688,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5785,7 +5785,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -5887,7 +5887,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -5964,7 +5964,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -6008,7 +6008,7 @@ dependencies = [ [[package]] name = "pallet-sudo-mangata" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "docify", "frame-benchmarking", @@ -6042,7 +6042,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "docify", "frame-benchmarking", @@ -6062,7 +6062,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-support", "frame-system", @@ -6078,7 +6078,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "30.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6094,7 +6094,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6106,7 +6106,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "docify", "frame-benchmarking", @@ -6125,7 +6125,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -6141,7 +6141,7 @@ dependencies = [ [[package]] name = "pallet-utility-mangata" version = "4.0.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -6157,7 +6157,7 @@ dependencies = [ [[package]] name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-benchmarking", "frame-support", @@ -7649,6 +7649,7 @@ dependencies = [ "pallet-proxy", "pallet-rolldown", "pallet-session", + "pallet-stable-swap", "pallet-sudo-origin", "pallet-transaction-payment", "pallet-xyk", @@ -7980,7 +7981,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "23.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "log", "sp-core", @@ -7991,7 +7992,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship-ver" version = "0.10.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "aquamarine 0.3.3", "futures", @@ -8017,7 +8018,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "sp-api", @@ -8032,7 +8033,7 @@ dependencies = [ [[package]] name = "sc-block-builder-ver" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "aquamarine 0.1.12", "extrinsic-shuffler", @@ -8052,7 +8053,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "docify", @@ -8078,7 +8079,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -8089,7 +8090,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.36.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "chrono", @@ -8130,7 +8131,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "fnv", "futures", @@ -8157,7 +8158,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.35.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "hash-db", "kvdb", @@ -8183,7 +8184,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -8208,7 +8209,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -8237,7 +8238,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.19.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "ahash 0.8.11", "array-bytes 6.2.3", @@ -8280,7 +8281,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -8305,7 +8306,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.32.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -8328,7 +8329,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.29.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "polkavm", "sc-allocator", @@ -8341,7 +8342,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.29.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "log", "polkavm", @@ -8352,7 +8353,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.29.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "anyhow", "cfg-if", @@ -8370,7 +8371,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "ansi_term", "futures", @@ -8387,7 +8388,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "25.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "parking_lot 0.12.3", @@ -8401,7 +8402,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.4.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.6", @@ -8430,7 +8431,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "async-channel", @@ -8473,7 +8474,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-channel", "cid", @@ -8493,7 +8494,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -8510,7 +8511,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "ahash 0.8.11", "futures", @@ -8529,7 +8530,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "async-channel", @@ -8550,7 +8551,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "async-channel", @@ -8586,7 +8587,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "futures", @@ -8605,7 +8606,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "29.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "bytes", @@ -8639,7 +8640,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.17.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8648,7 +8649,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "29.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "futures", "jsonrpsee", @@ -8680,7 +8681,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8700,7 +8701,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "futures", "governor", @@ -8718,7 +8719,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "futures", @@ -8749,7 +8750,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.35.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "directories", @@ -8814,7 +8815,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.30.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "log", "parity-scale-codec", @@ -8825,7 +8826,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "derive_more", "futures", @@ -8846,7 +8847,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "15.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "chrono", "futures", @@ -8865,7 +8866,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "ansi_term", "chrono", @@ -8895,7 +8896,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -8906,7 +8907,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -8933,7 +8934,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -8949,7 +8950,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "14.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-channel", "futures", @@ -9495,7 +9496,7 @@ dependencies = [ [[package]] name = "sp-api" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "hash-db", "log", @@ -9517,7 +9518,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "15.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "Inflector", "blake2 0.10.6", @@ -9531,7 +9532,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "30.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "scale-info", @@ -9544,7 +9545,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "23.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "integer-sqrt", "num-traits", @@ -9576,7 +9577,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "sp-api", "sp-inherents", @@ -9587,7 +9588,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "futures", "log", @@ -9605,7 +9606,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.32.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "futures", @@ -9620,7 +9621,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.32.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "parity-scale-codec", @@ -9637,7 +9638,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.32.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "parity-scale-codec", @@ -9656,7 +9657,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "13.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "finality-grandpa", "log", @@ -9674,7 +9675,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.32.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "scale-info", @@ -9686,7 +9687,7 @@ dependencies = [ [[package]] name = "sp-core" version = "28.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "bandersnatch_vrfs", @@ -9733,7 +9734,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#f96b7fd48c5b5ed6d08a62a6a0ebdac22287e19a" +source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#6661f2890fa822ae738bff9d8072438a270054cd" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -9754,7 +9755,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "blake2b_simd", "byteorder", @@ -9767,7 +9768,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "quote", "sp-crypto-hashing", @@ -9777,7 +9778,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -9786,7 +9787,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "proc-macro2", "quote", @@ -9796,7 +9797,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "environmental", "parity-scale-codec", @@ -9807,7 +9808,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.7.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "serde_json", "sp-api", @@ -9818,7 +9819,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9832,7 +9833,7 @@ dependencies = [ [[package]] name = "sp-io" version = "30.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "bytes", "ed25519-dalek", @@ -9858,7 +9859,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "31.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "sp-core", "sp-runtime", @@ -9868,7 +9869,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.34.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -9879,7 +9880,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9888,7 +9889,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.6.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -9899,7 +9900,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.4.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "scale-info", @@ -9911,7 +9912,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "sp-api", "sp-core", @@ -9921,7 +9922,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "backtrace", "lazy_static", @@ -9931,7 +9932,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "rustc-hash", "serde", @@ -9941,7 +9942,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -9972,7 +9973,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9991,7 +9992,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "Inflector", "expander", @@ -10004,7 +10005,7 @@ dependencies = [ [[package]] name = "sp-session" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "scale-info", @@ -10019,7 +10020,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10033,7 +10034,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.35.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "hash-db", "log", @@ -10054,7 +10055,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "10.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.1", @@ -10079,12 +10080,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -10097,7 +10098,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "parity-scale-codec", @@ -10110,7 +10111,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "sp-std", @@ -10122,7 +10123,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "sp-api", "sp-runtime", @@ -10131,7 +10132,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "26.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "parity-scale-codec", @@ -10146,7 +10147,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "29.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "ahash 0.8.11", "hash-db", @@ -10170,7 +10171,7 @@ dependencies = [ [[package]] name = "sp-ver" version = "4.0.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "async-trait", "parity-scale-codec", @@ -10187,7 +10188,7 @@ dependencies = [ [[package]] name = "sp-version" version = "29.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -10204,7 +10205,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "13.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10215,7 +10216,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10228,7 +10229,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "27.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -10387,7 +10388,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.4.7" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -10399,12 +10400,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "hyper", "log", @@ -10416,7 +10417,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.33.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#cc2046d2ba128a9ad452953ea5971ccc02248893" +source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#6661f2890fa822ae738bff9d8072438a270054cd" dependencies = [ "async-trait", "jsonrpsee", @@ -10429,7 +10430,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "async-trait", @@ -10456,7 +10457,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "array-bytes 6.2.3", "frame-executive", @@ -10499,7 +10500,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "futures", "sc-block-builder", @@ -10518,7 +10519,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "17.0.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "build-helper", "cargo_metadata", @@ -11134,7 +11135,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.38.0" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#cc2046d2ba128a9ad452953ea5971ccc02248893" +source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#6661f2890fa822ae738bff9d8072438a270054cd" dependencies = [ "async-trait", "clap", @@ -11320,7 +11321,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "ver-api" version = "4.0.0-dev" -source = "git+https://github.com/gasp-xyz/polkadot-sdk?branch=eth-rollup-develop#b326df58169f4e1559acf7fbe38ed2a6ab8bb96b" +source = "git+https://github.com//gasp-xyz/polkadot-sdk?branch=feature/market-improvs#b23759df6d12551c29a5f1734752fca0efbbf995" dependencies = [ "derive_more", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index 962b6880a..bde327505 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -193,3 +193,137 @@ ver-api = { git = "https://github.com/gasp-xyz/polkadot-sdk", branch = "eth-roll [patch."https://github.com/paritytech/polkadot-sdk"] # ... which satisfies git dependency `sp-crypto-ec-utils` of package `sp-ark-bls12-381 v0.4.2 (https://github.com/paritytech/arkworks-substrate#caa2eed7)` sp-crypto-ec-utils = { git = "https://github.com/gasp-xyz/polkadot-sdk", branch = "eth-rollup-develop" } + +# patch generated by './scripts/dev_manifest.sh ../polkadot-sdk' +[patch."https://github.com/gasp-xyz/polkadot-sdk"] +substrate-test-runtime = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-test-runtime-client = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-test-client = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-transaction-payment = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-transaction-payment-rpc = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-collective-mangata = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-proxy = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-identity = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-sudo-mangata = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +mangata-support = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-utility-mangata = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-authorship = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-grandpa = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-vesting-mangata = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-system = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-system-benchmarking = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-system-rpc-runtime-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-support = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-support-procedural = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-support-procedural-tools = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-support-procedural-tools-derive = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-balances = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-aura = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-benchmarking = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-treasury = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-try-runtime = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-timestamp = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-babe = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-membership = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-utility = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-executive = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +pallet-session = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-wasm-builder = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +fork-tree = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-build-script-utils = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +frame-benchmarking-cli = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-bip39 = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +substrate-prometheus-endpoint = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-database = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-runtime-interface = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-runtime-interface-proc-macro = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-consensus-grandpa = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-consensus = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-consensus-aura = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-consensus-babe = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-consensus-slots = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-tracing = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-crypto-hashing = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-crypto-hashing-proc-macro = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-ver = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-maybe-compressed-blob = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-core = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-state-machine = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-keystore = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-metadata-ir = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-statement-store = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-weights = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-io = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-runtime = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-inherents = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-transaction-pool = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-std = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-storage = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-panic-handler = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-debug-derive = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-blockchain = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-externalities = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-mixnet = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-trie = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +mangata-types = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-version = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-version-proc-macro = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-block-builder = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-keyring = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-staking = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-wasm-interface = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-transaction-storage-proof = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +extrinsic-shuffler = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-arithmetic = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-api-proc-macro = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-offchain = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-timestamp = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-application-crypto = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-rpc = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +ver-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-genesis-builder = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sp-session = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-consensus-grandpa = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-consensus = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-consensus-aura = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-consensus-slots = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-tracing = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-tracing-proc-macro = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-rpc-spec-v2 = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-state-db = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-proposer-metrics = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-keystore = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-basic-authorship-ver = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-rpc-server = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-bitswap = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-transactions = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-common = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-light = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-sync = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-informant = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-transaction-pool = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-transaction-pool-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-utils = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-cli = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-chain-spec = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-chain-spec-derive = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-block-builder-ver = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-mixnet = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-block-builder = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-allocator = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-network-gossip = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-client-db = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-client-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-sysinfo = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-executor = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-executor-wasmtime = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-executor-common = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-executor-polkavm = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-telemetry = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-offchain = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-service = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-rpc = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } +sc-rpc-api = { git = "https://github.com//gasp-xyz/polkadot-sdk", branch = "feature/market-improvs" } diff --git a/pallets/market/rpc/src/lib.rs b/pallets/market/rpc/src/lib.rs index 206c0cd22..c5ae30981 100644 --- a/pallets/market/rpc/src/lib.rs +++ b/pallets/market/rpc/src/lib.rs @@ -25,6 +25,15 @@ pub trait MarketApi { at: Option, ) -> RpcResult; + #[method(name = "market_calculate_sell_price_with_impact")] + fn calculate_sell_price_with_impact( + &self, + pool_id: TokenId, + sell_asset_id: TokenId, + sell_amount: NumberOrHex, + at: Option, + ) -> RpcResult<(NumberOrHex, NumberOrHex)>; + #[method(name = "market_calculate_buy_price")] fn calculate_buy_price( &self, @@ -34,6 +43,15 @@ pub trait MarketApi { at: Option, ) -> RpcResult; + #[method(name = "market_calculate_buy_price_with_impact")] + fn calculate_buy_price_with_impact( + &self, + pool_id: TokenId, + buy_asset_id: TokenId, + buy_amount: NumberOrHex, + at: Option, + ) -> RpcResult<(NumberOrHex, NumberOrHex)>; + #[method(name = "market_calculate_expected_amount_for_minting")] fn calculate_expected_amount_for_minting( &self, @@ -130,6 +148,27 @@ where }) } + fn calculate_sell_price_with_impact( + &self, + pool_id: TokenId, + sell_asset_id: TokenId, + sell_amount: NumberOrHex, + _at: Option<::Hash>, + ) -> RpcResult<(NumberOrHex, NumberOrHex)> { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_sell_price_with_impact( + at, + pool_id, + sell_asset_id, + sell_amount.try_into_balance()?, + ) + .map(|val| val.unwrap_or_default()) + .map(|val| (val.0.into(), val.1.into())) + .map_err(|e| ErrorObject::owned(1, "Unable to serve the request", Some(format!("{:?}", e)))) + } + fn calculate_buy_price( &self, pool_id: TokenId, @@ -147,6 +186,27 @@ where }) } + fn calculate_buy_price_with_impact( + &self, + pool_id: TokenId, + buy_asset_id: TokenId, + buy_amount: NumberOrHex, + _at: Option<::Hash>, + ) -> RpcResult<(NumberOrHex, NumberOrHex)> { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_buy_price_with_impact( + at, + pool_id, + buy_asset_id, + buy_amount.try_into_balance()?, + ) + .map(|val| val.unwrap_or_default()) + .map(|val| (val.0.into(), val.1.into())) + .map_err(|e| ErrorObject::owned(1, "Unable to serve the request", Some(format!("{:?}", e)))) + } + fn get_burn_amount( &self, pool_id: TokenId, diff --git a/pallets/market/src/lib.rs b/pallets/market/src/lib.rs index 358896cd9..cac14017a 100644 --- a/pallets/market/src/lib.rs +++ b/pallets/market/src/lib.rs @@ -7,7 +7,7 @@ use codec::Codec; use serde::{Deserialize, Serialize}; use frame_support::{ - ensure, fail, + ensure, pallet_prelude::*, traits::{ tokens::{ @@ -259,6 +259,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Creates a liquidity pool and an associated new `lp_token` asset + /// For a StableSwap pool, the "stable" rate is computed from the ratio of input amounts, max rate is 1e18:1 #[pallet::call_index(0)] #[pallet::weight( T::WeightInfo::create_pool_xyk().max( @@ -293,15 +294,12 @@ pub mod pallet { lp_token }, PoolKind::StableSwap => { - let first_decimal = Self::get_decimals(&first_asset_id)?; - let second_decimal = Self::get_decimals(&second_asset_id)?; - let lp_token = T::StableSwap::create_pool( &sender, first_asset_id, - first_decimal, + first_asset_amount, second_asset_id, - second_decimal, + second_asset_amount, )?; T::StableSwap::add_liquidity( @@ -649,15 +647,16 @@ pub mod pallet { /// Executes a multiswap asset in a series of swap asset atomic swaps. /// /// Multiswaps must fee lock instead of paying transaction fees. + /// For a single atomic swap, both `asset_amount_in` and `min_amount_out` are considered to allow free execution without locks. /// /// # Args: /// - `swap_token_list` - This list of tokens is the route of the atomic swaps, starting with the asset sold and ends with the asset finally bought /// - `asset_id_in`: The id of the asset sold /// - `asset_amount_in`: The amount of the asset sold /// - `asset_id_out`: The id of the asset received - /// - `min_amount_out` - The minimum amount of requested asset that must be bought in order to not fail on slippage. Slippage failures still charge exchange commission. - // This call is part of the fee lock mechanism, which allows free execution in some cases - // in case of an error a 'trade fee' is subtracted from input swap asset to avoid DOS attacks + /// - `min_amount_out` - The minimum amount of requested asset that must be bought in order to not fail on slippage, use RPC calls to calc expected value + // This call is part of the fee lock mechanism, which allows free execution on success + // in case of an error & no native asset to cover fees, a fixed % is subtracted from input swap asset to avoid DOS attacks // `OnChargeTransaction` impl should check whether the sender has funds to cover such fee // or consider transaction invalid #[pallet::call_index(6)] @@ -693,7 +692,22 @@ pub mod pallet { Ok(Pays::No.into()) } - /// Buy variant of the multiswap, a precise output amount should be provided instead. + /// Executes a multiswap asset in a series of swap asset atomic swaps. + /// The precise output amount is provided instead. + /// + /// Multiswaps must fee lock instead of paying transaction fees. + /// For a single atomic swap, both `asset_amount_out` and `max_amount_in` are considered to allow free execution without locks. + /// + /// # Args: + /// - `swap_token_list` - This list of tokens is the route of the atomic swaps, starting with the asset sold and ends with the asset finally bought + /// - `asset_id_out`: The id of the asset received + /// - `asset_amount_out`: The amount of the asset received + /// - `asset_id_in`: The id of the asset sold + /// - `max_amount_in` - The maximum amount of sold asset in order to not fail on slippage, use RPC calls to calc expected value + // This call is part of the fee lock mechanism, which allows free execution on success + // in case of an error & no native asset to cover fees, a fixed % is subtracted from input swap asset to avoid DOS attacks + // `OnChargeTransaction` impl should check whether the sender has funds to cover such fee + // or consider transaction invalid #[pallet::call_index(7)] #[pallet::weight( T::WeightInfo::multiswap_asset_buy_xyk(swap_pool_list.len() as u32).max( @@ -753,6 +767,21 @@ pub mod pallet { } } + pub fn calculate_sell_price_with_impact( + pool_id: T::CurrencyId, + sell_asset_id: T::CurrencyId, + sell_amount: T::Balance, + ) -> Option<(T::Balance, T::Balance)> { + let pool_info = Self::get_pool_info(pool_id).ok()?; + let (_, other) = pool_info.same_and_other(sell_asset_id)?; + match pool_info.kind { + PoolKind::Xyk => + T::Xyk::get_dy_with_impact(pool_id, sell_asset_id, other, sell_amount), + PoolKind::StableSwap => + T::StableSwap::get_dy_with_impact(pool_id, sell_asset_id, other, sell_amount), + } + } + pub fn calculate_buy_price( pool_id: T::CurrencyId, bought_asset_id: T::CurrencyId, @@ -767,6 +796,21 @@ pub mod pallet { } } + pub fn calculate_buy_price_with_impact( + pool_id: T::CurrencyId, + bought_asset_id: T::CurrencyId, + buy_amount: T::Balance, + ) -> Option<(T::Balance, T::Balance)> { + let pool_info = Self::get_pool_info(pool_id).ok()?; + let (_, other) = pool_info.same_and_other(bought_asset_id)?; + match pool_info.kind { + PoolKind::Xyk => + T::Xyk::get_dx_with_impact(pool_id, other, bought_asset_id, buy_amount), + PoolKind::StableSwap => + T::StableSwap::get_dx_with_impact(pool_id, other, bought_asset_id, buy_amount), + } + } + pub fn get_burn_amount( pool_id: T::CurrencyId, lp_burn_amount: T::Balance, @@ -1029,12 +1073,24 @@ sp_api::decl_runtime_apis! { sell_amount: Balance ) -> Option; + fn calculate_sell_price_with_impact( + pool_id: AssetId, + sell_asset_id: AssetId, + sell_amount: Balance + ) -> Option<(Balance, Balance)>; + fn calculate_buy_price( pool_id: AssetId, buy_asset_id: AssetId, buy_amount: Balance ) -> Option; + fn calculate_buy_price_with_impact( + pool_id: AssetId, + buy_asset_id: AssetId, + buy_amount: Balance + ) -> Option<(Balance, Balance)>; + fn get_burn_amount( pool_id: AssetId, lp_burn_amount: Balance, diff --git a/pallets/stable-swap/src/lib.rs b/pallets/stable-swap/src/lib.rs index 1b6136eba..820a1210b 100644 --- a/pallets/stable-swap/src/lib.rs +++ b/pallets/stable-swap/src/lib.rs @@ -139,6 +139,8 @@ pub mod pallet { pub enum Error { /// Amplification coefficient lower then 1 or too large AmpCoeffOutOfRange, + /// Initial pool rate multipliers are too large + InitialPoolRateOutOfRange, /// Too many assets for pool creation TooManyAssets, /// Pool already exists @@ -277,6 +279,8 @@ pub mod pallet { /// /// * `assets` - An array of asset ids in pool /// * `rates` - An array of: [10 ** (36 - _coins[n].decimals()), ... for n in range(N_COINS)] + /// A custom rate can also be used & values needs to be multiplied by 1e18, with max value of 1e36 + /// eg. for a rate 2:1 it's [2e18, 1e18] /// * `amp_coeff` - Amplification co-efficient - a lower value here means less tolerance for imbalance within the pool's assets. /// Suggested values include: /// * Uncollateralized algorithmic stablecoins: 5-10 @@ -534,7 +538,8 @@ pub mod pallet { impl Pallet { pub const FEE_DENOMINATOR: u128 = 10_u128.pow(10); - const PRECISION: u128 = 10_u128.pow(18); + pub(crate) const PRECISION_EXP: u32 = 18; + const PRECISION: u128 = 10_u128.pow(Self::PRECISION_EXP); const A_PRECISION: u128 = 100; // calls impl @@ -884,45 +889,32 @@ pub mod pallet { let i = pool.get_asset_index::(asset_in)?; let j = pool.get_asset_index::(asset_out)?; - let (_, d) = Self::get_invariant_pool(&pool_account, &pool)?; + Self::get_dx_xp(&pool, i, j, dy, xp) + } - let mut x = xp[i]; - let mut y = xp[j]; - for _i in 0..255 { - let x_prev = x; - let dyn_fee = Self::dynamic_fee( - &Self::checked_add_div_2(&xp[i], &x)?, - &Self::checked_add_div_2(&xp[j], &y)?, - )?; - let dy_fee = Self::checked_mul_div_u128( - &T::HigherPrecisionBalance::from(dy), - &T::HigherPrecisionBalance::from(pool.rate_multipliers[j]), - Self::PRECISION, - )? - .checked_add(&One::one()) - .ok_or(Error::::MathOverflow)? - .checked_mul(&T::HigherPrecisionBalance::from(Self::FEE_DENOMINATOR)) - .ok_or(Error::::MathOverflow)? - .checked_div( - &T::HigherPrecisionBalance::from(Self::FEE_DENOMINATOR) - .checked_sub(&dyn_fee) - .ok_or(Error::::MathOverflow)?, - ) - .ok_or(Error::::MathOverflow)?; + pub fn get_dx_with_impact( + pool_id: &PoolIdOf, + asset_in: T::CurrencyId, + asset_out: T::CurrencyId, + dy: T::Balance, + ) -> Result<(T::Balance, T::Balance), Error> { + let maybe_pool = Pools::::get(pool_id.clone()); + let pool = maybe_pool.as_ref().ok_or(Error::::NoSuchPool)?; + let pool_account = Self::get_pool_account(&pool_id); + let (reserves, xp) = Self::get_balances_xp_pool(&pool_account, &pool)?; + let i = pool.get_asset_index::(asset_in)?; + let j = pool.get_asset_index::(asset_out)?; - y = xp[j].checked_sub(&dy_fee).ok_or(Error::::MathOverflow)?; - x = Self::get_y(j, i, &y, &xp, pool.amp_coeff, &d)?; + let dx = Self::get_dx_xp(&pool, i, j, dy, xp)?; - // if we don't have dynamic fee we can return immediatelly, otherwise loop with adjusted fee - if !Self::has_dynamic_fee() || Self::check_diff_le_one(&x, &x_prev) { - return Ok(Self::checked_mul_div_to_balance( - &x.checked_sub(&xp[i]).ok_or(Error::::MathOverflow)?, - pool.rate_multipliers[i], - )?); - } - } + let mut reserves = reserves.clone(); + reserves[i] = reserves[i] + T::HigherPrecisionBalance::from(dx); + reserves[j] = reserves[j] - T::HigherPrecisionBalance::from(dy); + let xp = Self::xp(&pool.rate_multipliers, &reserves)?; - Err(Error::::UnexpectedFailure) + let dx2 = Self::get_dx_xp(&pool, i, j, dy, xp)?; + + Ok((dx, dx2)) } /// Calculate the output dy given input dx. @@ -939,19 +931,32 @@ pub mod pallet { let i = pool.get_asset_index::(asset_in)?; let j = pool.get_asset_index::(asset_out)?; - let (dy, dy_fee) = Self::calc_dy( - i, - j, - T::HigherPrecisionBalance::from(dx), - pool.amp_coeff, - &xp, - pool.rate_multipliers.to_vec(), - )?; + Self::get_dy_xp(&pool, i, j, dx, xp) + } - Self::checked_mul_div_to_balance( - &dy.checked_sub(&dy_fee).ok_or(Error::::MathOverflow)?, - pool.rate_multipliers[j], - ) + pub fn get_dy_with_impact( + pool_id: &PoolIdOf, + asset_in: T::CurrencyId, + asset_out: T::CurrencyId, + dx: T::Balance, + ) -> Result<(T::Balance, T::Balance), Error> { + let maybe_pool = Pools::::get(pool_id.clone()); + let pool = maybe_pool.as_ref().ok_or(Error::::NoSuchPool)?; + let pool_account = Self::get_pool_account(&pool_id); + let (reserves, xp) = Self::get_balances_xp_pool(&pool_account, &pool)?; + let i = pool.get_asset_index::(asset_in)?; + let j = pool.get_asset_index::(asset_out)?; + + let dy = Self::get_dy_xp(&pool, i, j, dx, xp)?; + + let mut reserves = reserves.clone(); + reserves[i] = reserves[i] + T::HigherPrecisionBalance::from(dx); + reserves[j] = reserves[j] - T::HigherPrecisionBalance::from(dy); + let xp = Self::xp(&pool.rate_multipliers, &reserves)?; + + let dy2 = Self::get_dy_xp(&pool, i, j, dx, xp)?; + + Ok((dy, dy2)) } pub fn calc_lp_token_amount( @@ -1184,6 +1189,76 @@ pub mod pallet { Ok(xp) } + pub fn get_dx_xp( + pool: &PoolInfoOf, + i: usize, + j: usize, + dy: T::Balance, + xp: Vec, + ) -> Result> { + let d = Self::get_invariant(&xp, pool.amp_coeff)?; + + let mut x = xp[i]; + let mut y = xp[j]; + for _i in 0..255 { + let x_prev = x; + let dyn_fee = Self::dynamic_fee( + &Self::checked_add_div_2(&xp[i], &x)?, + &Self::checked_add_div_2(&xp[j], &y)?, + )?; + let dy_fee = Self::checked_mul_div_u128( + &T::HigherPrecisionBalance::from(dy), + &T::HigherPrecisionBalance::from(pool.rate_multipliers[j]), + Self::PRECISION, + )? + .checked_add(&One::one()) + .ok_or(Error::::MathOverflow)? + .checked_mul(&T::HigherPrecisionBalance::from(Self::FEE_DENOMINATOR)) + .ok_or(Error::::MathOverflow)? + .checked_div( + &T::HigherPrecisionBalance::from(Self::FEE_DENOMINATOR) + .checked_sub(&dyn_fee) + .ok_or(Error::::MathOverflow)?, + ) + .ok_or(Error::::MathOverflow)?; + + y = xp[j].checked_sub(&dy_fee).ok_or(Error::::MathOverflow)?; + x = Self::get_y(j, i, &y, &xp, pool.amp_coeff, &d)?; + + // if we don't have dynamic fee we can return immediatelly, otherwise loop with adjusted fee + if !Self::has_dynamic_fee() || Self::check_diff_le_one(&x, &x_prev) { + return Ok(Self::checked_mul_div_to_balance( + &x.checked_sub(&xp[i]).ok_or(Error::::MathOverflow)?, + pool.rate_multipliers[i], + )?); + } + } + + Err(Error::::UnexpectedFailure) + } + + fn get_dy_xp( + pool: &PoolInfoOf, + i: usize, + j: usize, + dx: T::Balance, + xp: Vec, + ) -> Result> { + let (dy, dy_fee) = Self::calc_dy( + i, + j, + T::HigherPrecisionBalance::from(dx), + pool.amp_coeff, + &xp, + pool.rate_multipliers.to_vec(), + )?; + + Self::checked_mul_div_to_balance( + &dy.checked_sub(&dy_fee).ok_or(Error::::MathOverflow)?, + pool.rate_multipliers[j], + ) + } + /// Computes the Stable Swap invariant (D). /// /// The invariant is defined as follows: @@ -1620,14 +1695,6 @@ pub mod pallet { } return false; } - - // 10 ** (36 - _coins[n].decimals()) - pub(crate) fn get_decimals_mul(asset_decimals: u32) -> Result> { - let m = (36_u32 - asset_decimals) - .try_into() - .map_err(|_| Error::::UnexpectedFailure)?; - checked_pow(T::Balance::from(10_u32), m).ok_or(Error::::MathOverflow) - } } } @@ -1662,6 +1729,15 @@ impl Inspect for Pallet { Self::get_dy(&pool_id, asset_in, asset_out, dx).ok() } + fn get_dy_with_impact( + pool_id: Self::CurrencyId, + asset_in: Self::CurrencyId, + asset_out: Self::CurrencyId, + dx: Self::Balance, + ) -> Option<(Self::Balance, Self::Balance)> { + Self::get_dy_with_impact(&pool_id, asset_in, asset_out, dx).ok() + } + fn get_dx( pool_id: Self::CurrencyId, asset_in: Self::CurrencyId, @@ -1671,6 +1747,15 @@ impl Inspect for Pallet { Self::get_dx(&pool_id, asset_in, asset_out, dy).ok() } + fn get_dx_with_impact( + pool_id: Self::CurrencyId, + asset_in: Self::CurrencyId, + asset_out: Self::CurrencyId, + dy: Self::Balance, + ) -> Option<(Self::Balance, Self::Balance)> { + Self::get_dx_with_impact(&pool_id, asset_in, asset_out, dy).ok() + } + fn get_burn_amounts( pool_id: Self::CurrencyId, lp_burn_amount: Self::Balance, @@ -1702,13 +1787,40 @@ impl Mutate for Pallet { fn create_pool( sender: &T::AccountId, asset_1: Self::CurrencyId, - asset_1_decimals: u32, + amount_1: Self::Balance, asset_2: Self::CurrencyId, - asset_2_decimals: u32, + amount_2: Self::Balance, ) -> Result { let assets = vec![asset_1, asset_2]; - let rate_1 = Self::get_decimals_mul(asset_1_decimals)?; - let rate_2 = Self::get_decimals_mul(asset_2_decimals)?; + let ten = T::Balance::from(10_u32); + + let exp = |amount: Self::Balance| { + let mut i = 0_usize; + let mut pow_10 = T::Balance::one() * ten; + while amount % pow_10 == Zero::zero() { + i += 1; + pow_10 *= ten; + } + i + }; + + let exp1 = exp(amount_1); + let exp2 = exp(amount_2); + let min = exp1.min(exp2); + let exp = checked_pow(ten, min).ok_or(Error::::MathOverflow)?; + + let rate_1_mul = amount_1 / exp; + let rate_2_mul = amount_2 / exp; + + // the max rate cannot be more than 1e18 + let precision = + checked_pow(ten, Self::PRECISION_EXP as usize).ok_or(Error::::MathOverflow)?; + ensure!(rate_1_mul <= precision, Error::::InitialPoolRateOutOfRange); + ensure!(rate_2_mul <= precision, Error::::InitialPoolRateOutOfRange); + + let rate_1 = rate_2_mul.checked_mul(&precision).ok_or(Error::::MathOverflow)?; + let rate_2 = rate_1_mul.checked_mul(&precision).ok_or(Error::::MathOverflow)?; + let rates = vec![rate_1, rate_2]; let info = Self::do_create_pool(sender, assets, rates, T::DefaultApmCoeff::get())?; Ok(info.lp_token) diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 1e1607770..6ec7eca32 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -3725,6 +3725,20 @@ impl Inspect for Pallet { Self::calculate_sell_price_id(asset_in, asset_out, dx).ok() } + fn get_dy_with_impact( + _: Self::CurrencyId, + asset_in: Self::CurrencyId, + asset_out: Self::CurrencyId, + dx: Self::Balance, + ) -> Option<(Self::Balance, Self::Balance)> { + let mut reserves = Self::get_reserves(asset_in, asset_out).ok()?; + let dy = Self::calculate_sell_price(reserves.0, reserves.1, dx).ok()?; + reserves.0 = reserves.0 + dx; + reserves.1 = reserves.1 - dy; + let dy2 = Self::calculate_sell_price(reserves.0, reserves.1, dx).ok()?; + Some((dy, dy2)) + } + fn get_dx( _: Self::CurrencyId, asset_in: Self::CurrencyId, @@ -3734,6 +3748,20 @@ impl Inspect for Pallet { Self::calculate_buy_price_id(asset_in, asset_out, dy).ok() } + fn get_dx_with_impact( + _: Self::CurrencyId, + asset_in: Self::CurrencyId, + asset_out: Self::CurrencyId, + dy: Self::Balance, + ) -> Option<(Self::Balance, Self::Balance)> { + let mut reserves = Self::get_reserves(asset_in, asset_out).ok()?; + let dx = Self::calculate_buy_price(reserves.0, reserves.1, dy).ok()?; + reserves.0 = reserves.0 + dx; + reserves.1 = reserves.1 - dy; + let dx2 = Self::calculate_buy_price(reserves.0, reserves.1, dy).ok()?; + Some((dx, dx2)) + } + fn get_burn_amounts( pool_id: Self::CurrencyId, lp_burn_amount: Self::Balance, diff --git a/rollup/runtime/integration-test/Cargo.toml b/rollup/runtime/integration-test/Cargo.toml index f0403e144..aad3c456d 100644 --- a/rollup/runtime/integration-test/Cargo.toml +++ b/rollup/runtime/integration-test/Cargo.toml @@ -40,6 +40,7 @@ pallet-proof-of-stake = { path = "../../../pallets/proof-of-stake" } pallet-rolldown = { path = "../../../pallets/rolldown" } pallet-sudo-origin = { path = "../../../pallets/sudo-origin" } pallet-xyk = { path = "../../../pallets/xyk" } +pallet-stable-swap = { path = "../../../pallets/stable-swap" } parachain-staking = { path = "../../../pallets/parachain-staking" } rolldown-runtime-api = { path = "../../../pallets/rolldown/runtime-api" } rollup-runtime = { path = "../" } diff --git a/rollup/runtime/integration-test/src/market.rs b/rollup/runtime/integration-test/src/market.rs index d5236786f..e0cc3c334 100644 --- a/rollup/runtime/integration-test/src/market.rs +++ b/rollup/runtime/integration-test/src/market.rs @@ -6,10 +6,7 @@ use sp_runtime::{traits::Zero, DispatchResult}; const ASSET_ID_1: u32 = NATIVE_ASSET_ID + 1; const ASSET_ID_2: u32 = ASSET_ID_1 + 1; const ASSET_ID_3: u32 = ASSET_ID_2 + 1; -const ASSET_ID_4_DISABLED: u32 = ASSET_ID_3 + 1; -const ASSET_ID_5: u32 = ASSET_ID_4_DISABLED + 1; -const ASSET_ID_6: u32 = ASSET_ID_5 + 1; -const POOL_ID_1: u32 = ASSET_ID_6 + 1; +const POOL_ID_1: u32 = ASSET_ID_3 + 1; const POOL_ID_2: u32 = POOL_ID_1 + 1; const POOL_ID_3: u32 = POOL_ID_2 + 1; @@ -20,84 +17,6 @@ fn test_env() -> TestExternalities { (AccountId::from(ALICE), ASSET_ID_1, 100 * UNIT), (AccountId::from(ALICE), ASSET_ID_2, 100 * UNIT), (AccountId::from(ALICE), ASSET_ID_3, 100 * UNIT), - (AccountId::from(ALICE), ASSET_ID_4_DISABLED, 100 * UNIT), - (AccountId::from(ALICE), ASSET_ID_5, 100 * UNIT), - (AccountId::from(ALICE), ASSET_ID_6, 100 * UNIT), - ], - assets: vec![ - ( - NATIVE_ASSET_ID, - AssetMetadataOf { - decimals: 18, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), - ( - ASSET_ID_1, - AssetMetadataOf { - decimals: 18, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), - ( - ASSET_ID_2, - AssetMetadataOf { - decimals: 18, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), - ( - ASSET_ID_3, - AssetMetadataOf { - decimals: 18, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), - ( - ASSET_ID_4_DISABLED, - AssetMetadataOf { - decimals: 18, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: CustomMetadata { - xyk: Some(XykMetadata { operations_disabled: true }), - ..CustomMetadata::default() - }, - }, - ), - ( - ASSET_ID_5, - AssetMetadataOf { - decimals: 10, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), - ( - ASSET_ID_6, - AssetMetadataOf { - decimals: 12, - name: BoundedVec::truncate_from(b"Asset".to_vec()), - symbol: BoundedVec::truncate_from(b"Asset".to_vec()), - existential_deposit: Default::default(), - additional: Default::default(), - }, - ), ], ..ExtBuilder::default() } @@ -111,6 +30,10 @@ fn origin() -> RuntimeOrigin { } fn create_pool(kind: PoolKind, assets: (u32, u32)) -> DispatchResult { + Market::create_pool(origin(), kind, assets.0, 10 * UNIT, assets.1, 10 * UNIT) +} + +fn create_pool_unb(kind: PoolKind, assets: (u32, u32)) -> DispatchResult { Market::create_pool(origin(), kind, assets.0, 10 * UNIT, assets.1, 5 * UNIT) } @@ -138,13 +61,17 @@ fn create_pool_works() { System::assert_has_event(RuntimeEvent::Market(Event::LiquidityMinted { who: AccountId::from(ALICE), pool_id: POOL_ID_1, - amounts_provided: (10000000000000000000, 5000000000000000000), + amounts_provided: (10000000000000000000, 10000000000000000000), lp_token: POOL_ID_1, - lp_token_minted: 7500000000000000000, - total_supply: 7500000000000000000, + lp_token_minted: 10000000000000000000, + total_supply: 10000000000000000000, })); assert_ok!(create_pool(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + + let p = pallet_stable_swap::Pools::::get(POOL_ID_2).unwrap(); + assert_eq!(p.rate_multipliers[0], UNIT); + assert_eq!(p.rate_multipliers[1], UNIT); System::assert_has_event(RuntimeEvent::Market(Event::PoolCreated { creator: AccountId::from(ALICE), pool_id: POOL_ID_2, @@ -154,10 +81,33 @@ fn create_pool_works() { System::assert_has_event(RuntimeEvent::Market(Event::LiquidityMinted { who: AccountId::from(ALICE), pool_id: POOL_ID_2, - amounts_provided: (10000000000000000000, 5000000000000000000), + amounts_provided: (10000000000000000000, 10000000000000000000), lp_token: POOL_ID_2, - lp_token_minted: 14999063611862273044, - total_supply: 14999063611862273044, + lp_token_minted: 20000000000000000000, + total_supply: 20000000000000000000, + })); + + assert_ok!(create_pool_unb(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + + let p = pallet_stable_swap::Pools::::get(POOL_ID_3).unwrap(); + println!("{:?}", p); + assert_eq!(p.rate_multipliers[0], 5 * UNIT); + assert_eq!(p.rate_multipliers[1], 10 * UNIT); + + System::assert_has_event(RuntimeEvent::Market(Event::PoolCreated { + creator: AccountId::from(ALICE), + pool_id: POOL_ID_3, + lp_token: POOL_ID_3, + assets: (0, 1), + })); + // lp_token_minted are correct since we applied the rates, and the pool is balanced + System::assert_has_event(RuntimeEvent::Market(Event::LiquidityMinted { + who: AccountId::from(ALICE), + pool_id: POOL_ID_3, + amounts_provided: (10000000000000000000, 5000000000000000000), + lp_token: POOL_ID_3, + lp_token_minted: 100000000000000000000, + total_supply: 100000000000000000000, })); }) } @@ -165,8 +115,8 @@ fn create_pool_works() { #[test] fn add_liquidity_works() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); let expected = Market::calculate_expected_amount_for_minting(POOL_ID_1, NATIVE_ASSET_ID, UNIT) @@ -195,7 +145,7 @@ fn add_liquidity_works() { amounts_provided: (1000000000000000000, expected), lp_token: POOL_ID_2, lp_token_minted: lp_expected, - total_supply: 16998182477145509576, + total_supply: 114992390693470089383, })); }) } @@ -203,8 +153,8 @@ fn add_liquidity_works() { #[test] fn add_liquidity_fixed_works() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); assert_ok!(Market::mint_liquidity_fixed_amounts(origin(), POOL_ID_1, (UNIT, 0), 0)); System::assert_last_event(RuntimeEvent::Market(Event::LiquidityMinted { @@ -224,7 +174,7 @@ fn add_liquidity_fixed_works() { amounts_provided: (1000000000000000000, 5000000000000000000), lp_token: POOL_ID_2, lp_token_minted: expected, - total_supply: 20990943480975169792, + total_supply: 154925100814226884776, })); }) } @@ -232,8 +182,8 @@ fn add_liquidity_fixed_works() { #[test] fn remove_liquidity_works() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); assert_ok!(Market::burn_liquidity(origin(), POOL_ID_1, UNIT, 0, 0)); System::assert_last_event(RuntimeEvent::Market(Event::LiquidityBurned { @@ -248,9 +198,9 @@ fn remove_liquidity_works() { System::assert_last_event(RuntimeEvent::Market(Event::LiquidityBurned { who: AccountId::from(ALICE), pool_id: POOL_ID_2, - amounts: (666708286515387818, 333354143257693909), + amounts: (100000000000000000, 50000000000000000), burned_amount: 1000000000000000000, - total_supply: 13999063611862273044, + total_supply: 99000000000000000000, })); }) } @@ -258,9 +208,9 @@ fn remove_liquidity_works() { #[test] fn multiswap_should_work_xyk() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::Xyk, (ASSET_ID_1, ASSET_ID_2))); - assert_ok!(create_pool(PoolKind::Xyk, (ASSET_ID_2, ASSET_ID_3))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (ASSET_ID_1, ASSET_ID_2))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (ASSET_ID_2, ASSET_ID_3))); assert_ok!(Market::multiswap_asset( origin(), @@ -308,13 +258,15 @@ fn multiswap_should_work_xyk() { #[test] fn multiswap_should_work_stable_swap_with_bnb() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::StableSwap, (ASSET_ID_1, ASSET_ID_2))); + // 2:1 rate + assert_ok!(create_pool_unb(PoolKind::StableSwap, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::StableSwap, (ASSET_ID_1, ASSET_ID_2))); + // 1:1 rate assert_ok!(create_pool(PoolKind::StableSwap, (ASSET_ID_2, ASSET_ID_3))); // for bnb - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_2))); - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_3))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_2))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_3))); let before = Tokens::total_issuance(NATIVE_ASSET_ID); @@ -331,7 +283,7 @@ fn multiswap_should_work_stable_swap_with_bnb() { // issuance decreased because of bnb assert!(before > after); assert_eq!(before, 100000000000000000000); - assert_eq!(after, 99996758378067624442); + assert_eq!(after, 99999001734203514767); println!("{:#?}", events()); @@ -344,23 +296,23 @@ fn multiswap_should_work_stable_swap_with_bnb() { asset_in: 0, asset_out: 1, amount_in: 1000000000000000000, - amount_out: 995595345298031754, + amount_out: 498447826003559573, }, AtomicSwap { pool_id: POOL_ID_2, kind: PoolKind::StableSwap, asset_in: 1, asset_out: 2, - amount_in: 995595345298031754, - amount_out: 991212132384121611, + amount_in: 498447826003559573, + amount_out: 248463606016707341, }, AtomicSwap { pool_id: POOL_ID_3, kind: PoolKind::StableSwap, asset_in: 2, asset_out: 3, - amount_in: 991212132384121611, - amount_out: 986850235267668399, + amount_in: 248463606016707341, + amount_out: 247712005295675461, }, ], })); @@ -370,9 +322,9 @@ fn multiswap_should_work_stable_swap_with_bnb() { #[test] fn multiswap_should_work_mixed() { test_env().execute_with(|| { - assert_ok!(create_pool(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); - assert_ok!(create_pool(PoolKind::StableSwap, (ASSET_ID_1, ASSET_ID_2))); - assert_ok!(create_pool(PoolKind::Xyk, (ASSET_ID_2, ASSET_ID_3))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (NATIVE_ASSET_ID, ASSET_ID_1))); + assert_ok!(create_pool_unb(PoolKind::StableSwap, (ASSET_ID_1, ASSET_ID_2))); + assert_ok!(create_pool_unb(PoolKind::Xyk, (ASSET_ID_2, ASSET_ID_3))); assert_ok!(Market::multiswap_asset( origin(), @@ -402,62 +354,17 @@ fn multiswap_should_work_mixed() { asset_in: 1, asset_out: 2, amount_in: 453305446940074565, - amount_out: 451412806019623895, + amount_out: 225962336828316482, }, AtomicSwap { pool_id: POOL_ID_3, kind: PoolKind::Xyk, asset_in: 2, asset_out: 3, - amount_in: 451412806019623895, - amount_out: 215337820687860400, + amount_in: 225962336828316482, + amount_out: 110160480582936294, }, ], })); }) } - -#[test] -fn test_diff_decimals_work() { - test_env().execute_with(|| { - let unit10 = 10_000_000_000_u128; - let unit12 = 1_000_000_000_000_u128; - assert_ok!(Market::create_pool( - origin(), - PoolKind::StableSwap, - ASSET_ID_5, - 100 * unit10, - ASSET_ID_6, - 100 * unit12 - )); - - let pool = Market::get_pools(Some(POOL_ID_1)); - let price = Market::calculate_sell_price(POOL_ID_1, ASSET_ID_5, 1).unwrap(); - - println!("{:#?}", pool); - println!("{:#?}", price); - - assert_ok!(Market::multiswap_asset( - origin(), - vec![POOL_ID_1], - ASSET_ID_5, - 1, - ASSET_ID_6, - 1, - )); - - println!("{:#?}", events()); - - System::assert_last_event(RuntimeEvent::Market(Event::AssetsSwapped { - who: AccountId::from(ALICE), - swaps: vec![AtomicSwap { - pool_id: POOL_ID_1, - kind: PoolKind::StableSwap, - asset_in: ASSET_ID_5, - asset_out: ASSET_ID_6, - amount_in: 1, - amount_out: 99, - }], - })); - }) -} diff --git a/rollup/runtime/src/lib.rs b/rollup/runtime/src/lib.rs index 50aa5e2eb..8b2e78389 100644 --- a/rollup/runtime/src/lib.rs +++ b/rollup/runtime/src/lib.rs @@ -428,6 +428,19 @@ impl Into for RuntimeCall { asset_id_out, asset_amount_out: min_amount_out, }, + RuntimeCall::Market(pallet_market::Call::multiswap_asset_buy { + swap_pool_list, + asset_id_out, + asset_amount_out, + asset_id_in, + max_amount_in, + }) => CallType::Swap { + swap_pool_list, + asset_id_in, + asset_amount_in: max_amount_in, + asset_id_out, + asset_amount_out, + }, RuntimeCall::FeeLock(pallet_fee_lock::Call::unlock_fee { .. }) => CallType::UnlockFee, _ => CallType::Other, } @@ -1314,10 +1327,18 @@ impl_runtime_apis! { Market::calculate_sell_price(pool_id, sell_asset_id, sell_amount) } + fn calculate_sell_price_with_impact(pool_id: TokenId, sell_asset_id: TokenId, sell_amount: Balance) -> Option<(Balance, Balance)> { + Market::calculate_sell_price_with_impact(pool_id, sell_asset_id, sell_amount) + } + fn calculate_buy_price(pool_id: TokenId, buy_asset_id: TokenId, buy_amount: Balance) -> Option { Market::calculate_buy_price(pool_id, buy_asset_id, buy_amount) } + fn calculate_buy_price_with_impact(pool_id: TokenId, buy_asset_id: TokenId, buy_amount: Balance) -> Option<(Balance, Balance)> { + Market::calculate_buy_price_with_impact(pool_id, buy_asset_id, buy_amount) + } + fn get_burn_amount(pool_id: TokenId, lp_burn_amount: Balance) -> Option<(Balance, Balance)> { Market::get_burn_amount(pool_id, lp_burn_amount) }