diff --git a/basics/account-data/poseidon/account-data-program/ts-programs/src/accountDataProgram.ts b/basics/account-data/poseidon/account-data-program/ts-programs/src/accountDataProgram.ts index 163fd75d..49037acf 100644 --- a/basics/account-data/poseidon/account-data-program/ts-programs/src/accountDataProgram.ts +++ b/basics/account-data/poseidon/account-data-program/ts-programs/src/accountDataProgram.ts @@ -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 @@ -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>; }