Skip to content

Commit

Permalink
Update functionality based on latest poseidon lib changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaa committed Nov 25, 2024
1 parent 97ef45f commit 24e831a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub mod favorites_program {
}
#[derive(Accounts)]
pub struct SetFavoritesContext<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
init,
payer = payer,
Expand All @@ -29,6 +27,8 @@ pub struct SetFavoritesContext<'info> {
bump,
)]
pub favorites: Account<'info, Favorites>,
#[account(mut)]
pub payer: Signer<'info>,
pub system_program: Program<'info, System>,
}
#[account]
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.6"
"@solanaturbine/poseidon": "0.0.10"
}
}
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.

4 changes: 2 additions & 2 deletions basics/favorites/poseidon/ts-programs/src/favoritesProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Account, Pubkey, Result, Signer, String, Vec, u8, u64 } from '@solanatu
export default class FavoritesProgram {
static PROGRAM_ID = new Pubkey('HMYL9ABJz8fpw6XUnkRAYVsXor4JxosiZqHBd38ZgCqS');

setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String<8>, hobbies: Vec<String<8>, 5>): Result {
favorites.derive(['favorites', payer.key]).init();
setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String<7>, hobbies: Vec<String<7>, 5>): Result {
favorites.derive(['favorites', payer.key]).init(payer);
favorites.number = number;
favorites.color = color;
favorites.hobbies = hobbies;
Expand Down

0 comments on commit 24e831a

Please sign in to comment.