Skip to content

Commit

Permalink
made fixes in accountDataProgram.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikbhatt20 authored Oct 31, 2024
1 parent 3367509 commit 923edb1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Account, Pubkey, Result, Signer, u8, u16, u32 } from '@solanaturbine/poseidon';
import { Account, Pubkey, Result, Signer, u8, u16, u32, String } from '@solanaturbine/poseidon';

export default class AccountDataProgram {
// Following Poseidon example pattern of static PROGRAM_ID
static PROGRAM_ID = new Pubkey('JvF1QDhgab1ARhACPWTAZnUymthGGmn3NXCj8i6mjSQ');

create_address_info(payer: Signer, state: AddressInfo, name: string, houseNumber: u8, street: string, city: string): Result {
create_address_info(payer: Signer, state: AddressInfo, name: String<50>, houseNumber: u8, street: String<50>, city: String<50>): Result {
// Use nit() for initialization
state.derive(['address_info', payer.key]).init(payer);
// Store the account data
Expand All @@ -16,8 +16,8 @@ export default class AccountDataProgram {
}

export interface AddressInfo extends Account {
name: string;
name: String<50>;
houseNumber: u8;
street: string;
city: string;
street: String<50>;
city: String<50>;
}

0 comments on commit 923edb1

Please sign in to comment.