3 Commits

Author SHA1 Message Date
Luke Parker
af74c318aa Add event emissions to the DEX pallet 2025-12-02 13:31:33 -05:00
Luke Parker
d711d8915f Update docs Ruby/gem versions 2025-12-02 13:20:17 -05:00
Luke Parker
3d549564a8 Misc tweaks in the style of the last commit
Notably removes the `kvdb-rocksdb` patch via updating the Substrate version
used to one which disables the `jemalloc` feature itself.

Simplifies the path of the built WASM file within the Dockerfile to consumers.
This also ensures if the image is built, the path of the WASM file is as
expected (prior unasserted).
2025-12-02 09:10:44 -05:00
14 changed files with 219 additions and 220 deletions

View File

@@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
- name: Install cargo deny - name: Install cargo deny
run: cargo +1.91.1 install cargo-deny --version =0.18.6 run: cargo +1.91.1 install cargo-deny --version =0.18.7
- name: Run cargo deny - name: Run cargo deny
run: cargo deny -L error --all-features check --hide-inclusion-graph run: cargo deny -L error --all-features check --hide-inclusion-graph

View File

@@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
- name: Install cargo deny - name: Install cargo deny
run: cargo +1.91.1 install cargo-deny --version =0.18.6 run: cargo +1.91.1 install cargo-deny --version =0.18.7
- name: Run cargo deny - name: Run cargo deny
run: cargo deny -L error --all-features check --hide-inclusion-graph run: cargo deny -L error --all-features check --hide-inclusion-graph

View File

@@ -33,4 +33,4 @@ jobs:
uses: ./.github/actions/build-dependencies uses: ./.github/actions/build-dependencies
- name: Run Reproducible Runtime tests - name: Run Reproducible Runtime tests
run: GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features -p serai-reproducible-runtime-tests run: GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features -p serai-reproducible-runtime-tests -- --nocapture

210
Cargo.lock generated
View File

