diff --git a/.github/workflows/ci-code-review-rust.yml b/.github/workflows/ci-code-review-rust.yml
index c5f23969b7..a612a0b509 100644
--- a/.github/workflows/ci-code-review-rust.yml
+++ b/.github/workflows/ci-code-review-rust.yml
@@ -32,7 +32,7 @@ on:
env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: '1.16.14'
- RUST_TOOLCHAIN: '1.69.0'
+ RUST_TOOLCHAIN: '1.70.0'
LOG_PROGRAM: '4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg'
jobs:
diff --git a/Cargo.lock b/Cargo.lock
index 7b423022eb..148f99507e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -119,7 +119,7 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"anyhow",
"proc-macro2 1.0.67",
"quote 1.0.33",
@@ -127,13 +127,25 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-access-control"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-attribute-account"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"anyhow",
"bs58 0.5.0",
"proc-macro2 1.0.67",
@@ -142,62 +154,120 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-account"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "bs58 0.5.0",
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-attribute-constant"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"proc-macro2 1.0.67",
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-constant"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-attribute-error"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"proc-macro2 1.0.67",
"quote 1.0.33",
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-error"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-attribute-event"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"anyhow",
"proc-macro2 1.0.67",
"quote 1.0.33",
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-event"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-attribute-program"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"anyhow",
"proc-macro2 1.0.67",
"quote 1.0.33",
"syn 1.0.109",
]
+[[package]]
+name = "anchor-attribute-program"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-client"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445"
dependencies = [
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"futures 0.3.28",
"regex",
@@ -216,13 +286,37 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af"
dependencies = [
- "anchor-syn",
+ "anchor-syn 0.28.0",
"anyhow",
"proc-macro2 1.0.67",
"quote 1.0.33",
"syn 1.0.109",
]
+[[package]]
+name = "anchor-derive-accounts"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-derive-serde"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe"
+dependencies = [
+ "anchor-syn 0.29.0",
+ "borsh-derive-internal 0.10.3",
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-derive-space"
version = "0.28.0"
@@ -234,20 +328,56 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "anchor-derive-space"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419"
+dependencies = [
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "anchor-lang"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414"
dependencies = [
- "anchor-attribute-access-control",
- "anchor-attribute-account",
- "anchor-attribute-constant",
- "anchor-attribute-error",
- "anchor-attribute-event",
- "anchor-attribute-program",
- "anchor-derive-accounts",
- "anchor-derive-space",
+ "anchor-attribute-access-control 0.28.0",
+ "anchor-attribute-account 0.28.0",
+ "anchor-attribute-constant 0.28.0",
+ "anchor-attribute-error 0.28.0",
+ "anchor-attribute-event 0.28.0",
+ "anchor-attribute-program 0.28.0",
+ "anchor-derive-accounts 0.28.0",
+ "anchor-derive-space 0.28.0",
+ "arrayref",
+ "base64 0.13.1",
+ "bincode",
+ "borsh 0.10.3",
+ "bytemuck",
+ "getrandom 0.2.10",
+ "solana-program",
+ "thiserror",
+]
+
+[[package]]
+name = "anchor-lang"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad"
+dependencies = [
+ "anchor-attribute-access-control 0.29.0",
+ "anchor-attribute-account 0.29.0",
+ "anchor-attribute-constant 0.29.0",
+ "anchor-attribute-error 0.29.0",
+ "anchor-attribute-event 0.29.0",
+ "anchor-attribute-program 0.29.0",
+ "anchor-derive-accounts 0.29.0",
+ "anchor-derive-serde",
+ "anchor-derive-space 0.29.0",
"arrayref",
"base64 0.13.1",
"bincode",
@@ -264,13 +394,27 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b"
dependencies = [
- "anchor-lang",
+ "anchor-lang 0.28.0",
"solana-program",
"spl-associated-token-account 1.1.3",
"spl-token 3.5.0",
"spl-token-2022 0.6.1",
]
+[[package]]
+name = "anchor-spl"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a"
+dependencies = [
+ "anchor-lang 0.29.0",
+ "mpl-token-metadata 3.2.3",
+ "solana-program",
+ "spl-associated-token-account 2.2.0",
+ "spl-token 4.0.0",
+ "spl-token-2022 0.9.0",
+]
+
[[package]]
name = "anchor-syn"
version = "0.28.0"
@@ -289,6 +433,24 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "anchor-syn"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9101b84702fed2ea57bd22992f75065da5648017135b844283a2f6d74f27825"
+dependencies = [
+ "anyhow",
+ "bs58 0.5.0",
+ "heck 0.3.3",
+ "proc-macro2 1.0.67",
+ "quote 1.0.33",
+ "serde",
+ "serde_json",
+ "sha2 0.10.7",
+ "syn 1.0.109",
+ "thiserror",
+]
+
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -2089,19 +2251,6 @@ dependencies = [
"typenum",
]
-[[package]]
-name = "fixed"
-version = "1.11.0"
-source = "git+https://github.com/openbook-dex/openbook-v2.git#deb70f66c3294f4f8942f12f46ef40730f5d23c6"
-dependencies = [
- "az",
- "borsh 0.9.3",
- "bytemuck",
- "half",
- "serde",
- "typenum",
-]
-
[[package]]
name = "fixedbitset"
version = "0.4.2"
@@ -3364,7 +3513,7 @@ dependencies = [
"bytemuck",
"bytes 1.5.0",
"chrono",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"futures-core",
"itertools",
@@ -3381,10 +3530,10 @@ dependencies = [
[[package]]
name = "mango-v4"
-version = "0.24.0"
+version = "0.25.0"
dependencies = [
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"anyhow",
"arrayref",
"async-trait",
@@ -3396,7 +3545,7 @@ dependencies = [
"default-env",
"derivative",
"env_logger",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"itertools",
"lazy_static",
"log 0.4.20",
@@ -3427,14 +3576,14 @@ name = "mango-v4-cli"
version = "0.3.0"
dependencies = [
"anchor-client",
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"anyhow",
"async-channel",
"base64 0.21.4",
"clap 3.2.25",
"dotenv",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"itertools",
"mango-v4",
@@ -3453,8 +3602,8 @@ name = "mango-v4-client"
version = "0.3.0"
dependencies = [
"anchor-client",
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"anyhow",
"async-channel",
"async-once-cell",
@@ -3465,13 +3614,14 @@ dependencies = [
"borsh 0.10.3",
"clap 3.2.25",
"derive_builder",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"itertools",
"jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-core-client",
"mango-feeds-connector",
"mango-v4",
+ "openbook-v2",
"pyth-sdk-solana",
"reqwest",
"serde",
@@ -3498,12 +3648,12 @@ name = "mango-v4-keeper"
version = "0.3.0"
dependencies = [
"anchor-client",
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"anyhow",
"clap 3.2.25",
"dotenv",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"itertools",
"lazy_static",
@@ -3524,7 +3674,7 @@ name = "mango-v4-liquidator"
version = "0.0.1"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"arrayref",
"async-channel",
@@ -3537,7 +3687,7 @@ dependencies = [
"chrono",
"clap 3.2.25",
"dotenv",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"futures-core",
"futures-util",
@@ -3550,6 +3700,7 @@ dependencies = [
"mango-v4",
"mango-v4-client",
"once_cell",
+ "openbook-v2",
"pyth-sdk-solana",
"rand 0.7.3",
"regex",
@@ -3575,7 +3726,7 @@ name = "mango-v4-settler"
version = "0.0.1"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"arrayref",
"async-channel",
@@ -3587,7 +3738,7 @@ dependencies = [
"bytes 1.5.0",
"clap 3.2.25",
"dotenv",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"futures-core",
"futures-util",
@@ -3869,11 +4020,24 @@ dependencies = [
"num-traits",
"shank",
"solana-program",
- "spl-associated-token-account 2.1.0",
+ "spl-associated-token-account 2.2.0",
"spl-token 4.0.0",
"thiserror",
]
+[[package]]
+name = "mpl-token-metadata"
+version = "3.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba8ee05284d79b367ae8966d558e1a305a781fc80c9df51f37775169117ba64f"
+dependencies = [
+ "borsh 0.10.3",
+ "num-derive 0.3.3",
+ "num-traits",
+ "solana-program",
+ "thiserror",
+]
+
[[package]]
name = "mpl-token-metadata-context-derive"
version = "0.2.1"
@@ -4265,19 +4429,21 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openbook-v2"
version = "0.1.0"
-source = "git+https://github.com/openbook-dex/openbook-v2.git#deb70f66c3294f4f8942f12f46ef40730f5d23c6"
+source = "git+https://github.com/openbook-dex/openbook-v2.git?rev=270b2d2d473862bd4e3aa213feb970af81f4b3e2#270b2d2d473862bd4e3aa213feb970af81f4b3e2"
dependencies = [
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"arrayref",
"bytemuck",
+ "default-env",
"derivative",
- "fixed 1.11.0 (git+https://github.com/openbook-dex/openbook-v2.git)",
+ "fixed",
"itertools",
"num_enum 0.5.11",
"pyth-sdk-solana",
"raydium-amm-v3",
"solana-program",
+ "solana-security-txt",
"static_assertions",
"switchboard-program",
"switchboard-v2",
@@ -5255,14 +5421,15 @@ dependencies = [
[[package]]
name = "raydium-amm-v3"
version = "0.1.0"
-source = "git+https://github.com/raydium-io/raydium-clmm.git#6e4639f7133a8852068d2d473c263f907b69cd4a"
+source = "git+https://github.com/raydium-io/raydium-clmm.git#cc1adca3cbe5eca08571d19ebedad4c0b8ec4022"
dependencies = [
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.29.0",
+ "anchor-spl 0.29.0",
"arrayref",
"bytemuck",
- "mpl-token-metadata",
+ "mpl-token-metadata 1.13.2",
"solana-program",
+ "spl-memo 4.0.0",
"uint",
]
@@ -5896,7 +6063,7 @@ name = "serum_dex"
version = "0.5.10"
source = "git+https://github.com/grooviegermanikus/program.git?branch=groovie/v0.5.10-updates-expose-things#03f1b242db2a709af2601b4df445b2ea33a8d97d"
dependencies = [
- "anchor-lang",
+ "anchor-lang 0.29.0",
"arrayref",
"bincode",
"bytemuck",
@@ -5922,7 +6089,7 @@ name = "serum_dex"
version = "0.5.10"
source = "git+https://github.com/openbook-dex/program.git#c85e56deeaead43abbc33b7301058838b9c5136d"
dependencies = [
- "anchor-lang",
+ "anchor-lang 0.29.0",
"arrayref",
"bincode",
"bytemuck",
@@ -5948,7 +6115,7 @@ name = "service-mango-crank"
version = "0.1.0"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"async-channel",
"async-trait",
@@ -5980,7 +6147,7 @@ name = "service-mango-fills"
version = "0.1.0"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"async-channel",
"async-trait",
@@ -6025,7 +6192,7 @@ name = "service-mango-health"
version = "0.1.0"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"async-channel",
"async-trait",
@@ -6033,7 +6200,7 @@ dependencies = [
"bs58 0.3.1",
"bytemuck",
"chrono",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures 0.3.28",
"futures-channel",
"futures-core",
@@ -6072,13 +6239,13 @@ name = "service-mango-orderbook"
version = "0.1.0"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"async-channel",
"async-trait",
"bs58 0.3.1",
"bytemuck",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"futures-channel",
"futures-util",
"itertools",
@@ -6105,12 +6272,12 @@ name = "service-mango-pnl"
version = "0.1.0"
dependencies = [
"anchor-client",
- "anchor-lang",
+ "anchor-lang 0.28.0",
"anyhow",
"async-channel",
"async-trait",
"bs58 0.3.1",
- "fixed 1.11.0 (git+https://github.com/blockworks-foundation/fixed.git?branch=v1.11.0-borsh0_10-mango)",
+ "fixed",
"jsonrpsee",
"log 0.4.20",
"mango-feeds-connector",
@@ -7798,9 +7965,9 @@ dependencies = [
[[package]]
name = "spl-associated-token-account"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "477696277857a7b2c17a6f7f3095e835850ad1c0f11637b5bd2693ca777d8546"
+checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3"
dependencies = [
"assert_matches",
"borsh 0.10.3",
@@ -7808,7 +7975,7 @@ dependencies = [
"num-traits",
"solana-program",
"spl-token 4.0.0",
- "spl-token-2022 0.8.0",
+ "spl-token-2022 0.9.0",
"thiserror",
]
@@ -7905,9 +8072,9 @@ dependencies = [
[[package]]
name = "spl-tlv-account-resolution"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7960b1e1a41e4238807fca0865e72a341b668137a3f2ddcd770d04fd1b374c96"
+checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9"
dependencies = [
"bytemuck",
"solana-program",
@@ -7967,9 +8134,9 @@ dependencies = [
[[package]]
name = "spl-token-2022"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84fc0c7a763c3f53fa12581d07ed324548a771bb648a1217e4f330b1d0a59331"
+checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86"
dependencies = [
"arrayref",
"bytemuck",
@@ -8003,9 +8170,9 @@ dependencies = [
[[package]]
name = "spl-transfer-hook-interface"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7489940049417ae5ce909314bead0670e2a5ea5c82d43ab96dc15c8fcbbccba"
+checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b"
dependencies = [
"arrayref",
"bytemuck",
@@ -8154,8 +8321,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "625e34dba0d9bcf6b1f5db5ccf1c0aa8db8329ff89c4d51715bbe4514140127a"
dependencies = [
"anchor-client",
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"bincode",
"bytemuck",
"chrono",
@@ -8195,8 +8362,8 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b81886169f446e22edc18ead7addd9ebd141c39bf2286cb37943c92cd3af724"
dependencies = [
- "anchor-lang",
- "anchor-spl",
+ "anchor-lang 0.28.0",
+ "anchor-spl 0.28.0",
"bytemuck",
"rust_decimal",
"solana-program",
diff --git a/Cargo.toml b/Cargo.toml
index afb3f2adc6..f95b9033af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,6 +14,7 @@ pyth-sdk-solana = "0.8.0"
# commit c85e56d (0.5.10 plus dependency updates)
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false }
mango-feeds-connector = "0.2.1"
+openbook-v2 = { git = "https://github.com/openbook-dex/openbook-v2.git", rev = "270b2d2d473862bd4e3aa213feb970af81f4b3e2" }
# 1.16.7+ is required due to this: https://github.com/blockworks-foundation/mango-v4/issues/712
solana-address-lookup-table-program = "~1.16.7"
diff --git a/Dockerfile b/Dockerfile
index eeebb96baf..f9448fc40f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
# Base image containing all binaries, deployed to ghcr.io/blockworks-foundation/mango-v4:latest
-FROM lukemathwalker/cargo-chef:latest-rust-1.69-slim-bullseye as base
+FROM lukemathwalker/cargo-chef:latest-rust-1.70-slim-bullseye as base
RUN apt-get update && apt-get -y install clang cmake perl libfindbin-libs-perl
WORKDIR /app
diff --git a/README.md b/README.md
index d3bccefe87..fc71ad72f9 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ See DEVELOPING.md and FAQ-DEV.md
### Dependencies
-- rust version 1.69.0
+- rust version 1.70.0
- solana-cli 1.16.7
- anchor-cli 0.28.0
- npm 8.1.2
diff --git a/bin/liquidator/Cargo.toml b/bin/liquidator/Cargo.toml
index 9e13f12ef4..54467f7d4a 100644
--- a/bin/liquidator/Cargo.toml
+++ b/bin/liquidator/Cargo.toml
@@ -53,3 +53,4 @@ regex = "1.9.5"
hdrhistogram = "7.5.4"
indexmap = "2.0.0"
borsh = { version = "0.10.3", features = ["const-generics"] }
+openbook-v2 = { workspace = true, features = ["no-entrypoint"] }
diff --git a/bin/liquidator/src/liquidate.rs b/bin/liquidator/src/liquidate.rs
index 06c3d1f018..0be1838bb4 100644
--- a/bin/liquidator/src/liquidate.rs
+++ b/bin/liquidator/src/liquidate.rs
@@ -4,7 +4,10 @@ use std::time::Duration;
use itertools::Itertools;
use mango_v4::health::{HealthCache, HealthType};
-use mango_v4::state::{MangoAccountValue, PerpMarketIndex, Side, TokenIndex, QUOTE_TOKEN_INDEX};
+use mango_v4::state::{
+ MangoAccountValue, OpenbookV2Orders, PerpMarketIndex, Serum3Orders, Side, TokenIndex,
+ QUOTE_TOKEN_INDEX,
+};
use mango_v4_client::{chain_data, MangoClient, PreparedInstructions};
use solana_sdk::signature::Signature;
@@ -45,7 +48,12 @@ struct LiquidateHelper<'a> {
}
impl<'a> LiquidateHelper<'a> {
- async fn serum3_close_orders(&self) -> anyhow::Result