Skip to content

Commit

Permalink
Change serum-dex by openbook-dex
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Dec 9, 2022
1 parent d88a09d commit 5ab933a
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 24 deletions.
15 changes: 6 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "examples/swap/deps/serum-dex"]
path = tests/swap/deps/serum-dex
url = https://github.com/project-serum/serum-dex
[submodule "examples/cfo/deps/serum-dex"]
path = tests/cfo/deps/serum-dex
url = https://github.com/project-serum/serum-dex
[submodule "examples/swap/deps/openbook-dex"]
path = tests/swap/deps/openbook-dex
url = https://github.com/openbook-dex/program
[submodule "examples/cfo/deps/openbook-dex"]
path = tests/cfo/deps/openbook-dex
url = https://github.com/openbook-dex/program
[submodule "examples/cfo/deps/swap"]
path = tests/cfo/deps/swap
url = https://github.com/project-serum/swap.git
Expand All @@ -12,9 +12,6 @@
path = tests/cfo/deps/stake
url = https://github.com/project-serum/stake.git
branch = armani/cfo
[submodule "examples/permissioned-markets/deps/serum-dex"]
path = tests/permissioned-markets/deps/serum-dex
url = https://github.com/project-serum/serum-dex
[submodule "tests/auction-house"]
path = tests/auction-house
url = https://github.com/armaniferrante/auction-house
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ members = [
"spl",
]
exclude = [
"tests/swap/deps/serum-dex",
"tests/cfo/deps/serum-dex",
"tests/permissioned-markets/deps/serum-dex",
"tests/swap/deps/openbook-dex",
"tests/cfo/deps/openbook-dex",
]
2 changes: 1 addition & 1 deletion tests/cfo/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ localnet = "./scripts/localnet.sh"

[[test.genesis]]
address = "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"
program = "./deps/serum-dex/dex/target/deploy/serum_dex.so"
program = "./deps/openbook-dex/dex/target/deploy/serum_dex.so"

[[test.genesis]]
address = "22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD"
Expand Down
2 changes: 1 addition & 1 deletion tests/cfo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [
"programs/*"
]
exclude = [
"deps/serum-dex",
"deps/openbook-dex",
"deps/stake",
"deps/swap"
]
1 change: 0 additions & 1 deletion tests/cfo/deps/serum-dex
Submodule serum-dex deleted from ed9d54
2 changes: 1 addition & 1 deletion tests/cfo/programs/cfo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl" }
spl-token = { version = "3.5.0", features = ["no-entrypoint"] }
swap = { path = "../../deps/swap/programs/swap", features = ["cpi"] }
serum_dex = { path = "../../deps/serum-dex/dex", features = ["no-entrypoint"] }
serum_dex = { path = "../../deps/openbook-dex/dex", features = ["no-entrypoint"] }
registry = { path = "../../deps/stake/programs/registry", features = ["cpi"] }
lockup = { path = "../../deps/stake/programs/lockup", features = ["cpi"] }
1 change: 0 additions & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"lockup",
"misc",
"multisig",
"permissioned-markets",
"pda-derivation",
"relations-derivation",
"pyth",
Expand Down
2 changes: 1 addition & 1 deletion tests/swap/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swap = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"

[[test.genesis]]
address = "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"
program = "./deps/serum-dex/dex/target/deploy/serum_dex.so"
program = "./deps/openbook-dex/dex/target/deploy/serum_dex.so"

[scripts]
test = "yarn run mocha -t 1000000 tests/"
Expand Down
2 changes: 1 addition & 1 deletion tests/swap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ members = [
"programs/*"
]
exclude = [
"deps/serum-dex"
"deps/openbook-dex"
]
1 change: 0 additions & 1 deletion tests/swap/deps/serum-dex
Submodule serum-dex deleted from 542064
2 changes: 1 addition & 1 deletion tests/swap/programs/swap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ default = []
[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl", features = ["dex"] }
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"] }
serum_dex = { path = "../../deps/openbook-dex/dex", features = ["no-entrypoint"] }
35 changes: 32 additions & 3 deletions tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
dependencies:
regenerator-runtime "^0.13.4"

"@coral-xyz/borsh@^0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.2.6.tgz#0f11b223bf2967574310705afd3c53ce26688ada"
integrity sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==
dependencies:
bn.js "^5.1.2"
buffer-layout "^1.2.0"

"@ethersproject/bytes@^5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.5.0.tgz#cb11c526de657e7b45d2e0f0246fb3b9d29a601c"
Expand Down Expand Up @@ -63,8 +71,8 @@
"@project-serum/anchor@=0.25.0", "@project-serum/anchor@file:../ts/packages/anchor":
version "0.25.0"
dependencies:
"@project-serum/borsh" "^0.2.5"
"@solana/web3.js" "^1.64.0"
"@coral-xyz/borsh" "^0.2.6"
"@solana/web3.js" "^1.68.0"
base64-js "^1.5.1"
bn.js "^5.1.2"
bs58 "^4.0.1"
Expand Down Expand Up @@ -99,7 +107,7 @@
snake-case "^3.0.4"
toml "^3.0.0"

"@project-serum/borsh@^0.2.2", "@project-serum/borsh@^0.2.5":
"@project-serum/borsh@^0.2.2":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.5.tgz#6059287aa624ecebbfc0edd35e4c28ff987d8663"
integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==
Expand Down Expand Up @@ -237,6 +245,27 @@
rpc-websockets "^7.5.0"
superstruct "^0.14.2"

"@solana/web3.js@^1.68.0":
version "1.70.0"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.70.0.tgz#14ad207f431861397db85921aad8df4e8374e7c8"
integrity sha512-HwdI9LaHaszfpzgxJI44iP68mJWUeqK1TeSheKQsGkH5zlVyGWGmim50MyDWu2vXiuL8Akf2xEMSrDYyLordgg==
dependencies:
"@babel/runtime" "^7.12.5"
"@noble/ed25519" "^1.7.0"
"@noble/hashes" "^1.1.2"
"@noble/secp256k1" "^1.6.3"
"@solana/buffer-layout" "^4.0.0"
bigint-buffer "^1.1.5"
bn.js "^5.0.0"
borsh "^0.7.0"
bs58 "^4.0.1"
buffer "6.0.1"
fast-stable-stringify "^1.0.0"
jayson "^3.4.4"
node-fetch "2"
rpc-websockets "^7.5.0"
superstruct "^0.14.2"

"@types/bn.js@^4.11.5":
version "4.11.6"
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
Expand Down

0 comments on commit 5ab933a

Please sign in to comment.