From 8ce18c36db10c6cb7a342e38ed7b5740bfa61c58 Mon Sep 17 00:00:00 2001 From: "Jean Marchand (Exotic Markets)" Date: Sat, 19 Nov 2022 13:59:14 +0100 Subject: [PATCH] spl: Update instructions and remove rent from constraints (#2265) * Update spl instructions and remove the rent sys_var from constraints * Fix initialize mint * Update changelog and fix examples * Remove oversights --- CHANGELOG.md | 3 ++ lang/syn/src/codegen/accounts/constraints.rs | 11 ++-- spl/src/associated_token.rs | 2 - spl/src/token.rs | 46 +++++++++++++++++ tests/ido-pool/programs/ido-pool/src/lib.rs | 3 -- tests/ido-pool/tests/ido-pool.js | 4 -- tests/misc/programs/misc/src/context.rs | 7 --- tests/misc/tests/misc/misc.ts | 53 -------------------- 8 files changed, 53 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1cc1b62e7..378b2c2098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The minor version will be incremented upon a breaking change and the patch versi * spl: Add `MetadataAccount` account deserialization. ([#2014](https://github.com/coral-xyz/anchor/pull/2014)). * spl: Add `update_primary_sale_happened_via_token` wrapper ([#2173](https://github.com/coral-xyz/anchor/pull/2173)). * spl: Add `sign_metadata` and `remove_creator_verification` wrappers ([#2175](https://github.com/coral-xyz/anchor/pull/2175)). +* spl: Add `initialize_account3` and `initialize_mint2` ([#2265](https://github.com/coral-xyz/anchor/pull/2265)). * lang: Add parsing for consts from impl blocks for IDL PDA seeds generation ([#2128](https://github.com/coral-xyz/anchor/pull/2014)) * lang: Account closing reassigns to system program and reallocates ([#2169](https://github.com/coral-xyz/anchor/pull/2169)). * ts: Add coders for SPL programs ([#2143](https://github.com/coral-xyz/anchor/pull/2143)). @@ -39,6 +40,8 @@ The minor version will be incremented upon a breaking change and the patch versi ### Breaking * ts: SPL coders have been removed from the main Anchor package. ([#2155](https://github.com/coral-xyz/anchor/pull/2155)) +* lang: Remove `rent` from constraints ([#2265](https://github.com/coral-xyz/anchor/pull/2265)). +* spl: Remove `rent` from `associated_token::Create` ([#2265](https://github.com/coral-xyz/anchor/pull/2265)). ## [0.25.0] - 2022-07-05 diff --git a/lang/syn/src/codegen/accounts/constraints.rs b/lang/syn/src/codegen/accounts/constraints.rs index d8286eb79a..0fc1958138 100644 --- a/lang/syn/src/codegen/accounts/constraints.rs +++ b/lang/syn/src/codegen/accounts/constraints.rs @@ -457,14 +457,13 @@ fn generate_constraint_init_group(f: &Field, c: &ConstraintInitGroup) -> proc_ma // Initialize the token account. let cpi_program = token_program.to_account_info(); - let accounts = anchor_spl::token::InitializeAccount { + let accounts = anchor_spl::token::InitializeAccount3 { account: #field.to_account_info(), mint: #mint.to_account_info(), authority: #owner.to_account_info(), - rent: rent.to_account_info(), }; let cpi_ctx = anchor_lang::context::CpiContext::new(cpi_program, accounts); - anchor_spl::token::initialize_account(cpi_ctx)?; + anchor_spl::token::initialize_account3(cpi_ctx)?; } let pa: #ty_decl = #from_account_info_unchecked; @@ -497,7 +496,6 @@ fn generate_constraint_init_group(f: &Field, c: &ConstraintInitGroup) -> proc_ma mint: #mint.to_account_info(), system_program: system_program.to_account_info(), token_program: token_program.to_account_info(), - rent: rent.to_account_info(), }; let cpi_ctx = anchor_lang::context::CpiContext::new(cpi_program, cpi_accounts); anchor_spl::associated_token::create(cpi_ctx)?; @@ -548,12 +546,11 @@ fn generate_constraint_init_group(f: &Field, c: &ConstraintInitGroup) -> proc_ma // Initialize the mint account. let cpi_program = token_program.to_account_info(); - let accounts = anchor_spl::token::InitializeMint { + let accounts = anchor_spl::token::InitializeMint2 { mint: #field.to_account_info(), - rent: rent.to_account_info(), }; let cpi_ctx = anchor_lang::context::CpiContext::new(cpi_program, accounts); - anchor_spl::token::initialize_mint(cpi_ctx, #decimals, &#owner.key(), #freeze_authority)?; + anchor_spl::token::initialize_mint2(cpi_ctx, #decimals, &#owner.key(), #freeze_authority)?; } let pa: #ty_decl = #from_account_info_unchecked; if #if_needed { diff --git a/spl/src/associated_token.rs b/spl/src/associated_token.rs index 53bf460a3a..3ac625d9f9 100644 --- a/spl/src/associated_token.rs +++ b/spl/src/associated_token.rs @@ -21,7 +21,6 @@ pub fn create<'info>(ctx: CpiContext<'_, '_, '_, 'info, Create<'info>>) -> Resul ctx.accounts.mint, ctx.accounts.system_program, ctx.accounts.token_program, - ctx.accounts.rent, ], ctx.signer_seeds, ) @@ -36,7 +35,6 @@ pub struct Create<'info> { pub mint: AccountInfo<'info>, pub system_program: AccountInfo<'info>, pub token_program: AccountInfo<'info>, - pub rent: AccountInfo<'info>, } #[derive(Clone)] diff --git a/spl/src/token.rs b/spl/src/token.rs index abbd5ce0b0..878a57a0db 100644 --- a/spl/src/token.rs +++ b/spl/src/token.rs @@ -142,6 +142,23 @@ pub fn initialize_account<'a, 'b, 'c, 'info>( .map_err(Into::into) } +pub fn initialize_account3<'a, 'b, 'c, 'info>( + ctx: CpiContext<'a, 'b, 'c, 'info, InitializeAccount3<'info>>, +) -> Result<()> { + let ix = spl_token::instruction::initialize_account3( + &spl_token::ID, + ctx.accounts.account.key, + ctx.accounts.mint.key, + ctx.accounts.authority.key, + )?; + solana_program::program::invoke_signed( + &ix, + &[ctx.accounts.account.clone(), ctx.accounts.mint.clone()], + ctx.signer_seeds, + ) + .map_err(Into::into) +} + pub fn close_account<'a, 'b, 'c, 'info>( ctx: CpiContext<'a, 'b, 'c, 'info, CloseAccount<'info>>, ) -> Result<()> { @@ -229,6 +246,23 @@ pub fn initialize_mint<'a, 'b, 'c, 'info>( .map_err(Into::into) } +pub fn initialize_mint2<'a, 'b, 'c, 'info>( + ctx: CpiContext<'a, 'b, 'c, 'info, InitializeMint2<'info>>, + decimals: u8, + authority: &Pubkey, + freeze_authority: Option<&Pubkey>, +) -> Result<()> { + let ix = spl_token::instruction::initialize_mint2( + &spl_token::ID, + ctx.accounts.mint.key, + authority, + freeze_authority, + decimals, + )?; + solana_program::program::invoke_signed(&ix, &[ctx.accounts.mint.clone()], ctx.signer_seeds) + .map_err(Into::into) +} + pub fn set_authority<'a, 'b, 'c, 'info>( ctx: CpiContext<'a, 'b, 'c, 'info, SetAuthority<'info>>, authority_type: spl_token::instruction::AuthorityType, @@ -308,6 +342,13 @@ pub struct InitializeAccount<'info> { pub rent: AccountInfo<'info>, } +#[derive(Accounts)] +pub struct InitializeAccount3<'info> { + pub account: AccountInfo<'info>, + pub mint: AccountInfo<'info>, + pub authority: AccountInfo<'info>, +} + #[derive(Accounts)] pub struct CloseAccount<'info> { pub account: AccountInfo<'info>, @@ -335,6 +376,11 @@ pub struct InitializeMint<'info> { pub rent: AccountInfo<'info>, } +#[derive(Accounts)] +pub struct InitializeMint2<'info> { + pub mint: AccountInfo<'info>, +} + #[derive(Accounts)] pub struct SetAuthority<'info> { pub current_authority: AccountInfo<'info>, diff --git a/tests/ido-pool/programs/ido-pool/src/lib.rs b/tests/ido-pool/programs/ido-pool/src/lib.rs index 4bb0cc6b0e..8b97466ccf 100644 --- a/tests/ido-pool/programs/ido-pool/src/lib.rs +++ b/tests/ido-pool/programs/ido-pool/src/lib.rs @@ -331,7 +331,6 @@ pub struct InitializePool<'info> { // Programs and Sysvars pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, - pub rent: Sysvar<'info, Rent>, } #[derive(Accounts)] @@ -359,7 +358,6 @@ pub struct InitUserRedeemable<'info> { // Programs and Sysvars pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, - pub rent: Sysvar<'info, Rent>, } #[derive(Accounts)] @@ -418,7 +416,6 @@ pub struct InitEscrowUsdc<'info> { // Programs and Sysvars pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, - pub rent: Sysvar<'info, Rent>, } #[derive(Accounts)] diff --git a/tests/ido-pool/tests/ido-pool.js b/tests/ido-pool/tests/ido-pool.js index 03533c1ac0..efda7f2dde 100644 --- a/tests/ido-pool/tests/ido-pool.js +++ b/tests/ido-pool/tests/ido-pool.js @@ -124,7 +124,6 @@ describe("ido-pool", () => { poolUsdc, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, } ); @@ -225,7 +224,6 @@ describe("ido-pool", () => { redeemableMint, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, }), ], @@ -326,7 +324,6 @@ describe("ido-pool", () => { redeemableMint, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, }), ], @@ -401,7 +398,6 @@ describe("ido-pool", () => { usdcMint, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, }), ], diff --git a/tests/misc/programs/misc/src/context.rs b/tests/misc/programs/misc/src/context.rs index cfee817148..d23a654332 100644 --- a/tests/misc/programs/misc/src/context.rs +++ b/tests/misc/programs/misc/src/context.rs @@ -30,7 +30,6 @@ pub struct TestTokenSeedsInit<'info> { /// CHECK: pub authority: AccountInfo<'info>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, pub token_program: Program<'info, Token>, } @@ -46,7 +45,6 @@ pub struct TestInitAssociatedToken<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, pub associated_token_program: Program<'info, AssociatedToken>, @@ -243,7 +241,6 @@ pub struct TestInitMint<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, } @@ -255,7 +252,6 @@ pub struct TestInitToken<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, } @@ -342,7 +338,6 @@ pub struct TestInitMintIfNeeded<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, /// CHECK: @@ -358,7 +353,6 @@ pub struct TestInitTokenIfNeeded<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, /// CHECK: @@ -377,7 +371,6 @@ pub struct TestInitAssociatedTokenIfNeeded<'info> { pub mint: Account<'info, Mint>, #[account(mut)] pub payer: Signer<'info>, - pub rent: Sysvar<'info, Rent>, pub system_program: Program<'info, System>, pub token_program: Program<'info, Token>, pub associated_token_program: Program<'info, AssociatedToken>, diff --git a/tests/misc/tests/misc/misc.ts b/tests/misc/tests/misc/misc.ts index effce1b9d0..6aa4c7a140 100644 --- a/tests/misc/tests/misc/misc.ts +++ b/tests/misc/tests/misc/misc.ts @@ -512,7 +512,6 @@ describe("misc", () => { mint, authority: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, tokenProgram: TOKEN_PROGRAM_ID, }, }); @@ -606,7 +605,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -632,7 +630,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], instructions: [ @@ -663,7 +660,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -691,7 +687,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], instructions: [ @@ -726,7 +721,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], instructions: [ @@ -803,7 +797,6 @@ describe("misc", () => { token: associatedToken, mint: localClient.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1234,7 +1227,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1246,7 +1238,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, mintAuthority: anchor.web3.Keypair.generate().publicKey, freezeAuthority: provider.wallet.publicKey, }, @@ -1268,7 +1259,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1280,7 +1270,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, mintAuthority: provider.wallet.publicKey, freezeAuthority: anchor.web3.Keypair.generate().publicKey, }, @@ -1302,7 +1291,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1314,7 +1302,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, mintAuthority: provider.wallet.publicKey, freezeAuthority: provider.wallet.publicKey, }, @@ -1336,7 +1323,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1349,7 +1335,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1362,7 +1347,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, authority: anchor.web3.Keypair.generate().publicKey, }, signers: [token], @@ -1383,7 +1367,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1395,7 +1378,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint2], }); @@ -1408,7 +1390,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1421,7 +1402,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, authority: provider.wallet.publicKey, }, signers: [token], @@ -1442,7 +1422,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1459,7 +1438,6 @@ describe("misc", () => { token: associatedToken, mint: mint.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1472,7 +1450,6 @@ describe("misc", () => { token: associatedToken, mint: mint.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1495,7 +1472,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1507,7 +1483,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint2], }); @@ -1524,7 +1499,6 @@ describe("misc", () => { token: associatedToken, mint: mint.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1537,7 +1511,6 @@ describe("misc", () => { token: associatedToken, mint: mint2.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1560,7 +1533,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1577,7 +1549,6 @@ describe("misc", () => { token: associatedToken, mint: mint.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1592,7 +1563,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1603,7 +1573,6 @@ describe("misc", () => { token: token.publicKey, mint: mint.publicKey, payer: provider.wallet.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -1773,7 +1742,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1786,7 +1754,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1816,7 +1783,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1829,7 +1795,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1858,7 +1823,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1871,7 +1835,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1899,7 +1862,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1911,7 +1873,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint1], }); @@ -1924,7 +1885,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1953,7 +1913,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -1965,7 +1924,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -1995,7 +1953,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2006,7 +1963,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint1], }); @@ -2018,7 +1974,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [token], }); @@ -2048,7 +2003,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2083,7 +2037,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2113,7 +2066,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2147,7 +2099,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2181,7 +2132,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2209,7 +2159,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2244,7 +2193,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], }); @@ -2275,7 +2223,6 @@ describe("misc", () => { payer: provider.wallet.publicKey, systemProgram: anchor.web3.SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, }, signers: [mint], });