@@ -1464,16 +1464,16 @@ dependencies = [
[[package]] [[package]]
name = "cargo_metadata" name = "cargo_metadata"
version = "0.15.4" version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
dependencies = [ dependencies = [
"camino", "camino",
"cargo-platform", "cargo-platform",
"semver", "semver",
"serde", "serde",
"serde_json", "serde_json",
"thiserror 1.99.99", "thiserror 2.0.17",
] ]
[[package]] [[package]]
@@ -2899,7 +2899,7 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
[[package]] [[package]]
name = "fork-tree" name = "fork-tree"
version = "13.0.1" version = "13.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
] ]
@@ -2926,7 +2926,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-benchmarking" name = "frame-benchmarking"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"frame-support-procedural", "frame-support-procedural",
@@ -2949,7 +2949,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-executive" name = "frame-executive"
version = "43.0.1" version = "43.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"frame-system", "frame-system",
@@ -2965,7 +2965,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-support" name = "frame-support"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"environmental", "environmental",
@@ -2996,7 +2996,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-support-procedural" name = "frame-support-procedural"
version = "35.0.0" version = "35.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"cfg-expr", "cfg-expr",
@@ -3015,7 +3015,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-support-procedural-tools" name = "frame-support-procedural-tools"
version = "13.0.1" version = "13.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support-procedural-tools-derive", "frame-support-procedural-tools-derive",
"proc-macro-crate 3.4.0", "proc-macro-crate 3.4.0",
@@ -3027,7 +3027,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-support-procedural-tools-derive" name = "frame-support-procedural-tools-derive"
version = "12.0.0" version = "12.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -3037,7 +3037,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-system" name = "frame-system"
version = "43.0.1" version = "43.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"frame-support", "frame-support",
@@ -3054,7 +3054,7 @@ dependencies = [
[[package]] [[package]]
name = "frame-try-runtime" name = "frame-try-runtime"
version = "0.49.0" version = "0.49.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"parity-scale-codec", "parity-scale-codec",
@@ -4187,13 +4187,6 @@ dependencies = [
"parking_lot", "parking_lot",
] ]
[[package]]
name = "kvdb-rocksdb"
version = "0.20.99"
dependencies = [
"kvdb-rocksdb 0.21.0",
]
[[package]] [[package]]
name = "kvdb-rocksdb" name = "kvdb-rocksdb"
version = "0.21.0" version = "0.21.0"
@@ -4220,9 +4213,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.177" version = "0.2.178"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
[[package]] [[package]]
name = "libm" name = "libm"
@@ -5692,7 +5685,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-authorship" name = "pallet-authorship"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"frame-system", "frame-system",
@@ -5703,7 +5696,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-babe" name = "pallet-babe"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-benchmarking", "frame-benchmarking",
"frame-support", "frame-support",
@@ -5724,7 +5717,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-grandpa" name = "pallet-grandpa"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-benchmarking", "frame-benchmarking",
"frame-support", "frame-support",
@@ -5744,7 +5737,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-session" name = "pallet-session"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-support", "frame-support",
"frame-system", "frame-system",
@@ -5755,7 +5748,7 @@ dependencies = [
[[package]] [[package]]
name = "pallet-timestamp" name = "pallet-timestamp"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"frame-benchmarking", "frame-benchmarking",
"frame-support", "frame-support",
@@ -7098,7 +7091,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-allocator" name = "sc-allocator"
version = "34.0.0" version = "34.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"log", "log",
"sp-core", "sp-core",
@@ -7109,7 +7102,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-authority-discovery" name = "sc-authority-discovery"
version = "0.53.0" version = "0.53.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7139,7 +7132,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-basic-authorship" name = "sc-basic-authorship"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"futures", "futures",
"log", "log",
@@ -7161,7 +7154,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-block-builder" name = "sc-block-builder"
version = "0.47.0" version = "0.47.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sp-api", "sp-api",
@@ -7176,7 +7169,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-chain-spec" name = "sc-chain-spec"
version = "46.0.0" version = "46.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sc-client-api", "sc-client-api",
@@ -7197,7 +7190,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-cli" name = "sc-cli"
version = "0.55.0" version = "0.55.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"chrono", "chrono",
@@ -7233,7 +7226,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-client-api" name = "sc-client-api"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"fnv", "fnv",
"futures", "futures",
@@ -7259,12 +7252,12 @@ dependencies = [
[[package]] [[package]]
name = "sc-client-db" name = "sc-client-db"
version = "0.49.0" version = "0.49.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"hash-db", "hash-db",
"kvdb", "kvdb",
"kvdb-memorydb", "kvdb-memorydb",
"kvdb-rocksdb 0.20.99", "kvdb-rocksdb",
"linked-hash-map", "linked-hash-map",
"log", "log",
"parity-db", "parity-db",
@@ -7286,7 +7279,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-consensus" name = "sc-consensus"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7308,7 +7301,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-consensus-babe" name = "sc-consensus-babe"
version = "0.53.0" version = "0.53.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"fork-tree", "fork-tree",
@@ -7345,7 +7338,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-consensus-epochs" name = "sc-consensus-epochs"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"fork-tree", "fork-tree",
"parity-scale-codec", "parity-scale-codec",
@@ -7358,7 +7351,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-consensus-grandpa" name = "sc-consensus-grandpa"
version = "0.38.0" version = "0.38.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"ahash", "ahash",
"array-bytes", "array-bytes",
@@ -7401,7 +7394,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-consensus-slots" name = "sc-consensus-slots"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7423,7 +7416,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-executor" name = "sc-executor"
version = "0.45.0" version = "0.45.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"parking_lot", "parking_lot",
@@ -7443,7 +7436,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-executor-common" name = "sc-executor-common"
version = "0.41.0" version = "0.41.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"sc-allocator", "sc-allocator",
"sp-wasm-interface", "sp-wasm-interface",
@@ -7454,7 +7447,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-executor-wasmtime" name = "sc-executor-wasmtime"
version = "0.41.0" version = "0.41.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"log", "log",
@@ -7470,7 +7463,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-informant" name = "sc-informant"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"console", "console",
"futures", "futures",
@@ -7486,7 +7479,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-keystore" name = "sc-keystore"
version = "38.0.0" version = "38.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"parking_lot", "parking_lot",
@@ -7500,7 +7493,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network" name = "sc-network"
version = "0.53.0" version = "0.53.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"async-channel", "async-channel",
@@ -7544,7 +7537,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network-common" name = "sc-network-common"
version = "0.51.0" version = "0.51.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"parity-scale-codec", "parity-scale-codec",
@@ -7554,7 +7547,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network-gossip" name = "sc-network-gossip"
version = "0.53.0" version = "0.53.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"ahash", "ahash",
"futures", "futures",
@@ -7573,7 +7566,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network-sync" name = "sc-network-sync"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"async-channel", "async-channel",
@@ -7607,7 +7600,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network-transactions" name = "sc-network-transactions"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"futures", "futures",
@@ -7626,7 +7619,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-network-types" name = "sc-network-types"
version = "0.19.0" version = "0.19.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"bs58", "bs58",
"bytes", "bytes",
@@ -7647,7 +7640,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-proposer-metrics" name = "sc-proposer-metrics"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"log", "log",
"substrate-prometheus-endpoint", "substrate-prometheus-endpoint",
@@ -7656,7 +7649,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-rpc" name = "sc-rpc"
version = "48.0.0" version = "48.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"futures", "futures",
"jsonrpsee", "jsonrpsee",
@@ -7675,7 +7668,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-rpc-api" name = "sc-rpc-api"
version = "0.52.0" version = "0.52.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"jsonrpsee", "jsonrpsee",
"parity-scale-codec", "parity-scale-codec",
@@ -7687,7 +7680,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-rpc-server" name = "sc-rpc-server"
version = "25.0.0" version = "25.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"dyn-clone", "dyn-clone",
"forwarded-header-value", "forwarded-header-value",
@@ -7711,7 +7704,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-service" name = "sc-service"
version = "0.54.0" version = "0.54.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"directories", "directories",
@@ -7771,7 +7764,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-state-db" name = "sc-state-db"
version = "0.40.0" version = "0.40.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"log", "log",
"parity-scale-codec", "parity-scale-codec",
@@ -7781,7 +7774,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-sysinfo" name = "sc-sysinfo"
version = "45.0.0" version = "45.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"derive_more 1.0.0", "derive_more 1.0.0",
"futures", "futures",
@@ -7801,7 +7794,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-telemetry" name = "sc-telemetry"
version = "30.0.0" version = "30.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"chrono", "chrono",
"futures", "futures",
@@ -7820,7 +7813,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-tracing" name = "sc-tracing"
version = "42.0.1" version = "42.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"chrono", "chrono",
"console", "console",
@@ -7848,7 +7841,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-tracing-proc-macro" name = "sc-tracing-proc-macro"
version = "11.1.0" version = "11.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"proc-macro-crate 3.4.0", "proc-macro-crate 3.4.0",
"proc-macro2", "proc-macro2",
@@ -7859,7 +7852,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-transaction-pool" name = "sc-transaction-pool"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7889,7 +7882,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-transaction-pool-api" name = "sc-transaction-pool-api"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -7906,7 +7899,7 @@ dependencies = [
[[package]] [[package]]
name = "sc-utils" name = "sc-utils"
version = "20.0.0" version = "20.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-channel", "async-channel",
"futures", "futures",
@@ -9459,7 +9452,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-api" name = "sp-api"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"hash-db", "hash-db",
"log", "log",
@@ -9478,7 +9471,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-api-proc-macro" name = "sp-api-proc-macro"
version = "25.0.0" version = "25.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"blake2 0.10.6", "blake2 0.10.6",
@@ -9492,7 +9485,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-application-crypto" name = "sp-application-crypto"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"serde", "serde",
@@ -9503,7 +9496,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-arithmetic" name = "sp-arithmetic"
version = "28.0.0" version = "28.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"integer-sqrt", "integer-sqrt",
"num-traits", "num-traits",
@@ -9515,7 +9508,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-authority-discovery" name = "sp-authority-discovery"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sp-api", "sp-api",
@@ -9525,7 +9518,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-block-builder" name = "sp-block-builder"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"sp-api", "sp-api",
"sp-inherents", "sp-inherents",
@@ -9535,7 +9528,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-blockchain" name = "sp-blockchain"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"futures", "futures",
"parity-scale-codec", "parity-scale-codec",
@@ -9554,7 +9547,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-consensus" name = "sp-consensus"
version = "0.45.0" version = "0.45.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -9568,7 +9561,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-consensus-babe" name = "sp-consensus-babe"
version = "0.45.0" version = "0.45.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"parity-scale-codec", "parity-scale-codec",
@@ -9585,7 +9578,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-consensus-grandpa" name = "sp-consensus-grandpa"
version = "26.0.0" version = "26.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"finality-grandpa", "finality-grandpa",
"log", "log",
@@ -9601,7 +9594,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-consensus-slots" name = "sp-consensus-slots"
version = "0.45.0" version = "0.45.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"serde", "serde",
@@ -9611,7 +9604,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-core" name = "sp-core"
version = "38.1.0" version = "38.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"array-bytes", "array-bytes",
"bitflags 1.3.2", "bitflags 1.3.2",
@@ -9649,7 +9642,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-crypto-hashing" name = "sp-crypto-hashing"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"blake2b_simd", "blake2b_simd",
"byteorder", "byteorder",
@@ -9662,7 +9655,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-crypto-hashing-proc-macro" name = "sp-crypto-hashing-proc-macro"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"quote", "quote",
"sp-crypto-hashing", "sp-crypto-hashing",
@@ -9672,7 +9665,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-database" name = "sp-database"
version = "10.0.0" version = "10.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"kvdb", "kvdb",
"parking_lot", "parking_lot",
@@ -9681,7 +9674,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-debug-derive" name = "sp-debug-derive"
version = "14.0.0" version = "14.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -9691,7 +9684,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-externalities" name = "sp-externalities"
version = "0.30.0" version = "0.30.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"environmental", "environmental",
"parity-scale-codec", "parity-scale-codec",
@@ -9701,7 +9694,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-genesis-builder" name = "sp-genesis-builder"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sp-api", "sp-api",
@@ -9710,7 +9703,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-inherents" name = "sp-inherents"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"impl-trait-for-tuples", "impl-trait-for-tuples",
@@ -9722,7 +9715,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-io" name = "sp-io"
version = "43.0.0" version = "43.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"bytes", "bytes",
"log", "log",
@@ -9743,7 +9736,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-keyring" name = "sp-keyring"
version = "44.0.0" version = "44.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"sp-core", "sp-core",
"sp-runtime", "sp-runtime",
@@ -9753,7 +9746,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-keystore" name = "sp-keystore"
version = "0.44.1" version = "0.44.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"parking_lot", "parking_lot",
@@ -9764,7 +9757,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-panic-handler" name = "sp-panic-handler"
version = "13.0.2" version = "13.0.2"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"regex", "regex",
@@ -9773,7 +9766,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-rpc" name = "sp-rpc"
version = "36.0.1" version = "36.0.1"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"rustc-hash", "rustc-hash",
"serde", "serde",
@@ -9782,7 +9775,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-runtime" name = "sp-runtime"
version = "44.0.0" version = "44.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"either", "either",
"hash256-std-hasher", "hash256-std-hasher",
@@ -9805,7 +9798,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-runtime-interface" name = "sp-runtime-interface"
version = "32.0.0" version = "32.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"bytes", "bytes",
"parity-scale-codec", "parity-scale-codec",
@@ -9819,7 +9812,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-runtime-interface-proc-macro" name = "sp-runtime-interface-proc-macro"
version = "20.0.0" version = "20.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"expander", "expander",
@@ -9832,20 +9825,19 @@ dependencies = [
[[package]] [[package]]
name = "sp-session" name = "sp-session"
version = "41.0.0" version = "41.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sp-api", "sp-api",
"sp-core", "sp-core",
"sp-keystore", "sp-keystore",
"sp-runtime",
"sp-staking", "sp-staking",
] ]
[[package]] [[package]]
name = "sp-staking" name = "sp-staking"
version = "41.0.0" version = "41.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"sp-core", "sp-core",
@@ -9855,7 +9847,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-state-machine" name = "sp-state-machine"
version = "0.48.0" version = "0.48.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"hash-db", "hash-db",
"log", "log",
@@ -9875,12 +9867,12 @@ dependencies = [
[[package]] [[package]]
name = "sp-std" name = "sp-std"
version = "14.0.0" version = "14.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
[[package]] [[package]]
name = "sp-storage" name = "sp-storage"
version = "22.0.0" version = "22.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"impl-serde", "impl-serde",
"parity-scale-codec", "parity-scale-codec",
@@ -9892,7 +9884,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-timestamp" name = "sp-timestamp"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"parity-scale-codec", "parity-scale-codec",
@@ -9904,7 +9896,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-tracing" name = "sp-tracing"
version = "19.0.0" version = "19.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"regex", "regex",
@@ -9916,7 +9908,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-transaction-pool" name = "sp-transaction-pool"
version = "39.0.0" version = "39.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"sp-api", "sp-api",
"sp-runtime", "sp-runtime",
@@ -9925,7 +9917,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-trie" name = "sp-trie"
version = "41.1.0" version = "41.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"ahash", "ahash",
"foldhash 0.1.5", "foldhash 0.1.5",
@@ -9948,7 +9940,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-version" name = "sp-version"
version = "42.0.0" version = "42.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"impl-serde", "impl-serde",
"parity-scale-codec", "parity-scale-codec",
@@ -9962,7 +9954,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-version-proc-macro" name = "sp-version-proc-macro"
version = "15.0.0" version = "15.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"proc-macro-warning", "proc-macro-warning",
@@ -9974,7 +9966,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-wasm-interface" name = "sp-wasm-interface"
version = "24.0.0" version = "24.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"impl-trait-for-tuples", "impl-trait-for-tuples",
@@ -9986,7 +9978,7 @@ dependencies = [
[[package]] [[package]]
name = "sp-weights" name = "sp-weights"
version = "33.1.0" version = "33.1.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"bounded-collections", "bounded-collections",
"parity-scale-codec", "parity-scale-codec",
@@ -10126,7 +10118,7 @@ dependencies = [
[[package]] [[package]]
name = "substrate-prometheus-endpoint" name = "substrate-prometheus-endpoint"
version = "0.17.7" version = "0.17.7"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"hyper", "hyper",
"log", "log",
@@ -10137,7 +10129,7 @@ dependencies = [
[[package]] [[package]]
name = "substrate-wasm-builder" name = "substrate-wasm-builder"
version = "29.0.0" version = "29.0.0"
source = "git+https://github.com/serai-dex/patch-polkadot-sdk#875af759416d5220d951e022c9a3e490b3c16677" source = "git+https://github.com/serai-dex/patch-polkadot-sdk#0cd66846e58f167b09b48a77c3f70bf7b2b67000"
dependencies = [ dependencies = [
"cargo_metadata", "cargo_metadata",
"console", "console",
@@ -10855,9 +10847,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.18.1" version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a"
dependencies = [ dependencies = [
"getrandom 0.3.4", "getrandom 0.3.4",
"js-sys", "js-sys",

View File

@@ -214,9 +214,6 @@ parity-bip39 = { path = "patches/parity-bip39" }
k256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" } k256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" }
p256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" } p256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" }
# `jemalloc` conflicts with `mimalloc`, so patch to a `kvdb-rocksdb` which never exposes `jemalloc`
kvdb-rocksdb = { path = "patches/kvdb-rocksdb" }
[workspace.lints.clippy] [workspace.lints.clippy]
incompatible_msrv = "allow" # Manually verified with a GitHub workflow incompatible_msrv = "allow" # Manually verified with a GitHub workflow
manual_is_multiple_of = "allow" manual_is_multiple_of = "allow"

View File

@@ -1 +1 @@
3.3.4 3.3.10

View File

@@ -1,4 +1,4 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem "jekyll", "~> 4.3.3" gem "jekyll", "~> 4.4"
gem "just-the-docs", "0.8.2" gem "just-the-docs", "0.10.1"

View File

@@ -1,34 +1,39 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.8.7) addressable (2.8.8)
public_suffix (>= 2.0.2, < 7.0) public_suffix (>= 2.0.2, < 8.0)
bigdecimal (3.1.8) base64 (0.3.0)
bigdecimal (3.3.1)
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.5)
csv (3.3.5)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0) http_parser.rb (~> 0)
eventmachine (1.2.7) eventmachine (1.2.7)
ffi (1.17.0-x86_64-linux-gnu) ffi (1.17.2-x86_64-linux-gnu)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
google-protobuf (4.28.2-x86_64-linux) google-protobuf (4.33.1-x86_64-linux-gnu)
bigdecimal bigdecimal
rake (>= 13) rake (>= 13)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.14.6) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jekyll (4.3.4) jekyll (4.4.1)
addressable (~> 2.4) addressable (~> 2.4)
base64 (~> 0.2)
colorator (~> 1.0) colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5) em-websocket (~> 0.5)
i18n (~> 1.0) i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0) jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0) jekyll-watch (~> 2.0)
json (~> 2.6)
kramdown (~> 2.3, >= 2.3.1) kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0) kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0) liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5) mercenary (~> 0.3, >= 0.3.6)
pathutil (~> 0.9) pathutil (~> 0.9)
rouge (>= 3.0, < 5.0) rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
@@ -36,19 +41,20 @@ GEM
webrick (~> 1.7) webrick (~> 1.7)
jekyll-include-cache (0.2.1) jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0) jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0) jekyll-sass-converter (3.1.0)
sass-embedded (~> 1.54) sass-embedded (~> 1.75)
jekyll-seo-tag (2.8.0) jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0) jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1) jekyll-watch (2.2.1)
listen (~> 3.0) listen (~> 3.0)
just-the-docs (0.8.2) json (2.16.0)
just-the-docs (0.10.1)
jekyll (>= 3.8.5) jekyll (>= 3.8.5)
jekyll-include-cache jekyll-include-cache
jekyll-seo-tag (>= 2.0) jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1) rake (>= 12.3.1)
kramdown (2.4.0) kramdown (2.5.1)
rexml rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0) kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0) kramdown (~> 2.0)
liquid (4.0.4) liquid (4.0.4)
@@ -58,27 +64,27 @@ GEM
mercenary (0.4.0) mercenary (0.4.0)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (6.0.1) public_suffix (7.0.0)
rake (13.2.1) rake (13.3.1)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.11.1)
ffi (~> 1.0) ffi (~> 1.0)
rexml (3.3.7) rexml (3.4.4)
rouge (4.4.0) rouge (4.6.1)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass-embedded (1.79.3-x86_64-linux-gnu) sass-embedded (1.94.2-x86_64-linux-gnu)
google-protobuf (~> 4.27) google-protobuf (~> 4.31)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0) unicode-display_width (2.6.0)
webrick (1.8.2) webrick (1.9.2)
PLATFORMS PLATFORMS
x86_64-linux x86_64-linux
DEPENDENCIES DEPENDENCIES
jekyll (~> 4.3.3) jekyll (~> 4.4)
just-the-docs (= 0.8.2) just-the-docs (= 0.10.1)
BUNDLED WITH BUNDLED WITH
2.5.11 2.5.22

