-
Notifications
You must be signed in to change notification settings - Fork 1
Revamp scripts #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chore/update-deps-fix-tests
Are you sure you want to change the base?
Revamp scripts #10
Conversation
dc81513 to
72cb295
Compare
guibescos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments
| newAuthority: newAuthority, | ||
| programAccount: programToTransfer, | ||
| }) | ||
| .accountsPartial({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally you only pass one of accounts or accountsPartial
also PDAs are usually derived automatically, you can probably get away without specifying escrowAuthority and even programData in recent versions of anchor. if it's failing to derive them, make an accountsPartial block with all the accounts
scripts/ledger.ts
Outdated
| transaction: T | ||
| ): Promise<T> { | ||
| if (transaction instanceof VersionedTransaction) { | ||
| throw new Error("VersionedTransaction not supported by Ledger"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check https://github.com/fogo-foundation/fogo-sessions/blob/main/scripts/ts/src/ledger.ts#L127 for a more updated version that supports VersionedTransaction too
README.md
Outdated
|
|
||
| TypeScript scripts are provided to interact with the on-chain program. All scripts support: | ||
| - File-based keypairs or Ledger hardware wallets | ||
| - Squads v3 multisig proposals via `--multisig` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the transfer and revert scripts don't really support squads. To support squads you need to let currentAuthority be a multisigAuthority
|
Did another pass at the scripts. Now they support the Squads program deployed at a specific address, and proper handling of the Squads multisig vault index. |
This updates the set of included scripts to call the propose/accept/revert instructions of the main program-authority-escrow program with support for file keys, Ledger wallets, and Squads v3 multisigs.