Skip to content

Commit

Permalink
chore: move anchor deps to workspace Cargo.toml (#907)
Browse files Browse the repository at this point in the history
* Update dependencies to use workspace version

Dependencies including anchor-lang, anchor-spl, and solana-sdk are now set to use the workspace version. This change allows for more consistency across the project and ensures that all components are using the same version of the dependencies.

* The solana-transaction-status library has been added as a dependency to the workspace Cargo.toml file.
  • Loading branch information
sergeytimoshin authored Jun 28, 2024
1 parent 9d545ec commit 3675e11
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 54 deletions.
42 changes: 23 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,28 @@ solana-sdk = "=1.18.11"
solana-program-test = "=1.18.11"
solana-client = "=1.18.11"
solana-cli-output = "=1.18.11"
solana-transaction-status = "=1.18.11"

anchor-lang = "=0.29.0"
anchor-spl = "=0.29.0"

[patch.crates-io]
"solana-account-decoder" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-accounts-db" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-interface" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-server" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-cli-output" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-test" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-runtime" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client-api" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-runtime" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk-macro" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-zk-token-sdk" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi-macro" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-transaction-status" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-account-decoder" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-accounts-db" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-client" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-interface" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-server" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-cli-output" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-test" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-runtime" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client-api" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-runtime" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk-macro" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-client" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-zk-token-sdk" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi-macro" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-transaction-status" = { git = "https://github.com/lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
6 changes: 3 additions & 3 deletions examples/token-escrow/programs/token-escrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test-sbf = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]

[dependencies]
anchor-lang = { version="0.29.0", features = ["init-if-needed"] }
anchor-lang = { workspace = true, features = ["init-if-needed"] }
light-compressed-token = { path = "../../../../programs/compressed-token", version = "0.4.1", features = ["cpi"]}
light-system-program = { path = "../../../../programs/system", version = "0.4.1", features = ["cpi"]}
account-compression = { path = "../../../../programs/account-compression", version = "0.4.1", features = ["cpi"] }
Expand All @@ -29,7 +29,7 @@ light-verifier = { path = "../../../../circuit-lib/verifier", version = "0.2.1"
light-sdk = { path = "../../../../sdk", version = "0.2.1", features = ["cpi"] }

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }

[dev-dependencies]
solana-program-test = { workspace = true }
Expand All @@ -40,4 +40,4 @@ light-prover-client = { path = "../../../../circuit-lib/light-prover-client", ve
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-spl = { workspace = true }
8 changes: 4 additions & 4 deletions forester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ edition = "2021"

[dependencies]
config = "0.14.0"
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
clap = {version = "4.0.26", features = ["derive"]}
solana-sdk = "1.18.11"
solana-client = "1.18.11"
solana-transaction-status = "1.18.11"
solana-sdk = { workspace = true }
solana-client = { workspace = true }
solana-transaction-status = { workspace = true }
tiny-bip39 = "0.8.2"
chrono = "0.4.37"
time = "0.3.34"
Expand Down
2 changes: 1 addition & 1 deletion heap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ license = "Apache-2.0"
edition = "2021"

[dependencies]
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
2 changes: 1 addition & 1 deletion programs/account-compression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bench-sbf = []

[dependencies]
aligned-sized = { version = "0.2.1", path = "../../macros/aligned-sized" }
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
bytemuck = { version = "1.14", features = ["min_const_generics"] }
light-bounded-vec = { version = "0.2.1", path = "../../merkle-tree/bounded-vec", features = ["solana"] }
light-hash-set = { version = "0.2.1", path = "../../merkle-tree/hash-set", features = ["solana"] }
Expand Down
4 changes: 2 additions & 2 deletions programs/compressed-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]


[dependencies]
anchor-lang = "0.29.0"
anchor-spl = "0.29.0"
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
spl-token = {version = "3.5.0", features = ["no-entrypoint"]}
aligned-sized = { version = "0.2.1", path = "../../macros/aligned-sized" }
account-compression = { version = "0.4.1", path = "../account-compression", features = ["cpi", "no-idl"] }
Expand Down
2 changes: 1 addition & 1 deletion programs/registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bench-sbf = []
[dependencies]
aligned-sized = { version = "0.2.1", path = "../../macros/aligned-sized" }
light-macros= { version = "0.4.1", path = "../../macros/light" }
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
bytemuck = "1.14"
light-hasher = { version = "0.2.1", path = "../../merkle-tree/hasher" }
light-heap = { version = "0.2.1", path = "../../heap", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion programs/system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ idl-build = ["anchor-lang/idl-build"]

[dependencies]
aligned-sized = { version = "0.2.1", path = "../../macros/aligned-sized" }
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
light-hasher = { version = "0.2.1", path = "../../merkle-tree/hasher" }
light-heap = { version = "0.2.1", path = "../../heap", optional = true }
light-macros = { path = "../../macros/light", version = "0.4.1" }
Expand Down
3 changes: 0 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ PNPM_VERSION="9.2.0"
SOLANA_VERSION="1.18.11"
ANCHOR_VERSION="anchor-v0.29.0"
JQ_VERSION="jq-1.7.1"
CIRCOM_VERSION=$(latest_release Lightprotocol circom)
MACRO_CIRCOM_VERSION=$(latest_release Lightprotocol macro-circom)
LIGHT_PROTOCOL_VERSION=$(latest_release Lightprotocol light-protocol)
PHOTON_VERSION="0.28.0"
PHOTON_BRANCH=""

Expand Down
2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bench-sbf = []
[dependencies]
aligned-sized = { version = "0.2.1", path = "../macros/aligned-sized" }
light-macros = { version = "0.4.1", path = "../macros/light" }
anchor-lang = "0.29.0"
anchor-lang = { workspace = true }
bytemuck = "1.14"
light-hasher = { version = "0.2.1", path = "../merkle-tree/hasher" }
light-heap = { version = "0.2.1", path = "../heap", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions test-programs/account-compression-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ light-prover-client = {path = "../../circuit-lib/light-prover-client" }
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-lang ={ version="0.29.0" }
anchor-spl = { workspace = true }
anchor-lang = { workspace = true }
light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]}
light-system-program = { path = "../../programs/system" , features = ["cpi"]}
account-compression = { path = "../../programs/account-compression" , features = ["cpi"] }
Expand All @@ -42,7 +42,7 @@ light-merkle-tree-reference = {path = "../../merkle-tree/reference"}
light-bounded-vec = {path = "../../merkle-tree/bounded-vec"}
light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}
solana-cli-output = "1.18.11"
solana-cli-output = { workspace = true }
serde_json = "1.0.114"
solana-sdk = { workspace = true }
thiserror = "1.0"
Expand Down
5 changes: 2 additions & 3 deletions test-programs/compressed-token-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ custom-heap = []
default = ["custom-heap"]

