diff --git a/basics/account-data/poseidon/Anchor.toml b/basics/account-data/poseidon/Anchor.toml index dfc85409..cd5e152b 100644 --- a/basics/account-data/poseidon/Anchor.toml +++ b/basics/account-data/poseidon/Anchor.toml @@ -5,7 +5,7 @@ resolution = true skip-lint = false [programs.localnet] -account_data = "ChA1o71vBEwkYNs6FnkmG4cxyZWtWkbXSEJ6xP2zaJAq" +account_data = "3edvbB5tuRDQHX2xUdR22m3ih6u7Zf4xi3abmHfSyZsn" [registry] url = "https://api.apr.dev" diff --git a/basics/account-data/poseidon/programs/account_data/src/lib.rs b/basics/account-data/poseidon/programs/account_data/src/lib.rs index d9bd1127..c2e04311 100644 --- a/basics/account-data/poseidon/programs/account_data/src/lib.rs +++ b/basics/account-data/poseidon/programs/account_data/src/lib.rs @@ -1,7 +1,7 @@ use anchor_lang::prelude::*; -declare_id!("ChA1o71vBEwkYNs6FnkmG4cxyZWtWkbXSEJ6xP2zaJAq"); +declare_id!("3edvbB5tuRDQHX2xUdR22m3ih6u7Zf4xi3abmHfSyZsn"); #[program] -pub mod address_info_program { +pub mod account_data { use super::*; pub fn initialize( ctx: Context, diff --git a/basics/account-data/poseidon/tests/account_data.ts b/basics/account-data/poseidon/tests/account_data.ts index 4c7db3c7..5edd1288 100644 --- a/basics/account-data/poseidon/tests/account_data.ts +++ b/basics/account-data/poseidon/tests/account_data.ts @@ -3,15 +3,15 @@ import { PublicKey, SystemProgram } from '@solana/web3.js'; import { BankrunProvider } from 'anchor-bankrun'; import { expect } from 'chai'; import { startAnchor } from 'solana-bankrun'; -import { AddressInfoProgram } from '../target/types/address_info_program'; +import { AccountData } from '../target/types/account_data'; -describe('Address Info Program', () => { - const IDL = require('../target/idl/address_info_program.json'); +describe('Account Data', () => { + const IDL = require('../target/idl/account_data.json'); const PROGRAM_ID = new PublicKey(IDL.address); // Test setup - let program: Program; + let program: Program; let provider: BankrunProvider; let addressInfoPda: PublicKey; let addressInfoBump: number; @@ -30,7 +30,7 @@ describe('Address Info Program', () => { provider = new BankrunProvider(context); // Get program from workspace - program = new Program(IDL, provider); + program = new Program(IDL, provider); owner = provider.wallet as Wallet; diff --git a/basics/account-data/poseidon/ts-programs/src/accountData.ts b/basics/account-data/poseidon/ts-programs/src/accountData.ts index 78f2fdf1..f6d340fe 100644 --- a/basics/account-data/poseidon/ts-programs/src/accountData.ts +++ b/basics/account-data/poseidon/ts-programs/src/accountData.ts @@ -15,9 +15,9 @@ export interface AddressInfoState extends Account { /** * Program class for managing address information */ -export default class AddressInfoProgram { +export default class AccountData { // Following Poseidon example pattern of static PROGRAM_ID - static PROGRAM_ID = new Pubkey('ChA1o71vBEwkYNs6FnkmG4cxyZWtWkbXSEJ6xP2zaJAq'); + static PROGRAM_ID = new Pubkey('3edvbB5tuRDQHX2xUdR22m3ih6u7Zf4xi3abmHfSyZsn'); initialize(owner: Signer, state: AddressInfoState, houseNumber: u8, streetNumber: u16, zipCode: u32, countryCode: u16): Result { // Use derive() for PDA creation and init() for initialization