Skip to content

Commit

Permalink
Fixed file not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCipherCoder committed Nov 25, 2024
1 parent 6bdf7f3 commit 8f1e159
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion basics/account-data/poseidon/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolution = true
skip-lint = false

[programs.localnet]
account_data = "ChA1o71vBEwkYNs6FnkmG4cxyZWtWkbXSEJ6xP2zaJAq"
account_data = "3edvbB5tuRDQHX2xUdR22m3ih6u7Zf4xi3abmHfSyZsn"

[registry]
url = "https://api.apr.dev"
Expand Down
4 changes: 2 additions & 2 deletions basics/account-data/poseidon/programs/account_data/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<InitializeContext>,
Expand Down
10 changes: 5 additions & 5 deletions basics/account-data/poseidon/tests/account_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AddressInfoProgram>;
let program: Program<AccountData>;
let provider: BankrunProvider;
let addressInfoPda: PublicKey;
let addressInfoBump: number;
Expand All @@ -30,7 +30,7 @@ describe('Address Info Program', () => {
provider = new BankrunProvider(context);

// Get program from workspace
program = new Program<AddressInfoProgram>(IDL, provider);
program = new Program<AccountData>(IDL, provider);

owner = provider.wallet as Wallet;

Expand Down
4 changes: 2 additions & 2 deletions basics/account-data/poseidon/ts-programs/src/accountData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f1e159

Please sign in to comment.