Skip to content

Commit 8fbb263

Browse files
committed
chore: use released light-protocol crates from crates.io
- Update workspace dependencies to use crates.io versions instead of git - light-sdk 0.18.0, light-token 0.3.0, light-hasher 5.0.0 - light-program-test 0.18.0, light-client 0.18.0 - Remove unnecessary dependencies that are re-exported: - light-sdk-macros, light-sdk-types (re-exported by light-sdk/light-token) - light-compressible (re-exported by light-sdk) - light-token-interface, light-token-types (re-exported by light-token) - Update imports to use re-exported paths
1 parent 673b072 commit 8fbb263

11 files changed

Lines changed: 138 additions & 103 deletions

File tree

anchor/Cargo.lock

Lines changed: 119 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

anchor/Cargo.toml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ members = [
99
# Pin blake3 version for solana-program compatibility
1010
blake3 = { version = "=1.8.2", default-features = false }
1111

12-
# Light Protocol dependencies from git
13-
light-sdk = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
14-
light-sdk-macros = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
15-
light-sdk-types = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60", default-features = false }
16-
light-compressible = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
17-
light-hasher = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
18-
light-token = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
19-
light-token-interface = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
20-
light-token-types = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
21-
light-program-test = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
22-
light-client = { git = "https://github.com/Lightprotocol/light-protocol", rev = "0b77fa4c5e05f76b46f9696cf7dec02d0306eb60" }
23-
# Published on crates.io (not in light-protocol repo)
12+
# Light Protocol dependencies from crates.io
13+
light-sdk = "0.18.0"
14+
light-hasher = "5.0.0"
15+
light-token = "0.3.0"
16+
light-program-test = "0.18.0"
17+
light-client = "0.18.0"
2418
light-anchor-spl = { version = "0.31.1", features = ["idl-build"] }

anchor/programs/escrow/Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ anchor-lang = { version = "=0.31.1", features = ["idl-build"] }
2222
blake3 = { workspace = true }
2323

2424
light-sdk = { workspace = true, features = ["anchor", "anchor-discriminator", "idl-build", "cpi-context", "v2"] }
25-
light-sdk-macros = { workspace = true }
26-
light-sdk-types = { workspace = true, features = ["v2", "cpi-context"] }
2725
light-token = { workspace = true, features = ["anchor"] }
28-
light-token-types = { workspace = true, features = ["anchor"] }
29-
light-compressible = { workspace = true, features = ["anchor"] }
3026
# Required by LightAccount derive macro
3127
light-hasher = { workspace = true, features = ["solana"] }
3228
light-anchor-spl = { workspace = true, features = ["idl-build"] }
@@ -39,8 +35,6 @@ solana-msg = "2.2"
3935
[dev-dependencies]
4036
light-program-test = { workspace = true }
4137
light-client = { workspace = true, features = ["v2", "anchor"] }
42-
light-token-interface = { workspace = true }
43-
light-token-types = { workspace = true }
4438
anchor-spl = "0.31.1"
4539
tokio = { version = "1", features = ["full"] }
4640
solana-keypair = { version = "2.2" }

anchor/programs/escrow/src/instructions/make_offer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anchor_lang::prelude::*;
22
use light_anchor_spl::token_interface::{Mint, TokenAccount, TokenInterface};
3-
use light_compressible::CreateAccountsProof;
4-
use light_sdk_macros::LightAccounts;
3+
use light_sdk::interface::CreateAccountsProof;
4+
use light_token::anchor::LightAccounts;
55
use light_token::instruction::{
66
CreateTokenAccountCpi, COMPRESSIBLE_CONFIG_V1, RENT_SPONSOR,
77
};

anchor/programs/escrow/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ pub mod instructions;
55
pub mod state;
66

77
use anchor_lang::prelude::*;
8-
use light_sdk::derive_light_cpi_signer;
9-
use light_sdk_macros::light_program;
10-
use light_sdk_types::CpiSigner;
8+
use light_token::anchor::{derive_light_cpi_signer, light_program, CpiSigner};
119

1210
pub use constants::*;
1311
pub use instructions::*;

anchor/programs/escrow/src/state/offer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anchor_lang::prelude::*;
2-
use light_sdk::{compressible::CompressionInfo, LightDiscriminator};
3-
use light_sdk_macros::LightAccount;
2+
use light_sdk::LightDiscriminator;
3+
use light_token::anchor::{CompressionInfo, LightAccount};
44

55
/// The Offer account stores details about a token swap offer.
66
#[derive(Default, Debug, InitSpace, LightAccount)]

anchor/programs/escrow/tests/escrow_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use light_token::instruction::{
2020
CreateAssociatedTokenAccount, CreateMint, CreateMintParams, MintTo, COMPRESSIBLE_CONFIG_V1,
2121
RENT_SPONSOR,
2222
};
23-
use light_token_interface::LIGHT_TOKEN_PROGRAM_ID;
24-
use light_token_types::CPI_AUTHORITY_PDA;
23+
use light_sdk::constants::LIGHT_TOKEN_PROGRAM_ID;
24+
use light_token::constants::CPI_AUTHORITY_PDA;
2525
use solana_instruction::Instruction;
2626
use solana_keypair::Keypair;
2727
use solana_pubkey::Pubkey;

anchor/programs/light-token-minter/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ anchor-lang = { version = "=0.31.1", features = ["init-if-needed", "idl-build"]
2222
blake3 = { workspace = true }
2323

2424
light-sdk = { workspace = true, features = ["anchor", "anchor-discriminator", "idl-build", "cpi-context", "v2"] }
25-
light-sdk-macros = { workspace = true }
26-
light-sdk-types = { workspace = true, features = ["v2", "cpi-context"] }
2725
light-token = { workspace = true, features = ["anchor", "idl-build"] }
28-
light-compressible = { workspace = true, features = ["anchor"] }
2926
# Required by LightAccount derive macro
3027
light-hasher = { workspace = true, features = ["solana"] }
3128
light-anchor-spl = { workspace = true, features = ["idl-build"] }
@@ -38,7 +35,6 @@ solana-msg = "2.2"
3835
[dev-dependencies]
3936
light-program-test = { workspace = true }
4037
light-client = { workspace = true, features = ["v2", "anchor"] }
41-
light-token-types = { workspace = true, features = ["anchor"] }
4238
tokio = { version = "1", features = ["full"] }
4339
spl-token = "7.0.0"
4440
solana-keypair = { version = "2.2" }

anchor/programs/light-token-minter/src/instructions/create.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anchor_lang::prelude::*;
2-
use light_compressible::CreateAccountsProof;
3-
use light_sdk_macros::LightAccounts;
2+
use light_sdk::interface::CreateAccountsProof;
3+
use light_token::anchor::LightAccounts;
44
use light_token::instruction::{COMPRESSIBLE_CONFIG_V1, RENT_SPONSOR};
55

66
use crate::MINT_SIGNER_SEED;

anchor/programs/light-token-minter/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
pub mod instructions;
44

55
use anchor_lang::prelude::*;
6-
use light_sdk::derive_light_cpi_signer;
7-
use light_sdk_macros::light_program;
8-
use light_sdk_types::CpiSigner;
6+
use light_token::anchor::{derive_light_cpi_signer, light_program, CpiSigner};
97

108
pub use instructions::*;
119

0 commit comments

Comments
 (0)