[dependencies]
anchor-lang ={ version="0.29.0" }
anchor-lang = { workspace = true }
light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]}
light-system-program = { path = "../../programs/system" , features = ["cpi"]}
account-compression = { path = "../../programs/account-compression" , features = ["cpi"] }
Expand All @@ -30,7 +30,6 @@ light-verifier = {path = "../../circuit-lib/verifier"}
[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = { workspace = true }


[dev-dependencies]
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.1", path = "../../test-utils" }
Expand All @@ -40,4 +39,4 @@ light-prover-client = {path = "../../circuit-lib/light-prover-client" }
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-spl = { workspace = true }
4 changes: 2 additions & 2 deletions test-programs/e2e-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ custom-heap = []
default = ["custom-heap"]

[dependencies]
anchor-lang ={ version="0.29.0" }
anchor-lang = { workspace = true }
light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]}
light-system-program = { path = "../../programs/system" , features = ["cpi"]}
account-compression = { path = "../../programs/account-compression" , features = ["cpi"] }
Expand All @@ -42,6 +42,6 @@ light-prover-client = {path = "../../circuit-lib/light-prover-client" }
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-spl = { workspace = true }
rand = "0.8"
spl-concurrent-merkle-tree = { version = "0.2.0", default-features = false}
4 changes: 2 additions & 2 deletions test-programs/registry-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ light-prover-client = {path = "../../circuit-lib/light-prover-client" }
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-lang ={ version="0.29.0" }
anchor-spl = { workspace = true }
anchor-lang = { workspace = true }
light-registry = { path = "../../programs/registry" , features = ["cpi"]}
light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]}
light-system-program = { path = "../../programs/system" , features = ["cpi"]}
Expand Down
4 changes: 2 additions & 2 deletions test-programs/system-cpi-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ custom-heap = []
default = ["custom-heap"]

[dependencies]
anchor-lang ={ version="0.29.0" }
anchor-lang = { workspace = true }
light-compressed-token = { path = "../../programs/compressed-token", version = "0.4.1", features = ["cpi"]}
light-system-program = { path = "../../programs/system", version = "0.4.1", features = ["cpi"]}
light-registry = { path = "../../programs/registry", version = "0.4.1", features = ["cpi"]}
Expand All @@ -40,4 +40,4 @@ light-prover-client = { path = "../../circuit-lib/light-prover-client", version
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-spl = { workspace = true }
6 changes: 3 additions & 3 deletions test-programs/system-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ light-prover-client = {path = "../../circuit-lib/light-prover-client" }
num-bigint = "0.4.4"
num-traits = "0.2.18"
spl-token = "3.5.0"
anchor-spl = "0.29.0"
anchor-lang ={ version="0.29.0" }
anchor-spl = { workspace = true }
anchor-lang = { workspace = true }
light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]}
light-system-program = { path = "../../programs/system" , features = ["cpi"]}
account-compression = { path = "../../programs/account-compression" , features = ["cpi"] }
Expand All @@ -39,6 +39,6 @@ light-concurrent-merkle-tree = {path = "../../merkle-tree/concurrent"}
light-indexed-merkle-tree = {path = "../../merkle-tree/indexed"}
light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}
solana-cli-output = "1.18.11"
solana-cli-output = { workspace = true }
serde_json = "1.0.114"
solana-sdk = { workspace = true }
6 changes: 3 additions & 3 deletions test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ edition = "2021"
default = []

[dependencies]
anchor-lang = "0.29.0"
anchor-spl = "0.29.0"
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
anyhow = "1.0"
ark-ff = "0.4"
light-hash-set = { path = "../merkle-tree/hash-set", version = "0.2.1" }
Expand All @@ -27,7 +27,7 @@ light-compressed-token = { path = "../programs/compressed-token", version = "0.4
light-system-program = { path = "../programs/system", version = "0.4.1", features = ["cpi"] }
light-registry = { path = "../programs/registry", version = "0.4.1", features = ["cpi"] }
spl-token = { version="3.5.0", features = ["no-entrypoint"] }
solana-transaction-status = "1.18.11"
solana-transaction-status = { workspace = true }
tokio = "1.36"
light-prover-client = { path = "../circuit-lib/light-prover-client", version = "0.2.1" }
reqwest = "0.11.26"
Expand Down

0 comments on commit 3675e11

Please sign in to comment.