Skip to content

Commit

Permalink
Update functionality respect functionality change of String on @solan…
Browse files Browse the repository at this point in the history
…aturbine/poseidon
  • Loading branch information
mwaa committed Oct 28, 2024
1 parent e102125 commit f76bfe5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct SetFavoritesContext<'info> {
#[account(
init,
payer = payer,
space = 75,
space = 87,
seeds = [b"favorites",
payer.key().as_ref()],
bump,
Expand Down
2 changes: 1 addition & 1 deletion basics/favorites/poseidon/ts-programs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@solanaturbine/poseidon": "^0.0.5"
"@solanaturbine/poseidon": "^0.0.6"
}
}
10 changes: 5 additions & 5 deletions basics/favorites/poseidon/ts-programs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions basics/favorites/poseidon/ts-programs/src/favoritesProgram.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// biome-ignore lint/suspicious/noShadowRestrictedNames: Solana Turbine explicitly uses String as a type name
import { Account, Pubkey, Result, Signer, String, u8, u64 } from '@solanaturbine/poseidon';
import { Account, Pubkey, Result, Signer, String, Vec, u8, u64 } from '@solanaturbine/poseidon';

export default class FavoritesProgram {
static PROGRAM_ID = new Pubkey('HMYL9ABJz8fpw6XUnkRAYVsXor4JxosiZqHBd38ZgCqS');

setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String, hobbies: String[]): Result {
setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String<8>, hobbies: Vec<String<8>, 5>): Result {
favorites.derive(['favorites', payer.key]).init();
favorites.number = number;
favorites.color = color;
Expand All @@ -15,7 +15,7 @@ export default class FavoritesProgram {

export interface Favorites extends Account {
number: u64;
color: String;
hobbies: String[];
color: String<7>;
hobbies: Vec<String<7>, 5>;
bump: u8;
}

0 comments on commit f76bfe5

Please sign in to comment.