Skip to content

Commit 36c067b

Browse files
committed
updated the code with poseidon fixes
1 parent 5377ce2 commit 36c067b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

basics/pda-rent-payer/poseidon/pda-rent-payer/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resolution = true
55
skip-lint = false
66

77
[programs.localnet]
8-
pda_rent_payer = "8R1pBZKFyvBdR7LDa4R45JWSdUFnJdRSo9P1MPr571LC"
8+
pda_rent_payer = "Db6bufzTcWMDhiCUAuCv3AqCyeZKV4BSGG9ooCibQjrJ"
99

1010
[registry]
1111
url = "https://api.apr.dev"

basics/pda-rent-payer/poseidon/pda-rent-payer/pnpm-lock.yaml

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

basics/pda-rent-payer/poseidon/pda-rent-payer/programs/pda-rent-payer/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anchor_lang::prelude::*;
22
use anchor_lang::system_program::{Transfer, transfer};
3-
declare_id!("8R1pBZKFyvBdR7LDa4R45JWSdUFnJdRSo9P1MPr571LC");
3+
declare_id!("Db6bufzTcWMDhiCUAuCv3AqCyeZKV4BSGG9ooCibQjrJ");
44
#[program]
55
pub mod pda_rent_payer {
66
use super::*;
@@ -10,7 +10,7 @@ pub mod pda_rent_payer {
1010
) -> Result<()> {
1111
let transfer_accounts = Transfer {
1212
from: ctx.accounts.payer.to_account_info(),
13-
to: ctx.accounts.rentVault.to_account_info(),
13+
to: ctx.accounts.rent_vault.to_account_info(),
1414
};
1515
let cpi_ctx = CpiContext::new(
1616
ctx.accounts.system_program.to_account_info(),
@@ -24,8 +24,8 @@ pub mod pda_rent_payer {
2424
amount: u64,
2525
) -> Result<()> {
2626
let transfer_accounts = Transfer {
27-
from: ctx.accounts.rentVault.to_account_info(),
28-
to: ctx.accounts.newAccount.to_account_info(),
27+
from: ctx.accounts.rent_vault.to_account_info(),
28+
to: ctx.accounts.new_account.to_account_info(),
2929
};
3030
let signer_seeds: &[&[&[u8]]; 1] = &[&[b"rent_vault", &[ctx.bumps.rent_vault]]];
3131
let cpi_ctx = CpiContext::new_with_signer(

basics/pda-rent-payer/poseidon/pda-rent-payer/ts-programs/src/pdaRentPayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { LAMPORTS_PER_SOL } from '@solana/web3.js';
22
import { Pubkey, type Result, Signer, SystemAccount, SystemProgram, u64 } from '@solanaturbine/poseidon';
33

44
export default class PdaRentPayer {
5-
static PROGRAM_ID = new Pubkey('8R1pBZKFyvBdR7LDa4R45JWSdUFnJdRSo9P1MPr571LC');
5+
static PROGRAM_ID = new Pubkey('Db6bufzTcWMDhiCUAuCv3AqCyeZKV4BSGG9ooCibQjrJ');
66

77
initRentVault(payer: Signer, rentVault: SystemAccount, fundLamports: u64): Result {
88
rentVault.derive(['rent_vault']);

0 commit comments

Comments
 (0)