View File

@@ -48,6 +48,10 @@ WORKDIR /serai
# Build the runtime # Build the runtime
RUN cargo build --release -p serai-runtime RUN cargo build --release -p serai-runtime
# Copy the artifact
RUN cp /serai/target/release/wbuild/serai-runtime/serai_runtime.wasm /serai/serai.wasm
# Clean up the build directory
RUN cargo clean
# Copy the runtime to the provided volume # Copy the runtime to the provided volume
CMD ["cp", "/serai/target/release/wbuild/serai-runtime/serai_runtime.wasm", "/volume/serai.wasm"] CMD ["cp", "/serai/serai.wasm", "/volume/serai.wasm"]

View File

@@ -1,20 +0,0 @@
[package]
name = "kvdb-rocksdb"
version = "0.20.99"
description = "Replacement for `kvdb-rocksdb` which removes the `jemalloc` feature"
license = "MIT"
repository = "https://github.com/serai-dex/serai/tree/develop/patches/kvdb-rocksdb"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[workspace]
[dependencies]
kvdb-rocksdb = { version = "0.21", default-features = false }
[features]
jemalloc = []

View File

@@ -1 +0,0 @@
pub use kvdb_rocksdb::*;

View File

@@ -79,41 +79,43 @@ impl Call {
#[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)] #[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
pub enum Event { pub enum Event {
/// Liquidity was added to a pool. /// Liquidity was added to a pool.
LiquidityAdded { LiquidityAddition {
/// The account which added the liquidity. /// The account which received the minted liquidity tokens.
origin: SeraiAddress,
/// The account which received the liquidity tokens.
recipient: SeraiAddress, recipient: SeraiAddress,
/// The pool liquidity was added to. /// The liquidity tokens which were minted.
pool: ExternalCoin, liquidity_tokens: ExternalBalance,
/// The amount of liquidity tokens which were minted.
liquidity_tokens_minted: Amount,
/// The amount of the coin which was added to the pool's liquidity.
external_coin_amount: Amount,
/// The amount of SRI which was added to the pool's liquidity. /// The amount of SRI which was added to the pool's liquidity.
sri_amount: Amount, sri_amount: Amount,
/// The amount of the coin which was added to the pool's liquidity.
external_coin_amount: Amount,
},
/// The specified liquidity tokens were transferred.
LiquidityTransfer {
/// The address transferred from.
from: SeraiAddress,
/// The address transferred to.
to: SeraiAddress,
/// The liquidity tokens transferred.
liquidity_tokens: ExternalBalance,
}, },
/// Liquidity was removed from a pool. /// Liquidity was removed from a pool.
LiquidityRemoved { LiquidityRemoval {
/// The account which removed the liquidity. /// The account which removed the liquidity.
origin: SeraiAddress, from: SeraiAddress,
/// The pool liquidity was removed from. /// The liquidity tokens which were burnt.
pool: ExternalCoin, liquidity_tokens: ExternalBalance,
/// The mount of liquidity tokens which were burnt.
liquidity_tokens_burnt: Amount,
/// The amount of the coin which was removed from the pool's liquidity.
external_coin_amount: Amount,
/// The amount of SRI which was removed from the pool's liquidity. /// The amount of SRI which was removed from the pool's liquidity.
sri_amount: Amount, sri_amount: Amount,
/// The amount of the coin which was removed from the pool's liquidity.
external_coin_amount: Amount,
}, },
/// A swap through the liquidity pools occurred. /// A swap through the liquidity pools occurred.
Swap { Swap {
/// The account which made the swap. /// The account which made the swap.
origin: SeraiAddress, from: SeraiAddress,
/// The recipient for the output of the swap.
recipient: SeraiAddress,
/// The deltas incurred by the pools. /// The deltas incurred by the pools.
/// ///
/// For a swap of sriABC to sriDEF, this would be /// For a swap of sriABC to sriDEF, this would be

View File

@@ -10,6 +10,8 @@ mod mock;
#[expect(clippy::cast_possible_truncation)] #[expect(clippy::cast_possible_truncation)]
#[frame_support::pallet] #[frame_support::pallet]
mod pallet { mod pallet {
use alloc::vec::Vec;
use frame_system::pallet_prelude::*; use frame_system::pallet_prelude::*;
use frame_support::pallet_prelude::*; use frame_support::pallet_prelude::*;
@@ -18,7 +20,7 @@ mod pallet {
prelude::*, prelude::*,
dex::{Error as PrimitivesError, Reserves, Premise}, dex::{Error as PrimitivesError, Reserves, Premise},
}, },
Event, dex::Event,
}; };
use serai_core_pallet::Pallet as Core; use serai_core_pallet::Pallet as Core;
@@ -99,10 +101,20 @@ mod pallet {
let (sri_actual, external_coin_actual, liquidity) = if supply == 0 { let (sri_actual, external_coin_actual, liquidity) = if supply == 0 {
let sri_actual = sri_intended; let sri_actual = sri_intended;
let external_coin_actual = external_coin_intended; let external_coin_actual = external_coin_intended;
let liquidity = Amount( /*
u64::try_from((u128::from(sri_actual.0) * u128::from(external_coin_actual.0)).isqrt()) The best way to explain this is to first consider how would one would write shares of a
.map_err(|_| Error::<T>::Overflow)?, liquidity pool with only a single coin (however purposeless that may be). The immediate
); suggestion would simply be to use the amount of the singular coin initially added as the
initial amount of shares, with further shares being distributed pro-rata as further
liquidity is added. This inherently has the amount of liquidity tokens approximate the
magnitude and scale of the underlying coin.
When we scale the two-coin case, this methodology no longer immediately applies. The
solution here is to take the product, and then the square root, of the two values. This
provides a magnitude/scale of the liquidity tokens approximately in-between both coins.
*/
let liquidity = (u128::from(sri_actual.0) * u128::from(external_coin_actual.0)).isqrt();
let liquidity = Amount(u64::try_from(liquidity).map_err(|_| Error::<T>::Overflow)?);
if liquidity.0 < MINIMUM_LIQUIDITY { if liquidity.0 < MINIMUM_LIQUIDITY {
Err(Error::<T>::InvalidLiquidity)?; Err(Error::<T>::InvalidLiquidity)?;
} }
@@ -149,6 +161,10 @@ mod pallet {
Amount(sri_liquidity.min(external_coin_liquidity)) Amount(sri_liquidity.min(external_coin_liquidity))
}; };
if liquidity == Amount(0) {
Err(Error::<T>::Unsatisfied)?;
}
(sri_actual, external_coin_actual, liquidity) (sri_actual, external_coin_actual, liquidity)
}; };
@@ -162,12 +178,15 @@ mod pallet {
pool.into(), pool.into(),
Balance { coin: Coin::from(external_coin), amount: external_coin_actual }, Balance { coin: Coin::from(external_coin), amount: external_coin_actual },
)?; )?;
LiquidityTokens::<T>::mint( let liquidity_tokens = ExternalBalance { coin: external_coin, amount: liquidity };
from, LiquidityTokens::<T>::mint(from, liquidity_tokens.into())?;
Balance { coin: Coin::from(external_coin), amount: liquidity },
)?;
// TODO: Event Self::emit_event(Event::LiquidityAddition {
recipient: from.into(),
liquidity_tokens,
sri_amount: sri_actual,
external_coin_amount: external_coin_actual,
});
Ok(()) Ok(())
} }
@@ -183,7 +202,7 @@ mod pallet {
let from = ensure_signed(origin)?; let from = ensure_signed(origin)?;
LiquidityTokens::<T>::transfer_fn(from, to.into(), liquidity_tokens.into())?; LiquidityTokens::<T>::transfer_fn(from, to.into(), liquidity_tokens.into())?;
// TODO: Event Self::emit_event(Event::LiquidityTransfer { from: from.into(), to, liquidity_tokens });
Ok(()) Ok(())
} }
@@ -234,7 +253,12 @@ mod pallet {
Balance { coin: Coin::from(external_coin), amount: external_coin_amount }, Balance { coin: Coin::from(external_coin), amount: external_coin_amount },
)?; )?;
// TODO: Event Self::emit_event(Event::LiquidityRemoval {
from: from.into(),
liquidity_tokens,
sri_amount,
external_coin_amount,
});
Ok(()) Ok(())
} }
@@ -254,6 +278,7 @@ mod pallet {
let swaps = Premise::route(coins_to_swap.coin, minimum_to_receive.coin) let swaps = Premise::route(coins_to_swap.coin, minimum_to_receive.coin)
.ok_or(Error::<T>::FromToSelf)?; .ok_or(Error::<T>::FromToSelf)?;
let mut deltas = Vec::with_capacity(swaps.len() + 1);
for swap in &swaps { for swap in &swaps {
let external_coin = swap.external_coin(); let external_coin = swap.external_coin();
let pool = serai_abi::dex::address(external_coin); let pool = serai_abi::dex::address(external_coin);
@@ -273,11 +298,9 @@ mod pallet {
be credited both as part of the reserves _and_ the amount in if violated. be credited both as part of the reserves _and_ the amount in if violated.
*/ */
assert!(transfer_from != pool, "swap routed from a coin to itself"); assert!(transfer_from != pool, "swap routed from a coin to itself");
Coins::<T>::transfer_fn( let delta = Balance { coin: swap.r#in(), amount: next_amount };
transfer_from.into(), Coins::<T>::transfer_fn(transfer_from.into(), pool.into(), delta)?;
pool.into(), deltas.push(delta);
Balance { coin: swap.r#in(), amount: next_amount },
)?;
// Update the current status // Update the current status
transfer_from = pool; transfer_from = pool;
@@ -290,13 +313,11 @@ mod pallet {
} }
// Transfer the resulting coins to the origin // Transfer the resulting coins to the origin
Coins::<T>::transfer_fn( let delta = Balance { coin: minimum_to_receive.coin, amount: next_amount };
transfer_from.into(), Coins::<T>::transfer_fn(transfer_from.into(), origin.into(), delta)?;
origin.into(), deltas.push(delta);
Balance { coin: minimum_to_receive.coin, amount: next_amount },
)?;
// TODO: Event Self::emit_event(Event::Swap { from: origin, deltas });
Ok(()) Ok(())
} }
@@ -316,6 +337,7 @@ mod pallet {
let swaps = Premise::route(maximum_to_swap.coin, coins_to_receive.coin) let swaps = Premise::route(maximum_to_swap.coin, coins_to_receive.coin)
.ok_or(Error::<T>::FromToSelf)?; .ok_or(Error::<T>::FromToSelf)?;
let mut deltas = Vec::with_capacity(swaps.len() + 1);
let mut i = swaps.len(); let mut i = swaps.len();
while { while {
i -= 1; i -= 1;
@@ -342,11 +364,9 @@ mod pallet {
excluded when determining the reserves on the next iteration. excluded when determining the reserves on the next iteration.
*/ */
assert!(transfer_to != pool, "swap routed to a coin from itself"); assert!(transfer_to != pool, "swap routed to a coin from itself");
Coins::<T>::transfer_fn( let delta = Balance { coin: swap.out(), amount: next_amount };
pool.into(), Coins::<T>::transfer_fn(pool.into(), transfer_to.into(), delta)?;
transfer_to.into(), deltas.push(delta);
Balance { coin: swap.out(), amount: next_amount },
)?;
transfer_to = pool; transfer_to = pool;
next_amount = swap.quote_for_out(reserves, next_amount).map_err(Error::<T>::from)?; next_amount = swap.quote_for_out(reserves, next_amount).map_err(Error::<T>::from)?;
@@ -360,13 +380,12 @@ mod pallet {
} }
// Transfer the necessary coins from the origin // Transfer the necessary coins from the origin
Coins::<T>::transfer_fn( let delta = Balance { coin: maximum_to_swap.coin, amount: next_amount };
origin.into(), Coins::<T>::transfer_fn(origin.into(), transfer_to.into(), delta)?;
transfer_to.into(), deltas.push(delta);
Balance { coin: maximum_to_swap.coin, amount: next_amount },
)?;
// TODO: Event deltas.reverse();
Self::emit_event(Event::Swap { from: origin, deltas });
Ok(()) Ok(())
} }

View File

@@ -55,7 +55,7 @@ pub fn reproducibly_builds() {
.arg("--rm") .arg("--rm")
.arg(&image) .arg(&image)
.arg("sha256sum") .arg("sha256sum")
.arg("/serai/target/release/wbuild/serai-runtime/serai_runtime.wasm") .arg("/serai/serai.wasm")
.output(), .output(),
); );
// Attempt to clean up the image // Attempt to clean up the image