gagliardetto / anchor-go

Generate Go clients from anchor IDLs for Solana blockchain programs
MIT License
153 stars 40 forks source link

How to specify remainingAccounts? #12

Closed archseer closed 2 years ago

archseer commented 2 years ago

We use an instruction that uses ctx.remaining_accounts internally. How do we specify those remaining accounts? They're passed as a separate field in anchor.js.

gagliardetto commented 2 years ago

Instructions have an Append method.

Example: instr.Append(solana.Meta(pubkey).WRITE().SIGNER())

archseer commented 2 years ago

Thanks! That helped.