Skip to content

Commit 5b2ba40

Browse files
authored
chore: fix token escrow idl (#1729)
1 parent 8ff9974 commit 5b2ba40

File tree

5 files changed

+36
-29
lines changed

5 files changed

+36
-29
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ spl-token-2022 = { version = "7", no-default-features = true, features = [
8686
pinocchio = { version = "0.8.1" }
8787

8888
# Anchor
89-
anchor-lang = { version = "=0.31.0", features = ["idl-build"] }
90-
anchor-spl = "=0.31.0"
89+
anchor-lang = { version = "=0.31.1", features = ["idl-build"] }
90+
anchor-spl = "=0.31.1"
9191

9292
# Anchor compatibility
9393
borsh = "0.10.0"

examples/anchor/token-escrow/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
2121

2222
[dependencies]
2323
anchor-lang = { workspace = true, features = ["init-if-needed"] }
24-
light-compressed-token = { workspace = true }
25-
light-system-program-anchor = { workspace = true }
26-
account-compression = { workspace = true }
24+
light-compressed-token = { workspace = true, features = ["cpi"] }
25+
light-system-program-anchor = { workspace = true, features = ["cpi"] }
26+
account-compression = { workspace = true, features = ["cpi"] }
2727
light-hasher = { workspace = true }
2828
light-sdk = { workspace = true, features = ["legacy"] }
2929
light-compressed-account = { workspace = true, features = ["anchor"] }

examples/anchor/token-escrow/src/escrow_with_compressed_pda/escrow.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,24 @@ use crate::{create_change_output_compressed_token_account, program::TokenEscrow,
3131
#[light_system_accounts]
3232
#[derive(Accounts, LightTraits)]
3333
pub struct EscrowCompressedTokensWithCompressedPda<'info> {
34+
/// CHECK:
3435
#[account(mut)]
3536
#[fee_payer]
3637
pub signer: Signer<'info>,
3738
/// CHECK:
3839
#[account(seeds = [b"escrow".as_slice(), signer.key.to_bytes().as_slice()], bump)]
3940
pub token_owner_pda: AccountInfo<'info>,
41+
/// CHECK:
4042
pub compressed_token_program: Program<'info, LightCompressedToken>,
43+
/// CHECK:
4144
pub compressed_token_cpi_authority_pda: AccountInfo<'info>,
4245
#[self_program]
4346
pub self_program: Program<'info, TokenEscrow>,
4447
/// CHECK:
4548
#[cpi_context]
4649
#[account(mut)]
4750
pub cpi_context_account: AccountInfo<'info>,
51+
/// CHECK:
4852
#[authority]
4953
#[account(seeds = [CPI_AUTHORITY_PDA_SEED], bump)]
5054
pub cpi_authority_pda: AccountInfo<'info>,

examples/anchor/token-escrow/src/escrow_with_pda/escrow.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ use crate::create_change_output_compressed_token_account;
1414
#[light_system_accounts]
1515
#[derive(Accounts, LightTraits)]
1616
pub struct EscrowCompressedTokensWithPda<'info> {
17+
/// CHECK:
1718
#[account(mut)]
1819
#[fee_payer]
1920
pub signer: Signer<'info>,
2021
/// CHECK:
2122
#[authority]
2223
#[account(seeds = [b"escrow".as_slice(), signer.key.to_bytes().as_slice()], bump)]
2324
pub token_owner_pda: AccountInfo<'info>,
25+
/// CHECK:
2426
#[self_program]
2527
pub compressed_token_program: Program<'info, LightCompressedToken>,
2628
/// CHECK:
2729
pub compressed_token_cpi_authority_pda: AccountInfo<'info>,
30+
/// CHECK:
2831
#[account(init_if_needed, seeds = [b"timelock".as_slice(), signer.key.to_bytes().as_slice()],bump, payer = signer, space = 8 + 8)]
2932
pub timelock_pda: Account<'info, EscrowTimeLock>,
3033
}

0 commit comments

Comments
 (0)