Skip to content

Commit

Permalink
update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrinathNR committed Nov 2, 2024
1 parent e1e8c25 commit 620eb8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ We’ve defined the `VoteState` account as our data structure, and now we're rea
// Pass all the accounts we need as the parameters
initialize(state: VoteState, user: Signer): Result {

// Use `.derive([seed])` to define the PDA and chain the `.init()` at the end for creating the account
// Use `.derive([seed])` to define the PDA and chain the `.init(payer)` at the end for creating the account and pass the payer argument
state.derive(["vote"])
.init();
.init(user);

// Set the initial value to the `vote` field of the account
state.vote = new i64(0);
Expand Down

0 comments on commit 620eb8a

Please sign in to comment.